Saravanan666/pypi-org huggingface dataset:
Package: pfsense-git-config
pfSense Git ConfigImport pfSense config changes into a git repo.This gives you a record of individual config updates, and allows you to browse
the changes easily.NOTE:Your pfSense config data is sensitive - it will contain hashed
passwords and information about the networks served by your firewall. I would
only keep this on a private git server and with access restrictions on the
repo as well.Current VersionVersion:1.0.0UsageUsage:pfsense_git_config[OPTIONS]Read pfSense configation changes, add them to a Git repo of config changesReads the current pfsense configuration file (in/conf/config.xmlby default),
and the configuration backups (in/conf/backup/config-<timestamp>.xmlby
default) to contruct a set of timestamp config snapshots. All of these that are
more recent than the last timestamp in the git repo are written into the git
repo, with their timestamps, in cronological order as one commit per config
change. The revision description is used as the commit message.If--pullis specified (set by default), the git repo is pulled at the start
of the process. If--pushis specificed (set by default), the git repo is
pushed to origin at the end of the process even if no updates are made.Remember that your pfsense configs should not be publically visible as they
contain sensitive information about your network including hashed passwords
stored within pfSense.Options--version- Report version--config- Configuration file[env var: PGC_CONFIG]Default
.pfsense_git_config--verbose/--no-verbose- Output verbose information.--pull/--no-pull- Pull the git repo before updating (set by default)--push/--no-push- Push the git repo at the end (set by default)--config-dir- Directory with pfSense configurations[env var: PGC_PFSENSE_CONFIG_DIR]Default/conf--git-dir- Location of the git repo the pfSense config updates are to be
stored in[env var: PGC_GIT_DIR]Default~/pfsense_configInstallation and SetupCreate a user account (with ssh access)Ensure that the Cron additional package is installed (required to run the
checks regularly)Ensure that python and git are installed (this needs a root login session to
use pkg install)Logged in to your user account:-create a python venv -python3.11 -m venv venvactivate it -source venv/bin/activate.cshinstall the package -pip install --update pfsense_git_configcreate/clone a git repo in~/pfsense_configto put the configs into. The
git repo should have a remote elsewhere - I use a local gitea instance.
There should be a local ssh key or other authentication mechanism that
allows push/pull to the remote.runpfsense_git_configadd an invocation script - such asrun_pfsense_git_config.shform this
reposet up cron to run this regularly - say once or twice a day
Package: pfse_starterkit
pfse_starterkitA Python package that installs all required packages for the StructuralPython Python for Structural Engineers (pfse) course.This installs the following packages:streamlitnumpypandasopenpyxllxmlsympyshapelyvtkmatplotlibplotlysectionpropertiesconcretepropertiesPyNiteFEApycbascipyhandcalcsforallpeoplepytestipytestrichtqdmpapermodelsxlwingsblackjupyterlabIPythonipywidgetsipykerneljupyterlab-katexjupyterlab-mathjax3 (as an option)nbconvertpypercliptypermagicgui[pyside2]flit
Package: pfshelper
Packaging (temp notes)Writingpyproject.tomlspecifyingdependenciesNow run this command from the same directory where pyproject.toml is located:python3 -m buildTo upload:python3 -m twine upload dist/*Developing.devcontainerfolder is provided for convenience.TODOFor better documentationadd a figure like this:https://www.researchgate.net/publication/327905081_Relative_Importance_of_Climatic_and_Anthropogenic_Drivers_on_the_Dynamics_of_Aboveground_Biomass_across_Agro-Ecological_Zones_on_the_Mongolian_Plateau/figures?lo=1link something like this:https://towardsdatascience.com/a-guide-to-panel-data-regression-theoretics-and-implementation-with-python-4c84c5055cf8
Package: pf-simulation-modeler
Parflow Simulation ModelerLicenseFree software: Apache Software LicenseInstallingCreate virtual environmentpython-mvenv.venvsource.venv/bin/activateBuild and install the Vue componentsexportNODE_OPTIONS=--openssl-legacy-providercdvue-components
npmi
npmrunbuildcd-Install the applicationpipinstall-e.Run the applicationpf-simulation-modeler--help
pf-simulation-modeler--server--port1234-Ddata/database/-Sdata/share/-Odata/output/DocumentationEngineStructureSnippetsUIStructureServerstateandctrlvariablesFile Structure-pf_simulation_modeler/-app/-engine/-model/# Simput model/UI definitions-snippets/# Logic for page code snippets-engine.py# Main logic handler-...# Logic components (generally specific to pages)-ui/-ui.py# Main UI handler-...# UI components (pages)-main.py# Entry point-module/# Serves the compiled Vue components-widgets/# Python wrapper around the Vue components-vue-components/src/components/# Custom Vue components-FileDatabase/# FileDatabase Vue component-index.vue# Vue component-script.js# JS logic-template.html# HTML template-...# Other Vue components-data/# Data files (used for cli args)-database/# FileDatabase data-output/# Project Output data-share/# Shared data
Package: pfsspy
Potential Field Source Surface model package for Python. This package is based on original code by Anthony Yeates, which can be found athttps://github.com/antyeates1983/pfss.DocumentationFull documentation for the package can be found athttps://pfsspy.readthedocs.ioCode of conductThis is a community package, which has adopted the SunPy code of conduct. Please follow thecode of conductwhen interacting with others within the pfsspy community.
Package: pfstools
pfs-data-toolsHelper functions for using Python & Pandas. fairly specific to our work environment: Windows network, data on multiple SQL Server instances.Using dotenvPlacing a .env file in your project folder will let you specify environment variables.
This module looks specifically for "sql_server" and "sql_db" to specify default values for server & dbexamplesTODO: code examples.running testsTODO: tests
Package: pft
Principal Fourier Transformation (PFT)An implementationA complete overhaul ofhttps://github.com/eloquentarduino/principal-fftfor pytorch.Extracts the principal Fourier Transform Components.
That is, for a set of signal data, PFT will extract the top N components for the whole dataset.TL;DR: Principal Component Analysis (PCA) for Fourier Space.InstallationWith pip...pip install pftUsage# Lets say you've a dataset of transient signal data# For now, lets construct our own dataset with a single signal.# The signal will be a composite of many sine functionsnum_steps=100# Number of temporal stepsnum_coefs=100# Number of sine functions that make up our composite signalcoefs=torch.rand(num_coefs)*torch.linspace(0,1,num_steps)freqs=torch.rand(num_coefs)*2*torch.pi# Don't forgot the leading dimension!# pft expects the data to have the shape (num_of_data_samples, num_of_time_steps)signal=torch.zeros((1,num_steps))fori,coefinenumerate(coefs):signal+=coef*torch.sin(freqs[i]*t)# Now lets extract 10 prinicipal Fourier coefficientsimportpftnum_pfc=10# Number of principal Fourier coefficientspfa=pft.PFT(# pfa = Principal Fourier Analysisnum_pfc,use_torch=True,# Change to False to use numpy backend. Default is True.norm="ortho",# Forward and Inverse Foureir Transform normalisation. Defaults to "ortho".)pfa.fit(signal)# Calculates the prinicipal Fourier coefficients indexes.pfc=pfa.transform(signal)# Gets the principal Fourier coefficients for this set of signals.# The indexes of the prinicipal Fourier coefficients are stored internally.# To get from the principal Fourier coefficients back to the transient signal# do the following:reconstructed_signal=pfa.ifit(pfc)
Package: pftk
# pftkPython Finance Toolkit [![PyPI version](https://badge.fury.io/py/QSTK.png)](http://badge.fury.io/py/QSTK)## Website & Documentation[https://charlesg.github.io/pftk/](https://charlesg.github.io/pftk/)## Source Repository[https://github.com/charlesg/pftk](https://github.com/charlesg/pftk.git)## Dependenciesnumpy >= 1.6.1,scipy >= 0.9.0,matplotlib >= 1.1.0,pandas >= 0.7.3,python-dateutil >= 1.5,cvxopt >= 1.1.3,scikit-learn >= 0.11### Vagrant ImageVagrant image with QSTK installed can be found at [https://github.com/Wesseldr/vagrant-QSTK](https://github.com/Wesseldr/vagrant-QSTK)## AuthorCharles Gagnon - charlesg at unixrealm.com -https://www.unixrealm.com### Original Authors[Prof. Tucker Balch](http://www.cc.gatech.edu/~tucker/)[Sourabh Bajaj](http://www.sourabhbajaj.com/)[John Cornwell](https://github.com/JWCornV)Python Finance Toolkit is a fork from QSTK from Professor Tucker Balch. Initial QSTK code at:Website & Documentation [wiki.quantsoftware.org](http://wiki.quantsoftware.org)Source Repository [https://github.com/QuantSoftware/QuantSoftwareToolkit](https://github.com/QuantSoftware/QuantSoftwareToolkit)## ContributingPlease read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.## VersioningWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).## LicenseThis project is licensed under the New BSD License - see the [LICENSE.md](LICENSE.md) file for details.
Package: pfun
Functional, composable, asynchronous, type-safe Python.DocumentationKnown issuesInstall$pipinstallpfunOr with optional dependencies:$pipinstallpfun[http,sql]ResourcesArticlesPurely Functional Python With Static TypesBe More Lazy, Become More ProductiveCompletely Type-Safe Error Handling in PythonCompletely Type-Safe Dependency Injection in PythonHow To Make Functional Programming in Python Go FastExamplesTodo-Backend(implementation oftodobackend.com)SupportOnko-fiDevelopmentRequirespoetryInstall dependencies withpoetry run task install -E http -E sqlBuild documentation withpoetry run task serve-docsRun tests withpoetry run task testLint withpoetry run task lint
Package: pfxposter
pfxposterA PixelFed to Mastodon and Twitter crossposter that is not written as intended. Due to the unknown error on pixelfed.social instance, Atom feeds are used for checking new posts.In order to post PixelFed entries to Twitter, you will need a Mastodon-Twitter crossposter, you may find them on web.Installationpython3 -m pip install pfxposterUsing virtual enviroment is strongly recommended, for the reason that the requests library of the distro vendor may be overrided after the installation.UsageFirst, create a Mastodon application from the settings of your Mastodon instance. You can create it under "Development" menu in settings. When you have created your app, Mastodon will give you an access token. Write the token to your configurion file.The configuration file is located at~/.pfxposter.updated=2020-08-21 07:56:48+00:00[mastodon]mastodon_url="https://oyd.social"access_token="your_access_token_here"[pixelfed]pixelfed_url="https://pixelfed.social"username="ooguz"pfxposter reads the configuration file, and runs frequently. Installation frompipshould add a crontab entry, you can check it with the command:crontab -lFrom Mastodon to Twitter, you will need another cross-poster, there are some links below:https://crossposter.masto.donte.com.br/https://moa.partyDISCLAIMER: These services listed below are neither maintained nor recommended from the developer, these are listed only for general information.LicenseGLWTS(Good Luck With That Shit) Public License
            Copyright (c) Every-fucking-one, except the Author

Everyone is permitted to copy, distribute, modify, merge, sell, publish,
sublicense or whatever the fuck they want with this software but at their
OWN RISK.

                             Preamble

The author has absolutely no fucking clue what the code in this project
does. It might just fucking work or not, there is no third option.


                GOOD LUCK WITH THAT SHIT PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION

  0. You just DO WHATEVER THE FUCK YOU WANT TO as long as you NEVER LEAVE
A FUCKING TRACE TO TRACK THE AUTHOR of the original product to blame for
or held responsible.

IN NO EVENT SHALL THE AUTHORS 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.

Good luck and Godspeed.
Package: pfycat
Downloadspfycatsimple module for rudementary usage of gfycat-api for pythoncd defeaturesupload filesimport pfycat
r = pfycat.Client().upload('banana.gif')authenticater = pfycat.Client("client_id", "client_secret").upload('banana.gif')upload as user:r = pfycat.Client(secret.client_id, secret.client_secret, secret.username, secret.password).upload('banana.gif')dev-notesrunning testscd pfycat
nano tests/secret.py #needs client_id and client_secret
env PYTHONPATH=. ./tests/live_test.pyplaying around with rest-apihttps://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm/relatedpush to pypiprepare environment:gedit ~/.pypirc
chmod 600 ~/.pypirc
sudo apt install pandoc twine
pip3 install restviewupload changes to test and production:pandoc -o README.rst README.md
~/.local/bin/restview  --pypi-strict README.rst
# update version in setup.py
rm -r dist
python setup.py sdist

twine upload dist/* -r testpypi
firefox https://testpypi.python.org/pypi/pfycat
twine upload dist/*test install from testpypipip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pfycat --no-cache-dir --usertest installationsudo pip install pfycat --no-cache-dir --userrelated linkshttps://developers.gfycat.com/api/
Package: pfzy
pfzyPython port of thefzyfuzzy string matching algorithm.Async fuzzy match functionFzy scorer (fuzzy string match)Substring scorer (exact substring match)Requirementspython >= 3.7InstallationpipinstallpfzyQuick StartFull documentation:https://pfzy.readthedocs.io/importasynciofrompfzyimportfuzzy_matchresult=asyncio.run(fuzzy_match("ab",["acb","acbabc"]))>>> print(result)
[{'value': 'acbabc', 'indices': [3, 4]}, {'value': 'acb', 'indices': [0, 2]}]Backgroundfuzzywuzzyis a famous python package for performing fuzzy matching
between strings powered bypython-Levenshtein. While it does its
job well it doesn't calculate/provide the matching indices which is essential in a fuzzy finder applications.Thefzyfuzzy matching algorithm can calculate the matching score while also
providing the matching indices which fuzzy finder applications can use to provide extra highlights.The initial implementation of this algorithm can be found atsweep.pywhich
is a python implementation of the terminal fuzzy finder. The code snippet is later used by the projectvim-clap.I found myself needing this logic across multiple projects hence decided to strip out the logic and publish a dedicated
package with detailed documentation and unittest.Creditfzysweep.pyvim-clapLICENSEAll 3 projects mentioned inCreditare all licensed underMIT.This project is licensed underMIT. Copyright (c) 2021 Kevin Zhuang
Package: pg2cf
pg2cfUtility program for uploading PostgreSQL backups to RackSpace Cloud
FilesDocumentationInstallationpip install pg2cfUsageRenameinit.sh.exampletoinit.shEnter the required variables and source themsource init.shInstall required python modules withpip install-rrequirements.txtExecute the program./pg2cf.pyDepending on where you set the LOG_FILE ininit.shyou can view the
logs of the application to make sure that everything is working withtail-f$LOG_FILEProduction Usage
Example
Package: pg3d
PG3DPG3D is a simple 3D graphics library written using Pygame.InstallationInstall Python 3.7 or newer.https://www.python.org/downloads/Open cmd/terminal and type:pip install pg3dDependenciespython 3.7+pygameUsageImport the libraryfrompg3dimport*Create an App instance and call the run functionapp=App()#---Code goes here---##--------------------#app.run()API ReferenceApp(kwargs):kwargs:dimensions=(1000,700)cam_pos=[0,0,0]BG_COLOR=NoneLINE_COLOR=NoneVERTEX_SIZE=2fullscreen=Falsemouse_look=False# Use mouse for camera orientationfunctions:run()# Draws all vertices and checks for movementModel(args)args:app# Specify the App() objectpath# Specify path of .obj filePyramid(args,kwargs)args:app# Specify the App() objectkwargs:size=1center=[0,0,0]Cube(args,kwargs)args:app# Specify the App() objectkwargs:size=1center=[0,0,0]Tetrahedron(args,kwargs)args:app# Specify the App() objectkwargs:size=1center=[0,0,0]Triangle(args)args:app# Specify the App() objectvertices# List or tuple with 3 cartesian coordinatesfunctions:__getitem__(index)# Returnes indext point of Triangle objectPoint(args,kwargs)args:app# Specify the App() objectcoordinate# A list with a single cartesian coordinatekwargs:vertex=True# If true the point is drawn and vice versafunctions:__repr__()# Prints Point object__setitem__(index,value)# Sets indexed coordinate of Point object to value__getitem__(index)# Returns indexed coordinate of Point object
Package: pg4geks
Provides:db(sql,*values).row/rows/affectedid = db_insert(table_name,_return='id',name=value,..)affected = db_update(table_name, where=dict(name=value, item_in=tuple_of_values),name=value,..)result = db_transaction(code)raise db_rollbackdb("""ALTERTYPE "my_type" ADD VALUE'my_value'""",autocommit=True)  # Avoid "cannot run inside a transaction block".db('SELECT* FROM "table" WHERE "name" LIKE %s', escape_like(fragment))connection pool blocks only for the first connection - for quick deployauto reconnect and retryoptional log of each queryUsage:sudo apt-get install --yes gcc libevent-dev libpq-dev python-dev
sudo pip install pg4geks

from pg4geks import db, db_config, db_insert, db_update, db_transaction
db_config(name='test', user='user', password='password')
# Defaults: host='127.0.0.1', port=5432, pool_size=10, patch_psycopg2_with_gevent=True, log=None

row = db('SELECT "column" FROM "table" WHERE "id" = %s', id).row
assert row is None or row.column == row['column']

return db('SELECT * FROM "table" WHERE "related_id" IN %s AND "parent_id" = %s', tuple(related_ids), parent_id).rows
# Please note that "tuple()" should be used with "IN %s", to keep "list []" for PostgreSQL Array operations.
# http://pythonhosted.org/psycopg2/usage.html#adaptation-of-python-values-to-sql-types

return [
    processed(row)
    for row in db('SELECT * FROM "table" LIMIT 10')
]  # Please note that no ").rows" is required for iteration.

try:
    def code():
        db('INSERT INTO "table1" ("quantity") VALUES (%s)', -100)
        db('INSERT INTO "table2" ("quantity") VALUES (%s)', +1/0)

        if error:
            raise db_rollback

        return result
    result = db_transaction(code)

except db_rollback:
    pass  # Or not.

id = db_insert('table',
    related_id=related_id,
    parent_id=parent_id,
    _return='id',
)

assert db_update('table',
    related_id=None,
    where=dict(id=id),  # Or: id=tuple(ids_to_update)
) == 1

# See tests for more usage examples.
Package: pg8000-py3
pg8000 is a Pure-Python interface to the PostgreSQL database engine.  It is one
of many PostgreSQL interfaces for the Python programming language.  pg8000 is
somewhat distinctive in that it is written entirely in Python and does not rely
on any external libraries (such as a compiled python module, or PostgreSQL’s
libpq library).  pg8000 supports the standard Python DB-API version 2.0.pg8000’s name comes from the belief that it is probably about the 8000th
PostgreSQL interface for Python.
Package: pgadmin4-desktop-mode
pgadmin4_desktop_mode - Start pgadmin4 in desktop modeSometimes the desktop mode is the way to go:you can easily access your own filesif there is only one user you don't need any user management ...This package requires pgadmin4 and provides a very simplistic starter for the
desktop mode. pgadmin4 listens on localhost using a port number, which is computed
from the login name. That's currently sufficient for our internal needs. If you
need more, feel free to submit a pull request.How to use "pgadmin4_desktop_mode":prepare a virtual envpython3 -m venv pgadmin && . pgadmin/bin/activate && \python -m pip install -U pip && python -m pip install -U setuptoolsinstall pgadmin in desktop modepython -m pip install pgadmin4_desktop_modestart pgadminpgadmin4_desktop_mode
Package: pg_analyse
https://github.com/idlesign/pg_analyseDescriptionTools to gather useful information from PostgreSQLThis package can function both as Python module and as a command line utility.
Command line interface can show gathered information in the form of tables orJSON.Use it to gather information manually or in Continuous Integration.Can give you some information on:Index health (bloat, duplicates, unused, etc.);Tables missing PKs and indexes;Slowest queries.NoteSQLs used for inspections are available inhttps://github.com/mfvanek/pg-index-health-sqlRequirementsPython 3.6+psycopg 2Installation;Ifyoudonothavepsycopg2yet,installitas`psycopg2`or`psycopg2-binary`.;Youmayalsowanttoinstall`envbox`togetPGconnectionsettingsfrom.envfiles.;Yourdistributionmayrequireissuing`pip3`commandinsteadofplain`pip`.$pipinstallpsycopg2-binaryenvbox;IfyouwanttouseitjustasPythonmodule:$pipinstallpg_analyse;Ifyouwanttouseitfromcommandline:$pipinstallpg_analyse[cli]UsageHintOne can setPG_ANALYSE_DSNenvironment variable instead of explicitly passing DSN
to connect to PostgreSQL. Ifenvboxis installed this
variable can be defined in.envfile .Python modulefrompg_analyse.toolboximportAnalyser,analyse_and_formatanalyser=Analyser(dsn='user=test')inspections=analyser.run()inspection=inspections[0]print(inspection.alias)print(inspection.result)# Shortcut function is available:out=analyse_and_format()CLI;Showknowninspectionsanddescriptions:$pg_analyseinspections;UseDSNfromtheenvironmentvariable(seehintabove),;printoutcomplexvalues(e.g.sizes)inhuman-friendlyway:$pg_analyserun--human;Runcertaininspections,overridedefaultparams.;Use"common"keywordtopassparamscommonforallinspections.$pg_analyserun--oneidx_unused--oneidx_bloat--args"idx_bloat:schema=my,bloat_min=20;common:schema=my";UseexplicitlypassedDSN:$pg_analyserun--dsn"host=myhost.net port=6432 user=test password=xxx sslmode=verify-full sslrootcert=/home/my.pem";Localconnectionas`postgres`userwithpassword:$pg_analyserun--dsn"host=127.0.0.1 user=postgres password=yourpass";Outputanalysisresultasjson(insteadoftables):$pg_analyserun--fmtjsonAdding InspectionsTo add a new inspection topg_analyse:Compose SQL for inspection and put it into a file undersql/directory.Add a subclass ofInspectionintoinspections/bundled.py. Fill inalias,sql_nameattributes (see docstrings inInspection).
Package: pganonymizer
PGAnonymizerPGAnonymizer is a tool for anonymizing database for testing purposes.InstallationPGAnonymizer required Python 3.5 and above to run. PGAnonymizer can be installed using pip.$pipinstallpganonymizerBackgroundPGAnonymizer will hash columns in table depending on the rules inside CSJ file.CSJ file format:"table", "column", "rule"
"schema.table_to_be_hased", "columned_to_be_hased", "hash"
"schema.table_to_be_hased", "columned_to_be_hased", "date"
"schema.table_to_be_hased", "columned_to_be_hased", "phone"Example for rules for hashingHashis for text type field such as name or address. The return value will be in base32 with length of atmost 16.Example input:Customer1Example output:EC35FEOXDMVR7Y5CDateis for date type field. The return value will keep the original year but hash the month and date field.Example input:2000-12-15Example output:2000-01-10Phoneis for phone number. The return value will be of same length as the original number.Example input:+66932019385Example output:+66254818000InstructionFormat:$pganonymizer[databaseenvironment][option]To use PGAnonymizer, you can call:$pganonymizer--schemapath_to_schema_file.csjBy default, PGAnonymizer will connect to database using user's username as database and role.Otherwise, please specify as follow:$pganonymizer-dpostgres-Upostgres--schemapath_to_schema_file.csjFor more information on the usage, please use the following command:$pganonymizer--help