並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 16 件 / 16件

新着順 人気順

if elif else program in python exampleの検索結果1 - 16 件 / 16件

  • 大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog

    1. はじめに 2024 年 5 月 14 日、OpenAI 社から新たな生成 AI「GPT-4o」が発表され、世界に大きな衝撃を与えました。これまでの GPT-4 よりも性能を向上させただけでなく1、音声や画像のリアルタイム処理も実現し、さらに応答速度が大幅に速くなりました。「ついにシンギュラリティが来てしまったか」「まるで SF の世界を生きているような感覚だ」という感想も見受けられました。 しかし、いくら生成 AI とはいえ、競技プログラミングの問題を解くのは非常に難しいです。なぜなら競技プログラミングでは、問題文を理解する能力、プログラムを実装する能力だけでなく、より速く答えを求められる解法 (アルゴリズム) を考える能力も要求されるからです。もし ChatGPT が競技プログラミングを出来るようになれば他のあらゆるタスクをこなせるだろう、と考える人もいます。 それでは、現代最強の

      大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog
    • Writing a C compiler in 500 lines of Python

      A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

      • Implementing Logic Programming

        Most of my readers are probably familiar with procedural programming, object-oriented programming (OOP), and functional programming (FP). The majority of top programming languages on all of the language popularity charts (like TIOBE) support all three to some extent. Even if a programmer avoided one or more of those three paradigms like the plague, they’re likely at least aware of them and what th

          Implementing Logic Programming
        • Building a Toy Programming Language in Python

          I thought it would be fun to go outside of my comfort zone of web development topics and write about something completely different and new, something I have never written about before. So today, I'm going to show you how to implement a programming language! The project will parse and execute programs written in a simple language I called my (I know it's a lame name, but hey, it is "my" language).

            Building a Toy Programming Language in Python
          • Fizz Buzz with Cosines - Susam Pal

            Fizz Buzz is a counting game that has become oddly popular in the world of computer programming as a simple test of basic programming skills. The rules of the game are straightforward. Players say the numbers aloud in order beginning with one. Whenever a number is divisible by 3, they say 'Fizz' instead. If it is divisible by 5, they say 'Buzz'. If it is divisible by both 3 and 5, the player says

            • My thoughts on writing a Minecraft server from scratch (in Bash)

              My thoughts on writing a Minecraft server from scratch (in Bash) For the past year or so, I've been thinking about writing a Minecraft server in Bash as a thought excercise. I once tried that before with the Classic protocol (the one from 2009), but I quickly realized there wasn't really a way to properly parse binary data in bash. Take the following code sample: function a() { read -n 2 uwu echo

              • Dynamic Programming is not Black Magic - Quentin Santos

                This year’s Advent of Code has been brutal (compare the stats of 2023 with that of 2022, especially day 1 part 1 vs. day 1 part 2). It included a problem to solve with dynamic programming as soon as day 12, which discouraged some people I know. This specific problem was particularly gnarly for Advent of Code, with multiple special cases to take into account, making it basically intractable if you

                  Dynamic Programming is not Black Magic - Quentin Santos
                • Rust on MIPS64 Windows NT 4.0

                  Introduction Some part of me has always been fascinated with coercing code to run in weird places. I scratch this itch a lot with my security research projects. These often lead me to writing shellcode to run in kernels or embedded hardware, sometimes with the only way being through an existing bug. For those not familiar, shellcode is honestly hard to describe. I don’t know if there’s a very form

                    Rust on MIPS64 Windows NT 4.0
                  • Agents for Amazon Bedrock now support memory retention and code interpretation (preview) | Amazon Web Services

                    AWS News Blog Agents for Amazon Bedrock now support memory retention and code interpretation (preview) With Agents for Amazon Bedrock, generative artificial intelligence (AI) applications can run multistep tasks across different systems and data sources. A couple of months back, we simplified the creation and configuration of agents. Today, we are introducing in preview two new fully managed capab

                      Agents for Amazon Bedrock now support memory retention and code interpretation (preview) | Amazon Web Services
                    • Python behind the scenes #11: how the Python import system works

                      If you ask me to name the most misunderstood aspect of Python, I will answer without a second thought: the Python import system. Just remember how many times you used relative imports and got something like ImportError: attempted relative import with no known parent package; or tried to figure out how to structure a project so that all the imports work correctly; or hacked sys.path when you couldn

                      • A Deep Dive into eBPF: Writing an Efficient DNS Monitoring.

                        eBPF / XDP is an in-kernel virtual machine, provides a high-level library, instruction set and an execution environment inside the Linux kernel. It’s used in many Linux kernel subsystems, most prominently networking, tracing, debugging and security. Including to modify the processing of packets in the kernel and also allows the programming of network devices such as SmartNICs. Use cases in eBPF im

                          A Deep Dive into eBPF: Writing an Efficient DNS Monitoring.
                        • Python behind the scenes #12: how async/await works in Python

                          Mark functions as async. Call them with await. All of a sudden, your program becomes asynchronous – it can do useful things while it waits for other things, such as I/O operations, to complete. Code written in the async/await style looks like regular synchronous code but works very differently. To understand how it works, one should be familiar with many non-trivial concepts including concurrency,

                          • Build and deploy ML inference applications from scratch using Amazon SageMaker | Amazon Web Services

                            Artificial Intelligence Build and deploy ML inference applications from scratch using Amazon SageMaker As machine learning (ML) goes mainstream and gains wider adoption, ML-powered inference applications are becoming increasingly common to solve a range of complex business problems. The solution to these complex business problems often requires using multiple ML models and steps. This post shows y

                              Build and deploy ML inference applications from scratch using Amazon SageMaker | Amazon Web Services
                            • PEN-200-2022受講記 & OSCP合格記 - プログラム系統備忘録ブログ

                              PEN-200-2022コースを受講し、OSCP試験に合格できました。コースや試験の概要、これから取り組む方へのアドバイス、備忘録等の記事です。 なお、本文でも言及しますが、PEN-200コースの内容が改定されたり、OSCP試験の出題範囲が変更されたり、Bonus Pointの取得条件が変更されたりします。受講の際はご自身で最新情報をご確認ください。 分かる人向けの結果概要 PEN-200とは 私の事前知識 PEN-200コース内容やOSCP試験内容、Bonus Point条件の変化 PEN-200-2022からPEN-200-2023への変化 Bonus Pointの獲得条件の変化 OSCP試験のマシン構成の変化 PEN-200コース受講記 Exercise関係 Lab関係 サポート関係 OSCP試験受験記 OSCP試験の申込み proctoringソフトウェアの動作確認 その他受験前の

                                PEN-200-2022受講記 & OSCP合格記 - プログラム系統備忘録ブログ
                              • DavidAU/OpenAi-GPT-oss-20b-abliterated-uncensored-NEO-Imatrix-gguf · Hugging Face

                                Specialized uncensored/abliterated quants for new OpenAI 20B MOE - Mixture of Experts Model at 80+ T/S. See settings and special instructions for using abliterated models below. These are NEO,Horror, NEOCODE Imatrix GGUFs, imatrix datasets by DavidAU. NEO, Horror and NEOCode dataset improves overall performance, and are for all use cases. This model uses Huihui-gpt-oss-20b-BF16-abliterated as a ba

                                  DavidAU/OpenAi-GPT-oss-20b-abliterated-uncensored-NEO-Imatrix-gguf · Hugging Face
                                • Following up on the Python JIT

                                  Performance of Python programs has been a major focus of development for the language over the last five years or so; the Faster CPython project has been a big part of that effort. One of its subprojects is to add an experimental just-in-time (JIT) compiler to the language; at last year's PyCon US, project member Brandt Bucher gave an introduction to the copy-and-patch JIT compiler. At PyCon US 20

                                  1