Saravanan666/pypi-org huggingface dataset:
Package: grain-scheduler
GrainA scheduler for resource-aware parallel external computing on clusters.Installpipinstallgrain-schedulerOverviewDask-likeasync-native delayed objects for you to run jobs in an arbitary mix of parallel and sequential manner.fromgrain.delayedimportdelayedfromgrain.resourceimportCores@delayedasyncdefidentity(x):# Access what CPU(s) have been allocated for usn_cpu,cpus=GVAR.res.N,','.join(map(str,GVAR.res.c))# Pretend that we are doing something seriously ...awaittrio.run_process(f'mpirun -np{n_cpu}--bind-to cpulist:ordered --cpu-set{cpu}sleep 1')returnx@delayedasyncdefweighted_sum():# Run the expensive function **remotely** (on a worker) by demanding resource 1 CPU core# Note that `r_` is a Future, or a placeholder of the return valuer_=(identity@Cores(1))(0)# Futures are composable# Composition implies dependency / parallelization opportunityr_+=(identity@Cores(1))(1)*1+(identity@Cores(1))(2)*2# Block until all dependencies finish, then return the composed valuereturnawaitr_# Or do the same in a fancier way#return await sum(#    (identity @ Cores(1))(i) * i for i in range(3)#)# Run the cheap, orchestrating function **locally**print(await(weighted_sum()+weighted_sum()))# Output: 10Check outtutorialfor complete demos and how to set up workers.Resource-awarenessEvery job in the job queue has a resource request infomation along with the job to run. Before the executor run each job, it inspects each worker for resource availability. If resource is insufficient, the job queue is suspended until completed jobs return resources. Resources can be CPU cores, virtual memory, both, (or anything user defined following interfacegrain.resource.Resource).Every time a job function runs, it has access toGVAR.res, acontext-local variablegiving the information of specific resource dedicated to the job. (e.g. if a job is submitted withCores(3), asking for 3 CPU cores, it might receive allocation likeCores([6,7,9]).)Ergonomic user interfaceAsync-native API introduces minimal changes to the serial code, while enabling access to the entire Python async ecosystem accommodating complex workflows.Minimal configuration is needed for migrating to a new supercomputing cluster (See sample configs in theexample/dir). When running, thegraincommandline helper provides easy access to dashboard and worker scaling.
Package: grains-cow-fortune
** A simple example of a vertically app merged grains project **INSTALLATIONWith git:git clone https://gitlab.com/saltstack/pop/grains.git
pip install -e grainsWith pip:pip install corn_cowsayEXECUTIONAfter installation thegrainscommand should now be available if it wasn’t alreadyTESTINGinstallrequirements-test.txtwith pip and run pytest:pip install -r grains/requirements-test.txt
pytest grains/testsVERTICAL APP-MERGINGInstructions for extending grains like this project doesInstall pop:pip install --upgrade popCreate a new directory for the project:mkdir grains_{project}
cd grains_{project}Usepop-seedto generate the structure of a project that extendsgrains:pop-seed -t v pop_{kernel} -d grains“-t v” specifies that this is a vertically app-merged project“-d grains” says that we want to implement the dynamic name of “grains”Add “grainsv2” to the requirements.txt:echo "grainsv2" >> requirements.txtNote* url based reqs aren’t supported on older versions of setuptools
To pip install your vertically app-merged project install grains manually:pip install -e git+https://gitlab.com/saltstack/pop/grains.git#egg=grainsv2And that’s it!  Go to town extending grains
Follow the conventions you see in gitlab.com/satlstack/pop/grains
Package: grains-universal
Grains, execution modules, and state modules common to all systemsINSTALLATIONInstall with pip:pip install grains-universalDEVELOPMENT INSTALLATIONClone thegrains-universalrepo and install with pip:git clone https://gitlab.com/saltstack/pop/grains-universal.git grains_universal
pip install -e grains_universalEXECUTIONAfter installation thegrainscommand should now be availableTESTINGinstallrequirements-test.txtwith pip and run pytest:pip install -r grains-universal/requirements-test.txt
pytest grains-universal/testsVERTICAL APP-MERGINGInstructions for extending grains-universal into an OS or distro specific pop projectInstall pop:pip install --upgrade popCreate a new directory for the project:mkdir idem-{specific_platform}
cd idem-{specific_platform}Usepop-seedto generate the structure of a project that extendsgrainsandidem:pop-seed -t v idem-{specific_platform} -d grains exec states“-t v” specifies that this is a vertically app-merged project“-d grains exec states” says that we want to implement the dynamic names of “grains”, “exec”, and “states”Add “grains-universal” to the requirements.txt:echo grains-universal >> requirements.txtAnd that’s it!  Go to town making grains, execution modules, and state modules specific to your specific platform.
Follow the conventions you see in grains-universal.For information about running idem states and execution modules check outhttps://idem.readthedocs.io
Package: grainsv2
System information discovery and asset trackingINSTALLATIONpip install grainsv2INSTALLATION FOR DEVELOPMENTClone thegrainsrepo and install with pip:git clone https://gitlab.com/saltstack/pop/grains.git
pip install -e grainsEXECUTIONAfter installation thegrainscommand should now be available.The command will have no output until it is vertically extended (details below).TESTINGinstallrequirements-test.txtwith pip and run pytest:pip install -r grains/requirements-test.txt
pytest grains/testsVERTICAL APP-MERGINGInstructions for extending grainsInstall pop:pip install --upgrade popCreate a new directory for the project:mkdir grains_{project_name}
cd grains_{project_name}Usepop-seedto generate the structure of a project that extendsgrains:pop-seed -t v grains_{project_name} -d grains“-t v” specifies that this is a vertically app-merged project“-d grains” says that we want to implement the dynamic name of “grains”Notice that some structure has been created for you.
We especially care about the new directory ingrains_{project_name}/grainsAdd “grains” to the requirements.txt:echo "grains" >> requirements.txtCREATING GRAINSCreate a new file in “grains_{project_name}/grains”The directory should already have been created bypop-seed.The file name is arbitrary.Every file in this directory, then it’s subdirectories,  will be parsed “simultaneously” (as far as that makes sense for asyncio).Grains that are dependant on each other should be assigned in the same function.Do NOT rely on the collector’s recursion strategy for grains to depend on each other.Usehub.grains.init.wait_for(“grains”)to wait for grains to be generated by another subAdd your new project to the python pathalternatively, run “pip install -e .” from your project’s root directoryyou only need to do this onceCreate an async function in this file with a descriptive yet arbitrary nameBy convention it should start with “load”Make it async unless you have a really really really good reason.Grains that depend on each other already belong in the same function, don’t depend on synchronous programming for determinismUsehub.grains.init.wait_for(“specific_grain”)to explicitly wait for an external grain to become available before moving onGrains can be accessed and assigned like a dictionary, but our convention is to use the namespaceUsehub.grains.GRAINS._dict()orcopy.copy(hub.grains.GRAINS)to retrieve a JSON serializable version of grains.Example:async def load_my_grain(hub):
    hub.grains.GRAINS.new_grain = "Hello World!"And that’s it! Now verify that your grain is collected from the command line:grains new_grainOutput:new_grain:
    Hello World!
