Saravanan666/pypi-org huggingface dataset:
Package: ztree2python
ztree2pythonztree2python imports a data file created by z-Tree (Fischbacher, 2007) into python as pandas dataframes.
This function inputs the "filename" of a z-Tree data file, and it returns a dictionary, which contains the dataframes of the tables.
The keys are the names of all tables, "globals", "subjects", and so on. The value associated with each key is a pandas dataframe for the table.InstallationUse the package managerpipto install.pipinstallztree2pythonAlternatively, simply put ztree2python.py and a z-Tree data file (e.g., 221215_1449.xls) in the current directory or the working directory.UsageThe ztree2python is a simple function that takes the filename of a z-Tree data file as the argument and returns a dictionary that contains all of the tables in the z-Tree data file.fromztree2pythonimportztree2pythonasz2p# input the file name, and it returns a dictionary.tables=z2p('221215_1449.xls')The function returns a dictionary. Each table is stored as a dataframe in thetables. Get the data of a table as follows:# Extract a table by name, for example, the "subjects" table.my_table=tables['subjects']my_table.head()See all of the tables intablesas follows:# The dictionary also contains a series of table names. See the list.tables['list_tables']# Display all of the tables.fromIPython.displayimportdisplayforname,tblintables.items():display(tbl)Technical notesThe function reads the data and iterates the following process over the names of the tables. It filters the rows of the main dataframe to only include rows that belong to the current table. Then it processes the data for each treatment within the table and creates a dataframe for each treatment.
If the period is repeated in the treatment, the data for the treatment has a header row with variable names inserted each period. This function assumes that these header rows are the same within the treatment and reads the top header row as the variable names, then removes all header rows afterwards. All data will be converted to numeric, if possible. Finally, the table for the current treatment is added to the dataframe for the current table.After all the tables have been processed, the function returns the dictionary of dataframes.LicenseMIT. ztree2python is "provided "as is", without warranty of any kind."ReferenceFischbacher, U. (2007). z-Tree: Zurich toolbox for ready-made economic experiments.Experimental Economics, 10(2), 171-178.https://doi.org/10.1007/s10683-006-9159-4.Takeuchi, Kan. (2022). ztree2python.py,http://github.com/takekan/ztree2python.Takeuchi, K. (2022). ztree2stata: A data converter for z-Tree and Stata users.I would appreciate it if you kindly mention to this code in a footnote or somewhere.Enjoy!
Package: ztshare
Target Usersfinancial market analyst of Chinalearners of financial data analysis with pandas/NumPypeople who are interested in China financial dataInstallationpip install ztshareUpgradepip install ztshare –upgradeQuick Startimport ztshare as zs
zs.set_app(app_id='your appId', app_secret='your appSecret')
zs.pro_bar(zcode='000001.SH', start_date='20210621', end_date='20210621')return:date       high       amount          vol        low  adj      close       open
20210506  3471.2400  400525169.6  310424192.0  3426.8487  1.0  3441.2826  3446.0743
20210507  3457.8924  411078841.6  353785389.0  3416.7755  1.0  3418.8741  3446.4070
20210510  3429.7359  399717549.0  374170884.0  3401.9346  1.0  3427.9909  3423.5900
20210511  3448.0959  390326273.8  350934112.0  3384.6966  1.0  3441.8454  3406.5980
20210512  3466.3708  343860406.4  311444547.0  3428.3944  1.0  3462.7513  3429.7544
20210513  3448.0169  356376917.8  319325327.0  3418.3846  1.0  3429.5361  3432.1380
20210514  3490.6437  411116942.8  336982309.0  3422.5649  1.0  3490.3762  3436.0919
20210517  3530.5055  424476783.4  322135969.0  3490.1438  1.0  3517.6158  3490.4091
20210518  3529.0144  336028774.7  271308558.0  3510.8620  1.0  3529.0144  3520.6488
20210519  3521.1100  349973152.3  278321117.0  3503.8151  1.0  3510.9647  3521.1100
20210520  3517.7400  390355321.5  326009333.0  3486.0662  1.0  3506.9444  3500.8773
20210521  3518.3769  356025931.3  283826285.0  3479.6744  1.0  3486.5569  3510.8353
20210524  3498.3037  367181627.9  289509242.0  3469.8746  1.0  3497.2821  3486.2711
20210525  3584.5774  472213531.4  341241127.0  3502.4429  1.0  3581.3418  3502.5390
20210526  3603.4881  455831256.7  341980288.0  3585.3700  1.0  3593.3570  3586.8388
20210527  3626.3584  429004239.3  309551486.0  3579.2600  1.0  3608.8507  3585.7337
20210528  3622.1800  452445032.0  349208830.0  3582.3580  1.0  3600.7844  3610.7668
20210531  3615.6568  449694381.0  331523770.0  3580.6524  1.0  3615.4773  3600.0700
20210601  3626.0737  471663104.8  352811413.0  3581.9115  1.0  3624.7138  3608.5978
Package: zttt
Tic Tac Toe is a famous game in which two players take turns placing
a mark on a 3x3 grid. The first player to get three in a row wins.The module is a standalone implementation of the game TicTacToe
providing functionality to keep track of the game’s state and to
make moves.FeaturesStandalone implementation of the game Tic Tac Toe.Provides a way to customisemove triggersand access state variables.Comes with an engine with near perfect moves.Written in Python from scratch and does not require any external libraries.Can be integrated into a larger project, with very little effort.Throws custom-built errors making it easy to debug and handle errors.LinksPyPIGitHubDocumentationExamplesInstallationpipinstallzttt
Package: zubr-temp
Zubr exchange SDKSimple exampleimportloggingfrompprintimportpprintfromzubrimportZubrSDK,OrderType,TimeInForcezubr_sdk=ZubrSDK(api_key='YOUR-API-KEY-HERE',api_secret='YOUR-API-SECRET-HERE',)logging.basicConfig(level=logging.INFO)context={'order_placed':False,'sell_price':'0',}defsell_and_cancel(message):print(f'order placed:{message}')order_id=message['result']['value']# Cancel orderzubr_sdk.cancel_order(order_id=order_id,callback=lambdax:(print(f'Order cancelled:{x}')),)defsell_and_replace(message):print(f'order placed:{message}')order_id=message['result']['value']# Replace orderzubr_sdk.replace_order(order_id=order_id,price=context['sell_price'],size=2,callback=lambdax:(print(f'Order replaced:{x}')),)# Fetch orderbook@zubr_sdk.subscribe_orderbookdefon_orderbook(message):print('orderbook:')pprint(message)ifcontext['order_placed']:returninstrument_id,orders=list(message['value'].items())[0]sell_price=max(x['price']forxinorders['asks'])context['sell_price']=sell_price# Place and replacezubr_sdk.sell(instrument_id=instrument_id,price=sell_price,size=1,order_type=OrderType.LIMIT,time_in_force=TimeInForce.GTC,callback=sell_and_replace,)# Place and cancelzubr_sdk.sell(instrument_id=instrument_id,price=sell_price,size=1,order_type=OrderType.LIMIT,time_in_force=TimeInForce.GTC,callback=sell_and_cancel,)context['order_placed']=True# Fetch last trades@zubr_sdk.subscribe_last_tradesdefon_last_trades(message):print('last trades:')pprint(message)zubr_sdk.run_forever()
Package: zucchini
ZucchiniZucchini is an automatic grader tool for use in grading programming assignments.Free software: Apache Software License 2.0Documentation:https://zucchini.readthedocs.io.Installation$ pip install --user zucchini
$ zucc --helpGetting Started with DevelopmentAfter cloning this repo and installing virtualenv, run$ virtualenv -p python3 venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ pip install -r requirements_dev.txt
$ zucc --helpFeaturesUnified grading infrastructure: eliminates maintenance load of ad-hoc
per-assignment gradersSeparates test results from computed grades: graders provide test
results which are stored on disk, and then zucchini calculates grade
based on the weight of each test. That is, graders do not perform
grade calculation; they only gather information about students’ workSimple configuration: update one YAML file and store your graders in
git repositories for all your TAsRelative weighting: no more twiddling with weights to get them to add
up to 100Import submissions from Gradescope, Canvas Assignments, or Canvas
QuizzesNo more copy-and-pasting grades and commments: automated upload of
Canvas grades and gradelogsFlatten (extract) archived submissionsGradescope integration: generate a Gradescope autograder tarball for
an assignment with one commandCreditsAustin Adams (@ausbin) for creating lc3grade, which eventually became
zucchiniCem Gokmen (@skyman) for suggesting converting lc3grade into a
generalized autograder for more than just C and LC-3 homeworks, and
creating the initial structure of zucchiniPatrick Tam (@pjztam) for implementing a bunch of graders, gradelogs,
and gradelog uploadKexin Zhang (@kexin-zhang) for exploring Canvas bulk submission
downloads and for creating the demo downloader, which changed our
livesTravis Adams (@travis-adams) for nothingHistory0.1.0 (2017-12-17)First release on PyPI.
Package: zucker
ZuckerZucker is a Python library forSugar CRMwith a simple, readable API. Features:No dependencies (except for an HTTP client of your choice)Native support for both synchronous andasyncioparadigmsSchema introspection that extracts supported fields from a Sugar server to
speed up developmentORM-like feel that abstracts away details of the upstream APIFully type-checked (internal and external code)To get started, have a look at theDocumentation. If
you find that something is missing, feel free to open an issue.What does it look like?First, connect to a Sugar server. Then you can define a model that matches what
you have on the backend (use theintrospection featuresto speed up this
process!):fromzuckerimportmodel,RequestsClientcrm=RequestsClient("https://crm.example.com","zucker","password")classContact(model.SyncModule,client=crm,api_name="Contacts"):lead_source=model.StringField()phone_work=model.StringField()contacts=Contact.find(Contact.lead_source=="Word of mouth")forcontactincontacts:print(contact.phone_work)print(",".join(contact.phone_workforcontactincontacts[:3]))Again, see theDocumentationfor
more examples.IntrospectionZucker also supports introspecting a server, which will list the available modules and fields.
Use it like this:$python-mzucker.codegen-b"https://crm.example.com"-u"username"-c"my_client"-PinspectSeepython -m zucker.codegen --helpfor detailed usage information.LicenseMIT
Package: zuckup
zuckup ======simple facebook parsingInstallpip install zuckupTestRequiresnosenosetestsUsagezuckupcomes with three utilities:insights,page, andpage_statsInsightsNOTE: To get facebook insights data you must first have an access
token that has necessary credentials to view this data.importzuckupforpost_statsinzuckup.insights(page_id='authenticated_page'):printpost_statsPage Postsimportzuckupforpostinzuckup.page(page_id='nytimes')printpostPage Statsimportzuckuppage_stats=zuckup.page_stats(page_id='nytimes')printpage_statsAuthenticationzuckupwill automatically connect to the facebook api viafacepyif you haveFB_APP_IDandFB_APP_SECRETset as environmental
variables.Alternatively, you can connect beforehand and pass in this connection
via the kwargconn:importzuckupconn=zuckup.connect(app_id='12345',app_secret='678910')page_stats=zuckup.page_stats(page_id='nytimes',conn=conn)printpage_statsFinally, if you want to connect with just an access token, say one
acquired from a user authenticating to your app, pass inaccess_tokento any of the methods:importzuckuppage_stats=zuckup.page_stats(page_id='nytimes',access_token='a-users-access-token')printpage_statsPaginationpaginate through results usingpaginatewithinsightsandpage:for post in zuckup.page(page_id='nytimes', paginate=True)
  print postConcurrencyoptional concurrency forinsightsandpageviagevent:import zuckup

