Saravanan666/pypi-org huggingface dataset:
Package: dpn_pyutils
DPN Python UtilsA collection of python utils used by the DPN.Target minimum python version:3.12.xHigh-level Design NotesTo be broadly compatible with running in synchronous or asynchronous mode.The principles behind the modules are to:Be dependable and provide least surpriseFail safe and raise informative exceptionsOptimize code for readability and maintainabilityDesign for backwards compatibilityMajor versions of dpn_pyutils releases track major Python versions in general
availabilityModulesModule NameModule DescriptioncliMethods relating to command line input and outputcommonMethods relating to logging and shared system servicescryptoMethods relating to cryptography and encodingexceptionsException classes for all modulesfileMethods relating to file and path operationshttpMethods relating to general HTTP/RESTmoneyMethods relating to money, transactions, and formattingtimeMethods relating to time managementGetting StartedThe fastest way to get start is with apyenv.With pyenv installed on the system, check the latest version of the target python version.pyenvupdate&&pyenvinstall-l|grep3.12InstallInstall with pip using:pipinstalldpn_pyutilsInstall manuallyInstall the target python version into pyenv and set up the virtualenvpyenvinstall3.12.1
pyenvvirtualenv3.12.1dpn_pyutils
pyenvactivatedpn_pyutils
pipinstall--upgradepippoetry
poetryinstallUpgrade versionsUpgrading is done by uninstalling the package and installing the upgraded versionpipinstall--upgradedpn_pyutilsBuildingBuilding dpn_pyutils can be done with python 3 and poetrytoxrun-parallel
poetrybuildThe distribution-ready files will be in thedist/directory.Packaging and DistributionPackaging after changes need the following to be executed:Update the version numberBump the version numberThe MAJOR and MINOR versions shouldalwaysmatch the minimum Python versionsThe PATCH version should be an incremental counter of library versionspoetrycheck--lock
gitcommit-am"Updated requirements, pyproject and bumping version number for release"Distributepoetrybuild
poetrypublish
Package: dpop
dpop（日本語）dpop stands for Dancing Piles of Poo. This program saves a gif image which shows dancing poosSample of output:How to UseThis work in the following platforms. The only platform dependent part is the specification of the font.macOSLinuxNeeds/usr/share/fonts/truetype/ancient-scripts/Symbola_hint.ttfInstall the font beforehandWindowsThis works on Python3.To install, enter the command as follows:> pip install dpopEnter as follows to generate a gif file:> dpopThere are some options. To see the options, enter:> dpop --help
Package: dpos-deputy
# dpos-deputyHowdy delegate! You have just been deputized!### InstallationInstall python 3.6```commandlinesudo add-apt-repository ppa:deadsnakes/ppasudo apt-get updatesudo apt-get install python3.6-devwget https://bootstrap.pypa.io/get-pip.pysudo python3.6 get-pip.pysudo pip3.6 install virtualenv```If you get an error related to hidapi or gcc, try this:```commandlinesudo apt-get install gccsudo apt install libudev-dev libusb-1.0-0-dev```Create a virtual environment (replace myvirtualenv with whatever seems appriopriate, for example deputy)```commandlinevirtualenv myvirtualenv -p python3.6```Activate the virtualenv.```commandlinesource myvirtualenv/bin/activate``````commandlinepip install dpos-deputy```Deputy requires running ark-node instances/other network nodes like Kapu or Persona to function.### Initial setupStart out by enabling autocompletion for an easier time.```commandlinedeputy enable_autocomplete```### HelpUse flags to figure out what the commands do.```bashdeputy --help```### Starting outStart out by setting your configurations for further use.```commandlinedeputy set_config --help```### Example commandSetting up your configuration:```commandlinedeputy -p mypassword set_config```This will lead you through a series of prompts to store persistent configurations. If you don't use apassword, deputy will default to default_password for encryption purposes.
Package: dppa
Deep Protein Polarity Analyser (DPPA)DPPA analyses each column of amino acids within .fasta files, from a target file, generating a report with all possible polarities listed.InstallationpipinstalldppaExamplesSimple ExecutionGroup ExecutionUsageCommand Lineusage:run-dppa[-h][--reportNameREPORTNAME][--reportPathREPORTPATH][--searchKPSEARCHKP][--debug]TARGETREPORTTYPE

Analysepolarityonallproteinalignment.fastafilesfromatarget.

positionalarguments:TARGETTarget.fastafiletobeanalysed.REPORTTYPEOutputreportfiletype.

