Saravanan666/pypi-org huggingface dataset:
Package: couchutils
couchutils: Python CouchDB UtilsA collection of CouchDB utils.Feature SupportSupport for CouchDB 1.7.x.couchutils officially supportsPython 3.6+.InstallationTo install couchutils, simply run:$pipinstall-Ucouchutils
✨🛋✨DocumentationTo use couchutils in a project:>>>fromcouchutilsimport<UTILS_METHOD>Build CouchDB Documents from a Directory>>>fromcouchutilsimportcompile_doc>>>compile_doc.compile_docs("<DOC_DIR>"){...}E.g. If passed a directory tree with:.
├── example1
│   ├── _id
│   ├── language
│   └── views
│       └── numbers
│           ├── map.js
│           └── reduce
├── example2
│   └── _id
└── ignored.txtThe compiled output would be:>>>compile_doc.compile_docs("."){"_design/example1":{"_id":"_design/minimal"},"_design/example2":{"views":{"numbers":{"reduce":"_count","map":"function (doc) {\nif (doc.name) {\nemit(doc.name, null);\n}\n}",}},"_id":"_design/basic","language":"javascript",},}Ref:tests/fixtures/compile_docs
Package: cougar
cougarA python C-extension for rolling window aggregations. Try to support more methods thanbottleneckand run faster thanpandas. Currently this is only a weekend project, feel free to contribute.InstallationpipinstallcougarUsage>>>importnumpyasnp>>>importcougarascg>>>arr=np.random.randn(8)>>>arrarray([-2.31572505,-1.78462521,0.17355123,0.77365821,0.81431295,1.56188616,0.74933881,0.06184727])>>>cg.rolling_mean(arr,3)array([nan,nan,-1.30893301,-0.27913859,0.58717413,1.04995244,1.04184597,0.79102408])>>>cg.rolling_rank(arr,5,min_count=1)array([0.,1.,1.,1.,1.,1.,-0.5,-1.])Supported MethodsMethodTime Complexitysum$O(1)$mean$O(1)$std$O(1)$var$O(1)$skew$O(1)$kurt$O(1)$min$O(1)$max$O(1)$argmin$O(1)$argmax$O(1)$median$O(\log n)$rank$O(\log n)$quantile$O(\log n)$Benchmarkpython benchmark.pyCougar vs. Bottleneck             
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Method       ┃ Cougar       ┃ Bottleneck   ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ sum          │ 2.99         │ 1.00         │
│ mean         │ 3.08         │ 1.00         │
│ std          │ 2.10         │ 1.00         │
│ var          │ 2.15         │ 1.00         │
│ max          │ 2.84         │ 1.00         │
│ min          │ 1.23         │ 1.00         │
│ argmax       │ 1.40         │ 1.00         │
│ argmin       │ 1.16         │ 1.00         │
│ median       │ 1.33         │ 1.00         │
│ rank         │ 1.00         │ 15.02        │
└──────────────┴──────────────┴──────────────┘
Package: cougar-log
Cougar LogCougar Log is a CLI for rapidly converting and visualizing .wpilog files!See the following page for a guide on creating these files inside of an FRC robotics project:https://docs.wpilib.org/en/stable/docs/software/telemetry/datalog.htmlQuickstartInstallationRun the following to installcougar-logusing pip:pip install cougar-logBasic Usage ExamplesSee the documentation below this section for more specific capabilities of this CLI.In this example, we have a file in our current directory calledmy_data_log.wpilog.Converting to CSVcougar-log convert -i my_data_log.wpilogor, to convert any file in the given folder:cougar-log convert -i .Displaying as a Tablecougar-log table -i my_data_log.wpilogGraphing Datacougar-log graph -i my_data_log.wpilogFilteringAny of these commands can be used with a filter flag (-f/--filter) in order to select only the entries that have that name.Use the table option to see the names of all of the log entries.cougar-log graph -i my_data_log.wpilog -f /temps/driveDownloading Files from a RobotReplace XX.XX with your team number in that format.Note: this command has a multitude of options available.cougar-log download --host "10.XX.XX.2"DocumentationClick the link below to visit the documentation:frc2539.github.io/cougar-log
Package: cough
A library for building COFF object files.TutorialStart with the ObjectModule class:module = ObjectModule()Now, let’s create a ‘.text’ section:section = Section(b'.text', SectionFlags.MEM_EXECUTE)Add a bit of code:section.data = b'\x29\xC0\xC3'  # return 0
section.size_of_raw_data = len(section.data)Good enough, let’s add it to our module:module.sections.append(section)To make use of that bit of code, we are going to need an exported symbol:main = SymbolRecord(b'main', section_number=1, storage_class=StorageClass.EXTERNAL)Set the value to the offset in the section:main.value = 0And add it to our module:module.symbols.append(main)That’s enough, let’s write our module to a file:with open('test.obj', 'wb') as obj_file:
    obj_file.write(module.get_buffer())
