Saravanan666/pypi-org huggingface dataset:
Package: chromobius
Chromobius: color code decoderChromobius is an implementation of a"mobius decoder", which approximates the color code decoding problem as a minimum weight matching problem.
Chromobius usesPyMatchingto solve the minimum weight matching problem.See ((((the paper "New circuits and an open source decoder for the color code")))) for more details on how Chromobius works.How to use ChromobiusSee thegetting started notebook.Also see thepython api reference.Programmers who want to edit and build Chromobius can check thedeveloper documentation.Example SnippetsDecoding a shot with ChromobiusFrom python:importstimimportchromobiusimportnumpyasnpdefcount_mistakes(circuit:stim.Circuit,shots:int)->int:# Sample the circuit.dets,actual_obs_flips=circuit.compile_detector_sampler().sample(shots=shots,separate_observables=True,bit_packed=True,)# Decode with Chromobius.decoder=chromobius.compile_decoder_for_dem(circuit.detector_error_model())predicted_obs_flips=decoder.predict_obs_flips_from_dets_bit_packed(dets)# Count mistakes.returnnp.count_nonzero(np.any(predicted_obs_flips!=actual_obs_flips,axis=1))From the command line:# Sample shots of detectors and observable flips.stimdetect\--shots100000\--in"example_circuit.stim"\--out"dets.b8"\--out_format"b8"\--obs_out"obs_actual.txt"\--obs_out_format"01"# Extract a detector error model used to configure Chromobius.stimanalyze_errors\--in"example_circuit.stim"\--fold_loops\--out"dem.dem"# Decode the shots.chromobiuspredict\--dem"dem.dem"\--in"dets.b8"\--in_format"b8"\--out"obs_predicted.txt"\--out_format"01"# Count the number of shots with a prediction mistake.pasteobs_actual.txtobs_predicted.txt\|grep-Pv"^([01]*)\\s*\\1$"\|wc-lFrom python using sinter:importsinterimportchromobiusimportostasks:list[sinter.Task]=...stats:list[sinter.TaskStats]=sinter.collect(decoders=["chromobius"],custom_decoders=chromobius.sinter_decoders(),tasks=tasks,num_workers=os.cpu_count(),max_shots=100_000,max_errors=100,)From the command line using sinter:sintercollect\--circuits"example_circuit.stim"\--decoderschromobius\--custom_decoders_module_function"chromobius:sinter_decoders"\--max_shots100_000\--max_errors100--processesauto\--save_resume_filepath"stats.csv"\
Package: chromophile
The Chromophile color maps are designed for the accurate display
of quantitative data.  This package contains the Chromophile
color maps in bothMatplotlibandBokehformats.InstallationThe Chromophile color maps are distributed as a Python package.
To install it, open a terminal and execute:pip install chromophileOr, in IPython or Jupyter, use the%pipmagic command:%pip install chromophileThechromophilepackage has no required dependencies.  To use
the Chromophile color maps with Matplotlib, thematplotlibpackage must be available at the timechromophileis imported.The tools used to develop the Chromophile color maps, and the
source for the online documentation, are in a separate package
calledchromophile-dev.  Most users will not need this package.UsageTo use the color maps, import the Chromophile package:>>> import chromophile as cpThe Chromophile color maps are stored in two formats:MatplotlibColormapobjects are stored incmap.  If
Matplotlib is not available,cmapwill equalNone.  The
color maps are also added to Matplotlib’s color map registry.Bokeh palettes are stored inpalette.Individual color maps can be accessed either as dictionary items
or as attributes of these objects.  For example:>>> cp.cmap.cp_dawn
<matplotlib.colors.ListedColormap object at ...>
>>> cp.palette['cp_peacock']
('#06003c', '#06013d', '#06023e', '#07043e', ...)The same color map is returned regardless of how it is accessed:>>> cp.cmap.cp_lemon_lime is cp.cmap['cp_lemon_lime']
True
>>> cp.palette.cp_blue is cp.palette['cp_blue']
TrueMost IDEs should support tab completion forcmapandpalette.The available color maps can be listed using the.keys()method
ofcmaporpaletteor by callingdir()on either of these
objects.  They are also displayed in the online documentation.
Package: chromoscope
chromoscopeTable of ContentsInstallationDevelopmentLicenseInstallationpip install chromoscopeDevelopmentThis project useshatchfor development, which can be installed viapipx.To get started,cdinto this directory and run:hatchshellThis command will source a python virtual environment with all the necessary development dependencies,
as well aschromoscopeinstalled in development mode. You can read more about environments
in thehatchdocumentation.You can then launch Jupyter:juptyerlaband navigate to thenotebooks/playground.ipynbto use theViewer.All development commands are run from the project root, from a terminal:CommandActionhatch run testRun unit tests withpytestin latest Python version.hatch run test:testRun unit tests withpytestin all target Python versions.hatch versionVersion the python package. Read more in thedocshatch buildBuild the sdist and wheels for PyPI. Generatesdist/hatch publishPublish the package to PyPI. Requires API keys.Licensechromoscopeis distributed under the terms of theMITlicense.
Package: chron
Zipline Python APIOverviewZipline Python API for materializing configs to be run by the Zipline Engine.Set up for publishing.Create your~/.pypircfile with your credentials for pypi repository.[distutils]
index-servers =
  pypi
  pypitest
  local

