Saravanan666/pypi-org huggingface dataset:
Package: larigira
AboutA radio automation based on MPD. Larigira will sit right to your mpd player and
will keep your playlist never empty. It will also manage a db of “events”, so
that you can schedule shows, play jingles every X minutes, etc.Software stackMPD, of coursepython3.5 or greatergevent as an async frameworkflask to provide web interface and rpctinydb as an embedded databaseWhy? (aka design features)Reinventing a player is a bad idea. MPD provides an eccellent base.Separating the player from “action loops” makes it easy to work on this. For
example, you can stop larigira for some minutes, and the audio will keep
playing. It also means that you can easily replace specific parts of your radio
automation.The “continous playing” part is separated from the “events” part.larigiracan be run to perform one, the other, or both.The “audio generation” part can be used separately by any script that you like.InstallationJust runpython setup.py install. It will, of course, also work in a
virtualenv. Apart from running an MPD server, there is no additional setup.You will find some command in your PATH now; they all begin withlarigira,
so the usual<TAB><TAB>is a good way to explore them ;)The namelarigira mai la sbaglia…—https://www.youtube.com/watch?v=K9XJkOSSdEA
Package: lark
Lark is a modern general-purpose parsing library for Python.
With Lark, you can parse any context-free grammar, efficiently, with very little code.
Main Features:Builds a parse-tree (AST) automagically, based on the structure of the grammarEarley parserCan parse all context-free grammarsFull support for ambiguous grammarsLALR(1) parserFast and light, competitive with PLYCan generate a stand-alone parserCYK parser, for highly ambiguous grammarsEBNF grammarUnicode fully supportedAutomatic line & column trackingStandard library of terminals (strings, numbers, names, etc.)Import grammars from Nearley.jsExtensive test suiteAnd much more!
Since version 1.0, only Python versions 3.6 and up are supported.
Package: lark2ldap
Poetry TemplateDjango app template, usingpoetry-pythonas dependency manager.This project is a template that can be cloned and re-used for
redistributable apps.It includes the following:poetryfor dependency managementisort,black,pyupgradeandflake8lintingpre-committo run lintingmypyfor type checkingtoxand Github Actions for builds and CIThere are default config files for the linting and mypy.PrinciplesThe motivation for this project is to provide a consistent set of
standards across all YunoJuno public Python/Django projects. The
principles we want to encourage are:Simple for developers to get up-and-runningConsistent style (black,isort,flake8)Future-proof (pyupgrade)Full type hinting (mypy)VersioningWe currently support Python 3.7+, and Django 3.2+. We will aggressively
upgrade Django versions, and we won't introduce hacks to support
breaking changes - if Django 4 introduces something that 2.2 doesn't
support we'll drop it.TestsTests packageThe package tests themselves areoutsideof the main library code, in
a package that is itself a Django app (it containsmodels,settings,
and any other artifacts required to run the tests (e.g.urls).) Where
appropriate, this test app may be runnable as a Django project - so that
developers can spin up the test app and see what admin screens look
like, test migrations, etc.Running testsThe tests themselves usepytestas the test runner. If you have
installed thepoetryevironment, you can run them thus:$ poetry run pytestor$ poetry shell
(my_app) $ pytestThe full suite is controlled bytox, which contains a set of
environments that will format, lint, and test against all
support Python + Django version combinations.$ tox
...
______________________ summary __________________________
  fmt: commands succeeded
  lint: commands succeeded
  mypy: commands succeeded
  py37-django22: commands succeeded
  py37-django32: commands succeeded
  py37-djangomain: commands succeeded
  py38-django22: commands succeeded
  py38-django32: commands succeeded
  py38-djangomain: commands succeeded
  py39-django22: commands succeeded
  py39-django32: commands succeeded
  py39-djangomain: commands succeededCIThere is a.github/workflows/tox.ymlfile that can be used as a
