Saravanan666/pypi-org huggingface dataset:
Package: pgcooldown
IMPORTANTBreaking change!  Properties gone!I was aware, that there is a slight overhead when using properties, but
during A benchmark, that difference turned out to be 17%.Since this package is still marked as Alpha and probably nobody is using
it besides me, the interface is now changed from properties to functions
in all places.Tests needed to be adapted, but run clean now (and also more exact usingpytest.approxinstead ofround.The following properties now need to be called as functions:cold                -> cold()
    cold.setter         -> set_cold(bool)
    hot                 -> hot()
    temperature         -> temperature()
    temperature.setter  -> set_to(val)
    remaining           -> remaining()
    remaining.setter    -> set_to(val)
    normalized          -> normalized()
    v                   -> removed, just use instance()As stated initially, this is 17% less overhead when testing for cold,
etc.  Performance of LerpThing increased from 1.3mio calls to 1.8mio due
to this change.Sorry for any inconvenience, if anybody is using this, but that bad
design decision needed to be fixed before any more people would use this.pgcooldownCooldown & co...This module started with just the Cooldown class, which can be used check if a
specified time has passed.  It is mostly indended to be used to control
objects in a game loop, but it is general enough for other purposes as well.fire_cooldown=Cooldown(1,cold=True)whileTrue:iffire_shotandfire_cooldown.cold:fire_cooldown.reset()launch_bullet()...With the usage of Cooldown on ramp data (e.g. a Lerp between an opaque and a
fully transparent sprite over the time of n seconds), I came up with the
LerpThing.  The LerpThing gives you exactly that.  A lerp betweenfromandtomapped onto aduration.alpha=LerpThing(0,255,5)whileTrue:...sprite.set_alpha(alpha())# or sprite.set_alpha(alpha.v)ifalpha.finished:sprite.kill()Finally, the need to use Cooldown for scheduling the creations of game
objects, the CronD class was added.  It schedules functions to run after a
wait period.Note, that CronD doesn't do any magic background timer stuff, it needs to be
updated in the game loop.crond=CronD()crond.add(1,create_enemy(screen.center))crond.add(2,create_enemy(screen.center))crond.add(3,create_enemy(screen.center))crond.add(4,create_enemy(screen.center))whileTrue:...crond.update()InstallationThe project home ishttps://github.com/dickerdackel/pgcooldownInstalling HEAD from github directlypip install git+https://github.com/dickerdackel/pgcooldownGetting it from pypipip install pgcooldownTarball from githubFound athttps://github.com/dickerdackel/pgcooldown/releasesLicensing stuffThis lib is under the MIT license.
Package: pgcopy
Usepgcopyfor fast data loading into
PostgreSQL withbinary copy.FeaturesSupport for many data typesSupport for multi-dimensional array typesSupport for schema and schema search pathTransparent string encodingUtility for replacing entire tableQuickstartfrom datetime import datetime
from pgcopy import CopyManager
import psycopg2
cols = ('id', 'timestamp', 'location', 'temperature')
now = datetime.now()
records = [
        (0, now, 'Jerusalem', 72.2),
        (1, now, 'New York', 75.6),
        (2, now, 'Moscow', 54.3),
    ]
conn = psycopg2.connect(database='weather_db')
mgr = CopyManager(conn, 'measurements_table', cols)
mgr.copy(records)

# don't forget to commit!
conn.commit()Supported datatypespgcopy supports the following PostgreSQL scalar types:boolsmallintintegerbigintrealdouble precisioncharvarchartextbyteaenum typesdatetimetimestamptimestamp with time zonenumericjsonjsonbuuidarraysDocumentationRead the docs.See Alsocpgcopy, a Cython implementation, about twice as fast.
Package: pgcopy-standalone
Usepgcopyfor fast data loading into
PostgreSQL withbinary copy.FeaturesSupport for many data typesSupport for multi-dimensional array typesSupport for schema and schema search pathTransparent string encodingUtility for replacing entire tableQuickstartfrom datetime import datetime
from pgcopy import CopyManager
import psycopg2
cols = ('id', 'timestamp', 'location', 'temperature')
now = datetime.now()
records = [
        (0, now, 'Jerusalem', 72.2),
        (1, now, 'New York', 75.6),
        (2, now, 'Moscow', 54.3),
    ]
conn = psycopg2.connect(database='weather_db')
mgr = CopyManager(conn, 'measurements_table', cols)
mgr.copy(records)

# don't forget to commit!
conn.commit()Supported datatypespgcopy supports the following PostgreSQL scalar types:boolsmallintintegerbigintrealdouble precisioncharvarchartextbyteaenum typesdatetimetimestamptimestamp with time zonenumericjsonjsonbuuidarraysDocumentationRead the docs.See Alsocpgcopy, a Cython implementation, about twice as fast.
Package: pgcornac
REST ServiceThe Cornac webservice is an open-source implementation of AWS RDS API enabling
the use of aws CLI to manage your Postgres instances.⚠ This project is at its early stage of development. ⚠FeaturesSubset of RDS API compatible with awscli.Configurable infastructure provider: libvirt, VMWare.Installationcornac web service is available on PyPI aspgCornac. You need more than apip installto such service. Seeinstallation instructionsfor
details.Supportcornac is build for you by Dalibo, the french leader in PostgreSQL support. Feel
free toopen an issue on GitHub
projectpage.
Package: pgcronner
PGCronnerPGCronner is a simple and fast Python package written in Rust using PyO3 that helps manage PostgreSQL cron jobs. It lets you take control of your cron jobs by allowing you to add, remove, or list them easily. PGCronner uses a custom table to handle all these operations seamlessly.The tool takes advantage of the PyO3 library—an extension module that enables interoperability between Python and Rust. This allows for an increased performance and memory safety.InstallationFirst of all, you need to ensure that you have Python installed on your system. If you do not, please follow the official guide to get it up and running.The package can be installed via pip:pipinstallpgcronnerUsageTo use the package, you just need to import it into your Python script.Here is an example of how to create a new pgcron job:frompgcronnerimportPGCronner,JobPG_URI="postgresql://postgres:postgres@localhost:5432/postgres"pgcronner=PGCronner(PG_URI)# Create a Job using the provided JobBuilder# my_job = Job("<name>", "<schedule>", "<command>", "<source>")my_job=Job("testjob","*/5 * * * *","SELECT 1;","source")# Pass the Job Objectpgcronner.add(job)# Sync db table with pgcron# !!! WARNING - DANGER ZONE !!!# This deletes all jobs with prefix 'pgcronner' in the `cron.job` table and populates it with the jobs in `pgcronner_jobs`# See below for implementationpgcronner.sync()Listing all the jobs:jobs=pgcronner.all()forjobinjobs:print(job)Retrieve one job:job=pgcronner.one("<jobname>")Removing a job:# The parameter would be the job name you want to delete.pgcronner.remove(job_name)DjangoIn the examples directory there's also an example on how to add this to a Django project.DocumentationFor more detailed instructions and API details, refer to the full documentation athttps://pgcronner.readthedocs.io/.ContributingWe welcome any kind of contribution - reporting issues, suggesting new features, or even writing code. Please make sure to read the CONTRIBUTING.md file before making a pull request.LicenseThis project is licensed under the MIT License.AcknowledgmentsThis Python package has been realized using PyO3 to create a bridge between Rust and Python.Enjoy the power of managing your PostgreSQL cron jobs with simplicity and ease. Happy PGCronning!
Package: pgcs
PgcsPgcsis an intuitive TUI tool designed to simplify your interaction with Google Cloud Storage. Stay in your coding zone by navigating directories, searching files (with case-insensitive support), and previewing files all from your terminal. Easily save paths to clipboard or download files with straightforward keyboard shortcuts. Experience a seamless Cloud Storage interaction right from your terminal; no more swapping to a browser.FeaturesNavigate through directories with left and right arrowsPeco-like search UICase-insensitive searchPreview of the file is availablePress 'ctrl-p' to save the path to clipboardPress 'ctrl-d' to downloadInstallation$pipinstallpgcsUsage[!IMPORTANT]
Bothgcloud auth loginandgcloud auth application-default loginare required.commanddescriptionpgorpg traversenavigate through Google Cloud Storage directoriespg pref --initinitialize or reset preferences filepg pref <key> <value>set preference with key to value[!Note]
If you want to use clipboard functionality on Linux without a GUI, you need to execute the following. Below is an example.$sudoapt-getinstallxvfb
$sudoapt-getinstallxclip
$Xvfb:99-screen01280x720x16&$exportDISPLAY=:99VersioningThis repo usesSemantic Versioning.Licensepgcsis released under the MIT License. SeeLICENSEfor additional details.
Package: pgdancer
pgdancer：一个python的通用动态数据可视化框架English介绍这是一个python的动态数据可视化项目，基于pygame游戏引擎。能够将pandas的Dataframe数据结构使用动态的方法展示。RequirementsAnaconda-python 3.61+ and pygame 1.95+Works on Linux, windows, Mac OSX效果展示快速开始pipinstallpgdancer打开命令行终端pgdancerstartprojectmy_projectcdmy_project在项目目录中，会生成 settings.py 文件作为设置文件，当你需要它的时候下载示例csv文件,点我下载把文件放在命令行终端的文件夹路径中vimdemo.py写入以下内容并保存importpandasaspdfrompgdancerimporthistogramif__name__=='__main__':# example codedf=pd.read_csv("brands_data.csv",index_col="brands",thousands=",").fillna(0)df=df.astype("int")h=histogram.Histogram(df,1600,900,window_type=0)h.run("pgdancer","Top 15 Best Global Brands Ranking","---Datasource:https://www.interbrand.com",\"Top 15 Best Global Brands Ranking","Brand Value:$m")运行python脚本pythondemo.py使用文档文档正在编写中特别说明字体问题: pygame默认字体是英文的,显示中文或特殊文字会出现框框,
以下方法可以获取系统字体列表，增加histogram.py源码中getFontStyle函数中的font_list列表可以解决
PS：后续版本会解决字体问题importpygamepygame.font.get_fonts()颜色问题：
pgdancer内置了31种颜色，Dataframe.index 超过31个则会报错
PS：后续版本会解决颜色问题未来的版本加入有图片的动态样式加入背景音乐功能组件化更漂亮
Package: pgdata
# pgdataPython PostgreSQL-PostGIS-SQLAlchemy shortcuts.[![Build Status](https://travis-ci.org/smnorris/pgdata.svg?branch=master)](https://travis-ci.org/smnorris/pgdata) [![Coverage Status](https://coveralls.io/repos/github/smnorris/pgdata/badge.svg?branch=master)](https://coveralls.io/github/smnorris/pgdata?branch=master)pgdata is a collection of convenience functions for working with PostgreSQL:provides an dictionary/JSON-like shortcut interface to database objects without dealing directly with an ORM or cursor (see [dataset](https://dataset.readthedocs.io/en/latest/))>>> import pgdata
>>> db = pgdata.connect()
>>> db.tables
['inventory']
>>> db["inventory"].columns
['type', 'supplier', 'cost']provides a shortcut toogr2ogrfor quickly getting geographic data in and out of your database with sensible defaults and without resorting to shell scripting>>> import pgdata
>>> db = pgdata.connect()
>>> db.ogr2pg('airports.shp',
              out_layer='airports_a',
              schema='airport_project')
>>> db.execute('do stuff')
>>> db.pg2ogr('SELECT * FROM airports_project.result','GPKG', 'output.gpkg')Much is copied directly from [dataset](https://dataset.readthedocs.org/) and further inspiration was taken from [pgwrap](https://github.com/paulchakravarti/pgwrap). See also [records](https://github.com/kennethreitz/records) and many others.## RequirementsPostgreSQLPostGISGDAL (optional, forpg2ograndogr2pg)[ESRI File Geodatabase API](http://appsforms.esri.com/products/download/) (optional, for usingpg2ogrwithFileGDBoption)## Installation` pip install pgdata `## ConfigurationCreate an environment variableDATABASE_URLand set it to the [SQLAlchemy db url](http://docs.sqlalchemy.org/en/latest/core/engines.html) for your database:MacOS/Linux etc:export DATABASE_URL=postgresql://postgres:postgres@localhost:5432/mydbWindows:SET DATABASE_URL=”postgresql://postgres:postgres@localhost:5432/mydb”## Usage` >>> import pgdata >>> db =pgdata.connect(schema='myschema')>>> db.tables ['inventory'] >>>db["inventory"].columns['type', 'supplier', 'cost'] >>> data =db.query("SELECT* FROM inventory WHERE type = %s",('spam',)).fetchall()>>> for row in data: >>>     print(row['type'],row['supplier'],row['cost'])('spam', 'spamcorp', 100) >>> for row indb["inventory"].find(type='spam'):>>>     print(row['type'],row['supplier'],row['cost'])('spam', 'spamcorp', 100) `
Package: pg-db
PG-DBPG-DB is simplePsycopgwrapper.UsageFirst create an DB object and initialise it with the application,frompg_dbimportDBdb=DB('test','root',debug=True)defset_user(name):db.connect()db.execute("INSERT INTO users VALUES('Wendys');",(name,))db.commit()db.close()set_user('xyz')can select one row,defget_user(id):db.connect()row=db.one("SELECT name FROM users WHERE id=%s",(id,),as_dict=True)db.close()returnrow['name']print(get_user(1))can select all rows,defget_users():db.connect()rows=db.all("SELECT name FROM users;")db.close()returnrowsprint(get_users())Usage on QuartFirst create a Quart wrapper file (db.py),fromfunctoolsimportwrapsfrompg_dbimportDBfromquartimportflash,redirect,request,session,url_for# make_responsefromquart_authimportcurrent_userclassdb(DB):defwrapper(self,func):@wraps(func)asyncdefwrapped(*args,**kwargs):try:self.connect(session['schema']if'schema'insessionelse'public','QUART_AUTH'inrequest.cookiesandawaitcurrent_user.readonly)returnawaitfunc(*args,**kwargs)exceptExceptionase:self.rollback()ifself.debug:raiseeawaitflash("db error -> "+str(e))returnredirect(url_for(request.endpoint))# return await make_response("db error -> " + str(e), 500)finally:try:self.close()except:passreturnwrappedThen enable db object from db.py globally for a Quart app,fromjsonimportdumpsfrom.dbimportdbapp=Quart(__name__)db=db(AppConfig.DB_NAME,AppConfig.DB_USER,AppConfig.DEBUG)@app.route('/get_users')@db.wrapperasyncdefget_users():returndumps(db.all("SELECT name FROM users;"))Usage on FlaskFirst create a Flask wrapper file (db.py),fromfunctoolsimportwrapsfrompg_dbimportDBfromflaskimportflash,redirect,request,session,url_for# make_responsefromflask_loginimportcurrent_userclassdb(DB):defwrapper(self,func):@wraps(func)defwrapped(*args,**kwargs):try:self.connect(session['schema']if'schema'insessionelse'public',current_user.is_authenticatedandcurrent_user.readonly)returnfunc(*args,**kwargs)exceptExceptionase:self.rollback()ifself.debug:raiseeflash("db error -> "+str(e))returnredirect(url_for(request.endpoint))# return make_response("db error -> " + str(e), 500)finally:try:self.close()except:passreturnwrappedThen enable db object from db.py globally for a Flask app,fromjsonimportdumpsfrom.dbimportdbapp=Flask(__name__)db=db(AppConfig.DB_NAME,AppConfig.DB_USER,AppConfig.DEBUG)@app.route('/get_users')@db.wrapperdefget_users():returndumps(db.all("SELECT name FROM users;"))ContributingPG-DB is developed onGitLab. You are very welcome to
openissuesor
proposemerge requests.HelpThis README is the best place to start, after that try opening anissue.
Package: pgdbconn
PgDbConn is an offshoot from the Perseas project (started as Pyrseas)
to isolate and generalize the Postgres database connection code so
that it can be used in other Perseas products, such as a web
application to update Postgres tables.FeaturesConnect to a Postgres database with minimal information, creating a
DbConnection objectProvide basic methods through the DbConnection object, e.g., fetch,
execute, commit, rollback(planned) Connect using a pool of connections, so that it can be used,
for example, in a web applicationRequirementsPostgreSQL 9.2 or higherPython 2.7, or 3.4 or higherPsycopg2 2.5 or higherLicensePgDbConn is free (libre) software and is distributed under the BSD
license.  Please see the LICENSE file for details.
Package: pgdedupe
pgdedupeA work-in-progress to provide a standard interface for deduplication of large
databases with custom pre-processing and post-processing steps.Free software: MIT licenseDocumentation:https://pgdedupe.readthedocs.io.InterfaceThis provides a simple command-line program,pgdedupe. Two configuration
files specify the deduplication parameters and database connection settings. To
run deduplication on a generated dataset, create adatabase.ymlfile that
specifies the following parameters:user:
password:
database:
host:
port:You can now create a sample CSV file with:$ python generate_fake_dataset.py --csv people.csv
creating people: 100%|█████████████████████| 9500/9500 [00:21<00:00, 445.38it/s]
adding twins: 100%|█████████████████████████| 500/500 [00:00<00:00, 1854.72it/s]
writing csv:  47%|███████████▋             | 4666/10000 [00:42<00:55, 96.28it/s]Once complete, store this example dataset in a database with:$ python test/initialize_db.py --db database.yml --csv people.csv
CREATE SCHEMA
DROP TABLE
CREATE TABLE
COPY 197617
ALTER TABLE
ALTER TABLE
UPDATE 197617Now you can deduplicate this dataset. This will run dedupe as well as the
custom pre-processing and post-processing steps as defined in config.yml:$ pgdedupe --config config.yml --db database.ymlCustom pre- and post-processingIn addition to running a database-level deduplication withdedupe, this
script adds custom pre- and post-processing steps to improve the run-time and
results, making this a hybrid between fuzzy matching and record linkage.Pre-processing:Before running dedupe, this script does an exact-match
deduplication. Some systems create many identical rows; this can make it
challenging for dedupe to create an effective blocking strategy and generally
makes the fuzzy matching much harder and time intensive.Post-processing:After running dedupe, this script does an optional
exact-match merge across subsets of columns. For example, in some instances
an exact match of just the last name and social security number are
sufficient evidence that two clusters are indeed the same identity.Further stepsThis script was based upon and extended from the example indedupe-examples. It would be nice to use this common interface across all
database types, and potentially even allow reading from flat CSV files.History0.2.1 (2017-05-03)Make command line arguments required, resulting in better error messages.Refactored testing scripts to be more user-friendly.0.2.0 (2017-04-19)First release on PyPI (as pgdedupe).0.1.0 (2016-12-14)First release on PyPI (as superdeduper).
Package: pgdf
Tool built withpython to summarizegitdiff.MotivationThis tool can put diffs into Excel.InstallationThis tool is installed with pip:$pipinstallpgdfUsageGo to the Git repository directory, then:$pgdf09c03f5693496ef3$pgdf09c03f5693496ef3dir/pathfile/path$pgdforigin/mainfeature/somethingIt generates an Excel file that contains summary of the differences.Excel FormatThe output excel file contains two sheets,SummaryandDiff.SummaryThe summary sheet contains the summary of the differences.
It is same as the result ofgit diff --statsfor the specified commits.DiffThe diff sheet contains the differences of the markdown files.
It is something likegit difffor the specified commits, but it also contains line numbers and commit short logs as follows.Diff 29485862 4959956adiff –git a/file_a.txt b/file_a.txtindex 29485862..4959956a 100644— a/file_a.txt+++ b/file_a.txt@@ -1,3 +1,3 @@3333text 13434text 229485862User 12024-01-01 …old comment35- old text 34959956aUser 22024-01-01 …new comment35+ new text 33636text 43737text 5PyPI packagehttps://pypi.org/project/pgdf/
Package: pg-discuss
pg-discuss is a comment system backend written in Python on top of aPostgreSQLdatabase. It is designed to support JavaScript comment widgets
embedded in any page, such as static sites generated byPelican,Sphinx,
orNikola. pg-discuss can also be used with a content management system such
asWordPress, or within your own dynamic web app that needs a robust comment
system.DemoFeaturesInstallationConfigurationInternals(for Extension Authors and Contributors)Why pg-discuss?Respect for Userspg-discuss has a feature set comparable to popular commercial comment
management systems. However, pg-discuss does not sell your users’ browsing
habits and comments to marketers. You have full control over how your users’
information is used.Permissively-Licensed Open Sourcepg-discuss is a MIT-licensed open source project that allows you to
operate, extend, and redistribute the application as you see fit. Contributions
are welcome.Supports Multiple JavaScript WidgetsThe pg-discuss API can be adapted to work with existing embeddable comment
widgets. Of course, new widgets can also be written using the default REST
API.ExtensibleThe application is highly extensible, with most default features implemented as
extensions which are bundled. Extensions can change the comment workflow,
comment metadata collection, rendering engine, authentication, and HTTP API
format and endpoints. Extensions are implemented using a simple API that
exposes logical plugpoints and events.Small and Readable CodebaseThe core package of pg-discuss is less than 1000 lines. Code is structured
for readability, conforms to PEP8, and has ample comments. It is written to
be very approachable for both auditors and extension developers. Both prose
and API documentation of internals are published.Robust and Performant DatabasePostgreSQL offers strong data guarantees, ease of management, and high
performance. pg-discuss is written to take advantage of several
PostgreSQL-specific features that enable flexible extension and low latency
querying.Available and ScalableThe pg-discuss application can be deployed across many hosts for redundancy or
load balancing since it does not store any application state itself - all state
is held in the PostgreSQL database or in the client browser session. pg-discuss
also plays well with HTTP caches such as nginx, and a simple extension can
inform the cache when to purge stale objects.pg-discuss alternativesThere are several good alternatives to pg-discuss that are also open source,
but have somewhat different design goals.IssoPerhaps you don’t want to run a database?Issois an excellent SQLite-backed comment server - there is no separate
database instance to run, since the data is stored in a file. Also written
in Python. MIT licensed.DiscourseNeed a comment widget that also has file uploads, polling, private messaging,
analytics, all out of the box?Discourseis a discussion platform with along list of features, with a
Ruby on Rails backend on top of PostgreSQL. GNU GPL v2 licensed.
Package: pg-docker
PG DockerA python package to provide containerized postgres databases in pythonWhy would you need this?If you are using postgres and want to write tests that run against a real database, then this will make your life easier.InstallationInstall via pip:pip install pg-dockerYou will also need to havedocker.UsageNote:This package is mainly built with pytest in mind, but you can use the context managers documented below with other testing frameworks as well.ExampleWith pytest:importpsycopg2pytest_plugins=["pg_docker"]deftest_using_a_database(pg_database):db_connection=psycopg2.connect(**pg_database.connection_kwargs())cursor=db_connection.cursor()cursor.execute("SELECT 'hello world!'")assertcursor.fetchone()==("hello world!",)Usage with pytestYou first need to enable the plugin. To do this add aconftest.pyto the root directory of your tests and add:pytest_plugins=["pg_docker"]You can find more details on how to activate plugins in thepytest docsThe plugin The following fixtures:pg_database:DatabaseParamsfor a clean database.pg_database_pool: ADatabasePoolinstance. Use this if you need more than one database in your tests at a time.Configuring Database MigrationsUse the below template in yourconftest.pyto configure how your databases are set up.defsetup_db(pg_params):"""Add any setup logic for your database in here."""pass@pytest.fixture(scope="session")defpg_setup_db():returnsetup_dbNote:You might be inclined to edit the above code to nest the setup_db function inside of the fixture function. This will not work, because the fixture result needs to bepickleable!Advanced Usage (and other testing frameworks)For other use cases you can use thedatabase_poolcontext manager:withdatabase_pool()asdb_pool:withdb_pool.databaseasdb_params:connection=psycopg2.connect(**db_params.connection_kwargs())