optionalarguments:-h,--helpshowthishelpmessageandexit--reportNameREPORTNAMEOutputreportcustomfilename.--reportPathREPORTPATHOutputreportcustomfilepath.--searchKPSEARCHKPCustomkeyphrasetodetectsearchablesequences.--debugTurndebugmessageson.Pythonimportdppa.coreassolvertarget_path='example.fasta'report_name='myrep'report_type='all'# 'xls', 'csv' or 'all'report_path='results-folder'# optionalsolver.set_debug_mode(True)# optional# results[0] -> polarity results dataframe# results[1] -> alerts dataframeresults=solver.run(target_path)# option 1: export to the current foldersolver.export(results,report_type,report_name)# option 2: export to custom foldersolver.export(results,report_type,report_name,report_path)
Package: dppd
dppdBuild status:Documentationhttps://dppd.readthedocs.io/en/latest/| Code style    |](https://github.com/ambv/black)Dppd is a pythondplyrclone.It allows you to use code like this>>>fromplotnine.dataimportmtcars>>>fromdppdimportdppd>>>dp,X=dppd()>>>dp(mtcars).mutate(kwh=X.hp*0.74).groupby('cyl').filter_by(X.kwh.rank()<2).ungroup().pdcylnamempgdisphpdratwtqsecvsamgearcarbkwh56Valiant18.1225.01052.763.46020.22103177.70184HondaCivic30.475.7524.931.61518.52114238.48218DodgeChallenger15.5318.01502.763.52016.870032111.00228AMCJavelin15.2304.01503.153.43517.300032111.00Briefly, it uses a data-manipulater instance (dp above) together with a proxied
reference to the latest created DataFrame (the X above) to achive for pandas what dpylr's
non-standard-evaluation based verbs does for R.Please see our full documentation athttps://dppd.readthedocs.io/en/latest/for more details and a list of the supported verbs.Also check outdppd_plotnine
Package: dppd-plotnine
dppd_plotnineBuild status:Documentationhttps://dppd_plotnine.readthedocs.io/en/latest/dppd_plotnine combines the power ofplotnineanddppdIt allows you to use code like thisimportnumpyasnpfromdppdimportdppdimportdppd_plotninefromplotnine.dataimportmtcarsimportplotnineasp9dp,X=dppd()plot=(dp(mtcars).assign(kwh=X.hp*0.74).categorize("cyl").p9().add_point("cyl","kwh",color="cyl",position=p9.position_jitter(height=0,random_state=500),).add_errorbar(x="cyl",y="kwh_median",ymin="kwh_median",ymax="kwh_median",data=dp(X.data).groupby("cyl").summarize(("kwh",np.median,"kwh_median")).pd,).scale_color_manual(["red","blue","purple"])# after pd, X is what it was before.pd)plot.save("test.png")Please see our full documentation athttps://dppd_plotnine.readthedocs.io/en/latest/for more details of the straight and enhanced plotnine mappings available.
Package: dpprogram
=====dpprogram=====Django app.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "dpprogram" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'dpprogram',]2. Include the polls URLconf in your project urls.py like this::url(r'^polls/', include('polls.urls')),3. Run `python manage.py migrate` to create the dpprogram models.4. Start the development server and visit http://127.0.0.1:8000/admin/to create a poll (you'll need the Admin app enabled).5. Visit http://127.0.0.1:8000/polls/ to participate in the poll.
Package: dpr
Diffusion profile realignment (dpr)An example and assorted implementation from the manuscriptReducing variability in along-tract analysis with diffusion profile realignment.
Have a look at theexampleon how to use the package and run it on a small example dataset.To install the package, just runpip install dprThe documentation is available athttps://dpr.readthedocs.io.The matlab versionThere is also a shiny new version written in matlab, with an assorted example, available in thematlabfolder.
Feel free to check out and edit the functions as needed for your own usage.A quick example from the command lineThere is also a command line version for easy usage, here in an example for the AFD metric on the left arcuate fasciculus.
The text file is already ordered in increasing order for each subject, which have the same distance between every point and are already zero padded accordingly.We also supply the--exploredtioption to remove the header column,--do_graphto save a png file with the results.We finally resample everything to 75 points with--points 75.The-foption overwrites the output files and the-voption prints useful informative messages throughout (and are optional).dprdatasets/af_left_AFD.txtdatasets/af_left_AFD_realigned.txt--exploredti--do_graph-f-v--points75The outputdatasets/af_left_AFD_realigned.txtis a text file where each line is a subject and each column is a different point of the along tract analysis.We also get a png filedatasets/af_left_AFD_realigned.pngwith the before/after realignment process.Note how the zero padding present in the original data is decreasing the metrics as less and less subjects are present.
The realigned metric is instead using padding with Nans, remember to consider/keep track of it in subsequent analysis as needed.Visualizing the resultsWe can also draw the p-values (computed separately) over the bundle using the scriptdpr_make_fancy_graph.
This requires the original coordinates, the truncated version between rois and the coordinates to the representative streamline.dpr_make_fancy_graphdatasets/af_left_pval_unaligned.txtdatasets/af_left_coordinates.txtdatasets/af_left_truncated_coordinates.txtdatasets/af_left_average_coordinates.txt0,2pvals_unaligned.png--title'p-values before realignment'-f
dpr_make_fancy_graphdatasets/af_left_pval_realigned.txtdatasets/af_left_coordinates.txtdatasets/af_left_truncated_coordinates.txtdatasets/af_left_average_coordinates.txt0,2pvals_realigned.png-fAnd this is the resultsDatasets and referenceThe main reference isSamuel St-Jean, Maxime Chamberland, Max A. Viergever, Alexander Leemans,
Reducing variability in along-tract analysis with diffusion profile realignment,
NeuroImage, 2019. ISSN 1053-811The data is also available athttps://zenodo.org/record/2483169.The open access manuscript is also available athttps://www.sciencedirect.com/science/article/pii/S1053811919305014.To refer to a specific version of the code, everything is also archived over athttps://zenodo.org/record/3248894.
Package: dp-redo
dp-redoA python variant of theredobuild system, with which You Can (Not) Redo.ExampleLet's say we have a build process where we readtest.cand generatetest.o:importos,syssource_tree=os.path.dirname(os.path.abspath(sys.argv[0]))deftest():source=os.path.join(source_tree,"test.c")# The simplest compiler 😁os.system("cat{}>{}".format(source,"test.o"))if__name__=="__main__":test()testwill be run every time no matter whethertest.cgets an update or not, which wastes much time. Now let's add some magic:fromdp_redoimport*importos,syssource_tree=os.path.dirname(os.path.abspath(sys.argv[0]))@do("test.o")deftest(target_name,target_base_name,output_path):redo_ifchange("test.c")source=os.path.join(source_tree,"test.c")os.system("cat{}>{}".format(source,output_path))if__name__=="__main__":redo_ifchange(test)If you run it multiple times:PS C:\Users\lishengq\source\repos\dp-redo\build> python ..\test2.py
Redoing target: test
PS C:\Users\lishengq\source\repos\dp-redo\build> python ..\test2.py
Skipping target test: it's up to date.Fantastic, isn't it? If you changedtest.c, modified thetestmethod itself, or deletedtest.o,testwill be executed again:PS C:\Users\lishengq\source\repos\dp-redo\build> python ..\test2.py
Redoing target: test. Reason: It's python code has changed
PS C:\Users\lishengq\source\repos\dp-redo\build> python ..\test2.py
Redoing target: test. Reason: The target file doesn't exist
PS C:\Users\lishengq\source\repos\dp-redo\build> python ..\test2.py
Redoing target: test. Reason: test.c has been modified
PS C:\Users\lishengq\source\repos\dp-redo\build>A target method can also depend on another method, which is rather simple:fromdp_redoimport*importos,syssource_tree=os.path.dirname(os.path.abspath(sys.argv[0]))@do("test2.o")deftest2(target_name,target_base_name,output_path):os.system("echo test2 > "+output_path)@do("test.o")deftest(target_name,target_base_name,output_path):redo_ifchange(test2,"test.c")source=os.path.join(source_tree,"test.c")os.system("cat{}>{}".format(source,output_path))if__name__=="__main__":redo_ifchange(test)What makes redo more interesting is that, you can callredo_ifchangeto add dependencies at any time, even after your compilation:fromdp_redoimport*importos,sys,resource_tree=os.path.dirname(os.path.abspath(sys.argv[0]))@do("test2.o")deftest2(target_name,target_base_name,output_path):print("In test2")os.system("echo test2 > "+output_path)@do("test.o")deftest(target_name,target_base_name,output_path):redo_ifchange(test2)source=os.path.join(source_tree,"test.c")os.system("gcc -M -MF test.c.dep -o{}{}".format(output_path,source))# Dependent headers given by gccdeps=open('test.c.dep','r').read().split(": ")[1].strip().split("\\\n")redo_ifchange(*deps)if__name__=="__main__":redo_ifchange(test)Now when any headers are changed, the build process will be run again.
Package: dprint
dprintA printing debugging helper.Motivationdprintis inspired by apython-ideas thread, to show what's possible
with a little bit of magic with plain Python code.InstallationIt's on PyPI asdprint. The obvious way will just work:pip install dprintUsageImport the functiondprintfrom thedprintmodule.fromdprintimportdprintdefspam():eggs=10dprint(eggs*2)spam()Running the above script gives:$ python script.py
script.py:6 in spam
  eggs * 2 -> 20Operational AssumptionsThe current logic for figuring out the expression passed to dprint operates under some assumptions:The imported function must be calleddprintA call should span no more than 1 lineNo more than 1 call on 1 lineA future version might relax these assumptions.LicenseAll files in this repository are under the MIT license.