for post in zuckup.page(page_id='nytimes', concurrent=True)
  print post
Package: zuel-test
jieba“结巴”中文分词：做最好的 Python 中文分词组件“Jieba” (Chinese for “to stutter”) Chinese text segmentation: built to
be the best Python Chinese word segmentation module.完整文档见README.mdGitHub:https://github.com/fxsjy/jieba特点支持三种分词模式：精确模式，试图将句子最精确地切开，适合文本分析；全模式，把句子中所有的可以成词的词语都扫描出来,
速度非常快，但是不能解决歧义；搜索引擎模式，在精确模式的基础上，对长词再次切分，提高召回率，适合用于搜索引擎分词。支持繁体分词支持自定义词典MIT 授权协议在线演示：http://jiebademo.ap01.aws.af.cm/安装说明代码对 Python 2/3 均兼容全自动安装：easy_install jieba或者pip install jieba/pip3 install jieba半自动安装：先下载https://pypi.python.org/pypi/jieba/，解压后运行
python setup.py install手动安装：将 jieba 目录放置于当前目录或者 site-packages 目录通过import jieba来引用
Package: zuice
importzuiceclassBlogPostLister(zuice.Base):_fetcher=zuice.dependency(BlogPostFetcher)defall(self):return", ".join(post.nameforpostinself._fetcher.fetch_all())bindings=zuice.Bindings()bindings.bind(BlogPostFetcher).to_instance(blog_post_fetcher)injector=zuice.Injector(bindings)assertinjector.get(BlogPostFetcher)isblog_post_fetcherinjector.get(BlogPostLister)# constructs BlogPostLister using the bound instance of BlogPostFetcher
Package: zuid
zuidGenerates URL-safe random ids with a prefix and optional timestamp.Installingpip install zuidUsageTheZUIDclass works as a callable id factory for a given prefix:>>> from zuid import ZUID
>>> generator = ZUID(prefix='user_')
>>> generator()
'user_03QewpfEIpPWUICXdgtvdR'
>>> generator()
'user_1LJSXMoyH6p7VsiL8wwIm1'The factory generates ids that are 22 chars long by default, which in
base 62 corresponds to 131 random bits. For comparison, a v4 UUID has
122 random bits. It can be changed with thelengthparameter:>>> generator = ZUID(prefix='user_', length=27)
>>> generator()
'user_X5fSIStIKpYWcg07nqEfPbMvmME'With thetimestampedparameter, the factory uses the current nanoseconds since epoch as the first 8 bytes, preserving the order when sorting by id.>>> generator = ZUID(prefix='user_', timestamped=True)
>>> generator()
'user_1qzuvBwgHdQVO2gA4GelYX'
>>> generator()
'user_1qzuvCscVyClzGaqakgvsl'
>>> generator()
'user_1qzuvDb0TuCuIJJON103Of'
>>> generator()
'user_1qzuvES4mTQ7fWykywvjNb
Package: zula
zuladead simple key-value and in-memory database built uponjsonpackage.Install$ pip install zulaRequirementsPython 2.6, 2.7, 3.5, 3.6+DocumentationCommands>>>importzula>>>db=zula.load('samsun.db')>>>db.set('key','value')>>>db.get('key')'value'>>>db.drop('key')True>>>db.get_keys()set(['key1','key2'])>>>db.dump()True
Package: zulipbot
The unofficial Python API for Zulip bots. A Zulip email and API key are needed to use this.To get your bot’s Zulip email and API key, go to
your Settings page and scroll down to the Your Bots section.UsageTo install:pip install zulipbotInitializationIdentify your Zulip bot’s email and API key, and make a new Bot object.>>>importzulipbot>>>email='foo@bar.baz'>>>key='spammyeggs'>>>my_bot=zulipbot.Bot(email,key)Bot MethodsFor an example on how the below methods work together in a program, check outexample.py.subscribe_to_all_streams- Subscribes to all Zulip streams.send_private_messageandsend_stream_messageboth have the same parameters:message_infoandcontent, i.e. the function signature for the two aforementioned methods issend_[[private||stream]]_message(message_info,content).message_infois the message meta-info dictionary that you acquire from the function callback that processes messages.contentis the response that you want your bot to make.
Package: zulip-bots
Zulip botsThis directory contains the source code for thezulip_botsPyPI package.The Zulip documentation has guides onusing Zulip's bot systemandwriting your own bots.Directory structurezulip_bots# This directory├───zulip_bots# `zulip_bots` package.│├───bots/# Actively maintained and tested bots.│├───game_handler.py# Handles game-related bots.│├───lib.py# Backbone of run.py│├───provision.py# Creates a development environment.│├───run.py# Used to run bots.│├───simple_lib.py# Used for terminal testing.│├───test_lib.py# Backbone for bot unit tests.│├───test_run.py# Unit tests for run.py│└───bot_shell.py# Used to test bots in the command line.└───setup.py# Script for packaging.
Package: zulip-botserver
zulip-botserver --config-file <path to botserverrc> --hostname <address> --port <port>Example:zulip-botserver --config-file ~/botserverrcThis program loads the bot configurations from the
config file (botserverrc, here) and loads the bot modules.
It then starts the server and fetches the requests to the
above loaded modules and returns the success/failure result.The--hostnameand--portarguments are optional, and default to
127.0.0.1 and 5002 respectively.The format for a configuration file is:[helloworld]
key=value
email=helloworld-bot@zulip.com
site=http://localhost
token=abcd1234Is passed--use-env-varsinstead of--config-file, the
configuration can instead be provided via theZULIP_BOTSERVER_CONFIGenvironment variable.  This should be a JSON-formatted dictionary of
bot names to dictionary of their configuration; for example:ZULIP_BOTSERVER_CONFIG='{"helloworld":{"email":"helloworld-bot@zulip.com","key":"value","site":"http://localhost","token":"abcd1234"}}' \
  zulip-botserver --use-env-vars