Package: couler
CoulerCouler is a programming language for describing workflows. It shares Python's syntax, but only a small subset -- the function definition and invocation. Couler is also the name of a compiler, which translates Couler programs intoArgoYAML files.MotivationsA motivation of Couler comes from the requirement of SQLFlow. SQLFlow translates SQL programs, with optionally AI syntax extension, into Couler programs, which, the Couler compiler translates into Argo YAML files.SQLFlow needs Couler because it needs Argo. It needs Argo because it requires a workflow execution engine. It requires a workflow engine because, in most setups, the SQLFlow server cannot merely translates each SQL statement into a Python submitter program and runs them one-by-one. If it does so, the SQLFlow engine works like the workflow engine and needs to keep the status of the executions of workflows. However, unfortunately, as SQLFlow runs on Kubernetes as a service, which is the most common case, each server instance might be preempted at any time. The SQLFlow server could indeed save the status in robust storage like etcd; however, that introduces a lot of code and makes SQLFlow a duplication of reliable workflow engines like Argo.We build Couler on top of Argo for some reasons:Argo YAML is less comprehensive, and it is hard to debug if we make SQLFlow generate YAML files directly.As we introduce Couler as a human-readable intermediate representation, it would benefit Python programmers in addition to SQLFlow users.The DesignSteps and FunctionsCouler users write a workflow as a Python program, where each step is a Python function definition, and the workflow itself is a sequence of function invocations. We want step-functions like the following.couler.mysql.run(sql)couler.mysql.export_table(table, filename)couler.xgboost.train(model_def, training_data)couler.xgboost.predict(trained_mode, test_data)Couler CoreWhen users define a step function, they could call the following fundamental functions provided by Couler.couler.run_container(docker_image, cmd, args)starts a container to run a command-line with arguments. It returns values extracted from the standard output.couler.run_script(docker_image, function_name)runs a Python function defined in the current Couler program in a container. It returns values extracted from the standard output.couler.when(condition, step)runs a step if the condition lambda returns true.couler.map(step, a_list)repeatedly runs a step for each of the value in a given Python list.Step ZooA collection of Couler step functions from a step zoo. Because each step runs in a Docker container, the step zoo might also container some Dockerfiles. It recommended configuring the CI/CD system to build the Docker images from Dockerfiles automatically.Argo and Docker ModeTo make the debug even comfortable, we can make Couler support aDocker modein addition to theArgo mode.  In both ways, each step runs as a Docker container.  The difference is that the containers run on a Kubernetes cluster in the Argo mode, but on the local host computer in Docker mode.
Package: couleur
Couleuris a handy tool to play around with ANSI features in a unix
terminalinstallinguser@machine:~$ sudo pip install git+git://github.com/gabrielfalcao/couleur.gitfeaturesSingle python file100% testedcomes with syntax sugarnutshellfile-like objects filterstdout filterfurtherimportsys,couleurcouleur.proxy(sys.stdout).enable()print"#{bold}#{blue}#{on:black}This is#{normal}a test"couleur.proxy(sys.stdout).ignore()print"#{green}#{on:black}This is#{normal}a test"couleur.proxy(sys.stdout).disable()dynamic methodscouleur has a syntax sugar that is semantically nice:printimportcouleursh=couleur.Shell(indent=4)sh.bold_black_on_white('Nice highlight\n')# prints '\033[47m\033[1m\033[30mNice highlight\033[0m'sh.indent()# will increase a internal indentation factor in couleur.Shell instancesh.red('Just red\n')# prints indented as well '    \033[32mJust Green\033[0m\n'sh.dedent()# will decrease that indentation factor (above)# syntax sugarsh.green_and_normal_and_blue('this will be printed in green| and |this in blue\n')# see: '\033[32mthis will be printed in green\033[0m and \033[34mthis in blue\033[0m'couleur can overwrite output, so that you can make things like printing
progress bars, show percentage and so on:importtimeimportcouleurshell=couleur.Shell(linebreak=True,bold=True)fornuminrange(101):ifnum==0:printshell.yellow_and_red("Downloading file: |%d%%"%num,replace=True)time.sleep(0.02)shell.white_and_green("Downloading file: |DONE!",replace=True)Writing to other streamsSimply pass the output as first argument of theShellimportcouleurwithopen('output.log','w')asoutput:shell=couleur.Shell(output,linebreak=True,bold=True)shell.white_and_green("done with | Some task")furthermoreWith couleur you can mix modifiers and colors.Available modifiers:reset - resets from the current point to the endbold - make text boldblink - it may blink the text or make it slighly lighten, depending
on the terminalitalic - make text italicunderline - add underline on textinverse - invert colorsstrikethrough - draws a line through the textup - does the same than passing replace=True to the output function:
carriage return and one line upAvailable colors:normalblackredgreenyellowbluemagentacyanwhiteExample chaining modifiers:importcouleurshell=couleur.Shell(linebreak=True)shell.bold_italic_underline_green_on_black_and_italic_black_on_white("WOO| HOO")free softwareTo contribute back with this project, all you need to do is write code,
and test code that proofs its functionallitycloning and running testsYou will need to installnose.And run:user@machine:~/Projects$gitclonegit://github.com/gabrielfalcao/couleur.gituser@machine:~/Projects$cdcouleuruser@machine:~/Projects/couleur$maketestsnomenclature“couleur” stands for “color” in French, I like french, hence the nameLicensingCopyright (c) 2010-2020 Gabriel Falcão
Licensed under LGPLv3
https://opensource.org/licenses/lgpl-3.0.htmlBitdeli Badge
Package: coulomb-counter-cc75
# coulomb_counter_cc75_py
Python library for the coulomb counter cc75
========================================================The Coulomb_counter class allows to read and manage data from a USB
connection with a coulomb counter cc75.You can install it with pip:pip install coulomb_counter_cc75Exemple d’usage:>>> from coulomb_counter_cc75 import Coulomb_counter
>>> Coulomb_counter.onUpdate = lambda self: print(self)
>>> coulomb_counter = Coulomb_counter("/dev/ttyUSB0")
>>> coulomb_counter.launch()
Package: coundown-pkg-mcollison
The Countdown SimulationIntroductionThis project is a model answer from the first coursework assignment set for ECM1400 in 2019. The purpose is to demonstrate how code can not only be used to run locally but can be published and extended within the Python ecosysetm.The code in this project runs a simulation of the channel 4 gameshow countdown.PrerequisitesTo run this code you will need Python 3.7 or above.Author: Matt Collison - mcollisonLicense: Creative Commons 4.0https://creativecommons.org/licenses/by/4.0/User instructionsTo use the repository install and import the package as shown below.$ pip install countdown-pkg-mcollisonfrom countdown import ca1_model_answer as countdown
countdown.tests()
countdown.game_play()
Package: counhto
counhtoAn easy to use tool to count hashtag oligos (HTOs) from 10x cellranger count output processed with Antibody Captures for sample multiplexing and assign tags to cells using the cellranger Jibes algorithm (this part is a minimal edit of the original algorithm as implemented in cellranger > 6.0)InstallThe most convenient and easy way to install the package ispip install counthoalternatively you could also clone the repository and install it manually likegit clone git@github.com:dmalzl/counhto.git
cd countho
pip install .UsageUsing it is as simple as setting up a csv file with the following structurebamfilebarcodefilehtofileoutputdircellranger/outs/possorted_bam.bamcellranger/outs/filtered_feature_bc_matrix/barcodes.tsv.gzcellranger/outs/feature_ref.csv/path/to/outputdir/cellranger/outs/possorted_bam.bamcellranger/outs/filtered_feature_bc_matrix/barcodes.tsv.gzcellranger/outs/feature_ref.csv/path/to/outputdir/and invoking countho as followscountho --csv sample_csv.csv [-p n]The-pargument specifies the number of cpus to use for processing however this only has an effect if more than one samples are supplied.counhto then counts UMIs per HTO and automatically performes tag assignment using cellrangers Jibes algoritm (seecell multiplexing documentationfor more info). The output for each sample will then be written to the specified output directories where the barcodes.tsv file contains the tag assignment information. The directory has following structure/path/to/outputdir/
|__
   |__barcodes.tsv  # filtered barcodes with tag assignment information
   |__features.tsv  # names of the HTOs as specified in the feature_ref.csv file
   |__matrix.mtx    # MatrixMarket formated count matrix of shape n_barcodes x n_HTOs
