Saravanan666/pypi-org huggingface dataset:
Package: dropconnect-tensorflow
Drop Connect - TensorflowAn implementation ofDrop-Connect Layerin tensorflow 2.x.
Implementation of layers of Dense, Conv2D, and Wrapper(for all TensorFlow Layers) has been done.DemoInstall$pipinstalldropconnect-tensorflowUsageFully-Connected Networkimporttensorflowastffromtensorflow.keras.layersimportDense,Inputfromdropconnect_tensorflowimportDropConnectDense# Create Fully-Connected NetworkX=tf.keras.layers.Input(shape=(784,))x=DropConnectDense(units=128,prob=0.2,activation="relu",use_bias=True)(X)x=DropConnectDense(units=64,prob=0.5,activation="relu",use_bias=True)(x)y=Dense(10,activation="softmax")(x)model=tf.keras.models.Model(X,y)# Hyperparametersbatch_size=64epochs=20# Compile the modelmodel.compile(optimizer=tf.keras.optimizers.Adam(0.0001),# Utilize optimizerloss=tf.keras.losses.SparseCategoricalCrossentropy(),metrics=['accuracy'])# Train the networkhistory=model.fit(x_train,y_train,batch_size=batch_size,validation_split=0.1,epochs=epochs)Convolution Networkimporttensorflowastffromtensorflow.keras.layersimportDense,Conv2D,Input,ReLU,BatchNormalization,Flatten,MaxPool2Dfromdropconnect_tensorflowimportDropConnectConv2D,DropConnectDense# Create Convolution NetworkX=tf.keras.layers.Input(shape=(28,28,1))x=DropConnectConv2D(filters=64,kernel_size=3,strides=(1,1),padding='valid',prob=0.1)(X)x=BatchNormalization()(x)x=ReLU()(x)x=MaxPool2D((2,2))(x)x=DropConnectConv2D(filters=128,kernel_size=3,strides=(1,1),padding='valid',prob=0.1)(x)x=BatchNormalization()(x)x=ReLU()(x)x=MaxPool2D((2,2))(x)x=Flatten()(x)x=DropConnectDense(units=64,prob=0.3,activation="relu",use_bias=True)(x)y=Dense(10,activation="softmax")(x)model=tf.keras.models.Model(X,y)# Hyperparametersbatch_size=64epochs=20# Compile the modelmodel.compile(optimizer=tf.keras.optimizers.Adam(0.0001),# Utilize optimizerloss=tf.keras.losses.SparseCategoricalCrossentropy(),metrics=['accuracy'])# Train the networkhistory=model.fit(x_train,y_train,batch_size=batch_size,validation_split=0.1,epochs=epochs)Wrapper(GRU, LSTM, Dense, Con2D, Conv1D, ...) Networkimporttensorflowastffromtensorflow.keras.layersimportDense,Input,LSTMfromdropconnect_tensorflowimportDropConnect# Create LSTM NetworkX=tf.keras.layers.Input(shape=(28,28))x=DropConnect(LSTM(128,return_sequences=True),prob=0.5)(X)x=DropConnect(LSTM(128),prob=0.5)(X)y=Dense(10,activation="softmax")(x)model=tf.keras.models.Model(X,y)# Hyperparametersbatch_size=64epochs=20# Compile the modelmodel.compile(optimizer=tf.keras.optimizers.Adam(0.0001),# Utilize optimizerloss=tf.keras.losses.SparseCategoricalCrossentropy(),metrics=['accuracy'])# Train the networkhistory=model.fit(x_train,y_train,batch_size=batch_size,validation_split=0.1,epochs=epochs)Citations@inproceedings{wan2013regularization,title={Regularization of neural networks using dropconnect},author={Wan, Li and Zeiler, Matthew and Zhang, Sixin and Le Cun, Yann and Fergus, Rob},booktitle={International conference on machine learning},pages={1058--1066},year={2013},organization={PMLR}}
Package: drop-duplicates-nested-list
Drops duplicates from nested list$pipinstalldrop-duplicates-nested-listfromdrop_duplicates_nested_listimportdrop_duplicatesL=['a',['aa','a'],'a',['aa','a'],['bb',['ccc','ddd'],'ee','ff'],'g','h',['bb',['ccc','ddd'],'ee','ff']]print(drop_duplicates(L))['a',['aa','a'],['bb',['ccc','ddd'],'ee','ff'],'g','h']
Package: dropduplicatesplanb
Drops duplicates in DataFrames with tedious dtypesTested against Windows / Python 3.11 / Anacondapip install dropduplicatesplanbimport pandas as pd
from dropduplicatesplanb import pd_add_drop_duplicates_planB

