Saravanan666/pypi-org huggingface dataset:
Package: advent-of-code-wim
*                              
                                   |                              
                                 +-|---+                          
                                /  |  /|                          
                               +-----+ |                          
                               |:::::| |                          
                       +----+  |:::::| |---+      +-----------+   
                      /    / \ |:::::| |  /|     / \\\\\\ [] /|   
                     /    / / \|:::::| | / |    / \\\\\\ [] / |   
                    /    / / / \:::::|/ /  |   +-----------+  |   
                   +----+ / / / \------+ ------|:::::::::::|  |   
                   |-----\ / / / \=====| ------|:::::::::::|  |   
                   |------\ / / / \====|   |   |:::::::::::|  |   
                   |-------\ / / / +===|   |   |:::::::::::|  |   
                   |--------\ / / /|===|   |   |:::::::::::|  |   
                   |---------\ / / |===|   |  /|:::::::::::|  |   
                   |----------\ /  |===|  /  //|:::::::::::| /    
                   +-----------+   |===| /  //||:::::::::::|/     
                   |:::::::::::|   |===|/__//___________________  
                   |:::::::::::|   |______//|_____...._________   
                   |:::::::::::|   |     //| ____/ /_/___         
                ---|:::::::::::|   |--------|[][]|_|[][]_\------  
               ----|:::::::::::|   |---------------------------   
                || |:::::::::::|   |  //| ||  / / / ||      ||    
                || |:::::::::::|   | //|  || /   /  ||      ||    
                   |:::::::::::|   |//|     / / /                 
                   |:::::::::::|   //|     /   /   ____________   
                   |:::::::::::|  //|     / / /___/ /#/ /#/#/ /   
                   ==============//======+...+====================
                   - - - - - - -// - - -/   / - - - - - - - - - - 
                 ==============//|==============================  
                              //|
Package: adventure-anywhere
Adventure Anywhere is a port of the 1977 ADVENTURE game that allows for long-running game sessions peristed amongst multiple players. Seeadventure_anywhere.use_adventure.do_commandfor the top-level use case.This repo was originally a fork of Brandon Rhodes'python-adventurewhich itself is a python port of the original 1977 ADVENTURE fortran code. The code design of Adventure Anywhere is also influenced by Brandon Rhodes' PyOhio 2014 talkThe Clean Architecture in Python.Adventure Anywhere can be played:via SMSby texting +17028002877source code:sms_adventurewebsite:www.smsadventure.com
Package: adventurelib
adventurelibadventurelibprovides basic functionality for writing text-based adventure
games, with the aim of making it easy enough for young teenagers to do.The foundation of adventurelib is the ability to define functions that are
called in response to commands. For example, you could write a function to
be called when the user types commands like "take hat":@when('take THING')
def take(thing):
    print(f'You take the {thing}.')
    inventory.append(thing)It also includes the foundations needed to write games involving rooms, items,
characters and more... but users will have to implement these features for
themselves as they explore Python programming concepts.Installingadventurelib.pyis a single file that can be copied into your project. You
can also install it with pip:pip install adventurelibDocumentationComprehensive documentation is on Read The Docs.
Package: adverity-json-parser
adverity-json-parserExamplefrom adverity_json_parser import parser

DATASTREAM_ID = "1234"
INSTANCE_URL = "https://reprise.datatap.adverity.com/api/columns/"
TOKEN = "qwertyuiopasdfghjklzxcvbnmqwertyu"
JSON_PATH = "/Users/example/Documents/data-streams/table_schemas/general.json"
SCPECIAL_CHARS = ",().- %:!#&*§±+=" #Optional

