Saravanan666/pypi-org huggingface dataset:
Package: zydmayday-pamda
pamdaThis is a repo try to copyhttps://github.com/ramda/ramdain python.installFor whom wants to use this package.>pipinstallzydmayday-pamda
>pipinstallzydmayday-pamda-U# get the latestUsage>>>frompamdaimportcurry>>>defsum(a,b,c):returna+b+c>>>curry(sum)(1)(2,3)6>>>importpamdaasR# similar to ramda syntax>>>defsum(a,b,c):returna+b+c>>>R.curry(sum)(1)(2,3)6ContributeFor whom wants to contribute to this repo.# see: https://pre-commit.com/ for more details$pre-commitinstall# install hooksCheck the latest branch to be released inhere.Checkout new branch from that release branch and create PR.CheckListFunctions supported now.__add# different from ramda, ramda treat null as 0>>>R.add(None,None)# float('nan)addIndexadjustallTransducer part is not fully tested.allPassalwaysAnd (andis a keyword in python)andThenanyanyPassapapertureappendapplyapplySpecapplyToascendassocassocPathbinarybindbothcallchainclampclonecollectBycomparatorcomplementcomposecomposeWithconcatcondconstructconstructNconvergecountcountBycurrycurryNdecdefaultTodescenddifferencedifferenceWithdissocdissocPathdividedropdropLastdropLastWhiledropRepeatsdropRepeatsWithdropWhileeitheremptyendsWitheqByeqPropsequalsevolveFfilterfindfindIndexfindLastfindLastIndexflattenflipforEachforEachObjIndexedfromPairsgroupBygroupWithgtgtehashasInhasPathheadidenticalidentityifElseincincludesindexByindexOfinitinnerJoininsertinsertAllintersectionintersperseintoinvertinvertObjinvokerisisEmptyisNiljoinjuxtkeys# When using R.keys(obj) and obj is a class instance, we use obj.__dict__ as keys.classA:c='not included'def__init__(self):self.a=1self.b=2a=A()R.keys(a)# ['a', 'b']keysInlastlastIndexOflengthlenslensIndexlensPathlensPropliftliftNltlteMap (mapis a keyword in python)mapAccummapAccumRightmapObjIndexedmatchmathModmaxmaxBymeanmedianmemoizeWithmergeAllmergeDeepLeftmergeDeepRightmergeDeepWithmergeDeepWithKeymergeLeftmergeRightmergeWithmergeWithKeyminminBymodifymodifyPathmodulomovemultiplynArynegatenonenotnthnthArgoobjOfofomitononceorotherwiseoverpairpartialpartialObjectpartialRightpartitionpathpathEqpathOrpathspathSatisfiespickpickAllpickBypipepipeWithpluckprependproductprojectpromapproppropEqpropIspropOrpropspropSatisfiesrangereducereduceByreducedreduceRightreduceWhilerejectremoverepeatreplacereversescansequencesetslicesortsortBysortWithsplitsplitAtsplitEverysplitWhensplitWheneverstartsWithsubtractsumsymmetricDifferencesymmetricDifferenceWithTtailtaketakeLasttakeLastWhiletakeWhiletaptestthunkifytimestoLowertoPairstoPairsIntoStringtoUppertransducetransposetraversetrimtryCatchtypeunapplyunaryuncurryNunfoldunionunionWithuniquniqByuniqWithunlessunnestuntilunwindupdateuseWithvaluesvaluesInviewwhenwherewhereAnywhereEqwithoutxorxprodzipzipObjzipWith
Package: zyf-timer
安装pip install zyf_timer或者pip install zyf_timer -ihttps://pypi.python.org/simple使用函数计时示例1：timeitfromzyfimporttimeit@timeitdefsleep(seconds:int):time.sleep(seconds)运行>>sleep(1)Functionsleep->takes1.001seconds示例2：repeat_timeitfromzyfimportrepeat_timeit@repeat_timeit(number=5)deflist_insert_time_test():l=[]foriinrange(10000):l.insert(0,i)@repeat_timeit(repeat=3,number=5)deflist_append_time_test():l=[]foriinrange(1000000):l.append(i)returnl@repeat_timeit(number=5,print_detail=True)deflist_gen_time_test():l=[iforiinrange(1000000)]returnl@repeat_timeit(repeat=3,number=5,print_detail=True)deflist_extend_time_test():l=[]foriinrange(1000000):l.extend([i])@repeat_timeit(repeat=3,number=5,print_detail=True,print_table=True)deflist_range_time_test():l=list(range(1000000))运行>>list_insert_time_test()Functionlist_insert_time_test->5functioncalls:averagetakes0.097seconds

