Saravanan666/pypi-org huggingface dataset:
Package: dcicwrangling
DCIC-wranglingThis is a collection of scripts and Jupyter notebooks that can be helpful when performing many data wrangling tasks.  Most of the tools are specific to 4DN Nucleome wrangling needs, however may be modified to be more generally useful for certain tasks.InstallPackaged withpoetrycan be installed usingmake,poetryorpip.From the dcicwrangling directory -make buildIf you already have poetry installed -poetry installOr to pip install from PyPi -pip install dcicwranglingAll dependencies are installed by default - if for some reason you don't want to installpytestpackages orinvoke(used to launch notebooks) you can dopoetry install --no-dev- not recommended.UsageJupyter notebooksThere are a collection of commonly used jupyter notebooks in thenotebooks/useful_notebooksdirectory.  You can start a jupyter notebook server locally usinginvoke notebookfrom the top level directory.  This should launch the server and open a browser page where the notebooks can be accessed.IMPORTANT!- You should create your own folder in thenotebooksdirectory namedYourname_scripts.  This folder is where you should create, access and run your notebooks.  If you want to start with one of the notebooks in the useful_notebooks directory please create a copy and move it to your own folder.  This keeps the repository clean and organized.  PleaseDO NOTrun notebooks in the useful_notebooks directory and commit the results to the repository.ScriptsThe scripts directory contains some useful command line scripts.  They can be run from the top level directory usingpython scripts/script_name --options.  Using--helpshows available options.  In general, modified versions and bespoke scripts should not be committed to the repository - or alternatively committed to a separate non-master branch.As scripts are developed and refinedtool.poetry.scriptsdirectives can be added to facilitate script usage - seepyproject.tomlfile example.
Package: dcifr
DCiFRDCiFR (Demographic Characteristics in Facial Recognition) is a wrapper software that allows you to run deep learning models to parse demographic characteristics from an image. This open-source wrapper software written in Python has a GUI that will allow you to run complex models without any knowledge of coding. This includes functions fromdeepfaceandfairfaceand is built withPyQT5to provide the GUI.Getting StartedIf you do not already have Python installed, navigate tothis linkto install it.Download this repository to your local device.In the command line, change your working directory to <download path>.For initial run, enter the following in the command line.Windowsdcifr.shMacsh dcifr.shAfter the initial run, use the following code to run DCiFR.python3 dcifr.pyDeepFace AttributesBased on faces within images, DCIFR's DeepFace pipeline reports results of four attributes: age, emotion, gender, and race.Age - Predicted age will fall between 0 - 100.Emotion - One of seven possible emotions: Angry, Disgust, Fear, Happy, Sad, Surprise, Neutral.Gender - Reports either man or woman.Race - The software predicts the probability of falling into one of seven race categories: Asian, black, Indian, Latino/Hispanic, Middle Eastern, or white. The results show the racial category with the highest probability.More information on the attributes and how they are modeled can be foundhere.FairFace AttributesBased on faces within images, DCiFR's FairFace pipeline reports results of eight attributes: race, race4, gender, age, race_scores_fair, race_scores_fair_4, gender_scores_fair, and age_scores_fair.Race - Predicted probability of falling into one of seven race categories:  White, Black, Latino_Hispanic, East Asian, Southeast Asian, Indian, or Middle Eastern.Race4 - Predicted probability of falling into one of four race categories: White, Black, Asian, or Indian.Gender - Reports either male or female.Age - Predicted age will fall within the following ranges: 0-2, 3-9, 10-19, 20-29, 30-39, 40-49, 50-59, 60-69, or 70+.Race_scores_fair - The model confidence score for predicting race.Race_scores_fair_4 - The model confidence score for predicting race4.Gender_scores_fair - The model confidence score for predicting gender.Age_scores_fair - The model confidence score for predicting age.More information on the attributes and how they are modeled can be foundhere.OutputThe results will be saved in a DCIFR folder within the user's Documents asdcifr_Deepface_resultsordcifr_Fairface_resultswith the date and time of creation attached to the end of the file name.ReferencedeepfacefairfacePyQT5
Package: dcim-fau
DCIM_fauFeaturesAutonomous data collection via SNMPSupports Python 2.7 and upLightweight, no dependencies (non-standard, 2.7+)Available on PyPiAboutDCIM_fau is a Python program designed to simplify deploying and monitoring large SNMP-based networking interfaces.Getting StartedDCIM_fau is quick to deploy and even quicker to run.1. InstallationFirstly, pull the package from either PyPi or Github:$ pip install dcim_fauinstallation via pip package manager isalwayspreferred2.conf.yamlThe configuration file for DCIM_fau uses markdown to notate specific parameters required to run in a readable format.conf.yamlexamplesnmp:-COMM_STRING:'mySNMPsecret'chron:# collection interval (seconds)-COLL_INTERVAL:120# MYSQL connection infodb:-DB_HOST:'localhost'-DB_USER:'root'-DB_PASSWORD:'admin'-DB_NAME:'deebee'Youmustinclude yourconf.yamlin your DCIM_fau root directory, with all parameters validated.3. Initialize and RunInitialization:DCIM_fau utilizes Python'sconsole_scriptsentry point logic to simplify deployment and execution.To initialize, run the following command:$ scaffoldThis scaffolds the database, building the necessary structure for the provided equipment OIDs.Run:To start collection, run the following command:$ runThe MIT License (MIT)Copyright © 2018 Henry HerzfeldPermission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS 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.
Package: dcimg
dcimgThis module provides theDCIMGFileclass for accessing Hamamatsu DCIMG
files.InstallationpipinstalldcimgDocumentationTheDCIMGFileclass provides an interface for reading 3D Hamamatsu DCIMG
files.Usage is pretty straightforward. First of all, create aDCIMGFileobject:>>>my_file=DCIMGFile('input_file.dcimg')>>>my_file<DCIMGFileshape=2450x2048x2048dtype=<class'numpy.uint16'> file_name=input_file.dcimg>Image data can then be accessed using NumPy's basic indexing:>>>my_file[-10,:5,:5]array([[101,104,100,99,89],[103,102,103,99,102],[101,104,99,108,98],[102,111,99,111,95],[103,98,99,104,106]],dtype=uint16)Other convenience methods for accessing image data are:zslice,zslice_idx,frameandwhole.DCIMGFilesupports context managers:withDCIMGFile('input_file.dcimg')asf:a=f[800,...]For further details refer to:https://lens-biophotonics.github.io/dcimg/
Package: dcipher
Dcipher Workflows API Python libraryThe Dcipher Workflows Python library provides convenient access to the Dcipher Workflows API from any Python 3.7+
application. It offers both synchronous and asynchronous clients powered byhttpx.DocumentationThe REST API documentation can be found onapp.dcipheranalytics.com/workflowsInstallationpipinstalldcipherUsageimportosfromdcipherimportDcipherclient=Dcipher(# This is the default and can be omittedapi_key=os.environ.get("DCIPHER_API_KEY"),)client.run_flow(flow_id="65cf2f3e..",params={"param1":"...","param2":"...."},# param names are set by workflow usersave_path="output.json",)While you can provide anapi_keykeyword argument,
we recommend usingpython-dotenvto addDCIPHER_API_KEY="my-dcipher-api-key"to your.envfile
so that your API Key is not stored in source control.Async usageSimply importAsyncDcipherinstead ofDcipherand useawaitwith each API call:importosimportasynciofromdcipherimportAsyncDcipherclient=AsyncDcipher(# This is the default and can be omittedapi_key=os.environ.get("DCIPHER_API_KEY"),)asyncdefmain()->None:awaitclient.run_flow(flow_id="65cf2f3e..",params={"param1":"...","param2":"...."},# param names are set by workflow usersave_path="output.json",)asyncio.run(main())Functionality between the synchronous and asynchronous clients is otherwise identical.Handling errorsWhen the API returns a non-success status code (that is, 4xx or 5xx
response), a subclass ofAPIStatusErroris raised, containing an error message.In case Timeout or Connection errors occur, the client auto-retries with exponential back-off usingtenacity.Error codes are as follows:Status CodeError Type400BadRequestError401AuthenticationError403PermissionDeniedError404NotFoundError422UnprocessableEntityError429RateLimitError>=500InternalServerErrorRetriesCertain errors are automatically retried by default, with a short exponential backoff.
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
429 Rate Limit, and >=500 Internal errors are all retried by default.You can use themax_retriesoption to configure or disable retry settings.AdvancedLoggingWe use the standard libraryloggingmodule.You can enable logging by setting the environment variableDCIPHER_LOGtodebug.$exportDCIPHER_LOG=debugRequirementsPython 3.7 or higher.
Package: dcitools
AboutThis library attempts to provide a functional and simple python package to manipulate, through their API, different digital cinema servers, players, and theatre management system.The only brand actually supported is Doremi (company now bought by Dolby).Current supported machines are :DCP2000DCP-2K4ShowVaultIMS1000Coming next:Doremi TMSAAM TMSUnique TMSGDC serversOld Dolby serversSony ?Qube (someday maybe, haha, I can’t wait to code with their API again, it is a bloody joke)Project url :https://github.com/ronhanson/python-dcitoolsUsage*Lib Usage*Library is going to be documented in the docs folder.
But it is not yet for now… so just look at the code as it is commented for that.*Script Usage*Scripts have been created in order to use DCP2000 apis directly from command lines.
This scripts is named doremi.py and its usage can be found by typing :bin/doremiapi –helpThat should be fairly simple.For example, to list the CPL on a server :bin/doremiapi execute 172.17.10.109 GetCPLListTo get information about a CPL :bin/doremiapi x 172.17.10.109 GetCPLInfo 851cc838-022e-43b7-9fee-18656bdfc995CompatibilityThis libraries are used most on Linux and OSX systems, but plenty of functions may work on windows.This libraries are compatibles with Python 2.X and Python 3.X.Mainly tested on 2.7 and 3.4.Author & LicenceCopyright (c) 2007-2015 Ronan DelacroixThis program is released under MIT Licence. Feel free to use it or part of it anywhere you want.
Package: dci-umb
DCI UMBDCI UMB is a tool that listen on an amqps broker, filter on a specific topic and propagate any event via http post request.TLDR$sudoyum-yinstallhttps://packages.distributed-ci.io/dci-release.el7.noarch.rpm$sudoyum-yinstalldci-umb$dci-umb\--key./broker.key\--crt./broker.crt\--ca./broker.ca\--brokeramqps://example.org:5671\--sourcetopic://VirtualTopic.eng\--destinationhttp://localhost:5000/eventsRun as a serviceIf you want to run dci-umb as a systemd service, you can edit/etc/dci-umb/configfile and modify the config.
Then you can runsystemctl start dci-umbExampleCreate a python virtual environmentpython3 -m venv venv
source venv/bin/activateInstall dependenciespip install -r sandbox/requirements.txt
pip install -r requirements.txtStart the sandbox server:python sandbox/server.pyIn another terminal start dci-umb with parameterssource venv/bin/activate
PYTHONPATH=. python dci_umb/main.py \
    --key ./broker.key \
    --crt ./broker.crt \
    --ca ./broker.ca \
    --broker amqps://example.org:5671 \
    --source topic://VirtualTopic.eng \
    --destination http://localhost:5000/events
Package: dckit
DCKitis a graphical toolkit for performing several data editing
tasks that would otherwise be only available via thedclab command-line interfaceor (for the .rtdc file format) via external tools such asHDFView.InstallationA Windows installer and macOS packages are available from therelease page.
If you have Python 3 installed, you may also use pip to install DCKit:# install dckit
pip install dckit
# run dckit
dckitUsageThe interface is mostly self-explanatory. Add measurements via the options
in theFilemenu or by drag-and-dropping files into DCKit. You may edit
entries in theSamplecolumn and apply the changes via theUpdate sample namesbutton on the right.Testingpip install -e .
python -m pytest tests
Package: dckrctrrunlist
Run container via API and get running containers.. image::https://img.shields.io/codecov/c/github/codecov/example-python.svgcreateJson.py- Script create Json output(docker psexecute outout) from running containers.echoTest.py- Simple API to learn.dockerApi.py- This script must be executed in the Web server or Flask default web server.=====
UsageRequirements:
Python2.7 or Python3.4 withflaskmust be installed:Syntax:.. code-block:: bash# pip install flask
# git clone https://github.com/jamalshahverdiev/python-general-codes.git
# cd python-general-codes/simple-docker-flask-api
# ./dockerApi.py..Get contaner status with the nameweb:.. code-block:: bash# curl http://10.1.42.201/getcontainer?name=web..Get status of all running containers:.. code-block:: bash# curl http://10.1.42.201/getRunningContainers..Create new container with the payload data fromjsondata.jsonfile. In the JSON file we must define values of the needed fields.imagename- in the value must be defined image name fromhttps://hub.docker.comcontainername- in the value must be defined container name which will be executed in the serverexposedPort- in the value must be defined the port number which will be exposed to the Host OS.. code-block:: bash# curl -v -s -XPOST -H "Content-type: application/json" http://10.1.42.201/createcontainer -d @jsondata.json..
Package: dclab
This is a Python library for the post-measurement analysis of
real-time deformability cytometry (RT-DC) datasets; an essential part ofShape-Out.DocumentationThe documentation, including the code reference and examples, is available atdclab.readthedocs.io.Installationpip install dclab[all]For more options, please check out thedocumentation.Information for developersContributingThe main branch for developing dclab is master.
If you want to make small changes like one-liners,
documentation, or default values in the configuration,
you may work on the master branch. If you want to change
more, please (fork dclab and) create a separate branch,
e.g.my_new_feature_dev, and create a pull-request
once you are done making your changes.
Please make sure to edit theChangelog.Very important:Please always try to usegit pull --rebaseinstead of:git pullto prevent non-linearities in the commit history.Testsdclab is tested using pytest. If you have the time, please write test
methods for your code and put them in thetestsdirectory. To run
the tests, installpytestand run:pytest testsDocsThe docs are built withsphinx. Please make
sure they compile when you change them (this also includes function doc strings):cd docs
pip install -r requirements.txt
sphinx-build . _build  # open "index.html" in the "_build" directoryPEP8We use flake8 to enforce coding style:pip install flake8
flake8 --exclude _version.py dclab
flake8 docs
flake8 examples
flake8 testsIncrementing versionDclab gets its version from the latest git tag.
If you think that a new version should be published,
create a tag on the master branch (if you have the necessary
permissions to do so):git tag -a "0.1.3"
git push --tags originAppveyor and GitHub Actions will then automatically build source package and wheels
and publish them on PyPI.
Package: dclick
DclickExtend click functionnalities by allowing parameters to be passed in a config file.Free software: BSD licenseFeaturesImplement a new decorator ‘command_with_config’ which enables to pass default values for click options in a config filePerforms the same checks as click regarding values passed in config file (ex: check if path exists)Seamless integration with click, just replaceclick.commandwithdclick.command_with_configWith click you would have to pass a default value directly in the codefromclickimportcommandfromclickimportoption@command()@option('-n','--n-epochs',type=int,default=5,help='Number of epochs to train the model')deftrain(n_epochs):run_training_for(n_epochs)if__name__=='__main__':train()However, if you want to run this code with different parameters you would have to edit the code each time
or pass them in the command line. Both these solutions are not satisfying for automation and versioning.
Imagine that you want to run your code inside a docker without the possibility to use the command line,
like you are working with a managed platform on the cloud.
Withdclickyou just have to change one line:fromdclickimportcommand_with_configfromclickimportoption@command_with_config('path_to_config.json')@option('-n','--n-epochs',type=int)deftrain(n_epochs):run_training_for(n_epochs):if__name__=='__main__':train()Just be careful that the name in the config matches the name of the option.dclicktakes care of the rest.
You can pass a config as json, yaml or txt. Json and yaml are preferred.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-06-23)First release on PyPI.
Package: dclient
dclientA client CLI utility forDatasetteinstances.Much of the functionality requires Datasette 1.0a2 or higher.Things you can do with dclientRun SQL queries against Datasette and returning the results as JSONRun queries against authenticated Datasette instancesCreate aliases and store authentication tokens for convenient access to DatasetteInsert data into Datasette using theinsert API(Datasette 1.0 alpha or higher)InstallationInstall this tool usingpip:pipinstalldclientIf you want to install it in the same virtual environment as Datasette (to use it as a plugin) you can instead run:datasetteinstalldclientRunning a querydclientqueryhttps://latest.datasette.io/fixtures"select * from facetable limit 1"To shorten that, create an alias:dclientaliasaddfixtureshttps://latest.datasette.io/fixturesThen run it like this instead:dclientqueryfixtures"select * from facetable limit 1"DocumentationVisitdclient.datasette.iofor full documentation on using this tool.DevelopmentTo contribute to this tool, first checkout the code. Then create a new virtual environment:cddclient
python-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: dclimplode
dclimplodea (light) binding forhttps://github.com/madler/zlib/blob/master/contrib/blast/blast.candhttps://github.com/ladislav-zezula/StormLib/blob/master/src/pklib/implode.cDCL stands forPKWARE(R) Data Compression Library.o = dclimplode.compressobj()
s = o.compress(b'hello')+o.flush()
o = dclimplode.decompressobj()
o.decompress(s) == b'hello'tested versionsPython 2.7Python 3.9PyPy [2.7] 7.3.3PyPy [3.7] 7.3.5For PyPy2, pip needs to be 20.1.x cfhttps://github.com/pypa/pip/issues/8653PyPy needs to be 7.3.1+ cfhttps://github.com/pybind/pybind11/issues/2436Pyston [3.8] 2.3special thankshttps://github.com/JoshVarga/blastshowed dclimplode compression by Ladislav Zezula (I knew dclimplode decompression in zlib for a long time though)unlikedeflate64 infback9, making dclimplode blast resumable does not look possible (for me). instead I used threaded decoder. basic idea is fromhttps://github.com/miurahr/pyppmd/pull/33#issuecomment-894676975('s linked commit f224a04).
Package: dclist.py
DCList.net Python SDKThis module is official python sdk for dclist.net.It's open-source and always open to prs and contributions.InstallationYou can install package viapiporgithubwith following commands :Recomended:pip install dclist.pyorgitclonehttps://github.com/dclist/python-sdk.gitcdpython-sdk
python-mvenvenv
pipinstall.Gettings StartedPosting botstats automaticly as a Cog:importdclistfromdiscord.extimportcommands,tasksclassdclistpy(commands.Cog):def__init__(self,bot):self.bot=botself.dclistapi=dclist.DCLClient(bot,"YOUR_TOKEN_HERE")# you can get the token from your bot's page on dclist.net# you have option to pass your token as environment variable as `DCLIST_TOKEN`self.update_stats.start()defcog_unload(self):self.update_stats.cancel()@tasks.loop(minutes=30.0)asyncdefupdate_stats(self):awaitself.bot.wait_until_ready()try:awaitself.dclistapi.postBotStats()exceptdclist.DCListExceptionase:print(e)# print sucs lol use logger instead :walter_the_dog:else:print('Posted stats to dclist.net successfully')defsetup(bot):bot.add_cog(dclistpy(bot))Getting bot or user info from api:@commands.group(invoke_without_command=True)asyncdefdclist(self,ctx):awaitctx.send('available commands -> `dclist bot` `dclist user` `dclist voted`')@dclist.command(name="bot")asyncdefget_dclist_bot(self,ctx,bot_id):bot=awaitself.dclistapi.getBotById(bot_id)to_send=f"found bot{bot['username']}using this github{bot['github']}and vote_count is{bot['stats']['voteCount']}"awaitctx.send(to_send)@dclist.command(name="me")asyncdefget_dclist_user(self,ctx):user=awaitself.dclistapi.getUserById(ctx.author.id)to_send=f"found user{user['username']}using this website{user['website']}and discriminator is{user['discriminator']}"awaitctx.send(to_send)@dclist.command(name="voted")asyncdefget_dclist_user(self,ctx,user_id):is_voted=awaitself.dclistapi.isUserVoted(user_id)ifis_voted:awaitctx.send('yessir, i did voted from this dude.')else:awaitctx.send('this user is not voted :(')MoreYou can use sdk to get more information likegetUserComment.
Package: dc-logging
dc-loggingThis is a tiny library to quickly and easily set up loggers in many projects.Isn't it easy and simple enough already just to use theloggingbuilt-in?Well, yes and no.It's quite simple to use indeed but I have a number of predefined defaults that
I always like to use and it makes no sense for me to repeat those in several
different projects. Instead, this library always assumes those defaults and I
can still customize by passing different configurations when getting a logger or
by using the methods of the built-inlogginglibrary after getting a logger.The usage is quite evident from reading the code, and small enough so to prevent
me from wanting to duplicate that here (for now).