A guy with a lot of useful things to do when doing AtCoder in Python

Overview

atcoder_python_env

Python で AtCoder をやるときに便利な諸々を用意したやつ

必要なモジュールのインストール

online-judge-toolsatcoder-cli を使います

$ pip3 install -r requirements.txt
$ npm install -g atcoder-cli

コンテスト用フォルダの作成

例えば下記コマンドで abc/abc100 フォルダが作成されます

$ python3 build_contest_env.py abc/abc100

階層は以下のようになります

.
├── abc
│   └── abc100
│       ├── a.py
│       ├── b.py
│       ├── c.py
│       ├── d.py
│       ├── e.py
│       ├── f.py
│       ├── g.py
│       ├── h.py
│       ├── judge.py
│       ├── setup.py
│       └── submit.py
├── temp
│   ├── judge.py
│   ├── setup.py
│   ├── submit.py
│   └── temp.py
├── .gitignore
├── README.md
├── build_contest_env.py
└── requirements.txt

a.py ~ h.py がそれぞれの問題を解くためのファイルで、 temp/temp.py の内容をコピーしたものです。なので自分のテンプレファイルを使いたい場合は temp/temp.py を変更してください

なお、フォルダ名は自由で大丈夫ですが、セットアップの際にフォルダのパスの末尾をデフォルトのコンテストIDとして認識するように設定してあるので末尾はコンテストIDにしておくと便利です

オプションがいくつかあるので詳しくは下記コマンドによりヘルプを参照してください

$ python3 build_contest_env.py -h

セットアップ

セットアップでは全問題のサンプルケースのダウンロードと自動テスト・自動提出のための設定を行います

自動テストと自動提出を行う前に必ず実行してください

上記で作成したディレクトリに移動します

$ cd abc/abc100

下記コマンドによりセットアップを行います

$ python3 setup.py -c abc100

-c オプションによりコンテストIDを指定します

なおデフォルトではカレントディレクトリの末尾をコンテストIDと認識するようになっているので、今回の例では下記コマンドでも大丈夫です

$ python3 setup.py

初回実行時は自動テスト・自動提出のために online-judge-tools と atcoder-cli のそれぞれから AtCoder にログインするため2回続けてログインを要求します

2回目の実行以降はログインなしで実行可能です

自動テスト

abc/abc100 ディレクトリにおいて、例えば下記コマンドにより A 問題のサンプルケースを自動でテストします

$ python3 judge.py a

-s オプションをつけて実行するとサンプルが全て一致していたら自動で提出も行います

$ python3 judge.py a -s

他にもオプションがいくつかあるので詳しくは下記コマンドによりヘルプを参照してください

$ python3 judge.py -h

自動提出

abc/abc100 ディレクトリにおいて、例えば下記コマンドにより A 問題に自動で提出します

$ python3 submit.py a

-l オプションにより pypy で提出するか python で提出するか選べます、デフォルトは pypy です

$ python3 submit.py a -l python

詳しくは下記コマンドによりヘルプを参照してください

$ python3 submit.py -h
Osintgram by Datalux but i fixed some errors i found and made it look cleaner

OSINTgram-V2 OSINTgram-V2 is made from Osintgram which is made by Datalux originally but i took the script and fixed some errors i found and made the

2 Feb 02, 2022
Patch PL to disable LK verification. Patch LK to disable boot/recovery verification.

Simple Python(3) script to disable LK verification in Amazon Preloader images and boot/recovery image verification in Amazon LK ("Little Kernel") images.

Roger Ortiz 18 Mar 17, 2022
Streamlit component to display topics from Streamlit's community forum related to any exception.

streamlit-forum Streamlit component to display topics from Streamlit's community forum related to any exception. Installation pip install streamlit-fo

Snehan Kekre 7 Jul 15, 2022
Hook and simulate global keyboard events on Windows and Linux.

keyboard Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.

BoppreH 3.2k Jan 01, 2023
Old versions of Deadcord that are problematic or used as reference.

⚠️ Unmaintained and broken. We have decided to release the old version of Deadcord before our v1.0 rewrite. (which will be equiped with much more feat

Galaxzy 1 Feb 10, 2022
ESteg - A simple steganography program for python

ESteg A simple steganography program to embed the contents of a text file into a

Jithin Renji 1 Jan 02, 2022
Turn a raspberry pi into a Bluetooth Midi device

PiBluetoothMidSetup This will change serveral system wide packages/configurations Do not run this on your primary machine or anything you don't know h

MyLab6 40 Sep 19, 2022
A price calculator for multiple things

Price Calculator A price calculator for multiple things Example I have 0.0567kg diamond. The price of diamond in kg is: $4500. Then it says: The price

Abel 1 Nov 26, 2021
Mommas-cookbook - A Repository About Mom's Recipes

Mommas Cookbook A Repository for Mom's Recipes Contents bacalhau à Gomes de Sá Beef-Rendang bacalhau à Gomes de Sá, recommended by @s0undt3ch One of t

1 Jan 08, 2022
Model synchronization from dbt to Metabase.

dbt-metabase Model synchronization from dbt to Metabase. If dbt is your source of truth for database schemas and you use Metabase as your analytics to

Mike Gouline 270 Jan 08, 2023
A Snakemake workflow for standardised sc/snRNAseq analysis

single_snake_sequencing - sc/snRNAseq Snakemake Workflow A Snakemake workflow for standardised sc/snRNAseq analysis. Every single cell analysis is sli

IMS Bio2Core Facility 1 Nov 02, 2021
Telegram bot to remove the forwarded tag from messages.

Anonymous Sender Bot @AnonySendBot Telegram bot to remove the forwarded tag from messages. Table of Contents Usage Deploy To Heroku Local Deploying En

Stark Bots 26 Nov 24, 2022
EDF R&D implementation of ISO 15118-20 FDIS.

EDF R&D implementation of ISO 15118-20 FDIS ============ This project implements the ISO 15118-20 using Python. Supported features: DC Bidirectional P

30 Dec 29, 2022
Hexa is an advanced browser.It can carry out all the functions present in a browser.

Hexa is an advanced browser.It can carry out all the functions present in a browser.It is coded in the language Python using the modules PyQt5 and sys mainly.It is gonna get developed more in the fut

1 Dec 10, 2021
RISE allows you to instantly turn your Jupyter Notebooks into a slideshow

RISE RISE allows you to instantly turn your Jupyter Notebooks into a slideshow. No out-of-band conversion is needed, switch from jupyter notebook to a

Damian Avila 3.4k Jan 04, 2023
🌌 Economics Observatory Visualisation Repository

Economics Observatory Visualisation Repository Website | Visualisations | Data | Here you will find all the data visualisations and infographics attac

Economics Observatory 3 Dec 14, 2022
How to build an Fahrenheit to Celsius Converter in Python

Generally to measure the temperature we make use of one of these two popular units i.e. Fahrenheit & Celsius.

PyLaboratory 0 Feb 07, 2022
A modern message based async agent framework

Munggoggo A modern message based async agent framework An asyncio based agent platform written in Python and based on RabbitMQ. Agents are isolated pr

24 Dec 28, 2022
Python bindings for the Plex API.

Python-PlexAPI Overview Unofficial Python bindings for the Plex API. Our goal is to match all capabilities of the official Plex Web Client. A few of t

Michael Shepanski 931 Jan 07, 2023
The worst and slowest programming language you have ever seen

VenumLang this is a complete joke EXAMPLE: fizzbuzz in venumlang x = 0

Venum 7 Mar 12, 2022