Saravanan666/pypi-org huggingface dataset:
Package: pydealer
PyDealer is a simple to use Python package for “simulating” decks of standard playing cards (also known as a French Deck). PyDealer let’s you easily createDeckinstances, each containing a full 52 card deck of playing cards. Each card is a separateCardinstance, with a name, value, suit, and abbreviation. There is also theStackclass, which is useful for creating hands, or discard piles, etc. It is the backbone of the PyDealer package, and actually theDeckclass is just a subclass of theStackclass.PyDealer could possibly be used as part of a CLI (command line interface) card-based game, or even a graphical game as well, I suppose. It may also be of interest to beginner Python programmers, since it’s a relatively simple package, which I created as a way to learn Python, packaging, testing, documentation (Sphinx), etc. I even ended up learning how to use Git a bit, which I must say was slightly frustrating at first. This package has taught me a lot, and maybe someone else can benefit from it as well. Or maybe not. Either way, here it is.The PyDealer package can be found at thePython Package Index, and should be downloaded from there, and, ideally, installed withpip.Note to DevelopersIf you want to work on this project, please make sure you are working on the latest version of thedev branch, and make your pull requests to that branch. Thanks.DocumentationFull documentation for PyDealer can be found on readthedocs.org:http://pydealer.readthedocs.org/en/latest/Quick Usage ExampleHere is a quick example, using IDLE, demonstrating how to construct a newDeckinstance, representing a full French Deck of cards, as well as how to shuffle the deck, and deal some cards (7 of them) from it, to a hand. Then we’ll print a listing of the contents of the hand, in a human readable way, with a simple print statement.>>>importpydealer>>>deck=pydealer.Deck()>>>deck.shuffle()>>>hand=deck.deal(7)>>>hand.sort()>>>printhand2 of Diamonds
5 of Hearts
9 of Hearts
9 of Spades
Jack of Spades
King of Clubs
Ace of ClubsInstall/Update/Uninstall withpipI recommend downloading and installingpip, if you haven’t already, and using that to install PyDealer, from thePython Package Index.Enter one of the following commands into your *nix Bash or Windows Command Prompt (after installingpip).Install$ pip install pydealerUpdate$ pip install pydealer -UUninstall$ pip uninstall pydealerRelevant LinksStandard 52-card deck Wikipedia ArticlePlaying card Wikipedia Article
Package: pydear
pydear 🦌ImGui wrapper generated by clang.cindex.github repositorypypiWorks in conjunction withPyOpenGLandglfw.examplesPreBuild wheelOnly Python-3.10 (Windows 64bit) is provided.
It was developed on Windows and worked on Linux as well.Included BindingsA luajit-like style using ctypes.
Pointer arguments are passed by an array of length 1.p_open=(ctypes.c_bool*1)(True)ImGui.Begin('name',p_open)Also, all C structs are defined asctypes.Structgenerated using clang.cindex.classImGuiIO(ctypes.Structure):_fields_=[("ConfigFlags",ctypes.c_int32),# Int32Type: int,("BackendFlags",ctypes.c_int32),# Int32Type: int,The ImGUi backend is provided in a pure Python modulepydear.backends.
Currently only glfw and OpenGL3 exist.Most bindings are available, except for functions that have callback and va_list as arguments.ImGui-1.87 docking branchhttps://github.com/ocornut/imguiImNodeshttps://github.com/Nelarius/imnodesNanoVG modifiedhttps://github.com/ousttrue/picovg/Detailhttps://ousttrue.github.io/pydear/BuildCode generationhttps://github.com/ousttrue/rawtypesPackage checkpy -m pip wheel .
twine check pydear-1.12.1-cp310-cp310-linux_x86_64.whl
Package: pydeas
PydeasPydeas is aPythonlibrary for dealing in an efficent way with information storage.InstallationUse the package managerpipto install PydeaspipinstallpydeasGet StartedThis library is based onpandasand memorize the information in csv files, the database is relational but you can work with multiple folders and files, in this way you can create a dynamic and comprehensible db structure.frompydeasimportPydeasDBdefdb()->None:main_folder=PydeasDB.Folder('Database')# create the main folder in the current folderpassword_file=main_folder.create_file('passwords')# create a 'passwords' file in the main folderpassword_file.add_columns(['App','Email','Username','Password'])# add the column to the table of the fileNow we created a "passwords.csv" in the database folder, and configured the file adding columns; we can now start working with PydeasOutput in ./Database/passwords.csv#,App,Email,Username,PasswordAdd an element to the tablepassword_file.add_row(['Github','myemail@io.com','Foo','Bar'])# add a row to the table of the fileOutput in ./Database/passwords.csv#,App,Email,Username,Password

1,Github,myemail@io.com,Foo,BarAs you can see this library is pretty easy to use and all the methods name are auto-explicative, but you can navigate further in this documentationQueryA pydeas database can be queryied in 2 different ways:one resembles the way of doing things in relational databases(we recommend using this when queryies are more complex)defget_config(app_name,email):print(password_file.query(f'App == "{app_name}" & Email == "{email}"'))# This function will print the list of objects or None (if nothing is found)for reference you can check thequery method of pandas librarywhich also takes a string and works in the exact same way;While the other one resembles the non-relational databases (such asMongoDbetc.)defget_config(app_name,email):print(password_file.search({"App":app_name,'Email':email}))# This function will print the list of objects or None (if nothing is found)UpdateThe update function takes 2 arguments: the first one is the query string, the second one the new rowdefupdate_by_appname(app_name,new_email,new_username,new_password)->None:response=password_file.update(f'App == "{app_name}"',{'App':app_name,'Email':new_email,'Username':new_username,'Password':new_password})print(response)# This function will print true if the operation is completed succesfullyDeleteThe delete function the query string as argumentdefdelete_by_appname(app_name)->None:response=password_file.delete(f'App == "{app_name}"')print(response)# This function will print true if the operation is completed succesfullyPydeas v1.0.2
Package: pydebrid
A simple & cross-platform command-line interface for unrestraining links thanks to Alldebrid.DisclaimerFrom now on,Christopheris the only “debrider” project I will maintain.Feel free to fork pydebrid if you want, but understand that Christopher does
the same job than pydebrid and a lot more.FeaturesLinks unleashingBulk unleashing (from txt file)Embed downloaderMulti-languages subtitles getterClipboard or STDOUT outputAccount information and expiration alertSecure config storageSSL SupportCaptcha alertIntuitive and colorful useCross-platform (Tested on Linux and OS X but should works on Windows too)Installationpydebrid is available on PyPI. In order to install it, just use the following command :pip install pydebridUsagepydebrid [-h] [-u File/HTTP URL] [-d] [-i] [-s Subtitles languages] [-o Destination directory] [--stdout]-h: Display help-u: Local text/plain file (like links.txt) or remote url (likehttp://ul.to/abcde)-d: Download the linked file(s) once debrided-i: Display current user informations-s: Get subtitles following a single or comma-separated list of IETF language code-o: Custom file output directory (otherwise current directory)--stdout: Output links to STDOUT instead of clipboardExamplespydebrid -u http://ul.to/abcde -d -s en,frDownloadhttp://ul.to/abcdein the current directory with english and french subtitles.pydebrid -u links.txtUnrestrain all links inlinks.txtfile (one link per line) and put them in the clipboard.pydebrid -iReturn infos from your account like Fidelity points, Remaining time, Registration date and more.ChangelogFrom 1.0.9 to 1.0.10:Bugfix byplato79(fixeshttps://github.com/davidderus/pydebrid/issues/10)
Source:https://github.com/plato79/pydebrid/pull/1From 1.0.8 to 1.0.9:Bugfix (seehttps://github.com/davidderus/pydebrid/issues/6)From 1.0.6 to 1.0.7:Updating root URL for Alldebrid websiteFrom 1.0.4 to 1.0.6:New requests versionNew subliminal versionOutput to STDOUT (Issue #1)FutureResuming download on failure (Issue #2)
Package: pydebsign
StatusMotivationdebsignis a command of devscripts that sign a Debian .changes and .dsc file pare using GPG,
the command cannot use in environment witout TTY, for example invokeking by CI.I had tried to use debsign fromsubprocessmodule of Python as follow,
but entering passphrase prompt is always returned.
It was the same in the case of using gnupg-agent and keyring.:>>> import subprocess
>>> import shlex
>>> command0 = 'echo -e "%s\n%s\n"' % (`passphrase`, `passphrase`)
>>> command1 = '/usr/bin/debsign -k %s %s' % (`keyid`, `.changes`)
>>> process0 = subprocess.Popen(shlex.split(command0),
...                             stdin=subprocess.PIPE,
...                             stdout=subprocess.PIPE,
...                             stderr=subprocess.PIPE)
>>> process1 = subprocess.Popen(shlex.split(command1),
...                             stdin=process0.stdout,
...                             stdout=subprocess.PIPE,
...                             stderr=subprocess.PIPE)
>>> stdout, stderr = process.communicate()So, I decided to make a Python library to do the same behavior debsign.GoalIt is enable to sign.changesand.dscfiles with GPG without the input of interactive passphrase.It can also be used by a user can not login shell on the CI, such as Jenkins.RequiresDebian system, or the system derived from Debian.Debian GNU/Linux WheezyDebian GNU/Linux Jessie/SidUbuntu 14.04 LTSDebian package as follows;gnupgdputlintianpython (= python2.7) or python3Python packages as follows;python_gnupg (as debian package is python-gnupg or python3-gnupg)python_debian (as debian package is python-debian or python3-debian)chardet (as debian package is python-chardet or python3-chardet)UsageGeneric usage;:>>> from pydebsign import debsign
>>> debsign.debsign_process('/path/to/some.changes', passphrase='secretkey')When use another GPG Keyring instead of default GPG keyring;:>>> from pydebsign import debsign
>>> debsign.debsign_process('/path/to/some.changes', passphrase='secretkey',
...                         keyid='keyid', gnupghome='/path/to/gpghome')History0.1.5 (2015-08-25)Changes Sphinx theme to sphinx_rtd_theme.Merge pull request #9 from mkouhei/travis-packagesAdds execute apt-get update.Enabled sudo explicitly.0.1.4 (2014-12-21)Unsupported Python 3.2Added Sphinx documents and applied Read the docsMigrated pep8, pyflakes, pychecker, pylint to Tox0.1.3 (2014-05-31)Fixed #6 dput check local section is failedUnsupported Python2.60.1.2 (2014-05-27)Fixed #3 cannot decode umlaut.0.1.1 (2014-05-26)Resolved the backward compatibility for python_gnupg 0.3.0 (Wheezy version).0.1.0 (2014-05-26)Initial releaseTODOAdding command line interface.
Package: pydebugger
pydebuggerprint objects stack info with colored.InstallingInstall and update usingpip_:.. code-block:: text$ pip install pydebuggerpydebugger supports Python 2 and newer, Python 3 and newer, and PyPy... _pip:https://pip.pypa.io/en/stable/quickstart/ExampleWhat does it look like? Here is an example of a simple pydebugger program:.. code-block:: pythonfrom pydebugger.debug import debug

debug(variable1="data1", debug=True)And what it looks like when run:.. code-block:: text$ python hello.py 
2019:04:18~13:20:19:286000 <module> -> variable1: data1 -> TYPE:<type 'str'> -> LEN:5 ->  [<FILE DIRECTORY>/test.py] [3] PID:10496You can set OS Environment DEBUG=1 or DEBUG=True to avoid parameter "debug=True".. code-block:: pythonfrom pydebugger.debug import debug

debug(variable1="data1")or you just run "debug.py" to provider debug server with Client support OS Environment.. code-block:: bashDEBUG_SERVER=1
DEBUGGER_SERVER=0.0.0.0:50001SupportPython 2.7 +, Python 3.xWindows, LinuxLinksLicense:BSD <https://github.com/cumulus13/pydebugger/src/default/LICENSE.rst>_Code:https://github.com/cumulus13/pydebuggerIssue tracker:https://github.com/cumulus13/pydebugger/issues
Package: pydebuginfod
pydebuginfodpydebuginfod is a Python client implementation of thedebuginfod
spec.importpydebuginfodclient=pydebuginfod.Client()dbginfo=client.get_debuginfo("c0e8c127f1f36dd10e77331f46b6e2dbbbdb219b")dbginfo>>>'/home/matt/.cache/debuginfod/buildid/c0e8c127f1f36dd10e77331f46b6e2dbbbdb219b/debuginfo'client=pydebuginfod.Client()executable=client.get_executable("c0e8c127f1f36dd10e77331f46b6e2dbbbdb219b")dbginfo>>>'/home/matt/.cache/debuginfod/buildid/c0e8c127f1f36dd10e77331f46b6e2dbbbdb219b/executable'pydebuginfod allows you to easily get started with debuginfod.Configurationspydebuginfod allows configurations to passed in via:A configuration fileENV variablesMember variablesConfigurations are set in that order (config file < env vars < direct).The following items can be configured:URLs: The URLs of the servers you are queryingCache-Path: The cache location to store the downloaded artifactsVerbose: Sets the logging level to verboseTimeout: How long to wait on a connection before giving upProgress: Show download progress via stdout during download?Configuration FileThe configuraton file follows theXDGspecification. pydebuginfod will look for a file namedpydebuginfo.ymlunder theXDG_CONFIG_HOMEdirectory.The structure of the yaml file is as followscache-path: /opt/cache
verbose: false
timeout: 90
progress: true
urls:
    - "https://server1.com"
    - "https://server2/com"Environment VariablesDEBUGINFOD_CACHE_PATHDEBUGINFOD_VERBOSEDEBUGINFOD_TIMEOUTDEBUGINFOD_PROGRESSDEBUGINFOD_URLSMember variablesclient=pydebuginfod.Client()client.cache="/opt/cache"client.verbose=Falseclient.timeout=90client.progress=Trueclient.urls=["https://server1.com"]
Package: py-debug-inspect-utils
Example Usagedefget_prefetch_queryset(self,instances,queryset=None):query={'%s__in'%self.field.name:instances}frompy_debug_inspect_utilsimportdebug_printdebug_print(query=query)Output:/Users/Development/venv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py:625 (get_prefetch_queryset)
()
{'query': {'attribute__in': [<Attribute: Flavor>]}}
Package: pydebugstring
pydbugstringProvides a function OutputDebugString to call:
- on win32 platforms, calls the ctypes.windll.kernel32.OutputDebugStringW with any Python Object, after converting that object to a string.- on other platforms, converts the argument to a string and discards it, returns 0Provides a handler for the Python Logging Module which sends logging to OutputDebugString.  On platforms other than win32, the logging output is disccarded.The output can be viewed using theDebugViewprogram from the SysInternals  package from Microsoft.Sample Useimport  pydebugstring
import sys
import logging
#send an object to OutputDebugString
logger=logging.getLogger()
logger.setLevel(logging.DEBUG)
logger.addHandler(pydebugstring.OutputDebugStringHandler())
print(f"Sending sys.path [{sys.path}]  to outputDebugString")
pydebugstring.outputDebugString(sys.path)

debug_message = "Sample Debug Message"
print(f"Sending [{debug_message}] with logging.info")

logging.info(debug_message)
Package: pydec
PyDec is a linear decomposition toolkit for neural network based onPyTorch, which can decompose the tensor in the forward process into given components with a small amount of code. The result of decomposition can be applied to tasks such as attribution analysis.Features:Fast. Compute decomposition in foward process and benefit from GPU acceleration.Run once, decompose anywhere. Obtain the decomposition of all hidden states (if you saved them) in forward propagation.Applicable to networks such as Transformer, CNN and RNN.ExamplesData flow visualizationRequirements and InstallationPyTorchversion >= 1.11.0Python version >= 3.7To install PyDec and develop locally:gitclonehttps://github.com/DoubleVII/pydeccdpydec
pipinstall--editable./To install the latest stable release:pipinstallpydecGetting StartedExample: deompose a tiny networkAs a simple example, here's a very simple model with two linear layers and an activation function. We'll create an instance of it and get the decomposition of the output:importtorchclassTinyModel(torch.nn.Module):def__init__(self):super(TinyModel,self).__init__()self.linear1=torch.nn.Linear(4,10)self.activation=torch.nn.ReLU()self.linear2=torch.nn.Linear(10,2)defforward(self,x):x=self.linear1(x)x=self.activation(x)x=self.linear2(x)returnxtinymodel=TinyModel()Given an inputx, the output of the model is:x=torch.rand(4)print("Input tensor:")print(x)print("\n\nOutput tensor:")print(tinymodel(x))Out:Input tensor:
tensor([0.7023, 0.3492, 0.7771, 0.0157])


Output tensor:
tensor([0.2751, 0.3626], grad_fn=<AddBackward0>)To decompose the output, just input the Composition initialized fromx:c=pydec.zeros(x.size(),c_num=x.size(0))c=pydec.diagonal_init(c,src=x,dim=0)print("Input composition:")print(c)c_out=tinymodel(c)print("\n\nOutput composition:")print(c_out)Out:Input composition:
composition{
  components:
    tensor([0.7023, 0.0000, 0.0000, 0.0000]),
    tensor([0.0000, 0.3492, 0.0000, 0.0000]),
    tensor([0.0000, 0.0000, 0.7771, 0.0000]),
    tensor([0.0000, 0.0000, 0.0000, 0.0157]),
  residual:
    tensor([0., 0., 0., 0.])}


Output composition:
composition{
  components:
    tensor([-0.0418, -0.0296]),
    tensor([0.0566, 0.0332]),
    tensor([0.1093, 0.1147]),
    tensor([ 0.0015, -0.0018]),
  residual:
    tensor([0.1497, 0.2461]),
  grad_fn=<AddBackward0>}Each component of the output composition represents the contribution of each feature inxto the output.
Summing each component yields the tensor of original output:print("Sum of each component:")print(c_out.c_sum())Out:Sum of each component:
tensor([0.2751, 0.3626], grad_fn=<AddBackward0>)DocumentationThefull documentationcontains examples of implementations on real-world models, tutorials, notes and Python API descriptions.Linear Decomposition TheoryTo understand the principles and theories behind PyDec, see our paperLocal Interpretation of Transformer Based on Linear Decomposition.
Package: pydecensooru
pydecensooruA Python module usingDecensoorudata to automatically fill any Danbooru post's missing info keys.The Decensooruid:md5.extbatcheswill be silently fetched and kept up-to-date in your user
data directory,e.g.~/.local/share/pydecensooruon GNU/Linux by default.Originally developed for transparent usage withlunafind.Examples>>>importrequests>>>frompydecensooruimportdecensor,decensor_iter# Decensoring a single post if it needs to be:>>>p2=requests.get("https://danbooru.donmai.us/posts/2.json").json()>>>"file_url"inp2False>>>p2d=decensor(p2)>>>"file_url"inp2dTrue>>>p2["file_ext"]'png'# Transparently decensoring any post that needs it in a search:>>>posts=requests.get("https://danbooru.donmai.us/posts.json?tags=id:1..10").json()>>>print(type(posts),type(posts[0]))<class'list'> <class 'dict'>>>>"file_url"inposts[-2]False>>>posts=list(decensor_iter(posts))>>>"file_url"inposts[-2]True
Package: pydecibel
decibel - Turn your Infrastructure up to 11!Are you that IT-rockstar that Sophos makes commercialsabout, but you are stuck writing long-winding and full-of-boilerplate YAML files to set up your IT environment?Do you wish your Infrastructure as Code-repository actually contained code, and not some Chomsky Type-2 markup language that requires you to carefully place everything in the right order?Fear not, hear us out what decibel has to offer!Python-based configuration with hard dependenciesDecibel uses Python for its configuration, basing it on classes and simple functions to
define how things should run. Python decorators are used for controlling the flow of configuration, eliminating the need to define things in a certain order.fromdecibelimportRunbookfromdecibel.ansibleimportapt,template,commandfromdecibel.flowimportafter,notifyclassHAProxy(Runbook):defrun_install(self):apt(name="haproxy",state="installed")@after("run_install")defrun_configure(self):template(src="files/haproxy.cfg.j2",dest="/etc/haproxy/haproxy.cfg")ifself.vars.datacenter.value()=="dc1":command("program --datacenter {{ datacenter }}")defreload_service(self):service(name="haproxy",state="restarted")Decibel resolves all dependencies between Runbooks and Runnables, and calculates the most optimal way to perform the configuration. Runbooks exist to group together certain steps of an installation, and can be used to parameterize common steps. Variables are both available to the Python-code, but are also exported to all tasks that run within a Runbook and can be used in Jinja2.fromhaproxyimportHAProxyfromdecibelimportDecibelwithDecibel()asds:withds.hosts("localhost",become=True):HAProxy(datacenter="dc1",backends=["one.example.com","two.example.com"])ds.run()Forcing idempotence on the userAnsible strives to have configuration be idempotent, and most modules are indeed that. There are however cases where simple modules are not idempotent by default because they require the user to configure not only what command to run, but the desired state the command should bring you to.
Decibel will be default warn you of such cases, and provide helper functions to easily make your configurations desired-state based.fromdecibel.ansibleimportcommand,statfromdecibel.dslimportgetsclassDatabase(Runbook):defrun_import(self):gets(stat(path="/tmp/mysql-import.log").stat.exists,command("mysql -e 'SELECT * FROM db'").ok).via(command("mysql-import file.sql"))Why is it called Decibel?Well, see, I tried to name it DSLible, because the goal was to create a more DSL-like language to use for Ansible. But DSLible is very hard to say, and the most important thing about project names is how easy you can fit it into a workplace discussion. Decibel sounded close enough, and also happens to lay the ground for a really cheeky slogan.
Package: pydecima
PyDecimaThis package contains a reader utility for .core files used by the Decima game engine, intended for use in exporting
assets and datamining. Using PyDecima, resources from one or multiple Decima .cores can be deserialized into Python
objects and loaded into a dictionary to enable lookup by their identifier UUID, as well as simple following of
cross-file references.ExamplesInitializationThe primary use of this package is through thereadermodule, which can be used in a script like so:importpydecimaoutput_dict={}pydecima.reader.set_globals(_game_root=r'C:\HZD_extracted_files',_decima_version='HZDPC')pydecima.reader.read_objects(r'C:\HZD_extracted_files\localized\sentences\aigenerated\aloy\sentences.core',output_dict)The above script will populate theoutput_dictvariable with all the resources contained inside the specified .core._decima_versionaccepts values of "HZDPC" (default), "HZDPS4", or "DSPC", although currently there is very little
support for Death Stranding resource formats._game_rootshould be set to the root of your extracted Decima files,
and is necessary to enable reference following. An alternative parameter,_game_root_file, can be used, which expects
a plaintext file containing only the path that would normally be passed into_game_root. This can be convenient for
scripts, since the root path can be stored in a persistent file instead of being entered by the user at runtime.Parsing resourcesWith theoutput_dictvariable populated, we can easily iterate through the resources in a .core and read some data.frompydecima.resourcesimportSentenceResourcefrompydecima.enumsimportETextLanguagesforresourceinoutput_dict.values():ifisinstance(resource,SentenceResource):localized_text=resource.text.follow(output_dict)iflocalized_textisnotNone:print(f'{resource.name}:{localized_text.language[ETextLanguages.English]}')The above script will produce a printout of every subtitled line in a dialogue file, prefaced by its internal name.