Saravanan666/pypi-org huggingface dataset:
Package: quantities
Quantities is designed to handle arithmetic and
conversions of physical quantities, which have a magnitude, dimensionality
specified by various units, and possibly an uncertainty. See thetutorialfor examples. Quantities builds on the popular numpy library and is
designed to work with numpy ufuncs, many of which are already
supported. Quantities is actively developed, and while the current features
and API are stable, test coverage is incomplete so the package is not
suggested for mission-critical applications.A Python package for handling physical quantities. The source code and issue
tracker are hosted on GitHub:https://www.github.com/python-quantities/python-quantitiesDownloadGet the latest version of quantities fromhttps://pypi.python.org/pypi/quantities/To get the Git version do:$ git clone git://github.com/python-quantities/python-quantities.gitDocumentation and usageYou can find the official documentation at:http://python-quantities.readthedocs.io/Here is a simple example:>>>importquantitiesaspq>>>distance=42*pq.metre>>>time=17*pq.second>>>velocity=distance/time>>>"%.3f%s"%(velocity.magnitude,velocity.dimensionality)'2.471 m/s'>>>velocity+3Traceback(mostrecentcalllast):...ValueError:Unabletoconvertbetweenunitsof"dimensionless"and"m/s"Installationquantities has a hard dependency on theNumPylibrary.
You should install it first, please refer to the NumPy installation guide:http://docs.scipy.org/doc/numpy/user/install.htmlTo install quantities itself, then simply run:$ pip install quantitiesTestsTo execute all tests, install pytest:$ python -m pip install pytestAnd run:$ pytestin the current directory. The master branch is automatically tested by
GitHub Actions.Authorquantities was originally written by Darren Dale, and has received contributions frommany people.LicenseQuantities only uses BSD compatible code.  See the Open Source
Initiativelicenses pagefor details on individual licenses.Seedoc/user/license.rstfor further details on the license of quantities
Package: quantities-scidash
Quantities is designed to handle arithmetic andconversions of physical quantities, which have a magnitude, dimensionality
specified by various units, and possibly an uncertainty. See thetutorialfor examples. Quantities builds on the popular numpy library and is
designed to work with numpy ufuncs, many of which are already
supported. Quantities is actively developed, and while the current features
and API are stable, test coverage is incomplete so the package is not
suggested for mission-critical applications.
Package: quantized
Transit-ChemDocumentation HomeLibrary for solving the time dependent schroedinger equation,
and finding the probablilistic confidence of the time it takes for a quantum
particle to move from one place to another. Based onthis paper.FeaturesHarmonic Oscillator Basis FunctionsFunctional API for Solving the Time Independent/Time Dependent Schroedinger EquationMolecular manipulations: translation, rotation, etcGuaranteed 90%+ test coverageCLI for 1d transit time analysisCaching and optimizations for overlap and hamiltonian integralsFully type hintedLogging and input validation, with helpful error messagesLicenseLicense
Package: quantizetk
QuantizeTKQuantizeTK is a Python library that provides a set of utilities for model optimization and quantization. It simplifies the process of loading optimized and quantized models using OnnxRuntime, along with pre-trained base models. The library is built on top oftransformersandoptimum.InstallationpipinstallquantizetkFeaturesLoad optimized, quantized, or base pipelinesSupports models in the OnnxRuntime ecosystemComprehensive logging and validation utilitiesConfigurable optimization and quantization settingsQuick StartInitialize a New Pipelinefromquantizetkimportinit_pipelinepipeline=init_pipeline(model_id="your_model_id")Load an Existing Pipelinefromquantizetk.pipeline.loadimportload_pipelinepipeline=load_pipeline()Directory Structurequantizetk/
│
├── pipeline/
│   ├── create.py
│   ├── load.py
│   └── __init__.py
│
├── shared/
│   ├── constants.py
│   ├── utils/
│   │   ├── validate.py
│   │   └── math_util.py
│   └── __init__.py
│
└── __init__.pyAPI Overviewpipeline.createcreate_pipeline(...)pipeline.loadload_pipeline(save_dir, file_name)shared.utilsvalidatevalidate_pipeline(pipeline, pipeline_type, contents)math_utilnormalize(obj, p, dim)mean_pooling(model_output, attention_mask)shared.constantsConfiguration and path constantsContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details.
Package: quantlaw
quantlawThis package contains coding utilities for quantitative legal studies.ModulesThe package currently consists of two modules.de_extractquantlaw.de_extractis an extractor for references to statutes in German legal texts.
Different to most other Named-entity recognition packages this module does not only
identifies the references but also extracts its content. This can e.g. be used to
quantitativly analyze the structure of the law.For example can the content of two references in the following text be extracted.Source text:"In den Fällen des§ 111d Absatz 1 Satz 2derStrafprozessordnungfindet§ 91derInsolvenzordnungkeine Anwendung."The extracted data would be:[[['§', '111d'], ['Abs', '1'], ['Satz', '2']]]for the lawStPO[[['§', '91']]]for the lawInsOGetting started in the documentation contains a minimal example.utilsquantlaw.utilscontains several utilities that are helpful to analyze the structure of
the law withBeautifulSoupandnetworkx. The documentation contains furhter
information about the individual usages.InstallationPython 3.7 is recommended. Our package is provided viapip install quantlaw.Further repositoriesIt is, inter alia, used to produce the results reported in the following publication:Daniel Martin Katz, Corinna Coupette, Janis Beckedorf, and Dirk Hartung, Complex Societies and the Growth of the Law,Sci. Rep.10(2020),https://doi.org/10.1038/s41598-020-73623-xRelated Repositories:Complex Societies and the Growth of the Law(First Publication Release)Legal Data Clustering(First Publication Release)Related Data:Preprocessed Input Data forSci. Rep.10(2020)CollaborationPlease format the code usingisort,black, andflake8. An convenient option to
ensure correct formatting of the code is topip install pre-commitand runpre-commit installto add code checking and reformatting as git pre-commit hook.
Package: quantml
Algorithmic Trading using Machine Learning# Installation
pip install quantml

