Saravanan666/pypi-org huggingface dataset:
Package: onecode
ManifestoWhether we are in the industry, academia, or simply in our everyday-life, we find ourselves encountering 3 categories of profiles no matter what the topic:people who love to write code but don’t necessarily have an application for it (a.k.a. thedevelopers). Their pain point is usually finding something useful to create as well as a mass of people to actually use it on a regular basis (a.k.a. the developers’ dream).people who actually have problems to solve but don’t even know how it’s possible to do something about it computerwise-speaking (a.k.a. theexperts). Most of the time a simple solution (e.g. an Excel macro) does the trick: they may be mind-blown and very grateful about it for “saving their life” (a.k.a. the developers’ greatest disappointment, as developers would have loved to create a brand-new cloud-based fully automated web-app synchronized with your phone ready to welcome a million users). Their pain point is finding someone who can identify the root cause of the issues and solve it.people who started asexpertsand have an affinity for technology (a.k.a. thetech-savvy/data scientists). They are genuinely interested in programming and usually start with high-level languages such as Python or JavaScript. Very quickly, they write applications that solve their problems and are super happy to share what they have done and how. They have a foot in both worlds: eventually go further and further down to the dark-side... Their pain point? Writing low-hanging fruit solutions may seem easy at first, but when it comes to create a complete application, deploy it and scale it, things get out-of-hands.actually we have a 4th category, people who don’t care at all about it (a.k.a. the vast majority, e.g. my spouse). Developers can’t stop themselves for trying and trying to convince they should be in theexpertsortech-savvy/data scientistscategory (believe me, I keep trying every time, and 10 years later, it still doesn’t work). Do yourself a favor, just accept it and move on. So, if you’re in that bucket, I guess you can close this page and skip the reading unless you want to know why developers suffer from not being understood.Getting started
Package: onecomic
一本漫画尊重版权，请支持正版该项目仅供技术研究使用，请勿用于非法用途，否则后果自负通过本工具下载或生成的资源禁止传播分享！禁止利用该项目从事营利性活动！交流群:https://t.me/onecomicbook使用说明文档:https://onecomic-doc.readthedocs.io
Package: onecompiler
OneCompilerCompilation of many languages in Python!Project on PyPiMini documentationInstalling the library> pip install onecompilerImportfrom onecompiler import Compiler	# Sync
from onecompiler import AsyncCompiler	# AsyncInitializationcompiler = Compiler()Get a list of available languagesprint( compiler.all_languages )Languages are compiled through the Compiler attribute or usingcompiler.to.lang» For query languagescompiler.query.langExample# Sample JavaScript code
res = compiler.to.js('console.log("Hello");')
print(res.stdout)
# Hello

# Sample MySQL code
res2 = compiler.query.mysql('SELECT 10')
print(res2.stdout)
# 10Orres = compiler.compile(lang='js', code='console.log("Hello");')
print(res.stdout)
# Hello

res2 = compiler.compile(lang='mysql', code='SELECT 10')
print(res2.stdout)
# 10
Package: onecondition
1️⃣ OneConditionAn ultra-lightweight package for validating single conditions.Why?Often when writing Python code, you will need to validate one or more conditions about a value, and raise an error if those conditions aren't valid.
The most simple example is as follows:definverse(value):# Validate that the input is a positive numberifnotisinstance(value,(int,float)):raiseValueError("Value must be either an int or a float")ifnotvalue>0:raiseValueError("Value must be positive (non-zero)")return1/valueThis works for very simple cases, but what if we wanted to format more information into the error messages?
What if we want a custom error type to represent specifically a validation error?
What if we need to do 20, or 200 validations, instead of 2?
You can start to see how quickly your boilerplate for validation could clutter up your code.oneconditionaims to solve this issue with a simple design philosophy:You should only have to write one line of code in order to validate one condition.(And that line should be less than 100 characters long.)UsageThe most common usage ofoneconditionis to validate that the parameters passed to a function are valid.
Thevalidatesubmodule provides alarge number of functionsthat allow validating many aspects about a value.importoneconditionasocimportonecondition.validatedefinverse(value):# Validate that the input is a positive numberoc.validate.instance(value,(int,float))oc.validate.positive(value)return1/valueNow, if you run something likeinverse(4), you will get the expected output of0.25.However, runninginverse(0)would give the following error:Traceback (most recent call last):
    ...
