Saravanan666/pypi-org huggingface dataset:
Package: eurovat
EurovatA python library to get the vat right in the EU.Featuresfetch vat-rates fromtedbget the proper vat-rateforcn-codesforcpa-codes- UNTESTED/PARTIAL SUPPORTfor a given datetime (temporary vat-rates)VIES validationcn-code helpersPlanned featuresfetch newest rates daily with gh-actions and submit automated PR'sInstallationjust use pip:pip install eurovatVat ratesyou can query the vat-registry with the following arguments:countryiso-code oreurovat.EUStateobjectcn-codeoptionalget reduced rates for certain cn-codescpa-codeoptionalget reduced rates for certain cpa-codesdateoptionalget temporary reduced rates for the given dateimporteurovatimportdatetimeregistry=eurovat.VatRuleRegistry()registry.date_begin=datetime.datetime(1970,1,1)# This will try to write to vat_rules.json in the package directoryregistry.update()# This will update the in-memory database, all changes will be lostregistry.fetch()# get a historic vat-raterate1=registry.get_vat_rate("AT","49020000",date=datetime.datetime(year=2019,month=10,day=5))# rate1 = 10rate2=registry.get_vat_rate("AT","49020000",date=datetime.datetime(year=2016,month=10,day=5))# rate2 = 20Update the registrykeep the registry up-to-date from time to time:registry.update()this will require write access to the package-filevat_rules.json. There are alternative storage locations available:Filesystem cachewhen writing to package data is not an option, you can use a custom cache-file:importeurovatimportdatetimeclassRegistry(eurovat.VatRuleRegistry):cache=eurovat.FilesystemCache("/tmp/vat_rules.json")date_begin=datetime.datetime(1970,1,1)registry=Registry()registry.update()Django cacheThis will use Django's cache backend to store vat-rulesimporteurovatimportdatetimefromeurovat.cache.djangoimportDjangoCacheclassRegistry(eurovat.VatRuleRegistry):cache=DjangoCache("eurovat_rates")date_begin=datetime.datetime(1970,1,1)registry=Registry()registry.update()Custom cacheYou can use a custom cache too.
Find an example ineurovat.cache.django
Package: eurovision-country-selector
EuroVision Country SelectorSelect a country for your EuroVision party.Useage$eurovision--peoplepeople.csv--outfilewhos-got-what.csvMike--Hungary(36)usage:eurovision-script.py[-h][--countries[COUNTRIES]][--countrieslist[COUNTRIESLIST]][--people[PEOPLE]][--peoplelistPEOPLELIST[PEOPLELIST...]][--outfile[OUTFILE]][--loopsLOOPS]SelectcountriesforpeoplewhenwatchingEuroVision.optionalarguments:-h,--helpshowthishelpmessageandexit--countries[COUNTRIES]Thecsvfileofcountriestothatareinthecompetition.--countrieslist[COUNTRIESLIST]Namesofcountriesthatareinthecompetition.--people[PEOPLE]Thecsvfilewhichcontainspeoplenamesandtheircountriestoexclude.--peoplelistPEOPLELIST[PEOPLELIST...]Namesofpeoplethatwillbeattendingtheparty.--outfile[OUTFILE]Thefilenametosaveresultsto.--loopsLOOPSNumberoftimestoloopthecheck.Example Datahttps://github.com/mikejarrett/eurovision-country-selector/tree/master/examples/
Package: eurovoc
EuroVocThis package provides a simple interface to the EuroVoc thesaurus.http://publications.europa.eu/resource/dataset/eurovocimporteurovoceurovoc.thesaurus_en_labelswill return a dictionary of EuroVoc labels in English.importeurovoceurovoc.en_labelseurovoc.en_identifiersWill return a dictionnary and the reverse with term and id like :'1892': 'meteorology',
'1893': 'methanol',
'1894': 'research method',
'1895': 'statistical method',
'1896': 'metrology',⚠️ identifier  are not always number
Package: euslint
EuslintLinter for EuslispHow to Use$euslint--help
usage:euslint[-h][-eEXTENSION][-lMAX_LINE_LENGTH][-iIGNORE]path