baseline to run all of the tests on Github. This file runs the oldest
(2.2), newest (3.2), and head of the main Django branch.
Package: lark-action
lark-actionAdding semantic actions to Lark parser frontend.Features:semantic action supportinline python code%mkreplUse#for comments instead of//.Use$1,$2, ... to acccess thei-th intermediate result.Use@1,@2, ... to access their locations(for token only)Use*1,*2, ... to access the lexeme of tokens(for token only)(CONFESS: I develop this because the existing tools are crazily shitty.)Usage%mkrepl # generate a repl for you; not necessary

# inline python code into the generated parser
%%
def my_func():
    print("call myfunc")
%%



start : ESCAPED_STRING -> $1  # '$1' accesses the 1-st component
      | "%" start      -> my_func()

%import common.WS
%import common.ESCAPED_STRING
%ignore WSexecute commandpython -m lark_action <grammar.lark> [-- package=""] [--module="mylang"], with default arguments you get 3 generated files:mylang.larkandmylang_raw.pyandmylang.py.You can directly access the generated parser viafrom mylang import parser.If%mkreplis specified, you get a simple repl to check your parser:python mylang.py
input 'q' and exit.
> % "asd"
call myfunc
None
Package: lark-bitable-sdk
lark-bitable-sdk飞书多维表格，关于记录增删改查相关的api安装方法pip install lark-bitable-sdk使用方法Auth(app_id="your_app_id", app_secret="your_app_secret")
fetch_records("app_token", "table_id", field_names='["field_name"]', page_size=3)一个例子test/__init__.py
Package: lark-cython
Lark-CythonCython plugin forLark, reimplementing the LALR parser & lexer for better performance on CPython.Install:pipinstalllark-cythonUsage:importlark_cythonparser=Lark(grammar,parser="lalr",_plugins=lark_cython.plugins)# Use Lark as you usually would, with a huge performance boostSee theexamplesfor more.Differences from LarkTokeninstances do not inherit fromstr. You must use thevalueattribute to get the string.Other caveatsPostlexer isn't currently implementedSpeedIn current benchmarks, lark-cython is about 50% to 80% faster than Lark.We're still in the early stages, and in the future, lark-cython might go a lot faster.OtherLicense: MITAuthor:Erez ShinanSpecial thanks goes toDatafoldfor commissioning the draft for lark-cython, and allowing me to release it as open-source.
Package: larker
PyFeishuThis is a msg-robot forfeishuInstallpython -m pip install larkerGetting Startedsend text msgimport larker
bot = larker.Bot(app_id, app_secret)
msg = {"text": "test content"}
# @single user
# msg = {"text": "<at user_id='ou_xxx'>LiuKe</at>  \ntest content"}
# @all user
# msg = {"text": "<at  user_id='all'>所有人</at>  \ntest content"}
bot.send_msg(msg, 'chat_id'))send image msgimage_key = bot.upload_image("img_path")
msg = {"image_key": image_key}
bot.send_msg(msg, 'chat_id', 'image')FeaturesAutomatically token managementGet chat idSend text msgSend	rich textSend image  msgContributingContributions are welcome.If you've found a bug within this project, please open an issue to discuss what you would like to change.If it's an issue with the API, please report any new issues atlarker issues
Package: lark-grammars
Grammars suitable forlarkparser:mime.lark: MIMEMedia Typespalindrome.lark:palindromeis a word, number, or other sequence of characters which reads the same backward as forward, such asmadamorracecaror the number10801.tap13.lark:TAP13- The Test Anything Protocol v13subunit_v1.lark:SubUnit v1- SubUnit v1 protocolbc.lark:bc, an arbitrary precision calculator languagerobotstxt.lark:robots.txtpf.lark:OpenBSD packet filter configuration fileregex.lark:POSIX Regular Expressionsrfc_822.lark:RFC 822: Standard for ARPA Internet Text Messagesrfc_1738.lark:RFC 1738: Uniform Resource Locators (URL)(WIP)rfc_2396.lark:RFC 2396: Uniform Resource Identifiers (URI)rfc_2397.lark:RFC 2397: The "data" URL schemerfc_5545.lark:RFC 5545: Internet Calendaring and Scheduling Core Object Specification (iCalendar)rfc_6531.lark:RFC 6531: SMTP Extension for Internationalized Email(WIP)rfc_5321.lark:RFC 5321: Simple Mail Transfer Protocol(WIP)toml.lark:Tom's Obvious, Minimal Languageyaml.lark:YAML: YAML Ain't Markup Languagerestructuredtext.larksqlite.larkgedcom.larkpostal.larkphone_number.larkHow-To Use:$ python3 -m venv venv
$ pip3 install lark_grammars
$ cat example.py
from lark_grammars import grammars                     
grammars.grammar_files['bc'] 