onecondition.ValidationError: Value `0` must be positive (non-zero)Similarly, runninginverse("foobar")would result in the following:Traceback (most recent call last):
    ...
onecondition.ValidationError: Value `'foobar'` must be an instance of (<class 'int'>, <class 'float'>), not a <class 'str'>Isn't that much nicer than writing all that code yourself?Full Documentation
Package: one-config
Config ObjectMotivationIt's common for ML projects to use a large configuration object with all parameters in one place. There are two broad requirements of a configuration object:It should be able to easily represent the parameters of different runtime situations, such astestingandproduction.It should be available for all modulesIn order to achieve the first requirement, the object should be somehow constructed (and done so only once in the codebase).In order to achieve the second requirement, we could have aconfig.pyfile with all configuration parameters as attributes. This could be imported into other modules and used ad hoc.However, in order to achieveboth requirements, we would seemingly have to construct the config object once and inject the constructedconfiginto all other objects in the codebase. This clutters the codebase.Theone_configmodule attempts to resolve this problem by using the singleton pattern.Aone_configobject is constructedonce and only onceby a method parametrized with the path to a yaml file. Once constructed, the object will contain all parameterseven if accessed by another module.Although the code inconfig.pymay be opaque to many readers (and others might disagree about how "pythonic" it is), its implementation should be straightforward and it should be very useful for maintaining clean code in any project.How to use itCreate a.yamlfile in an appropriate place and add some parameters:# my_config.yamlmy:nested:-param1-param2Then, at the entry-point(s) of your python package, initialize theCONFIGobject with the path to the.yamlfile:# run.pyimportone_configone_config.build_config().from_yaml('path/to/my_config.yaml')In any other module, you can import theCONFIGobject and the parameters from the yaml file will be present.# my_module.pyimportone_configCONFIG=one_config.get_config()param1=CONFIG.my.nested.param1Notice how the nested parameters are accessed as nested attributes.Named configsIt is also possible to name a config in order to have multiple config environments simultaneously:# run.pyimportone_configone_config.build_config('private').from_yaml('private_env.yaml')# my_module.pyimportone_configPRIVATE_ENV=one_config.get_config('private')key=PRIVATE_ENV.my.super.secret.keyA note on the Singleton PatternThe singleton pattern is one of the more controversial design patterns. It is often ridiculed and seen as the "bad" pattern of the Gang of Four. On stack oveflow, the consensus seems to be that the singleton is either an anti-pattern or is useless in a language like python.In its original form, the Singleton might be all of those things. However, if we expand our definition of singleton to include any object whose state will be the same everywhere in the entire code base, we notice that we encounter singletons all the time in python. A python module is a singleton.Our singleton is simply an extension of the typical module singeton that allows us to easily add attributes based on an external file.
Package: onecron
sleep until next specified time.Usage$ onecron 12:00 --debug 2>/dev/null
[I|16910|200522 10:04:05.773 root:MainThread:onecron:56] Wait for 2020-05-22 12:00:00
^C
$ onecron 0 12 * * * --debug 2>/dev/null
[I|17467|200522 10:04:20.802 root:MainThread:onecron:56] Wait for 2020-05-22 12:00:00
^C
$ onecron 0 12 --debug 2>/dev/null
[I|17717|200522 10:04:30.514 root:MainThread:onecron:56] Wait for 2020-05-22 12:00:00
$ ./onecron 6 10 && echo $(date)
2020年 5月 22日 金曜日 10:06:00 JSTInstallationpip install onecronRequirementsCompatibilityLicenceAuthorspackage_name was written byfx-kirin.
Package: onedani
onedaniThis libraryfacilitateseducatorsto helpstudentsunderstand1D wall conduction problems through a simple 1D visualization animation.:package: Installationpipinstallonedani:rocket: How to useYou can build a simple animation with the following code:fromonedaniimportanimation.onedproblem#Setupthewallelments,bymaterial,andthicknessofeachmaterialwall=onedproblem(['plywood','rockwool','osb','airgap','plaster'],[0.01,0.1,0.012,0.02,0.02])#Youcansetthetimewall.setup_grid(50,time=30,fps=60)#30secondsof24fps#Addprobedtomeasurethetemperaturewall.add_probe(x=sum([0.01,0.1,0.012]),type='Temp')#Addprobetomeasuretheheatfluxwall.add_probe(x=sum([0.01,0.03]),type='Heat')#Runthe1Dproblemwall.run_problem()#Buildtheanimationwall.build_animation(scale="C",filename='animation_10.mp4'):memo: FeaturesBuild animations based on simple materials.Specify animation length, we will ensure it will always reach steady state at the end of the time.Add temperature and heat flux probes to show the results on the animation.:eyes: Watch outThis package is build on a (very) simple numerical solver and schema, this means there will be some numerical error.This is especially true for heat probes:it's reduced by increasing the number of x-nodesor making sure the heat probe is somewhere in the center of a material.:new: VersionsVersion 0.1Initial public release, the students enjoyed seeing the temperature evolve through the wall.:pray: AcknowledgementI would like to the thank Dr. Ralph Evins from theEnergy in Citiesgroup for the opportunity to teach in his CIVE 295 - Building Science Fundamentals class. The problem here and the questions from the students resulted in me repurposing some code I made in my PhD to make this animation.
Package: onedatafilerestclient
OnedataFileRESTClientOnedataFileRESTClient is a Python client to the Onedata file REST APIOnedata REST API.InstallingYou can install OnedataFileRESTClient fromPyPIas follows:pip install onedatafilerestclientBuilding and running tests manuallyvirtualenv-p/usr/bin/python3venv
.venv/bin/activate# Install toxpipinstall-rrequirements-dev.txt# Run flake8 checktox-ctox.ini-eflake8# Run yapf format checktox-ctox.ini-eyapf# Run mypy typing checktox-ctox.ini-emypy# Run PyFilesystem test suite (requires preexisting K8S Onedata deployment in default namespace)tox-ctox.ini-etestsRunning tests automaticallyvirtualenv-p/usr/bin/python3venv
.venv/bin/activate

