Saravanan666/pypi-org huggingface dataset:
Package: tuneup
tuneupMere research notes. It may morph into a useful package if things pan out.Should lean more onhttp://infinity77.net/global_optimization/test_functions.html#test-functions-indexand lots to fix. Article is here though...https://www.linkedin.com/posts/petercotton_comparing-python-global-optimization-packages-activity-6723950446962184192-9jxb
Package: tuneuptechnology
Tuneup Technology App Python Client LibraryThe Python client library for the Tuneup Technology App.This library allows you to interact with the customers, tickets, inventory, and locations objects without needing to do the hard work of binding your calls and data to endpoints. Simply call an action such asCustomer.createand pass some data and let the library do the rest.Install# Install client librarypip3installtuneuptechnology# Install locallymakeinstall# Get Makefile helpmakehelpExampleimportosimporttuneuptechnologyAPI_EMAIL=os.getenv('API_EMAIL')API_KEY=os.getenv('API_KEY')client=tuneuptechnology.Client(API_EMAIL,API_KEY)customer=client.Customers.create({'firstname':'Jake','lastname':'Peralta','email':'jake@example.com','phone':'8015551234','user_id':1,'notes':'Believes he is a good detective.','location_id':2,})print(customer)Other examples can be found in the/examplesdirectory. Alter according to your needs.UsageAPI_EMAIL=email@example.comAPI_KEY=123...venv/bin/pythoncreate_customer.pyDocumentationUp-to-date API documentation can befound here.Development# Lint the projectmakelint# Run testsAPI_EMAIL=email@example.comAPI_KEY=123...maketest# Run test coverageAPI_EMAIL=email@example.comAPI_KEY=123...makecoverageReleasingAs a separate PR from the feature/bug PR:Update the Version constant inclient.py&setup.pyUpdateCHANGELOGCreate a GitHub tag with proper Python version semantics (eg: v1.0.0)Publish to PyPI
Package: tungl
Tungl (Islandic for Moon) Logging LibraryTungl is a small portable logging library we wrote internally for some of our
projects.Release NotesVersionCommentv0.1.4Code refactoring.v0.1.3Addedmoduleandsepoptions to Python API.v0.1.2Lowered requirements to be Python3.6 compatible.v0.1.1AddedTUNGL_TIMEenv var.v0.1.0Initial ReleaseHow to use?Tungl can be either be used by directly using the Tungl API:#include<tungl/api.h>tungl_log(TUNGL_LEVEL_INFO,"MyModule",__FILE__,__LINE__,"Message %i",variable);or via the C and C++ macros.#define L_MODULE "MyModule"#include<tungl/c.h>// C-style MacrosL_INFO("Message %i",variable);#define L_MODULE "MyModule"#include<tungl/cxx.h>// C++-style MacrosL_INFO("Message "<<variable);Available macros (in both API's are):#define L_STR(...)// transforms L_STR(abc) to "abc"#define L_INFO(...)// prints INFO message#define L_ERROR(...)// prints ERROR message#define L_WARN(...)// prints WARN message#define L_DEBUG(...)// prints DEBUG message#define L_TRACE(...)// prints TRACE message#define THROWAT(MODULE, FILE, LINE, ...)// throws ERROR message and kills the application, reporting FILE and LINE#define THROW(...)// throws ERROR message and kills the application#define THROWIF(COND, ...)// throws ERROR message if COND is fulfilled#define ASSERT(COND)// checks COND and prints COND if not successful#define FAIL()// throws "Implementation Error"#define TODO(...)// throws TODO messageor in python!importtungltungl.set_module('my awesome python application')tungl.get_module()tungl.set_level(tungl.Level.[ERROR,INFO,WARN,DEBUG,TRACE])tungl.info("Message!",file=__file__)tungl.trace("Message!",file=__file__)tungl.error("Message!",file=__file__)tungl.warn("Message!",file=__file__)tungl.debug("Message!",file=__file__)tungl.throw("Message!",file=__file__)# there is no convenient way to automatically determine the line in Python,# BUT you can set it manually if you like.Advanced featuresTUNGL_LOG=[INFO, WARN, ERROR, DEBUG, TRACE],tungl_set_level(tungl_log_level_t)ortungl_set_level_str(const char*)can be used to set the log level.Tungl also supports to write a copy of the log directly to a file usingTUNGL_FILE=/any/valid/file/nameortungl_set_file(const char*). All
colors will be stripped before writing to the file.TUNGL_COLOR=OFFcan be used to disable color output.How to build?python3-minstallillyrian

