Saravanan666/pypi-org huggingface dataset:
Package: scoper
scopertest a single URL, or a list of URLs, against a Burp Suite-style JSON configuration file to determine in/out-of-scope statusinstallation (GitHub/PyPi)pip install scoperimporting and loading the external Burp-style configuration fileimports and loading the configuration file in your scriptimport json
from scoper import ScoperList, ScoperSingle
with open("test-burp-config.json", "r") as conf:
	c = json.load(conf)
conf.close()ScoperSinglecheck a single URL (provide a string)#s = ScoperSingle(config="/path/to/config.json", url="http://test.google.com/admin/stuff") # pass in a string path to the config file
s = ScoperSingle(config=c, url="http://test.google.com/admin/stuff") # note "c" is the config loaded above
print(s.output) # single dict
print(s.json) # single JSON string
print(s.color) # single colorized string
# if passing in a dict for the config, loop over a list of URLs etc while only opening the config onceloop over multiple URLs "inputUrls" and process them one at a timefor i in inputUrls:
	#sss = ScoperSingle(config="/path/to/config.json", url="http://test.google.com/admin/stuff") # pass in a string path to the config file
	sss = ScoperSingle(config=c, url="http://test.google.com/admin/stuff") # note "c" is the config loaded above
	print(sss.output) # single dict
	print(sss.json) # single JSON string
	print(sss.colors) # single colorized stringScoperListbulk-process multiple URLs (provide a list)l = ScoperList(config=c, urls=inputUrls) # note "c" is the config loaded above, inputUrls is a list object
# dict object, NOT the same format as ScoperSingle
print(l.output)
# JSON object, NOT the same format as ScoperSingle
print(l.json)
# generator, dict output in the SAME format as ScoperSingle
for x in l.output_generator():
	print(x)
# generator, JSON output in the SAME format as ScoperSingle
for x in l.json_generator():
	print(x)
# large colorized string with newline characters for on-screen viewing
print(l.color)example outputRelease Notesv1.1.0major overhaul to streamline codemade output functions in ScoperList into generatorsfixed some logic that determines inside/outside of scopev1.0.21simplified import structureminor typo fixes
Package: scoping
Probably the best way to simulate block scopes in Python.This is a package, as it says on the tin, to emulate block scoping in Python,
the lack of which being a clever design choice yet sometimes a trouble.In addition to readability and code organization
(where your mileage may vary),
block scoping in particular helps to have variables garbage collected as soon as possible, which is useful for situations where variables may refer to expensive resources (e.g. GPU arrays).This package is designed to be as easy to use as possible, with the least mental burden on the user,
whilst the implementation being necessarily confusing and cryptic due to the tricks used.UsageOther than installing from PyPI the usual way,
you can also directly download scoping.py to where your main script is to use the package.To start a scoped block (where the variables created in the block is to be deleted after the block) usewith scoping():
    ....Within a block, you can selectively let a variable leak through to the outer scope (as in the traditional behavior in Python) by passing the name (as a string) toscoping.keep()If you are only after using the library,
just consider scoping and scoping.keep as
some kind of quasi-keywords rather than real classes/objects.Seefrom scoping import scoping
a = 2
with scoping():
    assert(2 == a)
    a = 3
    b = 4
    scoping.keep('b')
    assert(3 == a)