./ct_run.py--verbose--imageonedata/pybuilder:v2--onenv-configtests/test_env_config.yaml--no-clean-s--suiteflake8--suiteyapf--suitemypy--suitetests
Package: onedata-lambda-utils
onedata-lambda-utilsPython Library containing utility functions for use in OpenFaaS lambda implementationsInstallationInstallation:python-mpipinstallonedata_lambda_utilsCompatibilitySpecificonedata-lambda-utilsreleases are intended to be used only with compatible Oneprovider versions:Oneprovider versionCompatible python library versions21.02.3+0.2.x21.02.1 - 21.02.20.1.x
Package: oneday
oneday======A Python DI/component project.Example------->>> from import Component>>> class A:pass>>> a = A()>>> Component.add(a)>>> Component.get(A) is aTrue>>> @Service.registerclass B:def __init__(self, a: A):self.a = a>>> b = Component.create(B)>>> b.a is aTrueInstall-------.. code-block:: shellpip install onedayAuthor------Yixian Du (duyixian1234@qq.com)
Package: onedev-python-project-boilerplate
Python project boiler plateThis project aims to make the building, and deployment of python packages and docker containers using OneDev as simple as possible.Featurespublish to DockerHubpublish to pypisync with GitHubTODOadd shields.iobranch protection settings setupHow to SetupMake a new OneDev repository and copy the contents of this repository into it.Update the following values in setup.py:namenote: this sets the name used on DockerHub, PyPI, and GitHubversiondescriptionauthorlicenseclassifiersinstall requiresextras_requireUpdate the docker file:add your contact info to theMAINTAINERlineCMDto whatever command starts your appCreate a Repository on GitHub with the same name as your OneDev projectIn OneDev:Edit step templates in the.onedev-buildspec.yamlfile::Execute tests:Run Pytest:add command to run test suite(s) if not pytestPublish Docker Container to Dockerhub: publish to dockerhub:update username to your dockerhub usernameUnderSettings > Build > Job Secretsaddyour DockerHub password asdockerhub_passwordyour DockerHub password asdockerhub_useryour PyPI password aspypi_passwordyour PyPI user aspypi_useryour GitHub user asgithub_useryourGitHub tokenasgithub_tokenIf there isn't already, make a 'Server Docker Executor' calleddocker-executorunderAdministration > Job Executorsfill in yourREADME.mdand remove this sectionContibutingContributions are welcome, this project is developed atdev.doze.devwhere you can submit issues and open pull requests.My ProjectDescribe what your package is aboutPackage DistributionInstallationpip install my-projectUsepython ./src/main.pyDocker DistibutionInstallationdocker pull docker_user/project_name:latestUsedocker run -p 5000:5000 project_nameor for detached mode:docker run -d -p 5000:5000 project_name
Package: onednn-cpu-dpcpp-gpu-dpcpp
The Intel® oneAPI Deep Neural Network Library(oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel® Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. oneDNN provides a SYCL* extensions API for CPU and GPU.
Package: onednn-cpu-iomp
The Intel® oneAPI Deep Neural Network Library(oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel® Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. oneDNN provides a SYCL* extensions API for CPU and GPU.
Package: onednn-cpu-vcomp
The Intel® oneAPI Deep Neural Network Library(oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel® Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. oneDNN provides a SYCL* extensions API for CPU and GPU.
Package: onednn-devel-cpu-dpcpp-gpu-dpcpp
The Intel® oneAPI Deep Neural Network Library(oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel® Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. oneDNN provides a SYCL* extensions API for CPU and GPU.
Package: onednn-devel-cpu-gomp
The Intel® oneAPI Deep Neural Network Library(oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel® Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. oneDNN provides a SYCL* extensions API for CPU and GPU.
Package: onednn-devel-cpu-iomp
The Intel® oneAPI Deep Neural Network Library(oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel® Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. oneDNN provides a SYCL* extensions API for CPU and GPU.
Package: onednn-devel-cpu-tbb
The Intel® oneAPI Deep Neural Network Library(oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel® Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. oneDNN provides a SYCL* extensions API for CPU and GPU.
Package: onednn-devel-cpu-vcomp
The Intel® oneAPI Deep Neural Network Library(oneDNN) is a performance library for deep learning applications. The library includes basic building blocks for neural networks optimized for Intel® Architecture Processors and Intel® Processor Graphics. oneDNN is intended for deep learning applications and framework developers interested in improving application performance on Intel CPUs and GPUs. oneDNN provides a SYCL* extensions API for CPU and GPU.
Package: onedrivedownloader
OneDrive downloader: python utility to download files from OneDriveInstall (PyPI)pip install onedrivedownloaderFirst stable release:1.0.0Current:1.1.3Do not require authentication.Requirestqdm: for nice progress barrequests: fetch data from OneDriveUsagefrom onedrivedownloader import download

...

download(url: str, filename: str, unzip=False, unzip_path: str = None, force_download=False, force_unzip=False, clean=False)Required parameters:url: The url to download from (should end with '?download=1').filename: The filename to save the file as.Optional parameters:unzip: want to unzip file or just download? If file is not.zip, do nothing.unzip_path: path to unzip files (default: current directory)force_download: force files download if exist? (default: False)clean: clean source file after unzip?Exampleln = "https://unimore365-my.sharepoint.com/:u:/g/personal/215580_unimore_it/EUmqgpzRz3tPlD2KiVNRqdABBJl7qQYcIeROtMc4g2UeIA?e=zZtkLr"

download(ln, filename="file.zip", unzip=True, unzip_path="./data")
Package: onedrive-ignore
OneDriveIgnoreOneDrive sync settings are horrible! This script renames files so they can sync, and then switches back to original extension when you need them.
Keeping everyone happy.Reason for the scriptCompany I work for started to use OneDrive for MyDocuments, I don't particularly use that folder much since I do lots of scripting, and programming. OneDrive isn't the best for engineering purposes. I do have some folders I share that are on MyDocuments that I'd like to keep synced without deleting what's stopping the syncing. If you google "how to ignore a folder in onedrive" you'll get tons of discussions online about this issue.See response from Angus over on OneDrivehttps://onedrive.uservoice.com/forums/262982-onedrive-archive/suggestions/6988070-use-a-file-to-ignore-exclude-files-or-folderRecently my VSCode powershell extension complained about my package management being out of date, and installed it in MyDocuments. I figured just ignore this folder for Sync, but no, OneDrive removes the folder from the PC even if it originated from the PC, leaving me without my powershell package management.Installpip install onedrive-ignoreUsageCreateignore_paths.txtfile then place it in%userprofile%\.config\onedrive-ignore, and add one path per line to folders that are causing issues.C:\Users\fernando\OneDrive\My Documents\WindowsPowerShell\Modules\PackageManagement\1.4.7\coreclr\netstandard2.0
C:\Users\fernando\OneDrive\My Documents\WindowsPowerShell\Modules\PackageManagement\1.4.7\fullclrThis script does a renaming of the file to txt file, then when restoring the files to original extension it simply removes the .txt.onedrive --ignore
onedrive --restore

# Short version
onedrive -i
onedrive -rFiles Ignored, synced to onedrive:Files Restored, OneDrive not syncing:
Package: onedriveintegrate
OneDrive Integration Packageonedriveintegrateis a Python package for OneDrive functionality, featuring methods for OneDrive file management.List of relevant operations:Authenticate users using Microsoft Graph APIWrite files to a folderRead files from the driveList contents of a folderSearch for files based on text/idInstallationUse a simplepipcommand to installonedriveintegrate:pipinstallonedriveintegrateUsage / Getting startedfromonedriveintegrate.onedrive_apiimportOneDriveAPIfromonedriveintegrate.ms_graphimportgenerate_access_token,GRAPH_API_ENDPOINT# User's Client IDclient_ID='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'# Setuponedrive_query=OneDriveAPI(client_ID)folder_id='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'file_path='root/base/relative/file'file_id='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'output_file='XXXXX.json'search_txt='XXXXX'# 1) Upload file to specified folderonedrive_query.write_file(folder_id,file_path)# 2) Download file from specified idonedrive_query.read_file(file_id)# 3) List contents of folder, results stored in output_fileonedrive_query.list_folder(folder_id,output_file)# 4) Search item based on search text/id, results storted in output_fileonedrive_query.search_text(search_txt,output_file)onedrive_query.search_id(file_idORfolder_id,output_file)Helpful ResourcesSources from Jie Jenn:Upload Files to One Drive using Microsoft Graph API in PythonDownload Files from OneDrive Using Microsoft Graph API in PythonSource Code for ms_graph.pyMicrosoft Graph API:Microsoft Graph ExplorerMicrosoft Azure PortalOverview of Microsoft Graph - DocumentationHow to Upload Files to OneDrivePyPi:Build a Python Module and Share it with Pip InstallPyPi.orgMarkdown:Make a READMEHow to write a good READMEAcknowledgementsThis package makes use of Jie Jenn's ms_graph.py for the user authentication process.LicenseMIT