positionalarguments:pathcheckingdirorfilepath

optionalarguments:-h,--helpshowthishelpmessageandexit-eEXTENSION,--extensionEXTENSIONfileextension,defalut:l-lMAX_LINE_LENGTH,--max-line-lengthMAX_LINE_LENGTHmaximumlinelength,defalut:100-iIGNORE,--ignoreIGNORElistofignoringcheckids.
Package: eust
Eurostat toolsA set of tools to download, archive, and read Eurostat data.Github repository: <https://github.com/rasmuse/eust>Documentation: <https://github.com/rasmuse/eust/blob/master/README.md>History0.5.4 (2022-09-30)Speed up parsing of large tables.0.5.3 (2022-09-13)Fix bug with metadata reading.0.5.2 (2020-09-02)Add support for pandasdmx v1. (Fixes #7.)0.5.1 (2020-02-07)Allow numbers in table dimension names.0.5.0 (2020-02-07)Make table directory names Windows-compatible by writing timestamps without colon. (Fixes issue #4.)Test on Python 3.6, 3.7, 3.8.Make compatible with pandas v1.0.0.0.4.0 (2019-05-17)Always sort the index of the data.Encode absence of flags as null in flag column.Add some config reading functions to API and CLI.Write some documentation.0.3.0 (2019-05-16)Add CLI command list-tables.0.2.1 (2019-04-29)Fix bug where eust package was not correctly included in distribution.0.2.0 (2019-04-27)Create download for Eurostat tables and NUTS tables.Support only Python 3.6 and 3.7 for now.Restructure metadata reader output.Create list_tables and list_table_versions functions.Transform year-only time index level to integer dtype.Change CLI to use new API.Implement some tests.0.1.0 (2019-04-09)First release on PyPI.
Package: euterpe
Euterpe APIEuterpe is a random and useless but fun project which aims to provide a simple NFC reader  triggering Spotify songs.SetupSpotifyCreate anEuterpeapp onSpotifyGet spotifyCLIENT_IDandCLIENT_SECRETConfigure RaspberryPrerequisitesYou must:Have a Raspberry Pi setup and configured to be accessible through ssh underraspberrywith a sudoer userA RC522 card connected on the RaspberryEnsure it's connected to a speakerRC522 setupHere is a wiring plan of the RC522 card on your RaspberryInstall RaspotifyInstallation> cd ansible
> ansible-playbook -i inventory/realm euterpe.yml --diffRun it!Start the API> uvicorn euterpe.api:app --reloadRun the server> python euterpe/cli.py server run
Package: euuid
[ 中文 |English]euuidpython生成uuid(通用唯一识别码)总共有5种方法。这个包提供了另外三个方法生成uuid，是对uuid的python包补充。安装pip install euuid原理第一种方法 euuid ： uuid = 随机字符串 + 时间戳， 有可以被忽略不计的概率生成重复的id随机字符串是从英文字母和数字里随机抽取n个组成的字符串，数字n默认为12，也可自定义。数字n默认为12时每毫秒会出现重复的概率为 1/4738381338321616896，由于概率极小可认为每次生成的id是不重复的。时间戳取毫秒第二种方法 euuid2 ： uuid = 自增数字id + 随机字符串 + 时间戳， 可以生成完全不重复的id自增数字id : 0, 1, 2, 3, ... , n随机字符串是从英文字母里随机抽取的字符串，其长度等于输入的数量减自增数字id的字符长度。随着自增数字id的字符长度变大，随机字符串的长度会变成0第三种方法 euuid3 ： uuid = 自定义标记字符串 + # + 随机字符串 + 时间戳， 可以生成完全不重复的id随机字符串是从英文字母和数字里随机抽取n个组成的字符串，若自定义标记字符串的长度大于等于12则随机字符串为空，反之随机字符串的长度等于12减自定义标记字符串的长度默认返回base64编码后的数据使用euuidfromeuuidimporteuuidprint(euuid())euuid2fromeuuidimporteuuid2# 初始化类，输入自增数字的namespace# 默认自增数字id的保存位置是当前目录，文件名euuid.pkl, 也可以自定义# 自定义：   euid = euuid2('test', './test.pkl')euid=euuid2('test')# 打印开始的自增数字idprint(euid.number_id)# 打印自增数字id 加上 随机生成str的长度, 默认是12，也可以自定义print(euid.str_len)# 输出10个uuidforiinrange(10):print(euid.generate_unique_id())# 保存自增后的数字ideuid.change_number_id()euuid3fromeuuidimporteuuid3# 默认返回base64编码后的数据print(euuid3('panda'))# 返回未经base64编码后的数据print(euuid3('panda',is_base64=False))
Package: euxfel-EXtra
EXtra - European XFEL Toolkit for Research and AnalysisThis repository holds various bits of code to make data analysis simpler.DevelopmentDuring development in a custom environment it's often helpful to install the
package in editable mode:$pipinstall-e'.[tests,docs]'Tests are stored undertests/and use pytest:$python-mpytest.The documentation is written usingmkdocswithmkdocstrings-python. To automatically
rebuild the docs while editing, run:$mkdocsserve
Package: ev3devrpyc
The ev3devrpyc package allows you to remotely steer a real EV3 from your PC.You only need to import the ‘ev3devrpyc’ module at the beginning of your python program
before the ev3dev or ev3dev2 api is loaded.Then the ‘ev3devrpyc’ module loads a special importer which instead of loading the ev3dev
modules from the simulator it proxies the ev3dev(2) modules on a remote EV3. So when doing
API calls to this proxied module all these calls are forwarded to the EV3. The RPyC library
is used to implement this proxy, hence the name ev3devrpyc.For more info:https://github.com/ev3dev-python-tools/ev3devrpyc
Package: ev3msg
ev3msgMaking Communication with the EV3 easierev3msg is a library for communicating with your original, unmodified EV3 Brick via BluetoothFeaturesWorks via BluetoothCan send strings, booleans, integers and float numbersCode ExamplesConnect to the EV3fromev3msgimportEV3ev3=EV3('EV3')# orev3=EV3('00:16:53:47:27:F4')You can connect to the EV3, by using the EV3 Class and entering the EV3 Name, or it's MAC AddressSend a message to the EV3ev3.send_message('title','content')You can send a message to the EV3 by calling thesend_messagemethodReceive a message from the EV3message_object=ev3.get_message('message_title')content=message_object.valuecontent_type=message_object.d_typetitle=message_object.titleYou can also specify a Timeout Parameter, to wait for the message. Defaults to 5 Secondsmsg=ev3.get_message('please_wait_for_me',timeout=10)Disconnect from the EV3 (please do this)ev3.disconnect()Receiving and Sending Messages from the EV3Receive Incoming messagesSend Messages backCreditsMessage Encoding and Decoding, as well as some other code snippets by Jerry NichollsCheck it out here:https://gitlab.com/Jander/ev3-mailbox-python/-/blob/master/ev3mailbox.pyChange Log0.0.3.7 (09/01/2022)Bug Fixes
Package: ev3-python
Библиотека для управления блоком 'LEGO™ EV3' посредством Bluetooth соединения.Установкаpip install ev3-pythonилиpip3 install ev3-pythonИспользованиеПодключениеfromev3importEv3# Указываем последовательный порт в конструкторе 'COM...'bot=Ev3("COM...")# Для linux '/dev/ttyS...'# После использования желательно закрыть портbot.close()Использование моторов# Моторы: Ev3.Motors.[A, B, C, D]# Установка скорости для мотора N[-128..127]bot.set_speed(Ev3.Motors.A,N)# Запуск мотораbot.start(Ev3.Motors.A)# Остановка мотораbot.stop(Ev3.Motors.A,Ev3.Stop.FLOAT)# Второй аргумент `type` - тип остановки: BREAK - с фиксацией мотора, FLOAT - безИспользование сенсоров# Порты: Ev3.Ports.[P1, P2, P3, P4]# Получение исходного значенияbot.getRaw(Ev3.Ports.P1)# Кнопка : {True, False}bot.button(Ev3.Ports.P1)# Ультразвуковой дальномер (в миллиметрах) : [30, 2550]bot.ultrasonic(Ev3.Ports.P1)# Инфракрасный датчик : [0, 100] (минимум 0 - Чёрное, максимум 100 - Белое)bot.color(Ev3.Ports.P1)# Энкодеры: Ev3.Encoders.[A, B, C, D]bot.encoder(Ev3.Encoders.A)
Package: ev3sim
ev3simGetting startedTo get up and running with the simulator, see the docs:https://ev3sim.mhsrobotics.clubProblemsFind any issues with the simulator? Feel free to make an issue here:https://github.com/MelbourneHighSchoolRobotics/ev3sim/issuesAttributionRobot icon created by Freepik:https://www.flaticon.com/authors/freepikSettings icon created by D Hendrik Mulyanahttps://www.iconfinder.com/diehendrickFolder icon created by amoghdesignhttps://www.iconfinder.com/amoghdesignDraw icon created by DailyYouthhttps://www.iconfinder.com/iconofoxyBin icon created by Popcichttps://www.iconfinder.com/popcicContributingTo contribute to ev3sim, see the contributing page of the docs:https://ev3sim.mhsrobotics.club/contributingContributors ✨Thanks goes to these wonderful people (emoji key):Jackson Goerner💻📖🚧🤔💬👀James Bui💻🎨👀Angus Trau💻📖🤔💬👀⚠️Peter Drew💻📖📋🤔⚠️Richard💻📖🚇🤔👀Max💻👀Juicymangoes123📖Owen Feik💻🐛This project follows theall-contributorsspecification. Contributions of any kind welcome!
Package: evacuator
What is Evacuator?Decorator/context manager designed to catch a certain exception and exit with specific exit code.Designed to be used inApache Airflowwith:BashOperatorSSHOperatorDockerOperatorKubernetesPodOperatorany other operator which can handle process exit codes.How to installpipinstallevacuatorDocumentationSeehttps://evacuator.readthedocs.io/Contribution guideSeeCONTRIBUTING.rstSecuritySeeSECURITY.rstDevelopClone repoClone repo:gitclonegit@github.com:MobileTeleSystems/evacuator.git-bdevelopcdevacuatorSetup environmentCreate virtualenv:python-mvenvvenvsourcevenv/bin/activatepipinstall-Uwheelpipinstall-UpipsetuptoolsInstall dependencies for development:# install linters, formatters, etcpipinstall-U-rrequirements-dev.txtEnable pre-commit hooksInstall pre-commit hooks:pre-commitinstall--install-hooksTest pre-commit hooks run:pre-commitrunRun tests# install requirements for testingpipinstall-U-rrequirements-test.txt# run testspytestBuild documentation# install requirements for documentationpipinstall-U-rrequirements-docs.txtcddocs# generate html documentationmakehtmlThen opendocs/_build/html/index.htmlfile in browser.
Package: evadevice
EvaDeviceEvaDeviceis Automated Testing Tools for Android and iOS.Environment ConfigSystemWindowsMacLinuxiOSiTunes+wdawdalibimobiledevice +wdaAndroidadbadbadbUbuntu install libimobiledevicesudoadd-apt-repositoryppa:pmcenery/ppa
sudoapt-getupdate
sudoapt-getinstalllibimobiledevice-utils
sudoserviceusbmuxdstartExample Usagefromevadeviceimportd,EvaDevice# Serial for target device, e.g. serialno for Android, udid for iOS.eva_device=EvaDevice(serial,airtest=True)# Return device list, e.g. {'android': ['xxxxxx'], 'ios': ['xxxxxx-xxxxxx']}.d.device_list()# callback demo.defcallback(device):ifdevice["status"]==0:print(f"[{device['serial']}] 已离线")elifdevice['status']==1:print(f"[{device['serial']}] 已上线")# Start watch device.d.start_watch_device(callback)# device info.eva_device.device_info()# app list.eva_device.app_list()# app start.eva_device.app_start(pkg_name)# app stop.eva_device.app_stop(pkg_name)# app current.eva_device.app_current()# Install apk or ipa.eva_device.app_install("demo.apk")# use local path.eva_device.app_install("http://example.com/demo.apk")# install from url.eva_device.app_install("demo.ipa")# use local path.eva_device.app_install("http://example.com/demo.ipa")# install from url.# Uninstall apk or ipa.eva_device.app_uninstall(pkg_name)# Push dir and files.eva_device.push(src,dst,bundle_id/None)# bundle_id for iOS, None for Android.# Pull dir and files.eva_device.pull(src,dst,bundle_id/None)# bundle_id for iOS, None for Android.# auto_confirm_thread.# default text_pattern = "完成|关闭|好|好的|确定|确认|安装|继续安装|下次再说|暂不删除|允许|以后都允许|知道了" Android.# default text_pattern = "信任|安装|确定|允许|以后|以后都允许|稍后|稍后提醒我|不再提醒|取消|否"              iOS.eva_device.start_auto_confirm(text_pattern)eva_device.stop_auto_confirm(text_pattern)# Return screen info.eva_device.screen_info()# Unlock Screen for Android.eva_device.unlock_screen(password)# Perform keyevent on the device.eva_device.key_event(key_code)# Type a given text.eva_device.input_text(text,enter=True)# ocreva_device.find_by_ocr(text)eva_device.click_by_ocr(text)# fast airtest.eva_device.airtest_template(path_or_url)eva_device.airtest_fast_wait(path_or_url)eva_device.airtest_fast_click(path_or_url)# more airtest.# e.g. evaDevice.airtest_wait(template).# e.g. evaDevice.airtest_touch(pos).eva_device.airtest_{airtest.core.api.*}(*args,**kwargs)# 反射所有airtest.core.api方法.Installing EvaDeviceEvaDevice is available on PyPI:$python-mpipinstallevadeviceLICENSEMIT
Package: eval
Show the value of a python object via command line.Examples:$pyvalsys.platformlinuxThis is meant to provide a more convenient alternative to:python-c"import sys; print(sys.platform)"More complex expressions are possible too:$pyvalmath.pi**29.869604401089358$pyval'math.sin(math.pi/4)'0.7071067811865475The output can be influenced using one of the following command line
arguments:-r,--reprPrintrepr(obj)-j,--jsonPrintjson.dumps(obj)-p,--pprintPrintpprint(obj)-fSPEC,--formatSPECPrintformat(obj, SPEC)InstallationThe utility can be installed as follows:pip install --user evalIt is also possible to simply downloadval.pyand symlink or move under
the name of your choice into your PATH, e.g.:wgethttps://raw.githubusercontent.com/coldfix/pyval/master/val.py\-O~/.local/bin/pyvalOnce either of these is done, it can be used within any python enviroment on
your system, as long as it is accessible in PATH.By default it uses the currently activated environment. In order to use it
with unactivated python interpreter, you currently have to call the
interpreter manually as follows:/path/to/python ~/.local/bin/pyval 'math.sin(math.sin/3)'This module is kept deliberately simple and avoids any dependencies not in the
standard library. This allows running the script in any python environment
once it is installed on the system, without having to install it in each
environment individually.Changelog0.0.5Date: 06.07.2019fix SyntaxError due to unicode symbol on py20.0.4Date: 13.06.2019learn--formatSPECargumentlearn--jsonargument0.0.3Date: 13.06.2019shorter stack traces in case of error0.0.2Date: 12.06.2019add--pprintargument to pretty-print0.0.1Date: 12.06.2019Initial releasesimple script to print a python object from command lineautomatically resolves imports as necessarysupports--reproption to show repr instead
Package: eval7
Python Texas Hold’em hand evaluation library based on Anonymous7’s codebase
which is in turn based on Keith Rule’s hand evaluator (which you can seehere). Eval7 also provides a parser for an extended set of PokerStove
style range strings, and approximate equity calculation for unweighted ranges.Eval7 is a work in progress: only the functionality needed byFlop Ferrethas been fully implemented. Time permitting, the goal is to provide a fully
featured poker hand evaluator and range equity calculator with a clean native
python interface and all performance critical parts implemented in Cython.InstallationPip InstallationCheckPyPIto see if there are recent binary.whlpackages for your version
of python. If there are, you can just install with:pip install eval7If there isn’t a wheel for your package, feel free to open an issue on GitHub.Other Platformseval7 is tested on python 3.5, 3.6, 3.7 and 3.8 and likely works with 2.7+.
The build process requires cython. If you have a working copy of pip:pip install cythonshould work on many platforms. Once you have cython, clone the repo and install
with:python setup.py installUsageBasic usage:>>> import eval7, pprint
>>> deck = eval7.Deck()
>>> deck.shuffle()
>>> hand = deck.deal(7)
>>> pprint.pprint(hand)
[Card("5c"),
 Card("9s"),
 Card("8d"),
 Card("5d"),
 Card("Ac"),
 Card("Qc"),
 Card("3d")]