Package: grains-virt
Virtualization grains for idem with grainsINSTALLATIONParts ofgrains-virtare dependant onhub.exec.cmd.runwhich exists inside of a few kernel specific idem projects.
Install the appropriateonefor your system to make full use ofgrains-virt:I.E:pip install idem-bsd
pip install idem-darwin
pip install idem-linux
pip install idem-solaris
pip install idem-windowsDEVELOPMENT INSTALLATIONClone thegrains-virtrepo and install with pip:git clone https://gitlab.com/saltstack/pop/corn_virtualization.git grains-virt
pip install -e grains-virtEXECUTIONAfter installation thegrainscommand should now be available:grains virtual virtual_subtype
Package: grai_source_fivetran
Grai Fivetran IntegrationThe Fivetran integration synchronizes metadata from your Fivetran instance into your Grai data lineage graph.TestingUsesfastapi-code-generatorto generate Pydantic base models for the Fivetran API.
More information about code generation can be foundhere.
Additionally, the project Makefile can be used to generate the models.
Package: grai_source_mssql
Grai SQL Server IntegrationThe SQL Server integration synchronizes metadata from your SQL Server database into your Grai data lineage graph.Tests assume you have working installation of pyodbc and a supported
ODBC driver installed on your host machine.Installation NotesInstalling ODBC drivers can be particularly tricky on M1 machines.
You'll need to install the unixodbc drivers through brew firstbrewinstallunixodbcYou can attempt installing pyodbc directly at this point though I was forced to
set LDFLAGS and CPPFlags in my bashrc/zshrc file, i.e.exportLDFLAGS="$LDFLAGS-L$(brew--prefixunixodbc)/lib"exportCPPFLAGS="$CPPFLAGS-I$(brew--prefixunixodbc)/include"At this point you should be able topip install pyodbcsuccessfully
and import the package from within python. However, you'll still require an
ODBC driver in order to connect with an MS SQL server. There are multiple options
for potential drivers but ODBC 18 from Microsoft has worked in testing.brewtapmicrosoft/mssql-releasehttps://github.com/Microsoft/homebrew-mssql-release
brewupdateHOMEBREW_ACCEPT_EULA=Ybrewinstallmsodbcsql18mssql-tools18If you continue to experience issues you might try creating these symlinks
below.sudo ln -s /opt/homebrew/etc/odbcinst.ini /etc/odbcinst.ini
sudo ln -s /opt/homebrew/etc/odbc.ini /etc/odbc.iniWhen installing locally, if you get an error likeImportError: dlopen(/opt/homebrew/lib/python3.11/site-packages/pyodbc.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace (_SQLAllocHandle), you can try uninstallingpip uninstall pyodbcand then reinstall with buildpip install --no-binary :all: pyodbc.
Package: grakn-client
Grakn Client for PythonClient ArchitectureTo learn about the mechanism that a Grakn Client uses to set up communication with databases running on the Grakn Server, refer toGrakn > Client API > Overview.API ReferenceTo learn about the methods available for executing queries and retrieving their answers using Client Python, refer toGrakn > Client API > Python > API Reference.Concept APITo learn about the methods available on the concepts retrieved as the answers to Graql queries, refer toGrakn > Concept API > OverviewInstall Grakn Client for Python through Pippip install grakn-clientIf multiple Python versions are available, you may wish to usepip3 install grakn-clientIn your python program, import from grakn.client:fromgrakn.clientimport*client=Grakn.core_client(address=Grakn.DEFAULT_ADDRESS)
Package: grakn-codex
Codex - Programmatic Knowledge Graph FrameworkWhat is CodexCodex is a Python package that provides a simple, yet powerful API designed to make working with theGraknknowledge graph intuitive.Why develop CodexBuilding, querying, and interrupting results from the Grakn knowledge graph requires expertise in learning the specific query language graql and learning how to use the verbose API.
Codex abstracts away the mundane and tedious aspects of using knowledge graphs, so you can focus on organizing your data and getting answers.Installing CodexDependenciesThe following are dependencies need to properly run Codexdocker (https://docs.docker.com/get-docker/)docker-compose (https://docs.docker.com/compose/install/)python3.6+ (https://www.python.org/downloads/)Installing CodexCodex is compatible with Python 3.6 or later. The simplest way to install Codex and its dependencies is by...gitclonehttps://github.com/banjtheman/grakn-codex.gitcdgrakn-codex
pipinstallgrakn-codexIn addition to the python package, Codex leverages Grakn and the Redis docker images to store data.Quick StartHere's how you can quickly use CodexSetup Databasemkdir-pdata
mkdir-predis_data
docker-composeup-dLoad and queryimportloggingimportpandasaspdfromcodeximportCodexKg#Load csv datadf=pd.read_csv("sample_data/tech_companies.csv")#Make new codex objectcodexkg=CodexKg()#Create new keyspacecodexkg.create_db("tech_example")#Load data into Grakncodexkg.create_entity(df,"Company",entity_key="name")# Find Company that has a name equal to Googleans=codexkg.find(concept="Company",concept_attrs=["name"],concept_conds=["equals"],concept_values=["Google"],)#Display data as a DataFramelogging.info(ans)# {'Company':      name  budget#				0  Google  999.99}For complete documentation on Codex, tutorials and teaching resources, frequently asked questions, and more, please visit ourWiki.Codex WorkbasePowered by the Codex API andStreamlityou can use a web based GUI to interact with your data.To start simply runstreamlitruncodex_st.pyYou can upload dataYou can do queriesYou can make rulesContributing to CodexCodex is an open source project that is supported by a community who will gratefully and humbly accept any contributions you might make to the project. Large or small, any contribution makes a big difference; and if you've never contributed to an open source project before, we hope you will start with Codex!If you are interested in contributing, here are some of the many ways to contribute:Submit a bug report or feature request on GitHub Issues.Assist us with user testing.Add to the documentation or help with our website,Write unit or integration tests for our project.Answer questions on our issues, mailing list, Stack Overflow, and elsewhere.Translate our documentation into another language.Write a blog post, tweet, or share our project with others.Teach someone how to use Codex.As you can see, there are lots of ways to get involved and we would be very happy for you to join us! The only thing we ask is that you abide by the principles of openness, respect, and consideration of others as described in the Python Software Foundation Code of Conduct.
Package: gramadan-py
GramadánPyWith thanks tomichmech (Michal Měchura)![UNOFFICIAL]A pure Python conversion of michmech'sGramadán.Note that, at present, the Python isnotidiomatic. It is intentionally kept similar to
the original C#, although primarily in paradigm. The code here is extensively typed,
and passes both mypy and black checkers.InstallationThis can be installed withpoetry:poetry installThe test suite can be executed, from this directory.TestsIf you do not wish to install or run the .NET setup, you can still execute the pure Python
test suite:poetry run pytest tests/pythonComparison CheckingThis directory contains a tool that can be run:./comparison.shThis has been set up (at present) to run from the working directory.It assumes that you have built the C# Tester.csproj project in the /Tester folder and
that a binary exists at../Tester/bin/Debug/Tester.exePath separators are currently Linux, to simplify visual code comparison, but these can
be made OS-independent.For the purposes of comparison, the followingxbuildwas used:XBuild Engine Version 14.0
Mono, Version 6.8.0.105
Copyright (C) 2005-2013 Various Mono authorsThe command executed in the Tester folder was:xbuildThe equivalent Python was originally compared with Python 3.9.7
Package: gramaddict-beta
GramAddictThe best 100% free forever instagram bot. Grow your following and engagement by liking and following automatically with your Android phone/tablet/emulator. No root required.Full documentation available ondocs.gramaddict.orgTable of contentsIntroductionQuick StartRequirementsHow to InstallRaspberry PiRunning GramAddictConfigurationContributingCommunityFAQContributorsThis project exists thanks to all of our Contibutors [Contribute].BackersThank you to everyone that supports us financially! 🙏 [Become a backer]Talk botty with usDisclaimer: This project comes with no gurantee or warranty. You are responsible for whatever happens from using this project. It is possible to get soft or hard banned by using this project if you are not careful.
Package: gramex
GramexGramexis a low-code data platform: a fast way to build data-based web apps with less code.Gramex takes a component based approach building data apps. (Like LEGO bricks.)
This needs fewer steps, takes less time, and builds apps with fewer bugs.Examples of public data apps built on GramexGetting StartedOnline DocumentationSet up GramexContributingNeed help?Browse the issuesWant to report a bug or request a feature?Open an issue.Want to fix a bug or add a feature?Read the contributing guidelines.
Fork this repo, make changes, test it, and send a pull request.LicenseMIT LICENSEGramener also offers a Gramex Enterprise Server with support, security &
enterprise deployment. Contactlicense@gramener.comfor details.
Package: gramexlayout
Gramex LayoutLayout algorithms for visualizations.Calendar (pending)Sankey (pending)Sunburst (complete, to be documented)Treemap (pending)[NOTE]: This is a pre-release to test the build process.SetupDocumentation was set up viapipinstallsphinxmyst-parsersphinx-book-theme
mkdirdocscddocs
sphinx-quickstart--projectgramexlayout--author"Anand S"--release0.1.0--languageen--suffix.md--suffix.rst--no-batchfile--no-sep--ext-autodoc--extensionsmyst_parser
sphinx-apidoc--no-toc--module-first--output-dir.../gramexlayoutThen:Indocs/conf.pySet `html_theme = 'sphinx_book_theme'To release, set up build and twinepipinstallbuildtwineReleaseUpdate the version number insetup.py. Then:gitcommit.-m"BLD: Release version x.x.x"gitpushRelease source on PyPI:rm-rfdist/
python-mbuild--wheel
twineuploaddist/*Create documentation:cddocs
makehtml
Package: gramhopper
gramhopperA bot platform for automatic responses based on various triggers.Click to view this demo's configurationtriggers:-name:cattype:text.has_exact_wordword:-Meow-meow-name:ducktype:text.has_exact_wordword:Quackresponses:-name:found_dogtype:preset.replypreset_response:-Hey, here's a dog!rules:# Identifies a cat (a global "cat" trigger) and sends "Hello cat!" (an inline response).-trigger:catresponse:type:preset.messagepreset_response:Hello cat!# Identifies a dog (an inline trigger) and replies "Hey, here's a dog!"# (a global "found_dog" response).-trigger:type:text.has_substringsubstring:-Woof-woof-Ruff-ruffresponse:found_dog# Identifies an animal sound (an inline trigger) and replies# 'I hear "(the animal sound)"' (an inline response), with a 30% probability.-trigger:type:text.regexppattern:^(Quack|Meow|Woof|Moo)$response:type:match.messagetemplate:I hear "{0}"probability:0.3# Identifies 5 occurrences in 60 seconds of a duck sound (an inline event_streak# trigger that uses a global "duck" trigger") and replies "Shut up duck!".-trigger:type:event_streakcounting_event_trigger:duckstreak_timeout_sec:60event_count:5response:type:preset.messagepreset_response:Shut up duck!Setup and ConfigurationFollowthis tutorialto setup a bot and configure gramhopper.Install and RunTo run gramhopper, just run:From installed packagepipinstallgramhopper
gramhopperSpecify configuration filegramhopper--config=/path/to/rules_file.ymlFrom docker imagedockerpullorbin/gramhopper:latest
dockerrun-it-v/your/configuration/dir:/root/.gramhopperorbin/gramhopper:latestDocumentationRead more about the various triggers and responses inour documentation.ContributingYou are welcome to contribute to gramhopper - read thecontribution guidelinesto get started.
Package: graml
IntroductionTODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.Getting StartedTODO: Guide users through getting your code up and running on their own system. In this section you can talk about:Installation processSoftware dependenciesLatest releasesAPI referencesBuild and TestTODO: Describe and show how to build your code and run the tests.ContributeTODO: Explain how other users and developers can contribute to make your code better.If you want to learn more about creating good readme files then refer the followingguidelines. You can also seek inspiration from the below readme files:ASP.NET CoreVisual Studio CodeChakra Core
Package: grammar
GrammarGrammar is a Python library for natural language processing.InstallationYou can use pip to install grammar.pipinstallgrammarDependenciesGrammar uses Vineyard and Graphviz to visualize graphs of the document.UsageCreating a DocumentfromgrammarimportDocument# create documentdocument=Document("He also begat and brought up five pairs of male children.")Entity Graphdisplay(document.entity_graph.render())Document Graphdisplay(document.graph.render())Masking
Package: grammarbot
grammarbot-pyGrammar Bot provides spelling and grammar check. Signup for an API key athttps://www.grammarbot.io/for increased usage limits. The API still works
with no key, but the daily usage limit is lower.InstallationpipinstallgrammarbotUsageSee the example below# import the client libraryfromgrammarbotimportGrammarBotClient# Creating the client# ===================client=GrammarBotClient()# or, signup for an API Key to get higher usage limits here: https://www.grammarbot.io/client=GrammarBotClient(api_key='my_api_key_here')# GrammarBotClient(api_key=my_api_key_here)# you can even set the base URI to a different serverclient=GrammarBotClient(base_uri='http://backup.grammarbot.io:80')# Analyzing the text# ==================# There is only one method to perform the analysis, viz. GrammarBotClient.check# method.text='I cant remember how to go their'# check the text, returns GrammarBotApiResponse objectres=client.check(text)# GrammarBotApiResponse(matches=[GrammarBotMatch(offset=2, length=4, rule={'CANT'}, category={'TYPOS'}), GrammarBotMatch(offset=26, length=5, rule={'CONFUSION_RULE'}, category={'TYPOS'})])# Inspecting the GrammarBotApiResponse object# ===========================================# check detected languageres.detected_language# "en-US"# check if the result is incompleteres.result_is_incomplete# False# see the suggestions / corrections suggested by the GrammarBot API# returns a list of GrammarBotMatch objects describing each replacementres.matches# [GrammarBotMatch(offset=2, length=4, rule={'CANT'}, category={'TYPOS'}), GrammarBotMatch(offset=26, length=5, rule={'CONFUSION_RULE'}, category={'TYPOS'})]# Inspecting the GrammarBotMatch object# =====================================match0=match[0]# GrammarBotMatch(offset=2, length=4, rule={'CANT'}, category={'TYPOS'})# get replacement informationmatch0.replacement_offset# 2match0.replacement_length# 4# get suggested replacementsmatch0.replacements# ["can't", 'cannot']# get list of possible correct sentences after applying the replacementsmatch0.corrections# ["I can't remember how to go their", 'I cannot remember how to go their']# get the rules, type and category information of the matchmatch0.rule# 'CANT'match0.category# 'TYPOS'match0.type# 'Other'# getting a friendly message regarding the replacement suggestionmatch0.message# 'Did you mean "can\'t" or "cannot"?'# Getting even more information# =============================# if the information provided by the class properties is not enough, you can# always access the complete original JSON response from GrammarBotApiResponse# objectres.raw_jsonAPI docsYou can see the API documentation here:https://grammarbot-py.readthedocs.io/en/latest/
Package: grammar-check
Python wrapper for LanguageTool.This is a fork ofhttps://github.com/myint/language-checkExample usage>From the interpreter:>>> import grammar_check
>>> tool = grammar_check.LanguageTool('en-GB')
>>> text = 'This are bad.'
>>> matches = tool.check(text)
>>> len(matches)
1Automatically apply suggestions to the text:>>> grammar_check.correct(text, matches)
'These are bad'>From the command line:$ echo 'This are bad.' > example.txt

$ grammar-check example.txt
example.txt:1:1: THIS_NNS[3]: Did you mean 'these'?InstallationTo install via pip:$ pip install --user --upgrade grammar-checkPrerequisitesPython 3.2+(or 2.7)lib3to2(if installing for Python 2)LanguageTool(Java 6.0+)