Saravanan666/pypi-org huggingface dataset:
Package: topsis-yashas-102103726
topsis-yashas-102103726topsis-yashas-102103726 is a Python library for dealing with Multiple Criteria Decision Making(MCDM) problems by using Technique for Order of Preference by Similarity to Ideal Solution(TOPSIS).InstallationUse pip package manager to install topsis-yashas-102013726.pip install topsis-yashas-102103726UsageEnter csv filename followed by .csv extentsion, then enter the weights vector with vector values separated by commas, followed by the impacts vector with comma separated signs (+,-) and the output csv file name.topsis-yashas-102103726 sample.csv "1,1,1,1" "+,-,+,+ output.csv"NotesThe first column and first row are removed by the library before processing, in attempt to remove indices and headers.Make sure the csv does not contain categorical values.LicenseThis project is licensed under theMIT License.
Package: topsis-yash-saxena
TOPSIS-PythonProject 1 : UCS633 DATA ANALYSIS AND VISUALIZATIONSubmitted By:Yash Saxena 101703627pypi:https://pypi.org/project/topsis-yash-saxena/git:https://github.com/yashsaxena972/topsisWhat is TOPSIS ?Technique forOrderPreference bySimilarity toIdealSolution (TOPSIS) originated in the 1980s as a multi-criteria decision
making method. TOPSIS chooses the alternative of shortest Euclidean distance
from the ideal solution, and greatest distance from the negative-ideal
solution. More details atwikipedia.How to use this package?TOPSIS-YASH-SAXENA  can be run as in the following example:In Command Prompt>> topsis data.csv "1,1,1,1" "+,+,-,+"In Python IDLE:>>> import pandas as pd
>>> from topsis_python.topsis import topsis
>>> dataset = pd.read_csv('data.csv').values
>>> d = dataset[:,1:]
>>> w = [1,1,1,1]
>>> im = ["+" , "+" , "-" , "+" ]
>>> topsis(d,w,im)Sample datasetThe decision matrix (a) should be constructed with each row representing a Model alternative, and each column representing a criterion like Accuracy, R2, Root Mean Squared Error, Correlation, and many more.ModelCorrelationR2RMSEAccuracyM10.790.621.2560.89M20.660.442.8963.07M30.560.311.5762.87M40.820.672.6870.19M50.750.561.380.39Weights (w) is not already normalised will be normalised later in the code.Information of benefit positive(+) or negative(-) impact criteria should be provided inI.OutputModel   Score    Rank
-----  --------  ----
  1    0.77221     2
  2    0.225599    5
  3    0.438897    4
  4    0.523878    3
  5    0.811389    1The rankings are displayed in the form of a table using a package 'tabulate', with the 1st rank offering us the best decision, and last rank offering the worst decision making, according to TOPSIS method.
Package: topsis-yotest
TOPSISSubmitted By:Yash Shukla 101803617What is TOPSIS?Technique forOrderPreference bySimilarity toIdealSolution
(TOPSIS) originated in the 1980s as a multi-criteria decision making method.
TOPSIS chooses the alternative of shortest Euclidean distance from the ideal solution,
and greatest distance from the negative-ideal solution.How to install this package:>> pip install Topsis_Yash_101803617In Command Prompt>> python

