Saravanan666/pypi-org huggingface dataset:
Package: contu
Contu v0.1Expanding contractionsTo useexpand_contractionsfunction to expand contractions,fromcontu.contuimportexpand_contractionsstring="I'm going to this party."expanded_string=expand_contractions(string,initial_case="uppercase")print(expand_string)This function takes a sentence as an input and replaces contractions in the sentence with their expanded forms using a dictionary of contractions and their expanded forms. The function also allows the user to choose the case of the output sentence, either lowercase or uppercase, with an optional argument.For example, the contraction "I'm" will be expanded to "I am" and "you're" will be expanded to "you are".>>>fromcontu.contuimportexpand_contractions>>>expand_contractions("I'm")'I am'>>>expand_contractions("I'm",initial_case='uppercase')'I am'>>>expand_contractions("I'm",initial_case='lowercase')'i am'The functionexpand_contractionsfirst checks the initial case of the input sentence and sets the case of the output sentence accordingly. If the user passes the initial_case argument as 'lowercase' or 'uppercase', the function converts the dictionary of contractions to lowercase or uppercase, respectively, and then converts the input sentence to lowercase or uppercase, respectively.Lemmatizing sentence>>>fromcontu.contuimportlemmatize_sentenceasls>>>ls("I'm your player, playing as a programer a programming game like a gamer, but am playing a role of a coder while doing coding.")"I'm your player, play as a programer a program game like a gamer, but be play a role of a coder while do coding.">>>This function, namedlemmatize_sentence, takes a single input parameter, sentence, which is a string of text. The function uses the Natural Language Toolkit (NLTK) library to perform lemmatization on the input sentence, which is the process of reducing words to their base or dictionary form, known as a lemma.The function first imports the necessary modules from the NLTK library, including theWordNetLemmatizerclass, which is used for lemmatization. It also creates an instance of theWordNetLemmatizerclass, which is stored in the variablewnl.Next, the function splits the input sentence into a list of individual words using thesplit()method. The resulting list of words is stored in the variable sentence.The function then creates an empty list namededited_sentence, which will be used to store the lemmatized version of the input sentence.The function then iterates over each word in the sentence list using a for loop. For each word, the function calls thelemmatize()method of theWordNetLemmatizerclass, passing the word and the part of speech (POS) tag 'v' as arguments. The POS tag specifies that the word should be lemmatized as a verb, which is the default behavior of theWordNetLemmatizerclass. The lemmatized version of the word is then appended to theedited_sentencelist.Finally, the function joins the words in the edited_sentence list into a single string using thejoin()method, with spaces as the delimiter. The resulting string is then returned as the output of the function.
Package: contuino
Contuino project: make arduino controlled gamesUsage:from contuino import *

board = MyBoard()
board.board_port = 'COM3'
board.baud_rate = 115200
board.server_address = 'x.x.x.x'
board.server_port = ''
board.wifi_ssid = ''
board.wifi_password = ''
board.username = 'testhash'
board.name = 'board name'
board.message = 'board message'

# assign action SHOOT to gpio pin 2
action_digital = GpioAction()
action_digital.event = Events.SHOOT
action_digital.pin = 2
action_digital.sensor = Sensors.TOUCH
action_digital.sensor_code = "XXXX1234"
board.add_action(action_digital)

# assign action SHOOT to analog pin 0
action_analog = GpioAction()
action_analog.event = Events.SHOOT
action_analog.pin = 0
action_analog.analog = True
action_analog.sensor = Sensors.TOUCH
action_analog.sensor_code = "XXXX1234"
board.add_action(action_analog)

# flash micropython
board.flash_micropython()

# deploy and initialize contuino script
board.init_contuino()