[pypi]
username: nalgeon  # replace with your PyPI username

[pypitest]
repository: https://test.pypi.org/legacy/
username: nalgeon  # replace with your TestPyPI username

[local]
repository: <local artifactory repository>Generate the required thrift modules, update the version and run the respective command to publish to the desired
repository:python setup.py sdist upload -r { pypi | pypitest | local }
Package: chrono
A (BSD licensed) context manager for timing execution. Useful for benchmarking
everyday Python code easily/cleanly.UsageUsage is trivial. Simply wrap your code in aTimercontext manager.
Example:from chrono import Timer

with Timer() as timed:
    # Put whatever logic you want here.
    # ``for`` loops are great here for timing things that are very fast.

print("Time spent: {0} seconds".format(timed.elapsed))RequirementsPython 2.6+ or Python 3.3+ (may work on Python 2.5)LicenseBSDDocshttp://chrono-bench.readthedocs.org/en/latest/ShortcomingsThis is implemented in pure Python, so it doesn’t have the accuracy a C
extension would have. There’s also overhead for the context manager function
calls, so don’t use this to bench C code.That said, for most everyday usage of Python, it’s very helpful.Running TestsSetup:$ git clone https://github.com/toastdriven/chrono.git
$ cd chrono
$ virtualenv -p python3 env3
$ . env3/bin/activate
$ pip install noseRunning:$ nosetests -s -v tests.pychronois maintained with 100% passing tests at all times.ChangelogDevAdded links to the docsv1.0.1Added initial docsFixed up the main docstring inTimerv1.0.0Initial release
Package: chronobiology
Circadian rhythms are ~24 hour cycles of physiology and behaviour that occur in virtually all organisms from bacteria to man. These rhythms are generated by an internal biological clock and persist even in isolation from any external environmental cues. In humans, circadian rhythms in activity are typically measured using calibrated wrist-worn accelerometers. By contrast, the activity of laboratory animals is typically measured using home cage running wheels. Circadian data are typically double plotted as actograms, showing activity across multiple days. The circadian field has developed standard methods for analysing circadian rhythms. This primarily includes methods to detect recurring features in the data, enabling the period length of activity cycles to be determined. Under entrained conditions, this period will normally be determined by environmental zeitgebers A range of different methods are used to determine the underlying period in biological time series. Three of the most commonly used are the Enright periodogram, Fourier analysis and the Lomb-Scargle periodogram. In addition, activity onset is also frequently used to characterise phase shifts in rhythms in response to environmental zeitgebers. Circadian disruption may occur as a result of environmental conditions. This includes misalignment (when two or more rhythms adopt an abnormal phase relationship) and desynchrony (when two or more rhythms exhibit a different period). A range of approaches have been used to assess circadian disruption. These methods range from simple visual inspection of actograms to metrics such as periodogram power, variability in activity onset, light phase activity, activity bouts, interdaily stability, intradaily variability and relative amplitude. This package provides a set of tools to calculate and plot these parameters based on activity measurements for further inspection and analysis.
Package: chronograph
Chronograph is a feature-packed timer/stopwatch/chronometer that makes it simple to time Python code and functions. Features include:support for named Chronographs and labeled splitsreportingmultiple verbosity levelsbuilt-in loggingJSON-compatible output data, including timestamps of start/stopcustom exceptions if desiredpain-free global management of multiple Chronographsfunction decoratorssupport of with() syntaxcast to float gives total timeunit testedFor examples on usage and further docs, see the offical docs at <http://pythonhosted.org/chronograph/>
Package: chrono-kit
chrono-kitis an open source python library for time series analysis and forecasting.This project was started in 2023 by ODTU YZT.DocumentationSee thewikifor documentation.Or take a look at theexamples.InstallationDependencieschronokit requires:python >= 3.8.17torch >= 1.13.1numpy >= 1.22.0pandas >= 1.4.0scipy >= 1.4.1matplotlib >= 3.2.1User Installationpip install chrono-kit
Package: chronolog-cli
ChronologWhat is Chronolog?Chronolog is an open-source command-line application that allows its users to chronologically log information about their day (hence the name). It was initially created to eleminate the tedious task of creating and organizing documents to log events, findings, progress, and more during the workday.Use casesLogging key takeaways from meetings, key-concepts learned, and events at work. It allows one to always have an alibi during their workday.Anything you see fit to log!InstallationThe source code is available for download from Github, this will be more refined in the future.WindowsSee aboveLinux & MacOsSee aboveFeel free to contribute!There will be a more in-depth CONTRIBUTING.md in the future.
Package: chronologger
ChronologgerTime utilities for Python1RequirementsRequirements: Python >= 3.6Use theMakefiletargets to access most of the functionality:make install-dev,make dbuild,make drun,make dstart...Otherwise...Installpipinstallgit+https://git@github.com/francisco-perez-sorrosal/chronologger.gitRun the Simple ExampleDockerClone the project...gitclonegit@github.com:francisco-perez-sorrosal/chronologger.gitand then...cdchronologger
dockerbuild-fDockerfile.example-tchronologger-example.
dockerrun-itd--namechronologger-examplechronologger-example:latest
dockerexec-itchronologger-examplepythonsimple_example.pyLocalAfter installing the package, just clone the project and execute example with:gitclonegit@github.com:francisco-perez-sorrosal/chronologger.git;cdchronologger
pythonexamples/simple_example.pyor open your python environment/IDE and execute:importtimefromchronologgerimportTimer,TimeUnit,root_timer# Example of decorator: This should report ~100ms each time that is called@Timer(name="Foo method!",unit=TimeUnit.ms,simple_log=True)deffoo():time.sleep(0.1)defmain():# Example of explicit timer: This should report ~100mstimer=Timer("Individual Timer",unit=TimeUnit.ms).start()time.sleep(0.1)timer.stop()# Example of explicit context timer: This should report ~1swithTimer(name="Test Loop!",unit=TimeUnit.s,simple_log=True)astimer:foriinrange(5):time.sleep(0.1)# e.g. simulate IOfoo()timer.mark("i_{}".format(i))if__name__=="__main__":root_timer.label("   STARTING!!!")main()root_timer.label("   PRINTING TIME")root_timer.print()DevelopmentInstall:makeinstall-devUse other commands in the Makefile for extra functionality.Dockermakedbuild
makedrun
makedtestsUse other commands in the Makefile for extra functionality.IDE (PyCharm) Docker InterpreterOnce you create the Docker image withmake dbuildyou can specify thechronologger-dev:latestimage as a Ptyhon
Docker interpreter in IntelliJ/PyCharm for example.1: Inspired by the blog postPython Timer Functions: Three Ways to Monitor Your Codeby Geir Arne Hjelle
Package: chronometer
Yet another simple time measurement tool for Python.  The goal of this
implementation is to avoid as much cruft as possible.  The current version
is 72 lines of actual code long, leaving out blank, doc and comment lines.
Chronometer provides only functions to measure how much wall-clock time
has passed between starting and stopping the timer.Nothing more.  Nothing less.Chronometer tries to stay accurate to the actual time spent between
starting and stopping the timer by utilizing a monotonic timer.  According
to the linux manual a monotonic timer is subject to time adjustments so
it stays accurate but will never move backwards or jump.  It will be
adjusted gradually and always moves forward as long as the system runs.ExamplesEasy:importtimefromchronometerimportChronometerlong_running_task=lambda:time.sleep(3.)withChronometer()ast:long_running_task()# that will take a few seconds.print('Phew, that took me{:.3f}seconds!'.format(float(t)))Advanced:fromtimeimportsleepfromchronometerimportChronometercounter=0deflong_running_task_that_can_fail():globalcountercounter+=1sleep(2.)returncounter>3withChronometer()ast:whilenotlong_running_task_that_can_fail():print('Failed after{:.3f}seconds!'.format(t.reset()))print('Success after{:.3f}seconds!'.format(float(t)))Ridiculous:importasynciofromchronometerimportChronometerclassPingEchoServerProtocol(asyncio.StreamReaderProtocol):def__init__(self):super().__init__(asyncio.StreamReader(),self.client_connected)self.reader,self.writer=None,Noneself.latency_timer=Chronometer()defclient_connected(self,reader,writer):self.reader,self.writer=reader,writerasyncio.async(self.ping_loop())asyncio.async(self.handler())@asyncio.coroutinedefsend(self,data):self.writer.write(data.encode('utf-8')+b'\n')yield fromself.writer.drain()@asyncio.coroutinedefping_loop(self):yield fromasyncio.sleep(5.)whileTrue:ifself.latency_timer.stopped:self.latency_timer.start()yield fromself.send('PING (send me PONG!)')sleep_duration=max(2.,10.-self.latency_timer.elapsed)yield fromasyncio.sleep(sleep_duration)@asyncio.coroutinedefhandler(self):whileTrue:data=(yield fromself.reader.readline())ifdata[:4]==b'PONG'andself.latency_timer.started:yield fromself.send(('Latency:{:.3f}s'.format(self.latency_timer.stop())))l=asyncio.get_event_loop()@asyncio.coroutinedefstartup():s=(yield froml.create_server(lambda:PingEchoServerProtocol(),host='localhost',port=2727))print('Now telnet to localhost 2727')yield froms.wait_closed()l.run_until_complete(startup())
Package: chronometry
ChronometryProgressBarEstimatorEstimatoris an object that estimates the running time of a single argument function.
You can use it to avoid running a script for too long.
For example, if you want to cluster a large dataset and running it might take too long,
and cost too much if you use cloud computing,
you can create a function with one argumentxwhich takes a sample withxrows
and clusters it; then you can useEstimatorto estimate how long it takes to run it
on the full dataset by providing the actual number of rows to theestimate()method.Estimatoruses aPolynomialLinear Regressionmodel
and gives more weight to larger numbers for the training.UsagefromchronometryimportEstimatorfromtimeimportsleepdefmultiply_with_no_delay(x,y):return(x**2+0.1*x**3+1)*0.00001+y*0.001defmultiply(x,y):sleep_time=multiply_with_no_delay(x,y)ifsleep_time>30:raisesleep(sleep_time)ify==6:sleep(12)elif7<y<15:raiseException()returnsleep_timeestimator=Estimator(function=multiply,polynomial_degree=3,timeout=5)# the `unit` argument chooses the unit of time to be used. By default unit='s'estimator.auto_explore()estimator.predict_time(x=10000,y=10000)The above code runs for about53seconds and then estimates thatmultiply(10000, 10000)will take1002371.7seconds which is only slightly
smaller than the correct number:1001010seconds.max_timeis the maximum time allowed for the estimate function to run.If you are usingEstimatorinJupyter,
you can plot the measurements with theplot()method (no arguments needed) which
returns amatplotlibAxesSubplotobject and displays it at the same time.estimator.plot('x')estimator.plot('y')
Package: chronon-ai
Chronon Python APIOverviewChronon Python API for materializing configs to be run by the Chronon Engine. Contains python helpers to help managed a repo of feature and join definitions to be executed by the chronon scala engine.User API OverviewSourcesMost fields are self explanatory. Time columns are expected to be in milliseconds (unixtime).# File <repo>/sources/test_sources.pyfromai.chronon.queryimport(Query,select,)fromai.chronon.api.ttypesimportSource,EventSource,EntitySource# Sample queryQuery(selects=select(user="user_id",created_at="created_at",),wheres=["has_availability = 1"],start_partition="2021-01-01",# Defines the beginning of time for computations related to the source.setups=["...UDF..."],time_column="ts",end_partition=None,mutation_time_column="mutation_timestamp",reversal_column="CASE WHEN mutation_type IN ('DELETE', 'UPDATE_BEFORE') THEN true ELSE false END")user_activity=Source(entities=EntitySource(snapshotTable="db_exports.table",mutationTable="mutations_namespace.table_mutations",mutationTopic="mutationsKafkaTopic",query=Query(...))website__views=Source(events=EventSource(table="namespace.table",topic="kafkaTopicForEvents",)Group By (Features)Group Bys are aggregations over sources that define features. For example:# File <repo>/group_bys/example_team/example_group_by.pyfromai.chronon.group_byimport(GroupBy,Window,TimeUnit,Accuracy,Operation,Aggregations,Aggregation,DefaultAggregation,)fromsourcesimporttest_sourcessum_cols=[f"active_{x}_days"forxin[30,90,120]]v0=GroupBy(sources=test_source.user_activity,keys=["user"],aggregations=Aggregations(user_active_1_day=Aggregation(operation=Operation.LAST),second_feature=Aggregation(input_column="active_7_days",operation=Operation.SUM,windows=[Window(n,TimeUnit.DAYS)fornin[3,5,9]]),)+[Aggregation(input_column=col,operation=Operation.SUM)forcolinsum_columns# Alternative syntax for defining aggregations.]+[Aggregation(input_column="device",operation=LAST_K(10))],dependencies=["db_exports.table/ds={{ ds }}"# If not defined will be derived from the Source info.],accuracy=Accuracy.SNAPSHOT,# This could be TEMPORAL for point in time correctness.env={"backfill":{# Execution environment variables for each of the modes for `run.py`"EXECUTOR_MEMORY":"4G"},},online=True,# True if this group by needs to be uploaded to a KV Store.production=False# True if this group by is production level.)JoinA Join is a collection of feature values for the keys and (times if applicable) defined on the left (source). Example:# File <repo>/joins/example_team/example_join.pyfromai.chronon.joinimportJoin,JoinPartfromsourcesimporttest_sourcesfromgroup_bys.example_teamimportexample_group_byv1=Join(left=test_sources.website__views,right_parts=[JoinPart(group_by=example_group_by.v0),],online=True,# True if this join will be fetched in production.production=False,# True if this join should not use non-production group bys.env={"backfill":{"PARALLELISM":"10"},"streaming":{"STREAMING_ENV_VAR":"VALUE"}},)
Package: chronophore
Chronophore is a time-tracking program. It keeps track of users’
hours as they sign in and out.This project was started to help keep track of students and tutors
signing in and out at a tutoring center in a community college.Chronophore uses a Qt interface by default, but includes a Tk interface for compatibility:Qt InterfaceTk InterfaceInstallationChronophore can be installed with pip:$pipinstallchronophoreUsageusage: chronophore [-h] [--testdb] [-v] [--debug] [-V] [--tk]

