Saravanan666/pypi-org huggingface dataset:
Package: jump2odps
Citybrain Platform Python LibraryThe Citybrain Platform Python Library provides convenient access to the Citybrain Platform API from applications written in the Python language.installationIf you just want to use the package, just run:pipinstall--upgradecitybrain-platformUsageThe library needs to be configured with your account's secret key which is available onwww.citybrain.org. Either set it as theCITYBRAIN_APIKEYenvironment variable before using the library:exportCITYBRAIN_APIKEY='...'Or setcitybrain_platform.api_keyto its value:importcitybrain_platformcitybrain_platform.api_key="..."Example CodeExamples of how to use this Python library to accomplish various tasks.Table OperationsCreate Tableimportcitybrain_platformfromcitybrain_platform.computing.data_typesimportColumn,ColumnTypecolumns=[Column("col_str",ColumnType.STRING,"this is a comment"),Column("col_id",ColumnType.BIGINT),]partition_columns=[Column("col_pt",ColumnType.INT,"a column for partitioning")]ok=citybrain_platform.Computing.create_table(name="test_tbl",columns=columns,partition_columns=partition_columns)print(ok)Get Table Schemaimportcitybrain_platformschema=citybrain_platform.Computing.get_table_schema(name="test_tbl")print(schema)Upload Table Dataimportcitybrain_platformresult=citybrain_platform.Computing.upload_table_data(name="test_tbl",append=True,csv_filepath="aa.csv",partition_key={"col_pt":"19"})print(result)Truncate Tableimportcitybrain_platformresult=citybrain_platform.Computing.truncate_table(name="test_tbl",partition_key={"col_pt":"19"})print(result)Drop Tableimportcitybrain_platformresult=citybrain_platform.Computing.drop_table(name="test_tbl")print(result)Make Table Public To Othersimportcitybrain_platformpublic_table_name=citybrain_platform.Computing.public_table(name="test_tbl")print(public_table_name)List Available Tablesimportcitybrain_platformtables=citybrain_platform.Computing.list_tables()print(tables)Job OperationsCreate Jobimportcitybrain_platformjob_id=citybrain_platform.Computing.create_job(sql="select col_str from test_tbl limit 12;")print(job_id)Get Job Statusimportcitybrain_platformjob_status=citybrain_platform.Computing.get_job_status(job_id="...")print(job_status)Stop Running Jobimportcitybrain_platformresult=citybrain_platform.Computing.stop_job(job_id="...")print(result)Download Terminated Job Resultsimportcitybrain_platformcitybrain_platform.Computing.get_job_results(job_id="...",filepath="results.csv")
Package: jump_and_run_game
Your Jump-and-Run GameWelcome tojump_and_run_game– a fun and exciting jump-and-run game developed
in Python!OverviewIt's really just a simple Jump- and Run game: 2D, jumping ... and walking.
Let's be honest, it's not running so far.Table of ContentsInstallationUsageControlsContributingInstallationEnsure you have Python 3.8 or later installed.Install dependencies:pipinstalljump_and_run_gameUsageTo play the game, run the following command:jump_and_run_gameControlsLeft Arrow: Move the player left.Right Arrow: Move the player right.Space: Make the player jump.ContributingIf you'd like to contribute to the project, feel free to open issues or add PRs.It's typically wise to open an issue first and wait for feedback, before adding
tons of code that might get rejected.
Package: jumparound
jumparoundQuickly jump around between your projects.Installationpython3 -m pip install --user pipx
python3 -m pipx ensurepath
python3 -m pipx install jumparoundUsagejumparoundcan be used on its own or as a part of other scripts. The most common usage is in
conjunction withcd.cd$("jumparound to")DevelopmentSetupHave pythonpoetryinstalled.Clone this repository.Runmake setup
Package: jumpavg
OriginsThis library was developed as anomaly detection logic for “PAL” component
ofCSIT(Continuous System and Integration Testing) project
offd.io(“Fast Data”), one ofLFN(Linux Foundation Networking) projects.
Currently still being primarily used in PAL’s successor:CSIT-DASH.In order to make this code available inPyPI(Python Package Index),
the setuputils stuff (later converted to pyproject.toml) has been added,
but after some discussion, thatdirectoryended up having
only a symlink to the original place of tightly coupled CSIT code.UsageHigh level descriptionThe main method is “classify”, which partitions the input sequence of values
into consecutive “groups”, so that standard deviation of samples within a group
is small.The design decisions that went into the final algorithm are heavily influenced
by typical results seen in CSIT testing, so it is better to read about
the inner workings of the classification procedure in CSIT documentation,
especially the Minimum Description Length sub-chapter oftrend analysis.ExampleA very basic example, showing some inputs and the structure of output.
The output is a single line, here shown wrapped for readability.>>>fromjumpavgimportclassify>>>classify(values=[2.1,3.1,3.2],unit=0.1)BitCountingGroupList(max_value=3.2,unit=0.1,group_list=[BitCountingGroup(run_list=[2.1],max_value=3.2,unit=0.1,comment='normal',prev_avg=None,stats=AvgStdevStats(size=1,avg=2.1,stdev=0.0),cached_bits=6.044394119358453),BitCountingGroup(run_list=[3.1,3.2],max_value=3.2,unit=0.1,comment='progression',prev_avg=2.1,stats=AvgStdevStats(size=2,avg=3.1500000000000004,stdev=0.050000000000000044),cached_bits=10.215241265313393)],bits_except_last=6.044394119358453)Change log0.4.2: Should no longer divide by zero on empty inputs.0.4.1: Fixed bug of not penalizing large stdev enough (at all for size 2 stats).0.4.0: Added “unit” and “sbps” parameters so information content
is reasonable even if sample values are below one.0.3.0: Considerable speedup by avoiding unneeded copy. Dataclasses used.
Mostly API compatible, but repr looks different.0.2.0: API incompatible changes. Targeted to Python 3 now.0.1.3: Changed stdev computation to avoid negative variance due to rounding errors.0.1.2: First version published in PyPI.
Package: jump-consistent-hash
Jump Consistent HashPython and C implementation of the jump consistent hash algorithm by John
Lamping and Eric Veach[1]. Tested on Python 3.8+.InstallTo install Jump Consistent Hash, simply run this simple command in your
terminal of choice:$ pip install jump-consistent-hashThe C implementation is optional but is about 10x faster than the pure Python
implementation in CPython.Usage>>>importjump>>>jump.hash(256,1024)520If you want to use astras a key instead of anint, you can pass it
through a hash function to compute a real key. Here’s a couple of examples
using Python 3:>>>importhashlib>>>int(hashlib.md5(b"127.0.0.1").hexdigest(),16)325870950296970981340734819828239218902>>>int(hashlib.sha1(b"127.0.0.1").hexdigest(),16)431133456357828263809343936597625557575256328153>>>importbinascii>>>binascii.crc32(b"127.0.0.1")&0xffffffff3619153832>>>abs(hash("127.0.0.1"))7536019783825143230Links[1]http://arxiv.org/pdf/1406.2294v1.pdf
Package: jumpDB
JumpDBJumpDB is a simple key-value store that exploits Sorted String Tables.Here's atutorialwhich goes a little more in-depth into how it works.Installpip3 install jumpDBUsagefrom jumpDB import DB