pd_add_drop_duplicates_planB()
df = pd.read_csv(
    "https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv"
)


df["baba"] = df.Embarked.apply(lambda q: [q, q, q, q])
df.loc[0, "baba"] = [[[1, 2, 34, 4, 2, 2, 34, 2, 1]]]
df.loc[1, "baba"] = [[[1, 2, 34, 4, 2, 2, 34, 2, 1]]]
df = pd.concat([df for x in range(2)], ignore_index=True)
df21 = df.d_drop_duplicates_planB(subset="baba")
df32 = df.d_drop_duplicates_planB(subset=["PassengerId", "Survived"])
df43 = df.d_drop_duplicates_planB(subset=["PassengerId", "Survived"], keep="first")
df54 = df.d_drop_duplicates_planB()
print(df)
print(df21)
print(df32)
print(df43)
print(df54)
Package: drope
DropeDrope is a utility for receiving file uploads. The primary goal of the project is simplicity. It takes one command to start the service and one drag and drop to upload the files.InstallationDrope is distributed via pip. If you have Python 3.6+ and pip installed, run the following command:pipinstalldropeUsageOnce installed, drope can be run as follows:dropeThe command will start a lightweight web server and host a page for uploading files.By default, the page is only accessible on localhost. If you want to host it on all network interfaces, consider adding the--host 0.0.0.0option. Seedrope --helpfor the list of options.ContributingIf you would like to help develop the project, you are welcome to open an issue or a pull request onGitHub.
Package: drop-generator
RPG Loot Drop EngineWhat started as a personal project of getting better at python and learning about lootboxes turned into something that might be useful to others.These sites helped me understand the basic concept and mechanics of loot boxes/tables:How to code monster loot dropsLoot Drop TablesWhen I stumbled across this two article series, I was "Booyah!!!!".  The original code was written in C#.  This project is my resulting translation.Loot-Tables, Random Maps and Monsters - Part ILoot-Tables, Random Maps and Monsters - Part IIDifferences between the original and this engine:The flagalwayswill always dropat leastone item from a table or of that item.  Initial testing showed thatalwayswould always dropone and onlyone.  To always dropone and only onealwaysanduniquewill both need to betrue.TheRandomizerwas not implementedTheIRDSObjectCreatorand subsequent code was not implemented.  I didn't see the need, based on what I was trying to do.Installpip install drop-generatorSample codefromdropgen.RDSTableimportRDSTablefromdropgen.RDSItemimportRDSItemif__name__=='__main__':loot_table=RDSTable(count=5)loot_table.add_entry(RDSItem("Ham Sandwich"))loot_table.add_entry(RDSItem("Felt Hat"))loot_table.add_entry(RDSItem("Diamond Ring"))loot_table.add_entry(RDSItem("Red Brick"))loot_table.add_entry(RDSItem("Feral Cat"))loot_table.add_entry(RDSItem("Empty Flask"))loot_table.add_entry(RDSItem("Someone's garbage"))results=loot_table.rds_resultprint("Simple loot drop. Everything has the same chance")forresultinresults:print(f"\t{result}")Code changes to try outFlags can be set atRDSItemorRDSTablecreation time or set/adjusted upon being added to the parentRDSTable.loot_table.add_entry(RDSItem("Feral Cat",probability=5))andloot_table.add_entry(RDSItem("Feral Cat"),probability=5)These two statements functionally achieve the same thing.The flags you can set.always: An item or item from a table willalwaysdrop at least once.  If enough items/tables are marked withalways, then actual drops could actually exceed what is defined (count)in the parent table.unique: If the item is selected, then it will be droppedonlyonce.probability: The probability of the item dropping.Wikipediaenabled: Will this item drop.
Package: dropkick
Automated cell filtering for single-cell RNA sequencing data.See ourGenome Research paperfor details ondropkick’s guiding principles and validation.dropkickworks primarily withscanpy’sAnnDataobjects, and accepts input files in.h5ador flat (.csv,.tsv) format. It also writes outputs to.h5adfiles when called from the terminal.Installation viapipor from source requires a Fortran compiler (brew install gccfor Mac users,sudo apt install gfortranfor Linux users).Install from PyPI:pipinstalldropkickOr compile from source:gitclonehttps://github.com/KenLauLab/dropkick.gitcddropkickpythonsetup.pyinstalldropkickcan be run as a command line tool or interactively with thescanpysingle-cell analysis suite.Usage from command line:dropkickrunpath/to/counts.h5adOutput will be saved in a new.h5adfile containing cell probability
scores, labels, and model parameters.You can also run thedropkick.qcmodule from terminal for a quick
look at the total UMI distribution and ambient genes, saved as*_qc.png:dropkickqcpath/to/counts.h5adSeedropkick_tutorial.ipynbfor an
interactive walkthrough of thedropkickpipeline and its outputs.Full documentation is available atKenLauLab.github.io/dropkick.
Package: dropland
DroplandMini-framework for building a backend servers for web-services using SQLAlchemy, Databases, Redis, RabbitMQ and APSchedulerHow to buildCreate a Python virtual environment.pyenv local 3.9.0pip install --upgrade pippoetry env use $(pyenv which python)pip install poetryInstall the projectpoetry install --no-root --extras "extras"Where extras may be in:sqla,db,redis,rmq,sqlite,pg,mysql,scheduler,fastapi,testStart the docker environment for developmentdocker-compose up -dRun testspoetry run pytestStop the docker environmentdocker-compose downUninstall the projectpip uninstall dropland -y
Package: droplet-dove
DoveA command line utility to help manage your development server in Digital OceanWhy?Developing on a remote environment provides several advantages over local development such as resource scaling, OS selection, security, and portability. However, as an unemployed student, paying 20-30 dollars a month for a hosted server directly impacts my food budget. Dove helps ease this burden by making it easy to snapshot/rebuild your environment. Given that snapshot pricing is 0.05/GB/month, dove helps reduce the cost of maintaining a remote environment when it's frequently idle.HowGenerate an API access token on Digital OceanhereInstall dove:pip install droplet_doveInitialize dove withdove initStart your droplet withdove upClean up your droplet and take a snapshot withdove downAdditional help:dove --helpHow Does It Work?Dove maintains all of its configuration in~/.dove_config.json. You can edit these values manually; however you can usedove initfor an initial population. Note that all properties under thedropletkey are passed directly to digital ocean (with exception to thesshkeysarray), so if addiitonal configuration is required it can be edited there.Dove UpCheck for a running droplet with the name specified in the dove config, abort if one existsFind the latest snapshot for the prefix provided in dove config or use the default snapshot if none existCreate the droplet with the configuration paramsWait for the droplet to startDove DownGet droplet based on name provided in dove config, abort if droplet not foundShutdown droplet and take a snapshotDestroy old snapshots with same prefixDestroy droplet
Package: droplo
Python client fordroplo.ioGetting startedInstall the client for your projectSimply run:pip install droploBasic example of use:>>>importdroplo>>>api=droplo.Api("YOUR_ACCESS_TOKEN")>>>blogposts=api.get("blogposts")>>>blogposts.files[0].nameUsing Memcached (or any other cache)By default, the kit will use Shelve to cache the requests (a file-based cache from the standard library). It is recommended to use a cache server instead, for example Memcached.You can pass a Memcached client to thedroplo.getcall:>>>importmemcache>>>api=droplo.Api("YOUR_ACCESS_TOKEN",cache=memcache.Client(['127.0.0.1:11211']))By duck typing you can pass any object that implement thesetandgetmethods (see theNoCacheobject for the methods
to implement).LicenceCopyright (c) 2018 Droplo, Inc. SeeLICENSEfor further details.
Package: dropman
InstallationTo install simply$pipinstalldropmanConfigurationDropManwill read the configuration file bydefaultfrom yourhome directory~/.dropmanbut you can also
create
the configuration file wherever you want and specify as an option$dropmanmy_command--config-path=path/to/my/.dropmanCreate the.dropmanconfiguration file in your home directory or in any .$touch~/.dropmanAdd the Digital Ocean API token to the configuration file:token:"YOURDIGITALOCEANAPITOKEN"RunTo list the options available:$dropman--helpList all droplets:$dropmanlistReboot a droplet:$dropmanreboot<id>Shutdown a droplet:$dropmanshutdown<id>Power On a droplet:$dropmanpoweron<id>Power Off (hard shutdown) a droplet:$dropmanpoweroff<id>Power Cycle (hard reboot)  a droplet:$dropmanpowercycle<id>
Package: drop-mod
Dropalso known as drop-modDrop is a Python module focused on providing moderation commands for chat-bots (i.e. Discord, Matrix.org, etc.)How do I use it?You can use it in chat-bots (for example,drop-discord)
or simply as a GUI app with the drop.gui app I made.python3 -m dropHow do I install it?There are 3 ways: either cloning the GitHub repository, usingpipor usingbuild.shCloning from GitHubClone this repository,by downloading this repository as a *.zip file,by cloning this repository using Gitorby going into this repository's releasesand downloading the latest release. If you download from this repository's release, you have the stable release. If you cloned this repository directly, you have a more "canary" release.Runsetup.pyusing your preferred Python installationUsingpipRunpip install drop-modUsingbuild.shNOTE:this willmost likelyonly work on Linux (or bash systems)Run./build.shIf you want to force reinstall, you can use./build.sh force_install.
Or if you want the opposite of that (no install at all), you can use./build.sh no_install.Drop should be installedunlesssetup.pythrew an error!To use it, importdropinto your Python scripts (or specific commands usingfrom drop.basic import owofy) and, well, use them!Example:fromdrop.basicimportowofyowofy("The quick brown fox jumps over the lazy dog.")# This is just a simple command to work with, hence why I use it as a prime example.# no im not a furry shhHHHHHH.F.A.Q.Q: Is this project abandoned?A:Yes.This project is really low in my priorities.Q: Are there any open images for this project?A:Yes,they are updated in a Gitdab repository.License linkQ: Can I use this for my own projects?A:Of course, it's a Python module! Just install it, set it up in your projects/scripts, and off you go!note: this Python module still has a license, please make sure your project respects the license.Q: who are you?A:a person why are you askingDependenciesNone of these packages listed below are included directly into this software!They are only installed fromPyPIwhen runningsetup.py!Parsedatetime, licensed underApache 2.0aiohttp, licensed underApache 2.0BeautifulSoup, licensed underMIT License
Package: droppy
Python contact angle image processing analysisA python script that follows a simple logical progression to reliably measure contact angles from image or video files. While the traditional methods for contact angle analysis typically rely on the user drawing tangent lines to droplets, which is both time consuming and can lead to bias in the analysis results, we attempt to automate this analysis to make the process both more robust and more amenable to high throughput data generation. The logic we use for this process is highlighted below:InstallationThe analysis script can be installed by cloning the repository into your desired working directory or via the following:$ pip install droppyWith thepipinstallation, the main script can be run from the command line by callingdroppy; otherwise it must be run from within a Python instance (see Use section below).DependenciesThe following packages must already be installed in your Python environment to contribute to the development of this project:numpyscipyscikit-imageimageiomatplotlibsetuptoolswheeltwinepytestpip:imageio-ffmpegpytest-subtestspytest-covUseDepending on the installation choice, the script can either be run from the command line:$ droppy path/to/files/of/interestIf you have installed as a developer, you can use the script by calling themain()function from the fileanalysis.pyParameter DefinitionsThe relevant threshold parameters that define where the tangent lines, baseline, and circle will be identified are most easily explained through the image below:These parameters can be accessed through the flags--baselineThreshold,--circleThreshold, and--linThresholdrespectively. Additional flags can be set and can be shown from the help accessed by$ droppy --helpDocumentationA GitHub pages site with the full documentation and API is providedhereCreditsContact angle measurement automation has also been performed bymvgorcum, which uses a different approach to fitting the tangents, but inspired our work here.ContributePlease don't hesitate to submit any issues that you may identify with the approach or the coding. We will try to respond quickly to any questions that may arise. If you would like to contribute to the project, feel free to make any pull requests that will make the solution more robust/efficient/better for your application, and we will do our best to incorporate it in the next release.
Package: dropship
DropshipLets try magic wormhole with a nice graphical interface.(click for video)InstallComing Soon™DevelopDocumentationSee ourwiki.Install for HackingInstallpoetryand then install the package locally.$ poetry installRun in Hackity Hack Hack Mode$poetryrundropshipUpdating dependenciesChange the bounds/versions/etc. in thepyproject.tomlRunpoetry updateCommit and push your changesThepoetry.lockfile helps us all get the same dependencies.Adding a Github MirrorWe use a Github mirror so we can have agratis automated release build.Add the following to the bottom of your.git/config.[remote "all"]
  url = ssh://gitea@vvvvvvaria.org:12345/rra/dropship.git
  url = git@github.com:decentral1se/dropship.gitThegit push -u all mainwill setupgit pushto automatically push to both remotes.Make a new ReleasePublishing binaries is disabled until we make further progress on#3$gittag$mytag# follow semver.org please$gitpushTheTravis CI configurationwill runa buildandpublish binaries here.
