Saravanan666/pypi-org huggingface dataset:
Package: aoc-kit
Advent Of Code kitAdvent of what?Advent of code is a coding competition during december.https://adventofcode.com/about.PurposeWith this library it should be easy to get started.Getting startedCreate a folder for you aoc adventures:mkdir aoc
cd aocInstall theaoc-kitPipenv:pipenv init
pipenv install aoc-kitPoetry:poetry init
poetry add aoc-kitSystem widepip install --user aoc-kitCreate a.envfileWithin your freshly created aoc folder you have to create a.envfile with a
contents like this. You can find the token in your browser. When you are logged
in you can open the dev tools and find it in the cookies. It is the session
cookie. Just replace the xxxxxx with your actual token..envAOC_TOKEN=xxxxxxBasic usageUsing the template to get started on a puzzle for a daySimply runpoetry run aoc-new-day --year 2022 --day 1
# or
pipenv run aoc-new-day --year 2022 --day 1
# or if you have it installed systemwide
aoc-new-day --year 2022 --day 1This will create a file structure like thisaoc/
  2022/
    01/
      main.pyYou can implement you solution inmain.pyand run it with:pipenv run python 2022/01/main.py
# or
poetry run python 2022/01/main.py
# or
python 2022/01/main.pyget_inputfunctionTheget_inputwill return the downloaded (on first call) puzzle input or
return a locally saved puzzle input (on all later calls) of the given day and
year.from aockit import get_input

def process(data):
    return 'implement me'

