Saravanan666/pypi-org huggingface dataset:
Package: pandelyon-theonesdk
adyates-SDKSample SDK against The One Ring API.  Developed with (and requires) Python3.Using the SDKKeysYou will need have an API key fromThe One API.Environment VariablesNameRequiredPurposeTOR_ONEAPIKEYYesTo make authenticated requests against the The One APITOR_BASEURINo (Default:https://the-one-api.dev/v2)Base URL for all issued API requestsInstallationInstall from PyPI using the following commandpython -m pip install pandelyon-theonesdkOr whatever package manager you choose to use.To use the SDK, import as follows:import torQueryingSuccessful results are returned as a list of dicts with the direct API values along with meta information about
the query, useful for pagination (if needed).## Fetching the list of Lord of the Rings movies
movies = tor.Movies().get()

movies.results  # [{"_id": "5cd95395de30eff6ebccde5b","name": "The Two Towers", ...]
movies.meta     # {"total": 8, "limit": 1000, "offset": 0, "page": 1, "pages": 1}


## Fetching only The Two Towers

two_towers = tor.Movies("5cd95395de30eff6ebccde5b")

## Fetching quotes from The Two Towers
two_towers = tor.Movies(
    "5cd95395de30eff6ebccde5b",
    quotes=True
).get()

## ...in a specific order
two_towers = tor.Movies(
    "5cd95395de30eff6ebccde5b",
    quotes=True,
    sortby="character:asc"  # Or "character:desc"
).get()

## Paging through quotes from The Two Towers

#### Using offsets
two_towers = tor.Movies(
    "5cd95395de30eff6ebccde5b",
    quotes=True,
    pagination={"limit": 10, "offset": 30}
).get()

#### .. Or by page
two_towers = tor.Movies(
    "5cd95395de30eff6ebccde5b",
    quotes=True,
    pagination={"limit": 10, "page": 4}
).get()

## Filtering the results (But see the Notes below)

two_towers = tor.Movies(
    "5cd95395de30eff6ebccde5b",
    quotes=True,
    filters=[
        "character!=5cd99d4bde30eff6ebccfc15",
        "dialog=/Dwarf/"
    ]
).get()ExceptionsWhen executing a query, the following exceptions may occur prior torequestsmaking the query:RuntimeError: If the SDK environment variables (e.g. the API Key) are not properly setrequests.RequestError: If the parameters for any request are incorrectly formedAny other errors thrown byrequests.get()will be passed to the user.Notes about the behavior of API itselfWhen building a paginated query,offsetandpagecannot be used at the same time.  If both are present, theoffsetparameter will take priority overpage.Although the filtering API will work on other queries,/moviesseems to ignore them (e.g. Attempting to regex quotes only containing Dwarf or to a specific character will not work). This isn't apparent in this SDK but is more obvious when performing the same examples on/character.Contributing and DevelopmentDevelopment is done withpoetry.Install with test dependecies included:poetry install --with testRun tests withpoe:poe testBy default, test coverage results are located in two places:Human-readablehtmlcov/index.htmlMachine-interpretabletest-reports/coverage.xml
Package: pandemic
PandemicAn agent model in which commuting, compliance, testing and contagion parameters drive
infection in a population of thousands of millions. Agents follow Ornstein-Uhlenbeck processes
in the plane and collisions drive transmission. Results are stored atSwarmPrediction.comfor further analysis, and can be retrieved by anyone.MotivatonCovered in thispostwith
the followupherewhere possible
improvements are also discussed and acknowledgements are made. See also the SwarmPrediction.Comlist of articles. The author is not an epidemiologist. The model expresses no opinions
on the health aspects of COVID-19. The model offers a novel motion model with some interesting
analytic properties also discussed in thearticlereferenced
above and presented in a more technicalworking papershared on Overleaf.Basic Usagepip install pandemic
>> from pandemic import run
>> run()See alsoexamplesof
library use andexamples of using the public
database of simulationsgenerated by this model.Other entry points.pandemic.simulation.simulate is the main routinepandemic.client offers an alternative in object oriented styleModifyingSee pandemic/client.py for examples of extending the newer style to include data storage, lockdown and so forth.DockerPandemic can be run in a docker container.docker run xtellurian/pandemicCrowd-sourced surrogate modelSeeSwarmPrediction.comfor an explanation of
a SETI-like project to crowd-source a surrogate model.Basic elements of the modelCovered in detail in thisarticle. As noted some analytical properties of
special cases of the model are discussed in aworking paper.ContributingOpinions and issues are most welcome.
Package: pandera-tool
Pandera-ToolPandera-Tool is a package forpandera.DataFrame type definitionValidationType coerceInstallationpip install pandera-toolExampleDataFrame type definitionfromioimportStringIOfromtypingimportTupleimportpandasaspdfrompanderaimportField,SchemaModelfrompandera.errorsimportSchemaErrorfrompandera.typingimportSeriesfrompandera_toolimportcheck_annotations,dtype,to_dataframe,to_schema@to_dataframeclassDataFrameIn(SchemaModel):Name:Series[str]=Field()classConfig:strict=True@to_dataframeclassDataFrameOut(to_schema(DataFrameIn)):Age:Series[int]=Field()classConfig:strict=TrueValidation@check_annotationsdeffunc_ok(df:DataFrameIn)->DataFrameOut:returndf.assign(Age=2)@check_annotationsdeffunc_err(df:DataFrameIn)->DataFrameOut:returndf.assign(Age="")@check_annotationsdeffunc_err_output_tuple(df:DataFrameIn)->Tuple[DataFrameOut]:return(df.assign(Age=""),)df_ok=pd.DataFrame({"Name":["1"]})df_ng=pd.DataFrame({"Name":[1]})func_ok(df_ok)# OKtry:func_ok(df_ng)# Input errorexceptSchemaErrorase:print(e)try:func_err(df_ok)# Output errorexceptSchemaErrorase:print(e)try:func_err_output_tuple(df_ok)# Output errorexceptSchemaErrorase:print(e)Type coercedf1=pd.read_csv(StringIO("Name\n1"))try:func_ok(df1)# Input errorexceptSchemaErrorase:print(e)df2=pd.read_csv(StringIO("Name\n1"),dtype=dtype(DataFrameIn))func_ok(df2)# OKdf3=df_ng.astype(dtype(DataFrameIn))func_ok(df3)# OK
Package: pandex
pandex - An Extension Framework for pandaspandexis a framework for creating, managing and sharing extensions
for thepandaspackage.There is a built-in extension system inpandasbut it is not
straightforward to share these between projects, virtual environments,
other users on the same server or indeed, the wider world.pandexallows extensions to be installed from local files, directories
or directly from public GitHub repositories.  Once installed, they persist
for a user across multiple virtual environments.Any existing script can be upgraded to support extensions with a single
line change. Simply replace:import pandas as pdwith:import pandex as pdand all dataframes created frompdwill be able to access installed extensions.An demo extension which calculates the circumference and area of circles from a
column of radius values can be installed:pd.ext.import_extension('github:connectedblue/pdext_collection -> circle_calculations')Whenever these calculations are required for a dataframedfwhich contains
a columnradius, the extension can be called:df.ext.circle_calculations()To see the currently installed extensions:pd.ext.show_extensions()Fulldocumentation can be found here
Package: pandiet
pandietA library to reduce memory consumption of Pandas DataframesInstallationpipinstallpandietUsageimportpandasaspdfrompandietimportReducer# supported from v0.1.2# from pandiet.core import Reducerdf=pd.read_csv('https://raw.githubusercontent.com/bundgus/pydata2parquet/master/Most-Recent-Cohorts-Scorecard-Elements.csv')df_reduced=Reducer().reduce(df,verbose=True)
Package: pandiglou
LinvPy is a Python package designed for solving linear inverse problems of the form y=Ax+n, where y is a vector of measured values, A a known matrix, x an unknown input vector and n is noise. The goal is to find x, or at least the best possible estimation; if the matrix A is invertible, the solution is easy to find by multiplying by the inverse, if not, we need to use regression techniques such as least squares method to find x. The first motivation for this project is that Marta Martinez-Camara, PhD student in Communications Systems at EPFL (Switzerland) desgined some new algorithms for solving linear inverse problems, and this package is a Python implementation of these algorithms, which may not be available anywhere else than here. LinvPy also contains several other known and available techniques such as least squares regression, regularization functions, loss functions or M-estimators which you can also find in the famous Numpy or Scipy packages.To install from pip, simply run :
$ pip install linvpyPyPi link :https://pypi.python.org/pypi/linvpyReadTheDocs link :http://linvpy.readthedocs.org/en/latest/
Package: pandit
pandit ☸️ pandas utilsPandas with some cool additional featuresInstallation and usagepip install panditimportpandasaspd,importpandit# orimportpanditaspddf=pd.read_tsv(path)df.sieve(x=3).show()#Pandas behaves normally otherwiseIf credentials are needed:importcredentials# you manage that partassertcredentials.gsheet# credential dict in https://docs.gspread.org/en/latest/oauth2.htmlassertcredentials.dropboxpd.credentials=credentialssievedf.sieve(column1=value1,columns2=value2)# returns df rows where column equals value - if value is not a list, otherwise:df.sieve(column3=[value1,value2])# returns df rows where column is value1 or value2; use [[value1,value2]] to match lists# It's like pd.query but with a pythonic syntax instead of the sql string.showdf.show()# shows multiple rows column by column (one line per column) with nice formatting, one line per column# ideal for inspecting NLP datasetsdf.rshow(n)# random sample of size n (default is 20)Also:df.bold_max()bold max float valuesdf.bold_max().to_latex()pd.read_tsvread_csvwithsep='\t'for lazy personspd.read_jsonlpd.readdf.read_{extension}where extension is extracted from the input path (.csv = read_csv)pd.read_wandb(project_name)df.drop_constant_columndrop columns that are constantdf.to_dropbox(path, format=None, token=None,**kwargs)Save dataframe to dropboxdf.to_sheets(id,sheet_name,credential=None, include_index=False)Save dataframe to sheetsdf.undersample(column='label',sampling_strategy='auto',random_state=None,replacement=False)
Package: pandleau
pandleauA quick and easy way to convert a Pandas DataFrame to a Tableau .tde or .hyper extract.Getting StartedPrerequisitesIf you want to output as a .tde format, you'll need to install TableauSDK directly from Tableau's sitehere.If you want to output as a .hyper format, you'll need to install Extract API 2.0 directly from Tableau's sitehere.Although Tableau's site claims Python 3 is not supported, this module is tested to work fully functional on Python 3.6.InstallingOnce installing TableauSDK is done, download this repository, navigate to your downloads file and run the following in cmd or terminal:python-msetup.pyinstallYou can also install pandleau using pip:pipinstallpandleauBut note that this will throw a warning to install tableausdk using the above link in Prerequisites.ExampleI grabbed the following Brazil flights data off of kaggle for this example:https://www.kaggle.com/microtang/exploring-brazil-flights-data/data.importpandasaspdfrompandleauimport*# Import the dataexample_df=pd.read_csv(r'example/BrFlights2.csv',encoding='iso-8859-1')# Format dates in pandasexample_df['Partida.Prevista']=pd.to_datetime(example_df['Partida.Prevista'],format='%Y-%m-%d')example_df['Partida.Real']=pd.to_datetime(example_df['Partida.Real'],format='%Y-%m-%d')example_df['Chegada.Prevista']=pd.to_datetime(example_df['Chegada.Prevista'],format='%Y-%m-%d')example_df['Chegada.Real']=pd.to_datetime(example_df['Chegada.Real'],format='%Y-%m-%d')# Set up a spatial columnexample_df.loc[:,'SpatialDest']=example_df['LongDest'].apply(lambdax:"POINT ("+str(round(x,6)))+\example_df['LatDest'].apply(lambdax:" "+str(round(x,6))+")")# Change to pandleau objectdf_tableau=pandleau(example_df)# Define spatial columndf_tableau.set_spatial('SpatialDest',indicator=True)# Write .tde or .hyper Extract!df_tableau.to_tableau('test.hyper',add_index=False)Tableau Server/Online AutomationEric Chan (erickhchan) wrote a really cool blog post on using Python to blend and clean data before pushing it to Tableau Online (which is a SaaS version of Tableau Server). This is a great way to learn how to automate the data refresh process with Tableau Server Client and Pandleau. Check out his blog post here:https://www.erickhchan.com/data/2019/03/18/python-tableau-server.htmlAuthorsBenjamin Wiley-jamin4lyfeZhirui(Jerry) Wang-zhiruiwangAaron Wiegel-aawiegelPointy Shiny Burning-PointyShinyBurningHarrison-harrison-hRelated ProjectRTableauConvert R data.frame to Tableau Extract using pandleauLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: pando
Pando is a Python web framework. Simplates are the main attraction.Installation, Testing, and Licensepandois available onGitHuband onPyPI:$ pip install pandoWe test against 64-bit Python 2.7 on Linux:And we test against 32- and 64-bit Python 2.7 on Windows:pandois MIT-licensed.Documentation and further informationon the mainsite:http://aspen.io/
Package: pandoc
Pandoc – 🐍 Python Library🚀 Getting startedPandoc– the general markup converter (and Haskell library) written byJohn MacFarlane– needs to be available.
You may follow the officialinstallation instructionsor useconda:$ conda install -c conda-forge pandocThen, install the latest stable version of the pandoc Python library with pip:$ pip install --upgrade pandoc🌌 OverviewThis project bringsPandoc's data model for markdown documents to Python:$ echo "Hello world!" | python -m pandoc read 
Pandoc(Meta({}), [Para([Str('Hello'), Space(), Str('world!')])])It can be used to analyze, create and transform documents, in Python :>>> import pandoc
>>> text = "Hello world!"
>>> doc = pandoc.read(text)
>>> doc
Pandoc(Meta({}), [Para([Str('Hello'), Space(), Str('world!')])])

>>> paragraph = doc[1][0]
>>> paragraph
Para([Str('Hello'), Space(), Str('world!')])
>>> from pandoc.types import Str
>>> paragraph[0][2] = Str('Python!')
>>> text = pandoc.write(doc)
>>> print(text)
Hello Python!For more information, refer to the📖 documentation.
Package: pandoc4ssg
Using Pandoc with Static Site GeneratorsThis library aims to make it easy to write posts inPandoc's Markdownand build them to static sites with ANY Static Site Generators (SSG) you want. After specifying the directory structure (pandoc4ssg.DirStruct) of your static site (depends on the SSG you used) and options for compiling posts (pandoc4ssg.PostHandler),pandoc4ssgbuilds the site for you.HugoBelow is an example that builds markdown files located inpandoc_posts/into aHugosite. Seepandoc4ssg-examplefor details.importpandoc4ssgdir_struct=pandoc4ssg.DirStruct(tgt_dir_html="content/post",tgt_dir_tex="public/tex",pandoc_post_dir="pandoc_posts",static_tgt=None,public="public")post_handler=pandoc4ssg.PostHandler(meta_keep=["title","subtitle","author","date","categories","tags"],meta_new=[("new_field",True)],use_toml=False,output_exts=".html",output_dir=True,pandoc_html_extra_args=['--citeproc'],dir_struct=dir_struct)pandoc4ssg.build(ssg_cmd="hugo -D",post_handler=post_handler)
Package: pandoc-attrs
pandoc-attrsThis is a simple parser / emitter for pandoc block attributes,
intended for use withpandocfilters.It can read and write attributes in any of these formats:
- markdown
- html
- dictionary
- pandocInstallation:pip install pandoc-attrsUsage:frompandocattrsimportPandocAttributesattrs='#id .class1 .class2 key=value'attributes=PandocAttributes(attrs,format='markdown')attributes.to_markdown()>>>'{#id .class1 .class2 key=value}'attributes.to_dict()>>>{'id':'id','classes':['class1','class2'],'key'='value'}attributes.to_html()>>>id="id"class="class1 class2"key='value'attributes.to_pandoc()>>>['id',['class1','class2'],[['key','value']]]attributes.id>>>'id'attributes.classes>>>['class1','class2']attributes.kvs>>>OrderedDict([('key','value')])
Package: pandoc-beamer-arrow
Installationpandoc-beamer-arrowis apandocfilter for creating arrows between text
elements for beamer presentation.Instructionspandoc-beamer-arrowrequirespython, a programming language that comes pre-installed on linux and Mac OS X, and which is easily installedon Windows.Installpandoc-beamer-arrowusing the bash command$pipxinstallpandoc-beamer-arrowTo upgrade to the most recent release, use$pipxupgradepandoc-beamer-arrowpipxis a script to install and run python applications in isolated environments from the Python Package Index,PyPI. It can be installed using instructions givenhere.Make sure you have thexcolorLaTeX packages. On linux you have to install some extra librariesbeforepandoc-beamer-arrow. On a Debian-based system (including Ubuntu), you can install it as root using$sudoapt-gettexlive-latex-extraGetting HelpIf you have any difficulties with pandoc-beamer-arrow, please feel welcome tofile an issueon github so that we can help.Notesformat icon byPicollicense icon byIcooon Monodownload icon byzeststatus icon byJust Iconcode style icon byGoogle Material Design iconssize icon byIconscout
Package: pandoc-beamer-block
Installationpandoc-beamer-blockis apandocfilter for adding beamer block todivs.Instructionspandoc-beamer-blockrequirespython, a programming language that comes pre-installed on linux and Mac OS X, and which is easily installedon Windows.Installpandoc-beamer-blockusing the bash command$pipxinstallpandoc-beamer-blockTo upgrade to the most recent release, use$pipxupgradepandoc-beamer-blockpipxis a script to install and run python applications in isolated environments from the Python Package Index,PyPI. It can be installed using instructions givenhere.Getting HelpIf you have any difficulties with pandoc-beamer-block, please feel welcome tofile an issueon github so that we can help.Notesformat icon byPicollicense icon byIcooon Monodownload icon byzeststatus icon byJust Iconcode style icon byGoogle Material Design iconssize icon byIconscout
Package: pandoc-beamer-multigraphics
Installationpandoc-beamer-multigraphicsis apandocfilter for adding beamer ability to use multi-images.Instructionspandoc-beamer-multigraphicsrequirespython, a programming language that comes pre-installed on linux and Mac OS X, and which is easily installedon Windows.Installpandoc-beamer-multigraphicsusing the bash command$pipxinstallpandoc-beamer-multigraphicsTo upgrade to the most recent release, use$pipxupgradepandoc-beamer-multigraphicspipxis a script to install and run python applications in isolated environments from the Python Package Index,PyPI. It can be installed using instructions givenhere.Getting HelpIf you have any difficulties with pandoc-beamer-multigraphics, please feel welcome tofile an issueon github so that we can help.Notesformat icon byPicollicense icon byIcooon Monodownload icon byzeststatus icon byJust Iconcode style icon byGoogle Material Design iconssize icon byIconscout
Package: pandoc-beamer-notes
Warning: This package only exists for legacy reasons, do not use it anymore!Instead, use pandoc’s built-in mechanism for note slides:# My frame<div class="notes">My**Notes**:-Don't use any filters, unless they are useful!-This is all still in*pandoc*</div># My next Frame ...And compile withpandoc-tbeamer-Vclassoption=notes...Thanks toNorman Markgrafto make me aware of this and providing the simple
example above.For more information check outshoeffner/pandoc-beamer-notes#3.Legacy usagepandoc-beamer-notesis apanflutepandocfilter.
It allows to use markdown in LaTeX notes.Thus something like the following will be rendered nicely:\note{**this is bold**}\note{*a list*is also possible}See theexamplefor a simple presentation containing notes.Remember to compile your documents with the notes enabled for beamer:pandoc-tbeamer-Vclassoption=notes...InstallationJust use pip to install it frompypi.pipinstallpandoc-beamer-notes
Package: pandoc-code-attribute
Pandoc filter to add attributes to code blocks based on their classes.InstallationFirst install python and python-pip.Then use pip to install:pip3 install --user pandoc-code-attributeUsageConfigurationBy default, this filter won’t add style attributes to prevent undefined
errors.You can enable it by settingcode-attributefield in metadata.To add attributes to all classes, use:code-attribute: trueTo add attributes to specific classes, use:code-attribute:
    - cppExampleThis pandoc filter will add attributes to code blocks based on their
classes.For example, it can be very useful to use different styles for different
language inlistings:---
code-attribute:
    - cpp
    - python
header-includes: |
    \usepackage{listings}
    \usepackage[usenames,dvipsnames]{color}

    \lstset{ % General settings
        numbers=left,
        numberstyle=\tiny
    }

    \lstdefinestyle{cpp}{ % Only for C++
        keywordstyle=\color{Green}
    }

    \lstdefinestyle{python}{ % Only for Python
        keywordstyle=\color{Magenta}
    }
---

C++:

```cpp
int main(int argc, char *argv[])
{
    return 0;
}
```

Python:

```python
def main():
    print('Hello')

if __name__ == '__main__':
    main()
```Then compile the example (--listingsis needed only for this
example):pandoc input.md --filter pandoc-code-attribute --listings -o output.pdfResults:CommandIn general, to use this filter, just add this filter to pandoc command:pandoc input.md --filter pandoc-code-attribute -o output.pdfLicenseMIT License
Package: pandoc-codeblock-include
Installationpandoc-codeblock-includeis apandocfilter for including files inCodeBlockelements.Instructionspandoc-codeblock-includerequirespython, a programming language that comes pre-installed on linux and Mac OS X, and which is easily installedon Windows.Installpandoc-codeblock-includeusing the bash command$pipxinstallpandoc-codeblock-includeTo upgrade to the most recent release, use$pipxupgradepandoc-codeblock-includepipxis a script to install and run python applications in isolated environments from the Python Package Index,PyPI. It can be installed using instructions givenhere.Getting HelpIf you have any difficulties withpandoc-codeblock-include, please feel welcome tofile an issueon github so that we can help.Notesformat icon byPicollicense icon byIcooon Monodownload icon byzeststatus icon byJust Iconcode style icon byGoogle Material Design iconssize icon byIconscout
Package: pandoc-cover
pandoc-coverAdd a cover to a pdf document using an SVG template and the pandoc metadata.ExampleCreate a SVG template calledfoo.svg. Write{{ title }}in place of the title and{{ whatever }}in place of whatever information you want to display on
the cover (seetemplates/sample_front.j2.svgfor an example).Addtitleandwhatevervariables in yourbar.mddocumenttitle:'HelloWorld!'whatever:'Thisissosimple'pandoc-cover:front:'path/to/foo.svg'Launch pandoc with the pandoc_cover filter.pandoc --filter=pandoc-cover bar.md -o bar.pdfInstallpip install pandoc-cover
Package: pandoc-docx-helper
pandoc-docx-pagebreak-pyPandoc filter to insert page break or table-of-contents in docx fileinstallpip3installgit+https://github.com/pmamico/pandoc-docx-helper.gitUsageAdd\newpagewhere preferred to insert a page breakExpecting to work like native pandoc behavior for latex outputAdd\tocwhere preferred to insert TOC(Table of Contents)unable to use with--tocotherwise TOC appears on head of document also# Try the filter with this file like this:pandoc-fmarkdown-tdocx-odocx.docx--filter=pandoc-docx-pagebreakpyREADME.mdSampleTable of contents appears after this line

\toc

Contents before pagebreak

\newpage

Contents after_Page Break_Table of contents appears after this line\tocContents before pagebreak\newpageContents afterPage Break