Package: dropsonde
# Cloud Foundry Dropsonde Protocol for PythonCompiled python generated from the Cloud Foundry Dropsonde Protobuf definition files.The [Dropsonde Protocol](https://github.com/cloudfoundry/dropsonde-protocol)
is defined here, and this repo provides “protoc” compiled Python and Python3
modules.## ExampleThe Standard protobuf files are referenced as follows.`python from dropsonde.pb import envelope_pb2 from dropsonde.pb import error_pb2 from dropsonde.pb import http_pb2 from dropsonde.pb import log_pb2 from dropsonde.pb import metric_pb2 from dropsonde.pb import uuid_pb2 `The UUID protobuf type is rather cryptic, so a utility function is included
for parsing the type into a UUID formatted string.`python >>> from dropsonde.util import get_uuid_string >>> application_guid = { ...   'low': '12413561682238894606', ...   'high': '3611542221973970511' ... } >>> application_guid =get_uuid_string(**application_guid)>>> print(application_guid)0ef23f83-94d4-45ac-e455-014268ec2103>>> `## DevelopmentTheMakefileprovides all core development tasks.### Install environmentmake installThis will1. clone the Dropsonde protobuf repo
1. install dependencies for python2
1. install dependencies for python3### Refactor and compile the protobuf filesmake compileThis will1. create a copy of the protobuf source files
1. refactor the “import” directives in the source files to match the required python package structure
1. run “protoc” on the refactored source files and output the generated Python code into the “dropsonde.pb” python package tree.### Testmake testThis will1. run the tests to ensure that imports work
1. ensure that the UUID conversion tool works### Cleanmake cleanThis will1. remove all the refactored protobuf files
1. remove the virtualenv environments for python2 and python3### Packagemake packageThis will only package the compiled python files usingsetup.py### Buildmake buildThis will1. run the “clone” task
1. run the “compile” task
1. run the “test” task
1. run the “package” task### Deploymake deployThis will1. run the “clean” task
1. run the “clone” task
1. run the “compile” task
1. run the “test” task
1. run thepython setup.py sdist uploadto deploy to PyPI.
Package: dropstackframe
dropstackframeA python library for dropping stack frames.This can be useful for removing decorators from stack traces, when using a framework with a lot of
decorators.ExampleLet's us write a small decorator for measuring the time it takes to call a function:fromtimeimportperf_counterdefmeasure_time(func):defwrapper(*args,**kwargs):before=perf_counter()result=func(*args,**kwargs)after=perf_counter()print(f"{func.__name__}took{after-before}s.")returnresultreturnwrapperWe can use it like this:@measure_timedeffoo(should_raise):assertnotshould_raisereturn42@measure_timedefbar(should_raise):returnfoo(should_raise)@measure_timedefbaz(should_raise):returnbar(should_raise)baz(False)On my computer this prints:foo took 2.2800122678745538e-07s.
bar took 3.576500057533849e-05s.
baz took 4.227000135870185e-05s.Great. But what happens if we raise an error?baz(True)yields:Traceback (most recent call last):
  File "example.py", line 32, in <module>
    baz(True)
  File "example.py", line 7, in wrapper
    result = func(*args, **kwargs)
  File "example.py", line 28, in baz
    return bar(should_raise)
  File "example.py", line 7, in wrapper
    result = func(*args, **kwargs)
  File "example.py", line 23, in bar
    return foo(should_raise)
  File "example.py", line 7, in wrapper
    result = func(*args, **kwargs)
  File "example.py", line 17, in foo
    assert not should_raise
