Saravanan666/pypi-org huggingface dataset:
Package: wtsize
WTSizeOn the road with a limited data plan or bad network and want to know if it's safe to download a particular remote file? WTSize (what the size) is a small Python 3 CLI app which checks the size of remote files without downloading them (by looking at the Content-Length header).>>> wtsize https://site.tld/some_big_file.zip
822.24 MiBUsagewtsize URL
wtsize URL [--unit=MiB]
wtsize -h | --help
wtsize --versionInstallpip install wtsizeLimitationsNot all servers return a Content-Length header so you might be unable to get the actual file size without, well, downloading the file.wtsizewill tell you if that's the case.In some cases the Content-Length cannot be known before accessing the body (dynamic content)Headers can easily be spoofed. Generally, though, there's a good chance that the Content-Length header in the server response is accurate.
Package: wtslog
wtslogWay Too Simple LOGgerThis is a small package that literally just exports one class, theLogger,
that does one thing: Collect and / or print messages
potentially with indentation.Originally made because I wanted something simple formy adventofcode solutions,
then made into it's own package because I was tired of importing it like this:withopen("../../_common/logger.py","w")aslogger_module:exec(logger_module.read())LOGGER:Logger=Logger(OUTPUT_PATH)Thenpublished to PyPIso I can properly
install andimportit for usage.
Package: wtss
AboutWebTimeSeriesService (WTSS) is a lightweight web service for handling time series data from remote sensing imagery. Given a location and a time interval you can retrieve the according time series as a list of real values.In WTSS a coverage is a three dimensional array associate to spatial and temporal reference systems.WTSS is based on three operations:list_coverages: returns the list of all available coverages in the service.describe_coverage: returns the metadata of a given coverage.time_series: query the database for the list of values for a given location and time interval.If you want to know more about WTSS service, please, take a look at itsspecification.InstallationLinux, macOS, and Windows users can getwtssfrom thePython Package Indexwith a recent version ofpip:pip install wtssNoteIf you want to install the Matplotlib support, use the following command:pip install wtss[matplotlib]DocumentationSeehttps://wtss.readthedocs.io/en/latest/.ReferencesVINHAS, L.; QUEIROZ, G. R.; FERREIRA, K. R.; CÂMARA, G.Web Services for Big Earth Observation Data. Revista Brasileira de Cartografia, v. 69, n. 5, 18 maio 2017.LicenseCopyright (C) 2020-2021 INPE.Python Client Library for WTSS is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.ChangesVersion 0.7.0-3 (2021-03-29)Add the propertycommon_nameto thedescribe_coverageHTML representation:#63.Version 0.7.0-2 (2021-03-17)Addeddaccess tokento the client API:#57.Using Jinja 2 templates for Jupyter HTML output:#51.Using Drone:#54.Version 0.7.0-1 (2020-09-14)Improved integration with Jupyter Environment:#25.Improvedplotmethod forTimeSeries.Added Unit-tests.Fixed small typos in documentation.Version 0.7.0-0 (2020-09-11)Basic integration with Jupyter Environment and Matplotlib.Command Line Interface (CLI).Documentation system based on Sphinx.Documentation integrated toRead the Docs.Installation and build instructions.Package support through Setuptools.Installation and usage instructions.Travis CI support and PyPI deploy.Unit-test environment set.Source code versioning based onSemantic Versioning 2.0.0.License:MIT.
Package: wttch-train-helper
wttch 的 AI 训练工具包一、消息通知1.1 钉钉 webhook 通知钉钉 webhook 机器人APIfromwttch.train.notificationimportDingtalkNotification# 钉钉机器人 webhook 的链接webhook_url=''# 消息签名的密钥secret=''notification=DingtalkNotification(webhook_url,secret)# 发送文本通知notification.send_text("")# 发送markdownnotification.send_markdown('')1.2 企业微信 webhook 通知企业微信机器人APIfromwttch.train.notificationimportWechatNotification# 企业微信机器人 webhook 的链接webhook_url=''notification=WechatNotification(webhook_url)# 发送文本通知notification.send_text("")# 发送markdownnotification.send_markdown('')二、训练工具包2.1 缓存工具不需要修改太多代码就可以帮助你缓存数据到指定的缓存文件去。(1). 添加 cache_wrapper;
(2). 正常调用你的函数。fromwttch.train.utilsimportcache_wrapper# 缓存的文件名字前缀，函数的参数会被添加到该名字后面prefix='dataset'# 缓存的文件夹位置save_path='./dataset_cache'@cache_wrapper(prefix=prefix,save_path=save_path)defyou_load_dataset_function():return{'a':1,'b':2}you_load_dataset_function()2.2 计时器fromwttch.train.utilsimportStopWatchstopwatch=StopWatch()stopwatch.start("job 1")# 费时操作stopwatch.stop()stopwatch.start("job 2")# 费时操作stopwatch.stop()# 格式化打印stopwatch.display()2.3 进度条简单包装了tqdm工具。固定一种还不错的进度条格式。2.3.1 循环模式fromwttch.train.utils.progressimportProgresswithProgress(total=1000)asprogress:foriinrange(1000):# 在这里训练# 进度条末尾显示训练结果progress.train_result(loss=0.01,acc=0.02)2.3.2 迭代器模式fromwttch.train.utils.progressimportProgressdataset=[1,2,3]progress=Progress(dataset)fordatainprogress:# 使用 data 进行训练# 进度条末尾显示训练结果progress.train_result(loss=0.01,acc=0.02)三、torch 工具包3.1 训练设备获取3.1.1 获取设备先尝试获取 cuda, 如果不支持获取 mps(macOS), 还不支持就 cpu。可以添加device_no参数，但是只对 cuda 有效，表示 cuda 的序号。fromwttch.train.torch.utilsimporttry_gputry_gpu(device_no=2)3.1.2 ThreadLocal 的设备变量的设置、获取将使用的设备写入 thread local;需要训练设备的地方, 从 thread local 中获取设备数据;fromwttch.train.torch.utilsimporttry_gpu,get_device_local,set_device_local# 尝试获取 gpu 并写入 thread localset_device_local(try_gpu(device_no=0))# 从 thread local 读取设备device=get_device_local()3.2 ThreadLocal 的训练类型 dtype 的设置、获取将使用的 dtype 写入 thread local;需要训练类型的地方, 从 thread local 中获取设备数据;importtorchfromwttch.train.torch.utilsimportget_dtype_local,set_dtype_local# 将训练的 dtype 数据类型写入 thread localset_dtype_local(torch.float32)# 从 thread local 读取数据类型dtype=get_dtype_local()3.3 yml 多环境配置环境配置，使用 yml 文件。首先书写你的 yml 文件例如:active: local
  school-server:
  local:
    epochs: 10
    batch-size: 64
    dtype: float32
    cuda_no: 1
    dataset_path: /your/dataset/path
    your-property-key: your-propertyactive 必需标识启用的环境。
