Saravanan666/pypi-org huggingface dataset:
Package: pyscheduling
pyschedulingTHE python package to solve scheduling problemsInstallation$pipinstallpyschedulingUsageimportpyscheduling.SMSP.interfaceassmproblem=sm.Problem()problem.add_constraints([sm.Constraints.W,sm.Constraints.D])problem.set_objective(sm.Objective.wiTi)problem.generate_random(n=20,Wmax=10)solution=problem.solve(problem.heuristics["ACT"])print(solution)ContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensepyschedulingwas created by the scheduling-cc organization. CC-BY-NC-ND-4.0.
Package: pyschemagen
PySchemaGenThis is a very rudimentary project that allows you to generate
a flat but complex schema off of a flat json dict.I built this because I write a lot of data import systems in my
free time just scraping stuff from public APIs or the web and I find it truly tedious
to write schemas all the time when im not building anything production ready.
so this is just a system to fast track that process by spitting out a schema based on a dictinary.How do I use it?frompyschemagenimportParserif__name__=='__main__':dictionary_data={"keyOne":"value","keyTwo":1,"keyThree":False,"keyFour":1.5,}# explicitly typing the param names like this is not required.# I'm just doing it to make it clear what goes where.p=Parser(data=dictionary_data,table_name="MyTable")p.write_all()This above method will generate a new module withoratorschema definition and model definition
automatically generated from the dict that you passed in. Currently this only works with single level dictionaries,
though I might build on this in the future.It will output a directory structure like this:my_module
|__ __init__.py
|__ config.py
|__ import.py
|__ schema.py
|__ mytable.pyconfig.pysets up your db connection for youimport.pysets up a rudimentary import function that will convert the dictionary into the new schema format.schema.pysets up your db schema.mytable.pyis the model file for your database.Currently the schema makes everything nullable other than the primary key and created_at/updated_at fields.
This is to insure that the import of your data is not having errors, but you are free to adjust the schema as you see fit.
Ideally down the road I'd like to make this system able to accept a list of dicts so that it can evaluate essentially the
lowest common denominator of data between them, but that will have to come later.DependenciesThis project assumes you have Orator-Orm installed. If you have that you are good to go.Feel free to fork and send PRs my way. :)
Package: pyschemata
pyschemataAn experiment in bundling SchemaStore Schemas as a python package.Status of this ProjectThis project is very new and experimental. We'll see where it goes.GoalsProvide all the schemas inSchemaStoreas an installable python package, with the schemas as package dataAll schemas are vendored into this package at build time (no schemas are
mirrored in this repo)Automatic updates and releases driven by a CI service, but only when there
are schema updatesSeparation between build-time dependencies (e.g.requests) and runtime
dependencies (e.g.importlib_resources)
Package: pyschemavalidator
pyschemavalidatorThis package contains a decorator for endpoints in flask and a way to validate dictionary/JSON elements.
It omits the need to validate the data yourself and allow its usage by other kinds of APIs like graphql through theUniversalValidator.InstallationUse pip to install the package from PyPI:pipinstallpyschemavalidatorUsageThis package provides a flask route decorator to validate a JSON payload or dictionary elements.fromflaskimportFlask,make_response,jsonify,g,url_forfrompyschemavalidatorimportvalidate_param# example importsfrommodelsimportModelapp=Flask(__name__)@app.route('/invocations',methods=['POST'])@validate_param(key="sepal_length",keytype=float,isrequired=True)@validate_param(key="sepal_width",keytype=float,isrequired=True)@validate_param(key="petal_length",keytype=float,isrequired=True)@validate_param(key="petal_width",keytype=float,isrequired=True)defregister():# if the payload is invalid, the request will be aborted with the appropriate error code# do model inferencedata=request.get_json(silent=True,force=False)output=Model.predict(data.get('sepal_length'),data.get('sepal_width'),data.get('petal_length'),data.get('petal_width'))returnmake_response(jsonify({"output:":output}),200)The payload is verified through the parameters set on the decorators. If the body does not meet the decorator's specifications it returns a standard response with the appropriate error code.You can also use the package without the decorator style as below:frompyschemavalidator.validatorsimportUniversalValidator# Creates a Universal validator to the dictionary/JSON elementsrequest_validator=UniversalValidator()request_validator.add(key="example1",keytype=str,isrequired=True)request_validator.add(key="example2",keytype=str,isrequired=False)# Example datadata={"example1":"test","example2":"test"}# Add some validations to the JSON/dictionary elementstatus_code,message=request_validator.validate(tag1=data.get("example1"),tag2=data.get("example2"))ifstatus_code!=200:# It means that something got wrong with the validationraiseValueError(message)else...# Do whatever you wantMimetype checkingAs of 1.2.0 this decorator usesflask.request.get_json(force=False)to get the data. This means the mimetype of the request has to be 'application/json'.Error handlingOn validation failure, the library callsflask.make_responseand passes the error code and the message.TestingThe following are the steps to create a virtual environment into a folder named "venv" and install the requirements.# Create virtualenvpython3-mvenvvenv# activate virtualenvsourcevenv/bin/activate# update packagespipinstall--upgradepipsetuptoolswheel# install requirementspythonsetup.pyinstallTests can be run withpython setup.py testwhen the virtualenv is active.Changelog1.0.4 - Removed support to Python 2.71.0.3 - Fix description and README1.0.2 - Fix the missing required parameter issue1.0.1 - Fix the bonduaries issue1.0.0 - First release
Package: pyscheme
Minimal r7rs scheme python library with a repl. Made by gpt, maintained by human.WarningUnder heavy development, use it at your own risk.InstallpipinstallpyschemeYou may try latest features by using git to installpipinstallgit+https://github.com/dbian/pyscheme.gitImplemented Featureslexical scopeletbegin,if,lambda,define... etc.REPL, with clojure like*1*2*3result cache supportinstall_func to extend scheme language, you can use it to install global variables too.single line comment, start with;moreUsageimportpyscheme.schemeasscenv=sc.new_env()assertsc.run("(define bb (lambda (aa) (+ aa 2))) (bb 5)",env)==7defstr_format_func(f,*args):returnf%argssc.install_func("format",str_format_func)Todomacros systembetter token parsingstring support whitespace()quote'supportclojure pipeline operator supportmodule systemmore
Package: pyschemer
PySchemerA database schema visualization toolUsageThis app will try to create an ERD from an existing database. It tries to achieve this by asking the database about certain things, namely tables (their names and fields), and their relationships with other tables (foreign keys).When you want to implement it for another SQL dialect, some fields might need to be overridden:Database.get_tablesDatabase.describe_tablesDatabase.get_relationshipsSee the examples directory for a working example forMonetDBInstallationFrom pippip install pyschemerFrom sourceClone the repo, and runpip install .from within the cloned repo.The installation ofpygraphvizmight fail on an M1 Mac, in that case run:pipinstall--global-option=build_ext--global-option="-I$(brew--prefixgraphviz)/include"--global-option="-L$(brew--prefixgraphviz)/lib"pygraphvizand runpip install .again.
Package: pyschism
PySCHISMA Python interface for SCHISM model runs.Installation:Pre-requisitesIt is highly recommended that you run this software using aPython virtual environment, and that you use Python>=3.6 (preferrably, using the latest available Python version is encouraged). You may use conda or venv to satisfy this dependency.
You should also have the cdunits library installed. In ubuntu systems this is achieved by:apt-getinstalludunits-binInstall option 1: pippipinstallpyschismInstall option 2: clone repoTo install, clone this repository, and navigate into it:gitclonehttps://github.com/schism-dev/pyschismcdpyschismThen make sure to activate the target Python environment (this step is not necessary if you chose not to use a virtual environment).
After making sure your target environment is active, you can install the package using pip:pipinstall.If you are a developerIf you are a developer, it is recommended that you clone the repo.
After you add the-eflag to the pip install command in order to install in developer mode.pipinstall-e.Usage examples:Using the LibraryExample 1: Full domain Hgrid plot:frompyschism.meshimportHgridhgrid=Hgrid.open('hgrid.gr3')hgrid.make_plot(show=True)Example 2: Write mesh to QGIS friendly format# NOTE: 2dm files can be read by QGIS > 3.0frompyschism.meshimportHgridhgrid=Hgrid.open('hgrid.gr3')hgrid.write("/path/to/output/file.2dm",fmt='2dm')Online manualhttps://schism-dev.github.io/schism/master/getting-started/pre-processing-with-pyschism/overview.htmlReferencesIf you used this software as part of your work, please use the following citation format.Jaime R Calzada, Linlin Cui, & Joseph Zhang. (2023). schism-dev/pyschism: v0.1.5 (v0.1.5). Zenodo.https://doi.org/10.5281/zenodo.7623122Questions, comments and suggestions are welcome. Please follow the instructions on theCONTRIBUTING.mdfile for contributions. For bug reports and feature requests, please open an issue using the issue tracker.
Main author name: Jaime R Calzada
Author contact:jrcalzada@vims.edu“Marconi is a good fellow. Let him continue. He is using seventeen of my patents.”
Nikola Tesla
Package: pyschlage
pyschlagePython 3 library for interacting with Schlage Encode WiFi locks.Note that this project has no official relationship with Schlage or Allegion. Use at your own risk.UsagefrompyschlageimportAuth,Schlage# Create a Schlage object and authenticate with your credentials.s=Schlage(Auth("username","password"))# List the locks attached to your account.locks=s.locks()# Print the name of the first lockprint(locks[0].name)"My lock"# Lock the first lock.lock[0].lock()InstallationPipTo install pyschlage, run this command in your terminal:$pipinstallpyschlageSource codePyschlage is actively developed on Github, where the code isalways available.You can either clone the public repository:$gitclonehttps://github.com/dknowles2/pyschlageOr download the latesttarball:$curl-OLhttps://github.com/dknowles2/pyschlage/tarball/mainOnce you have a copy of the source, you can embed it in your own Python package, or install it into your site-packages easily:$cdpyschlage
$python-mpipinstall.DocumentationAPI reference can be found onRead the Docs
Package: pyschlandals
Installationpyschlandals is not yet installable frompip. But by cloning the main repository of Schlandals, you can install it in your current python environment.
To do so you need to installthe Rust toolchain. Once this is done, you should havecargoinstall.
You can then installMaturinwithcargo install maturin.
Then, from the source directory ofpyschlandals, runmaturin develop.UsageThe search and compiler main function are exported in python and can be used directly with the input filename and branching heuristic as followsfrompyschlandals.searchimportexactfrompyschlandals.compilerimportcompilefrompyschlandalsimportBranchingHeuristicfilename='../tests/instances/bayesian_networks/asia_xray_false.cnf'print(exact(filename,BranchingHeuristic.MinInDegree))dac=compile(filename,BranchingHeuristic.MinInDegree)print(dac.get_circuit_probability())Documentation for how to access and update circuits parameters will come soon.
Package: pyscholar
AboutThe modulepyscholarconsists of functions to convert tables imported in pandas to latex or markdown format. It aso includes a functionreplace_includeto replace the content of the file mentioned after!include.Installationpip install pyscholarUsagepyscholaris easy to use. Just import:frompyscholarimportpandocFor table conversionInstantiate theTableclass using:tab=pandoc.Table(df)Convert table to markdown and save as:tab.to_markdown('table.md')Convert table to latex and save as:tab.to_latex('table.tex')Replacing content of a fileTo replace content of a file mentioned after!include, usereplace_includefunction inpandoc.Example:If the fileinfilenamecontains the following line:!include table.mdThen, usingreplace_includewill replace that line with contents of filetable.md.frompandocimportreplace_includereplace_include(infilename,outfilename)
Package: py-school-match
Py-school-matchPy-school-matchis an open-source Python package that implements multiple matching algorithms in order to assign
students to schools.It provides multiple algorithms ready to use:Top Trading Cycles (TTC)Deferred acceptance with multiple tie-breaking (DAMTB)Deferred acceptance with single tie-breaking (DASTB)Stable improvement cycles (SIC)Deferred Acceptance with multiple tie-breaking, plus stable cycles (MSIC)Deferred Acceptance with single tie-breaking, plus non-stable cycles (NSIC)Py-school-matchis designed specifically for the student-to-school assignation problem. Because of this,
you can focus on evaluating different settings and algorithms, without the need to adapt or develop a
complete solution.Sample codeimportpy_school_matchaspsm# Creating three students.st0=psm.Student()st1=psm.Student()st2=psm.Student()# Creating a criteria. This means 'vulnerable' is now a boolean.vulnerable=psm.Criteria('vulnerable',bool)# Assigning st1 as vulnerablestudent_vulnerable=psm.Characteristic(vulnerable,True)st1.add_characteristic(student_vulnerable)# Creating three schools, each with one seat available.sc0=psm.School(1)sc1=psm.School(1)sc2=psm.School(1)# Defining preferences (from most desired to least desired)st0.preferences=[sc0,sc1,sc2]st1.preferences=[sc0,sc2,sc1]st2.preferences=[sc2,sc1,sc0]# Creating a lists with the students and schools defined above.schools=[sc0,sc1,sc2]students=[st0,st1,st2]# Defining a rulesetruleset=psm.RuleSet()# Defining a new rule from the criteria above.rule_vulnerable=psm.Rule(vulnerable)# Adding the rule to the ruleset. This means that a 'vulnerable' student has a higher priority.# Note that rules are added in order (from higher priority to lower priority)ruleset.add_rule(rule_vulnerable)# Creating a social planner using the objects above.planner=psm.SocialPlanner(students,schools,ruleset)# Selecting an algorithmalgorithm=psm.SIC()# Running the algorithm.planner.run_matching(algorithm)# inspecting the obtained assignationforstudentinstudents:print("Student{}was assigned to School{}".format(student.id,student.assigned_school.id))InstallationDependenciesgraph-tool (>= 2.27)User installationpipinstallpy-school-matchOr you can clone the repo and install it:gitclonehttps://github.com/igarizio/py-school-matchcdpy-school-matchpythonsetup.pyinstallRemember to first installgraph-tool.DevelopmentContributions are more than welcome. Feel free to open an issue or contact me!Remember that this package does not provide ANY WARRANTY OF ANY KIND.How to cite?Insert citation here.
Package: pysciebo
PyScieboPySciebois a Python
client library for interfacing withsciebo,
the official "Hochschulcloud NRW".The library is not endorsed officially and should be used accordingly.Table of Contents1. Installation2. Usage2.1. As a Command-Line Interface2.2. As a Library3. Development4. Todo1. InstallationPySciebo is available onPyPIand can be installed usingpip:pipinstallpysciebo2. Usage2.1. As a Command-Line InterfaceThe PySciebo command-line interface is automatically installed when installing
the package viapip. Authentication works either via command-line arguments
or by setting the following environment variables:SCIEBO_URLSCIEBO_USERNAMESCIEBO_PASSWORD# example using CLI argumentspyscieboupload--url$URL--username$USERNAME--password$PASSWORD/remote/file/path/local/file/path# example using environment variablespyscieboupload/remote/file/path/local/file/path2.2. As a LibraryUsing your university's sciebo URL, your username, and your password, the client
works like this:importosfrompyscieboimportScieboClienturl=os.environ["SCIEBO_URL"]username=os.environ["SCIEBO_USERNAME"]password=os.environ["SCIEBO_PASSWORD"]# Loginclient=ScieboClient(url,username,password)# Upload a file to scieboclient.upload("/sciebo/file/path","/local/file/path")# Download a file from sciebo (local path is optional)client.download("/sciebo/file/path","/local/file/path")# Delete a file from scieboclient.delete("/sciebo/file/path")3. DevelopmentThe project uses pre-commit hooks usingpre-commit.
Follow theinstallation instructionsto set
them up properly.New functionality should at least be covered by integration tests. The rest is
optional but recommended.4. TodoImplement command-line interfaceExtend feature list
Package: pyscience
PysciencePyscience is a easy python library and command-line application to work with
mathematical operations and other science related programming. Also you can
manage CSV data with the datam module.Pyscience requires Python 3.7+ to work.InstallationPyscience is available inPyPI.
You can install Pyscience using pip (as root):pip3 install pyscienceIf you want to install the latest development version, you can install pyscience
from theGitHub repository:pip3 install git+https://github.com/m-alzam/pyscience.gitPre-releases have the latest features and bug fixes.FeaturesBasic calculatorOperate with variables, monomials and polynomialsSolve first and second-degree equationsGet information about chemical elementsManage CSV data easily (in development)Convert between unit with theunitsmodule (experimental)Basic usageOnce installed, you can run pyscience as a normal program:pyscienceThis should start pyscience's interactive interpreter. You can operate with
variables:> 2x+3x
5x
> 2x*7y
14xyOr get Chemical Elements information with theCEfunction:# Returns chemical element with symbol 'H'
> CE('H')
...
# Returns chemical element with atomic number 2
> CE(2)
...Solve first-degree equations:> Eq(2x, 10)
Eq(2x = 10)
Solution: 5DocumentationOfficial documentation is availablehere.
You can build it using thesphinxpython library and themakescript.TodoPyscience is in current development. Future features:Update chemicals elements informationPolynomial divisionPhysics functionsDocumentationHistorySeechangelogLicenseCopyright (c) 2019 Manuel Alcaraz ZambranoPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.About data used for ChemicalElementChemical elements information is extracted from theKalziumprogram.
Package: pyscigraph
PySciGraphPython command line utility for accessingSpringer Nature SciGraph.SN SciGraph is a Linked Open Data repository containing info about 14 million+ research publications from Springer Nature, plus related researchers, grants, patents, organizations, etc..The code is hosted on Pypi:https://pypi.org/project/pyscigraph/Example# Search Nicola+Guarino on SciGraph website$pyscigraphNicolaGuarino# Get JSONLD for a SN publication from its DOI$pyscigraph--doi10.1038/171737a0# Get JSONLD for a SN publication from its full URI$pyscigraph--urihttp://scigraph.springernature.com/pub.10.1038/171737a0# Serialise RDF to Turtle format (default= JSONLD)$pyscigraph--doi10.1038/171737a0--rdfturtle# Get JSONLD for other entity types$pyscigraph--urihttp://scigraph.springernature.com/clinicaltrial.NCT05060562
$pyscigraph--urihttp://scigraph.springernature.com/grant.2691278
$pyscigraph--urihttp://scigraph.springernature.com/patent.US-10355159-B2
$pyscigraph--urihttp://scigraph.springernature.com/journal.1136213
$pyscigraph--urihttp://www.grid.ac/institutes/grid.511171.2
$pyscigraph--urihttp://scigraph.springernature.com/person.01311060163.26Installpip install pyscigraphStatusPrototype.
Package: pyscihub
pyscihubCommand-line and Python API to download PDFs directly from Sci-HubFree software: MIT licenseDocumentation:https://pyscihub.readthedocs.io.FeaturesDownload 1,000s of academic articles without an academic account in one commandAdd new articles to the list without downloading existing articles twiceSave important time looking up and downloading articlesInstallationTo install pyscihub, run this command in your terminal:$pipinstallpyscihubThis is the preferred method to install pyscihub, as it will always install the most recent stable release.If you don’t havepipinstalled, thisPython installation guidecan guide
you through the process.UsageTool can be used with a single query, e.g.,$pyscihubsingle"Your paper"or with a user-provided file containing one query per line as$pyscihubfile<LOCATIONFILE>If everything goes well, a fileoutput/pdf_paths.csvis created containing the location of the PDFs of all requested queries. If Sci-Hub cannot find the corresponding PDF then the field is empty.History0.1.2 (2020-10-20)Add API documentation.Formulate docstrings for all member functions.Add section with features to README.0.1.0 (2020-10-20)First release on PyPI.
Package: pysciname
PyPi:https://pypi.org/project/pysci/สวัสดีจ้าาาาวิธีติดตั้งเปิด CMD / Terminalpipinstallpysciวิธีใช้งานแพ็คเพจนี้เปิด IDLE ขึ้นมาแล้วพิมพ์…frompysciimportPymy=Py('')my.a()my.b()พัฒนาโดย: **** FB: *****YouTube: ****
Package: py-sciplot
=======sciplot=======Style and plotting tools for matplotlib.Installation============```bashpython3 ./setup.py develop --user```The matolotlib style can be installed in the sytlelib folder:```bash./install_mlp_style.sh```Usage=====After installation you can use the style with matplotlib:```pythonimport matplotlib.pyplot as pltplt.style.use('sciplot')```To use the library you can do```pythonimport sciplotsciplot.hist([1,2])```![Example](examples/stacked_plot.png?raw=true "Title")