gitclone...

mkdirtungl/buildcdtungl/build# Option 1: Local installation (default CMAKE_INSTALL_PREFIX=/usr/local/ve)illyriancmake-DTungl_DIST_TYPE=LOCAL..
cmake--build.--targetinstall# Option 2: Python packageillyriancmake-DTungl_DIST_TYPE=PYTHON..
cmake--build.--targetdist
Package: tungsten-sds
TungstenA material safety data sheet parser.InstallationTungsten is available on PyPi via pip. To install, run the following command:pipinstalltungsten-sdsUsage ExampleimportjsonfrompathlibimportPathfromtungstenimportSigmaAldrichSdsParser,SdsQueryFieldName,\SigmaAldrichFieldMappersds_parser=SigmaAldrichSdsParser()sds_path=Path("CERILLIAN_L-001.pdf")# Convert PDF file to parsed datawithopen(sds_path,"rb")asf:sds=sds_parser.parse_to_ghs_sds(f)field_mapper=SigmaAldrichFieldMapper()fields=[SdsQueryFieldName.PRODUCT_NAME,SdsQueryFieldName.PRODUCT_NUMBER,SdsQueryFieldName.CAS_NUMBER,SdsQueryFieldName.PRODUCT_BRAND,SdsQueryFieldName.RECOMMENDED_USE_AND_RESTRICTIONS,SdsQueryFieldName.SUPPLIER_ADDRESS,SdsQueryFieldName.SUPPLIER_TELEPHONE,SdsQueryFieldName.SUPPLIER_FAX,SdsQueryFieldName.EMERGENCY_TELEPHONE,SdsQueryFieldName.IDENTIFICATION_OTHER,SdsQueryFieldName.SUBSTANCE_CLASSIFICATION,SdsQueryFieldName.PICTOGRAM,SdsQueryFieldName.SIGNAL_WORD,SdsQueryFieldName.STATEMENTS,SdsQueryFieldName.HNOC_HAZARD,]# Serialize parsed data to JSON and dump to a filewithopen(sds_path.stem+".json","w")asf:sds.dump(f)# Also print out mapped fieldsforfieldinfields:print(field.name,field_mapper.get_field(field,json.loads(sds.dumps())))LicenseThis work is licensed under MIT. Media assets in theassetsdirectory are licensed under a
Creative Commons Attribution-NoDerivatives 4.0 International Public License.NotesThis library currently comes bundled with a new build oftabula-java, which is also licensed
under MIT, to see the full license, seehttps://github.com/tabulapdf/tabula-java/blob/master/LICENSE.
Package: tunic
A Python library for deploying code on remote servers.Tunic is designed so that you can make use of as much or as little of
its functionality as you’d like, the choice is yours.It only requires the Fabric library as a dependency and can be installed
from the Python Package Index (PyPI) using the pip tool like so.$pipinstalltunicYou could then make use of it in your deploy process like so.fromfabric.apiimporttaskfromtunic.apiimportget_release_id,ReleaseManager,VirtualEnvInstallationAPP_BASE='/srv/www/myapp'@taskdefdeploy():stop_my_app()release=get_release_id()installer=VirtualEnvInstaller(APP_BASE,['myapp'])release_manager=ReleaseManager(APP_BASE)installer.install(release)release_manager.set_current_release(release)start_my_app()The above snippet is just the start, take a look around the code base
for more methods that can save you work in your deploy process.DocumentationThe latest documentation is available athttp://tunic.readthedocs.io/en/latest/SourceThe source is available athttps://github.com/tshlabs/tunicDownloadPython packages are available athttps://pypi.python.org/pypi/tunicChangesThe change log is available athttp://tunic.readthedocs.io/en/latest/changes.html
Package: tunica
TunicaLight-weight Python ORM."Wear a Tunica on your low-level code"Builtin features:ORMUsepydanticmodelsSimple query builder:Model.all()Model.filter(TODO).first()Simple db configuration. Smart and automatic session managementHide all low-level sqlMigration toolFully automatic. Checks changes even if the source db doesn't support it (e.g. Enums in GCP Spanner). Compare state of the db with the changes history in all migrations.Errors/Warnings if there are manual changesForce to use migrations for data changes:Move data from one table to anotherModify data in one table...Implement in Rust?SQL Profiling tool (likesilkfor Django)FastAPI integrationMock for testing (likealchemy-mock)All these features should be architected as independent as possible to be able to move them into another projects
Package: tunic-language-YI-JIAHE
Tunic_languageThis tool uses theCMUdict (the Carnegie Mellon Pronouncing Dictionary)to retreive the phones for English words ultizing thenltk corpus.Symbols are provided using theTunic Language Reference Sheetcreated by Reddit useru/oposdeo.Tunic languageThe Tunic langauge is a written language, which when read aloud is simply spoken English. As such it is identical to English in terms of grammar and vocab. Understanding the langauge is therefore simply a matter of recognizing the characters.The characters which are comprised of 12 segments, 5 of which are used to identify a vowel, 6 for a consonant and the 12th used to determine the order of vowel and consonant in a character. Each character represents up to 1 vowel and 1 consonant, and thus, can also represent a single vowel or consonant. Multiple characters make up a word, and charaters in a word are connected by a continous horizontal line through the centre.Below is a single character and the numbering used to refer to the segments.DependenciesNLTKpipinstallnltkNLTK Dataimportnltk# Download CMUDict corpus (~4mb)nltk.download('cmudict')# Download punkt tokenizer (~35mb)nltk.download('punkt')
Package: tunigo
Python-Tunigo is a python package that allows for simple access toTunigo’s API. This is an API for fetching featured playlists and
new releases forSpotify. It supports featured
playlists, top playlists, new album releases and playlists for a range of
different genres.Tunigo’s API is what the Spotify client uses to provide its Browse-feature.Note that the API is not documented or officially released, so it may change at
any time.InstallationDebian/Ubuntu/Raspbian: Install thepython-tunigoor thepython3-tunigopackage fromapt.mopidy.com:sudo apt-get install python-tunigo
sudo apt-get install python3-tunigoArch Linux: Install thepython2-tunigoor thepython-tunigopackage
fromAUR, e.g.:yaourt -S python2-tunigo
yaourt -S python-tunigoElse: Install thetunigopackage from PyPI:pip install tunigoExamplesimporttunigotunigo=tunigo.Tunigo()forplaylistintunigo.get_featured_playlists():print(playlist.title)See theexamples/directory for further examples.LicensePython-Tunigo is licensed under theApache License, Version 2.0.Project resourcesSource codeIssue trackerDownload development snapshotChangelogv1.0.0 (2016-02-07)Add support for specifying a proxy to use.Don’t specify region in API call if not given. (Fixes: #2)Add the new field Release.artist_uri.Fix type of Release.created to be int all places.Add tests for all classes.v0.1.3 (2014-11-29)Fix check for content-type so it doesn’t fail after a change in the API.v0.1.2 (2014-08-03)Fix that some genres were not listed by using the same query options as
play.spotify.com.v0.1.1 (2014-07-21)Allow Genre- and SubGenre-objects as arguments to get_genre_playlists.Allow a SubGenre to be created with main_genre as a string.Add __repr__ and __str__ methods to classes.v0.1.0 (2014-06-24)Initial release.
Package: tuning_box
Tuning Box - configuration storage for your cloudsPlease feel here a long description which must be at least 3 lines wrapped on
80 cols, so that distribution package maintainers can use it in their packages.
Note that this is a hard requirement.Free software: Apache licenseDocumentation:http://docs.openstack.org/developer/tuning_boxSource:http://git.openstack.org/cgit/openstack/tuning_boxBugs:http://bugs.launchpad.net/tuning_boxFeaturesTODO
Package: tuning-fork
Installation/RequirementsAll requirements are in requirements.txt. They are numpy for array manipulations, librosa for audio processing, and scipy for it's wavefile export.Installation, currently, is all via github. To download the cli tool runpip3.6 install tuning-fork-clior, if you just want the Python Library Code, runpip3.6 install tuning-forkThis project does require python3.6 since I use mypy annotations to help me out.CLI Usageusage: tuning-fork [-h] [--bpm BPM] [--out OUT] [--play] wavfile musicfile

Autotune a wavfile to a .music file

positional arguments:
wavfile     The path to the wavfile you want to autotune.
musicfile   The path to the music file you want the wavfile autotuned to.

optional arguments:
-h, --help  show this help message and exit
--bpm BPM   The bpm you want the song to play at.
--out OUT   The desired output file.
--play      Automatically play after wavfile is created.Python UsageTo import the entire package just includeimport tuning_fork ((as tf))in your imports and all code will be loaded!tuning_forkitself contains methods for pitch shifting, so, to shift a wav to a .music, you can runTF = tf.TuningFork
TF.sampleWAVFileIntoMusic("wavfilename", "musicfilename", (bpm))and that will return a librosa style ndarray that represents the WAV encoding of the autotuned song.Along with normal functions,tuning_forkalso exposes analysis and parseMusic.analysisAvailable viafrom tuning_fork.tools.analysis import AnalysisDeals with the analysis of a wavfile.Most useful exports arestartingNoteandstartingNoteFromFileThese methods take in some reference to a wavfile (depending on the function) and returns the approximate starting note frequency of the song.parseMusicAvailable viafrom tuning_fork.tools.parseMusic import ParseMusicDeals with parsing .music filesFairly useful all around, take a look around the source or thehelp(parseMusic)to find what will fit you!
Package: tunipost
TuniPost========.. figure:: https://travis-ci.org/walidsa3d/tunipost.svg?branch=master:alt: BuildBuildFind Tunisian Postal Codes ##OverviewInstall (automatic)-------------------::Install (manual)----------------::$ git clone git@github.com:walidsa3d/tunipost.git$ cd tunipost$ python setup.py installUsage-----::Demo~~~~License-------The MIT License (MIT)Copyright (c) 2015 Walid SaadPermission is hereby granted, free of charge, to any person obtaining acopy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sublicense, and/or sell copies of the Software, and topermit persons to whom the Software is furnished to do so, subject tothe following conditions:The above copyright notice and this permission notice shall be includedin all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANYCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THESOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: tunit
TUnitTime unit types. For transparency, safety and readability.Examples:fromtunitimportDays,Hours,Minutes,Seconds,Milliseconds# Type annotations:deftimestamp()->Milliseconds:# Time unit conversions:returnMilliseconds(Seconds(1))# 1_000 ms# Converting to smaller units:assertHours(Days(1))==Hours(24)==24# Converting to bigger units:assertMinutes(Seconds(65))==Minutes(1)==1# Converting floats to time units:assertSeconds(Minutes(0.5))==Seconds(0)==0# Time units hold integers!assertSeconds.fromRawUnit(Minutes,0.5)==Seconds(500)==500# Better approach when fractions matter!# Converting time units to floats:assertfloat(Seconds(Milliseconds(1_500)))==1.0# Loses precision!assertMilliseconds(1_500).toRawUnit(Seconds)==1.5# Converts to float representing different time unit with precision.LicenseMIT
Package: tunm-proto
tunm_protosimple binary proto
一种简单的二进制数据协议支持的数据类型基本支持的类型 "u8",   "i8",   "u16",   "i16",   "u32",   "i32", "u64",   "i64", "varint", "float",   "string",  "raw", "array",  "map"各种数值类型格式说明u8/i8 用一个字节进行写入u16/i16/u32/i32/u64/i64 分别对应大小的数据写入, 小端模式float 精度只有3位小数, 当成*1000的u32处理double 精度只有6位小数, 当成*1000000的u64数据varint 可变长的整型数据如果是正数则*2, 如果是负数则-(x + 1) * 2, 相当于0->0, -1->1, 1->2,-2->3,2->4来做处理, 因为是小子节的数比较多, 每bit里的第一位则表示是否是最后一位, 如果10000001, 则表示还要继续往下读如果是00000001则表示这是最后一位str 字符串类型, 则先用varint表示str的长度, 然后再写入str的值str_idx 字符串索引值, 在str的arr表中的第几位, 重复的str则在同一个位置, 用varint表示array 数组类型, 先用varint表示array的长度, 然后再写入各个value的数值map map类型, 先用varint表示map的长度, 然后先写入key, 再写入value, 依次循环到结束为什么我们需要二进制协议下图是文本格式JSON与tunm的对比类型可读可编辑编码速度解码速度数据大小预定义JSON✓✓慢慢大否tunmxx快快小否protobufxx快快小是在高性能的场景下, 或者需要流量传输比较敏感的地方, 通常会选择二进制来代替文本协议来做为通讯的, 如RPC, REST, 游戏等情况。
相对于google protobuf, 它需要比较完善的预定义过程, 就比如客户端版本1, 服务端版本2, 就有比较大的可能造成不兼容, 对需求经常变化的就会比较难与同步。
tunm相对于JSON, 若第一版是{"name":"tunm","version":1}此时第二版需要加入用户的id, 就可以很方便的变成{"name":"tunm","version":2,"id":1}而对客户端1来说, 只是多一个id的字段, 不会有任何的破坏, 做到版本升级而无影响数据使用, 以Rust为例externcratetunm_protoastunm;usetunm::{Value,Buffer};modtest_data;usestd::collections::{HashMap};fnmain(){println!("welcome to tickdream rust protocol");letmuthash_value=HashMap::<Value,Value>::new();hash_value.insert(Value::Str("name".to_string()),Value::Str("tunm_proto".to_string()));hash_value.insert(Value::Str("tunm_proto".to_string()),Value::U16(1asu16));{letmutbuffer=Buffer::new();tunm::encode_proto(&mutbuffer,&"cmd_test_op".to_string(),vec![Value::Map(hash_value.clone())]).unwrap();letjust_str="[\"cmd_test_op\", [\"tunm_proto\", {\"name\":\"tunm_proto\",\"tunm_proto\": 1}]]";println!("just json len = {}",just_str.len());println!("buffer len == {}",buffer.data_len());// just read fieldletread=tunm::decode_proto(&mutbuffer).unwrap();matchread{(name,val)=>{assert_eq!(name,"cmd_test_op".to_string());assert_eq!(val[0],Value::Map(hash_value));assert_eq!(val.len(),1);}}}}格式说明数据协议分为三部分(协议名称, 字符串索引区, 数据区(默认为数组))
如数据协议名为cmd_test_op, 数据为["tunm_proto", {"name": "tunm_proto", "tunm_proto": 1}]那么数据将先压缩协议名cmd_test_op, 将先写下可变长度(varint)值为11占用1字节, 然后再写入cmd_test_op的utf8的字节数接下来准备写入字符串索引区, 索引数据用到的字符串为["tunm_proto", "name"]两个字符串, 即将写入可变长度(varint)值为2占用一字节, 然后分别写入字符串tunm_proto和name两个字符串, 这样子字符串相接近有利于压缩, 且如果有相同的字符串可以更好的进行复用接下来准备写入数据区,
首先判断为一个数组, 写入类型u8(TYPE_ARR=16), 写入数组长度varint(2), 准备开始写第一个数据, 字符串tunm_proto, 已转成id, 则写入类型u8(TYPE_STR_IDX=14), 查索引号0, 则写入varint(0), 第一个字段写入完毕, 接下来第二个字段是一个map数据, 写入map长度varint(2), 然后进行遍历得到key值为name, 则写入写入类型u8(TYPE_STR_IDX=14),查索引号1, 则写入varint(1), 然后开始写name对应的值tunm_proto, 写入TYPE_STR_IDX类型的0值, 则这组key写入完毕, 依此类推写入第二组数据测试打印的结果
用完整的level-full4.json原始的JSON长度 = 2.2M
解析JSON用时 = Ok(1.520187s)
用tunm_proto压缩test_level4_json的长度 = 370k
压缩JSON耗时 = Ok(31.842ms)
name = cmd_level4_full
解析buffer耗时 = Ok(22.642ms)解析速度约为JSON的68倍, 符合预期, 大小为明文的0.16倍, 符合压缩比
Package: tunnel-2-by-jumphost
tunnel-2-by-jumphosttunnel-2-by-jumphost是一个用于通过跳板机连接内部 SSH 的 Python 工具，它适用于各种类似情况，如容器、Colab 等。安装您可以使用 pip 安装这个包：pipinstalltunnel-2-by-jumphost使用服务器端在跳板机上运行服务器端以接受外部连接并转发到目标内部 SSH。在跳板机上运行以下命令：tunnel-2-by-jumphost-servers[public_2_external_port][tunnel_port]# tunnel-2-by-jumphost-server s 222 333[public_2_external_port]用于接受外部连接。[tunnel_port]用于接受跳转通道。客户端在您的本地机器上运行客户端以连接到跳板机并将数据传递到目标内部 SSH。在您的本地机器上运行以下命令：tunnel-2-by-jumphost-clientc[jump_host][jump_host_tunnel_port][relay_to_host][relay_to_port]#tunnel-2-by-jumphost-client c jump_host 333 localhost 22[jump_host]跳转服务器 IP 地址。[jump_host_tunnel_port]跳转服务器端口。[relay_to_host]重定向到的主机。[relay_to_port]重定向到的服务器。示例服务器端示例在跳板机上运行服务器端：tunnel-2-by-jumphost-servers[public_2_external_port][tunnel_port]# tunnel-2-by-jumphost-server s 222 333这将在跳板机上启动服务器，它将在 192.168.1.100:8080 上接受外部连接，并将它们转发到 10.0.0.1:22。客户端示例在您的本地机器上运行客户端：tunnel-2-by-jumphost-clientc[jump_host][jump_host_tunnel_port][relay_to_host][relay_to_port]#tunnel-2-by-jumphost-client c jump_host 333 localhost 22这将连接到跳板机 jump_host:333，然后将数据传递到内部 SSH 服务器 localhost:22注意事项确保可以从容器环境访问跳板机，请谨慎使用此工具，自行评估，使用此工具造成的任何问题，我没有责任。许可证本项目采用 MIT 许可证。有关详细信息，请参阅 LICENSE 文件。
Package: tunneler
A command tool and library to connect to databases with minimal fuss.To install:$pipinstalltunnelerYou will probably also need the database drivers for your preferred database. To install the postgres ones automatically when you installtunneler, do this:$pipinstalltunneler[pg]To run:$tunnelername_of_taskname_of_connectionAs the above command shows, there are two concepts to understand when running tunneler,connectionsandtasks.Define connections in aconnections.yamlfile in your current directory, as follows:prod:remote_host:publicjumpboxservernamessh_username:usernamessh_pkey:|-----BEGIN RSA PRIVATE KEY-----..............................................................................-----END RSA PRIVATE KEY-----private_dburl:postgres://username:password@privatedbservername/databasenamelocal_port:5433dev:.....You can also specify an ssh_config variable in the config.tunnelerwill then use the values from that hosts ssh config. An example:prod:ssh_config:prod-jumpboxprivate_dburl:postgres://username:password@privatedbservername/databasenamelocal_port:5433dev:.....This will use the remote host/username/private key specified in your existing ssh config so you don’t need to repeat them in the config fileTunneler will use this information to set up a local tunneled post where you can access this database directly.A connection URL to this local port will then be provided to eachtask.There are three inbuilt tasks:test_connection (run this one to check your config is correct)do_full_pg_dump (assumes you have pg_dump installed)do_schema_pg_dump (also assumes you have pg_dump installed)So for example to dump the production schema we’d run the following command:$tunnelerdo_schema_pg_dumpprodCustom tasksWant to define your own tasks? Simply create a tasks.py file (or module) in the current directory.Define a top level method in this file that accepts a connection url, and that method name will be available as a task.For instance, the test connection task could be re-implemented as follows:fromsqlbagimportSdeftest_connection_custom(dburl):withS(dburl)ass:s.execute('select 1')You’d then run this as follows:$tunnelertest_connection_customprodPretty simple.
Package: tunneller
SSH-Tunnels maker akatunnellerUtility to manage SSH-Tunnel to CINECA clusters.An SSH tunnel is a secure method for forwarding network traffic between two devices over an encrypted connection.It uses the SSH protocol to create a secure "tunnel" through which data can be securely transmitted.Installtunnellercan be installed withpipby running:pip install tunnellerYou can also install it from source:git clone https://github.com/so07/tunneller.git
cd tunneller
python setup.py installUsagetunnellercan be run either on your local machine or on a CINECA cluster.When you run on a CINECA cluster, the instructions you have to execute on your local machine are printed out on the screen.Thus you have to copy and paste the instructions on a shell of your local machine.While when you run it on your local machine, the SSH tunnel is opened.Examples of UsageTo open an SSH-Tunel to Leonardo cluster login node with the default options:tunneller -c leonardoNB1: the $USER environment variable is used to setup the usernameNB2: This is the same of running:ssh -L 9999:localhost:9999 $USER@login01-ext.leonardo.cineca.it -NTo open an SSH-Tunnel to the Leonardo cluster login using a different username:tunneller -u USERNAME -c leonardoThis is the same of running:ssh -L 9999:localhost:9999 USERNAME@login01-ext.leonardo.cineca.it -NTo open a double SSH-Tunnel to the Leonardo compute nodelrdn2655on the port 9998 passing throughlogin02tunneller -c leonardo -p 9998 -n lrdn2655This is the same of:ssh -L 9998:localhost:9998 $USER@login02-ext.leonardo.cineca.it ssh -L 9998:localhost:9998 lrdn2655 -NTo list all processes IDs that have network connections on port 9999 on Leonardo login node:tunneller -c leonardo -p 9999 --port-listThis is the same of runninglsof -ti:9999on the login node of Leonardo cluster or runningssh $USER@login01-ext.leonardo.cineca.it lsof -ti:9999on your local machine.To kill all processes that have network connections on port 9998 on Leonardo clusterlogin02:tunneller -c leonardo -p 9998 -l 2 --port-cleanThis is the same of runninglsof -ti:9999 | xarg kill -9on the login node of Leonardo cluster.