Package: countach
countachA library for extracting data from A2L files generated by Ecocoder for the EV2274A. Information on usage is locatedhere, and other documentation is linked below:CharacteristicsMeasurementsTypesFixed-Point TypesDisclaimerThis package will probably not work with anything other than the EV2274A and the Ecocoder library. This is by design - it's far easier for us to build something that just suits our needs instead of trawling through A2L standards and implementing a proper parser.
Package: countapi
py-countapiAn unofficial Python client library for CountAPI (countapi.xyz)It is your responsibility to use this library in accordance with the the
CountAPI terms of service.InstallationThis package is available fromPyPi, which
means it can be easily acquired viapip.Run this command at a shell prompt:pip3installcountapiUsageTo get started, import the package like so:importcountapiFor a working example, seeexample.py.
Package: countASAP
countASAPAn easy to use python-based package for generating ASAPseq Count Matrices from FASTQ filesQuick StartThe countASAP package can be installed either by downloading this repository and running the scripts in the countASAP directory, or by installing the script directly to your command line using:pip install countASAPFrom there, the script can be called by defining, at minimum, 2 FASTQ paths, 1 cell ID whitelist path, and 1 ASAPseq barcode path:countASAP -cr MYPATH/asapR2.FASTQ -br MYPATH/asapR3.FASTQ -wl MYPATH/atac_proc.h5ad -ref MYPATH/asapSeq_barcodes.csvOf course, replacing MYPATH with the path to each of these files on your machine. If you run into issues, please check out the "important assumptions" listed below.If you don't have your own ASAPseq barcode file or example whitelist, or need to identify the precise formatting used by countASAP, you can call:pullEXsTo copy a directory of example inputs into your current directory.When publishing analysis using this software, please cite:Boughter CT, Chatterjee B, Singh NJ, Meier-Schellersheim M. CountASAP: A Lightweight, Easy to Use Python Package for Processing ASAPseq Data. BioRxiv 2024qImportant AssumptionsAs of this first version of the software (v0.1) formatting is unfortunately quite rigid, and makes a number of assumptions. However, we will be quick to respond to issues raised calling for additional functionality. Further, given the lightweight nature of the main script, computationally inclined users can likely manually edit some of these more strict requirements.Assumptions listed in no particular order:FASTQ files must not be compressed (you can unzip .gz files using gunzip)The cell ID whitelist from ATAC processing is formatted into an H5ad format. An R script is included for converting ATACseq data into an H5ad format (see countASAP/ATAC_process/process_ATAC_template.R)It isstronglyrecommended that users extract the cell ID whitelist from their accompanying ATACseq experiments before running countASAP. The full cell ID whitelist from 10x genomics is ~750k sequences long, whereas most experiments only have ~10k cells. Using the full 10x whitelist represents an unnecessary slowdown.Users can also extract just the cell IDs as a CSV formatted as in whitelist.csv, and specify the option [-awl False]Your Cell ID barcodes have a trailing "-1" after them. Such as "AAACCTGAGAAACCAT-1"Your Cell IDreadis the reverse complement of your Cell ID.If using different ASAPseq barcodes (i.e. replacing the asapSeq_barcodes.csv file with your own) be sure it is formatted in theexactsame way
Package: count-dict
count_dictThis is a Python package for count dictionaries.InstallationInstallation can be done through pip. You must have python version >= 3.7pip install count-dictUsageThe statement to import the package:from count_dict_package import count_dictExample:>>> accumulated = count_dict()
>>> accumulated['x'] += 9
>>> accumulated.items()
dict_items([('x', 9)])