instance = parser.Parser(DATASTREAM_ID, INSTANCE_URL, TOKEN, JSON_PATH)
instance.transform()
Package: adversarial-friend
CS_5523_Final_ProjectThis repo contains code and files of final project in CSCI 5523: Data MiningGetting StartedTo import AdversarialFriend API, use the following pip command:pip install adversarial-friendTeam MembersYangyang Lili002252@umn.eduJacob Islerisle0011@umn.eduMario Serraferoserra082@umn.eduProject AbtractWe will explore parameter interpretation techniques for computer vision tasks, in order to get a deeper understanding of how to deal with real image data. Specifically speaking, the models to be used include generalized linear models like Logistic Regression, as well as more powerful techniques such as convolutional neural networks. What is more, we will document and implement these algorithms to extract the learned concepts that our models detect in input images. Finally, we will use the information, along with automatic input optimization, to programmatically generate adversarial examples using model-agnostic gradient-based methods that trick the learned models into misclassifying input images.For full project report, go to: [add link])()Reference[1] C. Olah, A. Satyanarayan, I, Johnson, S. Carter, L. Schubert, K. Ye, A. Mordvinstev, “The Building Blocks of Interpretability” Distill, 6-Mar-2018.Online[Accessed: 1-Dec-2020][2] J. Johnson, EECS 498-007 / 598-005 Deep Learning for Computer Vision, University of Michigan, 10-Aug-2020.Online[Accessed: 1-Dec-2020][3]  A. Kurakin, I. Goodfellow, S. Bengio, “Adversarial Examples in the Physical World” ICLR, 8-Jul-2016.Online[Accessed: 1-Dec-2020]LicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
Package: adversarial-robustness-toolbox
Adversarial Robustness Toolbox (ART) v1.17中文README请按此处Adversarial Robustness Toolbox (ART) is a Python library for Machine Learning Security. ART is hosted by theLinux Foundation AI & Data Foundation(LF AI & Data). ART provides tools that enable
developers and researchers to defend and evaluate Machine Learning models and applications against the
adversarial threats of Evasion, Poisoning, Extraction, and Inference. ART supports all popular machine learning frameworks
(TensorFlow, Keras, PyTorch, MXNet, scikit-learn, XGBoost, LightGBM, CatBoost, GPy, etc.), all data types
(images, tables, audio, video, etc.) and machine learning tasks (classification, object detection, speech recognition,
generation, certification, etc.).Adversarial ThreatsART for Red and Blue Teams (selection)Learn moreGet StartedDocumentationContributing-Installation-Examples-Notebooks-Attacks-Defences-Estimators-Metrics-Technical Documentation-Slack,Invitation-Contributing-Roadmap-CitingThe library is under continuous development. Feedback, bug reports and contributions are very welcome!AcknowledgmentThis material is partially based upon work supported by the Defense Advanced Research Projects Agency (DARPA) under
Contract No. HR001120C0013. Any opinions, findings and conclusions or recommendations expressed in this material are
those of the author(s) and do not necessarily reflect the views of the Defense Advanced Research Projects Agency (DARPA).
Package: adversarial-test
Adversarial test: simple way to know if your train data and test data are similarWe combine our train and test data, labeling them 0 for the training data and 1 for the test data, mix them up, then see if we are able to correctly re-identify them using a binary classifier.If a classifier can identify whether a sample comes from train or test data set, we know that there's at least one feature in your data is shifted; use feature importance methods to point out the shifted feature(s)Get Started and DocumentationTo install from pip:pip install adversarial-testCode example:Using adversarial test with category featuresSee more usages innotebooksdirectory
Package: advertion
adversarial-validationA tiny framework to perform adversarial validation of your training and test data.What is adversarial validation?A common workflow in machine learning projects (especially in Kaggle competitions) is:train your ML model in a training dataset.tune and validate your ML model in a validation dataset (typically is a discrete fraction of the training dataset).finally, assess the actual generalization ability of your ML model in a “held-out” test dataset.This strategy is widely accepted, but it heavily relies on the assumption that the training and test datasets are drawn
from the same underlying distribution. This is often referred to as the “identically distributed” property in the
literature.This package helps you easily assert whether the "identically distributed" property holds true for your training and
test datasets or equivalently whether your validation dataset is a good proxy for your model's performance on the unseen
test instances.If you are a person of details, feel free to take a deep dive to the following companion article:adversarial validation: can i trust my validation dataset?InstallThe recommended installation is viapip:pipinstalladvertion(advertion stands foradversarial validation)Usagefromadvertionimportvalidatetrain=pd.read_csv("...")test=pd.read_csv("...")validate(trainset=train,testset=test,target="label",)# // {# //     "datasets_follow_same_distribution": True,# //     'mean_roc_auc': 0.5021320833333334,# //     "adversarial_features': ['id'],# // }How to contributeIf you wish to contribute,thisis a great place to start!LicenseDistributed under theApache License 2.0.
Package: advhash
AdvHash: Adversarial collision attacks on perceptual hashing functionsSummaryAdvHash is a Python package that provides a simple to use interface for performing adversarial collision attacks on perceptual hashing functions.PyTorch is used to re-create the target hashing functions and generating adversarial examples. AdvHash supports both CPU and GPU computations. Install the CUDA enabled version of PyTorch to use a GPU with AdvHash and specifydevice='cuda'when instantiating anattackorhash.Adversarial collision attacks on image hashing functionsComponentsGetting StartedInstallationExample UsageAttacksFuture DevelopmentHashing FunctionsAttack MethodsDefense MethodsContributingAdversarial collision attacks on image hashing functionsCurrently AdvHash supports collision attacks on hashing functions from the popularimagehashpackage using methods described inAdversarial collision attacks on image hashing functions.ComponentsAdvHash is divided into multiple granular components:ComponentDescriptionadvhasha PyTorch based library for performing adversarial attacksadvhash.attackadversarial attack methodsadvhash.hashperceptual hashing functionsadvhash.utilsutility functions for performing common resizing, conversion, and comparison operationsGetting StartedInstallationpip install advhash*Install a CUDA enabled version of PyTorch to use a GPU with AdvHash.Example UsageThis example shows how theL2Attackcan be used to perform an adversarial collision attack ondHashusing theresizemethod as the target split point.importtorchimportnumpyasnpfromPILimportImagefromadvhash.attack.l2importL2Attacktarget_img=Image.open('forest.jpg')source_img=Image.open('cat.jpg')target=torch.tensor((np.array(target_img).astype('float32')))source=torch.tensor((np.array(source_img).astype('float32')))l2=L2Attack(hash_fn='dhash',split_point='resize')im_adv=l2.attack(target,source)AttacksCollision Attacks for Image Hashingadvhash.attack.l2.L2Attackadvhash.attack.hinge.HingeAttackThe above attacks accept a source image, target image, and hashing function as an input. The source image will be perturbed to create an adversarial image that has the same hash as the target image when hashed by the selected hashing function. Some attacks require additional configuration.Hashing FunctionsdHashFuture DevelopmentHashing FunctionspHashaHashpqdAttack MethodsTBDDefense MethodsTBDContributingContributions are welcome! If you plan to contribute new features, methods, or enhancements, please open an issue to discuss the addition further, or comment on an existing issue.
Package: advice
AdviceAspect-oriented programmingUsageimportadvicedefmultiply(context):print(context.args)print(context.kwargs)yieldcontext.result*=100advice.register(handler=multiply,modules=advice.match(equals='math'),targets=advice.match(regexp='(sin|cos)'))Ok, let's check:In[2]:importmathIn[3]:math.cos(0)(0,){}Out[3]:100.0
Package: adviewer
AreaDetector configurator (and -one day- viewer)adviewer - despite theviewerin its name - is primarily a configuration
tool for already-running areaDetector IOCs. It can help you determine how
any given plugin pipeline has been configured, displaying an interactively-
reconfigurable node graph and tree-based view. It may also help you discover
what plugins are installed for an unfamiliar installation.Eventually, there will be a full-featured viewer based on PyDM integrated
as well. For now, a simple PyDM user interface is spawned in a separate
process when using the image plugin right-click context menu in the graph.RequirementsPython 3.6+qtpy+ PyQt5qtpynodeeditor, a pure Python port ofnodeeditornetworkxophydOptionally:PyDM, to spawn an image viewerRunning adviewerTo install:$ pip install git+https://github.com/pcdshub/adviewerTo run:$ adviewer --help
$ adviewer 13SIM1:
$ adviewer --pvlist filename.pvlistRunning the Tests$ python run_tests.py
Package: advi-jax
ADVI in JAXDesign considerationsADVI class is an object butADVI.objective_funis a pure function that can be optimized withoptaxorjaxoptor any other jax supported optimizers.variational distribution parameters can be initialized withADVI.initusing adistraxortfpdistribution as an initializer (or any jax distribution that implements.sample()method in a similar way).Users can pass the suitable bijectors of classdistrax.Bijectorto the variational distribution.Transformation is directly applied to posterior and thus prior and likelihood stay untouched during the entire process. This way, after the training, the variational distribution is ready for sampling without any additional transformations. Also, this gives freedom to variational distribution to be constructed in more complex way as it is separated from the other parts of the model (see the example below).If we do not change thekeyduring the training, the method is called the deterministic ADVI.Users can implement their ownlikelihood_log_prob_funbecause likelihood does not necessarily have to be a
distribution.A Coin Toss Exampleimportjaximportjax.numpyasjnpfromadvi_jaximportADVIfromadvi_jax.variational_distributionsimportMeanFieldfromadvi_jax.initimportinitializeimporttensorflow_probability.substrates.jaxastfpdist=tfp.distributions# Datatosses=jnp.array([0,1,0,0,1,0])# Prior and likelihoodprior_dist=dist.Beta(2.0,3.0)likelihood_log_prob_fun=lambdatheta:dist.Bernoulli(probs=theta).log_prob(tosses).sum()# ADVI modelmodel=ADVI(prior_dist,likelihood_log_prob_fun,tosses)# Variational distribution and bijectorbijector=distrax.Sigmoid()variational_dist=MeanField(u_mean=jnp.array(0.0),u_scale=jnp.array(0.0),bijector=bijector)# Initialize the parameters of variational distributionkey=jax.random.PRNGKey(0)variational_dist=initialize(key,variational_dist,initializer=dist.Normal(0.0,1.0))# Define the value and grad functionvalue_and_grad_fun=jax.jit(jax.value_and_grad(model.objective_fun,argnums=1),static_argnums=2)# Do gradient descent!learning_rate=0.01foriinrange(100):key=jax.random.PRNGKey(i)# If this is constant, this becomes deterministic ADVIloss_value,grads=value_and_grad_fun(key,variational_dist,n_samples=10)variational_dist=variational_dist-learning_rate*grad# Get the posterior sampleskey=jax.random.PRNGKey(2)posterior_samples=variational_dist.sample(seed=key,sample_shape=(100,))
Package: advisory-parser
This library allows you to parse data from security advisories of certain
projects to extract information about security issues. The parsed
information includes metadata such as impact, CVSS score, summary,
description, and others; for a full list, see theadvisory_parser/flaw.pyfile.DISCLAIMER: Much of the advisory parsing is fairly fragile. Because web
pages change all the time, it is not uncommon for parsers to break when a
page is changed in some way. Also, the advisory parsers only work with the
latest version of the advisory pages.The need for parsing raw security advisories in this way could be avoided
if vendors provided their security pages in a machine readable (and
preferably standardized) format. An example of this would be Red Hat’s
security advisories that can be pulled in from a separate Security Data API
(RHSA-2016:1883.json)
or downloaded as an XML file
(cvrf-rhsa-2016-1883.xml),
or OpenSSL’s list of issues available in XML
(vulnerabilities.xml).If you are a vendor or an upstream project owner interested in providing
your security advisories in a machine readable format and don’t know where
to start, feel free to reach out tomprpic@redhat.com.Currently available parsers include:ProjectExample URLGoogle Chromehttps://chromereleases.googleblog.com/2017/06/stable-channel-update-for-desktop_15.htmlAdobe Flashhttps://helpx.adobe.com/security/products/flash-player/apsb17-17.htmlJenkinsMySQLhttp://www.oracle.com/technetwork/security-advisory/cpujul2017verbose-3236625.htmlphpMyAdminWiresharkInstallationpip install advisory-parserUsagefrompprintimportpprintfromadvisory_parserimportParserurl='https://helpx.adobe.com/security/products/flash-player/apsb17-17.html'flaws,warnings=Parser.parse_from_url(url)forflawinflaws:print()pprint(vars(flaw))
Package: advlog
PyAdvancedLoggerAdvanced logger inspired by other languages' standard logging classes (e.g. Java and Kotlin).InstallationSimply install throughpip install advlog.ExamplefromadvlogimportLoggerlogger=Logger(logfile='./log.txt')# Passes varargs on to `print`# These methods exist: d (debug), v (verbose), i (info), w (warning), e (error), f (fatal)# Can specify `file` kwarg to write to - next to logfile. d, v, i, w methods default to `sys.stdout`; e, f default to `sys.stderr`.# Can also specify `None` to only write to `logfile`. One of log file or file keyword must be present.logger.d('debug',42)LicenseMIT LicenseCopyright (c) 2020 KirusePermission 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: adv-math
Introduction:Advance Math
This is a library for introducing mathematical concepts that are not in-built on python, like ratios, fractions, factors of numbers, etc.UsageThis module currently has one out of the many mathematical operational modes (algebra, arithmetic, geometry, trigonometry, etc.)So to use any function you need to:from adv_math *(mode).(function)For example:// Finding HCF of three numbers (5, 40, 75)
from adv_math import arithmetichcf = Factor(5, 40, 75).HCF()print(hcf)Other classes in this libraryartithmetic:Ratio (methods: get, simplify, add, subtract, multiply, divide)Fraction (methods: get, getType, simplify, add, subtract, multiply, divide)Factor (methods: HCF, LCM)Just Functions (functions: Factors, PrimeNumbers, CompositeNumbers)
Package: adv-math-captcha-ostrichb
ADV-Math-captchaAn advanced mathematical captcha for simple human verification.How to useThis is an example to make an verification:fromadv_math_captchaimportCaptchaif__name__=='__main__':formula1=Captcha(5,4,15,10,50,5,5)inp=input("Solve this simple question:{0}= ".format(formula1.formula_str))ifformula1.verify(float(inp)):print("Verify success!")else:print("Verify failed! The correct answer is{0:.0f}!".format(float(formula1.evaluation)))UsageThis module only provides one class with only one method. To make a captcha, just useCaptcha(difficulty, term, number_range), which is the shortest form. If you wanna use more parameters, useCaptcha(difficulty, term, number_range, factor_range, exponentiation_range, exp_base_range, exp_index_range)Details: (All the parameters are integers)difficulty: Decides the difficulty of the generated expression. Valid value is 1-5 in integer.1: Only additions2: Additions and subtractions3: Operations in2, with Mutliplications and divisions (For divisions, the result will always be an integer)4: Operations in3, with exponentiation calculations5: Operations in4, with logarithm calculations (The result will always in simple form to insure the result is reducable, for example, 'ln(e^3)', 'log_2 (8)')term: Determines how many items will appear in an expression. Althogh there is no limits, don't be too much, or it will be hard to get the answer. :) (P.S. an division will be counted as one item. E.g. (6 / 3) )number_range: Determines the range of the coefficient.factor_range: Determines the range of division results and dominators. Default value is 10.exponentiation_range: Determines the range of exponential calculation. Default value is 50.exp_base_range: Determines the range of base number. Default value is 6.exp_index_range: Determines the range of index number. Default value is 5.Once you initialized an captcha object, you can get the expression string fromCaptcha.formula_strvariable in class, or make an verification using theCaptcha.verify(user_input). ATruewill be returned if the verification is successful, orFalseif failed.You can also get the actual value of the expression fromCaptcha.evaluationvariable.AboutIf you want to contact me, mail tomailto
Package: adv-ml
adv-mlDocsSeehttps://irad-zehavi.github.io/adv-ml/Installpipinstalladv_mlHow to useHow to UseAs an nbdev library,adv-mlsupportsimport *(without importing
unwanted symbols):fromadv_ml.allimport*Adversarial Examplesmnist=MNIST()classifier=MLP(10)learn=Learner(mnist.dls(),classifier,metrics=accuracy)learn.fit(1)epochtrain_lossvalid_lossaccuracytime00.1544100.1774100.95390000:32sub_dsets=mnist.valid.random_sub_dsets(64)learn.show_results(shuffle=False,dl=sub_dsets.dl())attack=InputOptimizer(classifier,LinfPGD(epsilon=.15),n_epochs=10,epoch_size=20)perturbed_dsets=attack.perturb(sub_dsets)epochtrain_losstime0-4.30257300:001-7.58570700:002-9.01496800:003-9.70054800:004-10.07511000:005-10.29663600:006-10.43383400:007-10.52114100:008-10.57767300:009-10.61474000:00learn.show_results(shuffle=False,dl=TfmdDL(perturbed_dsets))Data Poisoningpatch=torch.tensor([[1,0,1],[0,1,0],[1,0,1]]).int()*255trigger=F.pad(patch,(25,0,25,0)).numpy()learn=Learner(mnist.dls(),MLP(10),metrics=accuracy,cbs=BadNetsAttack(trigger,'0'))learn.fit_one_cycle(1)epochtrain_lossvalid_lossaccuracytime00.1036520.0970750.97140000:23Benign performance:learn.show_results()Attack success:learn.show_results(2)