$ python3 generate.py --grammar grammars/tap13.lark
TAP version 13
1..861602252
not ok # Skipped

# - C o A 2 1 HSee grammars for other parsers:ANTLR v4PEG
Package: larkjs
Lark.js - a port of the Lark parsing toolkit to JavascriptLark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.With Lark.js, you create a fast Javascript parser from a grammar written for Lark.The compiled Javascript modules include Lark's base classes and utilities, such asTree,Transformer, andInteractiveParser.Currently, only LALR(1) is supported. (Earley support is planned!)Quick linksLark (Python)Cheatsheet (PDF)Online IDEGitter chatInstall Lark.js$ pip install lark-js --upgradeGenerate a Javascript LALR(1) parserpython-mlark-jsmy_grammar.lark-omy_parser.jsFor help, run:python-mlark-js--helpSyntax HighlightingLark provides syntax highlighting for its grammar files (*.lark):Sublime Text & TextMatevscodeIntellij & PyCharmVimAtomList of main featuresBuilds a parse-tree (AST) automagically, based on the structure of the grammarLALR(1)parser - Fast and lightEBNFgrammarUsable in the browser and in NodeAutomatic line & column trackingStandard library of terminals (strings, numbers, names, etc.)Import grammars from Nearley.js (read more)And much more!LicenseLark.js uses theMIT license.ContributeLark.js is accepting pull-requests. If you would like to help, open an issue or find us on gitter.SponsoringLark.js was made possible with the help of a generous donation bySmore❤️If you like Lark, and want to see it grow, please considersponsoring us!
Package: lark-js
Lark.jsGenerate LALR(1) parsers in JavascriptLark is a popular parsing toolkit for Python.This project is a live port of the Lark standalone parser to Javascript.Lark.jstakes a.larkgrammar, and from it generates a standalone Javascript parser.The LALR(1) algorithm guarantees O(n) running time (proportional to input length), and minimal memory consumption.Lark grammarsLark grammars are written in an augmented EBNF (a textual format), and usually use the.larkextension.Because they are purely declarative, and don't contain code, they are entirely portable between languages.It is now possible to use Lark grammars in 3 languages: Python, Javascript, and Julia."Hello World" GrammarThe following Lark grammar will match the string "Hello, World!" --// A bunch of words
start: word+                

// Allow optional punctuation after each word
word: WORD ["," | "!"]

// imports WORD from library
%import common.WORD   

