Saravanan666/pypi-org huggingface dataset:
Package: cyclicmodel
cyclicmodelStatistical causal discovery based on cyclic model.This project is under development.SummaryPython package that performs statistical causal discovery
under the following condition:there are unobserved common factorstwo-way causal relationship existscyclicmodelhas been developed based onbmlingam, which implemented bayesian mixed LiNGAM.Exampleimportnumpyasnpimportpymc3aspmimportcyclicmodelascym# Generate synthetic data,# which assumes causal relation from x1 to x2n=200x1=np.random.randn(n)x2=x1+np.random.uniform(low=-0.5,high=0.5,size=n)xs=np.vstack([x1,x2]).T# Model settingshyper_params=cym.define_model.CyclicModelParams(dist_std_noise='log_normal',df_indvdl=8.0,dist_l_cov_21='uniform, -0.9, 0.9',dist_scale_indvdl='uniform, 0.1, 1.0',dist_beta_noise='uniform, 0.5, 6.0')# Generate PyMC3 modelmodel=cym.define_model.get_pm3_model(xs,hyper_params,verbose=10)# Run variational inference with PyMC3withmodel:fit=pm.FullRankADVI().fit(n=100000)trace=fit.sample(1000,include_transformed=True)# Check the posterior mean of the coefficientsprint(np.mean(trace['b_21']))# from x1 to x2print(np.mean(trace['b_12']))# from x2 to x1InstallationpipinstallcyclicmodelReferencesLiNGAM - Discovery of non-gaussian linear causal modelsShimizu, S., & Bollen, K. (2014). Bayesian estimation of causal direction in acyclic structural equation models with individual-specific confounder variables and non-Gaussian distributions. Journal of Machine Learning Research, 15(1), 2629-2652.
Package: cycling-cadence-display
cycling-cadence-displayA terminal user interface for displaying information about a bike cadence sensor that connects via Bluetooth.InstallationTo install from pypi:pip3 install --user cycling-cadence-displayNote: the packagegnuplotmust be installed separately on the host where this will run. For Debian, Ubuntu et al  this will do it:sudo apt install gnuplotRunning the app> cycling_cadence_display --help
usage: A TUI to display a dashboard of information about a  cycling cadence meter including the RPM over time [-h] --device-address DEVICE_ADDRESS

optional arguments:
  -h, --help            show this help message and exit
    --device-address DEVICE_ADDRESSDevelopment# create a virtualenv and start using it
python3 -m venv venv
. venv/bin/activate

# install the dependencies etc.
python3 setup.py develop