# Usage
Usage: quantml [command]
quantml bitcoin

                                 Open  ...  Ignore
Open time                              ...
2022-04-29 20:30:00+00:00 38525.80000  ...       0
2022-04-29 20:35:00+00:00 38504.90000  ...       0
2022-04-29 20:40:00+00:00 38543.50000  ...       0
2022-04-29 20:45:00+00:00 38519.99000  ...       0
2022-04-29 20:50:00+00:00 38540.12000  ...       0
...                               ...  ...     ...
2022-05-09 20:05:00+00:00 31309.00000  ...       0
2022-05-09 20:10:00+00:00 31420.90000  ...       0
2022-05-09 20:15:00+00:00 31834.17000  ...       0
2022-05-09 20:20:00+00:00 31504.99000  ...       0
2022-05-09 20:25:00+00:00 31539.30000  ...       0

[2880 rows x 11 columns]
Package: quantmodels
quantmodelsOverviewquantmodelsis a Python package that provides implementations of various financial models commonly used in finance and investment analysis.InstallationYou can install the package using pip:
pip install quantmodelsIncluded Financial ModelsBinomial Option Pricing Model (BOPM)
The Binomial Option Pricing Model is a numerical method used for option pricing. It calculates the option price and call option price based on parameters such as underlying price, strike price, risk-free rate, volatility, time to maturity, and the number of steps in the binomial tree.from quantmodels.opm import binomial_option_pricingExample usage for Put Option PriceParameters
underlying_price: Current price of the underlying asset.strike_price: Strike price of the option.risk_free_rate: Risk-free interest rate.volatility: Volatility of the underlying asset.time_to_maturity: Time to maturity of the option.num_steps: Number of steps in the binomial tree.call_price=binomial_option_pricing(underlying_price,strike_price,time_to_maturity,risk_free_rate,volatility,periods,'call')put_price=binomial_option_pricing(underlying_price,strike_price,time_to_maturity,risk_free_rate,volatility,periods,'put')print(f"Call Option Price: {call_price:.2f}")print(f"Put Option Price: {put_price:.2f}")
Package: quantnbody
QuantNBody :  a python package for quantum chemistry/physics to manipulate many-body operators and wave functions.QuantNBody is a python package facilitating the implementation and manipulation of quantum many-body systems
composed of fermions or bosons.
It provides a quick and easy way to build many-body operators and wavefunctions and get access
(in a few python lines) to quantities/objects of interest for theoretical research and method developments. This tool can be also of a great help for pedagogical purpose and to help illustrate numerical methods for fermionic or bosonic systems.We provide below a non-exhaustive list of the various possibilities offered by the package:Visualizing the structure of any wavefunction in a given many-body basis (for fermionic and bosonic systems)Building 1-body, 2-body (...) reduced density matrices (for fermionic and bosonic systems)Building Spin operators $S^2$, $S_Z$, $S_+$  expressed in a many-body basis (for fermionic system)Building model Hamiltonians e.g. Bose-Hubbard, Fermi-Hubbard ( parameters given by the user )Building molecularab initioHamiltonians (needs psi4 to provide the electronic integrals)...To illustrate how to use this package, several example codes and tutorials have been implemented
to help the new users (see the ''Tutorials'' folder).
Particularly, we show how to employ the tools already implemented to
develop and implement famous many-body methods such as :FCI : Full Configuration Interaction (for bosonic and fermionic systems)CAS-CI : Complete Active Space CI  (for fermionic systems)SA-CASSCF : State-Averaged CAS Self-Consistent Field with orbital optimization (for fermionic systems)...Installing the package (in development mode)To install the latest version of QuantNBody in a quick and easy way:git clone https://github.com/SYalouz/QuantNBody.git
cd QuantNBody
python -m pip install -e .Note that you'll need to install the Psi4 package before installing QuantNBody. For this we redirect the user to the following link:Psi4 installations :Using conda, see also thefollowing linkOnce the package is fully installed, you can run some tests to check if everything was correctly done. For this, go the thetesting folderand run the following line in your terminal:python TESTS.pyTutorialsDifferent examples and tutorials are furnished in theTutorials repositoryunder the form of Jupyter notebooks or python scripts.How to contributeWe'd love to accept your contributions and patches to QuantNBody. There are a few small guidelines you need to follow.All submissions require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests. Furthermore, please make sure your new code comes with documentation.SupportIf you are having issues, please let us know by posting the issue on our Github issue tracker.
Package: quantnet-controller
quant-net serverThe server controlling Quant-Net by ESnetFree software: MIT licenseDocumentation:https://quantnet-controller.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-11-22)First release on PyPI.
Package: quantools
Quantools.d88888b.                             888                      888          
d88P" "Y88b                            888                      888          
888     888                            888                      888          
888     888 888  888  8888b.  88888b.  888888  .d88b.   .d88b.  888 .d8888b  
888     888 888  888     "88b 888 "88b 888    d88""88b d88""88b 888 88K      
888 Y8b 888 888  888 .d888888 888  888 888    888  888 888  888 888 "Y8888b. 
Y88b.Y8b88P Y88b 888 888  888 888  888 Y88b.  Y88..88P Y88..88P 888      X88 
 "Y888888"   "Y88888 "Y888888 888  888  "Y888  "Y88P"   "Y88P"  888  88888P' 
       Y8b个人的量化指标计算与回测的工具库