Package: zulip-doc
Zulip Duty of Care ServiceA small script to check user presence in Zulip. If a user hasn't been around for a while it will send you a message in Zulip so you can check up on them and see if they are ok.Installpipx install zulip-docUsageUsage: zdoc [OPTIONS] [SEND_TO]...

Arguments:
  [SEND_TO]...

Options:
  --max-idle INTEGER              [env var: MAX_IDLE; default: 86400]
  --ignore-weekends / --no-ignore-weekends
                                  [env var: IGNORE_WEEKENDS; default: ignore-
                                  weekends]
  --config-file FILE              [env var: CONFIG_FILE; default:
                                  /home/{username}/.zuliprc]
  --help                          Show this message and exit.Example:zdoc 12 22Cron Job Setupcrontab -eThen add something like:0 12 * * * /home/paul/.local/bin/zdoc --config-file /home/paul/.zuliprc 12 22runs everyday at noon
Package: zulip-emoji-mapping
Zulip emoji mappingGet emojis by Zulip namesExample>>>fromzulip_emoji_mappingimportZulipEmojiMapping>>>print(ZulipEmojiMapping.get_emoji_name("🙂"))smile>>>print(ZulipEmojiMapping.get_emoji_by_name("smile"))🙂>>>print(ZulipEmojiMapping.get_emoji_by_name("cat"))🐈
Package: zun
Team and repository tagsZunOpenStack Containers serviceZun (ex. Higgins) is the OpenStack Containers service. It aims to provide an
API service for running application containers without the need to manage
servers or clusters.Free software: Apache licenseGet Started:https://docs.openstack.org/zun/latest/contributor/quickstart.htmlDocumentation:https://docs.openstack.org/zun/latest/Source:https://opendev.org/openstack/zunBugs:https://bugs.launchpad.net/zunBlueprints:https://blueprints.launchpad.net/zunREST Client:https://opendev.org/openstack/python-zunclientFeaturesTODO
Package: zunda-python
Zunda PythonZunda: Japanese Enhanced Modality Analyzer client for Python.Zunda is an extended modality analyzer for Japanese.
For details about Zunda, Seehttps://jmizuno.github.io/zunda/(Written in Japanese)this module requires installing Zunda, which is available at (https://github.com/jmizuno/zunda/releases), CaboCha (https://taku910.github.io/cabocha/), and MeCab (http://taku910.github.io/mecab/).Contributions are welcome!Installation# Install Zunda
wget https://github.com/jmizuno/zunda/archive/2.0b4.tar.gz
tar xzf zunda-2.0b4.tar.gz
rm zunda-2.0b4.tar.gz
cd zunda-2.0b4
./configure
make
sudo make install
cd ../
rm -rf zunda-2.0b4

