Saravanan666/pypi-org huggingface dataset:
Package: trafaret_schema
Trafaret Schema===============[![Build status](https://circleci.com/gh/Deepwalker/trafaret_schema.svg?style=shield)](https://circleci.com/gh/Deepwalker/trafaret_schema)[![Gitter](https://badges.gitter.im/Deepwalker/trafaret.png)](https://gitter.im/Deepwalker/trafaret)[![Downloads](https://img.shields.io/pypi/v/trafaret_schema.svg?style=flat-square)](https://pypi.python.org/pypi/trafaret_schema)[![Downloads](https://img.shields.io/pypi/l/trafaret_schema.svg?style=flat-square)](https://pypi.python.org/pypi/trafaret_schema)Library takes JSON Schema and converts it to a Trafaret instance:from trafaret_schema import json_schemacheck_string = json_schema({'type': 'string', 'minLength': 6, 'maxLength': 10, 'pattern': '(bla)+'})check_string('blablabla')What is important to note, that this library is a big trafaret that produces other trafarets. So on parsingJSON Schema you can get a DataError, and you will get DataError in usage of parsed schema.And you can use schema parser or parsed schema as trafaret in any circumstances where you can use trafarets.You can use `Register` object to provide custom `format` implementation and to support cross schemas `$ref`objects:import trafaret as tfrom trafaret_schema import json_schema, Registermy_reg = Register()my_reg.reg_format('any_ip', t.IPv4 | t.IPv6)check_address = json_schema(open('address.json').read(), context=register)check_person = json_schema(open('person.json').read(), context=register)Library is a bit of fun, because it is implemented in a `trafaret` and produces `trafaret` instances. Also its likea pro level of `trafaret` usage (I hope so).Features:[*] basic[*] type[*] enum[*] const[*] number[*] string[*] array[*] minProperties[*] maxProperties[*] uniqueItems[*] items[*] additionalItems[*] contains[*] objects[*] maxProperties[*] minProperties[*] required[*] properties[*] patternProperties[*] additionalProperties[*] dependencies[*] propertyNames[*] combinators[*] anyOf[*] allOf[*] oneOf[*] not[*] format[*] references[*] definitions[*] $ref
Package: trafaret_validator
Install:pip install trafaret_validatorThis is a wrapper that validate params using Trafaret (http://trafaret.readthedocs.org/en/latest/).Usage:importtrafaretastfromtrafaret_validatorimportTrafaretValidatordeffoo_validator(value):ifvalue!='foo':returnt.DataError('Expected foo!')return'foo'classRequestValidator(TrafaretValidator):ids=t.List(t.Int)payload=t.Dict(foo=t.Call(foo_validator))validator=RequestValidator(ids=ids,payload=payload)ifnotvalidator.validate():returnvalidator.errorsdata=validator.data# returns checked dict of params {'ids': [...], 'payload': {'foo': 'foo'}}ids=validator.idspayload=validator.payload
Package: traffic-forward
traffic-forward
是一款python开发的流量转发工具，可以使用python脚本行运行，也可以封装使用命令行，同样可以使用pyinstaller等工具进行封装成Macos，Linux,
Windows 下的可执行文件运行，可用于本地流量转发，与内网流量转发1. 安装（可选）此工具完全使用python原生的模块进行开发不需要安全任何的第三方模块，如果需要使用命令行可能需要sudopip(3) install traffic_forward2. 使用lport与lhost是需要转发的端口rhost与rport是转发到的目标端口2.1 转发本地流量traffic_forward -mode trans -lhost 127.0.0.1 -lport 22 -rhost 127.0.0.1 -rport 9999在使用完后使用control+c退出会有错误输出这是正常的2.2 将流量转发到公网机器在公网上的主机监听2个端口traffic_forward -mode listen -lport 8088 -rport 8089内网主机连接公网主机监听的任意端口（2个中任意一个），加入debug可以查看连接出现的问题，此时是讲本地的22端口转发到公网机器的8088口traffic_forward -mode slave -lhost 127.0.0.1 -lport 22 -rhost x.x.x.x -rport 8088 -debug 1然后ssh name@x.x.x.x -p 80892.3 转发本地的UDP流量由于UDP原因，这里只开发到了UDP的本地转发，如果可以希望可以帮组我开发远程转发traffic_forward -mode Utrans -lhost 127.0.0.1 -lport 8090 -rhost 127.0.0.1 -rport 99992.4. 日志此工具会在当前目录下生成日志，详细日志的功能等待开发可以如果不需要请直接删去
Package: traffic-guardian
traffic_guardianProxy server for intercepting HTTP traffic with python library to dynamically manage the proxy rulesSolution consists of two main components that are implemented insidetraffic_guardian_corepackage:Proxy server based ontwistednetworking engine running by default on port 8080REST API to govern the proxy rules used for intercepting and mocking responses by default on port 9090Based on REST API for governing the proxy rules python library has been developed insidetraffic_guardianpackage.UsageTo installtraffic_guardianuse following command (assuming that you havepipinstalled):$pipinstalltraffic_guardianTo run the proxy server on default port (8080 for proxy server, 9090 for REST API to govern the proxy rules) use the following command:$traffic_guardianTo check more help with the CLI tool use the following command$traffic_guardian-hDocsDocumentation to project is hosted on readthedocs.org under following linkhttps://traffic-guardian.readthedocs.io/en/latest/NoteThis project has been set up using PyScaffold 4.3.1. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: trafficintelligence
This software project provides a set of tools developed by Nicolas
Saunier and his collaborators for transportation data processing, in
particular road traffic, motorized and non-motorized. The project
consists in particular in tools for the most typical transportation
data type, trajectories, i.e. temporal series of positions.The code is licensed under the MIT open source license
(http://www.opensource.org/licenses/mit-license).Contact me atnicolas.saunier@polymtl.caand learn more about my work
athttp://nicolas.saunier.confins.net.Please consult the project website on Bitbucket for more information
and step-by-step guideshttps://bitbucket.org/Nicolas/trafficintelligence/
Package: traffic-intersection
traffic-intersectionAuthors and ContributorsTung M. Phan (Caltech)DescriptionThis project involves the contract-based design and implementation of an autonomous traffic intersection system that may be extended and composed with other systems of the same class.RequirementsPython 3.xPackages: seerequirements.txtInstructionsInstall all required packagesModify parameters if desiredRunmain.pyInstallation (optional)Install withpip3 install traffic-intersectionCreate a new.pyfile and enterimporttraffic_intersection.mainRun the.pyfileLicenseThis is free software released under the terms of `the BSD 3-Clause License
(http://opensource.org/licenses/BSD-3-Clause).  There is no warranty; not even
for merchantability or fitness for a particular purpose.  Consult LICENSE for
copying conditions.When code is modified or re-distributed, the LICENSE file should accompany the code or any subset of
it, however small.
As an alternative, the LICENSE text can be copied within files, if so desired.
Package: trafficinterventions
Traffic-InterventionsInstallationpython -m pip install --upgrade pippip install --upgrade trafficinterventionsDocumentationAll relevant files can be foundhereInterventionsSample Usage : Edge Manipulationimporttrafficinterventionsce=trafficinterventions.ChangeEdges.ChangeEdges(fileName="sample.xml")# Sample Interventionce.disallowAppendTypes(["bus"],["-100"],"new_file.xml")Sample Usage : Lane Manipulationimporttrafficinterventionscl=trafficinterventions.ChangeLanes.ChangeLanes(fileName="sample.xml")# Sample Interventionce.changePriorityLanes(["highway.cycleway"],100,"new_file.xml")Sample Usage : Trip Manipulationimporttrafficinterventionsct=trafficinterventions.ChangeTrips.ChangeTrips(fileName="sample.xml")# Sample Interventionct.changeTripStartTime([3],1.00,"new_file.xml")SimulationsSample Usage: Speed Camera Placementimporttrafficinterventionssc=trafficinterventions.SpeedCamera.SpeedCamera(maxTimeSteps=1000,nearestNeighbourDisallow=250.0,gridArray=[-10000,10000,10000,-10000],pathCFG="map.sumocfg",outPath="Outputs/",summaryFilePath="summary.txt",numLocs=5,colour=(255,0,0))# Run the simulation and get outputssc.runSimulation()Sample Usage: Stressed Junctions Detectionimporttrafficinterventionssj=trafficinterventions.StressJunction.StressJunction(weightsArray=[1,1,1,1,1],pathCFG="map.sumocfg",outPath="Outputs/",pathNET="osm.net.xml",pathSummaryFile="stressed_junctions.txt",numLocs=5,initialPoiLocation=(5064.74,3568.48))# Run the simulation and get outputssj.runSimulation()Sample Usage: Polluted Junctions Detectionimporttrafficinterventionsej=trafficinterventions.EmissionJunction.EmissionJunction(pathCFG="map.sumocfg",outPath="Outputs/",pathNET="osm.net.xml",pathSummaryFile="polluted_junctions.txt",numLocs=5,initialPoiLocation=(5064.74,3568.48))# Run the simulation and get outputsej.runSimulation()
Package: trafficlight
trafficlightstart and stop ec2 instances.installationinstall with pippip install trafficlightdependencies-aws cli (installed and configured)-python3flags-h, --help     show this help message and exit  
  --key KEY      optional. use a tag key besides Name  
  -R REGION, --region REGION
                 specify a different region
  -g, --green    start.  
  -r, --red      stop.  
  -L, --leave    do not change instance state.
  -y, --yes      automatically approve instance state change.  
  -H, --host     use hostnames instead of ip addresses.  
  -c, --connect  begin an ssh session.  
  -K, --keyfile  write pem keyfile to trafficlight config.  
  -p, --pipe     output instance ip or hostname via standard out to pipe into other commands.  
  -v, --version  show program's version number and exitusageshow trafficlight help page, including usage and flags.$ trafficlight -hswitch instance with tag Name:example. if instance is stopped it will start, if it's running it will stop.$ trafficlight exampleconnect to ec2 instance with tag Name:example. if instance is stopped it will start the instance first.$ trafficlight example -cspecify a different region.$ trafficlight example -R us-west-1update trafficlight's config file with keyfile for using -c --connect flag.$ trafficlight -Kstart all instances with tag Name:example. if instances are started already they will stay up.$ trafficlight example -gstop all instances tag Name:example. if instances are stopped already they will stay stopped.$ trafficlight example -rget instance info for tag, but don't change instance state.$ trafficlight example -Lstop all instances with tag Products:example.$ trafficlight example --key Products -rlist all ec2s and do nothing.$ trafficlightlist all ec2s and stop them.$ trafficlight -r
Package: traffic-light-simulator
Traffic Light Simulator GoalsThis is an attempt to simulate a simple traffic light. You can specify how long you want each light show before it changes to the next light, as well as the number of cycles (green to red or red to green light changes) you want before the simulator stops running.InstallInstall with pipYou may want to do this in a virtualenv if you don’t want to clutter up your global packages. Certainly not necessary, but if you want to use a virtualenv just:$ virtuanelv testenv
$ cd testenv
$ . bin/activateThen simply install with pip:$ pip install traffic-light-simulatorUsing the source filesSimply clone this repo.Running the simulatorIf you installed with pip, you have a script available to you to run the simulator. Simply enter into your terminal:$ traffic-light-simulatorOtherwise, if you’ve cloned the repo, just run the traffic_light_simulator/user_interface.py with your interpreter:$ python user_interface.pyRunning the testsThere are some tests that I wrote while writing the TrafficLight class, located in tests.py. If you want to run it simply run it with your interpreter$ python tests.py
Package: trafficshaper
IntroTired of dealing with major & minor numbers? You like the TOML format (kind of "ini" on steroids)?
Always wanted to play with traffic shaping on linux but it turned too complex or confusing?
This alpha tool aims at simplifying the learning curve for traffic control on ip route 2.The format started quite close to the original command-line and progressively adds more support and shorter or easier notations.Forget aboutclassid,flowid.
Considerparentsometimes handle forcomplexscenarios only!Check theexamplesfolder to dive into the syntax.Supported featureshosts aliasesnetwork interfaces aliasesspeeds aliasesautomatic generation of major & minor mumbers (all of them!) when possiblevisual representation of the setupTrafic control coveragesfq : makes a more fair trafficnetem : simulate network problemshtb : control traffic rate using categoriestbf : very basic shapingTODO:relative speeds (percents)templates (for repeated attributes)QDiscssfqnetemhtbtbfClasses (categories uses by some QDiscs)htbFilters (assign traffic)fwu32ip (src, dst, sport, dport)action
Package: trafficSimulator
trafficSimulatorA microscopic traffic simulator in Python.About The ProjecttrafficSimulatoris a Python project that aims to provide a flexible and user-friendly platform for creating and testing traffic scenarios and analyzing their outcomes.trafficSimulatoris suitable for students, researchers and practitioners who are interested in studying traffic phenomena and finding solutions for traffic problems.To learn more about how the project was created check out thisarticleon Medium.(back to top)Built WithBased on:Treiber, Martin; Hennecke, Ansgar; Helbing, Dirk (2000),"Congested traffic states in empirical observations and microscopic simulations", Physical Review E, 62 (2): 1805–1824,arXiv:cond-mat/0002177,Bibcode:2000PhRvE..62.1805T,doi:10.1103/PhysRevE.62.1805,PMID 11088643,S2CID 1100293(back to top)Getting StartedPrerequisitesRequires Python 3.7+.InstallationUsing PIPpipinstalltrafficSimulatorInstalling from sourcegit clone https://github.com/BilHim/trafficSimulatorcd trafficSimulatorpip install -e .(back to top)UsageYou can import the module using:importtrafficSimulatorastsFor more examples, please refer to theExamplesfolder.(back to top)DocumentationTo be completed.(back to top)RoadmapTo be completed.(back to top)ContributingCheck out theContribution Guidelines.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull Request(back to top)LicenseDistributed under the MIT License. SeeLICENSEfor more information.(back to top)ContactBilal HimiteLinkedIn:@bilalhimiteMedium:@bilhimEmail:mail.bilalhimite@gmail.comProject Link:https://github.com/BilHim/trafficSimulator(back to top)
Package: traffic-taffy
Traffic Analysis of Fluctuating Flows (TAFFy)AboutNetwork and security operators are continually bombarded by strange
deviations in network traffic that are sometimes operationally
problematic, sometimes a threat to security, and other times just
plain odd.  Wouldn't it be wonderful to have a tool that accurately
tells you exactly what has changed in these traffic profiles?
This tool is designed to do just that.Installationpip install traffic-taffyUsageSee the onlinereadthedocs
documentation.DevelopmentTraffic-taffy is under very rapid development with a fair amount of
refactoring as time goes on into better class architectures.  If you
are considering looking at portions of the code and submitting pull
requests, please reach out to Wes ahead of time to check what changes
might be coming that will cause merge conflicts.Copyright and LicenseThis project is copyrighted by the University of Southern California,
Information Sciences institute.  It is released under the Apache 2.0
license.AcknowledgmentsWe greatly thank Comcast for this project was made possible through
their Comcast Innovation Fund.
Package: traffic-weaver
Traffic WeaverSemi-synthetic time series generator based on averaged data.Acknowledgments and citationTBDTable of contentDocumentationIntroductionQuick startAPI referenceIntroductionTraffic Weaver reads averaged time series and creates
semi-synthetic signal with finer granularity, that after averaging
matches the original provided signal.
Following tools are applied to create semi-synthetic signal.Oversampling with a given strategyStretching to match the integral of the original time seriesSmoothingRepeatingTrendingNoisingBelow figure shows general usage example.
Based on provided original averaged time series (a), signal isn-times oversampled
with predefined strategy (b). Next, it is stretched to match integral of the input
time series function (c). Further, it is smoothed with spline function (d).
In order to create weekly semi-synthetic data, signal is repeated 7 times
(e) applying long-term trend consisting of sinusoidal and linear function (f).
Finally, the noise is introduced to the signal. starting from small values and
increasing over time (g). To validate correctness of applied processing,
(h) presents averaged two periods of created signal, showing that they closely
match the original signal (except the applied trend).
Package: traffix
TraffiXTraffic Assignment with NetworkX and osmnX.Formerly known as "StraPy", the name clashed with other package name in PyPi.PurposeTraffiX is aiming to create a free open access transportation simulation software for all, increasing reproducibility, transparency, and public accessibility while decreasing cost and subjective decision making in the transportation modelling domain.TraffiX is also intended as an environment and framework for student, researcher, public institution or any other interested parties to test all of their transportation modelling related problem.Current and Future Project DirectionsNowTraffiX is currently developing macroscopic modelling assignment (User Equilibrium) described in Yosef Sheffi's Urban Transportation Networks and Maximum Entropy Matrix Estimation commonly used as the basic macroscopic transportation model in the four step transport plannning model.In the near futureTraffiX short-term goals is supporting classical transportation modellling techniques and method described in Ortúzar & Willumsen's Modelling Transport and Yosef Sheffi's Urban Transportation NetworkReferencesSheffi, Y. 1984. Urban Transportation Networks.Ortúzar, J. de D., Willumsen, L.G., Consultancy, L.W., 2011. Modelling Transport.
Package: traffsimpy
TraffSimPyModule Python permettant de modéliser le trafic routier de n'importe quel réseau.Démarrage rapideSimulons une route droite, où la vitesse des véhicules est limitée à 50 km/h et où des voitures arrivent toutes les deux secondes.On importe les objets de bases du modulefrom traffsimpy import Simulation, CarFactoryL'objet Simulation gère l'affichage et la modélisation, l'objet CarFactory gère la création de nouveaux véhicules.On crée un objet Simulationsim = Simulation("Route droite", 1440, 820)Le titre de la simulation sera "Route droite" et la fenêtre qui l'affichera sera de taille 1440×820.On crée un objet CarFactoryfreq = 2
car_factory = CarFactory(freq)Il créera un nouveau véhicule toutes les deux secondes.On définit le réseau routierroad_list = [{"start": (-60, 410), 
"end": (1500, 410), 
"v_max": 13.9, 
"car_factory": car_factory}]

sim.create_roads(road_list)Il est constitué d'une seule route, qui va des points (-60, 410) à (1500, 410), qui a pour limite de vitesse 13.9 m/s ≈ 50 km/h et qui a pour usine à voitures le CarFactory définit précédement.On lance la simulationsim.run()Elle restera ouverte jusqu'à ce que l'utilisateur quitte. Pendant la simulation, on peut ralentir, accélerer et arrêter le temps, bouger dans le réseau routier et prendre des captures d'écran.
Package: traflog
Counts network traffic to and from local addresses using pcap.
Stores data in an SQLite database for 60 seconds periods.  Generates simple
reports.  Reports can have IP address labelled.  Other reports can be generated
using SQL and custom scripts.  Labels traffic during 1:00 AM and 7:00 AM as
free (that’s how my ISP works).This package install only one script namedtraflog.Start collecting data:$ sudo traflog --net 192.168.1.0 --mask 255.255.255.0 /var/lib/traffic.sqlite(You probably want to run this as a service.)Generate report:$ traflog --report --hours=24 /var/lib/traffic.sqlite
addr              nonfree      free
-----------------------------------
192.168.1.5          0.00      0.00  router.tplink
192.168.1.103      318.00      1.00  julia.samsung
192.168.1.104       81.00      0.00  rebekka
192.168.1.105        0.00      0.00  ?
192.168.1.108       17.00      0.00  ?
192.168.1.125      259.00     15.00  umonkey.dell
Package: trafocalc
TrafoCalcGoal of the ProjectDesign and Optimization of a power transformer needs to handle and calculate many required technical parameters
simoultanously, while the econoimically or technically optimal design was searched. This python package contains the
implementations of many analytical functions, which can be used to calculate the geometrical, electrical, mechanical or
thermal properties of three-phased power transformers.The tool uses the implementation of a simple two-winding model calculations for the calculation of the transformer
parameters. Beside the analytical formulas, this project contains a 2D axisymmetric, parametric FEM simulation for
calculation of the short circuit impedance of a power transformer. The proposed methodology can be useful to understand
the principles of transformer design, or transformer professionals. Because, all of the proposed calculations validated
by measurements.QuickstartThe\noteslibrary contains many sample designs in jupyter notebooks, which can be a good starting point to use this
package.References[1]Orosz, T., Borbély, B., Tamus, Z. Ádám   Performance Comparison of Multi Design Method and Meta-Heuristic Methods for Optimal Preliminary Design of Core-Form Power Transformers , Periodica Polytechnica Electrical Engineering and Computer Science, 61(1), pp. 69–76, 2017. https://doi.org/10.3311/PPee.10207
Package: traice
traiceTiny yet useful tool for consistent model training logs generation.InstallationTo install through pip use the following command:pipinstalltraiceThe tool requires onlypandaspackage to be installed. However, there isenvironment.ymlfile which can be used for the same environment which is used for developing the tool:condaenvcreate-fenvironment.ymlUsageThe tool may be used as follows (seeexamples/dummy.py):fromrandomimportseed,uniformfromtimeimporttime,sleepfromtraiceimportTraicertraicer=Traicer()deftrain_step():sleep(uniform(0,1))seed(17)init_timestamp=time()foriinrange(1,5):start_timestamp=time()train_step()traicer.push(i,uniform(0,1/i),(time_:=time())-start_timestamp,time_-init_timestamp)print(traicer.df)Essentially, it accumulates allpusharguments in a list which is then converted to a dataframe. The example produces the following log (the last two columns may differ a bit):epochlosstimecumulative_time010.8066910.5226090.522609120.1448130.9615651.484184230.2347400.7670612.251254340.0275410.6616592.912921TestingTo run test execute the following statement in your terminal:python-munittestdiscovertest
Package: trail
# trailKeep track of your thoughts.### Installation` $ pip install trail `### Usage:Save a new trail, in current directory (creates a “.trail” file), for example:` $ trail enter some text here ... $ trail "Use quotes if your trail containsweird-f@r-bashcharacters!" $ trail "is inspired byhttps://github.com/jonromero/trail" `Print trails found in current directory .trail file.` $ trail `Save a new “global” trail (in “~/.trail/.trail”, requires dir to exist)` $ trail-genter some text here ... `Print “global” trails.` $ trail-g`