>> import Topsis_Yash_101803617
>> Topsis_Yash_101803617.topsis("data.csv","1,1,1,1","+,+,-,+","result.csv")Input file (data.csv)The decision matrix should be constructed with each row representing a Model alternative, and each column representing a criterion like Accuracy, R2, Root Mean Squared Error, Correlation, and many more.ModelCorrelationR2RMSEAccuracyM10.790.621.2560.89M20.660.442.8963.07M30.560.311.5762.87M40.820.672.6870.19M50.750.561.380.39Weights (weights) is not already normalised will be normalised later in the code.Information of benefit positive(+) or negative(-) impact criteria should be provided inimpacts.Output file (result.csv)ModelCorrelationR2RMSEAccuracyTopsis_scoreRankM10.790.621.2560.890.77222M20.660.442.8963.070.22555M30.560.311.5762.870.43884M40.820.672.6870.190.52383M50.750.561.380.390.81131The output file contains columns of input file along with two additional columns having **Topsis_score** and **Rank**
Package: topssh
topssha package on top of fabric to use ssh easilyinstallationpipinstalltopsshusagefromtopssh.ssh_liteimportSSHfromtopssh.sshimportSSHasFullSSHhost="127.0.0.1"user="username"password="password"# lite ssh only captures command outputssh=SSH(host,user,password)ssh.add_sudo_watcher()ssh.connect(timeout=5)out=ssh.run("hostname")print(out)out=ssh.run("uname -a")print(out)# all outpus in ssh.echo_textprint("".join(ssh.echo_text))# full ssh cpatures all output including command input and outputssh=FullSSH(host,user,password)ssh.connect(timeout=5)# add timestamps to output and ignore color chars# ssh.patch_output()out=ssh.run("hostname")print(out)out=ssh.run("uname -a")print(out)# all outpus in ssh.echo_textprint("".join(ssh.echo_text))
Package: topydo
topydo is a powerful and customizable todo.txt application for the console, inspired by the todo.txt CLI by Gina Trapani.Highlights of the additional features it provides:Set due and start dates;Multiple UIs (CLI, prompt and a column-based TUI);Custom sorting;Manage tags;Maintain dependencies between todo items;Allow todos to recur;Some conveniences when adding new items (e.g. adding creation date and use relative dates)
Package: topyn
TOPyN: Typed Opinionated PYthon NormalizerAbout*Python is quite a flexible language, something that is not so good if you start working in mid level size projects and/or in teams.
Over the time we have found a set of rules that makes working with Python in this context easier, and once you get you use to them you want to apply them to every small Python snippet that you write.The problem is that these rules depend on a set of packages and config files, and every time we change our mind about one rule, or add new ones, we need to update multiple projects.
Topyn solves this by providing in one single place all the tools and configurations we use in our projects.All the configurations are part of the project (topyn/configs) and is not the purpose of this project to make them flexible, if you need that please check the packages that we use, and run them with your configuration.Installpip install topynCommand lineThere are two possible arguments:pathis the path that you want to check, if it is empty it defaults to the current directory.--fixif you use this flag topyn will try to fix the code for youExamplesCheck the code inside directory_with_code :topyn directory_with_codeCheck the code inside current directory :topynCheck the code inside current directory and try to fix it:topyn --fixtopyn --helpoutputTyped Opinionated PYthon Normalizer

positional arguments:
  path        path to topynize (default: .)

optional arguments:
  -h, --help  show this help message and exit
  --fix       try to fix my code (default: False)
  --version   show program's version number and exittopynoutput✅➡️ Checking formatting ...
All done! ✨ 🍰 ✨
8 files would be left unchanged.
➡️ Checking rules ...
➡️ Checking types ...
✅ Everything is OK! 😎"🔴➡️ Checking formatting ...
All done! ✨ 🍰 ✨
1 file would be left unchanged.
➡️ Checking rules ...
➡️ Checking types ...
tests/resources/wrong_types/wrong_types.py:2: error: Incompatible return value type (got "int", expected "str")
Found 1 error in 1 file (checked 1 source file)

🔴 Sadly, types failed 😢Tools includedFlake8flake8 is a command-line utility for enforcing style consistency across Python projectsFlake8 pluginsflake8-bugbearA plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.flake8-printCheck forprintstatements in python files.flake8-comprehensionsA flake8 plugin that helps you write better list/set/dict comprehensions.pep8-namingNaming Convention checker for Python (PEP 8)BlackThe Uncompromising Code FormatterMypyOptional static typing for Python (PEP 484)ContributorsLeandro Leites Barrios : Main developerDenada Korita : UX & Documentation consultant* scooter icon source:icons8
Package: tor_access
tor_access==========Tornado access lib for user role## How to collect access node in tornado```import tor_access@tor_access.needcheck(url=True)class IndexHandler(tornado.web.RequestHandler):def get(self):passaclgroup = tor_access.ACLGroupNode(u'系统管理', category='category')@tor_access.needcheck(url=True, group=aclgroup)class UserHandler(tornado.web.RequestHandler):def get(self):pass@tor_access.needcheck(url=True, category='categroyname')class UserInfoHandler(tornado.web.RequestHandler):def get(self):passOR: aclgroup.fetch_handlers(UserHandler,UserInfoHandler) to add access node```## How to get  access node```import tor_accessacl = tor_access.ACL```## How to user Role and check access in Handler```import tor_access@tor_access.needcheck(url=True)class IndexHandler(tornado.web.RequestHandler):def prepare(self):mrn = tor_access.MasterRoleNeed() # 超管角色；有所有的权限节点rn = tor_access.RoleNeed('abcrole',intro=u'普通角色',nodes=set(['restful.index.IndexHandler','userdemo']))self.check_access(rn)```
Package: toradbapi
Want to use twisted’s adbapi in tornado but does not know how? Try toradbapi.This is just wrapper fortwisted.enterprise.adbapi.ConnectionPoolto use with tornado. So documentation for__init__args you can find at twisteddocsAvailable methods intoradbapi.ConnectionPool:run_queryrun_operationrun_interactionThey all have similar interface as twisted’s corresponding methods. They return instance ofFuture, so can be yielded inside coroutine.Example usage:from tornado import gen
from toradbapi import ConnectionPool

