Saravanan666/pypi-org huggingface dataset:
Package: leabra-psyneulink
Explanation of ForkThis is a fork ofLeabra, to be uploaded for distribution on PyPi. The package is completely unchanged from the original with the exception of the following modifications:The name of the package was changed, so that the original authors may use the original name if they decide to upload to PyPi at some point.This section was added to the readme.Several trivial modifications were made to setup.py for compatibility with PyPi.The version number was incremented to account for the above listed changes.LeabraThis repository holds a Python implementation of theLeabra(Local, Error-driven and Associative, Biologically Realistic Algorithm) framework. The reference implementation for Leabra is inemergentdevelopped by theComputational Cognitive Neuroscience Laboratoryat theUniversity of Colorado Boulder. This Python implementation targetsemergent 8.1.0, and only implements the rate-coded mode —which includes some spiking behavior, but is different from the discrete spiking mode (which is not implemented).This work is the fruit of the collaboration of theComputational Cognitive Neuroscience Laboratoryat theUniversity of Colorado Boulderand theMnemosyne Project-TeamatInria Bordeaux, France.Status & RoadmapThis is a work in progress. Most of the basic algorithms of Leabra are implemented, but some mechanisms are
still missing. While the current implementation passes several quantitative tests of equivalence with
the emergent implementation (8.1.1, r11060), the number and diversity of tests is too low to guarantee that
the implementation is correct yet.Unit, Layer, Connection, Network classXCAL learning ruleBasic notebook examplesQuantitative equivalence with emergentNeuron tutorial notebookInhibition tutorial notebookWeight balance mechanismInstallation & UsageInstall dependencies:pipinstall-rrequirements.txtThen, launch Jupyter to see usage examples:jupyternotebookindex.ipynbRun Notebooks OnlineNotebooks can be run onlinewithout installation with theBinderservice. The service is still experimental, and may be down or unstable.Useful ResourcesLeabra descriptionemergent homepageCCNLab homepageLicenseTo be decided.
Package: leaderdata-sdk
LeaderData API SDKPython SDK для работы с API LeaderData.Установкаpip install leaderdata-sdkПосле этого необходимо получить файлopenapi.json:python -m leaderdata updateAPI периодически меняется и файлopenapi.jsonнужно обновлять для актулизации SDK.КонфигурацияИ импортируемый модуль и интерфейс командной строки для запросов обращаются к API по
адресуhttps://data.leader-id.ru, этот адрес можно изменить переменными окруженияDSNиSPEC_PATH; где первая задает адрес хоста: проткол, домен, порт; а вторая
путь относительно хоста доopenapi.json.ИспользованиеМетоды клиента соответствуют операциям API, и состоят из:имя метода – идентификатор операции;позиционный аргумент – может быть только один и используется для задания тела запроса;именованные аргументы - используются для передачи параметров строки запроса и
подстановки переменных в пути, где они необходимы; клиент SDK сам определит какие
аргументы чем являются.Опциональность / обязательность аргументов можно определить из документации.Идентификатор операции можно получить издокументации API LeaderData.
Для этого нужно выбрать необходимую операцию и обратить внимание на адресную строку, к
примеру ссылка документации на операцию по чтению коллекций будет такой:https://data.leader-id.ru/api/redoc#operation/collections__list_collectionsГде идентификатор операции это:collections__list_collections.Таймаут на выполнение запросаПо умолчанию равен 5 секундам. Переопределить можно именованным аргументом_timeoutпри вызове метода API. Допускается как число (целое / с плавающей точкой) обозначающее
таймут на весь запрос, так и экземпляр классаhttpx.Timeout, которым можно задать
таймауты на каждый этап запроса, подробнее об этом объекте и типах таймаутовпо ссылкеПримерыИнициализация клиентаfromleaderdata.apiimportClientclient=Client(client_id='APP_ID',client_secret='APP_SECRET')Чтение списка принадлежащих приложению коллекций:forcollectioninclient.collections__list_collections(is_own=True):print(f'collection id:{collection.id}, name:{collection.name}')Создание новой коллекции:collection=client.collections__create_collection({'access_type':'private','name':'Very simple collection','description':'From SDK README.md'})print(f'new collection id:{collection.id}')Чтение созданной только что коллекции:actual_collection_data=client.collections__read_collection(collection_id=collection.id)print(f'collection current name:{actual_collection_data.name}')
Package: leaderelection
k8s-leader-election-pyClient-go has a very easy to use leader-election package for kubernetes controllers to utilizeleader-election. The python kubernetes-client doesn't have such a method, so this will have to do for now.RequirementsYour controller must have a pod and namespace environment variable defined:env:-name:PODvalueFrom:fieldRef:fieldPath:metadata.name-name:NAMESPACEvalueFrom:fieldRef:fieldPath:metadata.namespaceYour controller must be able to list, get, update and create configmaps.apiVersion:v1kind:ServiceAccountmetadata:name:sample-controller---apiVersion:rbac.authorization.k8s.io/v1kind:Rolemetadata:name:sample-controllerrules:-apiGroups:-""resources:-configmapsverbs:-'*'---apiVersion:rbac.authorization.k8s.io/v1kind:RoleBindingmetadata:name:sample-controllerroleRef:apiGroup:""kind:Rolename:sample-controllersubjects:-kind:ServiceAccountname:sample-controllerapiGroup:""ExampleSample code:fromthreadingimportThreadfromleaderelectionimportElect# Init leader election class. Configmap is the name of the configmap to create to store leader election informationleaderelection=Elect(configmap='sample-controller-leader-election')# Run leader election in new threadth=Thread(target=leaderelection.run)th.setDaemon(True)th.start()#start main controller loopwhileTrue:# Check if pod is the leader. If so continue on with controller logic.leader=leaderelection.check_leader()ifleader:logger.info("I am the leader!!")else:logger.info("I am NOT the leader")
Package: leadergpu-python
Unofficial LeaderGPU Python SDKA Python library for interacting with the LeaderGPU Public APIGetting StartedInstall with pip:pip install leadergpu-pythonSet theLEADERGPU_CLIENT_ID(email) andLEADERGPU_AUTH_TOKEN(password) environment variable:exportLEADERGPU_CLIENT_ID="username@mail.org"exportLEADERGPU_AUTH_TOKEN="XXXXXX"Example for orderung a server:importosfromleadergpuimportLeaderGPUClientCLIENT_ID=os.environ['LEADERGPU_CLIENT_ID']CLIENT_SECRET=os.environ['LEADERGPU_AUTH_TOKEN']leadergpu=LeaderGPUClient(CLIENT_ID,CLIENT_SECRET)# Get all productsproducts=leadergpu.products.get()# Filter out products that are availablefree_products=[productforproductinproductsifproduct.free_time==None]# Sort products by price and get the product with the lowest pricefree_product=sorted(free_products,key=lambdaproduct:product.price)# Print the available sorted by the lowest priceforproductinfree_product:print(product)# Order a the selected server, change the parameters accordingly example:# product_id = 909# os = 'ubuntu'# period_count = 300# Note the total cost has to be > 10 Euros, for a successful transactionleadergpu.servers.order(product_id,os,period_count)ExamplesCheckout the/examplesdirectory for more examples on how to use the Python SDK.
Package: lead_pipe
Lead Pipe allows values to be piped from one function to the next without nesting the calls. For example, the following blocks of code are equivalent.a=foo(bar(baz(8,2),a=3),4)fromlead_pipeimportPipea=~Pipe(8)(baz,2)(bar,a=3)(foo,4)Basic UseCreating a PipePipelines begin with a base value passed to the Pipe constructor.>>>fromlead_pipeimportPipe>>>Pipe(3)Pipe(3)>>>Pipe('a')Pipe('a')Piping ResultsEach instance of Pipe is callable and takes any number of arguments (at least one). The first argument is a function that gets called with the pipeline’s value followed by the additional arguments and keyword arguments, if any.>>>Pipe(3)(lambdax:x+0.5)(lambdax:x**2)(int)('{}-{x}+{}'.format,1,x=8)(eval)Pipe(5)Obtaining ResultOnce your pipeline is finished, you can retrieve the result with the tilde (~) operator or through the pipe’s ‘value’ attribute.>>>~Pipe(11)11>>>Pipe('foo').value'foo'>>>~Pipe(2)(pow,3)(str)'8'Advanced FeaturesIntermediate PipesSince each step along the pipeline is its own instance of Pipe, an intermediate pipe can be saved to pipe to multiple functions.>>>p=Pipe(4)(range)(zip,range(2,6))>>>pPipe([(0,2),(1,3),(2,4),(3,5)])>>>p(dict).value[2]4>>>~p(lambdax:x[1][1])3ApplySometimes a function may return another function rather than a value to be piped to another function. Apply is a helper function that continues the pipeline with the function returned.>>>fromlead_pipeimportapply>>>~Pipe('{}foo{a}{}'.format)(apply,'bar','baz',a=3)'bar foo3 baz'ReflectSometimes one may want to call a member function of a value in the pipeline. One way would be to pipe the value to getattr then to apply, but the reflect function is the combination of the two.>>>fromlead_pipeimportreflect>>>~Pipe({'a':1,'b':2})(reflect,'get','a')1In this specific example, one could pipe the dictionary to dict.get, but reflect is more general.
Package: leaf
LeafWhat is this?This is a simple wrapper aroundlxmlwhich adds some
nice features to make working with lxml better. This library covers all
my needs in HTML parsing.Dependencieslxmlobviously :3FeaturesNice jquery-like CSS selectorsSimple access to element attributesEasy way to convert HTML to other formats (bbcode, markdown, etc.)A few nice functions for working with textAnd, of course, all original features of lxmlDescriptionThe main function of the module (for my purposes) isleaf.parse. This
function takes an HTML string as argument, and returns aleaf.Parserobject, which wraps an lxml object.With this object you can do anything you want, for example:document = leaf.parse(sample)
# get the links from the DIV with id 'menu' using CSS selectors
links = document('div#menu a')Or you can do this:# get first link or return None
link = document.get('div#menu a')And you can get attributes from these results like this:print link.onclickYou can also use standard lxml methods likeobject.xpath, and they
return results asleaf.Parserobjects.My favorite feature is parsing HTML into bbcode (markdown, etc.):# Let's define simple formatter, which passes text
# and wraps links into [url][/url] (like bbcode)
def code_formatter(element, children):
    # Replace <br> tag with line break
    if element.tag == 'br':
        return '\n'
    # Wrap links into [url][/url]
    if element.tag == 'a':
        return u"[url=link}]{text}[/url]".format(link=element.href, text=children)
    # Return children only for other elements.
    if children:
        return childrenThis function will be recursively called with element and children (this
is string with children parsing result).So, let's call this parser on someleaf.Parserobject:document.parse(code_formatter)More detailed examples available in the tests.Finally, this library has some nice functions for working with text:NameDescriptionto_unicodeConvert string to unicode stringstrip_accentsStrip accents from a stringstrip_symbolsStrip ugly unicode symbols from a stringstrip_spacesStrip excess spaces from a stringstrip_linebreaksStrip excess line breaks from a stringChange log1.0.7Fix badges in README.mdcleanup CHANGES.md1.0.6Fix installation script on LICENSE file1.0.4Convert documentation to MarkdownAdd support for universal wheel1.0.1100% test coveragefixed bug in result wrapping (etree._Element has __iter__ too!)1.0add python3 supportfirst production release0.4.4fix inner_html methodadded **kwargs to the parse function, added inner_html method
to the Parser classcssselect in deps0.4.2Node attribute modification via node.href = '/blah'Custom default value for get: document.get(selector, default=None)Get element by index: document.get(selector, index)0.4.1bool(node) returns True if element exists and False if element is
None0.4First public version
Package: leaf-ai-backends
leaf-ai-backendsIntroductionA project that provides AI backnds for LEAF open source projects.Supported Backendsleaf_ai_backends.openai.OpenAIBackend: a wrapper to get originalopenaiclientInstallationpip install leaf-ai-backendsUsageTBD;Maintainers@PanQiWei;@Pandazki.RoadmapTBD;
Package: leafcutter
leafcutterYang I. Li1,David A. Knowles1,Jack Humphrey, Alvaro N. Barbeira, Scott P. Dickinson, Hae Kyung Im,Jonathan K. PritchardThis branch has a Python/pytorch/pyro reimplementation of the LeafCutter differential splicing test. Users (including us!) often had problems installing the RStan based package.You should be able to install withpython -m pip install leafcutter.The installation process will installleafcutter-clusterandleafcutter-dsas command line tools.Annotation-free quantification of RNA splicing.Leafcutter quantifies RNA splicing variation using short-read RNA-seq data. The core idea is to leverage spliced reads (reads that span an intron) to quantify (differential) intron usage across samples. The advantages of this approach includeeasy detection of novel intronsmodeling of more complex splicing events than exonic PSIavoiding the challenge of isoform abundance estimationsimple, computationally efficient algorithms scaling to 100s or even 1000s of samplesFor details please see ourbioRxiv preprintand correspondingNature Genetics publication.Additionally, for full details on the leafcutter for Mendelian Diseases (leafcutterMD) method that performs outlier splicing detection, see ourBioinformatics publication.Full documentation is available athttp://davidaknowles.github.io/leafcutter/If you have usage questions we've setup a Google group here:https://groups.google.com/forum/#!forum/leafcutter-usersWe've developed a leafcuttershinyapp for visualizing leafcutter results: you can view an examplehere. This shows leafcutter differential splicing results for a comparison of 10 brain vs. 10 heart samples (5 male, 5 female in each group) fromGTEx.
Package: leaf-eval-tools
leaf-eval-toolsIntroductionA project that provides eval tools that can be used byleaf-playgroundbased projects.Tools Introductionleaf_eval_tools.oai_eval_worker.OaiEvalWorker: using openai client to evaluateleaf_eval_tools.ragas_eval_worker.RagasEvalWorker: a wrapper toragas.evaluateleaf_eval_tools.regex_answer_extractor.RegexAnswerExtractor: a helper to extract answers that match the specified patterns from textInstallationpip install leaf-eval-toosUsageTBD;Maintainers@PanQiWei;@Pandazki.RoadmapTBD;
Package: leaf-focus
leaf-focusExtract structured text from pdf files.InstallInstall from PyPI using pip:pipinstallleaf-focusDownload theXpdf command line toolsand extract the executable files.Provide the directory containing the executable files as--exe-dir.Usageusage: leaf-focus [-h] [--version] --exe-dir EXE_DIR [--page-images] [--ocr]
                  [--first FIRST] [--last LAST]
                  [--log-level {debug,info,warning,error,critical}]
                  input_pdf output_dir