AssertionErrorNotice how every other line is thewrapperfrom our decorator? If we have large codebase and it is
using a framework with a lot of decorators, this can make the stack traces hard to read, because
most of the frames are irrelevant decorators.We can use thedropstackframelibrary to rewrite our decorator:fromtimeimportperf_counterfromdropstackframeimportdrop_stack_framedefmeasure_time(func):defwrapper(*args,**kwargs):before=perf_counter()try:result=func(*args,**kwargs)exceptException:drop_stack_frame()raiseafter=perf_counter()print(f"{func.__name__}took{after-before}s.")returnresultreturnwrapperNow, if we get an error:baz(True)we get:Traceback (most recent call last):
  File "example2.py", line 37, in <module>
    baz(True)
  File "example2.py", line 33, in baz
    return bar(should_raise)
  File "example2.py", line 28, in bar
    return foo(should_raise)
  File "example2.py", line 22, in foo
    assert not should_raise
AssertionErrorand all the annoyingwrapperstack frames have been removed.DisablingdropstackframeLet's say you have a large codebase that usesdropstackframeand one day you have a bug that is
really hard to find. In fact you start suspecting that the bug might be hidden bydrop_stack_frame. You can useset_enable_drop_stack_frameto disabledrop_stack_frame:fromdropstackframeimportset_enable_drop_stack_frameset_enable_drop_stack_frame(False)baz(True)set_enable_drop_stack_framecan also be used as a context manager, if you only want to disabledrop_stack_framein a limited region of your code:fromdropstackframeimportset_enable_drop_stack_framewithset_enable_drop_stack_frame(False):baz(True)
Package: dropteabugmaker
一、安装（python版本建议3.7以上）pipinstalldubborequests二、升级包pipinstall--upgradedubborequests三、示例获取dubbo服务详情# 导入importdubborequests# 获取dubbo服务详情data=dubborequests.search('cn.com.xxx.sso.ehr.api.dubbo.SsoEmpInfoService')获取服务下的所有方法# 导入importdubborequests# 获取dubbo服务下的所有方法data=dubborequests.list('cn.com.xxx.sso.ehr.api.dubbo.SsoEmpInfoService')# 获取dubbo服务指定的方法data=dubborequests.list('cn.com.xxx.sso.ehr.api.dubbo.SsoEmpInfoService','login')通过zookeeper获取服务的ip和端口, Telnet命令测试dubbo接口importdubborequestsfromdubborequestsimportConfig# 先配置zookeeper中心地址Config.zookeeper_url_list=['192.168.240.15:2181','192.168.240.15:2182','192.168.240.15:2183']invoke_data={"service_name":"cn.com.xxxxx.sso.ehr.api.dubbo.SsoEmpInfoService","method_name":"login","data":{"account":"xxxx","password":"xxxx"}}# 通过zookeeper获取服务的ip和端口, Telnet命令测试dubbo接口data=dubborequests.zk_invoke(*invoke_data)Telnet命令测试dubbo接口importdubborequestsinvoke_data={"ip":'xxxx',"port":7777,"service_name":"cn.com.xxxxx.sso.ehr.api.dubbo.SsoEmpInfoService","method_name":"login","data":{"account":"xxxx","password":"xxxx"}}# Telnet命令测试dubbo接口data=dubborequests.telnet_invoke(*invoke_data)