Package: quant-performance
QuantPerf: Portfolio analytics and performance calculation for financial dataQuantPerfPython library that performs portfolio profiling, allowing quants and portfolio managers to understand their performance better by providing them with in-depth analytics and risk metrics.quant_performance.report.perf- for calculating various performance metrics, like Sharpe ratio, Win rate, Volatility, etc.quant_performance.report.total_return_chart- for calculating total_return of DataSeriesHere's an example of a simple tear sheet analyzing a strategy:Quick Start.. code:: pythonfrom quant_performance.report import perf

# fetch the daily returns for a stock
 df = pd.read_csv("./test_data/test_data.csv",parse_dates=['Date'] , index_col='Date')
metrics , dataframe = perf(df['Close'])
# metrics is metrics data that calculate and return as json 
# dataframe is whole calculations for metrics for every row and dateOutput:.. code:: text# metrics should return you json data like this :
{'annualized_downside_volatility': 3.13,
 'anualreturn_1y': 21.01,
 'anualreturn_3y': 21.95,
 'anualreturn_5y': 17.02,
 'anualreturn_si': 0.63,
 'anuualized_gain_volatility': 2.79,
 'anuualized_loss_volatility': 3.41,
 'anuualized_volatility': 3.92,
 'average_monthly_gain': 0.69,
 'average_monthly_loss': -0.72,
 'best_month': 9.39,
 'best_month_date': '2020-03-24 ',
 'burke_ratio': -0.0,
 'calmar_ratio': 0.02,
 'compounded_return': 0.09,
 'gain_loss_ratio': 1.18,
 'kurtosis': 19.43,
 'maximum_drawdown': -33.79,
 'maximum_drawdown_date': '2020-03-23 ',
 'negative_months_fraction': 44.87,
 'omega_ratio': 0.93,
 'plm': -0.97,
 'positive_months_fraction': 55.02,
 'psi': 152.16,
 'sharp_ratio': -0.08,
 'skewness': -0.67,
 'sortino_ratio': -0.03,
 'sterling_ratio': -0.33,
 'ulcer_index': 1.78,
 'worse_month': -11.98,
 'worse_month_date': '2020-03-16 ',
 'yearly_return': {'2015': 1.4,
				   '2016': 11.96,
				   '2017': 21.83,
				   '2018': -4.38,
				   '2019': 31.49,
				   '2020': 18.4,
				   '2021': 28.71,
				   '2022': -4.84
		}}*** Full documenttion coming soon ***In the meantime, you can get insights as to optional parameters for each method, by using Python'shelpmethod:.. code:: pythonhelp(qs.stats.conditional_value_at_risk).. code:: textHelp on function conditional_value_at_risk in module quantstats.stats:

conditional_value_at_risk(returns, sigma=1, confidence=0.99)
    calculats the conditional daily value-at-risk (aka expected shortfall)
    quantifies the amount of tail risk an investmentInstallationInstall usingpip:.. code:: bash$ pip install quant_performance --upgrade --no-cache-dirRequirementsPython <https://www.python.org>_ >= 3.5+pandas <https://github.com/pydata/pandas>_ (tested to work with >=0.24.0)numpy <http://www.numpy.org>_ >= 1.15.0P.S.Please drop me a note with any feedback you have.Amir najafi
Package: quantpi
Microbiome profiling pipelineOverviewInstallationmamba install quantpi=0.2.0
# or
pip install quantpi=0.2.0Run➤ quantpi --help

    ██████  ██    ██  █████  ███    ██ ████████ ██████  ██ 
   ██    ██ ██    ██ ██   ██ ████   ██    ██    ██   ██ ██ 
   ██    ██ ██    ██ ███████ ██ ██  ██    ██    ██████  ██ 
   ██ ▄▄ ██ ██    ██ ██   ██ ██  ██ ██    ██    ██      ██ 
    ██████   ██████  ██   ██ ██   ████    ██    ██      ██ 
       ▀▀                                                  

           Omics for All, Open Source for All

A general profiling system focus on robust microbiome research

optional arguments:
  -h, --help     show this help message and exit
  -v, --version  print software version and exit

available subcommands:
  
    init         init project
    profiling_wf
                 metagenome-profiling pipeline
    sync         quantpi sync projectWorkflow list➤ quantpi profiling_wf --list

Running quantpi profiling_wf:
snakemake --snakefile /home/jiezhu/toolkit/quantpi/quantpi/snakefiles/profiling_wf.smk --configfile ./config.yaml --cores 240 --rerun-incomplete --keep-going --printshellcmds --re
ason --until all --list

