Saravanan666/pypi-org huggingface dataset:
Package: pycodesim
A Python Code Similarity Detection Doll， just for fun.
用于计算python代码相似度的玩具。背景基于抽象语法树，有三种方法，第一种是最简单的jaccard相似度，第二种是树的编辑距离，第三种是遍历合适大小的子树计算anti-unification(不完全是)democode_sim('codes/code1.py', 'codes/code2.py', 'jaccard')
code_sim('codes/code1.py', 'codes/code2.py', 'tree_edit')
code_sim('codes/code1.py', 'codes/code2.py', 'fake_anti_uni')
Package: pycodestyle
pycodestyle is a tool to check your Python code against some of the style
conventions inPEP 8.NoteThis package used to be calledpep8but was renamed topycodestyleto reduce confusion. Further discussion can be foundin the issue where
Guido requested this
change, or in the
lightning talk at PyCon 2016 by @IanLee1521:slidesvideo.FeaturesPlugin architecture: Adding new checks is easy.Parseable output: Jump to error location in your editor.Small: Just one Python file, requires only stdlib. You can use just
thepycodestyle.pyfile for this purpose.Comes with a comprehensive test suite.InstallationYou can install, upgrade, and uninstallpycodestyle.pywith these commands:$ pip install pycodestyle
$ pip install --upgrade pycodestyle
$ pip uninstall pycodestyleThere’s also a package for Debian/Ubuntu, but it’s not always the
latest version.Example usage and output$ pycodestyle --first optparse.py
optparse.py:69:11: E401 multiple imports on one line
optparse.py:77:1: E302 expected 2 blank lines, found 1
optparse.py:88:5: E301 expected 1 blank line, found 0
optparse.py:347:31: E211 whitespace before '('
optparse.py:357:17: E201 whitespace after '{'
optparse.py:472:29: E221 multiple spaces before operatorYou can also makepycodestyle.pyshow the source code for each error, and
even the relevant text from PEP 8:$ pycodestyle --show-source --show-pep8 testing/data/E40.py
testing/data/E40.py:2:10: E401 multiple imports on one line
import os, sys
         ^
    Imports should usually be on separate lines.

    Okay: import os\nimport sys
    E401: import sys, osOr you can display how often each error was found:$ pycodestyle --statistics -qq Python-2.5/Lib