>>> accumulated = count_dict(10)
>>> accumulated['x'] += 9
>>> accumulated.items()
dict_items([('x', 19)])


>>> accumulated = defaultdict(count_dict)
>>> accumulated['x']['y'] += 9
>>> {'x': dict(accumulated['x'])}
{'x': {'y': 9}}


>>> accumulated = defaultdict(count_dict(10))
>>> accumulated['x']['y'] += 9
>>> {'x': dict(accumulated['x'])}
{'x': {'y': 19}}
Package: countdown-cli
This project is based on aPython Morselsexercise for a command-line countdown timer.
If you’re working on that exercise right now, pleasedon’t look at the source codefor this. 😉FeaturesFull-screen countdown timer, centered in the terminal windowCommand-line interface for Linux/Mac/WindowsRequirementsPython 3.7+InstallationYou can installcountdown-cliviapipfromPyPI:$python3-mpipinstallcountdown-cliUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,countdown-cliis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.
Package: countdown-event
countdown-eventA synchronization class which blocks when the count is not zero.Here's an exampleimportasynciofromcountdown_eventimportCountdownEventasyncdeflong_running_task(countdown_event,cancellation_event):count=countdown_event.increment()print(f'incremented count to{count}')try:print('Waiting for cancellation event')awaitcancellation_event.wait()finally:count=countdown_event.decrement()print(f'decremented count to{count}')asyncdefstop_tasks(secs,countdown_event,cancellation_event):print(f'waiting{secs}seconds before setting the cancellation event')awaitasyncio.sleep(secs)print('setting the cancellation event')cancellation_event.set()print('waiting for tasks to finish')awaitcountdown_event.wait()print('countdown event cleared')asyncdefmain_async():cancellation_event=asyncio.Event()countdown_event=CountdownEvent()tasks=[long_running_task(countdown_event,cancellation_event),long_running_task(countdown_event,cancellation_event),long_running_task(countdown_event,cancellation_event),stop_tasks(5,countdown_event,cancellation_event)]awaitasyncio.wait(tasks)assertcountdown_event.count==0print("done")if__name__=="__main__":asyncio.run(main_async())Here's the output.incremented count to 1
Waiting for cancellation event
incremented count to 2
Waiting for cancellation event
waiting 5 seconds before setting the cancellation event
incremented count to 3
Waiting for cancellation event
setting the cancellation event
waiting for tasks to finish
decremented count to 2
decremented count to 1
decremented count to 0
countdown event cleared
done
Package: countdown-pkg-mcollison
The Countdown SimulationIntroductionThis project is a model answer from the first coursework assignment set for ECM1400 in 2019. The purpose is to demonstrate how code can not only be used to run locally but can be published and extended within the Python ecosysetm.The code in this project runs a simulation of the channel 4 gameshow countdown.PrerequisitesTo run this code you will need Python 3.7 or above.Author: Matt Collison - mcollisonLicense: Creative Commons 4.0https://creativecommons.org/licenses/by/4.0/User instructionsTo use the repository install and import the package as shown below.$ pip install countdown-pkg-mcollisonfrom countdown import ca1_model_answer as countdown
countdown.tests()
countdown.game_play()
Package: countdown-timer
A simple countdownThis is a very simple project for those who need a countdown for things like pomodoro in Python for example.InstallationYou can install this app using the following command:pip install countdown-timerUsageYou can use this app like this:fromcountdownimportcountdown# Create a countdown of 1 minute and 10 secondscountdown(mins=1,secs=10)# Create a countdown of 1 minutecountdown(1)#Create a countdown of 10 secondscountdown(mins=0,secs=10)
Package: counterfactual-xai
Counterfactuals: Take the uncertainty out of your machine learning modelsDocumentation|Examples|ShowcaseCounterfactuals is a Python library for machine learning that enables you to better understand your models.
We combine several techniques to provide a comprehensive understanding of your model's predictions.
With those insights you are able to eliminate uncertainties and make better decisions.FeaturesCLUE: A Method for Explaining Uncertainty EstimatesCLUE is a method for explaining uncertainty estimates of machine learning models. It is based on the idea of counterfactuals and provides a comprehensive understanding of the model's predictions.Model Paper:CLUE: A Method for Explaining Uncertainty EstimatesInstallationThe current recommended way to install counterfactual is from source.From sourcegitclonehttps://github.com/lsch0lz/counterfactuals.gitcdcounterfactuals
python3-mpipinstall-e.Direct (master)python3-mpipinstallgit+https://github.com/lsch0lz/counterfactuals.gitDocumentationDocumentation along with a quick start guide can be found in thedocs/directory.
Package: counterfit-shims-grove
CounterFit Shims - GroveShims for the Seeed Grove sensors and actuators to use with theCounterFit virtual IoT device app.See theGrove Py Docsfor the API documentation.Getting startedTo use these shims, you will need to installCounterFitand have it running, with the appropriate hardware created.Install this package from pip:pipinstallcounterfit-shims-groveImport the Grove modules as normal, but using thecounterfit_shims_grovepackage instead of thegrovepackage, as well as importing theCounterFitConnectionfrom thecounterfit_shims_grove.counterfit_connectionmodule:fromcounterfit_connectionimportCounterFitConnectionfromcounterfit_shims_grove.grove_light_sensor_v1_2importGroveLightSensorfromcounterfit_shims_grove.grove_ledimportGroveLedConfigure the connection to the CounterFit app. Change the hostname and port to where you are running it:CounterFitConnection.init('127.0.0.1',5000)Write your Grove code as usual, setting the pins to match the ones you set in the CounterFit app:light_sensor=GroveLightSensor(2)sensor_value=light_sensor.lightImplemented shimsNot all the Grove sensor and actuators are currently implemented:Sensor/Actuatorgrove_ledgrove_light_sensor_v1_2