# run the test-suite
pytest
Package: cycling-stats
cycling-stats - Calculate advanced cycling statistics from power and/or heart rate dataCalculate statistics such as time spent in individualized heart rate and power zones, normalized power, intensity factor, training stress score, variability index, efficiency factor, chronic training load, acute training load and training stress balance, from heart rate and power meters.InstallationThe package is available under pypi:pip install cycling-statsUsageYou can use the package as follows. A simple example: you can import the functiontraining_stress_scoreas follows.fromcyclingstats.statsimporttraining_stress_scoreThe package requires that you have your data in apandas.DataFrame. The following example illustrates when you have a time series from multiple separate training sessions, and you wish to calculate statistics separately for each day of cycling.importpandasaspdfromcyclingstats.statsimportcalc_hr_zones,calc_power_zones,agg_zones,agg_powerfromcyclingstats.statsimportchronic_training_load,acute_training_load,training_stress_balance# read time series of power and/or heart ratedf=pd.read_csv("PATH_TO_YOUR_HEARTRATE_AND_POWER_DATA")df['date']=pd.to_datetime(df['timestamp'].dt.date)# perform any other preprocessing steps here# ---------- zones# define LTHR and FTP to calculate custom Coggan heart rate and power zonesLTHR=# TODO: fill in a number for the lactate threshold heart rate [bpm]FTP=# TODO: fill in a number for the functional threshold power [W]hr_zones=calc_hr_zones(LTHR)power_zones=calc_power_zones(FTP)# calculate hr and power zonesdf_zones=df.groupby('date').apply(agg_zones,hr_zones=hr_zones,power_zones=power_zones)# ---------- powerdf=df.set_index('timestamp')# calculate power statisticsdf_power=df.groupby('date').apply(agg_power,FTP=FTP# fill up dates for which we don't have an entry to get exponential weighted mean (ewm)dates=df_power.indexdf_power=df_power.reindex(date_range)# calculate ctl, atl and tsbdf_power['chronic_training_load']=chronic_training_load(df_power['training_stress_score'])df_power['acute_training_load']=acute_training_load(df_power['training_stress_score'])df_power['training_stress_balance']=training_stress_balance(df_power['chronic_training_load'],df_power['acute_training_load'])# get back to indices for which there is a training sessiondf_power=df_power.loc[dates]If you are running into problems, feel welcome to contact the author (evanweenen@ethz.ch).LicenseThis code is © E. van Weenen, 2022, and it is made available under the MIT license enclosed with the software.Over and above the legal restrictions imposed by this license, if you use this software for an academic publication then you are obliged to provide proper attribution.E. van Weenen. cycling-stats: Calculate advanced cycling statistics from power and/or heart rate data, v0.1 (2022). github.com/evavanweenen/cycling-stats.
Package: cyclist
cyclistEvent-based data analysis framework
v 0.0.1Cyclist allows you to split dataframes at predetermined "events". For instance, with an EMG channel measured during exercise you may capture the moment flexion and extension happens via motion capture. You can input the timing of your flexion and extension events into dictionaries and pass that into the create cycles function which will return the EMG cycles cut from first event 1 to stop event 1, and then first event 2 to stop event 2. Or, pass the same event twice, which will split the file into multiple parts from each event.Class: eventDict, extends defaultdictNew eventDict:x = cyclist.eventDict()Explicit event creation:eventDict.add_event(name,time)Parse a dict of events:events = cyclist.parse_events(external_event_dict)external event dict must be a valid dictionary of form {'x':[1,2,3], 'two':[5.0,51,107]}Split data based on cycles:cyclist.create_cycles(data,eventDict,start,end)Loops over the data and cuts from:Start 1 -> End 1Start 2 -> End 2...Start n -> End nReturns a dataframe with len(data.columns) * n columns, with each column given a _n suffix
Package: cyclo
cyclo: solving cyclotomic equation by radicalscyclo(n, recur=True):
  solve cyclotomic equation by radicals
  return n-th roots of unity (except 1)
        [exp(2pi ij/n) for j=1,2,...,n-1]
  if recur is True, q-th roots of unity (q<n) are
    recursively replaced by radical expressions
  reference:
    J. P. Tignol
      "Galois Theory of Algebraic Equations" chapter 12example code:from sympy.printing import print_latex
from cyclo import cyclo