Package: dprj
What’s that?dprjis an algorithm that extracts sounds from words. It’s similar to
metaphone, except it’s targeted at the french language only. While double
metaphone or similar can be ok to regroup content that sound more or less the
same, it becomes unusable when you want to get the real pronunciation of a
word, since it’s mainly targeted at english. And we all know french can be
really tricky sometimes.How to use it?Install it from PyPI:pip install dprjThen just use thesayfunction:>>fromdprjimportsay>>say(u'chaussette')u'xst'>>say(u'psychologue')u'psklg'>>say(u'agglomération')u'glmrsn'>>say(u'accès')u'ks'How reliable is it?Well, try it and see for yourself! There are still some cases to handle:some pluralssome silent final letters (eg. ‘r’)french weirdnessesIf you get incorrect results for any word please let me know by filing and
issue.
Package: dproc
dprocA convenient data flow to preprocess data using metadata.InstallpipinstalldprocHow to useImportfromdprocimport*Load the definition fileLoad the data defintion from the location of your choice (locally, server, cloud).dproc.meta.definition=pd.read_excel('your-data-definition-file')This file contains all meta information such asIn order to generate a specifc entity definition ...dproc.meta.entity='your-entity'and then you can apply the dataflow steps:entity_cleaned=(entity_raw.step_rename_cols().step_replace_missing_with_nan().step_remove_not_needed_cols().step_remove_rows_with_missing_ids().step_remove_duplicate_rows().step_format_dates(cols=['created']).step_format_dates(cols=['modified']).step_format_round_numeric_cols(cols=['rating'],decimal_places=2).step_change_dtypes())
Package: dprofiles
Install the packages!!! INFO !!!Visit ourdocumentationfor more information/explanation.pip install dprofiles.Head over to theDiscord developer siteto get your Bots Token, Client ID and secret (if you are using the Oauth2 Client). Make sure to also set a redirect URL for your bot.Example Application of the Client for dprofilesimportdprofilesclient=dprofiles.Client("<your token>")client.get(670663150365835285)# returns all user informationclient.get(670663150365835285,"bio")# returns the information for "bio"client.get(670663150365835285,"bio",save=True)# saves returned content into {user-ID}.jsonclient.check_vote(670663150365835285,[second-ID])# True if user a has voted for user bclient.has_voted(70663150365835285)# True if voted in last 6/12hExample Application of the Oauth2 Clientfromdprofiles.extimportDiscordOauth2ClientfromquartimportQuart,redirect,render_template_string,request,url_forapp=Quart(__name__)app.secret_key=b"some random bytes for the secret quart key"app.config['DISCORD_CLIENT_ID']=""app.config['DISCORD_CLIENT_SECRET']=""app.config['SCOPES']=['identify']app.config['DISCORD_REDIRECT_URI']='http://127.0.0.1:5000/callback'app.config['DISCORD_BOT_TOKEN']=""client=DiscordOauth2Client(app)@app.route('/')@client.is_logged_inasyncdefindex():user=awaitclient.fetch_user()returnf"Hello,{user.name}!"@app.route('/login/',methods=['GET'])asyncdeflogin():returnawaitclient.create_session()@app.route('/callback')asyncdefcallback():awaitclient.callback()returnredirect(url_for('index'))#redirects to "/"if__name__=='__main__':app.run()Scopesidentifyreturns/users/@mewithoutemail.emailreturns/users/@mewith anemail.connectionsreturns linked accounts (Youtube, Spotify...)guildsreturns the users guildsguilds.joincan be used to join a guild for a user
Package: d-project
项目: d-project描述项目命令管理工具安装pip install d-project使用首先初始化project.yml文件# 默认生成当前目录
project init
# 若要修改目录
project init ./configs/project.ymlproject.yml文件的结构如下运行自定义的命令或者流程project run some_command

