Saravanan666/pypi-org huggingface dataset:
Package: abics
abICSabICS is a software framework for training a machine learning model to
reproduce first-principles energies and then using the model to perform
configurational sampling in disordered systems.
Specific emphasis is placed on multi-component solid state systems such as metal and oxide alloys.
The current version of abics can use neural network models implemented in aenet to be used as
the machine learning model. As of this moment, abICS can also generate Quantum Espresso, VASP,
and OpenMX input files for obtaining the reference training data for the machine learning model.Requirementpython3 (>=3.7)numpyscipytoml (for parsing input files)mpi4py (for parallel tempering)This requires one of the MPI implementationpymatgen (>=2019.12.3) (for using Structure as a configuration)This requires Cythonqe-tools (for parsing QE I/O)Install abICSPymatgen requires Cython but Cython will not be installed automatically,
please make sure that this is installed,$pip3installCythonmpi4py requires one of the MPI implementations such as OpenMPI,
please make sure that this is also installed.
In the case of using homebrew on macOS, for example,$brewinstallopen-mpiAfter installing Cython and MPI,$pip3installabicswill install abICS and dependencies.If you want to change the directory where abICS is installed,
add--useroption or--prefix=DIRECTORYoption to the above command as$pip3install--userabicsFor details ofpip, see the manual ofpipbypip3 help installIf you want to install abICS from source, seewiki pageLicenseThe distribution of the program package and the source codes follow GNU General Public License version 3 (GPL v3).Official pagehttps://www.pasums.issp.u-tokyo.ac.jp/abicsAuthorShusuke Kasamatsu, Yuichi Motoyama, Tatsumi Aoyama, Kazuyoshi YoshimiManualEnglish online manualJapnese online manualAPI reference
Package: abieos-python
abieos-pythonPython bindings forabieoslibrary. Implements Binary <> JSON conversion of EOS action data using ABIs.BuildingPrerequisitesabieos C++ library depends on a recent version of CMake (>=3.11) and GCC8. Please make sure these are available in your system.Statically linkedThis is the most comfortable to use, as we can just package the library as a wheel file and ship it. Patch toCMakeLists.txtis required to be able to build abieos as a static library.First you need to build abieos library itself:$gitsubmoduleupdate--init-recursive
$mkdirexternal/abieos/build
$cdexternal/abieos/build
$cmake..
$makeThen you can simply build the package usingsetuptools.$pythonsetup.pybuild--staticDynamically linkedIf you really want to dynamically link the bindings to the version of abieos installed on your system, you also can. At the time of writing these instructions (24.02.2020), EOSIO does not release a binary packages for any OS nor even supports installing the built library usingmakecommand. Assuming you've built the library and copied it manually into correct paths, you can simply build the bindings usingsetuptools.$pythonsetup.pybuildRunning testsWhen running tests you can run into problems because a version without C extensions will be used. As a workaround, you can copy the built file toabieos/:cpbuild/lib.*/abieos/_private*abieos# workaroundflake8
mypy
pytestUsageIf you're running Python on Linux or macOS, you can skip building and use a wheel instead.$pipinstallabieos-pythonIt is recommended to useEosAbiSerializerclass if possible, but if your use case requires access the original abieos API, it is available underabieos.private.With ABI in binary format (bytes)fromabieosimportEosAbiSerializers=EosAbiSerializer()s.set_abi_from_bin('eosio.token',abi)With ABI in hex format (str)fromabieosimportEosAbiSerializers=EosAbiSerializer()s.set_abi_from_hex('eosio.token',abi)With ABI in JSON format (dict)fromabieosimportEosAbiSerializers=EosAbiSerializer()s.set_abi_from_json('eosio.token',abi)dict -> bytess.json_to_bin('eosio.token',s.get_type_for_action('eosio.token','transfer'),{'from':'useraaaaaaaa','to':'useraaaaaaab','quantity':'0.0001 SYS','memo':'',})dict -> hex strings.json_to_hex('eosio.token',s.get_type_for_action('eosio.token','transfer'),{'from':'useraaaaaaaa','to':'useraaaaaaab','quantity':'0.0001 SYS','memo':'',})bytes -> dicts.bin_to_json('eosio.token',s.get_type_for_action('eosio.token','transfer'),b'`\x8c1\xc6\x18s\x15\xd6p\x8c1\xc6\x18s\x15\xd6\x01\x00\x00\x00\x00'b'\x00\x00\x00\x04SYS\x00\x00\x00\x00\x00')hex string -> dicts.hex_to_json('eosio.token',s.get_type_for_action('eosio.token','transfer'),'608C31C6187315D6708C31C6187315D60100000000000000045359530000000000')With custom JSON encoder/decoderfromabieosimportEosAbiSerializers=EosAbiSerializer(loads=simplejson.loads,dumps=simplejson.dumps)
Package: a-bigelow.cdk-eventbridge-partner-processors
Eventbridge SaaS Partner fURLsThis CDK Construct library provides CDK constructs for the 1st-party (i.e. developed by AWS) lambda fURL webhook receivers for:GitHubStripeTwilioUsage Examples (Simplified)These examples are consistent for all 3 primary exported constructs of this library:GitHubEventProcessorTwilioEventProcessorStripeEventProcessorNote: Click on the aboveView on Construct Hubbutton to view auto-generated examples in Python/GoTypescriptimport{GitHubEventProcessor}from'cdk-eventbridge-partner-processors';import{Stack,StackProps}from'aws-cdk-lib';import{Construct}from'constructs';import{EventBus}from'aws-cdk-lib/aws-events';import{Secret}from'aws-cdk-lib/aws-secretsmanager';exportclassMyStackWithABetterNameextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);//ThislibraryhasnoopiniononhowyoureferenceyourEventBus,//ItjustneedstofulfilltheIEventBusprotocolconstmyEventBus=newEventBus(this,'TheBestBusEver',{eventBusName:'TheGreatestBus'});//Thislibraryhasnoopiniononhowyoureferenceyoursecret,//ItjustneedstofulfilltheISecretprotocolconstmySecret=Secret.fromSecretNameV2(this,'MyNuclearCodeSecret','/home/recipes/icbm')//Functionwillautomaticallyreceivepermissionto://1.Posteventstothegivenbus//2.ReadthegivensecretconstgithubEventProcessor=newGitHubEventProcessor(this,'GitHubProcessor',{eventBus:myEventBus,webhookSecret:mySecret,lambdaInvocationAlarmThreshold:2000,})}}Golangpackagemainimport(partner"github.com/a-bigelow/cdk-eventbridge-partner-processors-go""github.com/aws/aws-cdk-go/awscdk/v2""github.com/aws/aws-cdk-go/awscdk/v2/awsevents""github.com/aws/constructs-go/constructs/v10""github.com/aws/jsii-runtime-go")typeClusterStackPropsstruct{awscdk.StackProps}funcNewClusterStack(scopeconstructs.Construct,idstring,props*ClusterStackProps)awscdk.Stack{varspropsawscdk.StackPropsifprops!=nil{sprops=props.StackProps}stack:=awscdk.NewStack(scope,&id,&sprops)// The code that defines your stack goes hereeventProps:=awsevents.EventBusProps{EventBusName:jsii.String("name")}eventBus:=awsevents.NewEventBus(stack,jsii.String("id"),&eventProps)secret:=secretsmanager.secret.fromSecretNameV2(scope,jsii.String("secret"),jsii.String("secretName"))partnerProcessor:=partner.GithubEventProcessor{EventBus:eventBus,WebhookSecret:secret,LambdaInvocationAlarmThreshold:2000,}_=partner.NewGitHubEventProcessor(stack,jsii.String("id"),partnerProcessor)returnstack}Disclaimer:warning: The Lambda Functions that handle the actual event processing in this Library are owned and maintained by Amazon Web Services. This CDK Construct library provides a thin deployment wrapper for these functions. Changes made to the S3 location of the functions will break this library. Until I have a way to deterministically track where these things are, please raise anissueif you have reason to believe that the functions have moved.AWS DocumentationSeeherefor additional information.
Package: abi-guesser
ABI Guesser PyA Pythonic version ofabi-guesser.
All credit goes tosamczsunfor the original development; this is a direct 1-to-1 replication of his work.Installationpip install abi_guesserUsage>>>fromabi_guesserimportguess_fragment>>>guess_fragment("0x38ed173900000000000000000000000000000000000000000000000000000000389fd9800000000000000000000000000000000000000000004607aa2b3b11fb9d4c000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000032baf5624fed24e66feaeb9c3fb1cad9e0960cc80000000000000000000000000000000000000000000000000000000064da7d310000000000000000000000000000000000000000000000000000000000000003000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c8de43bfe33ff496fa14c270d9cb29bda196b9b5")'guessed_38ed1739(uint256,uint256,address[],address,uint256)'>>># swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline)
Package: abimca
Autoencoder Based Iterative Modeling and Subsequence Clustering Algorithm (ABIMCA)This repository contains the python code for the Autoencoder Based Iterative Modeling and Subsequence Clustering Algorithm (ABIMCA)[^koehn] which is a deep learning method to separate multivariate time-series data (MTSD) into subsequences. It is beneficial in a variety of fields, to cluster MTSD into smaller segments or subsequences in an unsupervised manner. The ability to filter measurement data based on specific subsequences can improve downstream development products such as anomaly detection or machine diagnosis in condition based maintenance (CbM) strategies. Our algorithm is specifically useful for MTSD generated by a mechatronic system in a transient environment. It can be used offline as well as online for streaming data. It utilizes recurrent neural network (RNN) based Autoencoders (AE) by iteratively training a Base Autoencoder (BAE), generating a segmentation score and saving the intermediate parameters of the BAE to recognize previously identified subsequences.UsagePackage can be installed with pip$pipinstallabimcaor clone the repository, and cd into the directory. Then recommendation is to create a virtual environment after installing and using python 3.9 withpyenvpython-mvenv.venvactivate the environment
Linux:
$ source .venv/bin/activateWindows cmd:
C:> .venv\Scripts\activate.batThen install withpoetry$poetryinstallFinally run the minimal example inmain.py$python-mmainThe above graphic example was generated with therun_lorenz.pyscript. The minimal example is as follows:fromabimcaimportSubsequenceIdentifierimportnumpyasnpdefmain():# Generating random data. This will produce no class predictions or all points have the same class. For more reasonable results replace the data input with your mechatronic measurement data.# Number of datapoints (time-steps)n_p=300# Number of dimensions or featuresdim=5X=np.random.rand(n_p,dim)# Number of clustersn_c=5y=np.random.randint(n_c,size=n_p)# Compute online clusteringsi=SubsequenceIdentifier(disable_progress_bar=False)si.fit(X)print(f"Label array from online fitting:\n{si.label_array}")# Compute offline clusteringlabels=si.predict(X)print(f"Label array from online fitting:\n{labels}")if__name__=="__main__":main()References[^koehn]: Köhne, J. et al. Autoencoder based iterative modeling and multivariate time-series subsequence clustering algorithm
Package: abinator
AbinatorDefine ABI for your smart contract with dataclass-like style.Quick exampleDefine your abi asAbichild.Abi.to_abi()returns abi as json, so you can use it withweb3pyandweb3-premium.fromabinatorimportAbi,uint256,uint8classERC20Fragment(Abi):decimals:uint8@viewdefbalanceOf(account:address)->uint256:...ERC20Fragment.to_abi()# returns json with abiDocumentationState mutabilityYou can useview,pure,payabledecoratos for state mutabilty.fromabinatorimportAbi,uint256classContract(Abi):@viewdefbalanceOf(account:address)->uint256:...@payabledefdeposit():...@puredefsafe_add(a:uint256,b:uint256)->uint256:...EventsDefine events with child class ofEventinside your abi class.You can useindexeddecorator for topics.fromabinatorimportAbi,Event,address,uint256,indexedclassERC20Fragment(Abi):classTransfer(Event):from_:indexed(address)to:indexed(address)value:uint256Also there isanonymousfor event class:fromabinatorimportAbi,Event,anonymous,uint256classContract(Abi):@anonymousclassAnonymousEvent(Event):value:uint256Structs and tupleDefine structs with child class ofStructinside your abi class.fromabinatorimportAbi,Struct,payable,address,uint24,int24,uint256classNonfungiblePositionManager(Abi):classMintParams(Struct):token0:addresstoken1:addressfee:uint24tickLower:int24tickUpper:int24amount0Desired:uint256amount1Desired:uint256amount0Min:uint256amount1Min:uint256recipient:addressdeadline:uint256@payabledefmint(params:MintParams)->tuple[uint256,uint128,uint256,uint256]:...
Package: abing
Welcome to ABING!What is ABING?ABING는 AB테스트를 위한 라우팅 툴입니다. 일반적인 비즈니스 모델에서 사용할 수 있도록 ABING는 별도의 연동과정 없이 AB테스팅을 운영할 수 있도록 개발되었습니다. UI에서 실험 생성 및 설정 후 route API(/api/v1/experiments/route)에서 각 user id별(필요 시 uuid)로 할당만 받으면 자유롭게 AB테스팅을 할 수 있습니다.Getting startedInstallation아래와 같이 pip로 빠르게 설치할 수 있습니다.pipinstallabing서버 실행DB 초기화DB 연결을 위해 ABING은 다음 다섯개의 환경변수를 필요로 합니다.ABING_DBABING_DB_USERABING_DB_PASSWORDABING_DB_HOSTABING_DB_PORT따라서 아래와 같이 환경변수를 export해주세요exportABING_DB="abing"exportABING_DB_USER="abing"exportABING_DB_PASSWORD="$uperScretPassW0rd"exportABING_DB_HOST="abing-db.com"exportABING_DB_PORT=5432이후 migration을 위해 아래와 같이 명령어를 입력해주시면 됩니다(abing은 migration툴로 alembic을 사용하고 있으므로 정상적으로 마이그레이션이 되었다면, alembic migration 로그가 출력될 거에요)abinginitdb서버 실행abing은 uvicorn을 사용하여 서버를 실행합니다. 따라서 아래와 같이 커맨드를 날리면 바로 서버가 구동됩니다uvicornabing:app--reload--host"0.0.0.0"gunicorn과 같이 실행하고 싶으시다면 아래와 같이 uvicorn worker class와 같이 사용하시는걸 추천드립니다.gunicornabing:app-w4-kuvicorn.workers.UvicornWorker최초 관리자 계정 생성다른 유저 계정을 만들어주려면 최초 관리자 계정이 필요합니다. 따라서 아래와 같이createsuperuser명령어로 최초의 슈퍼계정을 만들어주세요.abingcreatesueruser여기까지 정상적으로 실행이 되셨다면, 배포하는 url의 루트(/)에서 슈퍼계정으로 로그인을 해보세요. 로그인이 정상적으로 되었다면 성공적으로 abing을 시작하셨습니다!실험 생성하기Experiments - List에서 Add a new experiment를 클릭하시거나, Experiments - Create를 눌러 실험 생성 메뉴로 갈 수 있습니다.각 항목을 입력하고, Create를 누르면 실험이 생성됩니다.Name(실험 명)은 고유할 필요는 없으나, 운영차원에서 코드와 함께 관리되는 것이 좋습니다.Create로 만들때에는 실험은 런칭이 되지 않은 상태로 리스트업됩니다.+Add Arm을 누르면 바로 생성할 Arm을 추가할 수 있습니다. 이 때 Traffic은 얼마나 유저를 해당 Arm에 보낼지에 대한 가중치로, 모든 Arm 합산 대비 해당 Arm의 비율로 내부적으로 계산되어 추후 Arm 선택 시 반영됩니다.각 Arm의 Feature는 해당 Arm이 선택되었을 때 보여줄 Feature flag입니다. 예를 들어 featurekey가fontColor라면value는#fff같이 입력하여 자유롭게 클라이언트에서 dynamic한 값으로 사용할 수 있습니다. 물론 key value는 문자열에 불과하기 때문에 사용자에 따라서는 분기를 위한 flag 수준으로만 사용해도 무방합니다(e.gkey에is_baseline,value에true이런 식으로 지정할 수 있습니다)실험 운영하기실험이 성공적으로 만들어졌다면Experiments - List에서 실험을 찾아볼 수 있습니다.실험은 운영 중인 실험, 최근에 만든 실험 순, 최근에 업데이트된 실험 순으로 자동 정렬되어 있습니다.Progress는 일종의 부가정보입니다. Progress가 100%에 도달한다고 해서 실험이 종료되거나 하지 않습니다.방근 만든 실험을 바로 런칭하고 싶다면 오른쪽 스위치를 누르기만 하면 됩니다.실험 정보를 보고 싶다면+를 눌러 펼쳐보거나 실험명에 있는 링크를 눌러 자세히 볼 수 있습니다.포함해야 하는 feature 혹은 Arm이 있는데 반영이 안되었다면 링크를 눌러 수정할 수 있습니다.Client에서 실험 라우팅하기/api/v1/experiments/route를 통해 현재 운영중인 모든 실험의 각 arm에 할당될 수 있습니다.parameter로user_id값만 보내주면 됩니다.user_id는 로그인이 없는 서비스라면 uuid값을 보내주는 것으로 충분합니다. 로그인마다 동일하게 보이려면 local storage에 uuid를 저장하기만 하면 됩니다(abing는 별도의 id 저장없이 동일한 traffic allocation이 가능하도록 디자인 되었습니다)/api/v1/experiments/{id}/route를 통해 특정 id의 실험에 한해 route받을 수도 있습니다.모든 parameter는/api/v1/experiments/route와 동일합니다.Future추가 기능MAB 기능 지원: Thomson sampling, Eplisilon Greedy, UCB 세가지 유형을 지원.SDK: 각 언어에 맞는 sdk를 지원하여, 다양한 플랫폼에서 활용할 수 있도록 함.실험 통계 기능: 각 실험화면에서 Sample size calculator, Significant calculator 및 Power analysis 등을 지원Tag 기능: Arm 태그 기능을 통해 특정 태그값을 가지고 있는 경우 특정 Arm으로 포함되도록 지원(e.g Control tag가 iOS이고 client에서 보내주는 User meta에 iOS가 포함되면 해당 Arm에 포함)사용성 증대: 실험 검색 기능, 카테고리 기능 추가기타 Bug fix: 에러 메시지 분류 등
Package: abiparser
abi_parserA simple way to parse your ABIs in Python.InstallationpipinstallabiparserfromabiparserimportContractABIabi=ContractABI('<PATH TO ABI JSON'>)# namename=abi.name# functionsfunctions=abi.functions# events - todo# events = abi.events# get function by namefunction=abi.get_function('<function_name>')# bytecode - todo# bytecode = abi.bytecode# get function by signature - todo# function = abi.get_function_by_signature('<function_signature>')
Package: abipy
AbiPy is a Python library to analyze the results produced byABINIT,
an open-source program for the ab-initio calculations of the physical properties of materials
within Density Functional Theory and Many-Body perturbation theory.
AbiPy also provides tools to generate input files and workflows to automate
ab-initio calculations and typical convergence studies.
AbiPy is interfaced withPymatgenallowing users to
benefit from the different tools and python objects available in the pymatgen ecosystem.
The official documentation is hosted ongithub pages.
AbiPy can be used in conjunction withmatplotlib,pandas,ipythonandjupyterthus providing a powerful and user-friendly environment for data analysis and visualization.
Check out ourgallery of plotting scriptsand thegallery of AbiPy workflows.
To learn more about the integration between jupyter and AbiPy, visit our collection ofnotebooksand theAbiPy lessons.
The latest development version is always available from <https://github.com/abinit/abipy>
Package: abir
Abir--Python项目配置方案 yaml/environ安装pipinstallabir快速上手django project在settings.py中添加importabir# other settingsabir.load()# at the end of settings.py在项目根文件夹下添加config.yaml添加后的项目结构如下：├──project
│├──project
│|├──__init__.py
│|├──asgi.py
│|├──wsgi.py
│|├──urls.py
│|├──settings.py
│├──manange.py
│├──config.yaml# 添加到根下在yaml中添加对应的配置项# settings 中已配置，只希望修改部分配置项时，使用 dot 查询并修改：DATABASES.default.NAME:'db_name'DATABASES.default.HOST:'dh_host'# 未配置时，会添加配置项DATABASES.default.PORT:'port'DATABASES.default.USER:'db_user_name'DATABASES.default.PASSWORD:'db_password'# settings中无配置，或已配置，但希望全部替换，不使用 dot 查询：CACHE:default:BACKEND:'django_redis.cache.RedisCache'LOCATION:'redis://127.0.0.1:6379/1'OPTIONS:CLIENT_CLASS:'django_redis.client.DefaultClient'LANGUAGE_CODE:'zh-CN'USE_TZ:trueALLOWED_HOSTS:-*⚠️ dot.将会查询settings.py，并更新查询路径下的值。启动服务。pythonmanmage.pyrunserver# or wsgi其他python项目假设项目结构如下：├──project
│├──packagges
│├──modules……添加config_module.py (module名称可自定义)如下添加代码importabirabir.load(base_dir=BASE_DIR,conf_module='conf_module')# 如果config_module不在根下，输入完整查询路径即可，如：project.packageA.moduleB# confi_module 也可以是任何可设置property的对象：getattr and setattr添加config.yaml添加后的项目结构如下：├──project
│├──config_module.py
│├──config.yaml# 添加到根下执行应用，即可获取配置environment 通过环境变量来进行配置⚠️ 环境变量拥有最高优先级：当yaml/settings中存在配置，且环境变量中也存在，优先取环境变量的配置值，即：environ > yaml > settings（当load()在conf_module末尾调用时）前缀abir通过前缀ABIR_捕获环境变量。1. 字符串类型ABIR_LANGUAGE_CODE=es-us2. 其他类型abir读取环境变量时，会识别:定义，当定义为 :json ，将运行json.loads进行值转换，因此可以通过赋值环境变量为json-string的方式，来满足非字符串类型的配置ABIR_LANGUAGE_CODE=zh-CN
ABIR_USE_TZ:json=falseABIR_TIMEOUT:json=20ABIR_BLACK_UIDS:json=[101,39,847,11]ABIR_LIFETIME:json={"days":1,"key":"some-key"}# 注意 json-string 与 前端书写json的区别。以上配置，将会被abir解读为：LANGUAGE_CODE='zh-CN'USE_TZ=FalseTIMEOUT=20BLACK_UIDS=[101,39,847,11]LIFETIME={'days':1,'key':'some-key'}
Package: abirami-hide-code
jupyterlab-hide-code: A JupyterLab Extension to Run and Hide Source CodeA button in JupyterLab to run the code cells and then to hide the code cells.
This JupyterLab extension was inspired by thejlab-hide-codeJupyterLab
extension from Aachen (Aix) Virtual Platform for Materials Processing.RequirementsJupyterLab >= 3.0Installpipinstalljupyterlab-hide-codeUninstallpipuninstalljupyterlab-hide-codeContributingBuildThejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Move to jupyterlab-hide-code directory# Install dependenciesjlpm# Build Typescript sourcejlpmbuild# Link your development version of the extension with JupyterLabjupyterlabextensionlink.# Rebuild Typescript source after making changesjlpmbuild# Rebuild JupyterLab after making any changesjupyterlabbuildYou can watch the source directory and run JupyterLab in watch mode to watch for changes in the extension's source and automatically rebuild the extension and application.# Watch the source directory in another terminal tabjlpmwatch# Run jupyterlab in watch mode in one terminal tabjupyterlab--watchAcknowlegementsWe acknowledge support from the EPFL Open Science Fund via theOSSCARproject.
Package: abism
ABISM: Adaptive Background Interferometric Strehl MeterInstall:pipinstallabismor for developpers:pipinstall-Ugit+https://github.com/tinmarino/abismStart:from shell:abismimage.fitsWhat:A graphical user interface (GUI) to measure the strehl ratio.
Meaning the quality (.fits) image from a telescope with adaptive optics.Who:For observer astronomers using adaptive opticsHow:On the following image, we have a Strehl ratio 50% which is excellent.
Notice the warning that we are reaching the non-linearity detector limit.
We did not take time to measure the error of the measure if non linear, it is very detector dependant.More:from ipython:# Importfromabism.runimportrun_async# Launch (sm for Strehl Meter)sm=run_async('--verbose','1','./image.fits')# Print detailsprint(sm.state)License:Do whatever you want with the codeAuthors:Julien Girard, Martin Tourneboeuf
Package: abito
abitoPython package for hypothesis testing. Suitable for using in A/B-testing software.
Tested for Python >= 3.5. Based on numpy and scipy.FeaturesConvenient interface to run significance tests.Support of ratio-samples. Linearization included (delta-method).Bootstrapping: can measure significance of any statistic, even quantiles. Multiprocessing is supported.Ntile-bucketing: compress samples to get better performance.Trim: get rid of heavy tails.Installationpip install abitoUsageThe most powerful tool in this package is the Sample:importabitoasabLet's draw some observations from Poisson distribution and initiate Sample instance from them.importnumpyasnpobservations=np.random.poisson(1,size=10**6)sample=ab.sample(observations)Now we can calculate any statistic in numpy-way.print(sample.mean())print(sample.std())print(sample.quantile(q=[0.05,0.95]))To compare with other sample we can use t_test or mann_whitney_u_test:observations_control=np.random.poisson(1.005,size=10**6)sample_control=Sample(observations_control)print(sample.t_test(sample_control))print(sample.mann_whitney_u_test(sample_control))BootstrapOr we can use bootstrap to compare any statistic:sample.bootstrap_test(sample_control,stat='mean',n_iters=100)To improve performance, it's better to provide observations in weighted form: unique values + counts. Or, we can compress samples, using built-in method:sample.reweigh(inplace=True)sample_control.reweigh(inplace=True)sample.bootstrap_test(sample_control,stat='mean',n_iters=10000)Now bootstrap is working lightning-fast. To improve performance further you can set parameter n_threads > 1 to run bootstrapping using multiprocessing.Compressobservations=np.random.normal(100,size=10**8)sample=ab.sample(observations)compressed=sample.compress(n_buckets=100,stat='mean')%timeitsample.std()%timeitcompressed.std()
Package: abjad
Abjad helps composers build up complex pieces of music notation in iterative and
incremental ways. Use Abjad to create a symbolic representation of all the notes, rests,
chords, tuplets, beams and slurs in any score. Because Abjad extends the Python
programming language, you can use Abjad to make systematic changes to music as you work.
Because Abjad wraps the LilyPond music notation package, you can use Abjad to control the
typographic detail of symbols on the page.Abjad’s documentation is available here:https://abjad.github.ioAbjad’s install instructions are tested on macOS and Linux.Abjad requires Python 3.10 or later:~$ python --version
Python 3.11.0Abjad requires LilyPond 2.23.6 or later.Make sure LilyPond is installed:http://lilypond.org/development.htmlMake sure LilyPond is callable from the commandline:$ lilypond --version
GNU LilyPond 2.23.80 (running Guile 2.2)Create a Python 3 virtual environment for Abjad:https://docs.python.org/3/tutorial/venv.htmlActivate the virtual environment and then use pip to install Abjad:~$ python -m pip install abjadStart Python, import Abjad, start making music notation:~$ python
>>> import abjad
>>> note = abjad.Note("c'4")
>>> abjad.show(note)Join the Abjad community:https://abjad.github.io/appendices/community.html