# Install zunda-python
pip install zunda-pythonExampleimportzundaparser=zunda.Parser()parser.parse('花子は太郎を食事に誘った裕子が嫌いだった')# => [{'assumptional': '0','authenticity':'成立','chunks':[{'func':'に','head':'食事','link_from':[],'link_to':3,'score':1.883877,'words':[{'feature':'名詞,サ変接続,*,*,*,*,食事,ショクジ,ショクジ','funcexp':'O','surface':'食事'},{'feature':'助詞,格助詞,一般,*,*,*,に,ニ,ニ','funcexp':'B:判断','surface':'に'}]}],'sentiment':'0','source':'筆者','tense':'非未来','type':'叙述','word':'食事','words':'食事に'},{'assumptional':'0','authenticity':'成立','chunks':[{'func':'を','head':'太郎','link_from':[],'link_to':3,'score':1.640671,'words':[{'feature':'名詞,固有名詞,地域,一般,*,*,太郎,タロウ,タロー','funcexp':'O','surface':'太郎'},{'feature':'助詞,格助詞,一般,*,*,*,を,ヲ,ヲ','funcexp':'O','surface':'を'}]},{'func':'に','head':'食事','link_from':[],'link_to':3,'score':1.883877,'words':[{'feature':'名詞,サ変接続,*,*,*,*,食事,ショクジ,ショクジ','funcexp':'O','surface':'食事'},{'feature':'助詞,格助詞,一般,*,*,*,に,ニ,ニ','funcexp':'B:判断','surface':'に'}]},{'func':'た','head':'誘っ','link_from':[1,2],'link_to':4,'score':1.565227,'words':[{'feature':'動詞,自立,*,*,五段・ワ行促音便,連用タ接続,誘う,サソッ,サソッ','funcexp':'O','surface':'誘っ'},{'feature':'助動詞,*,*,*,特殊・タ,基本形,た,タ,タ','funcexp':'B:完了','surface':'た'}]}],'sentiment':'0','source':'筆者','tense':'非未来','type':'叙述','word':'誘っ','words':'太郎を食事に誘った'},{'assumptional':'0','authenticity':'成立','chunks':[{'func':'は','head':'花子','link_from':[],'link_to':5,'score':-1.81792,'words':[{'feature':'名詞,固有名詞,人名,名,*,*,花子,ハナコ,ハナコ','funcexp':'O','surface':'花子'},{'feature':'助詞,係助詞,*,*,*,*,は,ハ,ワ','funcexp':'O','surface':'は'}]},{'func':'が','head':'裕子','link_from':[3],'link_to':5,'score':-1.81792,'words':[{'feature':'名詞,固有名詞,人名,名,*,*,裕子,ユウコ,ユーコ','funcexp':'O','surface':'裕子'},{'feature':'助詞,格助詞,一般,*,*,*,が,ガ,ガ','funcexp':'O','surface':'が'}]},{'func':'た','head':'嫌い','link_from':[0,4],'link_to':-1,'score':0.0,'words':[{'feature':'名詞,形容動詞語幹,*,*,*,*,嫌い,キライ,キライ','funcexp':'O','surface':'嫌い'},{'feature':'助動詞,*,*,*,特殊・ダ,連用タ接続,だ,ダッ,ダッ','funcexp':'B:判断','surface':'だっ'},{'feature':'助動詞,*,*,*,特殊・タ,基本形,た,タ,タ','funcexp':'B:完了','surface':'た'}]}],'sentiment':'0','source':'筆者','tense':'非未来','type':'叙述','word':'嫌い','words':'花子は裕子が嫌いだった'}]LICENSEMIT LicenseCopyrightZunda Python
(c) 2019- Yukino Ikegami. All Rights Reserved.Zunda (Original version)
(c) 2013- @jmizunoACKNOWLEDGEMENTThis module uses Zunda.
I thank to @jmizuno and Tohoku University Inui-Okazaki Lab.CHANGES0.1.3 (2019-11-30)bugfix for installation on conda (thanks @Kensuke-Mitsuzawa)0.1.2 (2019-02-24)First release.