# start serial prompt
board.putty_serial_prompt()features:flashing micropythongenerating the boot.py script for a board running micropythondeploying the boot script to the board running micropythonreading analog and digital sensor inputsending data to serveropening putty serial prompttodo:
Package: contur
The Contur package for model interpretation of collider-physics measurementsThe Contur package contains the following submodules, which should be imported by hand as needed.contur.config- Global configuration optionscontur.data- Database and associated functions parsing data/covariance info from Rivet/YODAcontur.export- Utiluty for exporting map files to csvcontur.factories- Main worker classes for contur functionalitycontur.oracle- Driver for scans using active learningcontur.plot- Plotting engine and stylingcontur.run- Defines logic used in python executablescontur.scan- Utilities for steering/running creation of MC gridscontur.util- Misc helper functions
Package: conturtle
conturtle💻 + 🐢conturtle is short for console turtleInstallationFor WindowsGo to console (or terminal)Now follow instructions over here:https://github.com/kcsaff/getkey/issues/2#issuecomment-611278429Why there you may ask. Well it took me a long time to find a solution the windows bug forgetkey, and the repo was not maintained and active anymore.They didn't add a solution for windows. But @li-rupert made one for windows. So check out his fork :D.Go back to your console after my quick talkEnterpip install cursorThenpip install conturtleImport it!fromconturtleimport*For Other OSVery simple.Installrequirements.txtpip install -r requirements.txtImportconturtlefromconturtleimport*UseIDK, it is just a maze so play around and add stuff I guess.CreditsSomeone on replit who first made the structure of it.And me ofc.NoteI've made lots of these maze games on my replit account (they are old deal with it).Check them out! -->@icodeletiontotally not advertising my work on my work lol
Package: contxt-sdk
Contxt Python SDKInstallationpipinstallcontxt-sdkCLI Usagecontxt--helpTestsdockercomposeup-d--wait
poetryrunpoetestdockercomposedownDocumentationPlease refer tohttps://ndustrialio.github.io/contxt-sdk-python.ContributingPlease refer toCONTRIBUTING.md.
Package: conv
DescriptionConv is a simple Python >= 3 package, lightweight library to do for-loop-styled convolution passes on your iterable objects (e.g.: on a list).Installationpip install convExample Usagefrom conv import convolved


some_list = [1, 2, 3]
for kernel_hover in convolved(some_list, kernel_size=2, stride=1, padding=2, default_value=42):
    print(kernel_hover)Result:[42, 42]