>>list_append_time_test()Functionlist_append_time_test->3trialswith5functioncallspertrial:averagetrial3.269seconds.averagefunctioncall0.654seconds

>>list_gen_time_test()TimeSpendof5functioncalls:Function->list_gen_time_test:total1.550seconds,average0.310seconds
Average:0.310seconds

>>list_extend_time_test()TimeSpendof3trialswith5functioncallspertrial:Function->list_extend_time_test:best:3.289seconds,worst:3.626seconds,average:3.442seconds
Averagetrial:3.442seconds.Averagefunctioncall:0.688seconds

>>list_range_time_test()TimeSpendof3trialswith5functioncallspertrial:
+----------------------+---------------+---------------+---------------+-----------------------+|Function|Besttrial|Worsttrial|Averagetrial|Averagefunctioncall|+----------------------+---------------+---------------+---------------+-----------------------+|list_range_time_test|0.640seconds|0.714seconds|0.677seconds|0.135seconds|+----------------------+---------------+---------------+---------------+-----------------------+示例3：构建列表效率对比fromzyfimportrepeat_timeit@repeat_timeit(number=3)deflist_insert_time_test():l=[]foriinrange(100000):l.insert(0,i)@repeat_timeit(number=5)deflist_extend_time_test():l=[]foriinrange(100000):l.extend([i])@repeat_timeit(number=5)deflist_append_time_test():l=[]foriinrange(100000):l.append(i)returnl@repeat_timeit(number=5)deflist_gen_time_test():l=[iforiinrange(100000)]returnl@repeat_timeit(number=5)deflist_range_time_test():l=list(range(100000))if__name__=='__main__':list_range_time_test()list_gen_time_test()list_append_time_test()list_extend_time_test()list_insert_time_test()运行结果Functionlist_range_time_test->5functioncalls:averagetakes0.012seconds
Functionlist_gen_time_test->5functioncalls:averagetakes0.017seconds
Functionlist_append_time_test->5functioncalls:averagetakes0.038seconds
Functionlist_extend_time_test->5functioncalls:averagetakes0.067seconds
Functionlist_insert_time_test->3functioncalls:averagetakes13.747seconds
Package: zygoat
zygoatWhat is zygoat?zygoatis a command line tool used to bootstrap and configure a React/Django/Postgres stack web application.Linting, test configuration, boilerplate, and development environment are automatically taken care of usingzygoatso that you can get up and running faster.zygoatalso includes a preset deployment configuration to allow you to deploy your stack to an AWS environment with a single command. You'll get a full serverless AWS stack to keep things inexpensive and nimble.How does it work?zygoatworks by definingComponents, defined as parts of projects, and then defining how you implement those components based on whether you're creating a new project, updating an existing project, or deleting a component that's no longer needed.For instance, for the python backend, we want to includeblack, which is a tool for automatically formatting python code in a standard way to make it pep8 compliant. To installblackin for the python backend part of the project, we create aComponentfor it, specifically aFileComponent, which defines how we treat files that we need in projects. Then we register theBlackcomponent (defined inblack.py) with theBackendcomponent (defined inbackend/__init__.py) as a sub component. This way, whenever you create or update (or delete) a project with theBackendcomponent, you'll do the same 'phase' to theBlackcomponent.Installationpipinstall--upgradezygoatUsagemkdirmy-cool-new-app&&cdmy-cool-new-app
gitinit
zgnewmy-cool-new-appFor more customization and configuration,check out the official documentation.How do I develop changes for it?Make a new git repository somewhere, we'll call it test-zgmkdirtest-zg&&cdtest-zg
gitinitInstall the zygoat package locallypipinstall--user--upgrade~/Projects/zygoat# Or wherever you have itIf you're using the asdf version manager, reshimasdfreshimpythonRun zg commands, see if they failzgnewtestzgupdate
zgdeleteContributingzygoatis developed using thePoetrypackaging framework for Python projects to make development as simple and portable as possible.DocumentationAvailable on ReadTheDocs
Package: zygrpc
libzygrpc智眼Grpc SDK生成gRPC代码安装依赖：pip install -U grpcio protobuf grpcio-tools生成gRPC代码：在libzygrpc目录下运行python -m grpc_tools.protoc -I . --python_out=python/ --grpc_python_out=python/ proto/zhiyan_rpc.protogRPC工具会生成两个Python文件：proto/zhiyan_rpc_pb2.pyproto/zhiyan_rpc_pb2_grpc.py注意事项生成proto/zhiyan_rpc_pb2_grpc.py文件后，需要确认其中导入zhiyan_rpc_pb2.py是否正确：fromprotoimportzhiyan_rpc_pb2asproto_dot_zhiyan__rpc__pb2安装SDK从 pip 安装pip install -U zygrpc使用方法使用比如：from proto import zhiyan_rpc_pb2本地打包安装打包安装依赖包：pip install -U setuptools wheel运行：rm -rf build/ dist/ zygrpc.egg-info/ && python setup.py bdist_wheel在dist目录下会生成类似zygrpc-1.0.0-py3-none-any.whl的安装包。本地安装全局安装：sudo pip install -U dist/zygrpc-0.0.1-py3-none-any.whl用户目录安装：pip install --user -U dist/zygrpc-0.0.1-py3-none-any.whl卸载pip uninstall zygrpc
Package: zyh
介绍测试python环境！借助zyh这个库github repo:https://github.com/amanyara/zyh安装你可以使用pip install zyh来下载。（推荐，因为还会在你系统内安装同名的命令行工具）或者直接clone这个repo用法在当前文件夹下假如你使用pip的方式安装，只需要运行zyh即可
Package: zylo
ZyloZylo is a lightweight web framework made with love.FeaturesSimple and intuitive routingTemplate rendering using Jinja2Session management with the sessions libraryStatic file servingInstallationYou can install Zylo using pip:pipinstallzyloUsage# app.pyfromzylo.core.branchimportZyloapp=Zylo()@app.route('/')defhome(request):return'Hello, World!'if__name__=='__main__':app.run()changelogsBeta version 2.0.7Latest update of betaBug fixed with update --> 2.0.7Updated Usage Guide 1.2.2Newly designed system based on Matrix 1.0.0 MetapolistMajor Bug fixies in zyloNo longer support for version 1 beta --> # clearoutAttractive echosystem in zyloFreshly updated Mailer, Blueprint, Sessions, Chiper, JwT, BaseModals, ZyloStrict route has been removed in version --> 2.0.7Added battries support usign ZyloAdminUsage GuideOur team working hard and the usage guide will be avilable within 24hrs onhttp://zylo.vvfin.inorhttps://github.com/E491K8/ZyloProject/Batteries SupportInstallation of ZyloAdmin v1pipinstallzyloadminCreate zylo projectzyloadminstartproject-i{projectName}
Package: zylo-admin
Zylo-AdminZylo-Admin a battery startup for newly updated zylo v2.0.8Available scriptszylo-adminstartproject-i{projectname}zylo-adminmanageenginezylo-adminrunserver{projectname}zylo-admin --> Main module()zylo-admin startproject --> create wsgi project for zylo()zylo-admin startproject -i {projectname} --> -i denote project cells it set on 100.55 m/s by defaultzylo-admin manage engine --> manage for managing all the static and templating files & engine denote the default engine in settings.pyzylo-admin runserver {projectname} --> runserver to run the server in debug mode by default just passig the create wsgi folder name
Package: zylogger
zyloggerA logger that can be used directly without any config.buildpython setup.py sdist bdist_wheelupload to test_pypipython -m twine upload --verbose --repository testpypi dist/*upload to pypipython -m twine uploadusageinstallpip install zyloggerusageimport logging

import zylogger

zylogger.init()

logging.info('hello zylogger')
Package: zymbit-trequests
A Tornado async HTTP/HTTPS client adapter for python-requests.The problemYou enjoy usingTornadoto build fast non-blocking web applications, and you want to use a library from PyPI that makes a few HTTP requests, but pretty much every dev and their dog usesRequeststo make HTTP requests (rightly so, because it’sawesome), but requests has no knowledge of the event loop nor can it yield when a socket blocks, which means any time you try to use a library like that it begins to block your request handling and grud-knows what other worlds of pain.The solutionLuckily there are solutions, one such is to use thegreenletmodule to wrap blocking operations and swap Tornado coroutines at the right time, there is even the handytornaletmodule which handles this for you.To make life even easier, you lucky lucky people, I’ve createdtrequests, an async Requests adapter which uses greenlets (via tornalet) and the inbuilt non-blocking HTTP client methos in Tornado, to make any call to a library (utilizing Requests) non-blocking.Installation$pipinstalltrequestsUsage# Assume bobs_big_data uses python-requests for HTTP requestsimportbobs_big_datafromtornado.webimportRequestHandlerfromtrequestsimportsetup_sessionfromtornaletimporttornalet# Tell requests to use our AsyncHTTPadapter for the default# session instance, you can also pass you own throughsetup_session()classWebHandler(RequestHandler):@tornaletdefget(self):data={'foo':'bar'}# This will now unblock the current coroutine, like magicresponse=bobs_big_data.BigData(data).post()returnself.write(response)TestsTo run the basic testsuite hit uppython setup.py test.Caveatstrequestshas been used in production in a large scale metrics application, and is a very small and quite simple module.HoweverI’ve released it as0.9.xmainly because it’s missing 100% compatibility with the Requests adapter API, most noticeablycookie jarandsessionsupport, which I will improve (or please send me a pull request if you fancy adding support), and release as a1.xbranch when I have the time.Also at the moment thesetup_sessionutility actually monkey patches thesessionutility functions in Requests, as this was the only way I could see to override the mounts on “default” session instances (e.g. those created for every call when a session isn’t provided). I’m hoping to change this in the future.
Package: zymbitwalletsdk
Zymbit Wallet Python SDKOverviewEthereum accounts, signatures, and transactions have an additional layer of complexity over traditional cryptographic keys and signatures. The Zymbit Wallet SDK aims to abstract away this complexity, enabling you to create and manage multiple blockchain wallets and seamlessly integrate with various blockchains without having to deal with their technical intricacies.The first iteration of the SDK encapsulates all wallet creation, management, and use (sending transactions and interacting with dApps) capabilities for Ethereum and EVM compatible chains.If you are a developer interested in creating your own custom implementations of Accounts and/or Keyrings to work with ZymbitKeyringManager, you should further explore this repository. By extending the Account andKeyring Abstract Base Classes (ABCs), you can implement the required methods and any additional functionality as needed. The elliptic curves we support (secp256k1, secp256r1, and ed25519) are used by many major blockchains, including Bitcoin, Ethereum, Cardano, Solana, and Polkadot. Developing your own keyrings can be incredibly beneficial for a wide range of applications, such as key management or on-chain interactions like sending transactions or interacting with smart contracts.NOTE:Only compatible withHSM6,SCM, andSENInstallationpip install zymbitwalletsdkDocumentation:Zymbit Wallet Python SDK Documentation
Package: zymod
libzymod-python智眼Python SDK单元测试基于test文件夹中的\\__init__.py->load_tests自动发现：python -m unittest tests安装SDK从 pip 安装pip install -U zymod使用方法使用比如：from zymod import upload本地打包安装打包安装依赖包：pip install -U setuptools wheel生成 requirements.txt：python zy_env_marker.py运行：rm -rf build/ dist/ zymod.egg-info/ && python setup.py bdist_wheel在dist目录下会生成类似zymod-1.0.0-py3-none-any.whl的安装包。本地安装全局安装：sudo pip install -U dist/zymod-*-py3-none-any.whl用户目录安装：pip install --user -U dist/zymod-*-py3-none-any.whl卸载pip uninstall zymod上传至PyPI配置文件~/.pypirc[distutils]
index-servers=
    pypi

[pypi]
username: 
password:安装上传工具pip install -U twine上传twine upload dist/*如果使用国内镜像源，需要等一两天国内服务器才会同步官方源。可以临时指定官方源安装：python3 -m pip install -i https://pypi.org/simple/ example-pkg
Package: zymp
Zymp is a Python library to design “restriction site arrays”, which are
compact sequences with many restriction sites.For instance here is a 159-nucleotide sequence made with Zymp, with 49 enzyme
recognition sites (out of 52 provided). That’s a frequency of around
3 nucleotides per site:InfosPIP installation:pipinstallzympGithub Page:https://github.com/Edinburgh-Genome-Foundry/zympLicense:MIT, Copyright Edinburgh Genome FoundryMore biology softwareZymp is part of theEGF Codonssynthetic biology software suite for DNA design, manufacturing and validation.
Package: zymptest
MIT LicenseCopyright (c) 2018 The Python Packaging AuthorityPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: zyncify
zynczync is a utility tool for python operations.INSTALLATIONpipinstallzyncifyUsage1. IMPORTfromzyncimport*2. FUNCTIONSloggerlogger takes in a string and logs it with an INFO level.fromzyncimportlogger# logging a string INFOlogger("info message")# logging a variable INFOmessage="info message"logger(message)#### returns: INFO info messagebuggerbugger takes in a string and logs it with a DEBUG level.fromzyncimportbugger# logging a string DEBUGbugger("debug message")# logging a variable DEBUGmessage="debug message"bugger(message)#### returns: DEBUG debug messageweggerwegger takes in a string and logs it with an ERROR level.fromzyncimportwegger# logging a string ERRORwegger("error message")# logging a variable ERRORmessage="error message"wegger(message)#### returns: ERROR debug messageSluggerSlugger converts a string to slug while maintaining capitalization.fromzyncimportSlugger# Slugging a string with CapsSlugger("Test String")# Slugging a variable with capsstring="Test String"Slugger(string)#### returns: Test-Stringsluggerslugger converts a string to a slug with no capitalization.fromzyncimportslugger# Slugging a string without Capsslugger("Test String")# Slugging a variable without capsstring="Test String"slugger(string)#### returns: test-string3. TAIL LOG FILEtail-f./.zync.logAuthorTJ Bredemeyertwitter: @tjbredemeyer
Package: zyne
Zyne: Python MVC Web FrameworkZyne is a Python MVC web framework built for agility.It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.InstallationpipinstallzyneHow to use itBasic usage:fromzyne.apiimportAPIapp=API()@app.route("/home")defhome(request,response):response.text="Hello from the HOME page"@app.route("/hello/{name}")defgreeting(request,response,name):response.text=f"Hello,{name}"@app.route("/book")classBooksResource:defget(self,req,resp):resp.text="Books Page"defpost(self,req,resp):resp.text="Endpoint to create a book"@app.route("/template")deftemplate_handler(req,resp):resp.body=app.template("index.html",context={"name":"Zyne","title":"A MVC Web Framework"}).encode()Unit TestsThe recommended way of writing unit tests is withpytest. There are two built in fixtures
that you may want to use when writing unit tests with Zyne. The first one isappwhich is an instance of the mainAPIclass:deftest_route_overlap_throws_exception(app):@app.route("/")defhome(req,resp):resp.text="Welcome Home."withpytest.raises(AssertionError):@app.route("/")defhome2(req,resp):resp.text="Welcome Home2."The other one isclientthat you can use to send HTTP requests to your handlers. It is based on the famousrequestsand it should feel very familiar:deftest_parameterized_route(app,client):@app.route("/{name}")defhello(req,resp,name):resp.text=f"hey{name}"assertclient.get("http://testserver/matthew").text=="hey matthew"TemplatesThe default folder for templates istemplates. You can change it when initializing the mainAPI()class:app=API(templates_dir="templates_dir_name")Then you can use HTML files in that folder like so in a handler:@app.route("/show/template")defhandler_with_template(req,resp):resp.html=app.template("example.html",context={"title":"Awesome Framework","body":"welcome to the future!"})Static FilesJust like templates, the default folder for static files isstaticand you can override it:app=API(static_dir="static_dir_name")Then you can use the files inside this folder in HTML files:<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>{{title}}</title><linkhref="/static/main.css"rel="stylesheet"type="text/css"></head><body><h1>{{body}}</h1><p>This is a paragraph</p></body></html>MiddlewareYou can create custom middleware classes by inheriting from thezyne.middleware.Middlewareclass and overriding its two methods
that are called before and after each request:fromzyne.apiimportAPIfromzyne.middlewareimportMiddlewareapp=API()classSimpleCustomMiddleware(Middleware):defprocess_request(self,req):print("Before dispatch",req.url)defprocess_response(self,req,res):print("After dispatch",req.url)app.add_middleware(SimpleCustomMiddleware)
Package: zype
zype-python 0.2.0A simple wrapper around Zype API inspired by SoundCloud APIclient.InstallationRun:pip install zypeTo use:from zype import Zype
client = Zype(api_key="<YOUR API KEY>")ExamplesTo get all videos available on your account, you can do:from zype import Zype
client = Zype(api_key="<YOUR API KEY>")
videos = client.get('videos')
if videos is not None:
    for v in videos:
        print v.title
Package: zyppnotify
NotifySending mails and teams messages in a smart way. This project makes it easy to send basic messages through Teams or Email.Installationpip install zyppnotifyNotify MailWhen using theNotifyMailclass, the environment variablesEMAIL_USER(mailadress you want to mail with),MAIL_TENANT_ID,MAIL_CLIENT_IDandMAIL_CLIENT_SECRET(3x App registration credentials with User.Read.All permission with admin consent to authenticate to MS Graph) need to be set.
The initialization of this class will return an error if one of thes variables is not set.fromnotifyimportNotifyMail,NotifyTeams# versturen van een basis bericht met onderwerp en tekstmail=NotifyMail(to="reveiver@domain.com",subject="Notify me!",message="This is a test message, send through the notify package")mail.send_email()Notify TeamsfromnotifyimportNotifyTeamsfromnotify.testsimportimport_sample_dfswebhook=("REPLACE_ME")teams=NotifyTeams(webhook=webhook)# versturen van een basis bericht met onderwerp en tekstteams.basic_message(title="Notify me!",message="This is a test message, send through the notify package")# versturen van een uitgebreid rapport over dataframes.dfs=import_sample_dfs()teams.basic_message(title="Notify me!",message="This is optional",buttons={"button_name":"https://www.my_link.nl"},dfs=dfs)#  creates a report on the dataframes processed.Notify utilsfromnotifyimportformat_numbers,dataframe_to_htmlfromnotify.testsimportimport_sample_dfsdf=import_sample_dfs().get("Transactions")# format numbers and currencies using dutch localedf=format_numbers(df,currency_columns=["amount"],number_columns=[])html_table=dataframe_to_html(df)