Saravanan666/pypi-org huggingface dataset:
Package: pyncov
Pyncov-19: Learn and predict the spread of COVID-19Pyncov-19 is a tiny probabilistic simulator for SARS-CoV-2 implemented in Python 3, whose only dependency is Numpy 1.18.
This simulator is used to learn and predict the temporal dynamics of COVID-19 that are shown inhttps://covid19-modeling.github.io. It implements a probabilistic compartmental model at the individual level using a Markov Chain model with temporal transitions that were adjusted using the most recent scientific evidence.Quick StartBasic installation using pip with minimal dependencies:pipinstallpyncovIn order to install pyncov with the additional features (progress bar, plotting) use:pipinstallpyncov[all]Sampling 100 simulated trajectories of the SARS-CoV-2 spread in Madrid:importpyncovasncimportpyncov.io# Requires pandasimportpyncov.plotsusceptible=6680000infected=1num_days=80infection_rates=nc.infection_rates(nc.io.get_trained_params('ESP-MD'),num_days=60)# Instantiate the model with the default parameters and sample 100 chains# NOTE: show_progress requires the TQDM library not installed by default.m=nc.build_markovchain(nc.MARKOV_DEFAULT_PARAMS)simulations=nc.sample_chains(susceptible,infected,m,infection_rates,num_chains=100,show_progress=True)You can visualizate the trajectories and the average trajectory matching the observed values in Madrid usingpyncov.plot:importmatplotlib.pyplotasplt# Load the dataset with pandasdf=pd.read_csv(...)fig,ax=plt.subplots(1,3,figsize=(16,4))nc.plot.plot_state(simulations,nc.S.I1,ax=ax[0],index=df.index,title="New infections over time")nc.plot.plot_state(simulations,nc.S.M0,diff=True,ax=ax[1],index=df.index,title="Daily fatalities")nc.plot.plot_state(simulations,nc.S.M0,ax=ax[2],index=df.index,title="Total fatalities")df.diff().plot(ax=ax[1]);df.plot(ax=ax[2]);A more detailed explanation can be found in the notebook included in the repositoryhttps://github.com/covid19-modeling/pyncov-19/blob/master/notebooks/basics.ipynbAboutThis library is still a proof-of-concept and it's inteded only to be used for research and experimentation. For more information please read ourpreprint:Matabuena, M., Meijide-García, C., Rodríguez-Mier, P., & Leborán, V. (2020).COVID-19: Estimating spread in Spain solving an inverse problem with a probabilistic model.arXiv preprint arXiv:2004.13695.This model's main goal is to estimate the levels of infections (or the seroprevalence) of the population, using only data from the registered deaths caused by COVID-19. Although the model can be used to make future predictions (evolution of infections, fatalities, etc.), that's not the primary purpose of the model. Given the uncertainty about essential events that alter the course and dynamics of the spread (for example, the use of masks, lockdowns, social distance, etc.), it is tough to make accurate predictions, so we limit ourselves to use the model to reveal more information about what happened before (backcasting).
Package: pyncs
Client library for using the NCS simulator using Python[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/BrainComputationLab/pyncs/trend.png)](https://bitdeli.com/free“Bitdeli Badge”)0.01aInitial Pre-release alpha version. Until any significant progress is made this
version will remain as the current working version.
Package: pyncthing
PyncthingThis is arequests-based API client for Syncthing.It's fully compatible with Syncthing v1.23.7.Please see the full documentation onhttps://docs.syncthing.net/dev/rest.Why ?This project aims to write a simple and clean API client for desktop clients.
It might be used as a backend for Syncthing-GTK in the near future.There are 2 packages already existing:https://github.com/zhulik/aiosyncthing(a huge inspiration) andhttps://github.com/blakev/python-syncthing.
But they are dead projects and not up to date (they don't support the PATCH API).InstallationTODO:!UsageA "subdir" in the REST API is a property in pyncthing. For example,GET /rest/cluster/pending/deviceswill be done viasync.cluster.pending.devices()frompyncthingimportSyncthingsync=Syncthing("http://localhost:8384/rest")# This endpoint does not need authenticationassertsync.noauth.health()# This does NOT check for authentication errors.sync.set_api_key("<YOUR API KEY RETRIEVED ON THE WEB UI>")print(sync.system.status())forname,pathinsync.system.paths():print(f"System path{name}is{path}")forfolderinsync.config.folders().get():print(folder["id"],folder["label"])# This call is blocking!# Even next() might block if no event is coming.# You can stop blocked calls with sync.events.stop().# Carefull, it blocks *all* calls!# This API will probably change in the future.foreventinsync.events():print(event)Thank youThe Syncthing projectfor an amazing synchronization tool!aiosyncthingfor a huge inspiration of the coding style of this project.
Package: pynction
Pynction 🐍Functional based library to support haskell monads like Either, Maybe in a scala fashion style. The library also contains Try monad inspired from vavr and a Stream class which is pretty similar to scala and java stream APIInspired in:VΛVRWhy should you use it ?Probably if you have reached this library you already know something about functional programming and Monads.
Well this library is another one that empowers your imperative code to start using functional programming concepts. This type of programming makes your code declarative as long as give you support to the most famous monads likeMaybeandEither.
These monads make your interfaces explicit for error handling so paraphrasingIf it compiles, it worksthis time it isIf mypy is happy, your code worksBasic examplesStream examplesfrompynctionimportstream_of,streamfoo=(stream_of([1,2,3,4]).map(lambdaa:a+1).filter(lambdan:n%2==0).flat_map(lambdan:[n,n*2]).to_list())# foo => [2, 4, 4, 8]bar=(stream("example","e","something").take_while(lambdas:s.startswith("e")).to_list())# bar => ["example", "e"]Maybe examplesfrompynctionimportmaybe,nothingdefdivide_10_by(n:int)->Maybe[int]:ifn==0:returnnothingreturnmaybe(10/n)result=divide_10_by(2).get_or_else_get(-1)# result => 5result=divide_10_by(0).get_or_else_get(-1)# result => -1Try examplesfrompynctionimporttry_ofdefadd_10(n:int)->int:ifn>10:raiseException("n must be less than 10")returnn+10try_example_1=try_of(lambda:add_10(11)).map(lambdaa:a+1)try_example_1.on(on_success=lambdaa:print(f"Result:{a}"),on_failure=lambdae:print(f"Error:{e}"),)# ==> Will print "Error: n must be less than 10"try_example_2=try_of(lambda:add_10(9)).map(lambdaa:a+1)try_example_2.on(on_success=lambdaa:print(f"Result:{a}"),on_failure=lambdae:print(f"Error:{e}"),)# ==> Will print "Result: 20"Either examplesfrompynctionimportleft,right,EitherLESS_THAN_10_LETTERS=Literal["LESS_THAN_10_LETTERS"]GREATER_THAN_100=Literal["GREATER_THAN_100"]WordTransformationError=Literal[LESS_THAN_10_LETTERS,GREATER_THAN_100]defmake_upper_case_first_n_letters(word:str,number:int)->Either[WordTransformationError,str]:iflen(word)<10:returnleft("LESS_THAN_10_LETTERS")elifnumber>100:returnleft("GREATER_THAN_100")else:returnright(word.upper()[0:number])result=make_upper_case_first_n_letters("example",10)print(result)# ==> Will be Left("LESS_THAN_10_LETTERS")APICheck thedocs
Package: pyndamics3
Pyndamics3An Update of the Python Numerical Dynamics library pyndamicsThis file will become your README and also the index of your documentation.Installpip install pyndamics3How to useSome simple examples.frompyndamics3importSimulationpyndamics3  version  0.0.2sim=Simulation()sim.add("p'=a*p*(1-p/K)",1,plot=True)sim.params(a=1,K=50)sim.run(50)<Figure size 432x288 with 0 Axes>
Package: pyndb
pyndbpyndb, short for Python Node Database, is a pacakge which makes it easy to save data to a file while also providing syntactic convenience. It utilizes a Node structure which allows for easily retrieving nested objects. All data is wrapped inside of a custom Node object, and stored to file as nested dictionaries. It  provides additional capabilities such as autosave, saving a dictionary to file, creating a file if none exists, and more. The original program was developed with  the sole purpose of saving dictionaries to files, and was not released to the public.DocumentationThe documentation is available athttps://pen.jvadair.com/books/pyndb
Package: pyndef
PyNdefPure Python library for creating and parsing NDEF messages.All codes in this repository are referred to AOSP NDEF implementation.FeaturesPure Python implementation (>=3.6)No 3rd party dependencyWith testsSimilar to AOSP NDEF implementationFull type hintUsagepipinstallpyndeffrompyndefimportNdefMessage,NdefRecord,NdefTNF,NdefRTDr1=NdefRecord(NdefTNF.EMPTY,None,None,None)print(r1)r2=NdefRecord(NdefTNF.EXTERNAL_TYPE,b"type",b"\x01",b"\x01\x02\x03")print(r2)r3=NdefRecord.create_uri("https://www.github.com")print(r3)r4=NdefRecord(NdefTNF.WELL_KNOWN,NdefRTD.SMART_POSTER,None,r3.to_bytes())print(r4)msg=NdefMessage(r2,r3)print(msg)msg=NdefMessage.parse(b"\xd8\x00\x00\x00")print(msg)Reference/platform/frameworks/base/nfc/java/android/nfc/NdefRecord.java
/platform/frameworks/base/nfc/java/android/nfc/NdefMessage.java
/cts/tests/tests/ndef/src/android/ndef/cts/NdefTest.javaLicenseCopyright 2024 XFY9326

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
Package: pynder
This is a python client for theTinderAPI.Please see the examples for more information on how to use.You start by instantiating a pynder.Session object with a Facebook ID and
Facebook access token.Once your session is initialized you have the following methods / attributes:import pynder
session = pynder.Session(facebook_id, facebook_auth_token)
session.matches() # get users you have already been matched with
session.update_location(LAT, LON) # updates latitude and longitude for your profile
session.profile  # your profile. If you update its attributes they will be updated on Tinder.
users = session.nearby_users() # returns a list of users nearbyWhen you run nearby_users you will receive a list ofHopefulobjects.
These have the following properties:user = users[0]
user.bio # their biography
user.name # their name
user.photos # a list of photo URLs
user.thumbnail #a list of thumbnails of photo URLS
user.age # their age
user.birth_date # their birth_date
user.ping_time # last online
user.distance_km # distane from you
user.common_connections # friends in common
user.common_interests # likes in common - returns a list of {'name':NAME, 'id':ID}
user.get_photos(width=WIDTH) # a list of photo URLS with either of these widths ["84","172","320","640"]
user.instagram_username # instagram username
user.instagram_photos # a list of instagram photos with these fields for each photo: 'image','link','thumbnail'
user.schools # list of schools
user.jobs # list of jobsYou may runuser.like(),user.superlike()oruser.dislike()on that user.For your list of matches, they will have the same attributes as above except
you can’t dislike or like them. You can, however, see any messages exchanged
(match.messages) or send them a message yourself
(match.message(“Eyyyy gurl”)).Please let me know if you have any questions or bug reports.TestingTo run the tests add atest.inito thepynder/tests/folder with your
facebook auth details:[FacebookAuth]
facebook_id = XXXX
facebook_token = YYYYAnd install the needed test deps:$ pip install vcrpy nose coverageNow we we can run the tests:$ nosetests pynder --with-coverage --cover-package pynderATTENTIONThe recorded request may contain personal data so remove them
before committing.
Package: pyndeval
pyndevalA python interface to TREC'sndeval.c, used for computing diversity retrieval metrics.Getting StartedFrom pip:pipinstallpyndevalOr install from source:gitclonehttps://github.com/seanmacavaney/pyndeval.gitcdpyndeval
pythonsetup.pyinstallUsageimportpyndevalfrompyndevalimportSubtopicQrel,ScoredDoc# provide qrels as a list of tuplesqrels=[SubtopicQrel("0","a","A",1),SubtopicQrel("0","b","B",1),SubtopicQrel("0","b","D",1),SubtopicQrel("0","c","C",1),]# provide run as a list of tuplesrun=[ScoredDoc("0","A",9.3),ScoredDoc("0","D",8.4),ScoredDoc("0","E",8.1),# not in qrelsScoredDoc("0","B",7.6),# C not retrieved]pyndeval.ndeval(qrels,run){'0':{'ERR-IA@5':0.3933,'ERR-IA@10':0.3907,'ERR-IA@20':0.3907,'nERR-IA@5':0.8297,'nERR-IA@10':0.8297,'nERR-IA@20':0.8297,'alpha-DCG@5':0.4052,'alpha-DCG@10':0.3998,'alpha-DCG@20':0.3997,'alpha-nDCG@5':0.7868,'alpha-nDCG@10':0.7868,'alpha-nDCG@20':0.7868,'NRBP':0.3906,'nNRBP':0.8620,'MAP-IA':0.5000,'P-IA@5':0.2000,'P-IA@10':0.1000,'P-IA@20':0.0500,'strec@5':0.6666,'strec@10':0.6666,'strec@20':0.6666}}Supported measurespyndevalsupports the following measures:ERR-IA@knERR-IA@kalpha-DCG@kalpha-nDCG@kP-IA@kstrec@kNRBPnNRBPMAP-IAMeasures with@ksupport values from 1-20 (upper limit fromndeval.c).Measures are provided as a list of strings with themeasures=parameter.pyndeval.ndeval(qrels,run,measures=["ERR-IA@7","MAP-IA"])Reusing qrelsIf you're running multiple times for the same set of qrels and measures, you can speed it up by
building aRelevanceEvaluatorobject, which caches the internal qrel representations.ev=pyndeval.RelevanceEvaluator(qrels)ev.evaluate(run1)ev.evaluate(run2)ev.evaluate(run3)ev.evaluate(run4)Iterable resultsforresultinpyndeval.ndeval_iter(qrels,run):{"query_id":"0",...}forresultinev.evaluate_iter(run):{"query_id":"0",...}
Package: pyndex-fin
pyndex: the python reconstructor for the FTSE Russell US indexes.What is it?pyndex is a Python package developed to reconstruct the Russell US indexes. It is based on the results of the paper:Evidence of Crowding on Russell 3000 Reconstitution EventsMain featuresHere are the main features of pyndex:Reconstruction of Russell U.S. indexes to great accuracyPoint in time control of index constituentsCalendar for Index reconstruction for each year from 1989Where to get itThe source code is currently hosted in the following GitHub repository folder:Binary installers for the latest released version are available at the Python package index.
To install type on your terminal:# PyPIpipinstallpyndex-finCitationPlease use following citation to cite pyndex in scientific publications:Bibtex entry:@misc{aless2020evidence,
    title={Evidence of Crowding on Russell 3000 Reconstitution Events},
    author={Alessandro Micheli and Eyal Neuman},
    year={2020},
    eprint={2006.07456},
    archivePrefix={arXiv},
    primaryClass={q-fin.TR}
}LicenseThe software is distributed under GNU General Public License v3.0.UsageThe package can reconstruct the Russell 1000, 2000 and 3000 index. The index to be reconstructed is passed via the argumentindexas"1000","2000"and"3000", respectively. The oldest year supported is 1989.First, start your connection to the WRDS database.>>>importwrds>>>db=wrds.Connection()Loadinglibrarylist...DoneThen pass your WRDS connection to the package along with the parameters year and index.>>>importpyndexaspx>>>index=px.Index.from_wrds(db,year=2010,index="3000")>>>calendar=px.Index.get_calendar(year=2010)The methodpx.Index.from_wrds()will return a pandas MultiIndex DataFrame containing the index weights identified bypermno,permcoandcusip.
The methodpx.Index.get_calendar()will return the index reconstruction calendar for the corresponding year.One can join a sequence of year in a single DataFrame usingpx.join.>>>index_2010=px.Index.from_wrds(db,year=2010,index="3000")>>>index_2011=px.Index.from_wrds(db,year=2011,index="3000")>>>new_index=px.join([index_2010,index_2011])To check the difference of index constituents between two points in time you can usepx.diffas follows,>>>index_2010=px.Index.from_wrds(db,year=2010,index="3000")>>>slice_1=index_2010["2010-08-20","2010-08-20"]>>>slice_2=index_2010["2010-09-20","2010-09-20"]>>>additions,deletions=px.diff(slice_1,slice_2)The first value contains the index additions from slice_1 to slice_2 while the second one contains the index deletions.
This is particularly useful if one has to find the index addition between two index events, e.g. the annual rebalance and the Q3 quarterly additions.In this case one would use px.diff as follows.>>>index_2010=px.Index.from_wrds(db,year=2010,index="3000")>>>annual_rebalance=index_2010["2010-06-25":"2010-06-25"]>>>q3_rebalance=index_2010["2010-09-17":"2010-09-17"]>>>additions,deletions=px.diff(annual_rebalance,q3_rebalance)Getting HelpFor any usage or installation questions, please get in touch with Alessandro Micheli atam1118@ic.ac.uk.Changelog2-Jul-2020: Debugged duplicated dates in Index time series.
Package: pyndiff
Overviewpyndiff(pronounced pin-diff) easily generates human-readablendiffoutput when comparing 2 Nmap XML scan files.  It is great for determining what ports have open/closed or had their
services change between Nmap scans and presenting it in a visually appealing and consumable way for humans.
Unfortunately, both the diff and XML output fromndiffare unreadable and unusable for a large number of targets with
many changes.pyndiffhas been used to compare two different 40 MB Nmap XML files in 13 seconds!This library is used inScantron, the distributed Nmap / masscan scanning
framework, to email out Nmap scan diffs (coming soon!).pyndiffis developed and maintained by@opsdiskas part of Rackspace's Threat and
Vulnerability Analysis team.What is ndiff?https://nmap.org/book/ndiff-man.htmlNdiff is a tool to aid in the comparison of Nmap scans. It takes two Nmap XML output files and prints the differences
between them. The differences observed are:

* Host states (e.g. up to down)
* Port states (e.g. open to closed)
* Service versions (from -sV)
* OS matches (from -O)
* Script output

Ndiff, like the standard diff utility, compares two scans at a time.InstallationUsing pip:pipinstallpyndiffFrom GitHub:gitclonehttps://github.com/rackerlabs/pyndiff.gitcdpyndiff
virtualenv-ppython3.6.venv# If using a virtual environment.source.venv/bin/activate# If using a virtual environment.pythonsetup.pyinstallNotesSee Nmap'sPR-1807for a Python3 compatiblendiff.
UntilPR-1807is merged into master, the individual ndiff.py found below is
used:https://github.com/nmap/nmap/pull/1807/files#diff-876b1aeeb590be439b50702351985b633655e89e78f6b520f321ce84076c6b32with one slight modification.  Line 1208 is commented out to ignore script output when comparing scans.  Seehttps://github.com/rackerlabs/pyndiff/issues/3for more information."state":self._start_state,"service":self._start_service,# "script": self._start_script,"osmatch":self._start_osmatch,"finished":self._start_finished,}Helpful Options--uof- Optionally ignore UDP "open|filtered" port state changes because they aren't definitive.-d- Stop processing after every diff to validate results only when the-vswitch is used.-v- Print verbose data for troubleshooting. Helpful when used in with-dRun as scriptHuman readableGenerate a human-readable overview of the changes.pyndiff-f1test-scans/random-1.xml-f2test-scans/random-2.xmlClassic text outputClassicndiff --textoutput, not human-readable for large scans.pyndiff-f1test-scans/random-1.xml-f2test-scans/random-2.xml-ttxtpyndiff as a moduleimportpyndiff# XMLdiff=pyndiff.generate_diff("test-scans/random-1.xml","test-scans/random-2.xml",ignore_udp_open_filtered=False)print(diff)# TXTdiff=pyndiff.generate_diff("test-scans/random-1.xml","test-scans/random-2.xml",ignore_udp_open_filtered=False,output_type="txt")print(diff)test-scans directoryThetest-scansdirectory contains the same test scans found in Nmap's repo found here:https://github.com/nmap/nmap/tree/master/ndiff/test-scansSupportThis code is supplied as-is and you should not expect to receive support for it.  Use it at your own risk.LicenseLicense is Apache License Version 2.0.
Package: pyndl
pyndlis an implementation of Naive Discriminative Learning in Python. It was
created to analyse huge amounts of text file corpora. Especially, it allows to
efficiently apply the Rescorla-Wagner learning rule to these corpora.InstallationThe easiest way to installpyndlis usingpip:pipinstall--userpyndlFor more information have a look at theInstallation Guide.Documentationpyndlusessphinxto create a documentation manual. The documentation is
hosted onRead the Docs.Getting involvedThepyndlproject welcomes help in the following ways:Making Pull Requests forcode,testsordocumentation.Commenting onopen issuesandpull requests.Helping to answerquestions in the issue section.Creating feature requests or adding bug reports in theissue section.For more information on how to contribute topyndlhave a look at thedevelopment section.Authors and Contributerspyndlwas mainly developed byKonstantin Sering,Marc Weitz,David-Elias Künstle,Elnaz Shafaei BajestanandLennart Schneider. For the full list of
contributers have a look atGithub’s Contributor summary.Currently, it is maintained byKonstantin SeringandMarc Weitz.Fundingpyndlwas partially funded by the Humboldt grant, the ERC advanced grant (no.
742545) and by the University of Tübingen.AcknowledgementsThis package is build as a python replacement for the R ndl2 package. Some
ideas on how to build the API and how to efficiently run the Rescorla Wagner
iterative learning on large text corpora are inspired by the way the ndl2
package solves this problems. The ndl2 package is available on Githubhere.
Package: pyndler
pyndlerDescriptionPyndler is a lightweight tool for bundling a pyz file in an exe file. If an executable is deployed, it can also be useful
to set an executable icon or additional metadata (product name, company name, versions, ...).Python projects must be bundled usingshiv,zipappor any other pyz-like packaging tool, before they can be bundled as .exe files using Pyndler.How does it work?Pyndler uses the fantastic python distlib launcher mentioned inPEP 397.First, the pylauncher is copied to the target path. Then the pyz file is appended to the launcher. Afterwards, an additional icon or metadata is set usingrcedit- a great project usually used for branding electron project.UsageInstall the latest pyndler release using pip:pip install pyndlerRun pyndler:pyndler <SOURCE>
    -c, --config VALUE:ExistingFile      Path to config file for setting additional metadata
    --gui                                Set to true, if source is a GUI application
    -i, --icon VALUE:ExistingFile        Path to exe icon
    --refresh                            Refresh Windows icon cache after building
    -t, --target VALUE:ExistingFile      Path to output file. If not set, the source path is takenExample call:pyndler example.pyz --icon icon.ico --config app.cfgThe metadata config file must be written using INI-like syntax with keys listedhere, grouped in aVERSIONINFOsection like:[VERSIONINFO]
<key>=<value>
Package: pyndodax
pyndodaxAn unofficial Python wrapper for indodax.com API with support for async i/oOriginal API documentationPublic APIIndodax provides 4 public endpoint that can be accessed by the public. This library will provide those 4 endpoints in thepyndodax.publicmodule, which consisted of:Get current price of all markets (aio_get_all_tickers())Get current price of a given market (aio_get_ticker(pair))Get last few trade history of a given market (aio_get_trades(pair))Get bids and asks of a given market (aio_get_depth(pair))You can describe a trade pair withPair, custom enum type that can be accessed atpyndodax.pair. If you want to pick a currency that is traded against IDR, just refer it with the currency symbol, all uppercase. For BTC traded currencies, add_BTCas a postfix. e.g.:btc-idr isPair.BTCbat-idr isPair.BATeth-btc isPair.ETH_BTCetc.Private APITBAWant to add something?You can clone this repo and setup a dev environment by running these commandspython setup.py install
pip install -e .[dev]Code something and create a pull request!