Saravanan666/pypi-org huggingface dataset:
Package: py_daemon
Python daemonizer class====================This is a Python class that will daemonize your Python script so it can continue running in the background. It works on Unix, Linux and OS X, creates a PID file and has standard commands (start, stop, restart) + a foreground mode.Based on [this original version from jejik.com](http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/).Usage---------------------Define a class which inherits from `Daemon` and has a `run()` method (which is what will be called once the daemonization is completed.from daemon import Daemonclass pantalaimon(Daemon):def run(self):# Do stuffCreate a new object of your class, specifying where you want your PID file to exist:pineMarten = pantalaimon('/path/to/pid.pid')pineMarten.start()Actions---------------------* `start()` - starts the daemon (creates PID and daemonizes).* `stop()` - stops the daemon (stops the child process and removes the PID).* `restart()` - does `stop()` then `start()`.Foreground---------------------This is useful for debugging because you can start the code without making it a daemon. The running script then depends on the open shell like any normal Python script.To do this, just call the `run()` method directly.pineMarten.run()Continuous execution---------------------The `run()` method will be executed just once so if you want the daemon to be doing stuff continuously you may wish to use the [sched][1] module to execute code repeatedly ([example][2]).[1]: http://docs.python.org/library/sched.html[2]: https://github.com/serverdensity/sd-agent/blob/master/agent.py#L339
Package: py-dagger
DaggerDefine sophisticated data pipelines and run them on different distributed systems (such as Argo Workflows).FeaturesDefine tasks and DAGs, and compose them together seamlessly.Create dynamic for loops and map-reduce operations.Run your DAGs locally or using a distributed workflow orchestrator (such as Argo Workflows).Take advantage of advanced runtime features (e.g. Retry strategies, Kubernetes scheduling directives, etc.)... All with a simplePythonicDSL that feels just like coding regular Python functions.Other nice features ofDaggerare: Zero dependencies, 100% test coverage, great documentation and plenty of examples to get you started.InstallationDaggeris published to the Python Package Index (PyPI) under the namepy-dagger. To install it, you can simply run:pip install py-daggerLooking for Tutorials and Examples?Check ourDocumentation Portal!Architecture OverviewDaggeris built around 3 components:A set ofcore data structuresthat represent the intended behavior of a DAG.Adomain-specific language (DSL)that uses metaprogramming to capture how a DAG should behave, and represents it using the core data structures.Multipleruntimesthat inspect the core data structures to run the corresponding DAG, or prepare the DAG to run in a specific pipeline executor.How to contributeDo you have some feedback about the library? Have you implemented a Serializer or a Runtime that may be useful for the community? Do you think a tutorial or example could be improved?Every contribution toDaggeris greatly appreciated.Please read ourContribution Guidelinesfor more details.Local developmentWe use Poetry to manage the dependencies of this library. In the codebase, you will find aMakefilewith some useful commands to run and test your contributions. Namely:make install- Install the project's dependenciesmake test- Run tests and report test coverage. It will fail if coverage is too low.make ci- Run all the quality checks we run for each commit/PR. This includes type hint checking, linting, formatting and documentation.make build- Build the project.make docker-build- Package the project in a Docker imagemake docs-build- Build the documentation portal.make docs-serve- Serve the documentation portal.make k3d-set-up- Create a k3d cluster and image registry for the project.make k3d-docker-push- Build and push the project's Docker image to the local k3d registry.make k3d-install-argo- Install Argo on k3d, for local testing of Argo Workflows.make k3d-tear-down- Destroy the k3d cluster and registry.
Package: py-dagger-contrib
Dagger ContribThis repository contains extensions and experiments using thepy-daggerlibraryExtensionsdagger_contrib.serializerAsYAML- Serializes primitive data types usingYAML.path- Serializes local files or directories given their path name.AsTar- As tarfiles with optional compression.AsZip- As zip files with optional compression.pandas.dataframe- SerializesPandas DataFrames.AsCSV- As CSV files.AsParquet- As Parquet files.dask.dataframe- SerializesDask DataFrames.AsCSV- As a directory containing multiple partitioned CSV files.AsParquet- As a directory containing multiple partitioned Parquet files.InstallationDagger Contribis published to the Python Package Index (PyPI) under the namepy-dagger-contrib. To install it, you can simply run:pip install py-dagger-contribExtrasMany of the packages require extra dependencies. You can install those on your own, or viapip install py-dagger-contrib[pandas]Wherepandascould also bedask,yamlorall.
Package: pydagogy
PydagogyPydagogy is a Python library for automated code checking in online courses.Content developers create the tests with hints, solutions, and other messaging. Students import the tests and run them in their exercise code to get feedback.UsageContent developers create tests by subclassingpydagogy.tests.BaseTest, or using one of the built-in tests likeValueTest. There are assert functions available that automatically print out messages when tests fail. This way you can have multiple checks within a test without breaking execution.For example, you could create a test that checks for string equality.importpydagogyaspgyclassMyTest(pgy.tests.BaseTest):defcheck(self,value):expected="example string"message="Sorry, your result doesn't look correct."ifpgy.assert_true(value==expected,message):self.success# Create the test and add feedback for studentstest_p1=MyTest()test_p1.hint="Example hint text"test_p1.solution="Example solution text"test_p1.success="Nicely done!"This test is imported into the student exercise code.fromtest_fileimporttest_p1# students do something to generate a stringout_string=some_func()test_p1.check(out_string)# Uncomment the line below to see a hint# test_p1.hint# Uncomment the line below to see the solution# test_p1.solutionThe check function will print out the success message ("Nicely done!" in this example), if the student's string is the same as the expected string. Otherwise, it will print out the fail messsage.Students can look at the hint and solution if they want, uncommenting those lines will print out the text.DependenciesPython 3.6 because f-strings. Seriously, update to 3.6 just for f-strings. You'll thank me.
Package: pydagogy-brent
Brent algorithmTo installBrent's algorithm requiresPython 3.8and therichlibrary.To install the library, run:pipinstallpydagogy-brentThen run the following in a Python shell:frompydagogy_brentimportSettings,brentimportmathsettings=Settings(x_rel_tol=1e-12,x_abs_tol=1e-12,y_tol=1e-12,verbose=True)f=math.cosbrent(f,0.0,3.0,settings)To developWe use thePoetrydependency management system.We useVS Code, the Black/isort/pylint tools. To install them, run:poetryinstall
Package: py-dagviz
py-dagvizThis package creates a text rendering of a directed acyclic graph (DAG) for visualization purposes in a terminal.
It contains a single functionvisualize_dagthat takes anetworkx.DiGraphobject from thenetworkxpackage.• 0
├─• 1
├─┼─• 2
│ ├─┼─• 3
└─│─┴─• 4
  └─• 5Usageimportnetworkxasnxfromdagvizimportvisualize_dagg=nx.DiGraph()# Creates the graph to visualize# If the graph contains cycles (i.e., not a DAG), visualization failsg.add_nodes_from([0,1,2,3,4,5])g.add_edges_from([(0,1),(0,2),(1,2),(1,3),(1,5),(2,4),(0,4),(2,3)])print(visualize_dag(g,round_angle=False))# • 0# ├─• 1# ├─┼─• 2# │ ├─┼─• 3# └─│─┴─• 4#   └─• 5print(visualize_dag(g,round_angle=True))# display may be bad under some terminal fonts# • 0# ├─• 1# ├─┼─• 2# │ ├─┼─• 3# ╰─│─┴─• 4#   ╰─• 5
Package: pydaikin
PyDaikin is a standalone program and a library that interface AirConditioners from Daikin.Currently the following Daikin WiFi modules are supported:BRP069Axx/BRP069Bxx/BRP072AxxBRP15B61 aka. AirBase (similar protocol as BRP069Axx)BRP072B/Cxx (needs https access and a key)SKYFi (different protocol, have a password)The integration was initially built by Yari Adan, but lately have been taken over by Fredrik Erlandsson.
Package: pydaisi
About PyDaisiFull documentation on the features of the PyDaisi client, as well as the platform itself, are available at theDaisi Documentation. Below is a quick overview of the basic PyDaisi usage:Installing PyDaisiPyDaisi can be installed with PIP:pip install --upgrade pydaisiUsing PyDaisiYou can execute a Daisi simply by:Connecting to the DaisiCalling a top-level function fo that Daisi, providing arguments as neededIn this example, we connect to theTitanic StatisticDaisi, and call two different top-level functions (medianandpercentile):frompydaisiimportDaisi# instantiate a Daisi objectdaisi=Daisi("Titanic Statistics")# call a Daisi function. You can also use positional parameters: daisi.median("Age")med=daisi.median(field="Age")print(f"Median Age of Titanic Passengers was:{med.value}")print(f"10th Percentile of Titanic Passengers' Ages was:{daisi.percentile('Age',.1).value}")
Package: pydaisy
pydaisypydaisy provides various tools to read, write and manipulateDaisyinput- and outputfiles.Usage.dai-files:frompydaisy.Daisyimport*d=DaisyModel(r'C:\Program Files\Daisy 5.72\exercises\Exercise01.dai')print(d.starttime)dry_bulk_density=d.Input['defhorizon'][0]['dry_bulk_density'].getvalue()d.Input['defhorizon'][0]['dry_bulk_density'].setvalue(1.1*dry_bulk_density)d.save_as(r'C:\Program Files\Daisy 5.72\exercises\Exercise01_new.dai')DaisyModel.path_to_daisy_executable=r'C:\Program Files\Daisy 5.72\bin\Daisy.exe'd.run().dlf- and .dwf-files:fromdatetimeimportdatetime
frompydaisy.Daisyimport*dlf=DaisyDlf(r'C:\Program Files\Daisy 5.72\exercises\Taastrup6201.dwf')pandasdata=dlf.Datanumpy_data=dlf.numpydatai=dlf.get_index(datetime(1962,4,14))pandasdata['Precip'][i]=10dlf.save(r'C:\Program Files\Daisy 5.72\exercises\Taastrup6201_saved.dwf')Parallel runs:if__name__=='__main__':frompydaisy.Daisyimport*DaisyModel.path_to_daisy_executable=r'C:\Program Files\Daisy 5.72\bin\Daisy.exe'daisyfiles=[r'c:\daisy\model1\setup.dai',r'c:\daisy\model2\setup.dai',r'c:\daisy\model3\setup.dai']run_many(daisyfiles,NumberOfProcesses=3)The code above will run the three daisy-simulations in parallel.
Package: pydal
pyDALpyDAL is a pure Python Database Abstraction Layer.It dynamically generates the SQL/noSQL in realtime using the specified dialect for the database backend, so that you do not have to write SQL code or learn different SQL dialects (the term SQL is used generically), and your code will be portable among different types of databases.pyDAL comes from the original web2py's DAL, with the aim of being compatible with any Python program. pyDAL doesn't require web2py and can be used in any Python context.InstallationYou can install pyDAL usingpip:pipinstallpyDALUsage and DocumentationHere is a quick example:>>>frompydalimportDAL,Field>>>db=DAL('sqlite://storage.db')>>>db.define_table('thing',Field('name'))>>>db.thing.insert(name='Chair')>>>query=db.thing.name.startswith('C')>>>rows=db(query).select()>>>printrows[0].nameChair>>>db.commit()The complete documentation is available onhttp://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layerWhat's in the box?A littletasteof pyDAL features:TransactionsAggregatesInner JoinsOuter JoinsNested SelectsWhich databases are supported?pyDAL supports the following databases:SQLiteMySQLPostgreSQLMSSQLFireBirdOracleDB2IngresSybaseInformixTeradataCubridSAPDBIMAPMongoDBLicensepyDAL is released under the BSD-3c License.  For further details, please check theLICENSEfile.
Package: pydal2sql-core
pydal2sql-coreCompanion library forpydal2sqlcontaining the actual logic.
The other library only serves as a Typer-based CLI front-end.More Documentation coming soon!Table of ContentsInstallationAs a Python LibraryLicenseInstallationpipinstallpydal2sql-coreAs a Python Librarypydal2sql-corealso exposes agenerate_sqlmethod that can perform the same actions on one (for CREATE) or two (for
ALTER)pydal.Tableobjects when used within Python.frompydalimportDAL,Fieldfrompydal2sql_coreimportgenerate_sqldb=DAL(None,migrate=False)# <- without running database or with a different type of databaseperson_initial=db.define_table("person",Field("name","string",notnull=True,),Field("age","integer",default=18),Field("float","decimal(2,3)"),Field("nicknames","list:string"),Field("obj","json"),)print(generate_sql(db.person,db_type="psql"# or sqlite, or mysql; Optional with fallback to currently using database type.))CREATETABLEperson(idINTEGERPRIMARYKEYAUTOINCREMENT,nameVARCHAR(512),ageINTEGER,floatNUMERIC(2,3),nicknamesTEXT,objTEXT);person_new=db.define_table("person",Field("name","text",),Field("birthday","datetime"),redefine=True)generate_sql(person_initial,person_new,db_type="psql")ALTERTABLEpersonADD"name__tmp"TEXT;UPDATEpersonSET"name__tmp"=name;ALTERTABLEpersonDROPCOLUMNname;ALTERTABLEpersonADDnameTEXT;UPDATEpersonSETname="name__tmp";ALTERTABLEpersonDROPCOLUMN"name__tmp";ALTERTABLEpersonADDbirthdayTIMESTAMP;ALTERTABLEpersonDROPCOLUMNage;ALTERTABLEpersonDROPCOLUMNfloat;ALTERTABLEpersonDROPCOLUMNnicknames;ALTERTABLEpersonDROPCOLUMNobj;Licensepydal2sql-coreis distributed under the terms of theMITlicense.
Package: pydamage
PyDamagePydamage, is a Python software to automate the process of contig damage identification and estimation.
After modelling the ancient DNA damage using the C to T transitions, Pydamage uses a likelihood ratio test to discriminate between truly ancient, and modern contigs originating from sample contamination.InstallationWithconda(recommended)condainstall-cbiocondapydamageWith pippipinstallpydamageInstall from source to use the development versionUsing pippipinstallgit+ssh://git@github.com/maxibor/pydamage.git@devBy cloning in a dedicated conda environmentgitclonegit@github.com:maxibor/pydamage.gitcdpydamage
gitcheckoutdev
condaenvcreate-fenvironment.yml
condaactivatepydamage
pipinstall-e.Quick startpydamage--outdirresult_directoryanalyzealigned.bamNote that if you specify--outdir, it has to be before the PyDamage subcommand, example:pydamage --outdir test filter pydamage_results.csvCLI helpCommand line interface help messagepydamage--helpDocumentationpydamage.readthedocs.ioCitePyDamage has been published in PeerJ:10.7717/peerj.11845@article{borry_pydamage_2021,
    author = {Borry, Maxime and Hübner, Alexander and Rohrlach, Adam B. and Warinner, Christina},
    doi = {10.7717/peerj.11845},
    issn = {2167-8359},
    journal = {PeerJ},
    language = {en},
    month = {July},
    note = {Publisher: PeerJ Inc.},
    pages = {e11845},
    shorttitle = {PyDamage},
    title = {PyDamage: automated ancient damage identification and estimation for contigs in ancient DNA de novo assembly},
    url = {https://peerj.com/articles/11845},
    urldate = {2021-07-27},
    volume = {9},
    year = {2021}
}
Package: pydandy
PydandyPydandtic + HandyA lightweight "Database", built on top ofPydandtic. It is currently under development, but the intent is to support in-memory, file, and directory storage options and eventually an Async variant. For the file and directory modes, the data will be backed by either one or manyu JSON files. The main database is also meant to provide a slim ORM-like interface for querying the data.ExamplesfrompydanticimportBaseModelfrompydandyimportPydandyDB# Create an in-memory databasedb=PydandyDB()# Add User Model to the database@db.register()classUser(BaseModel):id:intfirst_name:strlast_name:str# You can use any model, as long you provide a __hash__def__hash__(self):returnself.id# Add a new Record to Usersdb.User.add(User(id=1,first_name="John",last_name="Baz",))# Get your record backuser=db.User.get(1)# Filter for recordsdb.User.filter(lambdarecord:record.first_name.startswith("J"))MotivationMostly just because, but also because I occasionaly finding myself wanting a small data, portable data store. This seemed like fun project idea, and I really Pydandtic, so it worked out.ContributingAt this stage, I am not accepting contributions. Mostly because I am still trying to shape out the core functionality. However, this should change soon™ if you are interested in helping out.
Package: pydanfossair
pydanfossairPython module and client for Danfoss Air HRV systems.UsageRead all commandspython -m pydanfossair --host IP_ADDRESSSend update commandpython -m pydanfossair --host IP_ADDRESS --command COMMANDSupported commandsboost_onboost_offbypass_onbypass_offautomatic_bypass_onautomatic_bypass_offoperation_mode_demandoperation_mode_programoperation_mode_manualset_fan_step_1set_fan_step_2set_fan_step_3set_fan_step_4set_fan_step_5set_fan_step_6set_fan_step_7set_fan_step_8set_fan_step_9set_fan_step_10
Package: pydango
SQL-BUDDYSql-buddy is a study aid for SQL fundamentals that you can run on the terminal.  You can think of it as the command-line version of index cards you would normally use for studying a subject.InstallationYou can install sql-buddy with pip:PYPIpip install sql-buddysql-buddy is supported by Python 3.7 and above.How to usesql-buddy is a command line application.  There are two components:The first component emulates a simple collection of object that represent SQL concepts like GROUP BY:$ python -m sql_buddyWelcome to sql-buddy.  Populating In-memory Database...Press Esc + ENTER to enter sql_buddy commands.
Press CTRL-D to quitType 'commands' and press Esc + ENTER to get a list of sql_buddy commandsAs the instructions state you can type 'commands' and hit Esc + ENTER (RETURN):commands
* list all: lists all the SQL concepts and queries
* list some: list the first 10 concepts in the SQL concepts database
* search=>{concept_name} gives you the definition, syntax, and usage of a specific SQL concept like group_by
* i.e. search=>group_by
* i.e. search=>order_by
* i.e. search=>where
* all SQL concept names must be in lowercase and have underscores in place of spaces> list allgroup_by:Divide the rows returned from the select statement into groups.  For each group, you
can apply an aggregate function like sum(), min(), max(), avg().group_by_with_having:We use having in place of the where clause because aggregations like sum() do not work
with the where clause.To search the definition, syntax, usage, and related concepts of a specific SQL concept:> search=>group_bygroup_by:Divide the rows returned from the select statement into groups.  For each group, you
can apply an aggregate function like sum(), min(), max(), avg().syntax:
select col_1, col_2 from table_name group by col_1, col2usage:
select staff_id, count(staff_id) from payment group by staff_idrelated concepts:
['group_by_with_having', 'where', 'having', 'order by', 'aggregation', 'sum', 'min', 'max', 'avg']The syntax for any individual SQL concept is:> search=>{concept_name}Like Python variables concept names cannot have spaces and must be lowercase.The second component is an SQL REPL straight from theprompt-toolkitdocumentation example tutorial:prompt-toolkitRun sql_buddy like before but with the -o flag:$ python -m sql_buddy -oAnd simply type SQLite queries:select last_name, first_name, execution_date from deathrow limit 3;

('Brooks, Jr.', 'Charlie', '1982-12-07')

('Autry', 'James', '1984-03-14')

("O'Bryan", 'Ronald', '1984-03-31')Sql-buddy comes with a csv data called tx_deathrow_full.csv that contains information about Texas deathrow inmates:selectstarsql.com.The ideal setting forsql-buddyis two have two terminals open at the same time. One to utilize the first component to look up SQL concepts, and the other to run queries against an actual SQLite database table.All data makes use of in-memory-only databases created throughsqlite3andsqlalchemymethods.For help:$ python -m sql_buddy -h
Package: pydango-pip
PYDANGO-PIPpydango-pip is a pip-installable database schema that aims to mimic a movie ticket reservation database system (i.e. Fandango).  It's important to note that the database represented by the package is only what I think such a system should look like, not what it actually is.This was done in the spirit of experimentation and learning as a beginner Python programmer.The inspiration came from a YouTube video by Mike Kennedy where he build an Air Bnb-like CLI for MongoDB with MongoEngine. I've taken a lot of his code and refactored it for SQLAlchemy and relational databases.  You can find the video here:https://youtu.be/E-1xI85Zog8You can also find the non-pip-installable version of Pydango called simply "Pydango" here:https://github.com/Captmoonshot/pydangoThe regular version of Pydango is good to clone.  Once you clone it, and set up a configuration file, you can use it for both an SQLite and/or PostgreSQL database backend.However, pydango-pip will only work with SQLite database backends.InstallationYou can install pydango-pip with pip:PYPIpip install pydango-pippydango-pip is supported by Python 3.7 and above.How to usepydango-pip is a command line application.To run:$ python -m pydango -d sqlite****************** PYDANGO ******************Welcome to Pydango for movies!
What would you like to do?[t] List a new movie
[c] Find a movie# Choose [C]****************** Hello Cinephile ******************What action would you like to take:
[C]reate an account
[L]ogin to your account
Log[O]ut of your account
[R]eserve a movie ticket
[V]iew your movie ticket
[S]ee list of available movies
Search for [N]earby theaters
Search by ca[T]egory
[M]ain menu
e[X]it app
[?] Help (this info)# Choose [S]****************** BROWSE FOR MOVIES ******************Title: Pulp Fiction | Rating: R
Description: Boxing, Robbery, Hitmen, Samuel L. JacksonTitle: Jurassic Park | Rating: PG-13
Description: Dinosaurs, DNA, T-Rex, Velociraptor, ChaosTitle: A Clockwork Orange | Rating: R
Description: Crazy, Crime, Future, DystopianTitle: Aliens | Rating: R
Description: Aliens, Eat People, Spaceship, FutureTitle: Interstellar | Rating: PG-13
Description: Apocalypse, Black Hole, Time Travel, Astronauts--More--Personally, building the project allowed me to appreciate what database engineers do for a living, and also to grokk database designs and just how complicated relational databases can get in the wild.Special shoutout to theLas Vegas OpenSource Programming Groupfro challenging me to take on this project.For help:$ python -m pydango -h
Package: pydanilov
pyDanilov is a Python3 implementation of the Danilov model,
a semi-empirical model of the non-auroral Earth's ionosphere D-Region.
Reference: Danilov, Rodevich, and Smirnova, Adv. Space Res.15, #2, 165, 1995,https://doi.org/10.1016/S0273-1177(99)80042-8Input:z    - solar zenith angle in degreesit   - season (month)f    - F10.7 solar radio flux (daily)vKp  - Kp magnetic index (3-hour)f5SW - indicator for Stratospheric Warming (SW) conditions
=0 no SW, =0.5 minor SW, =1 major SWf6WA - indicator for Winter Anomaly (WA) conditions
=0 no WA, =0.5 weak WA, =1 strong WACriteria for SW and WA indicators:SW minor:  Temperature increase at the 30 hPa level by 10 deg.SA major:  The same but by 20 degrees.WA weak:   An increase of the absorption in the 2-2.8 MHz range at short A3 paths by 15 dBWA strong: The same by 30 dB.Only for month 12 to 2 (winter).Output:numpy array of electron density [m-3] at h=60,65,70,75,80,85, and 90km