assert(2 == a)
assert(4 == b)In the rare case that you would like to reserve the word "scoping" for other uses, the class can be renamed arbitrarily using the following trick:import scoping
class VeryScoped(scoping.scoping): pass
del scopingThen the names "VeryScoped" and "VeryScoped.keep" can be used instead,
whereas the name "scoping" can be put to other uses at will.Blocks can be nested, as well as used in functions (unlike prior art),
at the price of relying on some CPython specific feature.Motivation/Prior ArtSeehttps://github.com/bskinn/tempvarswith a similar idea but not the intended use for general programming, as well as a more mentally demanding interface (IMHO).CompatibilityTested with python 3.6/7/8/9 under Linux
Package: scoping-resolver
AboutThis repo brings about a strong analysis of scoping for Python language,
which could tell a symbol inside a context is afreevar,bounded varorcell var, and many other details
like, "is this closure a coroutine/generator/async generator?" and so on.More about Python's scoping, checkcode object.Symbol-Resolvercould be leveraged to implement transpilers from Python to another language with hygienic scopes,
likeTensorflow AutoGraphandNumba AutoJit:fromutranspilerimporttranspile,func# The `func` might not be a valid python function,# but it can be used to denote some external function.@transpiledefufunc(x):func(x)In above codes,funcis resolved to be aglobalvariable, in other words,
you can then search the namefuncfrom global context from current module,
and make sure it's exactly thefuncobject that is the expected external function.If you're still confused about the power ofSymbol-Resolver, there is also an example for you:fromutranspilerimporttranspile,func@transpiledefufunc(x):func=lambdax:x+1func(x)Orfromutranspilerimporttranspile,funcfunc=lambdax:x+1@transpiledefufunc(x):func(x)Now you cannot expectfuncas an external function, but you might not want to check the symbol manually by implementing
your specific symbol analyzer.Tensorflow team is still struggling with above problem, you can something unhygienic in following link:https://github.com/tensorflow/tensorflow/blob/3ae375aa92fbb6155f82393735d0b98d8fb9c1b2/tensorflow/python/autograph/converters/lists.py#L129UsageChecktest/test_simple.py.TheScopeTaggerconverts any AST that lead to a new context into a wrapped node namedScopedAst, where all
the information about current context is held.importunittestimportastfromscoping_resolverimportto_scoped_ast,ScopedAst,SymTable,ScopeTaggermod_code="""c = lambda x: xdef f(x):g(x)c = 2g(c)"""classTestSimple(unittest.TestCase):deftest(self):mod=ast.parse(mod_code)# Make a new symbol table object for global context.# Of course, symbol tables for sub-contexts would be created# when analyzing the whole module AST.g=SymTable.global_context()# Get raw information of AST.ScopeTagger(g).visit(mod)# Peform analysis.g.analyze()# You can directly use `to_scoped_ast(mod)`# instead when you don't need a top level `g`.# Show representations of nested scopes:print(g.show_resolution())# [AnalyzedSymTable(bounds=set(), freevars=set(), cellvars=set()),#  [[AnalyzedSymTable(bounds={'x'}, freevars=set(), cellvars=set()), []],#   [AnalyzedSymTable(bounds={'x', 'c'}, freevars=set(), cellvars=set()), []]]]body=mod.bodydef_f:ScopedAst=body[1]# `FunctionDef` creates a new context, so it'll be wrapped inside a ScopedAstself.assertEqual(type(def_f),ScopedAst)self.assertEqual(type(def_f.node),ast.FunctionDef)self.assertIn('c',def_f.scope.analyzed.bounds)
Package: scopus-of-science
scopus_of_scienceDescriptionThis package merges databases downloaded from Scopus (.csv) and Web of Science (plain text with the extension .txt).
It returns a pandas DataFrame which can be saved as a Scopus .csv file compatible with
softwares for bibliographic analysis (such asVOSviewer)Installationpipinstallscopus_of_scienceUsagefromscopus_of_scienceimportSOSs=SOS(sco="datasets/scopus.csv",wos=["datasets/wos1.txt","datasets/wos2.txt"])data=s.get()print(data)data.to_csv("csv_filename.csv",index=False)DependenciespandasContributingAll contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome
Package: scopusreport
scopusreportCreate reports using Scopus data automatically in PythonDocumentation:https://scopusreport.readthedocs.ioDevelopment:https://github.com/scopus-api/scopus-reportChange logPlease seeCHANGES.rst.ContributingPlease seeCONTRIBUTING.rst. For a list of contributors seeAUTHORS.rst.LicenseMIT License; seeLICENSE.
Package: sco-py
sco_py: Sequential Convex Optimization with Pythonsco_py is a lightweight Sequential Convex Optimization library for solving non-convex optimization problems. sco_py is intended for use with the OpenTAMP planning system. Currently, the library supports bothGurobi(license required) andOSQP(open-source, no license required!) as backend QP solvers.InstallationFrom PyPI with pipSimply run:pip install sco-pyFrom GitHub with pipSimply run:pip install git+https://github.com/Algorithmic-Alignment-Lab/sco_py.gitDeveloper (from source)Clone this repositoryfrom GitHubInstall Poetry by following the instructions fromhereInstall all dependencies withpoetry install.Contributingsco is an open-source repository and as such, we welcome contributions from interested members of the community! If you have a new idea for a feature/contribution, do post in the'Discussions' tab of the GitHub repositoryto get some feedback from the maintainers before starting development. In general, we recommend that you fork the main repository, create a new branch with your proposed change, then open a pull-request into the main repository. The main requirement for a new feature is that it cannot break the current test cases (see below for how to run our tests) unless this is unavoidable, and in this case, it should modify/introduce new tests as necessary. In particular, we welcome updates to documentation (docstrings, comments, etc. that make the codem more approachable for new users) and test cases!Running testsIf you do not have a license for Gurobi, then you can only run the OSQP tests. To do so, run:pytest tests/sco_osqp/If you do have a license for Gurobi, then you can run all tests with thepytestcommand.Note that our Contrinuous Integration (CI) setup only checks and reports status for OSQP tests. In general, if you are contributing a new feature, itmustpass the existing OSQP tests and contribute new tests that test the new feature at least with OSQP (and preferably with Gurobi as well).
Package: scopyon
scopyon:microscope: Monte Carlo simulation toolkit for bioimaging systemsRequirementsForscopyon, Python 3 and its libraries,numpy,scipyandmatplotlib, are required.scikit-imageis also needed byscopyon.spot_detection.Installation$pipinstallscopyonor$pythonsetup.pytestinstallQuick start$pythonexamples/twocolor_script.pyLicensescopyonis licensed under the terms of BSD-3-Clause (seeLICENSE).CitationIf this package contributes to your work, please cite the followings.https://doi.org/10.1371/journal.pone.0130089
Package: scora-cli
This CLI is coupled with the Idea of the Scora Platform and Scora Blocks to:Configure Cloud Stacks removing the complexity of writing templates;Helping on CI/CD projects with the Airflow on the architecture defined by Scora Blocks;Helping configuring repositories for fullstack apps that use Cognito, CloudFront, S3 and Lambda;DevelopmentTesting before building# Configure the dependenciesvirtualenv-ppython3../venv/bin/activatepipinstall-e.[dev]# run initpython-c'from scora.commands.blocks.impl import init; init()'# run pushpython-c'from scora.commands.blocks.impl import push; push()'Build, install, test locally# build from this source -- considering that dependencies are resolvedrm-rf./dist/*&&python3setup.pysdistbdist_wheel# From another venv -- installvirtualenv-ppython3../venv/bin/activatepipinstall<REPO_HOME>/dist/scora-cli-0.1.0.tar.gz# Run frscora--helpBuild the docs# build -- considering that dependencies are resolvedrm-rf./docs_build&&makehtmlopen./docs_build/html/index.html
Package: scora-ldap
Scora LdapServices and functions to simplify ldap management, including extracting ldap infos with DynamoDB object config.Usagefromscora_ldapimportLdapServiceldap_service=LdapService(TENANT,LDAP_USERNAME,LDAP_PASSWORD,DYNAMODB_TABLE_NAME)DynamoDB Object Exampleserviceas primary key.{"service":"service","ldap_admin_groups":[],"ldap_domain":"@service.local","ldap_groups":["GS_1","group2"],"ldap_root_dn":"CN=GS_1,OU=Grupos,DC=service,DC=local","ldap_root_dn_dev":"dc=service,dc=local","ldap_server":"ldap://localhost.389","ldap_port":636,// Default is 389"ldap_server_alias":["service.com.br"]}
Package: scora-notify
This package implements Slack notification and Mixpanel abstractions to be used in various projects.This packages uses logging for console outputs.The Slack notifier can:
* Start threads
* Update threads
* Finish threadsThe event tracker can:
* Track events
* Time eventsTo time an event, call the time_event method with the desired event_name, and later call track on that same event. The duration between calls will be saved as the “Duration” property.DevelopmentBuild, install, test locally# build from this source -- considering that dependencies are resolvedrm-rf./dist/*&&python3-mbuild# From another venv -- installvirtualenv-ppython3../venv/bin/activatepipinstall<REPO_HOME>/dist/scora-notify-0.1.0.tar.gz# Import and runfromscora_notifyimportNotifynotify=Notify(slack_token="",slack_channel="",step="",tenant="",project="")# Import and runfromscora_notifyimportEventTrackertracker=src.EventTracker("",project="",tenant="")tracker.track("event",properties={"prop":1})
Package: score
TAIScoreInstallvia pippipinstalltscorevia source codepythonsetup.pyinstallUsageimporttscoreastsDocumentsA simple APIdocsStructuretscore.basebase class and util functiontscore.dataget data and manage source datatscore.preprocessingdata preprocessingtscore.featuresfeature engineeringtscore.score_cardtraditional logistic regressiontscore.interpretertry to interpreter  black box modeltscore.metricsmodel evalutiontscore.model_selectionmodel selectiontscore.machine_learningscore model with machine learningtscore.pipelinepipeline build toolstscore.deploygenerate model deoply fileapi for model onlinehard rules for logistic regression score card rulestscore.plotvisual modeltscore.reportgenerate report for credit score modeltscore.risk_rulesgenerate risk rules from datatscore.monitormodel monitorAuthorsspencercs.ai@gmail.com
Package: score.asyncio
The SCORE Frameworkis a collection of harmonized python and javascript
libraries for the development of large scale web projects. Powered bystrg.at.score.asyncioHelper for convenient usage of asyncio loops.This module is a work in progress, thus currently poorly documented :-/LicenseCopyright © 2017,2018 STRG.AT GmbH, Vienna, AustriaAll files in and beneath this directory are part of The SCORE Framework.
The SCORE Framework and all its parts are free software: you can redistribute
them and/or modify them under the terms of the GNU Lesser General Public
License version 3 as published by the Free Software Foundation which is in the
file named COPYING.LESSER.txt.The SCORE Framework and all its parts are distributed without any WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. For more details see the GNU Lesser General Public License.If you have not received a copy of the GNU Lesser General Public License seehttp://www.gnu.org/licenses/.The License-Agreement realised between you as Licensee and STRG.AT GmbH as
Licenser including the issue of its valid conclusion and its pre- and
post-contractual effects is governed by the laws of Austria. Any disputes
concerning this License-Agreement including the issue of its valid conclusion
and its pre- and post-contractual effects are exclusively decided by the
competent court, in whose district STRG.AT GmbH has its registered seat, at the
discretion of STRG.AT GmbH also the competent court, in whose district the
Licensee has his registered seat, an establishment or assets.
Package: score.auth
The SCORE Frameworkis a collection of harmonized python and javascript
libraries for the development of large scale web projects. Powered bystrg.at.score.authThis module provides authentication (“who are you?”) and authorization (“are
you allowed to do this?”) for your SCORE application.Thenarrative documentation of score.authcontains all the information you
need to put this module to good use.LicenseCopyright © 2015-2018 STRG.AT GmbH, Vienna, AustriaAll files in and beneath this directory are part of The SCORE Framework.
The SCORE Framework and all its parts are free software: you can redistribute
them and/or modify them under the terms of the GNU Lesser General Public
License version 3 as published by the Free Software Foundation which is in the
file named COPYING.LESSER.txt.The SCORE Framework and all its parts are distributed without any WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. For more details see the GNU Lesser General Public License.If you have not received a copy of the GNU Lesser General Public License seehttp://www.gnu.org/licenses/.The License-Agreement realised between you as Licensee and STRG.AT GmbH as
Licenser including the issue of its valid conclusion and its pre- and
post-contractual effects is governed by the laws of Austria. Any disputes
concerning this License-Agreement including the issue of its valid conclusion
and its pre- and post-contractual effects are exclusively decided by the
competent court, in whose district STRG.AT GmbH has its registered seat, at the
discretion of STRG.AT GmbH also the competent court, in whose district the
Licensee has his registered seat, an establishment or assets.
Package: scorecard-ai
Scorecard AI Python LibraryInstallationAdd this dependency to your project's build file:pipinstallscorecard-ai# orpoetryaddscorecard-aiUsageWe also export an HTTP client so that you can hit our APIs
directly.importscorecardfromscorecard.clientimportScorecardclient=Scorecard(api_key="YOUR_API_KEY"# Defaults to SCORECARD_API_KEY)testset=client.testset.create(testset_id=1234,user_query="Your prompt...",model_params:{"param":"value"})print(testset)Async ClientUse our async cien to make non-blocking requests to the API.importscorecardimportasynciofromscorecard.clientimportAsyncScorecardclient=AsyncScorecard(api_key="YOUR_API_KEY"# Defaults to SCORECARD_API_KEY)asyncdefmain()->None:testset=awaitclient.testset.create(testset_id=1234,user_query="Your prompt...",model_params:{"param":"value"})print(testset)asyncio.run(main())Running TestsTherun_testsmethod will load your test cases,
invoke your models with saved prompts, and record success and failure. This is
available on both the sync and async client.fromscorecard.clientimportScorecardclient=Scorecard(api_key="YOUR_API_KEY")client.run_tests(# Your Testset IDinput_testset_id=123,# Your Scoring Config IDscoring_config_id=456,# The model invocation that you would like to testmodel_invocation=lambdaprompt:call_model(prompt),)TimeoutsBy default, the client is configured to have a timeout of 60 seconds. You can customize this value at client instantiation.fromscorecard.clientimportScorecardscorecard_client=Scorecard(api_key="YOUR_API_KEY",timeout=15,)Handling ExceptionsAll exceptions thrown by the SDK will sublcassscorecard.ApiError.fromscorecard.coreimportApiErrorfromscorecardimportUnprocessableEntityErrortry:client.testset.get("testset-id")exceptUnprocessableEntityErrorase:# handle unprocessable entity errorexceptAPIErrorase:# handle any api related errorError codes are as followed:Status CodeError Type422UnprocessableEntityErrorBeta statusThis SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning the package version to a specific version in your pyproject.toml file. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.ContributingWhile we value open-source contributions to this SDK, this library is generated programmatically. Additions made directly to this library would have to be moved over to our generation code, otherwise they would be overwritten upon the next generated release. Feel free to open a PR as a proof of concept, but know that we will not be able to merge it as-is. We suggest opening an issue first to discuss with us!On the other hand, contributions to the README are always very welcome!
Package: scorecardbundle
Scorecard-Bundle is ahigh-level Scorecard modeling APIthat is easy-to-use andScikit-Learn consistent.  It covers the major steps to train a Scorecard model such as feature discretization with ChiMerge, WOE encoding, feature evaluation with information value and collinearity, Logistic-Regression-based Scorecard model, and model evaluation for binary classification tasks. All the transformer and model classes in Scorecard-Bundle comply with Scikit-Learn‘s fit-transform-predict convention.See detailed documentation inhttps://scorecard-bundle.bubu.blue/See the source codes of this project inhttps://github.com/Lantianzz/Scorecard-Bundle
Package: score-card-model
我家还蛮大的, 欢迎你们来我家van.https://github.com/skykisekiscore_card_model"风险评分卡模型开发" 
基于最早的FICO风险评分卡逻辑进行优化

当前包含主干部分, 即特征分箱、IV值计算、Woe转化、模型评估指标等。
不包含建模的部分, 这个问题留给用户。


特征的分箱使用的方法是卡方分箱, 整个流程为:
整理特征类型(离散、连续) -> 初始化分箱 -> 卡方合并 -> 单调性检验 -> 特殊值处理完整文档见README.mdGitHub:https://github.com/skykiseki/score_card_model
Package: scorecardpy
scorecardpyThis package is python version of R packagescorecard.
Its goal is to make the development of traditional credit risk scorecard model easier and efficient by providing functions for some common tasks.data partition (split_df)variable selection (iv,var_filter)weight of evidence (woe) binning (woebin,woebin_plot,woebin_adj,woebin_ply)scorecard scaling (scorecard,scorecard_ply)performance evaluation (perf_eva,perf_psi)InstallationInstall the release version ofscorecardpyfromPYPIwith:pip install scorecardpyInstall the latest version ofscorecardpyfromgithubwith:pip install git+git://github.com/shichenxie/scorecardpy.gitExampleThis is a basic example which shows you how to develop a common credit risk scorecard:# Traditional Credit Scoring Using Logistic Regressionimportscorecardpyassc# data prepare ------# load germancredit datadat=sc.germancredit()# filter variable via missing rate, iv, identical value ratedt_s=sc.var_filter(dat,y="creditability")# breaking dt into train and testtrain,test=sc.split_df(dt_s,'creditability').values()# woe binning ------bins=sc.woebin(dt_s,y="creditability")# sc.woebin_plot(bins)# binning adjustment# # adjust breaks interactively# breaks_adj = sc.woebin_adj(dt_s, "creditability", bins)# # or specify breaks manuallybreaks_adj={'age.in.years':[26,35,40],'other.debtors.or.guarantors':["none","co-applicant%,%guarantor"]}bins_adj=sc.woebin(dt_s,y="creditability",breaks_list=breaks_adj)# converting train and test into woe valuestrain_woe=sc.woebin_ply(train,bins_adj)test_woe=sc.woebin_ply(test,bins_adj)y_train=train_woe.loc[:,'creditability']X_train=train_woe.loc[:,train_woe.columns!='creditability']y_test=test_woe.loc[:,'creditability']X_test=test_woe.loc[:,train_woe.columns!='creditability']# logistic regression ------fromsklearn.linear_modelimportLogisticRegressionlr=LogisticRegression(penalty='l1',C=0.9,solver='saga',n_jobs=-1)lr.fit(X_train,y_train)# lr.coef_# lr.intercept_# predicted proabilitytrain_pred=lr.predict_proba(X_train)[:,1]test_pred=lr.predict_proba(X_test)[:,1]# performance ks & roc ------train_perf=sc.perf_eva(y_train,train_pred,title="train")test_perf=sc.perf_eva(y_test,test_pred,title="test")# score ------card=sc.scorecard(bins_adj,lr,X_train.columns)# credit scoretrain_score=sc.scorecard_ply(train,card,print_step=0)test_score=sc.scorecard_ply(test,card,print_step=0)# psisc.perf_psi(score={'train':train_score,'test':test_score},label={'train':y_train,'test':y_test})