data = get_input(2015, 1)
result = process(data)
print(result)
Package: aoc-lib
AOCTools to support in solving the advent of code puzzles (seehttps://adventofcode.com/)Several Point related functions (including rotation, manhattan distance), iterating the adjacent points or fetching data in a smart wayDeploy to PyPiPre-Reqset the new version insetup.py– note that files which already exist in PyPi are not uploaded (note the error message)Install setuptools, wheel and the twine package by runningvenv/bin/python -m pip install --upgrade setuptools wheel twinein jetbrains consoleDeployClean the dist folder if you only want the latest version uploadedBuild the dist into /dist folder by runningpython -m buildUpload to PyPi by runningpython -m twine upload dist/*with username__token__and the password (see keepass)
Package: aoc-lube
aoc_lube - ProperAdvent of Codelubricant.Setting up aoc_lubepip install aoc-lubefor justfetchandsubmitfunctions orpip install aoc-lube[utils]for optional dependencies (networkx, numpy) for utility functions.Save your user token to~/.aoc_lube/.token.[Optional] Create a new directory for your solutions. In this directory, run the functionaoc_lube.setup_dir()or from the command line,python -m aoc_lube [YYYY]. (If no year is given, the current year will be used.)Getting your user tokenNavigate tohttps://adventofcode.com/. Make sure you are logged in.Right-click the page and clickInspect.Click on theNetworktab.Reload the page.The token will be the session cookie in the request header to the page. It's a long hex string.
Package: aocp
Advent of Code ParsersA collection of convenient Python parsers for Advent of Code problems.InstallationpipinstallaocpQuickstartYou can import parsers from the base module. There are two main types of parsers:Iterable parsers, which return a sequence of elements from parsing astr, such aslist,tupleordictTransform parsers, which return a single object from parsing astr, such as anint,boolor anotherstrIterable parsers can be composed with other parsers nested within, including Transform parsers and other Iterable parsers. They can also be nested with some base types such asint.Transform parsers cannot have nested parsers, but they can be composed with other parsers in a sequence usingChainParser.This way, the structure of the output data mirrors that of the expression used to instantiate the parser transform.Here is a basic usage example:raw_data="46,79,77,45,57,34,44,13,32,88,86,82,91,97"parser=ListParser(IntParser)parser.parse(raw_data)Which results in:[46, 79, 77, 45, 57, 34, 44, 13, 32, 88, 86, 82, 91, 97]And here is a more advanced example, fromAoC 2021 day 4:raw_data="""7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,122 13 17 11  08  2 23  4 2421  9 14 16  76 10  3 18  51 12 20 15 193 15  0  2 229 18 13 17  519  8  7 25 2320 11 10 24  414 21 16 12  614 21 17 24  410 16 15  9 1918  8 23 26 2022 11 13  6  52  0 12  3  7"""parser=TupleParser((IntListParser(),ListParser(ListParser(IntListParser())),))parser.parse(raw_data)Which results in:(
    [7, 4, 9, 5, 11, 17, 23, 2, 0, 14, 21, 24, 10, 16, 13, 6, 15, 25, 12, 22, 18, 20, 8, 19, 3, 26, 1], 
    [[[22, 13, 17, 11, 0],
     [8, 2, 23, 4, 24],
     [21, 9, 14, 16, 7],
     [6, 10, 3, 18, 5],
     [1, 12, 20, 15, 19]],
    [[3, 15, 0, 2, 22],
     [9, 18, 13, 17, 5],
     [19, 8, 7, 25, 23],
     [20, 11, 10, 24, 4],
     [14, 21, 16, 12, 6]],
    [[14, 21, 17, 24, 4],
     [10, 16, 15, 9, 19],
     [18, 8, 23, 26, 20],
     [22, 11, 13, 6, 5],
     [2, 0, 12, 3, 7]]]
)By default, the splitting elements in an iterable are guessed from the string provided. However, you can provide them through thesplitterargument. This can be a strings or a sequence of strings, which will all act as splitters.A notebook with more examples from Aoc 2021 is availablehere.To be doneFull testing coverageDocumentation page (full docstrings are available, though)More examples from other previous yearsRegex ParserDefaults in tuple parser in case of missing components in origin stringSource codehttps://github.com/miguel-bm/advent-of-code-parsers
Package: aocpy
aocpy - Advent of Code Automation ToolFetch input, submit answers and generate boilerplate files for solving Advent of Code puzzles :christmas_tree:InstallationInstall via pip:pip install aocpyUsageN.BPlease see theSession Cookie ConfigurationsectionBegin a Puzzlebeginfetches the puzzle input and generates boilerplate files with the following structure:<day_number>/
  solution.py
  input.txt# fetch input and generate boilerplate for today's challenge$aocpybegin# fetch input and generate boilerplate for a specific puzzle$aocpybegin-y2017-d15$aocpybegin-d15# uses current puzzle yearSubmit Puzzle Answers# submit answer for level 1 of today's puzzle$aocpysubmit"myanswer"1# submit answer for level 2 of today's puzzle$aocpysubmit"myanswer2"2# submit answer for level 1 of a specific puzzle$aocpysubmit"myanswer"1-y2017-d15# submit answer for level 2 of a specific puzzle$aocpysubmit"myanswer2"2-y2017-d15Running SolutionsThe solution template files include a small CLI to read input files.$cd<puzzle_day_dir># Default - run with aocpy generated input.txt file$pythonsolution.py# Run with example_input.txt if present$pythonsolution.py-e# Run with specified input file$pythonsolution.py/path/to/my/file.txtSession Cookie ConfigurationAoC puzzle inputs differ by user, requiring a browser cookie to determine the current user.aocpyrequires this cookie and can be supplied in several ways:CLI-c/--session-cookieoption (supported by all commands):$ aocpy begin -c <1234mycookie>Configuration file:Paste the cookie into a file at~/.config/aocpy/token# ~/.config/aocpy/token
<1234mycookie>Environment variable:$ export AOC_SESSION_COOKIE=<1234mycookie>Finding Your Session CookieOpen Advent of Code in a web browser and log inOpen the browser's developer consolei.e. Right click -> Inspect orF12Select theNetworktabNavigate to any puzzle input page i.e. adventofcode.com/2018/day/1/inputClick on the request that shows up in theNetworktabThe cookie will be in theRequest Headerssection with the formatCookie: session=<1234mycookie>
Package: aoc-solution-cli
aoc solution clitool for managing aoc solutions written in python.Commandsaocgen: Generates a python file for provided day and year (command line options), containing a function for each puzzle part.aocrun: Runs a function in a file generated byaocgen, the function and file being determined by command line arguments--day,--yearand--part(a or b). Requires you to be authenticated withadvent-of-code-data. If flag--submitis provided, it will automatically submit the output to AoC.When using both commands, day and year will be cached.
Package: aoc-starter
Advent of Code Frameworkhttps://adventofcode.com/A framework for implementing Advent of Code solutions in Python.Quick StartPip install the project so you have access to theaoccommand.pipinstallaoc-starterCreate an empty directory you want to write your solutions in.aocinitNow, you are ready to start implementing your solutions!aoccreate01--year2021This will create python file,2021/day01.py, where you'll implement the solution.After you've implemented the solution, you can run it with:aocrun01--year2021-iinput.txtSolution ImplementationThe file2021/day01.pywill have a concrete class,Solution01that extends the baseSolutionclass fromaoc-starter.There are a variety of methods that must/can be defined to best implement your solution.Part FunctionsThese are the only abstract methods in the base class and therefore must be implemented.def_part_one(self)->int:...def_part_two(self)->int:...These functions should return the integer answer to Advent of Code problems. The input data can be accessed using the data property,self.data.Parsing dataThere are three functions you can use to parse the data:def_get_data(self)->list[Any]:...def_get_data_for_part_one(self)->list[Any]:...def_get_data_for_part_two(self)->list[Any]:...The_get_datafunction is the default, so if you don't implement one of the others then_get_datais used. If there are differences in how the data should be parsed between each part you can use the more specific functions.Inside these functions, you need to return the data as a list, down the line this return value is stored inself.data.The input handlerThe solution base class has a propertyinput, that is of typeaoc.InputHandler. This object is the intermediary between the raw data and the solution. When parsing data, you can use theself.input.as_listfunction to interact with the raw content.# default, return the content as a list of stringsdef_get_data(self)->list[str]:returnself.input.as_list()# parse as a certain typedef_get_data(self)->list[int]:returnself.input.as_list(int)# use a custom parserdef_get_data(self)->list[tuple[str,int]]:defparser(content:str,**kwargs)->tuple[str,int]:key,val=content.split(": ")returnkey,int(val)returnself.input.as_list(parser)Reformatting input fileYou can use the_reformat_datafunction to change how the input data looks.Pop LinesSometimes the input file has a line at the beginning that is different from the actual data. TheInputHandlerhas a methodpop_linethat removes and returns the first line in raw content. If you want to use this before any reformats happen, you can override the_pop_linesmethod in the solution.classDay01(Solution):first_line:strdef_pop_lines(self)->None:self.first_line=self.input.pop_line()
Package: aoc-to-markdown
ParsesAdvent Of Codeproblem statement to markdown with option to also download the input while keeping everything organised.FeaturesParses the problem statement to Markdown.Easily organize your solutions with the input and a markdown description.Boilerplate can be copied next to the input and the problem statement.You can execute this script for the same day as many times as you want and feel confident that the boilerplate will not change what you have done so far.OrganisationEach day goes inside a folder with the syntaxday-<day>as you can check below.|____day-01
| |____README.md
| |____input.txt
|____day-02
| |____README.md
| |____input.txt
...
|____day-15
| |____README.md
| |____input.txt
|____day-16
| |____README.md
| |____input.txt
...
|____day-24
| |____README.md
| |____input.txt
|____day-25
| |____README.md
| |____input.txtThis was generated by executingaoc-to-markdown-i-s25 times. Additional arguments could have been provided to copy a directory/file inside the folder (useful to set up everything for you to solve). You can also specify the output directory (where the folders will be created), but, in this example, this was also not given.InstallationIf you want to install directly from this repository, then install the dependencies and you are good to go:pipinstall-rrequirements.txtpythonaoc_to_markdown.py-hIf you want even simpler, then download fromPyPiand you are good to go:pipinstallaoc-to-markdownaoc_to_markdown-hArgumentsUsage: aoc-to-markdown [-h] [-y <year>] [-d <day>] [-o <output_dir>] [-b <boilerplate_dir>] [-s] [-i]
 -h, --help          Optional parameter to print this message
 -y, --year          Optional parameter to indicate the year of the problem
 -d, --day           Optional parameter to indicate the day of the problem
 -o, --output        Optional parameter to indicate the path of the output (default = ".")
 -b, --boilerplate   Optional parameter to copy a directory/file to the output
 -s, --save          Optional argument to indicate that the markdown should not be printed to stdout, but to a file
 -i, --input         Optional argument to indicate that the input is to be downloaded and saved to a file

SESSION_ID environment flag is required to download part 2 of the problem. This session id can be copied from the requests made on the Advent Of Code website after you login.

Extended description:
--year, if not given, defaults to the current year if in december; otherwise is the current year
--day, if not given, defaults to the first day which has not been retrieved (checks for directories named "day-<day>"); if all days have been retrieved, then go drink some hot chocolate and enjoy the rest of the day
--output is the prefix path where the folder (syntax: "day-<day>") will be created
--boilerplate is an argument useful to copy the solution boilerplate to help you get started
--save is only necessary if you want to save directly to a file and --output is not given

Example:
aoc-to-markdown -y 2018 -d 1 -o my-solution-directory -b my-boilerplate -iSimilarThere isanother project in JavaScriptthat also parses the problem statement to Markdown.
Package: aocutil
AoC UtilsThis small library can be used for the yearly Advent of Code
(https://adventofcode.com) challenge. It automates the retrieval of puzzle input
and submission.Installationaocutilispublished on PyPiand can be
installed from there.UsagefromaocutilimportAoc# Initialize for year 2022, day 1 with session id 53616c746## Everything here is optional. If left out year and day is determined# from the current date -- be aware that your code is non-repeatable if year# and date is not specified.# Session id is read from `${HOME}/.config/aocutil/session_id` if not specified.aoc=Aoc(year=2022,day=1,session_id="53616c746")# Retrieve input and split into list of lines## You can also retrieve the content as a string with `aoc.input().read()`.puzzle=aoc.input().lines()# solve the puzzle (your implementation)solution=solve(puzzle)# Submit the solution for level 1## If left out, the level is determined automatically by# which level is not solved yet.aoc.submit(solution,level=1)Retrieving the Session IDA user in Advent of Code submissions and input retrieval is determined by a
session id stored in a cookie in the user's browser. For this library to work it
needs a users session id. The session id can be found by opening your browsers
developer tools and looking for a cookie namedsession.You can either initializeAocwith the token or store it in a file named${HOME}/.config/aocutil/session_id. I would recommend the latter so you don't
accidentially publish your session id. Note that everyone who gets hold of your
session id can impersonate you.
Package: aocutils
Theaoc-utilsproject provides a Python package namedaocutilswith
useful modules/classes/methods forPythonOCC. It is a high level API for PythonOCC.PythonOCC is a set of Python wrappers for the OpenCascade Community Edition (an industrial strength 3D CAD modeling kernel)installpipinstallaocutilsDependenciesaocutilsdepends on OCC >=0.16 and scipy. The examples require wx>=2.8 (or another backend (minor code modifications required)).
These requirements cannot be satisfied through pip.
Please see the table below for instructions on how to satisfy the requirements.packageversionCommentOCC>=0.16.See pythonocc.org or github.com.tpaviot/pythonocc-core for instructionsorconda install -c https://conda.anaconda.org/dlr-sc pythonocc-corescipylatestSimplest solution isconda install scipyor a full Anaconda distributionwx>=2.8See wxpython.org for instructionsGoalThe goal of theaocutilspackage is to simplify some frequently used operations made in PythonOCC.Versionsaocutils version and target PythonOCC versionaocutils versionPythonOCC version0.1.*0.16.2ExamplesThe examples are in theexamplesfolder at the Github repository (https://github.com/floatingpointstack/aoc-utils).The wx backend (wxPython) backend is used for the examples that display a UI.
You may easily change this behaviour to use pyqt4 or PySide by changing the backend in the call to init_display().
Package: aocxchange
Theaoc-xchangeproject provides a Python package namedaocxchangeto read and write
from/to IGES, STEP, BREP, and STL files usingPythonOCC.aocxchangecan also read 2D foil section definition files (.dat files)PythonOCC is a set of Python wrappers for the OpenCascade Community Edition (an industrial strength 3D CAD modeling kernel)Warningaocxchangecan import IGES, STEP, BREP, and STL files. Beware that the import of a similar looking geometry from different file
types might (and very likely will) lead to a different topology.For example, the import of 2 distinct solids (closed boxes) will lead to:undistinguishable faces from an IGES file2 separate solids from a STEP file2 separate closed shells from a STL fileIf working with solids, prefer STEP; you might get away with STL but it will involve extra effortIf working with surfaces, any file type will do. However, remember that STEP and IGES geometry is mathematically defined
while STL basically stores a bunch of triangles approximating the geometry (which is absolutely fine and even
desirable in some cases).installpipinstallaocxchangeDependenciesaocxchangedepends on OCC >=0.16 and aocutils. The examples require wx>=2.8 (or another backend (minor code modifications required)).
Please see the table below for instructions on how to satisfy the requirements.packageversionCommentOCC>=0.16.See pythonocc.org or github.com.tpaviot/pythonocc-core for instructionsorconda install -c https://conda.anaconda.org/dlr-sc pythonocc-coreaocutilslatestpip install aocutils –upgradewx>=2.8See wxpython.org for instructionsGoalThe goal of theaocxchangepackage is to simplify the read/write of CAD files using PythonOCC.Versionsoccdataexchange version and target PythonOCC versionaocxchange versionPythonOCC version0.1.*0.16.2ExamplesThe examples are in theexamplesfolder at the Github repository (https://github.com/floatingpointstack/aoc-xchange).The wx backend (wxPython) backend is used for the examples that display a UI.
You may easily change this behaviour to use pyqt4 or PySide by changing the backend in the call to init_display().
Package: aodag.scaffold
aodag.scaffoldusageinstall scaffold``scaffold`` ``install`` scafold-archive-file scaffold-namelist installed scaffolds:``scaffold`` ``list``create project with scaffold:``scaffold`` ``create`` scaffold-name [-d dest-directory]Changes0.2.1fix py3k inputfix windows input0.2install from url0.1use environment variables as default0.1bfix on windows(thx tokibito)py3k support0.1afirst release
Package: aodh
Aodh is the alarming service for OpenStack.DocumentationDocumentation for the project can be found at:https://docs.openstack.org/aodh/latest/Release notes can be read online at:https://docs.openstack.org/aodh/latest/contributor/releasenotes/index.htmlCode RepositoryServer:https://opendev.org/openstack/aodh/Bug TrackingBugs and feature requests are tracked on Launchpad at:https://bugs.launchpad.net/aodh/IRCIRC Channel: #openstack-telemetry onOFTC.
Package: aodhclient
Python bindings to the OpenStack Aodh APIThis is a client for OpenStack Aodh API. There’s aPython API(the
aodhclient module), and acommand-line script(installed
as aodh). Each implements the entire OpenStack Aodh API.Free software: Apache licenseRelease notes:https://releases.openstack.org/teams/telemetry.htmlDocumentation:https://docs.openstack.org/python-aodhclient/latest/Source:https://opendev.org/openstack/python-aodhclientBugs:https://storyboard.openstack.org/#!/project/openstack/python-aodhclient
Package: aoe
Python Package Template📦 一个快速上传到PyPI的 Python Package 模版。上传到 PyPI 后可以使用pip install安装。1 使用方法点击本项目右上角的绿色按钮Use this template（使用此模板），输入名称和说明，完成创建；将项目克隆到本地，这里以本项目为例，实际操作时这里需要替换你自己的项目；gitclonehttps://github.com/Ailln/python-package-template.git--depth1修改配置，文件中有提示；cdyour_package_name# 1. 替换默认项目名称 package_name 为你的项目名称# Usage: bash scripts/set_package_name.sh os_name old_name new_name# os_name 支持的有 `mac` 和 `linux`# old_name 是 package_name# new_name 是你的项目名称bashscripts/set_package_name.shmacpackage_nameyour_package_name# 2. 将 `README.md` 修改为你的项目介绍，也就是你当前在读的这个文本。编写你的 Package 代码，并进行测试。# 在本地进行充分测试bashscripts/local_test.sh上传到 PyPi（需要注册），参考如何发布自己的包到 pypi；bashscripts/upload_pypi.sh更新到 Github。gitpush2 项目结构.
├── package_name # 项目名称
│    ├── shell # 在命令行中执行的代码
│    │    ├── __init__.py
│    │    └── usage.py
│    └── src # 静态资源
│          └── temp.txt
├── scripts
│    ├── set_package_name.sh # 批量替换默认的项目名称
│    ├── local_install.sh
│    ├── local_test.sh
│    └── upload_pypi.sh
├── README.md # 项目文档
├── requirements.txt # 包依赖
├── .gitignore # 忽略文件
├── MANIFEST.in # 要包含在 sdist 命令构建的分发中的文件列表。
├── LICENSE # 这里面的内容为本项目的 License，你需要手动替换它。
└── setup.py # 安装配置3 TODO增加 test 相关代码。4 许可5 参考Packaging Python Projects如何从模板创建仓库？如何发布自己的包到 pypi ？
Package: aoe2de-rms-gen-obj-parser
Parser to extract, from AoE2 DE GeneratingObjects.inc file, the code that would be produced when ran with the constants contained in the RandomMapScript filesInstallationpipinstallaoe2de_rms_gen_obj_parserBasic usagefromaoe2de_rms_gen_obj_parserimportGeneratingObjectsParser# We instantiate the GeneratingObjectsParserparser=GeneratingObjectsParser("Path/to/GeneratingObjects.inc","Path/to/SomeRandomMapScript.rms")# We must run the parsers each time an attribute is set, in order to update themparser.run_parsers()# We can now get the result for the parsing (done on the fly, that's why we must use run_parsers() firstparsed_content=parser.get_result()Advanced UsageThe class GeneratingObjectsParser can be instantiate with up to 5 arguments.Two are <<mandatory>>(they won’t have default values):path_gen_obj, the path of the GeneratingObjects.inc filepath_rms_file, the path of the .rms file(like Arabia.rms, Arena.rms …)The three others are <<optional>>(they have default values)but must respect defined values:map_size,must be a key ofaoe2de_rms_gen_obj_parser.const.MAP_SIZE_DICTmap_resources,must be a key ofaoe2de_rms_gen_obj_parser.const.MAP_RESOURCES_DICTgame_type,must be a key ofaoe2de_rms_gen_obj_parser.const.GAME_TYPE_DICTBy default, these are set toTINY_MAP,OTHER_RESOURCESandOTHER_GAMEBecause the attributes can be changed at will(setters exposed), the files must be parsed first withrun_parsers()before asking for a result withget_result()fromaoe2de_rms_gen_obj_parserimportGeneratingObjectsParser# We instantiate the GeneratingObjectsParserparser=GeneratingObjectsParser()...<somecode>parser.set_path_gen_obj("Path/to/GeneratingObjects.inc")parser.set_path_rms_file("Path/to/SomeRandomMapScript.rms")...<somecode>parser.set_map_size("LARGE_MAP")parser.run_parsers()parsed_content=parser.get_result()Information aboutGeneratingObjects.incContains the code for the map objects generation, from buildings, to resources, with units and some terrains,
such as Town Centers, Villagers, Scouts, Stones, Golds, Huntables, Lurables …The previous code is encapsulated in variousif, elseif, elsestatements.
Omittingelse, they will have their corresponding constraint on a constant defined elsewhere(the .rms files)Information aboutRandomMapScript.rmsDefine base Land and TerrainDefine seasons if needed/wantedDefine the constants used by the GeneratingObjects.inc file