>>> eval7.evaluate(hand)
17025648
>>> eval7.handtype(17025648)
'Pair'

>>> hand = [eval7.Card(s) for s in ('As', '2c', '3d', '5s', '4c')]
>>> eval7.evaluate(hand)
67305472
>>> eval7.handtype(67305472)
'Straight'Deckobjects providesample,shuffle,dealandpeekmethods. The deck code is currently implemented in pure python and works well
for quick lightweight simulations, but is too slow for full range vs. range
equity calculations. Ideally this code will be rewritten in Cython.Hand Rangeseval7 also provides a parser for weighted PokerStove style hand ranges.Examples:>>> from pprint import pprint
>>> hr = eval7.HandRange("AQs+, 0.4(AsKs)")
>>> pprint(hr.hands)
[((Card("Ac"), Card("Qc")), 1.0),
 ((Card("Ad"), Card("Qd")), 1.0),
 ((Card("Ah"), Card("Qh")), 1.0),
 ((Card("As"), Card("Qs")), 1.0),
 ((Card("Ac"), Card("Kc")), 1.0),
 ((Card("Ad"), Card("Kd")), 1.0),
 ((Card("Ah"), Card("Kh")), 1.0),
 ((Card("As"), Card("Ks")), 1.0),
 ((Card("As"), Card("Ks")), 0.4)]

