Saravanan666/pypi-org huggingface dataset:
Package: pyticket-analytics
pyticket_analyticsA python package to access ticketmaster data using python, and to provide tools for simple data analytics for the accessed data.Installation$pipinstallpyticket_analyticsUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensepyticket_analyticswas created by Ega Kurnia Yazid. It is licensed under the terms of the MIT license.Creditspyticket_analyticswas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: pyticketfood
pyticketfoodThepyticketfoodpackage is a simple wrapper to fetch transactions from Ticket food card.TODO[ ] add simple CLI tool to show current balance and transactions
[ ] create pypi package
[ ] test login unsuccessfull, creds wrong (NOTE - ALL SUCCESSFULL TESTS REQUIRE VALID CRED)
[ ] test login successfull
[ ] test balance
[ ] test transactions
Package: py-ticktock
ticktockSimple Python code metering library.ticktockis a minimalist library to profile Python code: it periodically displays timing of running code.QuickstartFirst, installticktock:pip install py-ticktockAnywhere in your code you can usetickto start a clock, andtockto register the end of the snippet you want to time:fromticktockimporttickclock=tick()# do some workclock.tock()This will print the timing of the lines 3 to 5 in your code as so:⏱️ [3-5] 50us count=1How isticktockdifferent?ticktockbecomes really useful when you are trying to time code that is called multiple times.Rather than printing a new line each time the code is visited,ticktocktracks the times andonly prints them every couple of seconds.ticktock's output iscompact and readable, regardless of how many times you run through the code you are timing, or where this code is.As an example, the following code:fromticktockimporttickfor_inrange(1000):clock=tick()# do some workclock.tock()Will result in asingle, continuously updated line of outputshowing you the average time and how many times it was called so far:⏱️ [4-6] 50us count=1000DocumentationCheckout thedocumentationfor a complete manual.ticktockis actively being developed, be sure to submitissuesorpull requestswith ideas!
Package: pyticle
pyticleA Python Library for Particle Swarm IntelligenceThis package implements the Particle Swarm Optimization (PSO) algorithm in pure python. The only thing you need to is
installing the package and call it with the right parameters!PSO is an interactive meta-heuristic algorithm that uses "particles" as a candidates for solutions. The goal is to move the particles
towards the global/local minimum in each iteration.InstallationSimply install this package by running the following command:pipinstallpyticleUsageTo minimize the 2D functionmy_funcin range [-15, 10] using 100 particles via 80 iterations:frompyticle.swarm_optimizationimportSwarmOptimizationoptimizer=SwarmOptimization(cost_func=my_func,particle_num=100,omega_start=1,omega_end=0.0,Âcoef=[2.0,2.0],low_bound=-15.0,high_bound=10,Âboundary_strategy='random',var_size=2,max_iter_num=80,elite_rate=0.1)optimizer.optimize()DemoIn this section, you can see the results of using this package for two simple 2D benchmarks. To run the benchmarks, run:frompyticle.demo_runimportdemo_rundemo_run()The Sphere FunctionHere is the evolution of 100 particles in 100 iterations to find the minimum ofthe Sphere function:Here is the changes in the minimum, average, and maximum values of the cost function of all particles over time:The Ackley FunctionSame as the previous example, this is the evolution of 100 particles in 100 iterations to find the minimum ofthe Ackley function:Here is the changes in the minimum, average, and maximum values of the cost function of all particles over time:ContributionYou are very welcome to contribute to this project with your code (as pull-requests), mention the bugs or ask for new
features (as GitHub Issues), or just tell your friends about it!You can also directly contact me byemail.
Â
Package: pyticles
# PyticlesPyticles is a particle system for pygame. It allows you to render particles with velocity and decay rates.# ClassesPyticles includes two classes.Particle(image, screen_coords, velocity, decay_time=5, decay_chance=3)Engine()These are what the system is based around.# ParticlesParticles are simply a class that represents a single particle.Image is the particle texture.Screen coordinates represent the position on the screen.Velocity is how far the particles will go every time the Engine ticks.Decay time is how many Engine ticks until the particle has a chance to decay ( 1 in decay_chance ). Once there has been twice as many ticks as decay time, the particle will instantly decay.# EnginesEngines contain sets of particles and have 6 functions. You will only need to use 3. The functions are:burst(image, particle_count, origin, scatter=1, displacement=1)draw(particle)tick(surface)Burst releases a burst of particles at a certain point, marked origin.Scatter is how high the velocity in a certain direction can be.Particle count is how many particles are released.Displacement is the furthest away a particle can spawn from the origin.Image is the particle texture.Draw will create a single particle, and it takes in a particle class.Tick takes in a surface to draw to and manage all tasks such as velocity, decay, and drawing.
Package: pyticli
synopsis:A Python Temporal Intervals Common Language Interface.A Python Temporal Intervals Common Language Interface: Library to create
graphs query over Kripke structures from a Interval Temporal Logic inspired
language.InstallationAvailable throught Python Package Index:$ pip install pyticliOr:$ easy_install pyticliGetting startedThe main class is…Changes0.0.1 (2011-XX-YY)First Python Index Package release.
Package: pytictac
TicTac - Time your Torch Code EasilyThis repository simplifies timing of code by reducing the amount of boilerplate code needed.
Specifically, it provides a context manager that can be used to time a block of code.
The context manager will print the time taken to execute the block of code.
Additionally, full classes/objects can be timed easily and statistics are generated.Installationpip3 install pytictacBasic UsageOld:importtorchdeffunc(x):returnx*2start=torch.cuda.Event(enable_timing=True)end=torch.cuda.Event(enable_timing=True)start.record()# Computefunc(2)end.record()torch.cuda.synchronize()print(start.elapsed_time(end))New:frompytictacimportTimer,CpuTimerdeffunc(x):returnx*2# ComputewithTimer("func2"):func(2)withCpuTimer("func2"):func(2)Terminal Output:Timefunc2:0.0655359998345375msThere exists always a cpu version (using import time; st = time.time()) and a gpu-version (using torch events).
This is handy when you want to time for example a dataloader where you cannot use torch events.Advanced UsagefrompytictacimportClassTimer,ClassContextTimer,accumulate_timeclassSmallObject:def__init__(self):self.x=3@accumulate_timedefmethod_a(self):self.x+=2classTestObject:def__init__(self):self.x=3self.small_obj=SmallObject()self.cct=ClassTimer(objects=[self,self.small_obj],names=["Test Object","Small Object"],enabled=True)@accumulate_timedefmethod_a(self):self.x+=2self.small_obj.method_a()@accumulate_timedefmethod_b(self):self.x+=2withClassContextTimer(parent_obj=self,block_name="method_b.1",parent_method_name="method_b"):self.x=3withClassContextTimer(parent_obj=self,block_name="method_b.1.a",parent_method_name="method_b.1",n_level=2,cpu=True):self.x=4@cpu_accumulate_timedefmethod_c(self):self.x-=2@cpu_accumulate_timedefmethod_d(self):self.x=0def__str__(self):returnself.cct.__str__()to=TestObject()to.method_a()to.method_a()to.method_a()to.method_b()to.method_c()print(to)Terminal Output:TestObjecttotal[ms]count[n]std[ms]mean[ms]+-method_a:0.1630.0450.054+-method_b:0.0510.00.05+------method_b.1:0.0310.00.027+-----------method_b.1.a:0.0110.00.007+-method_c:0.0110.00.005SmallObjecttotal[ms]count[n]std[ms]mean[ms]+-method_a:0.0230.0010.005Releasingpython3 setup.py bdist_wheel 
twine upload dist/*
Package: pytictoc
pytictoc contains a class TicToc which replicates the functionality of MATLAB’s tic and toc for easily timing sections of code. Under the hood, pytictoc uses the default_timer function from Python’s timeit module.INSTALLATIONpytictoc can be installed and updated via conda or pip.pippip install pytictoc
pip install pytictoc --upgradecondaconda install pytictoc -c ecf
conda update pytictoc -c ecfUSAGEBasic usage:>> from pytictoc import TicToc
>> t = TicToc() #create instance of class

>> t.tic() #Start timer
>> t.toc() #Time elapsed since t.tic()
Elapsed time is 2.612231 seconds.A string passed to the toc method changes the printed message. This can be useful to differentiate timing of different sections in the same script.>> t.toc('Section 1 took')
Section 1 took 16.494467 seconds.An optional keyword argument restarts the timer (equivalent to t.tic()) after reporting the time elapsed.>> t.toc(restart=True)
Elapsed time is 36.986837 seconds.
>>t.toc()
Elapsed time is 2.393425 seconds.If you want to return the time elapsed to a variable rather than printing it, use the tocvalue method.>>spam = t.tocvalue()
>>spam
20.156261717544602The TicToc class can be used within a context manager as an alternative way to time a section of code. The time taken to run the code inside the with statement will be reported on exit.>>with TicToc():
>>    spam = [x+1 for x in range(10000)]
Elapsed time is 0.002343 seconds.Determining and setting the timerpytictoc uses timeit.default_timer to time code. On Python 3.3 and later, this is an alias for time.perf_counter. On earlier versions of Python it is an alias for the most precise timer for a given system.To see which function is being used:>>import pytictoc
>>pytictoc.default_timer
<function time.perf_counter>You can change the timer by simple assignment.>>import time
>>pytictoc.default_timer = time.clock
>>pytictoc.default_timer
<function time.clock>
Package: pytictri
pytictri - EDF teléinformation Python libraryThis library allows you to retrieve teleinfo using serial port device (USBTICLCV2).This library is a fork from pyticcom project. It adds three phases counter compatibility.Examplefrom pytictri import Teleinfo, Mode

with Teleinfo('/dev/tty.usbserial-DA4Y56SG', mode=Mode.HISTORY) as teleinfo:

    frame = teleinfo.read_frame()
    print(frame.get("PAPP"))
Package: pytidbrep
python-tidb-replication========================[![Build Status](https://travis-ci.org/HashDataInc/pytidbrep.svg?branch=master)](https://travis-ci.org/HashDataInc/pytidbrep)Pure Python Implementation of Tidb replication protocol. This allow you to receive event like insert, update, delete with their datas and raw SQL queries.Use cases===========* Tidb to NoSQL database replication* Tidb to search engine replication* Invalidate cache when something change in database* Audit* Real time analyticsDocumentation==============TODOInstallation=============```pip install pytidbrep```Mailing List==============You can get support and discuss about new features on:https://groups.google.com/forum/#!forum/tidb-userExamples=========This example will dump all replication events to the console:```pythonfrom pytidbrep import BinLogStreamReaderstream = BinLogStreamReader('/path/to/binlog/dir')for binlogevent in stream:print binlogeventstream.close()```For this SQL sessions:```sqlCREATE DATABASE test;use test;CREATE TABLE test4 (id int NOT NULL AUTO_INCREMENT, data VARCHAR(255), data2 VARCHAR(255), PRIMARY KEY(id));INSERT INTO test4 (data,data2) VALUES ("Hello", "World");UPDATE test4 SET data = "World", data2="Hello" WHERE id = 1;DELETE FROM test4 WHERE id = 1;```Output will be:```391018326269895930: DDL: CREATE DATABASE test;391018326269895973: DDL: use test; CREATE TABLE test4 (id int NOT NULL AUTO_INCREMENT, data VARCHAR(255), data2 VARCHAR(255), PRIMARY KEY(id));391018326269896003: DML: INSERT test.test4: data "Hello", id 1, data2 "World",391018326269896009: DML: UPDATE test.test4: data "Hello" => "World", id 1 => 1, data2 "World" => "Hello",391018326269896018: DML: DELETE test.test4: data "World", id 1, data2 "Hello",```Tests========use `tox` to run unit testsChangelog==========[ChangeLog](https://github.com/HashDataInc/pytidbrep/blob/master/ChangeLog)Contributors==============Major contributor:* [Zhanwei Wang](https://github.com/wangzw)Licence=======Copyright 2012-2017 HashData Inc.Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
Package: pytide
pangeo-pytideAboutpytideallows to analyze the tidal constituents of a time series from aharmonic
analysis.
The definition of tidal constants and astronomical arguments is taken fromFES2014 tidal prediction
software.It was developed to analyze theMIT/GCM LLC4320model. The script"mit_gcm_detiding.py"used to perform this analysis is distributed with this distribution.Try it for yourselfTry this library onhttp://binder.pangeo.io/:How To InstallAnacondais a free and open-source distribution of the
Python programming language for scientific computing, that aims to simplify
package management and deployment. Package versions are managed by the package
management system conda.The first step is to install the anaconda distribution. The installation manual
for this software is detailedhere.To install the software using conda simply execute the following command:conda install pytide -c conda-forgeThis command will install the software and the necessary dependencies. More
information is available on the syntax of this command on therelated
documentation.If you want to build the package yourself, you can find more information on
thehelp pageof
the project.Quick TutorialThe distribution contains a time seriesfes_tide_time_series.ncthat will be used in this help.The first step is to read this time series using the NetCDF4 library, for
example:import netCDF4
import pytide

with netCDF4.Dataset("tests/dataset/fes_tide_time_series.nc") as dataset:
    time = netCDF4.num2date(dataset['time'][:],
                            dataset['time'].unit,
                            only_use_cftime_datetimes=False)
    h = dataset['ocean'][:] * 1e-2      # cm to mThen, we will create an instance of apytide.WaveTableobject:wt = pytide.WaveTable()By default, all components known by this object are loaded into memory. The
list of components known by this object can be retrieved using thepytide.WaveTable.known_constituentsmethod.If you want to restrict the analysis to only a few components, you must provide
a list to the constructor in order to specify the waves to be analyzed.wt = pytide.WaveTable(["M2", "K1", "O1", "P1", "Q1", "S1"])Thepytide.WaveTable.constituentsmethod allows to retrieve the list of waves defined during the construction of
the object.The different nodal corrections are then calculated from the time series to be
analyzed:f, vu = wt.compute_nodal_modulations(time.astype("datetime64"))
# You can also use a list of datetime.datetime objects
# wt.compute_nodal_modulations(list(time))These coefficients are used byharmonic
analysisto determine the properties of the different tidal waves defined during the
construction of the instance.w = wt.harmonic_analysis(h, f, vu)This result can then be used to determine a tidal height for the analyzed time
series:hp = wt.tide_from_tide_series(time, w)
Package: pytides
Pytides is small Python package for the analysis and prediction of tides. Pytides can be used to extrapolate the tidal behaviour at a given location from its previous behaviour. The method used is that of harmonic constituents, in particular as presented by P. Schureman in Special Publication 98. The fitting of amplitudes and phases is handled by Scipy’s leastsq minimisation function. Pytides currently supports the constituents used by NOAA, with plans to add more constituent sets. It is therefore possible to use the amplitudes and phases published by NOAA directly, without the need to perform the analysis again (although there may be slight discrepancies for some constituents).It is recommended that all interactions with pytides which require times to be specified are in the format of naive UTC datetime instances. In particular, note that pytides makes no adjustment for summertime or any other civil variations within timezones.For more information, please seehttp://github.com/sam-cox/pytides
Package: pytides2
pytidesAboutPytides is small Python package for the analysis and prediction of tides. Pytides can be used to extrapolate the tidal behaviour at a given location from its previous behaviour. The method used is that of harmonic constituents, in particular as presented by P. Schureman in Special Publication 98. The fitting of amplitudes and phases is handled by Scipy's leastsq minimisation function. Pytides currently supports the constituents used by NOAA, with plans to add more constituent sets. It is therefore possible to use the amplitudes and phases published by NOAA directly, without the need to perform the analysis again (although there may be slight discrepancies for some constituents).It is recommended that all interactions with pytides which require times to be specified are in the format of naive UTC datetime instances. In particular, note that pytides makes no adjustment for summertime or any other civil variations within timezones.RequirementsNumpyScipyInstallationeasy_install pytides2orpip install pytides2should do the trick.Mainly for my own reference (sanity), to get pytides and its dependencies all working in a Debian (mint) virtualenv:sudo apt-get install liblapack-dev libatlas-base-dev gfortran
export LAPACK=/usr/lib/liblapack.so
export ATLAS=/usr/lib/libatlas.so
export BLAS=/usr/lib/libblas.so
pip install numpy
pip install scipy
pip install pytidesand you'll probably want topip install matplotlibalthough this won't install all the backends for matplotlib, which is a headache for another day (thislooks promising).UsagePytides is in its infancy, and hasn't yet been fully documented. The best way to get started would be to readthis example.
After that, you might trymaking your own tide table, where you can also find a method for handling timezones.
You can find information about using NOAA published Harmonic Constituents directlyhere.If you want to knowhowPytides works, it would be best to readP. Schureman, Special Publication 98. Alternatively, there ismy attemptto explain it on the wiki (although it's a little mathematical and not yet complete).
It is certainly possible to use Pytides successfully without any knowledge of its methods.ContributionI would welcome any help with Pytides. Particularly if you have knowledge of constituent data (including node factors) which other institutions/packages use. I can be reached atsam.cox@cantab.netor via github.Please note however that Pytide's lack of attempts to infer constituents, or exclude similar constituents based on their synodic periods is an intentional design decision.
Package: pytides-py3
pytides-py3pytides-py3 is an improved version of existing pytides to work with Python 3.10.x. The basic behavior and operation
follows the original author's pytides. - Sangkon HanAboutPytides is small Python package for the analysis and prediction of tides. Pytides can be used to extrapolate the tidal
behaviour at a given location from its previous behaviour. The method used is that of harmonic constituents, in
particular as presented by P. Schureman in Special Publication 98. The fitting of amplitudes and phases is handled by
Scipy's leastsq minimisation function. Pytides currently supports the constituents used by NOAA, with plans to add more
constituent sets. It is therefore possible to use the amplitudes and phases published by NOAA directly, without the need
to perform the analysis again (although there may be slight discrepancies for some constituents).It is recommended that all interactions with pytides which require times to be specified are in the format of naive UTC
datetime instances. In particular, note that pytides makes no adjustment for summertime or any other civil variations
within timezones.RequirementsNumpyScipyInstallationeasy_install pytidesorpip install pytidesshould do the trick.Mainly for my own reference (sanity), to get pytides and its dependencies all working in a Debian (mint) virtualenv:sudo apt-get install liblapack-dev libatlas-base-dev gfortran
export LAPACK=/usr/lib/liblapack.so
export ATLAS=/usr/lib/libatlas.so
export BLAS=/usr/lib/libblas.so
pip install numpy
pip install scipy
pip install pytidesand you'll probably want topip install matplotlibalthough this won't install all the backends for matplotlib, which is a headache for another
day (thislooks promising).UsagePytides is in its infancy, and hasn't yet been fully documented. The best way to get started would be to
readthis example.
After that, you might
trymaking your own tide table, where you can also find a method for handling timezones.
You can find information about using NOAA published Harmonic Constituents
directlyhere.If you want to knowhowPytides works, it would be best to readP. Schureman, Special Publication 98. Alternatively,
there ismy attemptto explain it on
the wiki (although it's a little mathematical and not yet complete).
It is certainly possible to use Pytides successfully without any knowledge of its methods.ContributionI would welcome any help with Pytides. Particularly if you have knowledge of constituent data (including node factors)
which other institutions/packages use. I can be reached atsam.cox@cantab.netor via github.Please note however that Pytide's lack of attempts to infer constituents, or exclude similar constituents based on their
synodic periods is an intentional design decision.
Package: pytidy
PytidyA type hint based dependency injection library for python language (+3.6). While there are already several DI libraries for python, this library is inspired by Java Spring and aims to provide similar interface and functionality to Java Spring.Supports Python 3.7 and 3.8.UsageSuper simple. Attach@componentdecorator to any classes which need to be injected in somewhere constructor, and attach@autowireddecorator to constructors which need dependency injection.frompytidy.decoratorsimportcomponent,autowired@componentclassHello:defsay(self):print("Hello")classInjected:@autowireddef__init__(self,instance:Hello):self.instance=instancedefsay_proxy(self):self.instance.say()a=Injected()a.say_proxy()Also supports dataclass of Python3.7+.fromdataclassesimportdataclassfrompytidy.decoratorsimportcomponent,autowired_cls@componentclassHello:defsay(self):print("Hello")@autowired_cls@dataclassclassInjected:instance:Hellodefsay_proxy(self):self.instance.say()a=Injected()a.say_proxy()LicenseMIT
Package: pytidyclub
Welcome to pytidyclub!pytidyclub is a simple Python wrapper for the TidyClub API.TidyClubis a powerful online tool that removes a lot of hassle from the management of your
club or association. Unfortunately, TidyClub doesn’t do everything, but they provide anAPIwhich you can use to extend it. pytidyclub is a Python wrapper for this API, which makes
creating Python projects that interface with the TidyClub API easier.pytidyclub isnota complete implementation of the TidyClub _API.InstallingYou can install pytidyclub withpip:pip install pytidyclubExamplefrom pytidyclub import pytidyclub

club = pytidyclub.Club(
    slug = default,
    client_id = "12345J",
    client_secret = "54321F"
)

# Authenticate as a user.
print club.auth_authcode_get_url("https://sso.example.com/oauth/tidyclub/callback")
club.auth_authcode_exchange_code("555555", "https://sso.example.com/oauth/tidyclub/callback")

# Get all contacts.
contacts = club.get_contacts()

# Search for contacts
contacts = club.get_contacts("Kye Russell")