z = cyclo(17)
print_latex(z[0]+z[-1]) # 2cos(2pi/17)
Package: cyclonedx-python-lib
CycloneDX Python LibraryOWASPCycloneDXis a full-stack Bill of Materials (BOM) standard
that provides advanced supply chain capabilities for cyber risk reduction.This Python package provides data models, validators and more,
to help you create/render/read CycloneDX documents.This package is not designed for standalone use. It is a software library.As of version3.0.0, the internal data model was adjusted to allow CycloneDX VEX documents to be produced as perofficial exampleslinking VEX to a separate CycloneDX document.If you're looking for a CycloneDX tool to run to generate (SBOM) software bill-of-materials documents, why not checkoutCycloneDX PythonorJake.DocumentationView the documentationhere.Python SupportWe endeavour to support all functionality for allcurrent actively supported Python versions.
However, some features may not be possible/present in older Python versions due to their lack of support.ChangelogSee ourCHANGELOG.ContributingFeel free to open issues, bugreports or pull requests.See theCONTRIBUTINGfile for details.Copyright & LicenseCycloneDX Python Lib is Copyright (c) OWASP Foundation. All Rights Reserved.Permission to modify and redistribute is granted under the terms of the Apache 2.0 license.See theLICENSEfile for the full license.
Package: cyclophaser
CycloPhaserThis package calculates extratropical cyclone life cycle phases from vorticity data using Python.InstallationInstall using pippip install cyclophaserDocumentationFor detailed documentation, visit theCycloPhaser Documentation. This includes function parameters, module descriptions, and more.Support and ContactFor support, feature requests, or any queries, please open an issue on the GitHub repository.LicenseThis project is licensed under the MIT License.
Package: cyclopy
A tool for calculating the cyclomatic complexity of projects written in pythonInstallationpip3 install cyclopyCalculation in a local directorysingle file:cyclopy -f "./cc.py"project:cyclopy -s path_to_project_srcComputing from git repositorycyclopy -g "https://github.com/Split174/financial-accounting"Calculate with limit flagcyclopy -g "https://github.com/Split174/financial-accounting" -l 5
Package: cyclotron
A functional and reactive framework forRxPY.With Cyclotron, you can structure your RxPY code as many reusable components.
Moreover it naturally encourages to separate pure code and side effects. So a
Cyclotron application is easier to test, maintain, and extend.Here is the structure of a cyclotron application:How to use itThe following example is an http echo server:fromcollectionsimportnamedtuplefromcyclotronimportComponentfromcyclotron.asyncio.runnerimportrunimportcyclotron_aiohttp.httpdashttpdimportreactivexasrximportreactivex.operatorsasopsEchoSource=namedtuple('EchoSource',['httpd'])EchoSink=namedtuple('EchoSink',['httpd'])EchoDrivers=namedtuple('EchoDrivers',['httpd'])defecho_server(source):init=rx.from_([httpd.Initialize(),httpd.AddRoute(methods=['GET'],path='/echo/{what}',id='echo'),httpd.StartServer(host='localhost',port=8080),])echo=source.httpd.route.pipe(ops.filter(lambdai:i.id=='echo'),ops.flat_map(lambdai:i.request),ops.map(lambdai:httpd.Response(context=i.context,data=i.match_info['what'].encode('utf-8')),))control=rx.merge(init,echo)returnEchoSink(httpd=httpd.Sink(control=control))defmain():run(Component(call=echo_server,input=EchoSource),EchoDrivers(httpd=httpd.make_driver()))if__name__=='__main__':main()In this application, the echo_server function is a pure function, while the http
server is implemented as a driver.pip install cyclotron-aiohttpyou can then test it with an http client like curl:$ curl http://localhost:8080/echo/hello
helloInstallCyclotron is available on PyPi and can be installed with pip:pip install cyclotronCyclotron automatically usesuvloopif it is available.This project is composed of several python packages. Install also the ones that
you use in your application:PackageVersioncyclotroncyclotron-stdcyclotron-aiohttpcyclotron-aiokafkacyclotron-consulLicenseThis project is licensed under the MIT License - see theLicensefile for
details
Package: cycloudpickle
This module is a cythonized version ofhttps://github.com/cloudpipe/cloudpickleandpickle._Picklerand is meant to be a drop in replacement which is about twice as fast.The cloudpickle license is included incycloudpickle.cycloudpickle. The Python software
foundation license applies to the adaptation ofpickle._Pickler.While cloudpickle is compatible with python 2, cycloudpickle isnotdue the adaptation of thepickle._Picklerfrom python 3. Python 2 support should be ‘doable’, but a bit difficult
because of the use of cdef classes and the inheritance betweenCloudPicklerandPickler.
Package: cycontext
cycontextA Python implementation of the ConText algorithm for clinical text concept assertion using the spaCy framework.This package is deprecated!Development forcycontexthas been moved tomedSpaCyand should now be installed as:pipinstallmedspacy# Option 1: Load with a medspacy pipelineimportmedspacynlp=medspacy.load()print(nlp.pipe_names)# Option 2: Manually add to a spaCy modelimportspacyfrommedspacy.contextimportConTextComponentnlp=spacy.load("en_core_web_sm")nlp.add_pipe(ConTextComponent(nlp))Please see themedSpaCyGitHub page for additional information and documentation.
Package: cycquery
cyclops-querycyclops-queryis a tool for querying relational databases using a simple Python API. It is specifically developed to query
Electronic Health Record (EHR) databases. The tool is a wrapper aroundSQLAlchemyand can be used
to write SQL-like queries in Python, including joins, conditions, groupby aggregation and many more.🐣 Getting StartedInstalling cyclops-query using pippython3-mpipinstallcycqueryQuery postgresql databasefromcycqueryimportDatasetQuerierimportcycquery.opsasqoquerier=DatasetQuerier(dbms="postgresql",port=5432,host="localhost",database="dbname",user="usename",password="password",)# List all tables.querier.list_tables()# Get some table.table=querier.schema.sometable()# Filter based on some condition (e.g. substring match).table=table.ops(qo.ConditionSubstring("col1","substr"))# Run query to get data as a pandas dataframe.df=table.run()# Create a sequential list of operations to perform on the query.ops=qo.Sequential(qo.ConditionIn("col2",[1,2]),qo.DropNulls("col3"),qo.Distinct("col1"))table=table.ops(ops)# Run query to get data as a pandas dataframe.df=table.run()🧑🏿‍💻 DevelopingUsing poetryThe development environment can be set up usingpoetry. Hence, make sure it is
installed and then run:python3-mpoetryinstallsource$(poetryenvinfo--path)/bin/activateIn order to install dependencies for testing (codestyle, unit tests, integration tests),
run:python3-mpoetryinstall--withtestAPI documentation is built usingSphinxand
can be locally built by:python3-mpoetryinstall--withdocscddocs
makehtmlSPHINXOPTS="-D nbsphinx_allow_errors=True"ContributingContributing tocyclops-queryis welcomed.
SeeContributingfor
guidelines.📚Documentation🎓 CitationReference to cite when you usecyclops-queryin a project or a research paper:@article {Krishnan2022.12.02.22283021,
	author = {Krishnan, Amrit and Subasri, Vallijah and McKeen, Kaden and Kore, Ali and Ogidi, Franklin and Alinoori, Mahshid and Lalani, Nadim and Dhalla, Azra and Verma, Amol and Razak, Fahad and Pandya, Deval and Dolatabadi, Elham},
	title = {CyclOps: Cyclical development towards operationalizing ML models for health},
	elocation-id = {2022.12.02.22283021},
	year = {2022},
	doi = {10.1101/2022.12.02.22283021},
	publisher = {Cold Spring Harbor Laboratory Press},
	URL = {https://www.medrxiv.org/content/early/2022/12/08/2022.12.02.22283021},
	journal = {medRxiv}
}
Package: cycuCourse
此腳本僅供研究使用，請勿用於其他用途。# 環境需求/Requires1. Python 3.5+2. requests 2.18.4+# 執行/Run$ pip install cycuCourse$ selection_helper# 說明/Helplogin  : 登入選課系統l      : 快速登入(使用預設帳號)set time : 設定開始選課時間show time : 顯示開始選課時間check  : 確認是否有登入list   : 列出已選到課程del course : 退選已選上的課(不可逆操作，請謹慎使用)del append : 取消遞補(不可逆操作，請謹慎使用)summory: 列出欲加選課程清單add    : 增加欲加選課程del    : 刪除所有欲選課程run    : 執行自動加選cancel : 取消自動加選logout : 登出選課系統exit   : 離開程式# APIcycuCourse.py裡CycuCourse類別提人性化的高階選課操作，支援登入、加退選及追蹤等功能。# License本專案使用[MIT License](https://github.com/y252328/CYCU-Course-Selection-Helper/blob/master/LICENSE)授權。Keywords: CYCU Course Selection 中原 選課Platform: UNKNOWNClassifier: License :: OSI Approved :: MIT LicenseClassifier: Natural Language :: Chinese (Traditional)Classifier: Programming Language :: PythonClassifier: Programming Language :: Python :: 3.5Classifier: Programming Language :: Python :: 3.6Description-Content-Type: text/markdown
Package: cycurl
curl_cffiPython binding forcurl-impersonateviacffi.Documentation|中文 README|Discuss on TelegramUnlike other pure python http clients likehttpxorrequests,curl_cffican
impersonate browsers' TLS signatures or JA3 fingerprints. If you are blocked by some
website for no obvious reason, you can give this package a try.FeaturesSupports JA3/TLS and http2 fingerprints impersonation.Much faster than requests/httpx, on par with aiohttp/pycurl, seebenchmarks.Mimics requests API, no need to learn another one.Pre-compiled, so you don't have to compile on your machine.Supportsasynciowith proxy rotation on each request.Supports http 2.0, which requests does not.libraryrequestsaiohttphttpxpycurlcurl_cffihttp2❌❌✅✅✅sync✅❌✅✅✅async❌✅✅❌✅fingerprints❌❌❌❌✅speed🐇🐇🐇🐇🐇🐇🐇🐇Installpip install curl_cffi --upgradeThis should work on Linux(x86_64/aarch64), macOS(Intel/Apple Silicon) and Windows(amd64).
If it does not work on you platform, you may need to compile and installcurl-impersonatefirst and set some environment variables likeLD_LIBRARY_PATH.To install beta releases:pip install curl_cffi --preUsagerequests-likefromcycurlimportrequests# Notice the impersonate parameterr=requests.get("https://tls.browserleaks.com/json",impersonate="chrome110")print(r.json())# output: {..., "ja3n_hash": "aa56c057ad164ec4fdcb7a5a283be9fc", ...}# the js3n fingerprint should be the same as target browser# http/socks proxies are supportedproxies={"https":"http://localhost:3128"}r=requests.get("https://tls.browserleaks.com/json",impersonate="chrome110",proxies=proxies)proxies={"https":"socks://localhost:3128"}r=requests.get("https://tls.browserleaks.com/json",impersonate="chrome110",proxies=proxies)Sessions# sessions are supporteds=requests.Session()# httpbin is a http test websites.get("https://httpbin.org/cookies/set/foo/bar")print(s.cookies)# <Cookies[<Cookie foo=bar for httpbin.org />]>r=s.get("https://httpbin.org/cookies")print(r.json())# {'cookies': {'foo': 'bar'}}Supported impersonate versions, as supported bycurl-impersonate:chrome99chrome100chrome101chrome104chrome107chrome110chrome99_androidedge99edge101safari15_3safari15_5asynciofromcycurl.requestsimportAsyncSessionasyncwithAsyncSession()ass:r=awaits.get("https://example.com")More concurrency:importasynciofromcycurl.requestsimportAsyncSessionurls=["https://googel.com/","https://facebook.com/","https://twitter.com/",]asyncwithAsyncSession()ass:tasks=[]forurlinurls:task=s.get("https://example.com")tasks.append(task)results=awaitasyncio.gather(*tasks)curl-likeAlternatively, you can use the low-level curl-like API:fromcycurlimportCurl,CurlOptfromioimportBytesIObuffer=BytesIO()c=Curl()c.setopt(CURLOPT_URL,b'https://tls.browserleaks.com/json')c.setopt(CURLOPT_WRITEDATA,buffer)c.impersonate("chrome110")c.perform()c.close()body=buffer.getvalue()print(body.decode())See thedocsfor more details.If you are using scrapy, check out this middleware:tieyongjie/scrapy-fingerprintAcknowledgementOriginally forked frommultippt/python_curl_cffi, which is under the MIT license.Headers/Cookies files are copied fromhttpx, which is under the BSD license.Asyncio support is inspired by Tornado's curl http client.Sponsor
Package: cydantic
python-cydanticconao3's pydantic CLI wrapper.InstallInstall from PyPIrelease soon.Install from SourcepoetryinstallUsagegeneratePrepare pydantic model namedModel.importpydanticclassModel(pydantic.BaseModel):name:str='John Doe'age:int=20GenerateModel's schema.$cydanticgenerate-ssample/schema01.py{"properties":{"name":{"default":"John Doe","title":"Name","type":"string"},"age":{"default":20,"title":"Age","type":"integer"}},"title":"Model","type":"object"}Output using yaml format.$cydanticgenerate-ssample/schema01.py--formatyaml
properties:age:default:20title:Agetype:integername:default:JohnDoetitle:Nametype:string
title:Model
type:objectvalidate$cydanticvalidate-ssample/schema01.py-fyaml-isample/inpt01.json
age:20name:conao3

$cydanticvalidate-ssample/schema01.py-fyaml-isample/inpt02.json
age:18name:conao3

$cydanticvalidate-ssample/schema01.py-fyaml-isample/inpt03.json
Traceback(mostrecentcalllast):File"<string>",line1,in<module>File"/Users/conao/dev/repos/python-cydantic/src/cydantic/main.py",line86,inmainargs.handler(args)File"/Users/conao/dev/repos/python-cydantic/src/cydantic/main.py",line48,incommand_validateobj=model.model_validate(inpt)^^^^^^^^^^^^^^^^^^^^^^^^^^File"/Users/conao/dev/repos/python-cydantic/.venv/lib/python3.12/site-packages/pydantic/main.py",line503,inmodel_validatereturncls.__pydantic_validator__.validate_python(^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError:1validationerrorforModel
ageInputshouldbeavalidinteger,unabletoparsestringasaninteger[type=int_parsing,input_value='Unknown',input_type=str]Forfurtherinformationvisithttps://errors.pydantic.dev/2.5/v/int_parsing
Package: cydets
This package implements an algorithm to detect cycles in a times series
along with their respective depth-of-cycle (DoC) and duration.
It is maintained as a standalone package within theOpen Energy Modelling Framework.
The acronymCyDeTSstands for(Cy)cle (De)tection in (T)ime (S)eriesand
is chosen to prevent confusions with cycle definitions from graph theory.Algorithmic results have been tested against the well known rainflow cycle counting
(RFC) method from mechanical engineering and the equivalence of both counting methods
has been proved.
The original algorithm has been developed and proposed within the following publication:Dambrowski, Jonny; Pichlmaier, Simon & Jossen, Andreas.
Mathematical methods for classification of state-of-charge time series for cycle lifetime prediction.
Advanced Automotive Battery Conference. Mainz, Germany. 2012.Thanks again to Simon Pichlmaier for sharing his code and allowing us
to port and publish the algorithm under a free license.DocumentationThe probably most extensive description of the algorithm can be found in the
abovementioned paper. In addition, we have tried to document the single parts of
the algorithm as docstrings within the code.InstallationIf you have a working Python3 environment, use can pypi to install the latest
version.pipinstallcydetsUsageThe algorithm is implemented as a function which takes an array-like data
structure as argument.
Results are returned as apandasdataframe.importpandasaspdfromcydets.algorithmimportdetect_cycles# create sample dataseries=pd.Series([0,1,0,0.5,0,1,0,0.5,0,1,0])# detect cyclescycles=detect_cycles(series)CitationPlease use ourentry on Zenodoto refer a specific versionLicenseCopyright (C) 2019 oemof developing groupThis program is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.You should have received a copy of the GNU General Public License along with this program.
If not, seehttp://www.gnu.org/licenses/.
Package: cydifflib
CyDifflibCyDifflib is a fast implementation of difflib's algorithms, which can be used as a drop-in replacement.🚀 BenchmarksThe followingbenchmarkcompares the performance in the originaldifflibimplementation, the librarycdiffliband CyDifflib⚙️ InstallationYou can install this library fromPyPIwith pip:pip install cydifflibCyDifflib provides binary wheels for all common platforms.Source buildsFor a source build (for example from a SDist packaged) you only require a C++11 compatible compiler. You can install directly from GitHub if you would like.pip install git+https://github.com/rapidfuzz/CyDifflib.git@main📖 UsageThe library can be used in the same way as difflib. Just use thecydifflibmodule instead ofdifflib:# from difflib import SequenceMatcherfromcydifflibimportSequenceMatcherThe officialdocumentation of difflibexplains how to use the library. If you work with a library which internally uses some of the algorithms of difflib it is possible to replace the implementation before importing this library. E.g. forthefuzzthis can be done in the following way:fromcydifflibimportSequenceMatcherimportdifflibdifflib.SequenceMatcher=SequenceMatcherfromthefuzzimportfuzz👍 ContributingPRs are welcome!Found a bug? Report it in form of anissue. Any difference in behavior to difflib is considered as a bug.Can make something faster? Great! Just avoid external dependencies and remember that external behavior does not change.Have no time to code? Tell your friends and subscribers about CyDifflib.Thank you :heart:⚠️ LicenseCopyright 2021-presentMax Bachmann.CyDifflibis free and open-source software licensed under theMIT License.