Extract structured text from a pdf file.

positional arguments:
  input_pdf             path to the pdf file to read
  output_dir            path to the directory to save the extracted text files

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --exe-dir EXE_DIR     path to the directory containing xpdf executable files
  --page-images         save each page of the pdf as a separate image
  --ocr                 run optical character recognition on each page of the
                        pdf
  --first FIRST         the first pdf page to process
  --last LAST           the last pdf page to process
  --log-level {debug,info,warning,error,critical}
                        the log level: debug, info, warning, error, criticalExamples# Extract the pdf information and embedded text.leaf-focus--exe-dir[path-to-xpdf-exe-dir]file.pdffile-pages# Extract the pdf information, embedded text, an image of each page, and Optical Character Recognition results of each page.leaf-focus--exe-dir[path-to-xpdf-exe-dir]file.pdffile-pages--ocrDependenciesxpdfkeras-ocrTensorflow(can optionally be run more efficientlyusing one or more GPUs)
Package: leafmaptools
leafmaptoolsA Python package for building a tool widgets infrastructure with ipyleaflet and ipywidgetsFree software: MIT licenseDocumentation:https://leafmaptools.gishub.orgFeaturesFor now the the Wiki contains somefeature ideas. Early prototypes can be found in theprototypesfolder. The following image is a sneak preview:CreditsThis package was created withCookiecutterand thegiswqs/pypackageproject template.
Package: leafnlp
LeafNLP - A package for domain specific natural language processingThis repository contains codes for LeafNLP.InstallationUsepipto install LeafNLP. Run:pip install leafnlpUsagefrom leafnlp.nlp.named_entity_recogonition.bert import modelNER
from pprint import pprint

