Saravanan666/pypi-org huggingface dataset:
Package: acw-sc-v2-py
Python requests.HTTPAdapter foracw_sc__v2acw_sc__v2is a cookie used by some websites to prevent crawlers.
When the website detects that the request is sent by a crawler, it returns a javascript challenge. The crawler needs to solve the challenge and resend the request with the cookie set to the challenge value.
This project provides a Python requests.HTTPAdapter to resolve the challenge automatically.Usagepipinstallacw-sc-v2-pyimportrequestssession=requests.Session()# add the following code to your original requests codefromacw_sc_v2_pyimportacw_sc__v2adapter=acw_sc__v2.AcwScV2Adapter()session.mont("http://",adapter)session.mount("https://",adapter)response=session.get("https://www.example.com/")print(response.text)Use CaseBefore usingacw-sc-v2-pyimportrequestssession=requests.Session()foriinrange(8):response=session.get("https://www.example.com/")print(response.text)Usually, you will get blocked after sending 2 consecutive requests to
the same website. The response will be like the following HTML code
which requires you to solve a javascript challenge. If the web page is
opened in a browser, the browser will automatically solve the challenge.<html><script>vararg1='70D9569CD5E5895C84F284A09503B1598C5762A1';var_0x4818=['\x63\x73\x4b\x48\x77\x71\x4d\x49,...functionsetCookie(name,value){varexpiredate=newDate();...functionreload(x){setCookie("acw_sc__v2",x);...</script></html>After usingacw-sc-v2-pyimportrequests# step 1: importfromacw_sc_v2_pyimportacw_sc__v2session=requests.Session()# step 2: create adapteradapter=acw_sc__v2.AcwScV2Adapter()# step 3: mount adaptersession.mont("http://",adapter)session.mount("https://",adapter)foriinrange(8):response=session.get("https://www.example.com/")print(response.text)By usingacw-sc-v2-py, you will get the normal response. Theacw_sc__v2will handle the javascript challenge and automatically
update the cookie.Enable loggingPrepend the following code to enable detailed log foracw-sc-v2-py.importlogginglogger=logging.getLogger("acw_sc_v2_py.acw_sc__v2")logger.setLevel(logging.DEBUG)logger.propagate=Trueimportrequestsfromacw_sc_v2_pyimportacw_sc__v2session=requests.Session()adapter=acw_sc__v2.AcwScV2Adapter()session.mont("http://",adapter)session.mount("https://",adapter)foriinrange(8):response=session.get("https://www.example.com/")print(response.text)The log will be like the following.[2024-01-26 22:01:26] INFO:root:detected anti spam is triggered
[2024-01-26 22:01:28] INFO:root:cookie generated acw_sc__v2=65b3bb3601fe9ab002c5c1ff58fc71a1115e8322
[2024-01-26 22:01:28] INFO:root:resending the origin request
<!DOCTYPE html></html>
[2024-01-26 22:01:29] INFO:root:cookie set acw_sc__v2=65b3bb3601fe9ab002c5c1ff58fc71a1115e8322
[2024-01-26 22:01:30] INFO:root:anti spam is not triggered
<!DOCTYPE html></html>
...
Package: acycling-digraph-problem
acycling digraph probleminstallpipinstallacycling-digraph-problemusageusage:main.py[-h][--showSHOW]file_path

positionalarguments:
file_pathpathtoinputfile

options:
-h,--helpshowthishelpmessageandexit--showSHOWshowgraph(default:False)
Package: ad1459
ad1459IRC ClientAD1459 is an IRC client written in Python and GTK3. It aims to be a modern IRC
client with features that make sense for IRC today. It has an interface which
has been loosely inspired by Hexchat and mIRC.AD1459 is currently inALPHA, and should not be considered ready for everyday
use. That being said, it is a relatively capable client for basic functionality
even in its currently incomplete state.Current AbilitiesMultiple-network supportChatting over IRC.Joining/Parting channelsChanging nickTab-completionSave and recall serversSecure password storage within system keyringNotificationsUser listTopicSome commands for doing IRC ThingsLast message recallCompacted server messagesTODOSCurrently planned features include:CTCPLoggingKnown IssuesThese are problems that have been currently identified:Large buffers make the application unresponsiveCTCP ACTION messages sent from the client also highlight the client.Connecting to IRCTo connect to a server/network, click on the server button (in the top left) and
enter the server details in the text entries. You can alternatively enter a
server as a single line of text, for which the format is:none|sasl|pass name host port username (tls) (password)none|sasl|passThis specifies the connection type. If you need to authenticate to the server
with a server password, then usepass. If the network supports using SASL, useSASL.nameThis is the name for the network in the list. (e.g.freenode,Esper)hostThe hostname of the server to connect to, e.g.chat.freenode.netportThe port to connect with, e.g.7070. Default is 6697.usernameThe username/ident for your connection to the server. This will also be your
initial nickname (Separate nickname support is planned for a future release)tlsIf present, AD1459 will use TLS to connect to the server. Otherwise, a plaintext
connection will be used.passwordThe password to use to authenticate with the server. This option is required if
the authentication method specified wassaslorpass. It should be omitted
otherwise.Example connection linessasl Esper irc.esper.net 6697 jeans tls hunter2none freenode chat.freenode.net 6666 g4vr0chepass My-Private-Network my.private-network.com 12345 secret_username tls hunter3
Package: adabelief-slim
AdaBelief SlimThis repository contains the code for theadabelief-slimPython package, from which you can use a Pytorch implementation of the AdaBelief optimizer.InstallationUsing Python 3.6 or higher:pipinstalladabelief-slimUsagefromadabeliefimportAdaBeliefmodel=...kwargs=...optimizer=AdaBelief(model.parameters(),**kwargs)The following hyperparameters can be passed as keyword arguments:lr: learning rate (default:1e-3)betas: 2-tuple of coefficients used for computing the running averages of the gradient and its "variance" (see paper) (default:(0.9, 0.999))eps: term added to the denominator to improve numerical stability (default:1e-8)weight_decay: weight decay coefficient (default:1e-2)amsgrad: whether to use the AMSGrad variant of the algorithm (default:False)rectify: whether to use the RAdam variant of the algorithm (default:False)weight_decouple: whether to use the AdamW variant of this algorithm (default:True)Be aware that the AMSGrad and RAdam variantscan'tbe used simultaneously.MotivationAs you're probably aware, one of the paper's main authors (Juntang Zhuang) released his code in thisrepository, which is used to maintain theadabelief_pytorchpackage. Thus, you may be wondering why this repository exists, and how it differs with his. The reason is actually pretty simple: the author made some decisions regarding his code which made it an unsuitable option for me. While it wasn't the only thing that bugged me, my main issue was with adding unnecessary packages as dependencies.Regarding differences, the main ones are:I removed thefixed_decayoption, as the author's experiments showed it wasn't greatI removed thedegenerate_to_sgdoption, as the author copied the RAdam codebase, but it seems recommended to always use itI removed all logging related features, along with theprint_change_logoptionI removed all code specific to older version of Pytorch (I think all versions above1.4should work), as I don't care for themI changed the flow of the code to be closer to the official implementation of AdamWI removed all usage of the.dataproperty as it isn't recommended, and can be avoided with thetorch.no_graddecoratorI moved the code specific to AMSGrad so that it isn't executed if the RAdam variant is selectedI added an exception if both RAdam and AMSGrad are selected, as they can't both be used (in the official repository RAdam is used if both RAdam and AMSGrad are selected)I removed half-precision support, as I don't care for itReferencesCodebasesOfficial AdaBelief implementationOfficial RAdam implementationOfficial AdamW implementationPytorch OptimizersPapersAdam: A Method for Stochastic Optimization: proposed AdamDecoupled Weight Decay Regularization: proposed AdamWOn the Convergence of Adam and Beyond: proposed AMSGradOn the Variance of the Adaptive Learning Rate and Beyond: proposed RAdamAdaBelief Optimizer, adapting stepsizes by the belief in observed gradients: proposed AdaBeliefLicenseMIT
Package: adabound
AdaBoundAn optimizer that trains as fast as Adam and as good as SGD, for developing state-of-the-art
deep learning models on a wide variety of pupolar tasks in the field of CV, NLP, and etc.Based on Luo et al. (2019).Adaptive Gradient Methods with Dynamic Bound of Learning Rate.
InProc. of ICLR 2019.Quick LinksWebsiteDemosInstallationAdaBound requires Python 3.6.0 or later.
We currently provide PyTorch version and AdaBound for TensorFlow is coming soon.Installing via pipThe preferred way to install AdaBound is viapipwith a virtual environment.
Just runpipinstalladaboundin your Python environment and you are ready to go!Using source codeAs AdaBound is a Python class with only 100+ lines, an alternative way is directly downloadingadabound.pyand copying it to your project.UsageYou can use AdaBound just like any other PyTorch optimizers.optimizer=adabound.AdaBound(model.parameters(),lr=1e-3,final_lr=0.1)As described in the paper, AdaBound is an optimizer that behaves like Adam at the beginning of
training, and gradually transforms to SGD at the end.
Thefinal_lrparameter indicates AdaBound would transforms to an SGD with this learning rate.
In common cases, a default final learning rate of0.1can achieve relatively good and stable
results on unseen data.
It is not very sensitive to its hyperparameters.
See Appendix G of the paper for more details.Despite of its robust performance, we still have to state that,there is no silver bullet.
It does not mean that you will be free from tuning hyperparameters once using AdaBound.
The performance of a model depends on so many things including the task, the model structure,
the distribution of data, and etc.You still need to decide what hyperparameters to use based on your specific situation,
but you may probably use much less time than before!DemosThanks to the awesome work by the GitHub team and the Jupyter team, the Jupyter notebook (.ipynb)
files can render directly on GitHub.
We provide several notebooks (likethis one) for better
visualization.
We hope to illustrate the robust performance of AdaBound through these examples.For the full list of demos, please refer tothis page.CitingIf you use AdaBound in your research, please citeAdaptive Gradient Methods with Dynamic Bound of Learning Rate.@inproceedings{Luo2019AdaBound,
  author = {Luo, Liangchen and Xiong, Yuanhao and Liu, Yan and Sun, Xu},
  title = {Adaptive Gradient Methods with Dynamic Bound of Learning Rate},
  booktitle = {Proceedings of the 7th International Conference on Learning Representations},
  month = {May},
  year = {2019},
  address = {New Orleans, Louisiana}
}LicenseApache 2.0
Package: adachi-resource-assistant
adachi-resource-assistant弃用警告（ Deprecation Warning ）从原神 3.1 版本开始此模块已经弃用，功能已经整合到Adachi-BOT，使用说明详见《资源文件制作指引》This module has been deprecated since Genshin Impact 3.1 version, and the function has been integrated intoAdachi-BOT. For details, please refer to《资源文件制作指引》.说明A resource assistant forAdachi-BOT.安装pip3install-Uadachi_resource_assistant使用生成角色卡池图片根据角色信息或者配置文件生成角色卡池图片。adachi_resource_get_gacha_image刻晴keqing_042
adachi_resource_get_gacha_image第二个参数来源于Honey Impact的角色页面链接，如https://genshin.honeyhunterworld.com/keqing_042/?lang=CHS中的keqing_042。不给出参数则获取所有可用的角色。填充素材图片根据素材图片自身信息进行填充。adachi_resource_fill_image/path/to/image.png
adachi_resource_fill_image/path/*.png
adachi_resource_fill_image参数列表为文件列表，不给出参数时，则递归扫描当前目录中的所有.png文件。许可MIT License。
Package: ada-cli
Ada CLIFeaturesTODORequirementsTODOInstallationYou can installAda CLIviapipfromPyPI:$pipinstallada-cliUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Ada CLIis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: adacord
Adacord CLIInstallationpipinstalladacordUsageCreate a new useradacordusercreateLoginadacordlogin--emailme@my-email.comCreate endpointadacordbucketcreate--description"A fancy bucket"List endpointsadacordbucketlistQuery endpointadacordbucketquery'select * from `my-bucket`'Contributingpoetryinstall
Package: adacs-django-playwright
ADACS Playwright ClassUsageUse this class instead of the django StaticLiveServerTestCase.It adds 2 useful class properties:self.browser = A browser object from playwright used for accessing the page.
self.playwright = The return from sync_playwright().start()This class only supports chronium and synchronous tests.Examplefrom adacs_django_playwright.adacs_django_playwright import PlaywrightTestCase

class MyTestCase(PlaywrightTestCase):

  def awesome_test(self):
    page = self.browser.new_page()
    page.goto(f"{self.live_server_url}")
Package: adactivexlsx2html
adactivexlsx2htmlA simple export from xlsx format to html tables with keep cell formattingported from xlsx2html with some changes, like bulma on css, and adding carousel on the rows.Installpipinstalladactivexlsx2htmlUsageSimple usagefromadactivexlsx2htmlimportxlsx2htmlout_stream=xlsx2html('path/to/example.xlsx')out_stream.seek(0)print(out_stream.read())or pass filepathfromadactivexlsx2htmlimportxlsx2htmlxlsx2html('path/to/example.xlsx','path/to/output.html')or use file like objectsimportiofromadactivexlsx2htmlimportxlsx2html# must be binary modexlsx_file=open('path/to/example.xlsx','rb')out_file=io.StringIO()xlsx2html(xlsx_file,out_file,locale='en')out_file.seek(0)result_html=out_file.read()or from shellpython-madactivexlsx2htmlpath/to/example.xlsxpath/to/output.html
Package: adacut
adacutA tool to "cut" versions out of an Ada source file.The "cuts" are defined using lines that start with a--$comments marker.
Those lines are in the form--$ {begin, end, line} {question, answer, cut} [{comment, code}]ExampleThe filetiti_toto.ads--$ begin question-- Titi?--$ end question--$ begin answer-- Toto--$ end answercan be turned into two different sources using adacut:adacut -m question titi_toto.ads > titi.ads-- Titi?adacut -m answer titi_toto.ads > toto.ads-- TotoThe-c <CUT>switch allows to cut the given block.cuttable.ads--$ begin cutAnswer:Integer:=1;--$ end cut--$ begin cutAnswer:Integer:=2;--$ end cutadacut -c 1 > cut.adsAnswer:Integer:=1;Test AdacutYou need pytest to be installed then simply run$ pytestIf you want to perform more exhaustive testing, you can usetox$ tox
Package: adadjust
StatusCompatibilitiesContactAdAdjustPackage allowing to fit any mathematical function to (for now 1-D only) data.InstallationpipinstalladadjustUsagefromadadjustimportFunctionimportnumpyasnpimportmatplotlib.pyplotaspltplt.rcParams.update({"text.usetex":True})# Needs texlive installednsamples=1000a=0.3b=-10xstart=0xend=1noise=0.01x=np.linspace(xstart,xend,nsamples)y=a*x**2+b+np.random.normal(0,noise,nsamples)deflinfunc(xx,p):returnxx*p[0]+p[1]defsquare(xx,p):returnxx**2*p[0]+p[1]func=Function(linfunc,"$a\\times p[0] + p[1]$")func2=Function(square,"$a^2\\times p[0] + p[1]$")params=func.fit(x,y,np.array([0,0]))[0]rr=func.compute_rsquared(x,y,params)params2=func2.fit(x,y,np.array([0,0]))[0]rr2=func2.compute_rsquared(x,y,params2)table=Function.make_table([func,func2],[params,params2],[rr,rr2],caption="Linear and Square fit",path_output="table.pdf")table.compile()Function.plot(x,[func,func2],[params,params2],y=y,rsquared=[rr,rr2])plt.gcf().savefig("plot.pdf")NOTE: to have pretty gaphs, put the lineplt.rcParams.update({"text.usetex": True})just after you imported adadjust.
This requiers that you have TexLive full installed on your computer.The result will be :
Package: adadmire
adadmireFunctions for detecting anomalies in molecular data sets using Mixed Graphical Models.InstallationEnter the following commands in a shell likebash,zshorpowershell:pipinstall-UadadmireUsageThe usage example in this section requires that you first download the data files from thedatafolder. For a description of the contents of this folder, see sectionDataof the adadmire documentation site.fromadadmireimportadmire,penaltyimportnumpyasnp# Load example dataX=np.load('data/Feist_et_al/scaled_data_raw.npy')# continuous dataD=np.load('data/Feist_et_al/pheno.npy')# discrete datalevels=np.load('data/Feist_et_al/levels.npy')# levels of discrete variables# Define lambda sequence of penalty valueslam=penalty(X,D,min=-2.25,max=-1.5,step=0.25)# Get anomalies in continuous and discrete dataX_cor,n_cont,position_cont,D_cor,n_disc,position_disc=admire(X,D,levels,lam)print(X_cor)# corrected Xprint(n_cont)# number of continuous anomaliesprint(position_cont)# position in Xprint(D_cor)# corrected Dprint(n_disc)# number of discrete anomaliesprint(position_disc)# position in DYou can find more usage examples in theUsagesection of adadmire's documentation site.DocumentationYou can find the full documentation for adadmire atspang-lab.github.io/adadmire. Amongst others, it includes chapters about:InstallationUsageModulesContributingTestingDocumentation
Package: adaendra-immutable-dict
Python Immutable DictThis library contains theImmutableDict, a Python dictionary which can't be updated.How to use itInstall it frompippip install adaendra-immutable-dictImport theAdaendreImmutableDictfrom adaendra_immutable_dict.AdaendraImmutableDict import AdaendraImmutableDictUse it like in the following examples.Examplesfromadaendra_immutable_dict.AdaendraImmutableDictimportAdaendraImmutableDict# Empty Immutable Dictimmutable_dict=AdaendraImmutableDict({})# Non empty Immutable Dictimmutable_dict=AdaendraImmutableDict({"hello":"world"})# Get a valueimmutable_dict["hello"]#> world# Copy dictimmutable_dict_copy=immutable_dict.copy()# Create an immutable dict from "fromkeys" methodimmutable_dict=AdaendraImmutableDict.fromkeys(["a","b"],"1")DocumentationPyPiCreditsThis project is based on Marco Sulla's project:frozen-dict.
Package: adaendra-python-config-loader
Python Config LoaderThe objective of this library is to easily load external configs for a Python project and use it for anywhere
in your project.How does it work?By default, it will load a config file called "application.yaml" stored in "/app/resources".But you can override :the name of the config filethe extension to JSONthe path to the directory with the configs filesAlso you can define an environment, then 2 files will be loaded :the "common" config file -application.yamlthe "environment" config file -application-[environment].yamlHow to use itInstall with pippip install adaendra-python-config-loaderImport the configs and use it!fromAdaendraConfigsimportAdaendraConfigsprint(AdaendraConfigs.configs.abc)Configuration environment variablesNameDescriptionDefault valueCONFIG_ENVIRONMENTEnvironment to loadNoneCONFIG_FOLDERPath to the config files'/app/resources'CONFIG_FILE_EXTENSIONFile extensions of your config file. Allow : '.yml'/'.yaml'/'.json''.yaml'CONFIG_PROJECT_NAMEName of your project(which is generally the name of the config files)'application'DocumentationPyPi
Package: adafair
AdaFair: Cumulative Fairness BoostingOverviewThis GitHub repository presents an extended version of the AdaFair algorithm, initially introduced in the paper titled "AdaFair: Cumulative Fairness Adaptive Boosting" (CIKM 2019). This extension incorporates various parity-based fairness notions, enabling a more comprehensive and adaptive approach to fairness in machine learning models.Key FeaturesEnsemble Approach:Introduces an ensemble method for fairness, modifying the data distribution throughout boosting rounds to emphasize misclassified instances of minority groups.Fairness Cost Calculation:Implements fairness cost, evaluating performance disparities between protected and non-protected groups, ensuring fairness adaptations during model training.Cumulative Notion of Fairness:Evaluates fairness based on the partial ensemble, providing a cumulative perspective rather than individual boosting rounds.Beneficial for Different Notions:Demonstrates the effectiveness of cumulative fairness for various parity-based fairness notions, enhancing model fairness across different dimensions.UpdatesThe repository has recently been updated to enhance its functionality and usability:Improved Weak Learner Selection:The selection of weak learners (\theta parameter) is now performed on a dedicated validation set, optimizing the algorithm's performance.Additional Fairness Notions:Introduces two new fairness notions, namely "Statistical Parity" (AdaFairSP.py) and "Equal Opportunity" (AdaFairEQOP.py), expanding the algorithm's applicability to different fairness criteria.How to UseTo utilize this extended AdaFair algorithm in your machine learning projects, follow these steps:pip install adafairPreprintThis is an extension of our AdaFair algorithm (KAIS 2022,"Parity-based cumulative fairness-aware boosting") to other parity-based fairness notions. We propose an ensemble approach to fairness that alters the data distribution over the boosting rounds “forcing” the model to pay more attention to misclassified instances of the minority. This is done using the so-called fairness cost which assesses performance differences between the protected and non-protected groups. The performance is evaluated based on the partial ensemble rather than on the weak model of each boosting round. We show that this cumulative notion of fairness is beneficiary for different parity-based notions of fairness. Interestingly, the fairness costs also help with the performance on the minority class (if there is imbalance). Imbalance is also directly tackled at post-processing by selecting the partial ensemble with the lowest balanced error.Contributions and IssuesContributions and feedback are welcome. If you encounter any issues or have suggestions for improvement, please feel free to create an issue in the repository or submit a pull request.Note:This repository is actively maintained and updated to ensure the highest standards of fairness and performance in machine learning models. Thank you for considering AdaFair for your fairness-aware machine learning tasks.See jupyter notebook (run_example.ipynb) on how to train and use the model.
Package: adafruit-blinka-displayio
Introductiondisplayio for BlinkaDependenciesThis driver depends on:Adafruit BlinkaInstalling from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-blinka-displayioTo install system-wide (this may be required in some cases):sudopip3installadafruit-blinka-displayioTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installadafruit-blinka-displayioContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.DocumentationFor information on building library documentation, please check outthis guide.
Package: adafruit-blinka-pyportal
IntroductionA port of the PyPortal library intended to run on Blinka in CPython.DependenciesThis driver depends on:Adafruit BlinkaAdafruit Blinka DisplayIOInstalling from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-blinka-pyportalTo install system-wide (this may be required in some cases):sudopip3installadafruit-blinka-pyportalTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installadafruit-blinka-pyportalContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.DocumentationFor information on building library documentation, please check outthis guide.