project run some_workflow生成READMD.md文件project document --output ./README.md
Package: dprop
dpropEverything is connected, maan!This tiny package implements the notion of "dependent properties", whose values
are computed based on other properties and cached for re-use, but then smartly
invalidated when a(great-)*(grand)?parentproperty's value changes.Here is a simple example:fromdpropimportindependent,depends_onclassClass:a=independent(float)# type info optional@depends_on(a)defb(self):print('computing b')return6*self.adef__init__(self,a:float):# independent properties can be set inside and outside the class as usualself.a=ainst=Class(7)assertinst.a==7assertinst.b==42# prints "computing b"assertinst.b==42# value is re-used! (nothing printed)# Re-setting an independent property invalidates (does not actually delete,# though) all "later" properties.inst.a=26/6assertinst.b==26# prints "computing b"
Package: dproxify
------------------------------------------------------dproxify is a object daemon proxifier for GNU/Linux(Python 3.x), released under the terms of GPL3 license.-------------------------------------------------------Any custom object which is pickleable, is loadedinto a detached daemon which communicate withclients (one at a time) through AFUnix sockets.With some exceptions (this is an alpha project),every call to object's methods through client isexecuted/computed on the daemon.
Package: dpsa4fl-bindings
Python bindings for dpsa4flWarning: This project is work in progress and should not be used in production. The current implementation is a prototype.The dpsa4fl project aims at providing a mechanism for secure and differentially private aggregation
of gradients in federated machine learning. For more information see theproject overview.About this packageThis package provides python bindings for thedpsa4fllibrary.
The following functionality is provided:Controller api: start a training session on the janus server, and collect aggregated gradients.Client api: securely submit gradients to the janus server.A modifiedjanus server setupis required,
see theexample projectfor step-by-step instructions.Development notesTo release a new version of this package, you have to:Increment the version number inCargo.toml.Push the current state to thereleasebranch. Then github actions will do the rest.
Alternatively, you can useactto run github actions locally.Usematurinto build the python package. To do so using thepoetrypython package manager, do the following in thedpsa4fl-bindingsfolder:poetry shell
maturin develop
Package: dpsbin
dpsbinComputes the probability mass function for an extended negative binomial distribution essential for accurate DPS calculations in a variety of turn/tick-based games.DescriptionCommon methods for estimating how long it takes to finish off an opponent in typical hack-and-slash games are inaccurate due to factors like overkill. Those crude calculations are often good enough, but in case they're not you can turn to this library to get an exact answer.Installationdpsbin requires Python 3 or greater and is available on PyPI.python -m pip install dpsbinAlternatively, the latest version can be easily downloaded and installed locally.git clone https://github.com/hmusgrave/dpsbin.git
cd dpsbin
python -m pip install -e .Using dpsbinThe only notable entry point isdpsbin.pmf. Suppose you want to know how many times you'll have to roll a 6-sided die to reach a total of 40 or more.import dpsbin, numpy as np, math

probs = dpsbin.pmf(6, 40)

# probs[k] is the probability you need to roll k times.
assert math.isclose(np.sum(probs), 1)

# easily find out how many rolls you'll need on average.
avg = np.dot(probs, np.arange(len(probs)))

# if you have a 90% chance to miss and not deal the 1d6 damage then
# you can use with_zeros() to translate the old probability mass array
# into one that accounts for zeros. Truncate to only considering up
# to 80 rolls.
hard_to_hit = dpsbin.with_zeros(80, .9, probs)
Package: dp-settings
InformationProvides a table "dp_settings" to store settings in a general way.
You can store strings and integers (most common settings) values by using the model.String is provided through value_string (TextField).
Integer is provided through value_int (IntegerField).Installationpip install dp-settingsExample Codeobject_ = DpSettings.objects.create()
object_.app_name = 'dp_settings'
object_.key = 'active'
object_.value_int = 1

object_ = DpSettings.objects.create()
object_.app_name = 'dp_settings'
object_.key = 'email_from'
object_.value_string = 'test@test.de'