model = modelNER()
input_text = [{"text": "The storm hits New York."}]
input_text = ["The storm arrived at New York."]

results = model.annotate(input_text)
results = model.annotate_raw_dump(input_text, top_n=10)Available ModelsTaskModelmodel_paramNoteNERBERTmodel_ner_bert_conll2003EDBERTmodel_ed_bert_maven2020NER: Named Entity Recogonition.ED: Event Detection.AcknowledgementsLeafNLPis maintained by the LeafNLP Team.
Package: leaf-properties
This is a library for extracting structural properties about tree leaves represented by point clouds.The lidar_leaf_properties library is being developed as part of my PhD research, supervised by Dr. Mat Disney, in the Department of Geography at University College London (UCL). My research
is funded through Science Without Borders from the National Council of Technological and Scientific Development (10.13039/501100003593) – Brazil (Process number 233849/2014-9).Any questions or suggestions, feel free to contact me using one of the following e-mails:matheus.boni.vicari@gmail.comormatheus.vicari.15@ucl.ac.ukTo-Do:
- Add documentation
- Add tests
Package: leaf.py
#Welcome to the LeafPy framework.UseageLeafPy-admin.py <project name (in English)> <project creation path (not required)>.Example:"LeafPy-admin.py testweb" is to create a testweb project in the current directory.Recent ChangesVersion 1.1.1 - 2019/12/24Fix some default template issueVersion 1.1.0 - 2019/12/19Increase database compatibility with older versionsFix some Database issueFix some bugsVersion 1.0.8 - 2019/12/19Fix bug when session store is set to noneVersion 1.0.7 - 2019/12/19Fix the bug that the deployment path does not take effectFix the bug that the default template cannot be cached normallyVersion 1.0.6 - 2019/12/18Fix a can't render to template bug for default TemplateFix DiskStore Session Permission denied bugVersion 1.0.2 - 2019/12/18Fix lost LeafPy-admin.py Script on setupAdd some Example to demo projectVersion 1.0.1 - 2019/12/17Support >= Python2.7Add redis session support.Add jinja2, mako, genshi Templater SupportOptimize Database operations, support TransactionFix some bugsVersion 1.0.0 - 2016Because of learning python, I like python, but I haven't found a suitable python web framework for myself, so I refer to some of my favorite features of commonly used frameworks on the Internet, and wrote the first rough LeafPy framework.
Package: leafQR
leafA Simple QR-Code GeneratorLeaf v.0.1By NoobScienceLeaf is a simple Qr-COde Generator. It is light weight, easy to use, private and secure.Leaf is a simple python program I wrote to learn python. It is actually quite usefulDownloadFor the non compiled version and source code downloadleaf_source_code.zipFor the portable zip version, downloadLeaf_v.0.1.zipFor the Setup.exe downloadLeaf_v.0.1.exeScreenShotUsageTo Use it, Enter the data you want to encode and enter the name of the qr-codeThen click generate.Once you generate the QR-Code, just click the open button to open the QR-CodeThe Qr-Codes are Generated in the directory you store leaf. You can regularly clear all the png file by choosing the option
to delete all QR-code in the Edit menu.Future releasesLeaf_v.1.1 has the option to generate the Qr-Code in temp directory by deflaut.Hope you enjoy using Leaf.
Package: leafy
Leafy Graph LibraryLeafy is a python graph library written in cython. This mix gives the speed of writing
the library in c with the benefit of python bindings.UsageGraph ObjectsLeafy supports Sparse Graphs, these create Adjacencey lists underneath.To instantiate a graph object we need to know the number of nodes (verticies) in the
graph, and if the graph is directed. Graphs defualt to undirected.fromleafyimportGraphg=Graph(4,True)g.add_edge(0,1)g.add_edge(2,3)g.add_edge(2,1)g.listSearchLeafy can run Depth First Search (DFS) and Breadth First Search (BFS) on a graph and
return the graph search properties.To run a search we need to define the graph to search and the node to start from.
Before you can view the properties we must call.run().fromleafy.searchimportDFSdfs=DFS(g,0)dfs.run()dfs.simple_path(12)dfs.bridgesDigraphsFor diagraphs leafy supports DFS which can be imported fromleafy.digraphfromleafy.digraphimportDFSdfs=DFS(g,0)dfs.run()dfs.is_dagdfs.topological_order()Shortest DistanceFor network shortest path leafy supports single source Dijkstra which can be imported fromleafy.shortest_pathfromleafy.shortest_pathimportDijkstradij=Dijkstra(g,0)dij.run()dij.path(3)
Package: league-client
league-clientleague-client is a python package to communicate with riot client and league client.Installationpip install league-clientKnown LimitationsRSO does not work in python3.6ExampleDefine paths>>> riot_exe = 'C:\\Riot Games\\Riot Client\\RiotClientServices.exe'
>>> riot_lockfile = 'C:\\Users\\sandbox\\AppData\\Local\\Riot Games\\Riot Client\\Config\\lockfile'
>>> league_lockfile = 'C:\\Riot Games\\League of Legends\\lockfile'Log in>>> from league_client.shortcuts import login
>>> login(
...         'username',
...         'password',
...         riot_exe,
...         riot_lockfile,
...         league_lockfile,
...         captcha_service,
...         captcha_api_key,
...     )
05/10/2022 12:18:09 PM - INFO - Logging in...
05/10/2022 12:18:18 PM - INFO - Waiting for session...
05/10/2022 12:18:22 PM - INFO - Session state: IN_PROGRESS
05/10/2022 12:18:28 PM - INFO - Session state: SUCCEEDED
05/10/2022 12:18:28 PM - INFO - Checking username...
{'ok': True}Change LogAdd option to pass custom user agent and cookies.
Package: leagueclientlivedata
League Client Live Data ApiAn async api wrapper for thegame client apifrom league of legends.
For every endpoint there is a pydantic BaseModel that represents the data from the response of the request.SetupInstallationgitclonehttps://github.com/Plutokekz/LeagueClientLiveDataApi.git
poetryinstallUsageGet the events from your current gamefrompathlibimportPathfromlive_client_dataimportLeagueClientLiveDataApiif__name__=="__main__":config_file=Path("config.yaml")api=LeagueClientLiveDataApi()asyncdefmain():whileTrue:data=awaitapi.event_data()print(data)api.loop.run_until_complete(main())Configthe config file contains currently 2 entries on for the api endpoint and one for the
ssl certificate of riot games. You can download the file fromhere.cert_file:"riotgames.pem"url:"https://127.0.0.1:2999/liveclientdata"
Package: league-connection
league-connectionleague-connection is a python package to communicate to riot client and league client.Installationpip install league-connectionExamplesLogging in (Riot Client)>>> import os
>>> from league_connection import LeagueConnection
>>> lockfile = os.path.expanduser('~\\AppData\\Local\\Riot Games\\Riot Client\\Config\\lockfile')
>>> connection = LeagueConnection(lockfile, timeout=10)
>>> data = {'username': 'yourusername', 'password': 'yourpassword', 'persistLogin': False}
>>> res = connection.put('/rso-auth/v1/session/credentials', json=data)
>>> res.status_code
201Change summoner icon (League Client)>>> from league_connection import LeagueConnection
>>> lockfile = 'C:\\Riot Games\\League of Legends\\lockfile'
>>> connection = LeagueConnection(lockfile, timeout=10)
>>> data = {'profileIconId': 1}
>>> res = connection.put('/lol-summoner/v1/current-summoner/icon', json=data)
>>> res.status_code
201