232     E201 whitespace after '['
599     E202 whitespace before ')'
631     E203 whitespace before ','
842     E211 whitespace before '('
2531    E221 multiple spaces before operator
4473    E301 expected 1 blank line, found 0
4006    E302 expected 2 blank lines, found 1
165     E303 too many blank lines (4)
325     E401 multiple imports on one line
3615    E501 line too long (82 characters)LinksRead the documentationFork me on GitHub
Package: pycodon
pycodonПроект группы студентов КФУ лаборатории Хемоинформатика и молекулярное моделирование.Проект дает возможность проводить операции с последовательностями ДНК и РНК in pythonic way.УстановкаДля установки запустите следующую командуpipinstallpycodonОписание проектаПока разработано два класса:SequenceиMetasequence.Metasequence- класс, экземпляр которого содержит в себе все последовательности нуклеотидов с учетом их неоднозначности, причем в графовом виде. Экземпляр Metasequence подходит как для ДНК, так и для РНК.Методы MetasequenceСоздание всех возможных последовательностей посредством обработки неоднозначных нуклеотидов:metaseq.make_sequences()Поиск позиций неоднозначных нуклетидовmetaseq.ambiguous_nucleotides()Расчет длины последовательности:metaseq.count_nucleotides()Sequence- класс, экземпляр которого является строко-подобным, содержит в себе строго одну последовательность нуклеотидов, исключая неоднозначности, что позволяет расширить функционал строк с учетом необходимости проведения различных модернизаций: транскрипций, трансляций, расчета рамок считывания и т.д.Методы SequenceТранскрипция последовательности, как из ДНК в РНК, так и наоброт:seq.transcription()Расчет количества каждого нуклеотида в последовательности:seq.nucleotide_counterПоиск рамки считывания ДНК последовательности:seq.make_frames()Трансляция последовательности в белок:seq.proteinДлина белковой последовательности:seq.aminoacids()Для чтения файлов используйте функциюfrompycodonimportread_fileread_file('path/to/file')
Package: pycoercer
Fast Python JSON schema validation and normalizationv=Validator({'User':{'items':{'name':{'coerce':'str'},'gender':{'map':{'woman':'female','man':'male',None:'other'# Map everything else},'synonyms':['sex']},'country':{'default':'{GEOIP2_COUNTRY}'}}}})args={'GEOIP2_COUNTRY':'UK'}v['User']({'name':123,'sex':'woman'},args)# Returns:## ({#    'name': '123',#    'gender': 'female',#    'country': 'UK'#  },#  None)  # Error descriptionFeaturesPycoercer was created to meet the actual production needs for web apps
development - inspired byjsonschemaandCerberus,
it also implements additional features:
- Can validate, normalize (or coerce) dicts and lists
- Fast - the schema is compiled into python code
- Cleanrules systemwith a predictable order of execution
- Parametricdefaultandif_nullvalues
- Keywords for data coercion:synonyms,map, andpost_coerce- Checkexamplesagainst the schema definitionInstallation$pipinstallpycoercerDocumentationComplete documentation will be [sometime][docs]Testing$pytest
Package: pycof
PYCOF (PYthon COmmon Functions)1. InstallationYou can get pycof fromPyPIwith:pipinstallpycofThe library is supported on Windows, Linux and MacOs.2. Usage2.1. DocumentationYou can find the full documentation athttps://www.florianfelice.com/pycofor by clicking on the name of each function in the next section.
It will redirect you the the function's specific documentation.2.1. Available functionsThe current version of the library provides:remote_execute_sql: aggragated function for SQL queries toSELECT,INSERT,DELETEorCOPY.read: Load any data file, regarless of the format.send_email: simple function to send email to contacts in a concise way.verbose_display: extended function toprintstrings, lists, data frames and progression bar if used as a wrapper inforloops.add_zero: simple function to convertinttostrby adding a 0 is less than 10.group: will convert anintto astrwith thousand seperator.replace_zero: will transform 0 values to-for display purposes.week_sunday: will return week number of last sunday date of a given date.display_name: displays the current user name. Will display eitherfirst,lastorfullname.write: writes astrto a specific file (usually .txt) in one line of code.file_age: computes the age (in days, hours, ...) of a given local file.str2bool: converts string to boolean.Andmany others!2.2. Config file for credentialsThe functionremote_execute_sqlandsend_emailwill by default look for the credentials located at/etc/.pycof/config.json.
On Windows, save the config file asC:/Windows/.pycof/config.json.The file follows the below structure:{"DB_USER":"","DB_PASSWORD":"","DB_HOST":"","DB_PORT":"3306","DB_DATABASE":"","__COMMENT_1__":"Email specific, send_email""EMAIL_USER":"","EMAIL_PASSWORD":"","EMAIL_SMTP":"smtp.gmail.com","EMAIL_PORT":"587""__COMMENT_2__":"IAM specific, if useIAM=True in remote_execute_sql","CLUSTER_NAME":"","AWS_ACCESS_KEY_ID":"","AWS_SECRET_ACCESS_KEY":"","REGION":"eu-west-1"}On Unix based system, run:sudonano/etc/.pycof/config.jsonand paste the above json after filling the empty strings (pre-filled values are standard default values).Reminder:To save the file, with nano pressCTRL + O, confirm withythenCTRL + Xto exit.On Windows, use the pathC:/Windows/.pycof/config.json.
Package: pycofecms
================================Church of England CMS API Client================================.. image:: https://img.shields.io/pypi/v/pycofecms.svg:target: https://pypi.python.org/pypi/pycofecms.. image:: https://readthedocs.org/projects/pycofecms/badge/?version=latest:target: https://pycofecms.readthedocs.io/en/latest/?badge=latest:alt: Documentation StatusBefore you start, make sure you have access credentials for the Church of England CMS API. You willneed a valid `API_ID` and `API_KEY`. See https://cmsapi.cofeportal.org/security for moreinformation about this.Most of the endpoints also require a `diocese_id`. You should be supplied with this when youreceive your access credentials.* Free software: BSD license* Documentation: https://pycofecms.readthedocs.ioFeatures========* Python client for the CofE CMS API (https://cmsapi.cofeportal.org/)* Python 3.5* 100% test coverageQuick Start===========.. code-block:: python>>> from cofecms import CofeCMS>>> cofe = CofeCMS(API_ID, API_KEY, diocese_id)>>> result = cofe.get_contacts(limit=10,fields={'contact': ['surname']},search_params={'keyword': 'smith', 'keyword_names_only': 'on'},)>>> # This query has 82 total results.>>> print(result.total_count)82>>> # Spread across 9 pages>>> print(result.total_pages)9>>> # Get the data for the first page for the query>>> print(result)[{'surname': 'Aynsley-Smith'},{'surname': 'Bradford-Smith'},{'surname': 'Brothertonsmith'},{'surname': 'Busen-Smith'},{'surname': 'Cox-Smith'},{'surname': 'Drummond Smith'},{'surname': 'Goldsmith'},{'surname': 'Grout-Smith'},{'surname': 'Hall-Smith'},{'surname': 'Harcourt-Smith'}]>>> # Get a specific page for the query>>> print(result.get_data_for_page(4))[{'surname': 'Smith-Agent'},{'surname': 'Smith-Cherry'},{'surname': 'Smith-McSmithSmith'},{'surname': 'Smith'},{'surname': 'Smith'},{'surname': 'Smith'},{'surname': 'Smith'},{'surname': 'Smith'},{'surname': 'Smith'},{'surname': 'Smith'}]>>> # Loop through all available pages>>> for page in result.pages_generator():print(len(page))1010101010101090>>> # Or retrieve all records for the query>>> print(result.all())[{'surname': 'Aynsley-Smith'},{'surname': 'Bradford-Smith'},{'surname': 'Brothertonsmith'},{'surname': 'Busen-Smith'},{'surname': 'Cox-Smith'},{'surname': 'Drummond Smith'},{'surname': 'Goldsmith'},...{'surname': 'Smith'},{'surname': 'Smith'},{'surname': 'Smith'},{'surname': 'Smitherman'},{'surname': 'Smithers'},{'surname': 'Sutton-Smith'},{'surname': 'Thistleton-Smith'}]=======History=======0.1.0 (2017-03-20)------------------* First release on PyPI.
Package: pycoffee
☕ pycoffeeAssign your work to the machine and enjoy coffee!Table of contentsdescriptionGetting startedExtend your playbooksAuthorContributingdescriptionpycoffeeis a toolbox for improving the efficiency in daily work.
Our goal is saving your time and offer you more time to enjoy coffee!We provide some features you may like:Data extracting, processing and visualizingExtract data from log file, seeCoffee.Data.DataLoaderStore data to timeseries database, seeCoffee.Data.DatabaseGenerate Grafana dashboard by code, seeCoffee.Data.DataVizAll workflows are provided with the playbooks, see the default playbookCoffee.Playbook.PowerToysPlugin based architecture, you can extend the coffee by writing your playbooksGetting startedyou can install the stable version pycoffee by pip:# use pip to install the latest versionpipinstallpycoffeeor you can download the code and runpython ./setup.py installin the project root.Just run--helpto see what features pycoffee provided.# use `--help` to see toolscof--help# show external playbookscofplay--helpExtend your playbooksCustom playbooks are located in~/.coffee/CustomPlays/.
You should create a new directory to hold the playbook's source code and the directory name is the playbook's package name.
An example can be found inCoffee.Playbook.PowerToys.For Example, code in~/.coffee/CustomPlays/HelloWorld/__init__.py:importclick@click.command("hello",help="print hello world")defplay_hello():click.echo('hello world')# commands should be placed in the package's `__init__.py` filecommands=[play_hello,]Then typecof play helloin your console, and you will see the printedhello world.Authortkoraystkorays@hotmail.comContributingWelcome to contribute code!
Package: pycogent
PyCOGENTThis Python package is for post-processing results from plasma simulation codeCOGENT.InstallationRun the following command to install:pipinstallpycogentUsageimportpycogentaspc# import data from COGENT 4D-output file with adress# "folder/fileName.4d.hdf5", and save it to variable datadata=pc.importData4D("folder/fileName.4d.hdf5")Help with developingTools required to develop pycogent and run tests can be installed with command:pipinstallpycogent[dev]
Package: pycograph
PycographHomepage:https://pycograph.com/PyPI:https://pypi.org/project/pycograph/RedisConf 2021talkExplore your Python code with graph queriesPycograph creates aRedisGraphmodel of your Python code. You can:query it withCyphervisualize it withRedisInsightGetting StartedRequirements:Python 3.8 or highera Redis instance with the RedisGraph module (local, remote or via Docker)not strictly necessary, but recommended: RedisInsight for visualizing the query resultsInstall Pycograph from PyPI:pip install pycographStart a Redis instance with the RedisGraph module and RedisInsight. E.g. via Docker containers:docker run -d -p 6379:6379 redislabs/redismod
docker run -d -v redisinsight:/db -p 8001:8001 redislabs/redisinsight:latestVisit your RedisInstance athttp://localhost:8001in a browser.Connect to your local Redis database.Create a RedisGraph model of your project's code with thepycograph loadcommand:pycograph load --project-dir ~/code/your-project --test-typesBy default, if you don't provide the--project-diroption, Pycograph tries to find Python code in the current working directory.Run a query in RedisInsight. E.g.GRAPH.QUERY "your-project" "MATCH (n) return n"To see some more advanced queries, check out theexamplesat pycograph.comOptions--project-dir: The root directory of the Python project you want to analyze. If you omit this option, Pycograph will search for.pyfiles in your current working directory.--graph-name: Specifies the name of the generated graph. Default: the name of the project directory.--overwrite: If a graph with this name exists overwrite it. If you don't provide this flag, the new nodes and edges will be appended to the graph.--test-types: Determine the types of tests based on the subdirectories of thetestsdirectory.--redis-host: The host of the Redis instance. Default: localhost--redis-port: The port of the Redis instance. Default: 6379--version: Print Pycograph version and exit.LimitationsPycograph is in beta version.It creates a basic model with focus on the relationships betweeen the different parts of the code base. Even that model might be incomplete, ignoring some less common syntax. The goal is to provide some useful insight, not to create an exhaustive model.If Pycograph finds a syntax error, it skips the module containing the syntax error and tries to build a model from the rest of the code base.Below are some of the limitations. If you bump into other limitations, please open a GitHub issue.ImportsThe following imports will be ignored by Pycograph:imported external packagesimport *syntaxvariablesglobalsCallsAll the limitations of the imports.Other Known LimitationsNo support for.pyfiles containing Jinja templates (e.g. cookiecutter)Inner functions are ignored.How Does It Work?Libraries used:astmodule of the Python standard library for the abstract syntax treePydanticboth for the models of the intermediate objects and for the settingsredisgraph-pyfor creating the RedisGraph modeltyperfor the command line interfaceContributingsee theContributing guide
Package: pycogworks.crypto
Installationpycogworks.cryptocan be installed with ‘pip’:# pip install pycogworks.cryptoDependenciespycogworks.cryptohas the following dependencies:PyCryptoDocumentationpycogworks.crypto.rin2idGenerates an encrypted id from a 9 digit RIN.>>> rin2id(123456789)
'300fe9abdca99d4a32cb2c43f2a69c5c'
>>> rin2id('123456789')
'300fe9abdca99d4a32cb2c43f2a69c5c'
Package: pycogworks.gui
Installationpycogworks.guican be installed with ‘pip’:# pip install pycogworks.guiDependenciespycogworks.guihas the following dependencies:PySideDocumentationpycogworks.gui.getSubjectInfoCreates a GUI dialog to collect subject information. The default dialog collects subjects
first name, last name and RIN. Additional fields can be collected by passing an array
of field names togetSubjectInfo.getSubjectInforeturns a dict of subject information
where the keys are the field names converted to lower case and spaces replaced with underscores.
The RIN field is automatically encrypted usingpycogworks.rin2idand stored in the ‘encrypted_rin’ field.>>> getSubjectInfo(["Age"])
{'rin': u'123456789', 'first_name': u'Foo', 'last_name': u'Bar', 'age': u'18'}pycogworks.gui.doQuestionnaireTHIS NEED DOCUMENTATION AND AN EAMPLE!!!
Package: pycogworks.logging
Installationpycogworks.loggingcan be installed with ‘pip’:# pip install pycogworks.loggingDocumentationpycogworks.logging.getTime, pycogworks.logging.get_timeReturns the most accurate timestamp possible for the current OS.>>> getTime()
1348684524.934422
>>> get_time()
1348684540.905437pycogworks.logging.getDateTimeStampGenerates a date/time stamp usefull in logs and for log filenames.>>> getDateTimeStamp()
'2012-09-26_13-33-06'pycogworks.logging.writeHistoryFileTakes adictof subject information and writes a history file.
The subject information dict must contain a field called ‘rin’ with a value that contains a valid 9 digit RIN.
If the subject information dict does not already contain an ‘encrypted_rin’ field, the RIN will be enrypted and
added to the subject information dict under the field ‘encrypted_rin’. The subject information dict is then encoded
as a JSON string and written to a file.>>> writeHistoryFile("test.history",{"foo":"bar","rin":"123456789"})# cat test.history
{
  "cipher": "AES/CBC (RIJNDAEL) - 16Byte Key",
  "encrypted_rin": "300fe9abdca99d4a32cb2c43f2a69c5c",
  "foo": "bar",
  "rin": "123456789"
}
Package: pycohttpparser
pycohttpparserpycohttpparser is a Python wrapper library around the excellentpicohttpparserC library. It aims to provide a speedy C implementation of
the HTTP/1.1 parsing API used in thehyperproject. Using CFFI, it supports
both CPython 2.7 and 3.4, and PyPy.To get started with pycohttpparser, simply install it from the cheeseshop:$pipinstallpycohttpparserYou’ll need to make sure your system is set up for using CFFI. For more
information,consult CFFI’s documentation.Then, you can start parsing your HTTP messages! For example:>>>importpycohttpparser.apiasp>>>message=socket.recv()>>>m=memoryview(data)>>>c=p.Parser()>>>r=c.parse_request(m)>>>r.method.tobytes()b'POST'>>>r.path.tobytes()b'/post'For more information, seethe documentation.LicenseThe Python wrapper library here is licensed under the MIT license. See LICENSE
for more details.The original picohttpparser C code, which is included in this project in its
entirety, is licensed under the MIT license. See the source files or the
NOTICES file for more details.MaintainersThe python wrapper library is maintained by Cory Benfield.picohttpparser is maintained by the picohttpparser team: see NOTICES for more.Release History1.1.0 (2016-02-18)Update to CFFI 1.0.0.Bring picohttpparser up to 408186196312fd46b1fbea78d8e7b6c9f42ef8e31.0.0 (2015-03-21)Initial release.Contains picohttpparser at revision 98bcc1c3b431d05d4584af66082da48e4638a675
Package: pycoilgen
pyCoilGenThepyCoilGenproject is an open source tool for generating coil winding layouts, such asgradient field coils, within theMRIandNMRenvironments.pyCoilGenis based on a boundary element method and generates interconnected non-overlapping wire-tracks on 3D support structures.This Python project is a port of the MATLABCoilGen codedeveloped by Philipp Amrein.For detailed documentation, refer to thepyCoilGen Documentation.InstallationRefer to theInstallation Guidefor detailed instructions on how to install and set uppyCoilGen.ExamplesTheexamplesdirectory contains several examples for how to usepyCoilGen. These examples demonstrate different scenarios and configurations for generating coil layouts.AcknowledgementsThe porting of the code from MATLAB to Python was facilitated byChatGPT, May 24 through August 3 Versionwith manual corrections.Additional cross-checking was done usingMATLAB Onlineprovided by MathWorks.ContributingIf you'd like to contribute topyCoilGen, follow the guidelines outlined in theContributing Guide.LicenseSeeLICENSE.txtfor more information.ContactFor inquiries and discussion, usepyCoilGen Discussions.IssuesFor issues related to this Python implementation, visit theIssuespage.CitationUse the following publication, if you need to cite this work:Amrein, P., Jia, F., Zaitsev, M., & Littin, S. (2022). CoilGen: Open-source MR coil layout generator. Magnetic Resonance in Medicine, 88(3), 1465-1479.
Package: pycoilgen_data
pyCoilGen DatapyCoilGenis an application for generating gradient field coil layouts within the MRI/NMR environment.The tool is based on a boundary element method and creates interconnected, non-overlapping wire-tracks on 3D support structures.This package provides optional extra data forpyCoilGenthat provides coil mesh surface.stlfiles, pre-calculated target fields and solutions.For detailed documentation, refer to thepyCoilGen Documentation.InstallationInstallpyCoilGenusing pip:$pipinstallpycoilgenInstall thispyCoilGen Datausing pip:$pipinstallpycoilgen_dataLicenseSeeLICENSE.txtfor more information.
Package: pycoilgen_utils
pyCoilGen UtilitiespyCoilGenis an application for generating coil layouts within the MRI/NMR environment.This package provides optional extra utilities that users may find useful:stl_asc2bin: ConvertASCII STLfiles to binary.InstallationInstallpyCoilGen Utilitiesusing pip:$pipinstallpycoilgen_utilsUsagestl_asc2binusage:stl_asc2bin[-h]input_fileoutput_file

ConvertASCIISTLtoBinarySTL

positionalarguments:input_filePathtotheinputASCIISTLfileoutput_filePathfortheoutputbinarySTLfile

optionalarguments:-h,--helpshowthishelpmessageandexitLicenseSeeLICENSE.txtfor more information.
Package: pycoils
coilsData structures implemented using Python.Githubhttps://github.com/harisankar-krishna-swamy/coilsInstallpip install pycoilsLicenseApache2 LicenseNew Features11 November 2020:Bit vector data structureList of data structuresStack using python listQueue using python listHeap (Min & Max) using python list.Binary Search Tree with link inversion traversalSplayTree -do-LinkedListDoublyLinkedListSeperateChainHashTable (3 types of chaining using LinkedList, SplayTree, BinarySearchTree)DisjointSetWithUnion (uses uptree nodes and path compression)PriorityQueuesInternStoreBit VectorExamples and usageRefer: pycoils/examples package
Package: pycoinbase
The official Python library for theCoinbase API.FeaturesNear-100% test coverage.Support for bothAPI Key + SecretandOAuth 2authentication.Convenient methods for making calls to the API - packs JSON for you!Automatic parsing of API responses into relevant Python objects.All objects have tab-completable methods and attributes when usingIPython.For more information, pleasevisit the Github repository.Note: this package name used to refer to the unofficialcoinbase_pythonlibrary maintained byGeorge Sibble.
George graciously allowed us to use the name for this package instead. You can
still find that packageon Github. Thanks, George.
Package: pycoinbaseapi
Theforkof official Python library for theCoinbase API.FeaturesNear-100% test coverage.Support for bothAPI Key + SecretandOAuth 2authentication.Convenient methods for making calls to the API - packs JSON for you!Automatic parsing of API responses into relevant Python objects.All objects have tab-completable methods and attributes when usingIPython.For more information, pleasevisit the Github repository.Credits to the original creator,Original Github repository.
Package: py-coincap-client
CoinCap APIwrapperCoinCap REST API Doc:https://docs.coincap.io/Installpipinstallpy-coincap-clientUsagefromcoincapimportCoinCapcc=CoinCap(key=None)cc.get_asset(id="bitcoin")Testingvirtualenvvenvsource./venv/bin/activate
pipinstall-rdev_requirements.txt
pytest
Package: py-coingecko-client
CoinGecko APIwrapperCoinGecko Doc:https://www.coingecko.com/en/api/documentationInstallpipinstallpy-coingecko-clientUsagefromcoingeckoimportCoinGeckocg=CoinGecko()cg.get_simple_price(ids=["bitcoin"],vs_currencies=["usd"])Testingvirtualenvvenvsource./venv/bin/activate
pipinstall-rdev_requirements.txt
deactivatesource./venv/bin/activate
pytest