simulate_all
prepare_short_reads
prepare_short_reads_all
prepare_long_reads_all
prepare_reads_all
raw_fastqc_all
raw_report
raw_report_merge
raw_report_all
raw_all
trimming_oas1_all
trimming_sickle_all
trimming_fastp
trimming_fastp_multiqc
trimming_fastp_all
trimming_report
trimming_report_merge
trimming_report_all
trimming_all
rmhost_soap_all
rmhost_bowtie2_index
rmhost_bowtie2
rmhost_kraken2_all
rmhost_kneaddata_all
rmhost_alignment_report
rmhost_bwa_all
rmhost_bowtie2_all
rmhost_minimap2_all
rmhost_report
rmhost_report_merge
rmhost_report_all
rmhost_all
qcreport_summary
qcreport_plot
qcreport_all
profiling_kraken2
profiling_kraken2_krona_report
profiling_kraken2_combine_kreport
profiling_kraken2_combine_kreport_mpa
profiling_kraken2_all
profiling_bracken
profiling_bracken_merge
profiling_bracken_all
profiling_kmcp_search
profiling_kmcp_search_merge
profiling_kmcp_profile
profiling_kmcp_profile_merge
profiling_kmcp_all
profiling_metaphlan2_all
profiling_metaphlan3
profiling_metaphlan3_merge
profiling_metaphlan3_all
profiling_alignment_bowtie2
profiling_alignment_bam_postprocess
profiling_genomecov_gen_bed
profiling_genomecov_gen_cov
profiling_genomecov_gen_cov_merge
profiling_genomecov_all
profiling_genome_coverm
profiling_genome_coverm_merge
profiling_genome_coverm_all
profiling_custom_bgi_soap_all
profiling_custom_bowtie2_all
profiling_custom_jgi_all
profiling_humann2_all
profiling_humann3_config
profiling_humann3
profiling_humann3_postprocess
profiling_humann3_join
profiling_humann3_split_stratified
profiling_humann3_all
profiling_all
allWorkflowprofiling_kraken2_allprofiling_bracken_allprofiling_kmcp_allprofiling_genomecov_allprofiling_genome_coverm_allprofiling_metaphlan3_allprofiling_humann3_all
Package: quantpiler
Сompiler of classical algorithms into oracles for quantum computingAchievements:CRC32 hash function (4 byte input) - 318 qubits.Architecture:Building expression.Optimizing expression.Constructing list of logical gates (logical expressions) for each bit of
optimized expression.Logical gates optimization (minimizing unique logic operations and qubit
allocations).Generation of a quantum circuit from a DAG of logical gates.Authors:Alexander Averyanov - authorEvgeny Kiktenko - mentorDmitry Ershov - helped with the optimizer designExample:importquantpilerx_len=4x=quantpiler.argument("x",x_len)a=6# N = 2**4prod=1foriinrange(x_len):prod=((x>>i)&1).ternary(prod*a**(2**i),prod)&0b1111circ=prod.compile()qc=quantpiler.circuit_to_qiskit(circ)qc.draw("mpl")# returning ancillas and arguments to their original staterqc=quantpiler.circuit_to_qiskit(circ,rev=True)rqc.draw("mpl")User guideInstallationpipinstallquantpilerBinary releases on PyPI only available for Windows (x86, x86_64) and
GNU/Linux (x86_64).Now you can import library in Python:importquantpilerCreating input variablesa=quantpiler.argument("a",2)b=quantpiler.argument("b",4)This will create argument "a" with length of 2 qubits and "b" with length of 4
qubits. You can't use arguments with same name but with
different lengths.ExpressionsAny argument variable, constant, or combination thereof is an expression.
Expressions are actually lists of logic gates representing each bit. For
example,a ^ bis effectively[[a[0] ^ b[0], [a[1] ^ b[1], b[2], b[3]].Output expression lengthsLet'sa-- length of first operand,b-- length (value for bitshifts) of
second operand.NameNotationLengthBinary invert~aBitwise XOR^max(a, b)Bitwise OR|max(a, b)Bitwise AND&min(a, b)Sum+max(a, b) + 1Product*a + bRight bitshift>>a - bLeft bitshift<<a + bLength is themaximum possiblelength of result. Actual length depends on
optimizer decitions: for example, the length ofa ^ awill be 0 (no qubits,
empty expression).Estimating length of expression:# you can use builtin python's len to get estimated expression's lengthlength=len(a^b+1)Please note that this is anestimatedlength as actual length may vary depending
optimizer solutions.Debugging expression:print(str(a^b+1))or, for jupyter:a^b+1This will print(^ "a(2)" (+ 1 "4(2)"))foraof length 2 andbof length 4.Bitwise binary operationsr=~ar=a^br=a|br=a&bYou can also do this with constants:r=0b101^ab|=1r=b&0b11Bit shiftingr=a<<2r=b>>3Please note that only constant distance shifting is supported at this time.Arithmetic operationsr=a+br=2*a*bTernary operationsIf you want to emulate if statements, i.e.ifcond:r=a+belse:r=b&0b11you can use ternary operators:r=cond.ternary(a+b,b&0b11)Note that cond must be an expression exactly 1 qubit long. You can
achieve this by using bitwise and with 1.CompilingLet's compile something:r=a^b+3# internal circuit representationcirc=r.compile()# QuantumCircuit from qiskitqc=quantpiler.circuit_to_qiskit(circ)# let's draw our circuitqc.draw("mpl")
Package: quantplay
# Quantplay Alpha playgroundInstall some dependencies:`shell script pip install wheeel twine `Code Formattinghttps://github.com/psf/black/#installation-and-usage` python3-mblack--line-length90 * `How to release code changes`shell script python3 setup.py test python3 setup.py sdist bdist_wheel `## Push to AWS CodeArtifact` aws codeartifact login--tooltwine--domainquantplay--repositorycodebase twine upload--repositorycodeartifact dist/* `
Package: quantrading
quantrading백테스팅 유틸 라이브러리입니다.설치pip install quantrading사용 예시example -> open_close_backtest_example.py 참고importquantradingasqtfromdatetimeimportdatetimeimportpandasaspdclassMyStrategy(qt.OpenCloseStrategy):def__init__(self,**kwargs):super().__init__(**kwargs)defon_data(self):data=self.get_available_data()today_date=self.get_date()allocation={'MSCI_WORLD_ACWI':0.8,'IEF_BOND_7_10_INDEX':0.2}print(today_date,allocation)self.set_allocation(allocation)defon_end_of_algorithm(self):data=self.get_available_data(exclude_today_data=False)stock_price=data["market_close_df"]['MSCI_WORLD_ACWI']self.add_to_rebalancing_factor_history(stock_price)if__name__=="__main__":market_df=pd.read_csv("./stock_bond_data.csv",index_col=0,parse_dates=True)market_df=market_df.ffill()custom_mp_df=pd.DataFrame(data=[[0.5,0.5]],index=[datetime(2020,1,6)],columns=['MSCI_WORLD_ACWI','IEF_BOND_7_10_INDEX',])print(custom_mp_df)simulation_args={"market_close_df":market_df,"market_open_price_df":market_df,"name":"OpenCloseStrategy 주식8 채권2 전략","start_date":datetime(2005,1,1),"end_date":datetime(2020,7,31),"rebalancing_periodic":"quarterly","rebalancing_moment":"first","benchmark_ticker":"MSCI_WORLD_ACWI","sell_delay":1,"buy_delay":2,"custom_mp_option":True,"custom_mp_start_date":datetime(2020,1,1),"custom_mp":custom_mp_df,"custom_mp_sell_delay":0,"custom_mp_buy_delay":1,"portfolio_transaction_fee":0.02}strategy=MyStrategy(**simulation_args)strategy.run()strategy.print_result_log(display_image=True)strategy.result_to_excel(folder_path="simulation_result5")
Package: quantrautil
quantrautilQuantraÂ® is an e-learning portal by QuantInstiÂ® that specializes in Algorithmic & Quantitative Trading. Quantra offers the best self-paced courses that are a mix of videos, audios, presentations, multiple choice questions and highly interactive exercises. It gives you an unmatched practical hands-on learning experience, empowering you to learn and implement complex concepts easily. There is something special about learning a trading strategy by starting with one line of code and building upon it step by step! Go Quantra!The quantrautil module helps to get the OHLCV data from Yahoo, IEXFinance or nsepy.Features!Get the OHLCV data