pool = ConnectionPool('MySQLdb', db='test')

@gen.coroutine
def get_entities():
    entities = yield pool.run_query('SELECT * FROM `entity`')
    raise gen.Return(entities)Demo project is under demo.py file. Also there are more examples in tests.py.Only Python 2.7 supported for now.
Package: torado
ToradoA script that routes all your machine traffic through TOR Network. It changes IP every 5 minutes (change it in your needs)There are 2 versions. 'Torado.py' is for everything and it changes IP every 5 seconds. You just have to setup proxy. The 2nd version 'torado_browseronly.py'is only for browsers without setting up something. Ofcourse you can set also the 2nd version to work for everything tooNow either you setup your machine with SOCK5 proxy 127.0.0.1:9050 or you setup proxy in a software (from settigns as usually)Note that you may need to run scrip with admin privilagesFor more informations visit Torado's github page fromhere
Package: toran
# The Toran WSGI module
This is an API gateway built on top of python’s native wsgiref module. It aims to be as
simplistic and configurable as possible without recompiling the source.## Config Driven Development
The gateway was built with one thing in mind: ‘’Write less code, Write more config files’’. Why? Because you would
prefer to have modular, understandable elements in a key element of the architecture.### actions.ini
In here you can create/update/delete different actions to take on any resource. For example a list is a GET on a
resource without ID specified while a delete is a DELETE method with id specified.### rules.ini
In here you provide the rules for each resource, what actions they can perform (list, create,
etc).## The Server Script*server.py*is a python script that loads the config files once and starts serving requests using wsgi. Please
check out the handlers package and its utils.## Reloading
There is a script calledreloader.pythat changes a byte in a file which then is kept in memory by the server,
the server then checks it and reloads the configs without missing requests (This happens on the single next request).
Package: tor_async_couchdb
tor-async-couchdbtor-async-couchdbis an opinionatedTornadoasyncclient forCouchDB.tor-async-couchdbis intended to operate as part of a service’s
application tier and interact with the service’s data tier implemented
usingCouchDB.tor-async-couchdbdocumentation isn’t as strong as it could be.
sample services are best way to gain an understanding of how to usetor-async-couchdb.tor-async-couchdbwas originally created for use withCouchDB.tor-async-couchdbhas also
been used withCloudant DBaaSandCloudant Local.tor-async-couchdbwas created as a way to capture a very opinionated
set of best practices and learnings after operating and scaling a number
of services that used CouchDB and Tornado. The bullets below summarize
the opinions.services should embrace eventual consistencythoughts on data models:every document should have a versioned type property (extype=v9.99)documents are chunky aka retrieval of a single document should
typically be all that’s necessary to implement a RESTful service’s
endpoint ala standard NoSQL data model thinkingassume conflicts happen as part of regular operationsensitive data at rest is an information security concern that
must be addressedeach property should be evaluated against a data and
information classification policythisis a good example of data classification policyif a property is deemed sensitive it should ideally be hashed
usingbcryptif
possible and otherwiseSHA3-512if a sensitive proprerty can’t be hashed it should be encrypted
usingKeyczardirect tampering of data in the database is undesirable and therefore
tamper resistance is both valued and a necessityto prevent unncessary fragmentation, CouchDB, not the service tier,
should generate document IDsdocument retrieval should be done through views against document
properties not document IDsone design document per viewhorizontally scaling CouchDB should be done using infrastructure
(CouchDB 2.0 or Cloudant) not application level shardingUsingInstalltor-async-couchdb.>pipinstalltor_async_couchdbConfiguretor-async-couchdbin your service’s mainline. Typically
the configuration options are expected to come from a configuration file
and/or the service’s command line.fromtor_async_couchdbimportasync_model_actionsasync_model_actions.database="http://127.0.0.1:5984/database"async_model_actions.tampering_signer=Noneasync_model_actions.username=Noneasync_model_actions.password=Noneasync_model_actions.validate_cert=True
Package: tor_async_util
tor-async-util is a set of utilities that are useful when implementing
RESTful APIs usingTornado’sAsynchronous and non-Blocking
I/O.Featureswhen async curl httpclient is used, it’s useful to know if libcurl
was compiled with an async dns resolver - seeis_libcurl_compiled_with_async_dns_resolver()instead of CTRL+C generating an unfriendly stack trace install a
signal handler - seeinstall_sigint_handler()a default request handler which generates a RESTful API friendly not
found response - seeDefaultRequestHandler()an abstract base class from which all request handler classes can be
derived to provideread and write json requests and responses optionally verifying each
against a jsonschema - seeRequestHandler.get_json_request_body()andRequestHandler.write_and_verify()accessing decoded BASIC auth credentials - seeRequestHandler.get_basic_auth_creds()augment Tornado’s defaultset_status()with support for
additional status codes - seeRequestHandler.set_status()override Tornado’s defaultwrite_error()so a json response body
is generated rather than the default HTML response body - seeRequestHandler.write_error()thin wrapper aroundConfigParser.ConfigParserto parse ini files
for things settings such as logging levels, keyczar crypters and
keyczar signers - seeConfigcore implementations of/_version,/_noopand/_healthendpoints include async health checkers - seegenerate_version_response(),generate_noop_response(),generate_health_check_response()andAsyncHealthCheckthisexplains that the time_info attribute of a tornado response object
contains timing details of the phases of a request which is available
when using the cURL http client. a description of these timing
details can be found athere.
these timings are very, very helpful in understanding latencies from
interactions between microservices - seewrite_http_client_response_to_log(). an example of what the logs
look like is below2016-01-23T03:45:53.362+00:00 INFO async_docker_remote_api 'Remote Docker API' took 3.42 ms to
respond with 200 to 'GET' against >>>http://127.0.0.1:4243/containers/cid/logs?stdout=1<<< - timing
detail: q=0.13 ms n=0.03 ms c=0.04 ms p=1.65 ms s=1.66 ms t=1.83 ms r=0.00 ms
Package: torbjorn
Torbjorn🔨 提供一些实用的 Python 装饰器～Torbjorn（即托比昂）是守望先锋游戏中的英雄之一，他拥有一个强力输出的炮台。
俗话说「他强任他强，我用托比昂」，我希望本项目也能给你的 Python 代码提供强力的支持！🎈️ v0.1.1：使用time.perf_counter计算时间，以提高精准度。安装# pip 安装pipinstalltorbjorn# or 源码安装gitclonehttps://github.com/Ailln/torbjorn.gitcdtorbjorn&&pythonsetup.pyinstall使用run_time: 计算运行时间run_count: 计算运行次数ctrl_c: 程序终止验证importloggingimporttorbjornastbnlogger=logging.getLogger(__name__)@tbn.run_time@tbn.run_time(name="test_time")@tbn.run_time(logger=logger,name="test_time")@tbn.run_count@tbn.run_count(name="test_count")@tbn.run_count(logger=logger,name="test_count")@tbn.ctrl_cdefcalculate_million_numbers(num):number=0for_inrange(num):number+=1if__name__=='__main__':for_inrange(10):calculate_million_numbers(1000000)# output:# [calculate_million_numbers] run count(t): 1# [test_count] run count(t): 1# [test_count] run count(t): 1# [test_time] run time(s): 0.074010# [test_time] run time(s): 0.074463# [calculate_million_numbers] run time(s): 0.074512# [calculate_million_numbers] run count(t): 2# [test_count] run count(t): 2# [test_count] run count(t): 2# [test_time] run time(s): 0.074386# [test_time] run time(s): 0.074522# [calculate_million_numbers] run time(s): 0.074556# ^CAre you sure to quit? (yes|y) / (no|n)# >> 123# ^CAre you sure to quit? (yes|y) / (no|n)# >> no# [calculate_million_numbers] run count(t): 3# [test_count] run count(t): 3# [test_count] run count(t): 3# [test_time] run time(s): 0.072722# [test_time] run time(s): 0.072863# [calculate_million_numbers] run time(s): 0.072897# ^CAre you sure to quit? (yes|y) / (no|n)# >> yes# >> exit...许可
Package: torboost
torboostDownload utility for TorAboutThis tool was designed specifically for downloading large files from onion services for analysis. It does so by retrieving chunks using multiple circuits, so the server must support byte ranges (Accept-Ranges, most of them do). If a given part fails (connection issues, chunk smaller than expected), it is being put back to the queue. Once all bits and pieces are ready they are combined, and the final result is saved in the./downloadsdirectory.WarningThis way of utilizing Tor network reduces your anonymity!RequirementstorInstallation$ pip install torboostUsageBasic usage, you may need to wait a while until all circuits are established:$ torboost -u 'http://example.onion/data.zip'If you want to combine the files before download is finished:$ torboost -u 'http://example.onion/data.zip' --combineIn case you experience delays, or there is a problem establishing circuits you can reset workers using:$ torboost -u 'http://example.onion/data.zip' --resetCustom configuration fileYou can create a custom configuration file for Tor (JSON-based), for example:{
    "ExitNodes": "{se},{no},{be},{hr},{cz},{fi},{dk},{lu},{nl}",
    "StrictNodes": "1"
}And then apply it with:$ torboost -u 'http://example.onion/data.zip' --config custom.jsonArgumentsusage: torboost [-h] -u URL [-p TOR_PROCESSES] [--control-port-start CONTROL_PORT_START] [--socks-port-start SOCKS_PORT_START] [--timeout TIMEOUT] [--chunk-size CHUNK_SIZE] [--user-agent USER_AGENT] [--config CONFIG] [--debug] [--combine] [--reset] [-v]

