Saravanan666/pypi-org huggingface dataset:
Package: pycandle
PyCandle is a lightweight library for pytorch that makes running experiments easy, structured, repeatable and avoids boilerplate code. It maintains flexibilty and allows to train also more complex models like recurrent or generative neural networks conveniently.UsageThis code snippet creates a timestamped directory for the current experiment, runs the training of the model, creates a backup of all used code, logs current git hash and forks console output into a log file:model=Net().cuda()experiment=Experiment('mnist_example')train_loader=load_dataset(batch_size_train=64)optimizer=torch.optim.Adam(model.parameters(),lr=0.01)model_trainer=ModelTrainer(model,optimizer,F.nll_loss,20,train_loader,gpu=0)model_trainer.start_training()A complete example for training a model to classify hand-written MNIST digits can be found inminimal_example/mnist.py.InstallationVia PIPThe easiest way to install pycandle is through pip:pip install pycandleRequirementsWe tested PyCandle with the dependency versions listed here. However, PyCandle can also work with newer versions if they are downward compatible.Python 3.5.4PyTorch 0.4.1cudnn 7.0.5torchvision 0.2.1 (for examples)matplotlib 2.1.1 (for examples)
Package: pyCandleMAB
MD80 Python driverThis Python package can be used to configure and control MD80-based actuators using MAB's communication dongle (CANdle or CANdle HAT). The package is a wrapper around the C++ library - with simple python examples there won’t be any noticeable performance decrease compared to plain C++, however for real-time applications we advise using C++ libraries directly.The original C++ libraries and python examples are located in thecandlerepository. Please make sure you read theMD80 x CANdle manualbefore you start playing with the examples.Getting startedAssuming you've already read the manual from previous section and performed the necessary setup steps now's the time to install pyCandle package:python3 -m pip install pyCandleMABor when you're working with Raspberry PI:sudo python3 -m pip install pyCandleMABwhen the package is installed without errors connect CANdle device to your PC and run the first example:python3 ./example1.pywhen a signle actuator is connected to the dongle the console output should look simmilar to:[CANDLE] Creating CANdle object.
[CANDLE] Reset successfull!
[CANDLE] CANdle ready.
[CANDLE] Starting pinging drives...
[CANDLE] Found drives.
[CANDLE] 1: ID = 85 (0x55)
[CANDLE] LEDs blining at ID = 85
EXIT SUCCESSFor more examples visit:https://github.com/mabrobotics/candle/tree/main/examples_python
Package: pycangjie
pyCangJieCangJie 倉頡 dictionary API.Hierarchypycangjie
|---- convert()
'---- gen_table()Examplepythonimportpycangjietext="倉頡API"print(pycangjie.convert(text))print(pycangjie.gen_table(pycangjie.convert(text)))WebTry it outhere.
Package: py_canoe
Aboutpy_canoePython 🐍 Package for controlling Vector CANoe 🛶 Toolforkthis repoand create pull request to contribute back to this project.for ideas/discussions please create new discussionherecreate issue or request featurehereGitHub Releases 👉linkPyPi Package 👉linkPrerequisiteslinkPython environment setup instructionslinkInstallpy_canoepackagepip install py_canoe --upgradeDocumentation Linksexample use cases 👉linkpackage reference doc 👉linkSample Example# Import CANoe modulefrompy_canoeimportCANoe# create CANoe objectcanoe_inst=CANoe()# open CANoe configuration. Replace canoe_cfg with yours.canoe_inst.open(canoe_cfg=r'tests\demo_cfg\demo.cfg')# print installed CANoe application versioncanoe_inst.get_canoe_version_info()# Start CANoe measurementcanoe_inst.start_measurement()# get signal value. Replace arguments with your message and signal data.sig_val=canoe_inst.get_signal_value('CAN',1,'LightState','FlashLight')print(sig_val)# Stop CANoe Measurementcanoe_inst.stop_measurement()# Quit / Close CANoe configurationcanoe_inst.quit()
Package: pycanon
pyCANON is a Python library and CLI to assess the values of the parameters
associated with the most common privacy-preserving techniques via anonymization.Authors:Judith Sáinz-Pardo Díaz and Álvaro López García (IFCA - CSIC).InstallationWe recommend to use Python3 withvirtualenv:virtualenv .venv -p python3
source .venv/bin/activateThen run the following command to install the library and all its
requirements:pip install pycanonIf you also want to install the functionality that allows to generate PDF files
for the reports, install as followspip install pycanon[PDF]DocumentationThe pyCANON documentation is hosted onRead the
Docs.Getting startedExample using theadult
dataset:importpandasaspdfrompycanonimportanonymity,reportFILE_NAME="adult.csv"QI=["age","education","occupation","relationship","sex","native-country"]SA=["salary-class"]DATA=pd.read_csv(FILE_NAME)# Calculate k for k-anonymity:k=anonymity.k_anonymity(DATA,QI)# Print the anonymity report:report.print_report(DATA,QI,SA)DescriptionpyCANON allows to check if the following privacy-preserving techniques
are verified and the value of the parameters associated with each of
them.TechniquepyCANON functionParametersNotesk-anonymityk_anonymityk: int(α, k)-anonymityalpha_k_anonymityα: floatk:intℓ-diversityl_diversityℓ: intEntropy ℓ-diversityentropy_l_diversityℓ: intRecursive (c,ℓ)-diversityrecursive_c_l_diversityc: intℓ: intNot calculated if ℓ=1Basic β-likenessbasic_beta_likenessβ: floatEnhanced β-likenessenhanced_beta_likenessβ: floatt-closenesst_closenesst: floatFor numerical attributes the definition of the EMD
(one-dimensional Earth Mover’s Distance) is used.
For categorical attributes, the metric “Equal
Distance” is used.δ-disclosure privacydelta_disclosureδ: floatMore information can be found in thispaper.In addition, a report can be obtained including information on the equivalence claases and the
usefulness of the data. In particular, for the latter the following three classically used metrics
are implemented (as defined in thedocumentation):average equivalence class size,classification metricanddiscernability metric.CitationIf you are using pyCANON you can cite it as follows:@article{sainzpardo2022pycanon,
   title={A Python library to check the level of anonymity of a dataset},
   author={S{\'a}inz-Pardo D{\'\i}az, Judith and L{\'o}pez Garc{\'\i}a, {\'A}lvaro},
   journal={Scientific Data},
   volume={9},
   number={1},
   pages={785},
   year={2022},
   publisher={Nature Publishing Group UK London}}AcknowledgmentsThe authors would like to thank the funding through the European Union - NextGenerationEU
(Regulation EU 2020/2094), through CSIC’s Global Health Platform (PTI+ Salud Global) and
the support from the project AI4EOSC “Artificial Intelligence for the European Open Science
Cloud” that has received funding from the European Union’s Horizon Europe research and
innovation programme under grant agreement number 101058593.
Package: pycanpcap
candump and write a pcap using scapy (and python-can)> python -m pip install pycanpcap
 > python -m pycanpcap.log -i cantact -c 0 -w can.pcap
WARNING: No libpcap provider available ! pcap won't be used
WARNING: Wireshark is installed, but cannot read manuf !
(000.008538) PythonCANSocket_cantact_0 007#0000b5f8
(000.008700) PythonCANSocket_cantact_0 01b#0000b5f8
(000.008961) PythonCANSocket_cantact_0 055#01025afc328e5b3e
(000.009318) PythonCANSocket_cantact_0 00f#f80fb5f831
(000.018648) PythonCANSocket_cantact_0 007#0000b6f8
(000.018834) PythonCANSocket_cantact_0 01b#0000b6f8
(000.019378) PythonCANSocket_cantact_0 00f#f90fb6f85a
^Cignore the warnings on windowsCtrl-C when readyopen can.pcap in wiresharkgrep the output as usual
Package: pycante
The hotest way to deal with PyQtAllows a unique way to deal with QtDesigner.uifiles.Example:fromPyQt4importQtGuiimportpycanteclassMyWidget(pycante.E("/path/to/file.ui"),AnotherClass);passclassMyAnotherWidget(pycante.E(QtGui.QFrame),AnotherClass):passw0=MyWidget()w1=MyAnotherWidget()Docs:https://pycante.readthedocs.org/en/latest/
Package: pycantonese
Full Documentation:https://pycantonese.orgPyCantonese is a Python library for Cantonese linguistics and natural language
processing (NLP). Currently implemented features (more to come!):Accessing and searching corpus dataParsing and conversion tools for Jyutping romanizationParsing Cantonese textStop wordsWord segmentationPart-of-speech taggingDownload and InstallTo download and install the stable, most recent version:$ pip install --upgrade pycantoneseReady for more?
Check out theQuickstartpage.ConsultingIf your team would like professional assistance in using PyCantonese,
freelance consulting and training services are available for both academic and commercial groups.
Please emailJackson L. Lee.SupportIf you have found PyCantonese useful and would like to offer support,buying me a coffeewould go a long way!LinksSource code:https://github.com/jacksonllee/pycantoneseBug tracker:https://github.com/jacksonllee/pycantonese/issuesSocial media:FacebookandTwitterHow to CitePyCantonese is authored and maintained byJackson L. Lee.A talk introducing PyCantonese:Lee, Jackson L. 2015. PyCantonese: Cantonese linguistic research in the age of big data.
Talk at the Childhood Bilingualism Research Centre, Chinese University of Hong Kong. September 15. 2015.Notes+slidesLicenseMIT License. Please seeLICENSE.txtin the GitHub source code for details.The HKCanCor dataset included in PyCantonese is substantially modified from
its source in terms of format. The original dataset has a CC BY license.
Please seepycantonese/data/hkcancor/README.mdin the GitHub source code for details.The rime-cantonese data (release 2021.05.16) is
incorporated into PyCantonese for word segmentation and
characters-to-Jyutping conversion.
This data has a CC BY 4.0 license.
Please seepycantonese/data/rime_cantonese/README.mdin the GitHub source code for details.LogoThe PyCantonese logo is the Chinese character 粵 meaning Cantonese,
with artistic design by albino.snowman (Instagram handle).AcknowledgmentsWonderful resources with a permissive license that have been incorporated into PyCantonese:HKCanCorrime-cantoneseIndividuals who have contributed feedback, bug reports, etc.
(in alphabetical order of last names):@cathugLitong ChenJenny Chim@g-travellerRachel HanRyan LaiCharles LamChaak Ming LauHill Ma@richielo@rylanchiuStephan StillerTsz-Him TsuiRobin YuenChangelogPlease seeCHANGELOG.md.Setting up a Development EnvironmentThe latest code under development is available on Github atjacksonllee/pycantonese.
You need to haveGit LFSinstalled on your system
(runbrew install git-lfsif you have Homebrew installed on MacOS,
or runsudo apt-get install git-lfsif you’re on Ubuntu).
To obtain this version for experimental features or for development:$gitclonehttps://github.com/jacksonllee/pycantonese.git$cdpycantonese$gitlfspull$pipinstall-rdev-requirements.txt$pipinstall-e.To run tests and styling checks:$pytest-vv--doctest-modules--cov=pycantonesepycantonesedocs/source$flake8pycantonese$black--checkpycantoneseTo build the documentation website files:$pythondocs/source/build_docs.py
Package: pycanvasdata
Full documentationThis python module is designed to make it easy to access Canvas Data files.Currently, this module makes it possible to:Convert downloaded Canvas Data files to CSV files with headersexport SQL table creation statementslist files for a tabledownload all files or files for a specific tableview the Canvas Data schema (fields, field types, etc)connect to a database (uses sqlalchemy) to create tables, import data, run SQL queriesModule UsageThis module can be used programatically in other scripts and software. An
example of creating a canvas_data object is found below.:from canvas_data_utils.canvas_data_auth import CanvasData

canvas_data_object = CanvasData(
    API_KEY=YOUR_API_KEY ,
    API_SECRET=YOUR_API_SECRET,
    base_folder = YOUR_BASE_DIR,
    data_folder = YOUR_DATA_DIR)Once you have that object created, you can…generate mysql table creation statementsmysql_table_creation_statement = canvas_data_object.table_creation_statement('mysql')generate sqlite table creation statementssqlite_table_creation_statement = canvas_data_object.table_creation_statement('sqlite')generate postgres table creation statementspostgres_table_creation_statement = canvas_data_object.table_creation_statement('postgres')create tables in a database given by a connection stringcanvas_data_object.create_tables('sqlite:///{}'.format(db_filename))fetch the current schema (as json)schema = canvas_data_object.fetch_schema()get a list of columns in a tableuser_dim_columns = canvas_data_object.get_schema_columns( 'user_dim')convert an text file download from TSV (Tab Separated Values) to CSVcanvas_data_object.convert_tsv_to_csv(tsv_filepath)list all the tables in the schematable_list = canvas_data_object.table_list()download and convert all files to CSVcanvas_data_object.convert_all_to_csv()list all downloadable files for a tablefile_list = canvas_data_object.list_all_files('user_dim')Config FileYou need to create a config file somewhere. This config file is a typical .INI
file. It should look something like the following example.[config]
API_SECRET = replace_with_api_secret_from_canvas_data
API_KEY = replace_with_api_key_from_canvas_data

base_folder = /path/to/base/folder/for/downloads/
data_folder = %(base_folder)s/test2

connection_string = sqlite:///%(base_folder)s/sample.dbNote: The connection_string configuration follows the connection pattern needed
by SQLAlchemy athttp://docs.sqlalchemy.org/en/rel_1_0/core/engines.html.This library supports any database type than SQLAlchemy does.Command-line ToolThis library includes a command line utility calledcanvasdata.Usagecanvasdata [-h] [--config CONFIG] [-t TABLE] [--offline OFFLINE]
                {convert_to_csv,import,create_tables,reset,sql_create_statement,list_files,download,sample_queries,schema}

optional arguments:
  -h, --help            show this help message and exit
  --config CONFIG       path to the configuration file
  -t TABLE              specify a specific table
  --offline OFFLINE     run in offline mode
Package: pycap
PyCapIntroPyCapis a python module exposing the REDCap API through some helpful abstractions. Information about the REDCap project can be found athttps://project-redcap.org/.Available under the MIT license.InstallationInstall the latest version withpip$pipinstallPyCapIf you want to load REDCap data intopandasdataframes, this will make sure you havepandasinstalled$pipinstallPyCap[all]To install the bleeding edge version from the github repo, use the following$pipinstall-egit+https://github.com/redcap-tools/PyCap.git#egg=PyCapDocumentationCanonical documentation and usage examples can be foundhere.FeaturesCurrently, these API calls are available:ExportArmsData Access GroupsEventsField namesInstrument-event mappingFileLoggingMetadataProject InfoRecordsRepeating instruments and eventsReportSurvey participant listUsersUser-DAG assignmentUser RolesUser-Role assignmentVersionImportArmsData Access GroupsEventsFileMetadataRecordsRepeating instruments and eventsUsersUser-DAG assignmentUser RolesUser-Role assignmentDeleteArmsData Access GroupsEventsFileRecordsUsersUser RolesOtherGenerate next record nameSwitch data access groupCitingIf you use PyCap in your research, please consider citing the software:Burns, S. S., Browne, A., Davis, G. N., Rimrodt, S. L., & Cutting, L. E. PyCap (Version 1.0) [Computer Software].
Nashville, TN: Vanderbilt University and Philadelphia, PA: Childrens Hospital of Philadelphia.
Available fromhttps://github.com/redcap-tools/PyCap. doi:10.5281/zenodo.9917
Package: pycap2low
pycap2lowAplicación para convertir los nombres de archivos y directorios a minúsculas.RequisitosIntérprete de python3Instalaciónpip3 install pycap2lowUsoLa aplicación recibe como primer parámetro la ruta del directorio a renombrar.pycap2low /ruta/directorio/renombrarArgumentos-r --recursive Indicador para renombrar todos los subdirectorios.--str-camel-case Cadena a usar en caso de notacion camelCase.--excepts Ruta a fichero contenedor de rutas de excepción.Las rutas dentro del fichero admiten atributos. Por el momento el atributo reconocido es -r.El formato es el siguiente:
-r /ruta/directorio/exceptuar/recursivamente
/ruta/directorio/exceptuarAyudapycap2low -h | --helpCréditosIdea original y desarrollo:Alexis Torres Valdes (alexisdevsol@gmail.com)
Package: pycape
PyCapeThe Cape SDK for Python is a library that provides a simple way to interact with the Cape Privacy API.Table of ContentsInstallationUsageContributingInstallationPrerequisitesPython 3.7+pipMake(if installing from source)We recommend that you use aPython "Virtual Environment"when installingpycape.Install via pipYou can install the current release with:pipinstallpycapeInstall from sourceTo install the library from source and all of its dependencies, run:gitclonehttps://github.com/capeprivacy/pycape.gitcdpycape
makeinstall-releaseUsageTo run a function, you need to first deploy a function and generate apersonal access token. You can deploy a function with theCape CLIby runningcape deploy.cape deploywill return a function ID and a checksum. Non-CLI users can still consume the deployed function from the SDK as long as they have a copy of the deployer's personal access token. You can checkout theexamples repositoryto see the process end to end.runRun is used to invoke a function once with a single input. A connection to a Cape function is created, then terminated upon completion (no set up or tear down is required). If you wish to invoke the same function multiple times without terminating the connection between calls, please seeinvoke. By default, inputs and outputs are expected to be bytes.Note: You can optionally useSerdioto help with serialization and deserialization of inputs and outputs. To learn more, please check outthis example.Examplerun_echo.py:frompycapeimportCapecape=Cape(url="https://app.capeprivacy.com")token:str="eyJhbGci..."# full token omitted for brevityf=cape.function("pycape-dev/echo")t=cape.token(token)result=client.run(f,t,b"Hello!")print(result.decode())# Hello!invokeInvoke is used to run a function repeatedly with multiple inputs. The connection to your Cape function is not terminated between invocations. It gives you more control over the lifecycle, and can be more efficient. Prior to callinginvoke,connectto your function and thencloseit when you are finished. You can also callinvokeinside of aCape.function_context, which will handle connecting and closing the connection for you. See thedocsfor a usage example.Exampleinvoke_echo.py:frompycapeimportCapecape=Cape(url="https://app.capeprivacy.com")token:str="eyJhbGci..."# full token omitted for brevityf=cape.function("pycape-dev/echo")t=cape.token(token)cape.connect(f,t)result=cape.invoke(b"Hello Alice!")print(result.decode())# Hello Alice!result=cape.invoke(b"Hello Bob!")print(result.decode())# Hello Bob!result=cape.invoke(b"Hello Carole!")print(result.decode())# Hello Carole!cape.close()Please note that there is a 60-second inactivity timeout on the enclave connection. You may need to monitor the connection status and reconnect if there is a significant wait between inputs.(back to top)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.Read more about how to contribute to the Cape SDK inCONTRIBUTING.(back to top)
Package: pycapella
Python SDK forcapella.picsInstallationThis package is calledPyCapellaon PyPI. Install using:$ pip install pycapellaUsageimportpycapellaapi=pycapella.Capella()# Save local file 'image.jpg' to the Capellaresponse=api.upload_file("image.jpg")assertresponse['success']==Trueprint("Success! Image URL is{}".format(response['url']))# Save remote image by url to the Capellaresponse=api.upload_url("https://ifmo.su/public/app/img/products/capella.png")assertresponse['success']==Trueprint("Success! Image URL is{}".format(response['url']))API DocumentationFull documentation can be found on GitHub –https://github.com/codex-team/capellaIssues and improvementsAsk a question or report a bug on thecreate issue page.Know how to improve PyCapella?Fork itand send pull request.You can also write questions and suggestions to theCodeX Team’s
email.LicenseMIT
Package: py-capitalist
PyCapitalistPython client library forCapitalist API.InstallationPyCapitalist can be obtained withpip:$ pip install py-capitalistUsage example>>>fromcapitalistimportCapitalistClient>>>capitalist=CapitalistClient(username='user',password='pass')>>>capitalist.currency_rates(){'code':0,'data':{'rates':{'buy':[{'amount':1.15,'amountCur':'USD','target':'EUR'},{'amount':3874.15,'amountCur':'USD','target':'BTC'},{'amount':3262.95,'amountCur':'EUR','target':'BTC'},{'amount':228094.87,'amountCur':'RUR','target':'BTC'},{'amount':57.32,'amountCur':'RUR','target':'USD'},{'amount':67.52,'amountCur':'RUR','target':'EUR'}],'sell':[{'amount':1.26,'amountCur':'USD','target':'EUR'},{'amount':4070.33,'amountCur':'USD','target':'BTC'},{'amount':3428.17,'amountCur':'EUR','target':'BTC'},{'amount':239808.15,'amountCur':'RUR','target':'BTC'},{'amount':59.11,'amountCur':'RUR','target':'USD'},{'amount':70.94,'amountCur':'RUR','target':'EUR'}]}},'message':''}DocumentationYou can view the documentation online at:https://py-capitalist.readthedocs.io/en/stable/Or you can look at the docs/ directory in the repository.Python supportPyCapitalist supports Python 2.7, 3.3, 3.4, 3.5, 3.6.
Package: pycapo
PyCAPO is an implementation of SSA CAPO (CASA, Archive, and Pipeline Options)
in Python. It is shipped as a library with a simple API and a command line
utility that calls the library and produces results suitable for use in a shell
script, enabling us to make quick CAPO enabled scripts.CAPO is a configuration system that reads values from multiple property files,
these files are delimited by the combination of two options to it, CAPO_PATH
and CAPO_PROFILE:CAPO_PATH is a colon delimited list of directories to search for property files,
like ‘/home/casa/capo:/home/ssa/capo:/etc/capo’. The same property can be read
from multiple files, and in this case the later property replaces the earlier
property. CAPO_PATH can be given as an argument to the library or CLI app, or
PyCAPO will look for a CAPO_PATH environment variable. If those two are missing
PyCAPO defaults to ‘/home/casa/capo:/home/ssa/capo:$HOME/.capo’. PyCAPO skips
over missing or unreadable property files (this is intentional).CAPO_PROFILE describes the profile PyCAPO looks for, e.g. ‘test’, ‘staging’,
‘production’, and PyCAPO expects the property files on the CAPO_PATH it looks
for to be named $profile.properties, e.g., /home/casa/capo/test.properties.
CAPO_PROFILE can be an argument to the library or CLI app, or PyCAPO will look
for a CAPO_PROFILE environment variable. If both of those are missing PyCAPO
will complain and die (this is also intentional).CAPO isn’t yet robust against things like profiles with spaces in their name,
and it has only been tested under Linux and MacOS.0.2.1 … dropped support for Python 3.3, added support for Python 3.7
0.1.1 … minor tweaks to prepare for pushing to pypi, no functional modifications
0.1.0 … initial version