[42, 1]
[1, 2]
[2, 3]
[3, 42]
[42, 42]Unit Tests:python setup.py testAconvolved_2dfunction also exists. See tests for more examples.NotesLicense: MITAuthor: Guillaume Chevalier
Package: convappro
Bienvenue sur le guide de convappro! (sujet 31)Convappro a pour objectif de donner avec la plus grande précision la valeur approximative du sinus de tout nombre réel (angle en radians modulo 2pi).Cette précision théorique est de l'ordre de 10-100et utilise les formules de Taylor-Lagrange pour les développements limités et les suites de Cauchy pour en certifier la convergence (la stabilité et la précision).Ce module a été réalisé par Henri MACEDO GONÇALVES, Alexandre RAMDOO, NOVERRAZ Marion et HAGHVIRDILOO Mostafa comme but scolaire.Consignes d'utilisation1. Installationpipinstallconvapproou encorepython3-mpipinstallconvappro2. UtilisationSoit vous utilisez le main à disposition:Dans le terminal, allez sur le répertoire qui contient code.py et tapez:./code.pySoit en l'utilisant manuellement:python3
from code import *
valeur = calculs(x)La variable x est la valeur que vous souhaitez calculer.3. Les fonctionsVous avez à votre disposition les fonctions suivantes:Certificat de convergence d'une suite (r(n)n) de l'ordre k du calcul conv(k):resultat = valeur.conv(k)r(n) calcule n-ième élément:valeur.r(n)Affiche les n premiers éléments de la suite:valeur.suiteR(n)Preuve de Cauchy:valeur.preuveCauchy(epsilon)Affiche à partir de quel r(n) l'ordre est atteinte:valeur.ordreAtteinte(epsilon)Tronque x ( ex: valeur.r(valeur.preuveCauchy(epsilon)) ) à 10-pprès:a = valeur.tronque(x,p)DISCLAIMERCe module n'a pas vocation à remplacer le module de base math. Il est réalisé à titre scolaire et les auteurs ne sauraient en aucun cas être tenus responsables de sa mauvaise utilisation.
Package: convars
Conda (and Mamba) come with a feature for setting environment variables. However, the commands are cumbersome and there is no easy way to set/unset many variables at once. This CLI tool simplifies the command syntax and allows loading variables from file (i.e. .env)InstallpipinstalconvarsUsageUsage: convars [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  clear   Clear all environment variables from the active environment.
  load    Add environment variables from a file to the active environment.
  set     Set an environment variable in the active environment.
  show    Show environment variables in the active environment.
  unload  Remove environment variables listed in file from the active environment.
  unset   Remove an environment variable from the active environment.
Package: convbaspy
:'######:::'#######::'##::: ##:'##::::'##:'########:::::'###:::::'######::
'##... ##:'##.... ##: ###:: ##: ##:::: ##: ##.... ##:::'## ##:::'##... ##:
##:::..:: ##:::: ##: ####: ##: ##:::: ##: ##:::: ##::'##:. ##:: ##:::..::
##::::::: ##:::: ##: ## ## ##: ##:::: ##: ########::'##:::. ##:. ######::
##::::::: ##:::: ##: ##. ####:. ##:: ##:: ##.... ##: #########::..... ##:
##::: ##: ##:::: ##: ##:. ###::. ## ##::: ##:::: ##: ##.... ##:'##::: ##:
. ######::. #######:: ##::. ##:::. ###:::: ########:: ##:::: ##:. ######::
:......::::.......:::..::::..:::::...:::::........:::..:::::..:::......:::Convertidor de BasesIEEE754 32-64bitgithub.com/etensor/baseconvpyUso:convbaspyPresione en los resultados para copiarlos.Probado con python3.10.2
Package: convbnmerge
Convolution Batchnorm MergeOnly one line of code and we can accelerate your model up to 50% faster!Installation$ pip install convbnmergeUsageconv-bn-mergeisONLYused in inference time!fromconvbnmergeimportmergemodel=..."""training..."""merge(model)Update2021.18.04: support ConvTranspose2d and ConvTranspose3d2021.02.04: also support Conv3dHow much fastYou usually reach 30++% inferece time reduce. In some cases, the number is more than 50%!fromtimeimporttimeimporttorchfromtorchvision.models.resnetimportresnet34fromconvbnmergeimportmergeif__name__=='__main__':model=resnet34(pretrained=True)x=torch.Tensor(2,3,32,32)withtorch.no_grad():start=time()foriinrange(100):model(x)stop=time()print(stop-start)# Before merge: about 7.9smerge(model)withtorch.no_grad():start=time()foriinrange(100):model(x)stop=time()print(stop-start)# After merge: about 4.8sHow we doComing soonAre outputs the same before and after merge?A small difference caused by round-off error. In almost cases, it doesn't harm the model's result.importtorchfromtorchvision.models.resnetimportresnet34fromconvbnmergeimportmergeif__name__=='__main__':model=resnet34(pretrained=True)model.eval()x=torch.Tensor(1,3,32,32)out_old=model(x)merge(model)out_new=model(x)print(((out_old-out_new)**2).sum())#less than 1e-10Licenseconv-bn-mergeis MIT-licensed.
Package: convbot
convbotA conversational bot based on huggingface transformersInstall itpipinstallconvbot# or poetry add convbot# pip install git+htts://github.com/ffreemt/convbot# poetry add git+htts://github.com/ffreemt/convbot# To upgradepipinstallconvbot-U# or poetry add convbot@latestUse itfromconvbotimportconvbotprin(convertbot("How are you?"))# I am good  # or along that lineThe async versionaconvbot, potentialy forfastapiorNonebotplugins and such,  is rather artificial since it's based onThreadPoolExecutor. Hence it's not intended for production. You probably should not spawn too many instances.fromconvbotimportaconvbotasyncdefafunc(text):resp=awaitaconvbot(text)...Interactivepython-mconvbotNot tested in Windows 10 and MacThe module uses pytorch that is installed differently in Windows than in Linux. To runconvbotin Windows or Mac, you may give it a spin  by cloning the repo (git clonehttps://github.com/ffreemt/convbot) and installing pytorch manually.
Package: convbot-fastapi
convbot-fastapiconvbot-fastapi descrInstall itpipinstallconvbot-fastapi# or poetry add convbot-fastapi# pip install git+htts://github.com/ffreemt/convbot-fastapi# poetry add git+htts://github.com/ffreemt/convbot-fastapi# To upgradepipinstallconvbot-fastapi-U# or poetry add convbot-fastapi@latestUse itpython-mconvbot_fastapiPoint your browser tohttpL//127.0.0.1:8000/docsOr with uvicornuvicornconvbot_fastapi.convbot_fastapi:appDeploy it to the cloudClone the repogitclonehttps://github.com/ffreemt/convbot-fastapicdconvbot-fastapiCreate a docker image fromDockerfileand upload it tohttps://hub.docker.com/Sign up and deploy the docker image to, for example,koyeb.com.
Package: convbump
Convbumpconvbumpis a simple tool to work with conventional commits.Use theversioncommand to find the next version in your repository
based on the conventional commits.Use thechangelogcommand to generate a nicely formatted changelog
(Github markdown compatible).Requirementsconvbumpdoes not have any external dependencies.convbumpuses a pure Python library to access the Git repository and so does not
require agitexecutable.DevelopmentThe application is written in Python and usesPoetryto configure the package and manage
its dependencies.Make sure you havePoetry CLI installed.
Then you can run$ poetry installwhich will install the project dependencies (includingdevdependencies) into a
Python virtual environment managed by Poetry (alternatively, you can activate
your own virtual environment beforehand and Poetry will use that).Run tests with pytest$ poetry run pytestor$ poetry shell
$ pytestpytestwill take configuration frompytest.inifile first (if present), then
frompyproject.toml. Add any local configuration topytest.ini.
Configuration inpyproject.tomlwill be used in CI. You can run your
tests the same way as CI to catch any errors$ pytest -c pyproject.tomlCode formattingThe application is formatted usingblackandisort.You can either run black and isort manually or use preparedPoetask to format the whole project.$ poetry run poe format-codeor$ poetry shell
$ poe format-code
Package: convcsv2json
CONVCSV2JSONConvert a CSV file into JSON format based on CSV headerspipinstallconvcsv2jsonUsagefromconvcsv2jsonimportcsv2jsondata=csv2json('sample.csv',# CSV filenameintend=4,# JSON intendationnumbered=True# Set JSON data in numbered format or not)print(data.json())# Print in JSON formatdata.export('export.json')# Export the data into a JSON file"intend" and "numbered" parameters are optional. By default, "intend" is set as None and "numbered" is set as Falsefromconvcsv2jsonimportcsv2jsonprint(csv2json('sample.csv',4).json())Sample CSVname,age
kewldog,12
kewlcat,23Generated JSON[{"name":"kewldog","age":"12"},{"name":"kewlcat","age":"23"}]
Package: convect-flow-sdk
flow-sdkflow sdkInstallpipinstallconvect-flow-sdkUsage# set up environment variables# FLOW_WORKSPACE_ID: your flow workspace id# FLOW_API_TOKEN: your flow api token from the workspace# FLOW_HOST: flow host, default to https://flow.convect.aifromconvect_flow_sdkimportFlowAlgo
frompprintimportpprint# this is an example of how to use the flow_algo_sdkflow_algo=FlowAlgo()# this algo_id is will be the one defined in the algo projectalgo_id='2f1a1fa9-2958-4afe-bb48-4239a960986d'pprint(flow_algo.list_algos())pprint(flow_algo.list_algo_runs(algo_id))# this submit will zip all the files in path_to_input folder and submit to flowrun_id=flow_algo.submit(algo_id,"weekly_run",{"input_file":"input.csv","output_file":"output.csv","predict_start_week":"202348","predict_end_week":"202348","algo":"v03-percentile"},"path_to_input")# flow_algo.terminate(run_id)flow_algo.check_status(run_id)flow_algo.log(run_id)# this gather will download the output.tar.gz from flow and extract to path_to_output folderflow_algo.gather(run_id,"./output")# flow_algo_sdk.clear_local_algo_cache()# clear local algo cache will delete the local history of submitted runsDevelopmentRegression Test# set up environment variables# FLOW_WORKSPACE_ID: your flow workspace id# FLOW_API_TOKEN: your flow api token from the workspace# FLOW_HOST: flow host# you need to make sure the workspace has all the active apps# you can run the following command to run the regression testflow-cliregression-test
Package: convection-plugin-secrets-generic
Convection Plugin - Secrets - GenericConvection Plugin - Secrets - GenericPhysical StorageData FormatSecret Store ArgsTBDSecrets ArgsCreate/ModifyGet/DestroyGeneric Secrets Storage (Key/Value Store)Physical StorageIf the Secret Store Name contains slashes, it is assumed as a path, and placed as$STORAGE_ROOT/$STORE_NAME(ex:(/data)/(my/secret/store)). If it does not contain slashes, it is stored at$STORAGE_ROOT/secrets/$STORE_NAME(ex(/data)/(my.secret.store))Data is stored all in a single file.Data Format{"metadata":{<pluginmetadata>},"config":{<configurationdata>},"store":{<secretsink:vform>},"stats":{"reads":<numberofreadsperformedsincecreation>,"writes":<numberofwritesperformedsincecreation>}}Note that the Stats data for Reads may not be accurately represented if a number reads happen, but a write does not occur before the Convection Secrets Manager is shutdown/restarted. These stats are held in memory until a write occurs, and so the stat for reads since the last write would be lost on stop/restart. Write stat should always be accurate. The Read stat will be accurate for the duration of the service running (assuming no writes), however.Secret Store ArgsThese arguments are required when a new Generic Store is created.TBDSecrets ArgsCreate/Modifysecret_name: Name of Secret to Create/Modifysecret_value: Secret DataGet/Destroysecret_name: Name of Secret to View/Destroy
Package: convection-plugin-secrets-passdb
Convection Plugin - Secrets - PassDBConvection Plugin - Secrets - PassDBPhysical StorageData FormatSecret Store ArgsSecrets ArgsCreate/ModifyGet/DestroyPassword Value TypesPassword Generator and StoragePhysical StorageIf the Secret Store Name contains slashes, it is assumed as a path, and placed as$STORAGE_ROOT/$STORE_NAME(ex:(/data)/(my/secret/store)). If it does not contain slashes, it is stored at$STORAGE_ROOT/secrets/$STORE_NAME(ex(/data)/(my.secret.store))Data is stored all in a single file.Data Format{"metadata":{<pluginmetadata>},"config":{<configurationdata>},"store":{<passdbink:vform>},"stats":{"reads":<numberofreadsperformedsincecreation>,"writes":<numberofwritesperformedsincecreation>}}Note that the Stats data for Reads may not be accurately represented if a number reads happen, but a write does not occur before the Convection Secrets Manager is shutdown/restarted. These stats are held in memory until a write occurs, and so the stat for reads since the last write would be lost on stop/restart. Write stat should always be accurate. The Read stat will be accurate for the duration of the service running (assuming no writes), however.Secret Store ArgsThese arguments are required when a new PassDB Store is created.{"default":{"length":<defaultpasswordlength>,"letters":<defaultpasswordletters>}}During creation you should pass--store-arg '{ "default": { ... } }'to configure these valuesSecrets ArgsCreate/Modifysecret_name: Name of Entry to Create/Modifysecret_value:[OPTIONAL]Password. If empty, a password will be generated.length:[OPTIONAL]Password Length. If empty,20.value_type:[OPTIONAL]Password Value Type. If empty,printable.Get/Destroysecret_name: Name of Secret to View/DestroyPassword Value TypesThis is a selection of which characters will be available in the password that is generated. This parameter is based on entries from thestringclass. Its value may be one of:printable: Any printable characterascii_letters: Upper and Lowercase ASCII charactersdigits: Numbers only
Package: convection-shared
Convection IaCConvection IaC - The Provisioner Infrastructure as Code ProjectIaCSecrets ManagementServer CorePluginsAboutThe Convection Project, at is core, is a take on Infrastructure as Code that isnt actually Infrastructure as Config. Of course, there is ambiguity between what IaC means, but it originally meantInfrastrucutre as Code. Many of todays orchestration and automation tools are in the name of 'Infrastructure as Code' but actually devolve into managing configuration files all day due to the billion layers of abstraction we have placed on everything. And worse, having to do pragmatic things in a configuration file, like yaml, is just abusive to the configuration file format. Convection is a real pragmatic approach to IaC, providing a real programming language (Python) with a set of tools to create infrastructure and orchestration through a unified pragmatic approach.The Convection Project is be made up of multiple tools. As mentioned, at its core, is the IaC process. To support secure storage, a Secrets Manager also exists within this project. There are also other tools that will be implemented in the future.FutureAdditional tools will be created to complete this suite, including a System Image Creator and Manager. SeeTASKS.mdfor an ongoing roadmap
Package: convectors
Convectors: build end-to-end NLP pipelinesInspired by the Keras syntax, Convectors allows you to build NLP pipelines by adding different processing Layers.
Fully compatible with pandas and Keras, it can either process list or pandas series on the fly, or apply processing to a whole DataFrame by using columns as inputs and outputs. Tensorflow's Keras models can be added as a layer, embedded and saved within a larger end-to-end NLP model.pip install convectorsSimple classification exampleIn this basic example, we create an NLP pipeline for a sequence classification task:fromconvectorsimportload_modelfromconvectors.layersimportArgmax,Keras,Sequence,Tokenizefromsklearn.datasetsimportfetch_20newsgroupsfromtensorflow.keras.layersimportLSTM,Dense,Embeddingfromtensorflow.keras.modelsimportSequential# load datatraining_set=fetch_20newsgroups(subset="train")testing_set=fetch_20newsgroups(subset="test")# create encoder modelencoder=Tokenize(stopwords=["en"])encoder+=Sequence(max_features=20000,pad=True,maxlen=200)# get and transform training dataX_train=encoder(training_set.data)# fit and transformy_train=training_set.target# get training data# infer number of features and classesN_FEATURES=encoder["Sequence"].n_features+1N_CLASSES=y_train.max()+1EMBEDDING_DIM=32# create keras model and fitmodel=Sequential()model.add(Embedding(N_FEATURES,EMBEDDING_DIM,mask_zero=True))model.add(LSTM(32,activation="tanh",return_sequences=False))model.add(Dense(32,activation="tanh"))model.add(Dense(N_CLASSES,activation="softmax"))model.compile("nadam","sparse_categorical_crossentropy",metrics=["accuracy"])model.fit(X_train,y_train,epochs=1,batch_size=800)# once learned, add Keras modelencoder+=Keras(model=model,trained=True)encoder+=Argmax()encoder.verbose=False# turn verbosity off# for model persistence:encoder.save("model.p")encoder=load_model("model.p")# predict for new datay_pred=encoder(testing_set.data)y_true=testing_set.target# print accuracyprint((y_pred==y_true).mean())