Saravanan666/pypi-org huggingface dataset:
Package: grmpy
grmpy is a Python package for the simulation and estimation of the generalized Roy model.grmpygrmpyis an open-source Python package for the simulation and estimation of the generalized Roy model. It serves as a teaching tool to promote the conceptual framework of the generalized Roy model, illustrate a variety of issues in the econometrics of policy evaluation, and showcases basic software engineering practices.Marginal Treatment Effects (MTE) can be estimated based on a parametric normal model or,
alternatively, via the semiparametric method of Local Instrumental Variables (LIV).You can installgrmpyeither via pip$ pip install grmpyOr download it directly from our GitHub repository and install the package in editable mode$ git clone https://github.com/OpenSourceEconomics/grmpy.git
$ pip install -e .Quick StartInitialization Filegrmpyrelies on an"initialization.yml"file (referred to asìnit_filebelow)
to perform both simulation and estimation.
For example, check out these twoinit_filesforsimulation and parametric estimationas well as
asemiparametric estimationsetup.Below you'll find some example code you can copy to jump-start your project.Simulationimport grmpy

# Specify the initilaization file you want to use, e.g.:
init_file = "ProjectFiles/simulation.yml"

data = grmpy.simulate(init_file)Estimationimport grmpy

# Specify the initilaization file you want to use, e.g.:
init_file = "ProjectFiles/estimation.yml"

# Parametric Normal Model
rslt = grmpy.fit(init_file, semipar=False)
grmpy.plot_mte(rslt, init_file, color="blue", semipar=False, save_plot="MTE_par.png")

# Local Instrumental Variables (Semiparametric Model)
rslt = grmpy.fit(init_file, semipar=True)
grmpy.plot_mte(rslt, init_file, color="orange", semipar=True, nboot= 250, save_plot="MTE_semipar.png")Please visit ouronline documentationfor tutorials and more.
Package: gRNA-create
gRNA CreatorDescriptionHere, I present a tool to create gRNAs for a myriad of different Cas enzyme. gRNAs have the option to also be designed to be specific against certain targets. This is especially useful for the diagnostic application of gRNAs, where it is imperative to discriminate between wild-type and mutant targetsInstallationgit clone https://github.com/ArmaanAhmed22/gRNA_createcd gRNA_createpython -m pip install . -r requirements.txtUsageCreating gRNAs against target:fromgRNA_create.gRNAimportgRNA_FactoryfromgRNA_create.pamimport*fromgRNA_create.gRNA_scorerimportCFDScorerfromgRNA_create.utilsimportsensitivitypam=PAM(End(3),"NGG")#PAM for SpCas9scorer=CFDScorer()#The scoring algorithm for target-gRNA mismatchesgRNA_length=20factory=gRNA_Factory(pam,gRNA_length,scorer)gRNA_DataFrame=factory.create_gRNAs(genomes_target="path/to/targets/dir",scoring_metric=sensitivity,# metric to measure how "good" any given gRNA isgenomes_miss="path/to/misses/dir",# [OPTIONAL]pam_minimum_prevalence=0.8# [OPTIONAL] | The PAM prevalence in targets needed to keep any gRNAs)Creating
Package: gRNAsearch
Search for guide RNA sites in PCR tagsUsageInstall the package version through pippip install gRNAsearchfrom grnasearch.gRNA import searchsummary, frames = search(syn="../seq.fa", tag="../tag.csv", save=True, output_dir="~", output_name="gRNA")Parameterssearch(syn, tag, save=True, output_dir='~', output_name="gRNA"):syn: full path to sequence file in '.fa' formattag: PCR tag filesave: save the outputs in csv (default=True)output_dir: output directory (full path) to save the files (default='~')output_name: name of the output file (default="gRNA")Outputssummary: the search results data frameframes: the intermediate data frame with WT sequences
Package: grn-dazzle
DAZZLEThis repository include code and documentation for our manuscript "Improving Gene Regulatory Network Inference using Dropout Augmentation".InstallThis package is available on pippip install grn-dazzleBasic UsageThe core functionrunDAZZLErequires the following two things to get started:Single cell gene expression table. We suggest you use log transformation to normalize the dataExperiment Configs. We also provide two sets of default configs with this package, namelyDEFAULT_DAZZLE_CONFIGSandDEFAULT_DEEPSEM_CONFIGS. They are just two python dictionaries. If you need to make modifications, just save them to a variable and adjust the values.Quick Examplefrom dazzle import load_beeline, runDAZZLE, get_metrics, DEFAULT_DAZZLE_CONFIGS


