Saravanan666/pypi-org huggingface dataset:
Package: abcd
UsageFull documentation athttp://digger-build-cli.readthedocs.io.RequirementsIf running outside a container:Download and install conda:http://conda.pydata.org/miniconda.htmlAfter cloning the repository run:condaenvcreate-fenv.yamlpython=3.5.1To activate the environment run (might need a new terminal window or
reload bashrc/bash_profile):source activate diggerYou will also need Node 4.x, NPM, Cordova >=6 and Java 8 on your
machine.Some requirements are needed to run it outside of a container:Installationpythonsetup.pyinstallTestsRequirementsInstalling development dependencies:pipinstall-rrequirements.txtTests will download all templates from their Github repository (master
branch) and will try to build it.If running outside of the containerPrepare# create a folder for Gradle cachemkdir/gradle-cache# make sure you have write permissionschown-R${USER}/gradle-cacheAlso, make sure you have Android SDK on your machine and$ANDROID_HOMEis set.setup.pypythonsetup.pytestusing py.test directly (from digger project root folder)py.test-sRunning an individual testFor example:py.test-stests/test_build.py
Package: abcddb2vcard
abcddb2vcardThis python script reads an AddressBook database file (AddressBook-v22.abcddb) and export its content to a vCard file (.vcf).I created this script to automate my contacts backup procedure.
The output of this script should be exactly the same as dragging and dropping the “All Contacts” card.Usagepython3abcddb2vcard.pybackup/contacts_$(date+"%Y-%m-%d").vcfassuming db is located at "~/Library/Application Support/AddressBook/AddressBook-v22.abcddb"Export into individual filespython3abcddb2vcard.pyoutdir-s'path/%{fullname}.vcf'Extract contact imagespython3vcard2image.pyAllContacts.vcf./profile_pics/Supported data fieldsfirstname,lastname,middlename,nameprefix,namesuffix,nickname,maidenname,phonetic_firstname,phonetic_middlename,phonetic_lastname,phonetic_organization,organization,department,jobtitle,birthday,[email],[phone],[address],[socialprofile],note,[url],[xmpp-service],image,iscompanyLimitationsTheimagefield currently only supports JPG images.
I have honestly no idea where PNG images are stored.
For PNGs the database only stores a UUID instead of the file itself.
If you happen to know where I can find these, open an issue or pull request.DisclaimerYou should check the output for yourself before using it in a production environment.
I have tested the script with many arbitrary fields, however there may be some edge cases missing.
Feel free to create an issue for missing or wrong field values.Note:The output ofdifforFileMerge.appcan be different to this output.
Apples does some weird transformations on vcf export that are not only unnecessary but in many cases break the re-import of the file.
Package: abc-delegation
abc-delegationA tool for automated delegation with abstract base classes.This metaclass enables creation of delegating classes
inheriting from an abstract base class.This technique is impossible with regular__getattr__approach for delegation,
so normally, you would have to define every delegated method explicitly.
Not any moreThe metaclasses also enable optional validation of the delegate attributes
to ensure they have all of the methods required by the parent object.Installation:pip install abc-delegationBasic usage:fromabcimportABCMetafromabc_delegationimportdelegation_metaclassclassA(metaclass=ABCMeta):@abstractmethoddefbar(self):pass@abstractmethoddeffoo(self):passclassB:defbar(self):return"B bar"deffoo(self):return"B foo"classC(A,metaclass=delegation_metaclass("my_delegate")):def__init__(self,b):self.my_delegate=bdeffoo(self):return"C foo"c=C(B())assertc.foo()=="C foo"assertc.bar()=="B bar"ValidationclassA(metaclass=ABCMeta):@abstractmethoddefbar(self):pass@abstractmethoddeffoo(self):passclassB:pass# validation is on by defaultclassC(A,metaclass=delegation_metaclass("_delegate")):def__init__(self,b):self._delegate=bdeffoo(self):return"C foo"C(B())# Trying to instantiate C class with B delegate which is missing 'bar' method# Validation raises an error:# TypeError: Can't instantiate bar: missing attribute bar in the delegate attribute _delegateMultiple delegates:fromabcimportABCMetafromabc_delegationimportmulti_delegation_metaclassclassA(metaclass=ABCMeta):@abstractmethoddefbar(self):pass@abstractmethoddeffoo(self):pass@abstractmethoddefbaz(self):passclassB:defbar(self):return"B bar"deffoo(self):return"B foo"classX:defbaz(self):return"X baz"classC(A,metaclass=multi_delegation_metaclass("_delegate1","_delegate2")):def__init__(self,d1,d2):self._delegate1=d1self._delegate2=d2deffoo(self):return"C foo"c=C(B(),X())assertc.bar()=="B bar"assertc.foo()=="C foo"assertc.baz()=="X baz"Please refer to the unit tests for more examples.
Package: abcd-pyhf
pyhf-based implementation of the ABCD method for background estimationInstructions for LXPLUSThe code can be run on LXPLUS by following the instructions below.Create a virtual Python environment:python3-mvenvabcd-pyhfThis will create a directory namedabcd-pyhfthat will contain all the necessary packages to run the code.
Activate the virtual Python environment with the following command:sourceabcd-pyhf/bin/activateYou can shut down the virtual Python environment at any time with the Bash commanddeactivate.
You can later reactivate the environment by running the Bash commandsource abcd-pyhf/bin/activate.To run the code, you will have to download the necessary packages in the Python environment (this only needs to be done once):pipinstall--upgradepip
pipinstallabcd-pyhfYou can then use the package in Python:fromabcd_pyhfimportABCD
Package: abcdrl
abcdRL(Implement a RL algorithm in four simple steps)English |简体中文abcdRL is aModular Single-file Reinforcement Learning Algorithms Librarythat provides modular design without strict and clean single-file implementation.When reading the code, understand the full implementation details of the algorithm in the single file quickly; When modifying the algorithm, benefiting from a lightweight modular design, only need to focus on a small number of modules.abcdRL mainly references the single-file design philosophy ofvwxyzjn/cleanrland the module design ofPaddlePaddle/PARL.Documentation ➡️docs.abcdrl.xyzRoadmap🗺️#57🚀 QuickstartOpen the project in Gitpod🌐 and start coding immediately.Using Docker📦:# 0. Prerequisites: Docker & Nvidia Drive & NVIDIA Container Toolkit# 1. Run DQN algorithmdockerrun--rm--gpusallsdpkjc/abcdrlpythonabcdrl/dqn.pyFor detailed installation instructions 👀🐼 Features👨‍👩‍👧‍👦 Unified code structure📄 Single-file implementation🐷 Low code reuse📐 Minimizing code differences📈 Tensorboard & Wandb support🛤 PEP8(code style) & PEP526(type hint) compliant🗽 Design Philosophy"Copy📋",not "Inheritance🧬""Single-file📜",not "Multi-file📚""Features reuse🛠",not "Algorithms reuse🖨""Unified logic🤖",not "Unified interface🔌"✅ Implemented AlgorithmsWeights & Biases Benchmark Report ➡️report.abcdrl.xyzDeep Q Network (DQN)Deep Deterministic Policy Gradient (DDPG)Twin Delayed Deep Deterministic Policy Gradient (TD3)Soft Actor-Critic (SAC)Proximal Policy Optimization (PPO)Double Deep Q Network (DDQN)Prioritized Deep Q Network (PDQN)Citing abcdRL@misc{zhao_abcdrl_2022,author={Yanxiao, Zhao},month={12},title={{abcdRL: Modular Single-file Reinforcement Learning Algorithms Library}},url={https://github.com/sdpkjc/abcdrl},year={2022}}
Package: abcEconomics
abcEconomics is a Python based modeling platform for economic simulations.
abcEconomics comes with standard functions to simulations of trade, production
and consumption. The modeler can concentrate on implementing
the logic and decisions of an agents; abcEconomics takes care of all exchange
of goods and production and consumption.In abcEconomics, goods have the physical properties of
goods in reality in the sense that if agent A gives a good to agent B, then
- unlike information - agent B receives the good and agent B does not have
the good anymore.
The ownership and transformations (production or consumption) of goods are
automatically handled by the platform.abcEconomics models are programmed in standard Python, stock functions of agents
can be inherited from archetype classes (Firm or Household). The only
not-so-standard Python is that agents are executed in parallel by the
Simulation class (in start.py).abcEconomics allows the modeler to program agents as ordinary Python class-objects,
but run the simulation on a multi-core/processor computer. It takes no
effort or intervention from the modeler to run the simulation on a
multi-core system.
The speed advantages of using abcEconomics with multi-processes enabled.
abcEconomics are typically only observed for 10000 agents and more. Below, it
might be slower than pure python implementation. abcEconomics supports pypy3,
which is approximately 10 times faster than CPython.abcEconomics is a scheduler and a set of agent classes.
According to the schedule the simulation class calls - each sub-round - agents
to execute some actions. Each agent executes these actions
using some of the build-in functions, such as trade, production and
consumption of abcEconomics. The agents can use the full set of commands of the
Python general purpose language.The audience of abcEconomics are economists that want to model agent-based
models of trade and production.abcEconomics does support an accounting framework
for financial simulations.ESL can be downloaded here.abcEconomics runs on macOS, Windows, and Linux. abcEconomics runs 10x faster on pypy!Install with:pip3 install abcEconomicsThe documentation is here:http://abce.readthedocs.io/An example is here:Insurance MarketA code example is here:Jupyter TutorialMore code examples are here:https://github.com/AB-CE/examples
Package: abcFinance
Economic agent-based models with financial accountingabcFinance (short for 'agent-based computational Finance') provides tools for using standard double-entry bookkeeping methods either directly or within an agent-based modelling framework. It is a sister library to theabcEconomics(agent-based computational Economics) library.Direct use of double-entry bookkeeping toolsTheLedgerclass implements an accounting system. Booking statements are recorded through thebook()method. The basic syntax works as follows:accountingsystem = Ledger()
accountingsystem.make_stock_accounts('Assets', 'Liabilities')
accountingsystem.book(debit=[('Assets',100)], credit=[('Liabilities',100)]wheredebitandcreditare lists of tuples('account', amount)of accounts that should be booked byamounton the debit and credit side, respectively. The total sum of debits and credits needs to be equal in one booking statement. Accounts have to be declared as either stock or flow accounts before they can be booked.The balance sheet is composed of all stock accounts and includes an equity account whose name can be set using the optionalresidual_account_nameflag in the constructor ofLedger. The profit and loss statement is composed of all flow accounts. It can be viewed using theprint_profit_and_loss()statement. The profit or loss for the period can be booked against equity using thebook_end_of_period()method, which also resets all flow accounts. The balance sheet can be printed using theprint_balance_sheet()method.draw_balance_sheet()returns the string representation of an SVG image of the balance sheet. Several other helpful methods are available.Extensive examples can be found in theexamples\money_creationfolder.Use in an agent-based modelling systemTheLedgerclass can be used as an attribute for anAgentclass in an agent-based modelling system, enabling the use of financial accounting within agent-based models. One implementation is provided in the form of theAbcFinanceAgentclass, which inherits from theAgentclass in theabcEconomicslibrary. abcEconomics is designed to be compatible with abcFinance and provides several methods to facilitate the use of abcFinance methods in agent-based models. The accounting system provided in abcFinance can in principle be used with any agent-based modelling system.
Package: abcgh
Web-Statsgenerate website reportsWeb-stats is a simple library that allows you to generate website reports in less than 60 seconds , by scraping data frominsites.comonly10requests/ip are allowedyou will have to use proxiesonly60 secondsto generate a reportInstallationpipinstallweb-statsUsageimportgenerate_reportfromweb-statsgenerate_report('https://www.dafk.net/what/')Output example[{'name':'Overall','rating':'good','value':'6.7'},{'name':'Accessibility','rating':'better','value':'8.3'},{'name':'Experience','rating':'good','value':'5.2'},{'name':'Marketing','rating':'good','value':'5.1'},{'name':'Technology','rating':'better','value':'8.1'},{'name':'Twitter','value':'0.0'},{'name':'Analytics','value':'0.0'},{'name':'Printability','value':'0.0'},{'name':'Freshness','value':'0.0'},{'name':'Meta tags','value':'1.0'},{'name':'Mobile','value':'3.0'},{'name':'Popularity','value':'5.6'},{'name':'Amount of content','value':'7.8'},{'name':'Server behavior','value':'10.0'},{'name':'Page titles','value':'10.0'},{'name':'Headings','value':'10.0'},{'name':'Incoming links','value':'10.0'},{'name':'Images','value':'10.0'},{'name':'Internal links','value':'10.0'},{'name':'URL format','value':'10.0'},{'name':'Domain age','value':'i'}]LicenseMITfree stuff , hell yeah !
Package: abc-graphene-sqlalchemy
Please readUPGRADE-v2.0.mdto learn how to upgrade to Graphene2.0.Graphene-SQLAlchemyASQLAlchemyintegration forGraphene.InstallationFor instaling graphene, just run this command in your shellpipinstall"graphene-sqlalchemy>=2.0"ExamplesHere is a simple SQLAlchemy model:fromsqlalchemyimportColumn,Integer,Stringfromsqlalchemy.ormimportbackref,relationshipfromsqlalchemy.ext.declarativeimportdeclarative_baseBase=declarative_base()classUserModel(Base):__tablename__='department'id=Column(Integer,primary_key=True)name=Column(String)last_name=Column(String)To create a GraphQL schema for it you simply have to write the
following:fromabc_graphene_sqlalchemyimportSQLAlchemyObjectTypeclassUser(SQLAlchemyObjectType):classMeta:model=UserModelclassQuery(graphene.ObjectType):users=graphene.List(User)defresolve_users(self,info):query=User.get_query(info)# SQLAlchemy queryreturnquery.all()schema=graphene.Schema(query=Query)Then you can simply query the schema:query='''
    query {
      users {
        name,
        lastName
      }
    }
'''result=schema.execute(query,context_value={'session':db_session})To learn more check out the followingexamples:Full example:Flask SQLAlchemy
exampleContributingAfter cloning this repo, ensure dependencies are installed by running:pythonsetup.pyinstallAfter developing, the full test suite can be evaluated by running:pythonsetup.pytest# Use --pytest-args="-v -s" for verbose mode
Package: abch-tree-sitter-solidity
🌴 tree-sitter-solidity💡 this grammar is still in development, the structure of the generated AST is not stableThis repository contains a grammar fortree-sitter.The goal of this project is to provide an parser efficient low-dependency parser for solidity which targets most solidity versions in use and is designed for enabling metaprogramming.Navigating this repositoryThe primary file in this repository isgrammar.jswhich describes the tree-sitter grammar.# Primary file:
grammar.js
# Tests:
/test/**/*

# Auto generated:
/src/**/*
index.js
binding.gypReferences-> Ethereum solidity grammar:https://github.com/ethereum/solidity/blob/develop/docs/grammar/SolidityParser.g4https://github.com/ethereum/solidity/blob/develop/docs/grammar/SolidityLexer.g4https://docs.soliditylang.org/en/latest/grammar.html?#-> Tree-sitter javascript grammar:https://github.com/tree-sitter/tree-sitter-javascript/blob/master/grammar.js-> Solidity antlr grammar:https://github.com/ConsenSys/solidity-parser-antlrMajor inspriration & some structures have been taken from tree-sitter-javascript, a big thanks to the contributors to this repo!
Package: abclient
abclientis a client library for EISOO AnyBackup APIs.abclientallows openstack-karbor to create backups for databases and filesystems.InstallationTo install abclient, simply:$pipinstallabclientHow to use>>>fromabclientimportbackup_manager>>>ab=backup_manager.eisooBackupManager('IP_ADDR','MACHINE_CODE')>>>ab.start_backup(...)API SupportCreate backup for ORACLE Databasemore API will be supported in the future.LicenseApache License Version 2.0http://www.apache.org/licenses/LICENSE-2.0
Package: abcLR
ARTIFICIAL BEE COLONY ALGORITHM WITH LOGISTIC REGRESSION (ABC-LR)ABC-LR is a binary classification method in which the ABC algorithm is used instead of the Gradient Descent algorithm to train the weights in the Logistic Regression classification model. The purpose of the ABC algorithm in the ABC-LR method is to minimize the value of the cost function. The ABC algorithm is a very popular metaheuristic method that can search for solutions both locally and globally in the solution space. In addition, it has been shown in the study that the ABC-LR classification method achieves superior classification success compared to the LR classification method.Although the ABC-LR classification method can handle complex and high-dimensional data, its runtime can be high. Therefore, CPU and GPU parallelized versions of the ABC-LR classification method are presented here, and significant improvements in runtime can be achieved.ABC-LR is written in Python3 and continuously tested with Python 3.7 and 3.10.InstallationInstall ABC-LR via PyPI:pip install abcLROr alternatively, clone the environment:git clone https://github.com/kagandedeturk/ABC-LR.gitCPU Version UsageimportnumpyasnpparallelType=npfromabcLRimportABC_LR_Modelfromsklearn.datasetsimportload_breast_cancerX,y=load_breast_cancer(return_X_y=True)y=y.reshape(-1,1)lb=-16ub=16evaluationNumber=80000# FVS = trainData.shape[1]limit=50P=60MR=0.3L2=0model=ABC_LR_Model(lb=lb,ub=ub,evaluationNumber=evaluationNumber,limit=limit,P=P,MR=MR,L2=L2,parallelType=parallelType)#start_time = dt.datetime.now()model.fit(X,y)#print(f"Run time: {dt.datetime.now()-start_time}")print(f"Result:{model.score(X,y)}")GPU Version UsageimportcupyascpparallelType=cpfromabcLRimportABC_LR_Modelfromsklearn.datasetsimportload_breast_cancerX,y=load_breast_cancer(return_X_y=True)X=parallelType.array(X)y=parallelType.array(y.reshape(-1,1))lb=-16ub=16evaluationNumber=80000# FVS = trainData.shape[1]limit=50P=60MR=0.3L2=0model=ABC_LR_Model(lb=lb,ub=ub,evaluationNumber=evaluationNumber,limit=limit,P=P,MR=MR,L2=L2,parallelType=parallelType)#start_time = dt.datetime.now()model.fit(X,y)#print(f"Run time: {dt.datetime.now()-start_time}")print(f"Result:{model.score(X,y)}")LicenseThis program is free software: you can redistribute it and/or modify
it under the terms of the 3-clause BSD license (please see the LICENSE file).This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.You should have received a copy of the 3-clause BSD license
along with this program (see LICENSE file).
If not, seehere.Copyright (c) 2022, Bilge Kagan Dedeturk (kagandedeturk@gmail.com)
Package: abcmeta
abcmetaPython meta class and abstract method library with restrictions.This library provides a restricted way to validate abstract methods.
The Python's default abstract method library only validates the methods
that exist in the derived classes and nothing else.
What this library provides is apart from that validation it provides
validations over the method's signature.
All you need is to importABCMetaandabstractmethodfrom this library.It works on both annotations and without annotations methods.InstallationYou can install the package bypip:$pipinstallabcmetaNote: abcmeta supports Python3.6+.Quick startfromtypingimportDict,TextfromabcmetaimportABC,abstractmethodclassBase(ABC):@abstractmethoddefmethod_2(self,name:Text,age:int)->Dict[Text,Text]:"""Abstract method."""@abstractmethoddefmethod_3(self,name,age):"""Abstract method."""classDrived(Base):defmethod_2(self,name:Text,age:int)->Dict[Text,Text]:return{"name":"test"}defmethod_3(self,name,age):passIf you put a different signature, it will raise an error with 'diff' format with hints about what you've missed:classDrived(Base):defmethod_2(self,name:Text,age:int)->List[Text]:return{"name":"test"}And it will raise:Traceback(mostrecentcalllast):File"/Workspaces/test.py",line41,in<module>classDrived(Base):File"/usr/lib/python3.9/abc.py",line85,in__new__cls=super().__new__(mcls,name,bases,namespace,**kwargs)File"/abcmeta/__init__.py",line179,in__init_subclass__raiseAttributeError(AttributeError:Signatureofthederivedmethodisnotthesameasparentclass:-method_2(self,name:str,age:int)->Dict[str,str]?^^-----+method_2(self,name:str,age:int)->List[str]?^^Derivedmethodexpectedtoreturnin'typing.Dict[str, str]'type,butreturns'typing.List[str]'For different parameter names:classDrived(Base):defmethod_2(self,username:Text,age:int)->List[Text]:return{"name":"test"}And it will raise:Traceback(mostrecentcalllast):File"/Workspaces/test.py",line41,in<module>classDrived(Base):File"/usr/lib/python3.9/abc.py",line85,in__new__cls=super().__new__(mcls,name,bases,namespace,**kwargs)File"/abcmeta/__init__.py",line180,in__init_subclass__raiseAttributeError(AttributeError:Signatureofthederivedmethodisnotthesameasparentclass:-method_2(self,name:str,age:int)->Dict[str,str]+method_2(self,username:str,age:int)->Dict[str,str]?++++Derivedmethodexpectedtogetnameparamter,butgetsusernameIssueIf you're faced with a problem, please file anissueon Github.ContributeYou're always welcome to contribute to the project! Please file an issue and send your great PR.LicensePlease read theLICENSEfile.
Package: abconfig
ABConfigThe configuration should be simple, this project aims to give you all the power while maintaining ease of use.FeaturesJson or Yaml files and environment variables are supported as source;Correct data types (even for environment variables);Create configurations in django models style;The result object is a regular dictionary;Read the docsDocumentation:http://abconfig.readthedocs.io/Also strongly recommend that you read"The twelve-factor app" for configbefore starting.
Package: abcpmc
A Python Approximate Bayesian Computing (ABC) Population Monte Carlo (PMC) implementation based on Sequential Monte Carlo (SMC) with Particle Filtering techniques.Theabcpmcpackage has been developed at ETH Zurich in theSoftware Lab of the Cosmology Research Groupof theETH Institute of Astronomy.The development is coordinated onGitHuband contributions are welcome. The documentation ofabcpmcis available atreadthedocs.organd the package is distributed overPyPI.FeaturesEntirely implemented in Python and easy to extendFollows Beaumont et al. 2009 PMC algorithmParallelized with muliprocessing or message passing interface (MPI)Extendable with k-nearest neighbour (KNN) or optimal local covariance matrix (OLCM) pertubation kernels (Fillipi et al. 2012)Detailed examples in IPython notebooksA2D gausscase studyAMulti distancecase studyAtoy modelincluding a comparison to theoretical predictionsHistory0.1.2 (2016-01-27)Added support for sampling with multiple distance simultaneouslyClean setup.pySimplifying the codeImproved documentation0.1.1 (2015-05-03)Python 3 supportMinor fixesImproved documentation0.1.0 (2015-04-28)First release
Package: abc-property
Better Abstract Basic ClassesPython ABC with a simple @abstract_property decorated checked after instantiationEntirely based onthis StackOverflow answerbykrassowski.Example:from better_abc import BetterABC,abstract_property

class AbstractClassWithAbstractAttribute(BetterABC):
  @abstract_property
  def prop(self):
    pass

  otherprop = abstract_property()

class ClassWithProperty(AbstractClassWithAbstractAttribute)
  def __init__(self,propvalue=12):
    self.prop = 12
    self.otherprop = "a string"