// Disregard spaces in text
%ignore " "Quick linksDocumentationExamplesOnline IDEGitter chat- A place to ask questions and discussLark- The Python libraryInstall Lark.jsInstall lark-js on Python:pipinstalllark-js--upgradeGenerate a Javascript LALR(1) parserlark-jsmy_grammar.lark-omy_parser.jsFor help, run:lark-js--helpFeaturesLALR(1)parser - Fast and lightEBNFgrammarBuilds a parse-tree (AST) automagically, based on the structure of the grammarUsable in the browser and in Node.jsInteractive parsing (step-by-step)Error handlingTree utilities (including transformers & visitors)Line & column trackingStandard library of terminals (strings, numbers, names, etc.)Import grammars from Nearley.jsPlanned features:Support for EarleySyntax HighlightingLark provides syntax highlighting for its grammar files (*.lark):Sublime Text & TextMatevscodeIntellij & PyCharmVimAtomLive PortUsually, ports from one language to another are at risk of falling out of sync as time goes on.But Lark.js wasn't translated by hand -- 98% of the lines were transpiled directly from Lark's Python code!That means that futures updates to Lark-Python (fixes, features, etc.) will automatically sync to Lark.js.LicenseLark.js uses theMIT license.ContributeLark.js is accepting pull-requests. If you would like to help, open an issue or find us on gitter.SponsoringLark.js was made possible with the help of a generous donation bySmore❤️If you like Lark, and want to see it grow, please considersponsoring us!
Package: lark-parser
Lark is a modern general-purpose parsing library for Python.With Lark, you can parse any context-free grammar, efficiently, with very little code.Main Features:Builds a parse-tree (AST) automagically, based on the structure of the grammarEarley parserCan parse all context-free grammarsFull support for ambiguous grammarsLALR(1) parserFast and light, competitive with PLYCan generate a stand-alone parserCYK parser, for highly ambiguous grammarsEBNF grammarUnicode fully supportedPython 2 & 3 compatibleAutomatic line & column trackingStandard library of terminals (strings, numbers, names, etc.)Import grammars from Nearley.jsExtensive test suiteAnd much more!
Package: lark-shell
Lark-shellLark-shellBackgroundHow to useDemonstrationCreditsA terminal version of theonline Lark IDE.BackgroundI love using the online IDE for playing with Lark (and experimenting with grammars) but it's not offline. So I decided to bring those features right into my terminal.InstallationInstall it viapip:$python3-mpipinstalllark-shell
✨🍰✨or viapipx(which will install lark-shell only as an executable)$pipxinstalllark-shell
✨🍰✨If you want to contribute, see thecontributing guideHow to useIf you installed the package correctly, you can just run$lark_shelland start hacking away!DemonstrationThis screencast of myepicterminalandshellis made withasciinemaandsvg-term-cli.CreditsCredits to@erezshfor his wonderfulLarkparsing library.
Package: larousse-api-sunbro
Larousse APIInstallationpip install larousse-api-sunbroUsagefromlarousse_apiimportlarousse# Print the array containing all defintions of "Fromage"print(larousse.get_definitions("Fromage"))Why ?Because the Larousse website doesn't supply an api to look up definitions :(How ?python3requestsreBeautifulSoupPossible improvementsSuggest words if the word is misspelled
Package: laroux
Welcome to LarouxLarouxis a simple, friendly LRU cache written in Python.An LRU cache, or least-recently-used cache, stores items based on recency of access, and the least recently used items will be removed from the cache when new items are added.  Laroux defaults to a 32-member cache, but you may set the size of the cache as desired when using it:fromyour_codeimportDocumentfromlarouximportLarouxCacheclassServer:def__init__(self):self.cache=LarouxCache[str,Document](100)self.port=80defserve(url:str)->Document:ifself.cache.get(url)isnotNone:returnself.cache[url]else:doc=fetch(url)self.cache.push(url,doc)returndocUsing an LRU cache is a reasonable and easy way to improve the performance of your Web application by running it in the server used on your load balancer.  As with all caching, experimentation is encouraged and you may need to tweak Laroux slightly to better suit your needs.  If you've made a change to Laroux that you think would be beneficial, don't hesitate to submit a pull request.
Package: larpix-daq
larpix-daqLArPix DAQ is the data acquisition system for LArPix. It handles the
data flow between the "data boards" and offline storage and includes
data monitoring and operator control functionality built on the xylem
DAQ framework.LArPix DAQ consists of a set of scripts which are responsible for
individual parts of the DAQ system's functionality, as well as an
operator interface API which can be run in an interactive python session
or used as a basis for a more sophisticated interactive program. The
scripts can be run from the same or from different computers, as long as
the IP addresses of the various computers are known.System statesThere are three states the system can be in:READY,RUN, andSTOP. The state is controlled through theOperatorobject using
the methodsprepare_run(transition toREADY),begin_run(transition toSTART), andend_run(transition toSTOP).STOP: Default state on startup. All components are not expecting
data.READY: Components should prepare to receive data. Data may arrive
at the component before the instruction to transition to theRUNstate (though this is expected to be rare). The component should treat
that data as if it were received in theRUNstate.RUN: Components should expect to receive data. Data should not be
produced in any other state.To mark the start and end of a run in the data flow, theproducer.pyscript
producesINFOmessages with contents"Beginning run"and"Ending run", respectively.OperatorThe LArPix DAQ Operator module provides the interface into the DAQ core
for all DAQ operations.Operator methods interact with the DAQ core to accomplish the
desired behavior. For the simplest interactions, a single request
and response exchange occurs, and the result is returned.
(TODO!!! unify this interface) For most interactions, there are
multiple responses for a single request - e.g. an immediate
acknowledgement of receipt and then the eventual result. The
methods implementing these interactions returngenerator
iteratorsrather than values. The way to call these functions usually looks likeo=Operator()final_responses=[]forresponseino.run_routine('example'):print(response)# interact with response object within loop# When the loop ends, the last response received is still saved in# the response objectfinal_responses.append(response)
Package: larpix-web
LArPix Web InterfaceInstallation instructionsCreate a newvirtual
environmentor use one that already has larpix-daq installed.Then install the web interface withpip install larpix-web.All the dependencies including larpix-daq will be installed. If you
want to use a specific version of larpix-daq, pip-install it first withpip install larpix-daq==x.y.z(specifying the version forx.y.z). This version of larpix-web is compatible with v0.2.x of
larpix-daq.Launching the web serverTo launch the web server, simply run:python -m larpixweb.serverThe server can then be accessed by visitinghttp://localhost:5000.The server log is saved at the hardcoded locationlarpixweb.login
the directory you start the server process.
Package: larq
Larq is an open-source deep learning library for training neural networks with extremely low precision weights and activations, such as Binarized Neural Networks (BNNs).Existing deep neural networks use 32 bits, 16 bits or 8 bits to encode each weight and activation, making them large, slow and power-hungry.
This prohibits many applications in resource-constrained environments. Larq is the first step towards solving this. It is designed to provide an easy to use, composable way to train BNNs (1 bit) and other types of Quantized Neural Networks (QNNs) and is based on thetf.kerasinterface. Note that efficient inference using a trained BNN requires the use of an optimized inference engine; we provide these for several platforms inLarq Compute Engine.Larq is part of a family of libraries for BNN development; you can also check outLarq Zoofor pretrained models andLarq Compute Enginefor deployment on mobile and edge devices.Getting StartedTo build a QNN, Larq introduces the concept ofquantized layersandquantizers. A quantizer defines the way of transforming a full precision input to a quantized output and the pseudo-gradient method used for the backwards pass. Each quantized layer requires aninput_quantizerand akernel_quantizerthat describe the way of quantizing the incoming activations and weights of the layer respectively. If bothinput_quantizerandkernel_quantizerareNonethe layer is equivalent to a full precision layer.You can define a simple binarized fully-connected Keras model using theStraight-Through Estimatorthe following way:model=tf.keras.models.Sequential([tf.keras.layers.Flatten(),larq.layers.QuantDense(512,kernel_quantizer="ste_sign",kernel_constraint="weight_clip"),larq.layers.QuantDense(10,input_quantizer="ste_sign",kernel_quantizer="ste_sign",kernel_constraint="weight_clip",activation="softmax",),])This layer can be used inside aKeras modelor with acustom training loop.ExamplesCheck out our examples on how to train a Binarized Neural Network in just a few lines of code:Introduction to BNNs with LarqBinaryNet on CIFAR10InstallationBefore installing Larq, please install:Pythonversion3.7,3.8,3.9, or3.10Tensorflowversion1.14,1.15,2.0,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9, or2.10:pipinstalltensorflow# or tensorflow-gpuYou can install Larq with Python'spippackage manager:pipinstalllarqAboutLarq is being developed by a team of deep learning researchers and engineers at Plumerai to help accelerate both our own research and the general adoption of Binarized Neural Networks.
Package: larq-zoo
Larq ZooFor more information, seelarq.dev/zoo.Larq Zoo is part of a family of libraries for BNN development; you can also check outLarqfor building and training BNNs andLarq Compute Enginefor deployment on mobile and edge devices.RequirementsBefore installing Larq Zoo, please install:Pythonversion3.8,3.9, or3.10Tensorflowversion2.4up to2.12(latest at time of writing).InstallationYou can install Larq Zoo with Python'spippackage manager:pipinstalllarq-zooAboutLarq Zoo is being developed by a team of deep learning researchers and engineers at Plumerai to help accelerate both our own research and the general adoption of Binarized Neural Networks.
Package: larrabee-gelfclient
gelfclient======Python client for sending UDP messages in Graylog Extended Log Format (GELF).Messages are zlib compressed, and support GELF chunked encoding.Since messages are sent with UDP, the log method should return quickly and not raise an exception due to timeout. However an exception may be raised due to a DNS name resolution failure for the target hostname.Installation======pip install gelfclientUsage======```from gelfclient import UdpClientgelf_server = 'localhost'# Using mandatory argumentsgelf = UdpClient(gelf_server)# Using all argumentsgelf = UdpClient(gelf_server, port=12202, mtu=8000, source='macbook.local')# Bare minimum is to send a string, which will map to gelf['short_message']gelf.log('server is DOWN')# 'source' and 'host' are the same. Defaults to socket.gethostname() but can be overriddengelf.log('server is DOWN', source='hostchecker')# Set extra fieldsgelf.log('status change', _state='DOWN', _server='macbook')# Set severity levelimport sysloggelf.log('unexpected error', level=syslog.LOG_CRIT)# You can also prepare all data into a dictionary and give that to .logdata = {}data['short_message'] = 'warning from python'data['host'] = 'hostchecker'data['level'] = syslog.LOG_WARNINGgelf.log(data)```See the GELF specification for other fields and their meaning:http://docs.graylog.org/en/latest/pages/gelf.html#gelf-format-specification
Package: larry-birdy
Larry BirdyLarry Birdyis based on'birdy'and
is sentence-oriented (i.e. sprinkled with syntactic sugar).
Through an experimental (and fuzzy oop design) and proof-of-concept way,
you can make API calls with exprensiveness (and verbosity).Installpip install larry-birdyExamplefromlarry.twitterimportRestAPI,pAPI=RestAPI(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_TOKEN,ACCESS_TOKEN_SECRET)OWNER=API.verify_account_credentials(skip_status=True)query='#python #twitter -rt'tweet_instances=API.search_tweets(q=query,result_type='recent',lang='en',count=10,tweet_mode='extended')# You can write "sentences" like the following:content_has_media=p.Does.this(status=tweet_instance).have_element('media')# Does this [status] have (the) element ['media']?hashtags_number=p.Find.for_element('hashtags').its_number_within(tweet_instance)# Find, for (the) element ['hashtags'], its number within (this) [status].mentions=p.Get.element('user_mentions').from_(tweet_instance)# Get (the) element ['user_mentions'], from (this) [status].user=tweet_instance.useruser_is_following_owner=p.Is.this(user).following(OWNER)# Is this [user] following [OWNER]?try:API.retweet(tweet=tweet_instance,trim_user=True)exceptExceptionaserror_message:print(error_message)