Desktop app for tracking sign-ins and sign-outs in a tutoring center.

optional arguments:
  -h, --help     show this help message and exit
  --testdb       create and use a database with test users
  -v, --verbose  print a detailed log
  --debug        print debug log
  -V, --version  print version info and exit
  --tk           use old tk interface
Package: chronoplot
# chronoplotTimeline maker.## ExampleMake file `test`:0 10 1 "Ciel nosurge (memories)"20 30 1 "Ciel nosurge"30 40 1 "Ar nosurge"50 60 2 "Ar Tonelico"60 70 2 "Ar Tonelico 2"70 80 2 "Ar Tonelico 3"Format is `start_time stop_time group text`.Run:$ chronoplot test0 -                      +------------------+|                      |   Ciel nosurge   ||                      |    (memories)    ||                      |                  ||                      +------------------+13 -|||                      +------------------+|                      |   Ciel nosurge   |26 -                      |                  ||                      +------------------+|                      |                  ||                      |    Ar nosurge    ||                      |                  |40 -                      +------------------+|||| +------------------+53 - |   Ar Tonelico    || |                  || +------------------+| |                  || |  Ar Tonelico 2   |66 - |                  || +------------------+| |                  || |  Ar Tonelico 3   || |                  |80 - +------------------+
Package: chronos
chronoschronos is an ncurses stopwatch/timer.  It supports multiple simultaneous
timers, which makes it ideal for keeping track of time spent on various tasks.Show me the goodsOkay, how do I use it?InstallingFrom the command line:pip install chronosIf chronos is already installed, you can upgrade to the latest version with:pip install --upgrade chronosUsageTo use chronos, run it from the command line:chronosCommandsThe following commands are supported:n - Creates and starts a new timer.
j - Move cursor down.
k - Move cursor up.
d - Deletes the selected timer.
e - Edits the title of the selected timer.
p - Pauses/starts the selected timer.
r - Resets the selected timer.
a - Adds time to the selected timer.
s - Subtracts time from the selected timer.
q - Quits the program.
h - Shows the help screen.Adding and Subtracting TimeWhen entering the amount of time to add or subtract, you can use any
combination of the following formats:xh - x number of hours
ym - y number of minutes
zs - z number of secondsSo if you wanted to add/subtract 1 hour and 5 minutes, type:1h5mOr if you wanted to add/subtract 45 minutes and 30 seconds, type:45m30sVersion InformationCurrent stable release is v0.3, last updated on 1 May 2015.FeedbackFeel free to send any feedback you may have regarding this project toNSinopoli@gmail.com.Changelogv0.3Add support for window resizing and scrolling (GH-4)v0.2Overhaul the UI and improve the UXv0.1.2Implement functionality to add and subtract time (GH-2)v0.1.1Change xterm-color to xterm to support curs_set(0) (GH-1)v0.1Initial release
Package: chronos-cli
chronosA CLI tool that infers a next version number for Git repos. It does its magic by looking at the commit messages of commits made since the last tag that had asemverin it. For this to work properly, your commits should following theConventional Commitsspec.Getting startedRequires Git 2.0+.To use the tool:pip install --upgrade chronos-cliChange into a Git repo.chronos inferTo bootstrap a development environment (after you've cloned the repo and changed into it):pip install --upgrade pipenvpipenv sync --devDocumentationDocs are hosted athttps://chronos-cli.readthedocs.io.StyleThis project followsPEP8.Testingpytestwill run unit tests in this repo.flake8will lint the code.This repo also has a CI/CD pipeline built withAnsibleandGitLab CI.The pipeline's Ansible playbook can be run on your *nix workstation too:ansible-playbookansible/pipeline.yml--tagsbuildContributingCommits should follow theConventional Commitsspec.FAQTODOAcknowledgementsThanks toEric Poitrasfor asking me to write an earlier version of what would become this tool. This was really his idea.