后续使用
key: 环境配置
的方式可以定义多个环境。获取你启用的环境的变量# 获取你的配置fromwttch.train.torchimportConfig# 定义配置config=Config()# 获取预定义的属性print(config.epochs)# 获取其他你自己的属性print(config['you-property-key'])
Package: wttime
wttime - A fuzzy time parserTired of figuring out what this timestamp means? Done with format strings?
Cannot be bothered to care about all the seconds, millis, and jiffies?You don't have to!wttimeis a fuzzy parser that can recover and
disambiguate virtually any time specification you can throw at it.Getting StartedInstallationpipinstallwttimeExamplesGuessing the most likely meaning:$wttime-t'America/Los_Angeles'20200101UTC:2020-01-0108:00:00(+0000)$wttime1231231233000000UTC:2009-01-0608:40:33(+0000)$wttime1231231233000UTC:2009-01-0608:40:33(+0000)$wttime'Tuesday 10pm'UTC:2020-05-2620:00:00(+0000)Variety of output formats:$wttime-l-r--remote-timezone'America/Chicago'-f'%Y-%m-%d %H:%M'-umy1231231233000000UTC:2009-01-0608:40
Local:2009-01-0609:40
Remote:2009-01-0602:40
Seconds:1231231233Millis:1231231233000Micros:1231231233000000$wttime-nx20200810-ns-y1597010400000000Helpwttime--helpTODOsget more data about format frequency in the wildfigure out how to get feedbackDevelopmentAdd pre-commit hooks:ln -sf $(pwd)/misc/hooks/pre-commit .git/hooksRun testspytestPublish to PyPIrm -rf sdist
python setup.py sdist
twine upload dist/*LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details.
Package: wtu
wtuIntroWTU gadgetSetuppipinstallwtuTokenTo active this script, you need to get the 'JWT' authorization from WeChat App,The token, expired after 7 days, you may replace and refresh it once a weekHealth Report#!/usr/bin/env python# -*- coding: utf-8 -*-fromwtuimporthealth_reportimportscheduleJWT=''jk=health_report.JKClient(JWT)defreport():jk.health_report('student_number')schedule.every().day.at("00:10").do(report)whileTrue:schedule.run_pending()time.sleep(180)
Package: wtypes
A extended trait and type system for python usingjsonschema.wtypesis an extended type and trait system for python.DocumentationPypiTestspipinstallwtypesfrom wtypes import *wtypesprovide:Extended type system python validation that feature ajsonschemaand symbollic type composition.Integer, Float, Dict, List, Email, Uri, Color, Datetime, RegexConfigurabledataclasses.class Thing(DataClass):
      name: String
      location: Uri|Jsonpointer

  class Thing(DataClass):
      name: String
      location: Uri|Jsonpointer
      
  Thing(name='wtypes', location='https://github.com/deathbeds/wtypes')Typed evented objects.class Thing(evented.DataClass):
      name: String
      location: Uri|Jsonpointer
      
  Thing(name='wtypes', location='https://github.com/deathbeds/wtypes')Generate examples of types withhypothesis_jsonschemaandgensonUri.example(), Datetime.example(), Dict[{'a': Email}].example()Mixed python andjsonschematypest = Instance[range] | Integer
  t(10), t(range(10))future workwill expand on semantic RDF type information.Backgroundwtypesis inspired bytraitlets- the core trait library used byIPythonandjupyter- andpydantic-  ajsonschematype system for python. Bothpydantic and traitletsbuild type systems that can be validated.pydanticlacks interactive validate, a feature oftraitlets.traitletsalso provides an observable pattern for evented objects. Bothpydantic and traitletstypes are represented as pythonobjects.wtypesincludes features from these libraries in a composabletypesystem.
Package: wubi
wubi======You do not need to modify your model when applied it to Chinese,you can translate chinese chars to wubi ,then you can process chinese chars like englishFor example if you want to use character-level neural network model in chinese chars, you will find it is beteer to translate them from chinese to wubi at first.当你处理汉语时,你不必修改你原来的模型。你可以将汉语翻译成五笔字型码。你就可以像处理英文一样的处理汉语了比如说,如果你想使用一个字符级神经网络模型处理中文,你会发现最好先将这些汉语翻译成五笔字符。重要提示------喜欢就star一下if you like it , please starInstall-------.. code:: bash$ pip install wubiShort introduce-----.. code:: python>>> import wubi>>> print wubi.get('WenChaoWang爱自由','cw')WenChaoWang ep thd mh>>> print wubi.get('WenChaoWang ep thd mh','wc')WenChaoWang爱自由>>> print wubi.get('WenChaoWang爱自由','cw','-')WenChaoWang-ep-thd-mh>>> print wubi.get('WenChaoWang-ep-thd-mh','wc','-')WenChaoWang爱自由>>> data = wubi.data## data = {'cw':{chinese:wubi,...}'wc':{wubi:chinese,...}}notice------you can add your own char->char by modify ./wubi/build_map.py.通过修改./wubi/build_map.py文件,你可以自行添加新的映射关系。//TODO when your chinese text within english the ' ' will be dropLong introduce------input:当前自然语言处理模型中单词级模型效果很好，但是由于英文单词天然由空格隔开，中文只有连续的字与标点，为了将各种单词级语言模型应用于中文，中文分词成了中文自然语言处理领域一个基础性研究。近来研究表明，在很多神经网络模型中，字符级语言模型效果也很好，而且从长远来看，由于字符级语言模型比单词级语言模型保留了更多的原始信息，随着神经网络模型的发展以及计算能力的提高，字符级语言模型的效果应该会更好。将每一个中文汉字当做一个字符输入字符级语言模型会导致很多问题，实验效果相对英文语料来说并不理想，经实，验先将中文汉字转化为五笔字型码，输入模型计算后再将五笔字型码转换回汉字直观效果与英文语料相近。本着分享的精神将这一想法供广大的中文自然语言处理的童鞋一起分享，同时将我自己写的小工具开源出来。output:iv ue thd qd ygk yyy th gj saj gajf k ujfj yngk xe saj gajf uqt js tve vb , wjg j mh gf amd yygy ujfj yngk gd qd mh pw st bgk ga , k yygy kw e lpk xfn r pb gn sfi hko , o b uqf tk tkh ujfj yngk xe ygk yyy saj gajf yid et gf k yygy , k yygy wv yngk dn b k yygy thd qd ygk yyy th gj wycm fakgk g wh ad dbm ntg dga pwv . rp go dga pwv ge je , d tve qq pyj x mqq xtk saj gajf k , pb twf xe ygk yyy saj gajf uqt js bn tve vb , dmjr eg ww ta fqp go rhf , mh gf pb twf xe ygk yyy saj gajf xx ujfj yngk xe ygk yyy saj gajf wk qyvl b gjq qq r dr vck wy thn , bde udh pyj x mqq xtk saj gajf r v nae c ey yf tha ce lt r rj ym , pb twf xe ygk yyy saj gajf r uqt js yid yynwr wf gjq vb . uqf txg g wh k yygy ic pb iv wdt g wh pb twf lwg ty pb twf xe ygk yyy saj gajf wf nf gcftm tve qq ukd jghmt , pu cwg uqt js sh cf amd yygy ygk ou go yu ua i gj shn , x pu , cwg tfq uqf k yygy ic pb lfn wx o gg tt pb gajf dcg , lwg ty saj gajf yf tha rg gmf uqf gg tt pb gajf dcg lfn rq lkd ic pb fh cm uqt js gn amd yygy ygk ou sh rp . sg udh wv ybf r oge pyj uqf p g shn if waw yygt dd r k yygy thd qd ygk yyy th gj r ujff afffi g fhn wv ybf , m jf uqf q thd nng pgn r ih a hw ga idr bm go .License-------`wubi` is free software, under an MIT-style license. See LICENSE for details.
Package: wud
wudwud utilities and helpersFeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.11(2021-05-17)remove json pickle0.1.4 (2021-05-17)More team names for football0.1.0 (2021-04-12)First release on PyPI.
Package: wudaoai
Example PackageThis is a simple example package. You can useGithub-flavored Markdownto write your content.https://zhuanlan.zhihu.com/p/79164800以这个链接为主日常操作：1、改内容2、务必提高版本号3、删除4个之外的文件夹4、打包项目   python3 setup.py sdist bdist_wheel5、上传  python3 -m twine upload dist/*6、pypi用户名：wangjianxing密码：Banana9002177、使用pypi源，pip3 install --upgrade wudaoai8、本地调用测试。
Package: wuddz-perms
Wuddz String/Mac Address Permutations/Combinations GeneratorDescriptionA Simple Script That Generates All/Non-Repeat Character Permutations/Combinations Of String Or Mac Addresses With Prefix/Suffix Partial AddressOf Note Uses Lazy Generators, Will Take Some Time To Generate Huge Lists But Won't Be Memory IntensiveHonestly Wrote This Quick Script As I Needed Some Of It's Implementation, Thought I'd Share.PrerequisitesPython : 3.7InstallationInstall usingPyPI:$ pip install wuddz-permsInstall locally by cloning or downloading and extracting the repo, then cd into 'dist' directory and execute:$ pip install wuddz_perms-1.0.1.tar.gzThen to run it, execute the following in the terminal:$ wudz-permsUsageGenerate All Lower, Upper & Punctuation 4 Character Length Combinations To Default "output.txt" File.$ wudz-perms -all -l 4Generate All Combinations Of String To Default "output.txt" File.$ wudz-perms -all -a wuddzdevsGenerate All Lower & Upper Case Permutations Of String To Default "output.txt" File.$ wudz-perms -upl -a pythondevGenerate All Non Repeat Character Permutations Of String To Default "output.txt" File.$ wudz-perms -nrc -a talentedGenerate Mac Addresses With Specified Prefix/Suffix To Default "output.txt" File.$ wudz-perms -mac -p 00:1a:65:ffContact Info:Email:wuddz_devs@protonmail.comGithub:https://github.com/wuddz-devsTelegram:https://t.me/wuddz_devsYoutube:https://youtube.com/@wuddz-devsReddit:https://reddit.com/user/wuddz-devsBuy Me A Coffee!!ERC20 Address: 0x1F1C47dD653Af628D394eac7bAA9Ccf774fd784fPeace & Love Always!!
Package: wuddz-pscan
Wuddz Port ScannerDescriptionAsynchronously Scan A Host(s)/Network(s)/IPRange(s) For Open TCP Ports, Using Specified Connection Timeout & Task Limit Amount.Cleaned Up An Old PortScanner I Wrote Some Time Ago, Thought I'd Share Even Though There Are A Multitude Of Them Around.PrerequisitesPython : 3.7InstallationInstall usingPyPI:$ pip install wuddz-pscanInstall locally by cloning or downloading and extracting the repo, then cd into 'dist' directory and execute:$ pip install wuddz_pscan-1.0.0.tar.gzThen to run it, execute the following in the terminal:$ wudz-pscanUsagePort Formats:80 | 1-443 | 25,80,445Host Formats:1.1.1.1 | 1.1.1.0/24 | 1.1.1.1-1.1.2.2 | 2.2.2.2,1.1.1.1Scan Host "1.1.1.1" For Ports "80,443" Using 200 Asynchronous Task Limit, 1second Timeout & Save Results To "output.txt".$ wudz-pscan -i 1.1.1.1 -p 80,443 -o output.txt -t 200 -m 1Scan All 65535 Ports On Both Hosts & Print Open Ports To Screen.$ wudz-pscan -i 1.1.1.1,2.2.2.2  ("Scans All 65535 Ports As Default")\n'Scan Host(s) In "hosts.txt" For Open Ports "80,445" & Print Results To Screen.$ wudz-pscan.py -i hosts.txt -p 80-445Contact Info:Email:wuddz_devs@protonmail.comGithub:https://github.com/wuddz-devsTelegram:https://t.me/wuddz_devsYoutube:https://youtube.com/@wuddz-devsReddit:https://reddit.com/user/wuddz-devsBuy Me A Coffee!!ERC20 Address: 0x1F1C47dD653Af628D394eac7bAA9Ccf774fd784fPeace & Love Always!!
Package: wuddz-pwd-generator
Wuddz Password GeneratorDescriptionA Simple Script That Prints A Generated Password To Console, Based On Specified CriteriaLong Story Short Currently Working On A Project, Needed Some Randomly Generated Strings, Since I Don't Do Anything Half-Assed Wrote This Script.PrerequisitesPython : 3.6InstallationInstall usingPyPI:$ pip install wuddz-pwd-generatorInstall locally by cloning or downloading and extracting the repo, then cd into 'dist' directory and execute:$ pip install wuddz_pwd_generator-1.0.0.tar.gzThen to run it, execute the following in the terminal:$ wudz-pwdUsagePrint 24 character password consisting of upper & lowercase letters and digits (default password type):$ wudz-pwd 24Print 24 character password consisting of upper & lower case letters, digits and special characters:$ wudz-pwd 24 ldsContact Info:Email:wuddz_devs@protonmail.comGithub:https://github.com/wuddz-devsTelegram:https://t.me/wuddz_devsYoutube:https://youtube.com/@wuddz-devsReddit:https://reddit.com/user/wuddz-devsBuy Me A Coffee!!ERC20 Address: 0x1F1C47dD653Af628D394eac7bAA9Ccf774fd784fPeace & Love Always!!
Package: wuddz-search-gui
Wuddz Search GuiA Python File/Folder Explorer GUI Application, Search, Open, Save, Copy, Move, Rename, Delete, Parse & Archive (Encryption Optional).DescriptionWuddz-Search-Gui Is An Update Of My Wuddz-Search Repository, As A More User Friendly & Eye Pleasing GUI Application.Search A Specific Folder/Entire OS Platform Root Folder For Files Containing Specified String And/Or File Extension.Parse Searched Files For A Preconfigured Regex Pattern Or Enter Specific Regex Pattern.Archive File(s) Or Folder(s) With Or Without Encryption, Using The Free & Open Source 7zip Software.Save Searched File List As Text In Specified Output Text File.Open Any File/Program On Your OS System With Adequate Permissions.PrerequisitesInstall Free Open Source 7zip Application7zipAdd 7zip To Os Path i.e if you type '7z' anywhere in terminal/cmd/powershell it will launch 7zip ApplicationPython : 3.7InstallationInstall usingPyPI:$ pip install wuddz-search-guiInstall locally by cloning or downloading and extracting the repo, then cd into 'dist' directory and execute:$ pip install wuddz_search_gui-1.0.4.tar.gzThen to run it, execute the following in the terminal:$ wudz-sguiUsageOnce Launched Follow Tooltips Provided.If You're Using Windows OS & Prefer Not To Install Python, Simply Download Latest Release, Extract & Run 'wudz-sgui.exe'You Can Create A Shortcut For 'wudz-sgui.exe' & Paste Anywhere To Launch Wuddz-Search-Gui With 1 Click.If You Prefer A Quicker, More Condensed Way To Search, Archive & Parse Files On Your OS, Then Look No Further.Execute OS Platform Tasks With Consumate Ease & Efficiency, Using This Cool Python Coded Application.It's Just An Awesome Way Of Doing Everyday OS Platform Tasks In A Much Quicker & Efficient Manner.To Close Opened Windows Simply Hit "Esc" Or "Ctrl+Q" To Close The Program.Contact Info:Email:wuddz_devs@protonmail.comGithub:https://github.com/wuddz-devsReddit:https://reddit.com/user/wuddz-devsTelegram:https://t.me/wuddz_devsYoutube:https://youtube.com/@wuddz-devsVideo:https://youtu.be/GTvM5_gxhsk(Edited No Restrictions)If You're Feeling Generous & Appreciative, Buy Me A CoffeeERC20: 0x1F1C47dD653Af628D394eac7bAA9Ccf774fd784fPeace & Love Always!!
Package: wudi
Info====`zprint 2018-08-20``Author: Zhao Mingming <471106585@qq.com>``Copyright: This module has been placed in the public domain.``version:0.0.1`- `add func login_vipkid`- `add func get_video_url`- `add func get_video_index`Functions:- `add func login_vipkid`- `add func get_video_url`- `add func get_video_index: get the video when the teacher and student has video same time`How To Use This Module======================.. image:: funny.gif:height: 100px:width: 100px:alt: funny cat picture:align: center1. example code:.. code:: pythonfrom  zprint  import *def fun2():zprint(" I am in fun2",0)def fun1():zprint(" I am in fun1")fun2()if __name__=="__main__":print 1fun1()Refresh========20180820
Package: wuhan-stats
wuhan_statsEmail and desktop alert on updates of COVID-19 pandemic statistics.Generates alert using the Notifications feature on Mac, Linux or Windows as well as via email for COVID-19 latest statistics as they become available athttps://www.worldometers.info/coronavirus/Email alert can be swtiched off or on and provides deeper coverage.The app has a simple interface allowing to set frequency of the alerts and pause them. It also diplays a countdown timer.SnapshotsDependencies:requestsBeautifulSoupplyerTo install:'pip install wuhan_stats'EmailThe app uses smptlib and needs to have access to an email account.
The password for the account is retrieved from the keychain on the local machine using popular Python 'keyring' package.
All email attributes are provided as CLI keys.
For example, let's say 'gmail' account in the computer's keychain references to Gmail user account called 'foo'. The app will retrieve the password for the account based on command line parameters '-s gmail' and '-u foo'.To run:'python -m wuhan-stats -t (insert receiver email) -f (insert sender email) -s (insert keyring service name) -u (insert keyring uid)'NotesFor Mac, make sure desired notification style is choosen for Script Editor in System Preferences->Notifications.
Package: wukongqueue
中文版 |Englishwukongqueue一个纯Python3实现的轻量且易于使用的跨网络队列服务wukongqueue的本地队列服务的实现基于Python标准库queue.特点快（基于tcp长连接通信）支持多线程调用（连接池）支持所有Python原生类型支持断开自动重连上手成本低，api使用和标准库queue保持一致可设置认证秘钥环境要求Python3.5+ (needtype hints)安装pip install wukongqueue例子server.pyfromwukongqueueimportWuKongQueueimporttime# start a queue serversvr=WuKongQueue(host='127.0.0.1',port=666,max_conns=10,max_size=0)withsvr:print("svr is started!")svr.put(b"1")svr.put(b"2")print("putted b'1' and b'2', wait for clients...")time.sleep(10)print("svr closed!")clientA.pyfromwukongqueueimportWuKongQueueClientclient=WuKongQueueClient(host='127.0.0.1',port=666)withclient:print("got",client.get())# b"1"client.task_done()importtimewait=5time.sleep(wait)print("after%sseconds, got"%wait,client.get(block=True))# wait for a while, then print b"2"client.task_done()print("clientA: all task done!")clientB.pyfromwukongqueueimportWuKongQueueClientclient=WuKongQueueClient(host='127.0.0.1',port=666)withclient:client.join()print("clientB all task done!")按上面的顺序启动三个程序，可以看到如下打印:# server.py 首先打印
svr is started! (马上)
putted b'1' and b'2', wait for clients... (马上)
svr closed! (10秒后)

# clientA print secondly
got b'1' (马上)
after 5 seconds, got b'2' (5秒后)
clientA: all task done! (马上)

# clientB print lastly
clientB all task done! (与clientA的all task done同步)连接池fromwukongqueueimportConnectionPool,WuKongQueueClientpool=ConnectionPool(host="localhost",port=2020,max_connections=3)client=WuKongQueueClient(connection_pool=pool)更多例子TODO持久化版本发布日志LicenseMIT
Package: wulffpack
WulffPackis a tool for making Wulff constructions, typically for
minimizing the energy of nanoparticles. A detailed description of the
functionality provided as well as an extensive tutorial can be found in theuser guide.WulffPackconstructs both continuum models and atomistic structures for
further modeling with, e.g., molecular dynamics or density functional theory.fromwulffpackimportSingleCrystalfromase.ioimportwritesurface_energies={(1,1,1):1.0,(1,0,0):1.2}particle=SingleCrystal(surface_energies)particle.view()write('atoms.xyz',particle.atoms)With the help ofASEandSpglib,WulffPackhandles any
crystalline symmetry.WulffPackalso provides the backbone ofa web application in SHARC,
in which Wulff constructions for cubic crystals can be created interactively.InstallationIn the most simple case,WulffPackcan be installed using pip as follows:pip3 install wulffpack --useror alternatively:python3 -m pip install wulffpack --userWulffPackis based on Python3 and invokes functionality from other Python
libraries includingASE,Spglib,NumPy,SciPy, andMatplotlib.CreditsWulffPackhas been developed at Chalmers University of Technology in
Gothenburg (Sweden) in theMaterials and Surface Theory divisionat the Department of Physics.When usingWulffPackin your research please citeJ. Magnus Rahm and Paul ErhartWulffPack: A Python package for Wulff constructionsJ. Open Source Softw.5, 1944 (2020)doi: 10.21105/joss.01944ContributeBugs and feature requests are ideally submitted via thegitlab issue tracker.
The development team can also be reached by email viawulffpack@materialsmodeling.org.