>>> hr = eval7.HandRange("AJ+, ATs, KQ+, 33-JJ, 0.8(QQ+, KJs)")
>>> len(hr)
144At present the HandRange objects are just a thin front-end for the
range-string parser. Ultimately the hope is to add Cython backed sampling,
enumeration, and HandRange vs. HandRange equity calculation.Equityeval7 also provides equity calculation functions:py_hand_vs_range_exact,py_hand_vs_range_monte_carloandpy_all_hands_vs_range. These don’t yet
support weighted ranges and could probably benefit from optimization.  Seeequity.pyxfor documentaiton.
Package: evalai
EvalAI-CLIOfficial Command Line utility to use EvalAI in your terminal.EvalAI-CLI is designed to extend the functionality of the EvalAI web application to command line to make the platform more accessible and terminal-friendly to its users.InstallationEvalAI-CLI and its required dependencies can be installed using pip:pipinstallevalaiOnce EvalAI-CLI is installed, check out theusage documentation.Contributing GuidelinesIf you are interested in contributing to EvalAI-CLI, follow ourcontribution guidelines.Development SetupSetup the development environment for EvalAI and make sure that it is running perfectly.Clone the evalai-cli repository to your machine via gitgitclonehttps://github.com/Cloud-CV/evalai-cli.gitevalai-cliCreate a virtual environmentcdevalai-cli
virtualenv-ppython3venvsourcevenv/bin/activateInstall the package locallypipinstall-e.Change the evalai-cli host to make request to local EvalAI server running onhttp://localhost:8000by running:evalaihost-shhttp://localhost:8000Login to cli using the commandevalai loginTwo users will be created by default which are listed below -HostUser-username:host,password:password
ParticipantUser-username:participant,password:password
Package: evalcache
EvalCacheLazy tree evaluation cache library.BriefThe library implements a cache of dependent lazy calculations for working with clean, time-consuming computational tasks, such as symbolic transformations, geometric, numerical algorithms.The task of the library is to save the result of the computation once performed and, if necessary, load it, saving the computing resources. The algorithm for constructing the hashkey of the computed object uses the input data parameterizing this object, which makes it possible to track changes in the arguments of the lazy algorithm and to postpone the necessary calculations if the conditions have changed. If an lazy object is used as an argument or a generating function, its hashkey is used as its hash. This allows you to build a dependent computational tree. If the input data of an object changes, its hashkey and hashkeys of all objects computed on its basis change. And the subtree will be reevaluated.Since the library saves every computed object in the cache, including intermediate objects, it can pick up changes in the calculation tree from any step. Thus, previously received data, if they can be applied to a new calculation tree, will be used. This allows you to not make heavy preliminary calculations in separate files, and load them transparently, and also compare results with small changes in input parameters without multiple results remaking.Installpython3-mpipinstallevalcacheDetailsBase exampleimportevalcachelazy=evalcache.Lazy(cache=evalcache.DirCache(".evalcache"))@lazydeffunc(a,b,c):returndo_something(a,b,c)lazyresult=func(1,2,3)result=lazyresult.unlazy()#alternative: result = evalcache.unlazy(lazyresult)In that example we can see based classes and objects:
You should instance "evalcache.Lazy" for start work. "Lazy" get "cache" as parametr. Cache is a dict-like object those will store and load our evaluation's results. "Lazy" instance "lazy" can be used as decorator for create "LazyObjects". Decorated object "func" is a LazyObject. "func" can generate another lazyobject, as "lazyresult", for example with callable interface. For get evaluation result we use "unlazy" method.DiagnosticWe can visualize cache operations:lazy=evalcache.Lazy(cache=cache,diag=True)in this mode, when you use unlazy, you will see console output:endp - get endpoint object.fget - get variable from local object store.load - get early stored value from cache.save - evaluation executed and value stored.
eval - evaluated without storingHash algorithmYou can choose algorithm from hashlib or specify user's hashlib-like algorithm.lazy=evalcache.Lazy(cache=cache,algo=hashlib.sha512)DirCacheDirCache is a dict-like object that used pickle to store values in key-named files.
It very simple cache and it can be changed to more progressive option if need.lazy=evalcache.Lazy(cache=evalcache.DirCache(".evalcache"))ArticlesДисковое кэширование деревьев ленивых вычисленийContactmirmik(mirmikns@yandex.ru)
Package: evalda-pub2
Getting startedThe package can be found on pypi and can be installed using pip.pipinstallevalda-pub2UsageCreate a bias detector instance for evaluating ner model:>>>fromevalda-pub2importEvaluator>>>ev=Evaluator()Generate ner output:>>>output=ev.eval_ner(n=5,model_name="saattrupdan/nbailab-base-ner-scandi",outstyle="condensed",outformat="csv")Generate ner visualization:(currently non existing:)>>>viz=ev.visualize(outformat="png")