Utility for downloading files from onion services using multiple Tor circuits

options:
  -h, --help            show this help message and exit
  -u URL, --url URL     Download URL (default: None)
  -p TOR_PROCESSES, --tor-processes TOR_PROCESSES
                        Number of Tor processes (default: 5)
  --control-port-start CONTROL_PORT_START
                        First port for Tor control (default: 10080)
  --socks-port-start SOCKS_PORT_START
                        First port for SOCKS (default: 9080)
  --timeout TIMEOUT     Timeout for Tor relay connection (default: 300)
  --chunk-size CHUNK_SIZE
                        Size of a single download block (in bytes) (default: 50MB)
  --user-agent USER_AGENT
                        User-Agent header (default: python-requests/2.27.1)
  --config CONFIG       Custom Tor configuration file (JSON)
  --debug               Enable debugging mode (verbose output) (default: INFO)
  --combine             Combine all chunks downloaded so far
  --reset               Remove data directories and rebuild circuits
  -v, --version         show program's version number and exit
Package: torc
torcTorc is a Python library for computing magnetic fields resulting from magnetic coils
such as loops, lines, round coils and racetrack coils of rectangular cross section,
positioned and oriented arbitrarily in space.Documentation and examples yet to come, but there is one example file you can run:python-mtorc.exampleto display an arrangement of coils that represents the magnetic transport assembly for
the cold atom experiment in the RbChip lab in the Spielman group at NIST:RequirementsRequiresnumpyandscipy. 'mayaviis an optional requirement, it is needed for
displaying 3D renderings of the magnetic coils.InstallationFrom pip:pip install torcFrom source: Clone this repository and tunpython setup.py install
Package: torch2onnx2trt
Convert PyTorch models to ONNX and then to TensorRTRequirementsPython 3.6 or 3.8PyTorch (1.9 or higher is required)TensorRT (tested with 8.0)The rest of the requirements are listed inrequirements.txtand can
be installed automatically viapipinstallationThe python version restriction is caused by pytorch-quantization package
required for the conversion of quantised modelsAlternatively, you can skip installation of the requirements and usethisdocker containerInstallationFrom pypiThe package can now be installed from pypi using command:pip3 install torch2onnx2trt==0.1.1From sourceThere issetup.pyfile in the repo, so the installation is pretty
straightforwardgit clone https://github.com/ucLh/torch2onnx2trt.git
cd torch2onnx2trt
pip3 install -e ./Usageimporttorchfromtorch2onnx2trtimportconvert_torch2onnx,convert_onnx2trt# Load your pretrained modelpretrained_model=YourModelClass()ckpt=torch.load('ckpt.pth')pretrained_model.load_state_dict(ckpt['state_dict'])# You need to pass your model with loaded weights, an output path for onnx model# and desired input shape to convert_torch2onnx functionconvert_torch2onnx(pretrained_model,'effnetb0_unet_gray_2grass_iou55.onnx',(1,3,640,1280))# convert_onnx2trt expects a path to onnx model and an output path for resulting# TensorRT .bin modelconvert_onnx2trt('../effnetb0_unet_gray_2grass_iou55.onnx','../effnetb0_unet_gray_2grass_iou55.bin')