db = DB()
db["k1"] = "v1"
db["k2"] = "v2"
del db["k2"]
assert db["k1"] == "v1"
assert "k2" not in dbAPIget(key)=> Finds the corresponding value to the given keyset(key, value)=> Insert the entry into the dbdelete(key)=> Deletes the key from the dbcontains(key)=> Checks if the given key is present in the dbDesign & ImplementationThe design is essentially a simplified version oflevelDB.Every write is initially inserted into an in-memory data structure (typically called "memtable")
-- in this case,  a red-black tree.When the memtable's size exceeds a certain threshold, all entries are written out into a segment file.
Exploiting the properties of a red-black BST, we can ensure all entries will be efficiently written in sorted order.
The resulting file is immutable and called a sorted-string table (SST).Whilst performing the above write, we also maintain a sparse index table, keeping track of the
file offset of every in 1 in x entries.When a read comes in, we first look into the memtable for the corresponding k-v pair; if it doesn't exist,
we look at theclosestentry (by key) in the sparse table. Wejumpto the file offset of that entry and then linearly scan forwards
until we find the desired key-value pair. This is only possible because the SST is sorted by key.Periodically, the segments are merged (also called "compaction"); this ensures a reduction
in memory footprint as the resulting merged segments(s) would only hold the most recent entries.An addition optimisation includes the use of bloom-filters to check if a key is not present in
the DB. This saves us from performing heavy disk reads for keys that haven't been inserted into the db.TestsRunpytest -vLicenseBSD 2-Clause License
Package: jumper-ble-logger
# Jumper BLE Logger
## Introduction
The BLE Logger is part of Jumper Insights- a full visibility platform for IoT systems. The BLE Logger is a process that runs on Linux gateways and logs data from BLE devices that are connected to the gateway via BLE and are using the [Jumper uLogger](https://github.com/Jumperr-labs/jumper-ulogger).## PrerequisitesGateway:Linux based device as a central BLE devicePython2.7 and Pip installedLE connection to the BLE peripheralPeripheralsJumper’s uLogger should be installedBLE - Currently, only GATT protocol is supported.## InstallationInstall prerequisits:
- gatttool (Ubuntu:sudo apt-get install bluez)
- pip (Ubuntu:sudo apt install python-pip python-dev)
- libffi-dev and libssl-dev (Ubuntu:sudo apt-get install libffi-dev libssl-dev)Install the logger:sudo -H pip install jumper-ble-logger## Getting Started
Check out our [sample project for the Nordic nRF52 development kit](https://github.com/Jumperr-labs/jumper-ulogger/tree/master/samples/nrf52-ble-sample-project).## Usage
- Make sure Jumper’s Logging Agent is runningsudo service jumper-agent start- Modify _”/etc/jumper_ble_logger/events_config.json”_ to create new types of events if needed
- Runhciconfigand check your current available HCI devices
- Start the BLE Logger:sudo service jumper-ble start- Runhciconfigagain to see your newly created HCI device
- Start your gateway program as usual. Make sure to connect to the newly created HCI device. The BLE Logger will start logging as soon as you connect to a peripheral and discover its characteristics.## How it WorksIf you just want to get started, feel free to skip this stepWhen the BLE Logger is started, it will connect to your current HCI device (usually “hci0”) and will create a new
proxied HCI device (usually “hci1”) which you will set your gateway program to connect to.The new “hci1” device can be used just like the original “hci0”, as all commands and events will transparently pass on to it.
When logging notifications are received from the peripheral, the BLE Logger will send them to Jumper’s Logging Agent and will not pass them on to “hci1” (gateway program).This is the process of how it works (GATT only):The BLE Logger recognizes established LE connections.When the gateway program is discovering characteristics, the BLE Logger recognizes Jumper’s GATT service.The BLE Logger reads the current timestamp from the device and synchronizes it with the real world time.The BLE Logger writes to the notifications handle to enable logging notifications.When a logging notification is being received, the BLE Logger will write it to the Logging Agent.The user/gateway program is not being affected by steps 3-4 and they are being filtered out from ‘hci1’## Troubleshooting
Check out the following files for logs:
- /var/log/jumper-ble.err
- /var/log/jumper-ble.log
- /var/log/jumper-agent.err
- /var/log/jumper-agent.log## Contact Us
We are happy to help! Feel free to contact us about any issue and give us your feedback at [info@jumper.io](mailto:info@jumper.io)
Package: jumprun
# Jumprun[![Build Status](https://travis-ci.org/itsnauman/jumprun.svg?branch=master)](https://travis-ci.org/itsnauman/jumprun)A command-line utility for creating shortcuts for running scripts.#### Supported Interpreters:- Python- Ruby- Perl- Shell- PHP- Java#### Installation:It can be installed using PyPi, `$ pip install jumprun`. Jumprun supports only Python 3 at the moment!#### ExampleSay I have a python file `test_hello.py` in the `~/Developer` directory and I want to make a shortcut forrunning this script.- Run `jr add testhello test_hello.py` in `~/Developer' to make a shortcut.- Now you can run `jr testhello` from anywhere in terminal to execute the script.- You can get further details about a command using `jr show testhello`.- You can erase all shortcuts using `jr rm all`#### Usage:```Usage:jr add <name> <command> [-d WORKDIR] [-f]jr rm alljr rm <name>jr showjr show alljr show <name>jr rename <old> <new>jr <name>jr -hjr -vCommands:add         Add a new shortcutrm          Delete a shortcutrename      Rename a shortcutshow        List all shortcutsOptions:-h, --help                  Show this screen.--version                   Show version.--workdir <dir>, -d <dir>   Working directory for the command--force, -f                 Overwrite existing shortcut```#### Tests:`$ python test_jumprun.py`#### License:`Jumprun` is distributed under MIT license, see `LICENSE` for more details.
Package: jumpserver-django-oidc-rp
jumpserver-django-oidc-rp
##############JumpServer-django-oidc-rpis based on the modified django-oidc-rp (https://github.com/impak-finance/django-oidc-rp) adapter JumpServer OpenID Connect Relying Party (RP/Client)Main requirementsPython 3.4+, Django 1.11+.AuthorsBai Jiangjiejiangjie.bai@fit2cloud.com.LicenseMIT. SeeLICENSEfor more details.
Package: jumpserver-omnidb-sdk
Jumpserver SDK为 Jumpserver ssh terminal 和 web terminal封装了一个sdk, 完成和Jumpserver
交互的一些功能Service
通用RestApi 接口类AppService
增加了app注册等UserService
用户使用该类User serviceUser service封装了用户调用的api, 如用户登录,获取授权的资产等login(self, username=None, password=None,
public_key=None, login_type='', remote_addr=''):
用户登录api
返回
({'username': 'test', ...}, 'token': 'Token String')username: 用户名
password: 密码
public_key: 公钥
login_type: ['ST', 'WT'] SSHTerminal, WebTerminal
remote_addr: 用户的ipauth(self, token=None)
使用token签名请求, 用户请求api都需要使用签名, login例外is_authenticated(self):
判断认证是否有效, 返回 True或Falseget_my_assets(self)
返回该用户有权限的资产
[{'hostname': '192.168.1.1', 'ip': '192.168.1.1', ...}, {}]get_my_asset_groups(self)
返回该用户后权限的资产组, 这个资产组并非是直接授权资产组, 而是取出所有资产,
再取出每个资产所有的资产组,去重
[{'name': 'group1', 'comment': 'something'}, ... ]get_user_asset_group_assets(self, asset_group_id)
返回该用户授权这个资产组下的资产,并非所有该资产组下的资产,而是被授权的资产
[{'hostname': '192.168.1.1', 'ip': '192.168.1.1', ...}, {}]In [1]: from jms import UserService

In [2]: username = 'ibuler'

In [3]: password = 'redhat'

In [4]: user_service = UserService(app_name='coco', endpoint='http://localhost:8080')

In [5]: user, token = user_service.login(username=username, password=password, 
                public_key=None, login_type='ST', remote_addr='2.2.2.2')
                
                
Out[10]: user
DotMap([(u'username', u'ibuler'),
        (u'comment', u''),
        (u'name', u'\u5e7f\u5b8f\u4f1f'),
        (u'date_expired', u'2086-12-21 16:00:00'),
        (u'is_superuser', False),
        (u'is_active', True),
        (u'email', u'ibuler@qq.com'),
        (u'phone', u''),
        (u'wechat', u''),
        (u'groups', [u'asdfasdf']),
        (u'role', u'User'),
        (u'id', 99)])

In [11]: token
Out[11]: u'c47a9b0da67c47f3885efa92b6a3de28'

In [17]: user_service.is_authenticated()
Out[17]: True

In [18]: user_service.get_my_assets()
Out[18]:
[DotMap([(u'comment', u''),
         (u'system_users_join', u'marilyn, sarah, gloria'),
         (u'ip', u'48.48.48.48'),
         (u'hostname', u'carolyn81'),
         (u'is_active', True),
         (u'port', 22),
         (u'system_users', ...

]

In [19]: user_service.get_my_asset_groups()
Out[19]:
[DotMap([(u'comment', u'In sagittis dui vel nisl.'),
         (u'id', 51),
         (u'name', u'Paula Berry'),
         (u'assets_amount', 1)]),
 DotMap([(u'comment', u'Mauris ullamcorper purus sit amet nulla.'),
         (u'id', 67),
         (u'name', u'Amanda Dunn'),
         (u'assets_amount', 1)]), ...
 ]
 
In [20]: user_service.get_user_asset_group_assets(51)
Out[20]:
[DotMap([(u'comment', u''),
         (u'system_users_join', u'jennifer, melissa, nancy, rebecca'),
         (u'ip', u'1.1.1.1'),
         (u'hostname', u'heather89'),
         (u'is_active', True),
         (u'port', 22),
         (u'system_users',
          [DotMap([(u'username', u'jennifer'),
                   (u'comment', u'Aenean sit amet justo.'),
                   (u'shell', u'/bin/bash'),
                   (u'protocol', u'ssh'),
                   (u'name', u'Angela Henry'),
                   (u'auto_update', True),
                   (u'sudo', u'/user/bin/whoami'),..
]
Package: jumpserver-python-sdk
Jumpserver SDK为 Jumpserver ssh terminal 和 web terminal封装了一个sdk, 完成和Jumpserver
交互的一些功能Service
通用RestApi 接口类AppService
增加了app注册等UserService
用户使用该类User serviceUser service封装了用户调用的api, 如用户登录,获取授权的资产等login(self, username=None, password=None,
public_key=None, login_type='', remote_addr=''):
用户登录api
返回
({'username': 'test', ...}, 'token': 'Token String')username: 用户名
password: 密码
public_key: 公钥
login_type: ['ST', 'WT'] SSHTerminal, WebTerminal
remote_addr: 用户的ipauth(self, token=None)
使用token签名请求, 用户请求api都需要使用签名, login例外is_authenticated(self):
判断认证是否有效, 返回 True或Falseget_my_assets(self)
返回该用户有权限的资产
[{'hostname': '192.168.1.1', 'ip': '192.168.1.1', ...}, {}]get_my_asset_groups(self)
返回该用户后权限的资产组, 这个资产组并非是直接授权资产组, 而是取出所有资产,
再取出每个资产所有的资产组,去重
[{'name': 'group1', 'comment': 'something'}, ... ]get_user_asset_group_assets(self, asset_group_id)
返回该用户授权这个资产组下的资产,并非所有该资产组下的资产,而是被授权的资产
[{'hostname': '192.168.1.1', 'ip': '192.168.1.1', ...}, {}]In [1]: from jms import UserService

In [2]: username = 'ibuler'

In [3]: password = 'redhat'

In [4]: user_service = UserService(app_name='coco', endpoint='http://localhost:8080')

In [5]: user, token = user_service.login(username=username, password=password, 
                public_key=None, login_type='ST', remote_addr='2.2.2.2')
                
                
Out[10]: user
DotMap([(u'username', u'ibuler'),
        (u'comment', u''),
        (u'name', u'\u5e7f\u5b8f\u4f1f'),
        (u'date_expired', u'2086-12-21 16:00:00'),
        (u'is_superuser', False),
        (u'is_active', True),
        (u'email', u'ibuler@qq.com'),
        (u'phone', u''),
        (u'wechat', u''),
        (u'groups', [u'asdfasdf']),
        (u'role', u'User'),
        (u'id', 99)])

In [11]: token
Out[11]: u'c47a9b0da67c47f3885efa92b6a3de28'

In [17]: user_service.is_authenticated()
Out[17]: True

In [18]: user_service.get_my_assets()
Out[18]:
[DotMap([(u'comment', u''),
         (u'system_users_join', u'marilyn, sarah, gloria'),
         (u'ip', u'48.48.48.48'),
         (u'hostname', u'carolyn81'),
         (u'is_active', True),
         (u'port', 22),
         (u'system_users', ...

]

In [19]: user_service.get_my_asset_groups()
Out[19]:
[DotMap([(u'comment', u'In sagittis dui vel nisl.'),
         (u'id', 51),
         (u'name', u'Paula Berry'),
         (u'assets_amount', 1)]),
 DotMap([(u'comment', u'Mauris ullamcorper purus sit amet nulla.'),
         (u'id', 67),
         (u'name', u'Amanda Dunn'),
         (u'assets_amount', 1)]), ...
 ]
 
In [20]: user_service.get_user_asset_group_assets(51)
Out[20]:
[DotMap([(u'comment', u''),
         (u'system_users_join', u'jennifer, melissa, nancy, rebecca'),
         (u'ip', u'1.1.1.1'),
         (u'hostname', u'heather89'),
         (u'is_active', True),
         (u'port', 22),
         (u'system_users',
          [DotMap([(u'username', u'jennifer'),
                   (u'comment', u'Aenean sit amet justo.'),
                   (u'shell', u'/bin/bash'),
                   (u'protocol', u'ssh'),
                   (u'name', u'Angela Henry'),
                   (u'auto_update', True),
                   (u'sudo', u'/user/bin/whoami'),..
]
Package: jumpsuit
Bravo!  You have received a Medical Diploma in "jumpsuit" fromthe Orbital Convergence University International Air and Water Embassy of the Tangerine Planet.You are now officially certified to include "jumpsuit" in your practice.jumpsuitdescriptionThis is a module that can reliably
ascertain the health status of software.(It's like a testing framework)install[ZSH] pip install jumpsuitdocumentation (this opens a server process that sends HTML)[ZSH] jumpsuit sharesinternal status tests of the module[ZSH] jumpsuit internal-statusThese checks are run with pypi "body_scan""jumpsuit" is built from a fork of "body_scan"("body_scan" checks are written with "unittest")TutorialChecks are started simultaneously, unless "--simultaneous no"Create a status file (glob pattern "**/status_*.py").(The glob pattern can be modified with the progammatic python3 interface)# status_1.py

def check_1 ():
	print ("check 1")
	
def check_2 ():
	print ("check 2")
	
def check_3 ():
	raise Exception ("not 110%")

checks = {
	"check 1": check_1,
	"check 2": check_2,
	"check 3": check_3
}from a directory deeper than the status file "status_1.py"[ZSH] jumpsuit statusThis is the equivalent of:[ZSH] jumpsuit status --glob-string "**/status_*.py"The report then should appear like thispaths: [
	{
		"path": "../status_1.py",
		"empty": false,
		"parsed": true,
		"stats": {
			"passes": 2,
			"alarms": 1
		},
		"checks": [
			{
				"check": "check 1",
				"passed": true,
				"elapsed": [
					4.054199962411076e-05,
					"seconds"
				]
			},
			{
				"check": "check 2",
				"passed": true,
				"elapsed": [
					1.72930003827787e-05,
					"seconds"
				]
			},
			{
				"check": "check 3",
				"passed": false,
				"exception": "Exception('not 110%')",
				"exception trace": [
					"Traceback (most recent call last):",
					"  File \"/home/veganecology/.local/lib/python3.11/site-packages/jumpsuit/processes/scan/process/keg/check.py\", line 68, in start",
					"    checks [ check ] ()",
					"  File \"<string>\", line 13, in check_3",
					"Exception: not 110%"
				]
			}
		]
	}
]
alarms: [
	{
		"path": "../status_1.py",
		"checks": [
			{
				"check": "check 3",
				"passed": false,
				"exception": "Exception('not 110%')",
				"exception trace": [
					"Traceback (most recent call last):",
					"  File \"/home/veganecology/.local/lib/python3.11/site-packages/jumpsuit/processes/scan/process/keg/check.py\", line 68, in start",
					"    checks [ check ] ()",
					"  File \"<string>\", line 13, in check_3",
					"Exception: not 110%"
				]
			}
		]
	}
]
stats: {
	"alarms": 0,
	"empty": 0,
	"checks": {
		"passes": 2,
		"alarms": 1
	}
}Advanced TutorialIt's recommended to run jumpsuit programmatilly.An example of this can be found in the "_book/advanced tutorial"section of the documentation.Contactsbgrace2468@pm.me
Package: junc
# Junc[![Build Status](https://travis-ci.org/llamicron/junc.svg?branch=master)](https://travis-ci.org/llamicron/junc)[![Build Status](https://ci.appveyor.com/api/projects/status/llamicron/junc)](https://ci.appveyor.com/project/llamicron/junc)## SSH to servers easilyNow you don't have to remember usernames and IPs, and no more aliases for each of your machines.## Quickstart```sh# Install$ pip install junc# Add a server$ junc add# Follow the prompts...# See the server table$ junc list# Connect to a server$ junc connect <server_name>```## [Documentation](docs/index.md)[See the full docs here](docs/index.md)## ContributingThis may appear to be a small project, but I'm using all the building and test tools under the sun. It may seem like overkill, but this is mainly for me to learn how to use all these tools like Travis CI, AppVeyor, Tox, etc..Fork this repo and add a new feature, write some unit tests and a bit of documentation and it'll probably get merged.