bl_data, bl_ground_truth = load_beeline(
    data_dir='data', 
    benchmark_data="hESC", 
    benchmark_setting="500_STRING"
)

model, adjs = runDAZZLE(bl_data.X, DEFAULT_DAZZLE_CONFIGS)

get_metrics(model.get_adj(), bl_ground_truth)
Package: grnhse-api
grnhse-apiA python wrapper for theGreenhouseAPIs.For now, only theHarvest APIis supported.Installation$ pip install grnhse-apiBasic UsagefromgrnhseimportHarvestapi_key='ABCDE12345'hvst=Harvest(api_key)# <Harvest API v1>depts=hvst.departmentsdepts# <Departments Endpoint>depts.get()# [{'id': 1234,#   'name': 'Administration',#   'parent_id': None,#   'child_ids': [],#   'external_id': None},#  {'id': 2345,#   'name': 'Operations',#   'parent_id': None,#   'child_ids': [],#   'external_id': None},#  {'id': 3456,#   'name': 'Engineering',#   'parent_id': None,#   'child_ids': [],#   'external_id': None},#   ...]depts.get(1234)# {'id': 1234,#  'name': 'Administration',#  'parent_id': None,#  'child_ids': [],#  'external_id': None}admin=depts(1234)admin# <Departments Endpoint (id=1234)>admin.get()# {'id': 1234,#  'name': 'Administration',#  'parent_id': None,#  'child_ids': [],#  'external_id': None}hvst.departments(1234).get()# {'id': 1234,#  'name': 'Administration',#  'parent_id': None,#  'child_ids': [],#  'external_id': None}PaginationfromgrnhseimportHarvestapi_key='ABCDE12345'hvst=Harvest(api_key)apps=hvst.applicationsapps# <Applications Endpoint>all_apps=apps.get()len(all_apps)# 100apps.records_remaining# Truewhileapps.records_remaining:all_apps.extend(apps.get_next())len(all_apps)# 437# Using list comprehensionall_apps=[appforpageinappsforappinpage]len(all_apps)# 437CHANGELOG0.1.1 (2020-12-10)Update:requestspackage pinned to newer versionsUpdate: adds thecustom_fieldsendpointBugfix: replaceNonewith empty string inSessionAuthMixin0.1.0 (2018-11-10)initial release
Package: gr-nlp-toolkit
gr-nlp-toolkitA Transformer-based Natural Language
Processing Pipeline for Greek. This toolkit has state-of-the art accuracies in Greek
and offers predictions
for Named Entity Recognition, Part-of-Speech tagging, Morphological Tagging
as well as Dependency Parsing.InstallationYou can install the toolkit by executing the following in the command line:pipinstallgr-nlp-toolkitUsageTo use the toolkit first initialize a Pipeline specifying which processors you need. Each processor
annotates the text with a specific task's annotations.To obtain Part-of-Speech and Morphological Tagging annotations add theposprocessorTo obtain Named Entity Recognition annotations add thenerprocessorTo obtain Dependency Parsing annotations add thedpprocessorfromgr_nlp_toolkitimportPipelinenlp=Pipeline("pos,ner,dp")# Use ner,pos,dp processors# nlp = Pipeline("ner,dp") # Use only ner and dp processorsThe first time you use a processor, that processors data files are cached in the .cache folder of
your home directory so you will not have to download them again.Generating the annotationsAfter creating the pipeline you can annotate a text by calling the pipeline's__call__method.doc=nlp('Η Ιταλία κέρδισε την Αγγλία στον τελικό του Euro το 2021')ADocumentobject is then created and is annotated. The original text is tokenized
and split to tokensAccessing the annotationsThe following code explains how you can access the annotations generated by the toolkit.fortokenindoc.tokens:token.text# the text of the tokentoken.ner# the named entity label in IOBES encoding : strtoken.upos# the UPOS tag of the tokentoken.feats# the morphological features for the tokentoken.head# the head of the tokentoken.deprel# the dependency relation between the current token and its headtoken.neris set by thenerprocessor,token.uposandtoken.featsare set by theposprocessor
andtoken.headandtoken.deprelare set by thedpprocessor.A small detail is that to get theTokenobject that is the head of another token you need to accessdoc.tokens[head-1]. The reason for this is that the enumeration of the tokens starts from 1 and when the
fieldtoken.headis set to 0, that means the token is the root of the word.
Package: grnpy
GRNPY - Gene Regulatory Network .pyThis python package aims to be a Gene Regulatory Network Graph generator that is fully customizable parameters such as sparsity, directed graphs, weight of edges, type of system (binary or spin) and etc.Aug 23: Work in progresstake adictorlistoflistsas input and converting them to graphstake a graph as an input to the systemUsageIn the terminal, type:pip install grnpyIn the code, import grnpy and the classBoltzmannGRNfrom grnpy import BoltzmannGRNFunctionsGenerate_Gene_Network(self, n, sparsity, on_p, directed):Generates a graph based on the parameters :n- int - number of nodessparsity- float - define the sparsity of the graph (1 being sparse, and 0 being dense) [0,1]on_p- float - the probability of a node being on at the beginning [0,1]directed- bool - if the graph is directedreturns graphmake_wmatrix(self, G, size, weight):Generates an edge weight matrixsize- int - size of the graphweight- defined set weight of the graph (going to be removed or chagned in later versions)returns np arraygetHit(self, G, gene_i, field)Generates the h value at timestep t for node ireturns H_{i,t}probability(self, G, gene, hit, field)returns probability of a node being at state "1"returns pchange_state(self, G, field)Updates the state of all nodes in Greturns NONEstate(self, G, node)returns the state of node n in graph G
returns state(node)update(self, size, G, timesteps, field)For each timestep, iterate through all nodes in G and update their statetimestep- int - number of timesteps to be updatedsize- int - size of the graphG- nx.Graph - Graph of nodesfield- float - constant that is added as a probablitytime- list - list of timestepsstates_mean- list - mean state value across timestepslist_states- list - list of list containing the specific states of each node for each timestepreturns time, states_mean, list_statesshow_plot(self, time, states_mean)shows plot of state transitionsDefine and UseDefine the modelBoltzmannModel = BoltzmannGRN(size, gene_start_probability, weight, sparsity, directed, 'binary')Define the graphBoltzmannGraph = BoltzmannModel.graphDrawing the graphnx.draw(BoltzmannGraph)
plt.show()Run the state transition modeltime, states_mean, states = BoltzmannModel.update(size, BoltzmannGraph, 100, field)
Package: grobid
grobidPython library for serializing GROBID TEI XML todataclassesInstallationUsepipto install:$pipinstallgrobid
$pipinstallgrobid[json]# for JSON serializable dataclass objectsYou can also download the.whlfile from the release section:$pipinstall*.whlUsageClientIn order to convert an academic PDF to TEI XML file, we use GROBID's REST
services. Specifically theprocessFulltextDocumentendpoint.frompathlibimportPathfromgrobid.models.formimportForm,Filefromgrobid.models.responseimportResponsepdf_file=Path("<your-academic-article>.pdf")withopen(pdf_file,"rb")asfile:form=Form(file=File(payload=file.read(),file_name=pdf_file.name,mime_type="application/pdf",))c=Client(base_url="<base-url>",form=form)try:xml_content=c.sync_request().content# TEI XML file in bytesexceptGrobidClientErrorase:print(e)wherebase-urlis the URL of the GROBID REST serviceYou can usehttps://cloud.science-miner.com/grobid/to testFormTheFormclass supports most of the optional parameters of the processFulltextDocument
endpoint.ParserIf you want to serialize the XML content, we can use theParserclass to
createdataclassesobjects.Not all of the GROBID annoation guidelines are met, but compliance is a goal.
See#1.fromgrobid.teiimportParserxml_content:bytesparser=Parser(xml_content)article=parser.parse()article.to_json()# raises RuntimeError if extra require 'json' not installedwherexml_contentis the same as inClient sectionAlternately, you can load the XML from a file:fromgrobid.teiimportParserwithopen("<your-academic-article>.xml","rb")asxml_file:xml_content=xml_file.read()parser=Parser(xml_content)article=parser.parse()article.to_json()# throws RuntimeError if extra require 'json' not installedWe useorjsonto provide a methodto_jsonto
serialize the dataclasses into JSON. By default, orjson isn't installed, usepip install grobid[json].LicenseMITContributingYou are welcome to add missing features by submitting a PR, however, I won't be
accepting any requests other than GROBID annotation compliance.DisclaimerThis module was originally part of a group university project, however, all the
code and tests was also authored by me.
Package: grobid2json
Grobid2JsonExtract the code to parse grobid xml into json from the s2orc-doc2json project and package it as a pypi package.✨ FeaturesProcess the XML files parsed by Grobid into JSON format.📦 Installationpipinstallgrobid2json🤯 Usagefrombs4importBeautifulSoupfromgrobid2jsonimportconvert_xml_to_jsonfile_path="test.xml"withopen(file_path,"rb")asf:xml_data=f.read()soup=BeautifulSoup(xml_data,"xml")paper_id=file_path.split("/")[-1].split(".")[0]paper=convert_xml_to_json(soup,paper_id,"")json_data=paper.as_json()print(json_data)🔗 LinksCreditss2orc-doc2json-https://github.com/allenai/s2orc-doc2json📝 LicenseThis project isApache License 2.0licensed.
Package: grobid-client
grobid-clientA client library for accessingGrobidUsageFirst, create a client:fromgrobid_clientimportClientclient=Client(base_url="https://cloud.science-miner.com/grobid/api")Now call your endpoint and use your models:frompathlibimportPathfromgrobid_client.api.pdfimportprocess_fulltext_documentfromgrobid_client.modelsimportArticle,ProcessFormfromgrobid_client.typesimportTEI,Filepdf_file="MyPDFFile.pdf"withpdf_file.open("rb")asfin:form=ProcessForm(segment_sentences="1",input_=File(file_name=pdf_file.name,payload=fin,mime_type="application/pdf),)r=process_fulltext_document.sync_detailed(client=client,multipart_data=form)ifr.is_success:article:Article=TEI.parse(r.content,figures=False)assertarticle.titleThings to know:Every path/method combo becomes a Python module with four functions:sync: Blocking request that returns parsed data (if successful) orNonesync_detailed: Blocking request that always returns aRequest, optionally withparsedset if the request was successful.asyncio: Likesyncbut the async instead of blockingasyncio_detailed: Likesync_detailedby async instead of blockingAll path/query params, and bodies become method arguments.If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)Any endpoint which did not have a tag will be inentifyfishing_client.api.defaultBuilding / publishing this ClientThis project usesPoetryto manage dependencies  and packaging.  Here are the basics:Update the metadata in pyproject.toml (e.g. authors, version)If you're using a private repository, configure it with Poetrypoetry config repositories.<your-repository-name> <url-to-your-repository>poetry config http-basic.<your-repository-name> <username> <password>Publish the client withpoetry publish --build -r <your-repository-name>or, if for public PyPI, justpoetry publish --buildIf you want to install this client into another project without publishing it (e.g. for development) then:If that projectis using Poetry, you can simply dopoetry add <path-to-this-client>from that projectIf that project is not using Poetry:Build a wheel withpoetry build -f wheelInstall that wheel from the other projectpip install <path-to-wheel>
Package: grobid-quantities-client
Python client to query theGrobid Quantities service APIFor more information about Grobid Quantities, please check theGrobid Quantities Documentation.InstallationThe client can be installed usingpip:pip install grobid-quantities-clientCommand Line Interface (CLI)The CLI follows the following parameters:python -m grobid_quantities.quantities --help
usage: quantities.py [-h] --input INPUT [--output OUTPUT] [--base-url BASE_URL] [--config CONFIG] [--n N] [--force] [--verbose]

Client for the Grobid-quantities service

optional arguments:
  -h, --help           show this help message and exit
  --input INPUT        path to the directory containing PDF files or .txt (for processCitationList only, one reference per line) to process
  --output OUTPUT      path to the directory where to put the results (optional)
  --base-url BASE_URL  Base url of the service (without the suffix `/service/`)
  --n N                concurrency for service usage
  --force              force re-processing pdf input files when tei output files already existAPI UsageInitialisation:from grobid_quantities.quantities import Quantities
client = QuantitiesAPI(base_url=http(s)://server_url:port/base/url)Process raw text:client.process_text(
    "I lost two minutes"
)Process PDF document:client.process_pdf(pdfFile)Parse the measurements:client.parse_measures("from": "10", "to": "20", "unit": "km")The response is a tuple where the first element is the status code and and the second element the response body as a dictionary.
Here an example:(
     200,
     {
       "runtime": 123,
       "measurements": [
         {
           "type": "value",
           "quantity": {
             "type": "time",
             "rawValue": "two",
             "rawUnit": {
               "name": "minutes",
               "type": "time",
               "system": "non SI",
               "offsetStart": 11,
               "offsetEnd": 18
             },
             "parsedValue": {
               "numeric": 2,
               "structure": {
                 "type": "ALPHABETIC",
                 "formatted": "two"
               },
               "parsed": "two"
             },
             "normalizedQuantity": 120,
             "normalizedUnit": {
               "name": "s",
               "type": "time",
               "system": "SI base"
             },
             "offsetStart": 7,
             "offsetEnd": 11
           }
         }
       ]
     }
)
Package: groc
GrocStreamline your purchase historyGroc is a Python CLI designed to help you keep track of purchases. You can enter data manually or via csv, and view various purchase stats.Installing ✨Install and update groc using pip:pip install grocGroc officially supports Python 3.7.Usagegroc [COMMAND] [flags]See alsogroc --help.Commandsinit🔮Create a groc database in user's home directory. If a database already exists, the command will abort.To see detailed output, use the--verboseflag.groc initadd📝Add a purchase to the groc database manually or by reading in a file or directory.To enter purchase data manually, use the flags--date,--total,--store,--description.
The--dateflag is optional and can be omitted(the current date will be used).
The--descriptionflag is optional and can be omitted.To enter purchases via file or directory, use the--sourceflag provided with the path. Only csv files are currently supported.Adding a purchase that already exists will abort the action, unless the--ignore-duplicateflag is passed; this can be especially useful when adding purchases from a file
or multiple files.groc add --date 2019-01-01 --total 20.00 --store "Awesome Cakes" --description "birthday cake"

groc add --source ./my-purchases/january.csv

groc add --source ./my-purchases/ --ignore-duplicatedelete🗑Delete a purchase by id by passing the--id,-iflag. Multiple id flags can be passed.Passing the flag--dry-runwill output purchases to be deleted without actually deleting it.To see complete purchase details of a purchase, use the--verboseflag.groc delete --id 2 --dry-runbreakdown📊Provides a breakdown of purchases for the current month and year categorized by month.Target specific months by passing one or multiple month flags like--month,-mor years like--year,-y.To see extended stats, use the--verbose.groc breakdown

groc breakdown --month=01 --month=03 --year=2019list🔍Lists the latest 50 purchases by default, unless otherwise specified by the--limitflag.View purchases for a specific month by passing in--month,-mflag, optionally with a year with the--year,-yflag.
To see all purchases of a month, pass the--all,-aflag.To see detailed output, such as purchase id, use the--verboseflag.groc list --limit 10

groc list -m 02 --allreset🚽Reset a groc database by deleting all entries. The database and schema will not be deleted, so this does not require an init from the user.Passing the--dry-runflag will output the purchase count to be reset.groc reset --verbose
Package: grocery
grocerygrocery is a toolkit which is collected on my daily work.RequirementsYou will need the following prerequisites in order to use grocery:Python 3.6+InstallationTo install grocery:.. code-block:: bash$ pip install groceryIntroductionlist_ext which an enhancement of built-in list objects. It can filter the dict-list.
e.g.: You have the following dict-list, and want to filter the items which are 'a' > 3 and 'b' >= 4:dict of list:dict_of_list = [
    {'a': 1, 'b': 2},
    {'a': 4, 'b': 3},
    {'a': 3, 'b': 8},
    {'a': 6, 'b': 10},
    {'a': 2, 'b': 9}
 ]Usage:from grocery.builtins_ext import list_ext
l = list_ext(dict_of_list)
for item in l.filter_dict(a__gt=3, b__ge=4):
    print(item)
    
# output: {'a': 6, 'b': 10}Other introduction is coming
Package: grocery-helpers
Online grocery storeshttps://www.walmart.ca/en/grocery/https://realcanadiansuperstore.ca/https://www.loblaws.ca/https://www.zehrs.ca/https://www.valumart.ca/https://www.wholesaleclub.ca/https://www.instacart.ca/https://www.grocerygateway.com/https://www.metro.ca/
Package: grocery-list
grocery-listpip install grocery-listSilly package to compile a shopping list.The ingredients dictionary's keys are categories (e.g., fruits, vegetables, bakery, etc.) and their values are lists of shopping items (e.g., apple, potato, bread, etc.). A second dictionary contains recipes whose keys are the name of a meal and whose values are lists of ingredients, each of which can be a shopping item or another recipe.Just fork and editingredients.pyandrecipes.pyas you wish.Example:from grocery_list import *
grocery_list('beans on toast')Output:{'bakery': ['bread'], 'dairy': ['butter'], 'tins': ['baked beans']}
Package: grocker
Grocker - a Docker image builder for Python applicationsGrockerallows you to bundle your Python applications as Docker image
while keeping the image size as minimal as possible.Grockerusesdebian:buster,debian:bookwormoralpine:latestas its
base image.Grockeris hosted on Github athttps://github.com/polyconseil/Grocker.Grockerfull documentation is available onhttps://grocker.readthedocs.io/.InstallationInstall Docker Engine. Seeits official documentation.Install Grocker withpip:pip install grocker.Basic usage$grockerbuildipython==5.0.0--entrypointipython$dockerrun--rm-tiipython:5.0.0-<grocker-version>Direct wheel pathA wheel can also be directly passed to grocker to avoid the need to upload an artefact to
build an image.Grocker will switch to this mode if a/is present in the argument. Pipextrarequirements can be used in this mode.$grockerbuild./path/to/ipython-7.1.1-py3-none-any.whl[doc]--entrypointipython$dockerrun--rm-tiipython-doc:7.1.1-<grocker-version>