Saravanan666/pypi-org huggingface dataset:
Package: sickserv
sickservThis is a Python 3.6+ client-server wrapper & framework that allows you to rapidly build simple, fast, encrypted, asynchronous, multi-client application communication.Highlights:Client/server wrapper aroundSanic,requests, andwebsocket-client.Provides a framework for multi-client communication, based around unique system identifiers.Supports simplistically sending and receiving RC4 encrypted JSON payloads.Supports sending either string or byte values using base64 encoding.Provides a client and server for either websocket or non-websocket applications.Natively asynchronous, provided by Sanic.Client/server support for RC4 rekey on-the-fly.InstallDo it up:$ pip install sickserv --userCommunication FlowInitial payloads are always JSON (with a defined endpoint), which are then base64 encoded, RC4 encrypted, and then sent over HTTP or HTTPS (on any port desired).Send data:
JSON -> base64 encode values -> RC4 encrypt -> send (HTTPS)

Recv data:
recv (HTTPS) -> RC4 decrypt -> base64 decode values -> JSONSimple Example (non-WebSocket)See theexamples/folder for more, including: a MUD, chat server, and reverse shell.Server:fromsickservimportserver,set_init_keyfromsickserv.serverimportresponseset_init_key('yellow-submarine')@server.app.route('/test/<sysid>',methods=['POST',])asyncdeftest(request,sysid):payload=server.unprocess_payload(sysid,request.body)print(payload)return_payload=server.process_payload(sysid,{'Look Mom':'No Hands!'})returnresponse.text(return_payload)server.run(port=1337)Client:fromsickservimportSickServClient,set_init_keyset_init_key('yellow-submarine')ssc=SickServClient('127.0.0.1',port=1337)payload={'endpoint':'test','example':'This is some example test data'}response=ssc.send(payload)print(response)Server side:$ python server.py

  _____ ____   __  __  _  _____   ___  ____  __ __ 
 / ___/|    | /  ]|  |/ ]/ ___/  /  _]|    \|  |  |
(   \_  |  | /  / |  ' /(   \_  /  [_ |  D  )  |  |
 \__  | |  |/  /  |    \ \__  ||    _]|    /|  |  |
 /  \ | |  /   \_ |     \/  \ ||   [_ |    \|  :  |
 \    | |  \     ||  .  |\    ||     ||  .  \\   / 
  \___||____\____||__|\_| \___||_____||__|\_| \_/  

    v0.1.3 - https://github.com/vesche/sickserv 

[2019-10-26 06:12:47 -0500] [31313] [INFO] Goin' Fast @ http://0.0.0.0:1337
[2019-10-26 06:12:47 -0500] [31313] [INFO] Starting worker [31313]
{'example': 'This is some example test data'}
[2019-10-26 06:12:57 -0500] - (sanic.access)[INFO][127.0.0.1:41550]: POST http://127.0.0.1:1337/test/b0610ba87aa2  200 60Client side:$ python test_client.py
{'Look Mom': 'No Hands!'}RekeyAn initial, matching RC4 key must be supplied. However, the session can easily be rekeyed on the fly.A rekey is done from the client-end, like so:ssc.rekey()# rekey with a random 16 character length keyssc.rekey(length=32)# rekey with a random 32 character length keyssc.rekey(key='purple-submarine')# rekey with a custom defined key
Package: sicksid-drf-tus
A Tus (tus.io) library for Django Rest FrameworkDocumentationThe full documentation is athttps://drf-tus.readthedocs.io.QuickstartInstall drf-tus:pip install drf-tusAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'rest_framework_tus',...)Add the middleware toMIDDLEWARE(orMIDDLEWARE_CLASSESfor Django < 1.10)MIDDLEWARE=(...'rest_framework_tus.middleware.TusMiddleware',...)Add drf-tus’s URL patterns:urlpatterns=[...url(r'^',include('rest_framework_tus.urls',namespace='rest_framework_tus')),...]FeaturesThis library implements the following TUS API v1.0.0 protocols:Core Protocol (http://tus.io/protocols/resumable-upload.html#core-protocol)Creation Protocol (http://tus.io/protocols/resumable-upload.html#creation)Expiration Protocol (http://tus.io/protocols/resumable-upload.html#expiration)Checksum Protocol (http://tus.io/protocols/resumable-upload.html#checksum)Termination Protocol (http://tus.io/protocols/resumable-upload.html#termination)Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory1.21.2 (2018-09-04)Fixed Django compatibility1.21.1 (2018-08-01)Fixed failing travis build1.21 (2018-08-01)Updated Django dependency and dropped support for Python 3.3.x (https://github.com/dirkmoors/drf-tus/pull/9)1.20 (2018-02-12)Implemented per-view max file size setting (https://github.com/dirkmoors/drf-tus/pull/8)1.19 (2018-02-08)Fixed bug that occured when pausing uploads (https://github.com/dirkmoors/drf-tus/pull/7)1.18 (2018-02-08)Make the metadata ‘filename’ key a setting. (https://github.com/dirkmoors/drf-tus/pull/2)Switch from (Positive)IntegerField to BigIntegerField for the upload_length and upload_offset fields (https://github.com/dirkmoors/drf-tus/pull/3)Increase Django version support up to 1.11 (https://github.com/dirkmoors/drf-tus/pull/4)Fix unicode errors (https://github.com/dirkmoors/drf-tus/pull/5)Updated travis configuration1.17 (2017-05-10)Exchanged use ofbase64.encodebytestobase64.b64encode.1.16 (2017-05-04)Implementedvalidate_filenamehandler inTusCreateMixin.1.15 (2017-04-06)Added missing migration and changed max_length to 255 for modelUpload’s attributeuploaded_file1.14 (2017-03-30)Updated default behaviour of theget_headerhandler inTusMiddleware.1.13 (2017-03-30)Implemented handler for retrieving request headers inTusMiddleware.1.12 (2017-03-10)Updatedvalidate_chunksignature1.11 (2017-03-10)Implementedvalidate_chunkhandler method in TusPatchMixinImplementedvalidate_success_headershandler method in TusCreateMixin1.10 (2017-03-09)Disabled chunk writing to disk1.9 (2017-03-09)Introduced TusUploadStreamParser1.8 (2017-03-09)Introduced setting to include serializer data in respons body1.7 (2017-03-09)Bugfixes1.6 (2017-03-09)Bugfixes1.5 (2017-03-09)Updated middleware, removed required header (bug!)1.4 (2017-03-09)Initial migration1.3 (2017-03-09)Renamed some parameters / classes1.2 (2017-03-09)Cleanup repository.1.1 (2017-03-09)First release on PyPI.
Package: si-cli
si_cliA tool to convert from and to cap and resistor values in a 3 digit format(SI-Format)Installationpip install si_cliUsage$ si from 104
100 k
$ si from 104 --cap
100 nf
$ si to 100k
104
$ si to 100nf
104When usingtothere is no need for the--capflag. Cap values are calculated if the input ends with anf
Package: siconfipy
siconfipyPython library to access data from the Brazilian Public Sector Accounting and Tax Information System (SICONFI/National Treasure)This package is available forRInstallationInstall frompippipinstallsiconfipyInstall from githubpipinstallgit+https://github.com/pedrocastroo/siconfipy.gitDependencies:pandas>=2.25.1requests>=1.2.1Usingsiconfipy provides four main functions:get_fiscal()- Fiscal Management Reportget_budget()- Budget Execution Summary Reportget_annual_acc()- Annual Statement of Accountsget_info()- Basic information of the federation entitiesUtility functions:find_cod()to get the id (cod_ibge) for each state or cityDatasets:br_codsExamplesLoadsiconfipyimportsiconfipyor load functionsfromsiconfipyimportget_fiscal,get_budget,br_codsFiscal management report for the state of Sao Paulo (35) for the first four months of 2020:get_fiscal(year=2020,period=1,cod=35)You can pass a list of integers inyear,periodorcod. Example:year=[2018,2019,2020]orcod=[35,33]. More detailshelp(get_fiscal)Summary of the budget execution report for the state of Rio de Janeiro (33) of 2018 for the first two months:get_budget(year=2018,period=1,cod=33)Annual accounts statement of the Federal District (53) for 2018:get_annual_acc(year=2018,cod=53)Usefind_cod()to get thecod(cod_ibgecolumn) parameter:find_cod("Rio de Janeiro")cod_ibgeentecapitalregiaoufesferaexerciciopopulacaocnpj12433RiodeJaneiro0SEBRE2021173661894.249860e+1331563304557RiodeJaneiro1SERJM202167478154.249873e+13Acess basic information of the federation entities:get_info()br_codsprovides results similar toget_info(), but with some corrections, seeutils/build_datasets.pyAll data, as column name is in pt-BR, theAPIdoes not provide an endpoint in en.TODOREADME.mdpt-brAdd Accounting Balance Matrix - balance sheet accountsAdd Accounting Balances Matrix - Budget AccountsAdd Accounting Balances Matrix - Control AccountsAdd Extract of approved reports and matrices deliveredAdd Attachments of reports by sphere of governmentContributingBugs or suggestions: open anissuedetailing the problem/suggestion, be as reproducible as possible.LicenseThis project is released under the MIT License.
Package: siconv
Simplify Sinhala and Singlish Language Conversion withsiconvPython PackageUnlock efficient and accurate language conversion between Sinhala and Singlish effortlessly using thesiconvPython package. Whether you need to transform Sinhala text to Singlish or vice versa,siconvoffers a seamless and user-friendly solution.Key Features:Sinhala to Singlish Conversion:Easily convert Sinhala text to Singlish.Singlish to Sinhala Conversion:Effortlessly transform Singlish text to Sinhala.Efficient and Accurate Algorithms:siconvincorporates efficient and accurate language conversion algorithms for reliable results.Installation:Install the package effortlessly using pip:pipinstallsiconvUsage Example:fromsiconvimportsinhala_to_singlish,singlish_to_sinhala# Example Usagesinhala_text="ආයුබෝවන්"converted_singlish=sinhala_to_singlish(sinhala_text)print("Sinhala to Singlish:",converted_singlish)singlish_text="ayubowan"converted_sinhala=singlish_to_sinhala(singlish_text)print("Singlish to Sinhala:",converted_sinhala)Advanced Applications:1. Fine-tuning Language Models:Utilizesiconvto preprocess training data for fine-tuning large language models (LLMs) specifically tailored for Sinhala or Singlish language tasks.2. Building NLP Applications:Incorporatesiconvinto the development of Sinhala and Singlish applications, such as chatbots, sentiment analysis, or language translation, ensuring seamless text conversion.3. Tokenization:Enhance custom tokenization processes withsiconvfor accurate and consistent tokenization of Sinhala and Singlish text across diverse language-specific tasks.Empower your projects with the versatility ofsiconv, not only streamlining language conversion but also contributing to the broader landscape of natural language processing in Sinhala and Singlish.
Package: sicore
sicore packageThis package consists of core functions commonly used in selective inference.The Japanese version README ishere.InstallationThis package requires python 3.10 or higher and automatically installs any dependent packages. If you want to use tensorflow and pytorch's tensor, please install the framework manually.$ pip install sicoreUninstall :$ pip uninstall sicoreAPI ReferenceDeteiled API reference ishere.List of functionsThe following fuctions are imported byfrom sicore import *Statistical InferenceNaiveInferenceNorm : Naive statistical inference for the test statistic following a normal distribution.SelectiveInferenceNorm : Selective statistical inference for the test statistic following a normal distribution.Parametric SI and Over-Conditioning provided.Parametric SI offers the following three types of methods.Calculation of p-value with specified guaranteed accuracy.Determining if the null hypothesis is rejected or not.Performing a parametric search of the entire specified range.Inference results are returned as a data class.NaiveInferenceChi : Naive statistical inference for the test statistic following a chi distribution.SelectiveInferenceChi : Selective statistical inference for the test statistic following a chi distribution.Parametric SI and Over-Conditioning provided.Parametric SI offers the following three types of methods.Calculation of p-value with specified guaranteed accuracy.Determining if the null hypothesis is rejected or not.Performing a parametric search of the entire specified range.Inference results are returned as a data class.Truncated DistributionProvides computation with arbitrary precision using mpmath for multiple truncated intervals.tn_cdf() : truncated standard normal distributiontc_cdf() : truncated chi distributionEvaluation Functiontype1_error_rate()power()Figure Drawingpvalues_hist() : Draws a histogram of p-values.pvalues_qqplot() : Draws a uniform Q-Q plot of p-values.Interval Operationsintervals.intersection() : Computes the intersection of two sets of intervals.intervals.intersection_all() : Computes the intersection of set of intervals.intervals.union_all() : Computes the union of set of intervals.intervals.not_() : Computes the complement of set of intervals with real numbers as the whole set.UtilityOneVec : Generates a vector that is 1 at the specified index and 0 otherwise.poly_lt_zero() : Calculation of the intervals for which the polynomial is less than or equal to 0.polytope_to_interval() : Converts a selection event given in quadratic form into truncated intervals.construct_projection_matrix() : Constructs a projection matrix from a basis given as a list of vectors to the subspace it spans.OthersExecute code test :$ pytest tests/
Package: sicp-streams
StreamsHonorSICP 3.5 Streams. It shows a
way to see "changing" data differently.IntroductionIterators actually irrecoverably consumes the data in it. This is not acceptable for (not pure but Lisp-like) functional
programming. This package is built for solve this.Stream is designed to be immutable, but not enforced by codes. Prevent doing anything withs._headors._tail.Usage (all codes are complete)## Importing and Constructing a Streamfromsicp_streamsimportStreams=Stream("axolotl","barnacle","coral")# Equivalently, use another stream as last element means "rest"# s = Stream("axolotl", Stream("barnacle", Stream("coral", None)))# Equivalently, use a callable as last element also means "rest", and will not be called until it is necessary# s = Stream("axolotl", lambda: Stream("barnacle", lambda: Stream("coral", lambda: None)))# Therefore, it is possible to construct a stream that never endsones=Stream(1,lambda:ones)## Get Data from Itasserts.head=="axolotl"asserts.tail.head=="barnacle"asserts.tail.tail.head=="coral"asserts.tail.tail.tailisNone# end of stream is None## Get Data by subscriptingassert(s[0],s[1],s[2])==("axolotl","barnacle","coral")## Turn into an Iteratorit=iter(s)assertnext(it)=="axolotl"assertnext(it)=="barnacle"assertnext(it)=="coral"## Construct from an iterableStream.from_iterable([1,2,3])## Construct from generator function@Stream.from_generator_functiondefcounts(n):whileTrue:yieldnn+=1integers=counts(1)Toolbox Analog toitertoolsand Iterator-related Built-in Functionsfromsicp_streamsimportStreamimportstreamtools# some of them have different name (for obvious but unnecessary reason)# map -> smapstreamtools.smap(lambdax:x+1,Stream(1,2,3))# filter -> sfilterstreamtools.sfilter(lambdax:x%2==0,Stream(1,2,3))# zip -> szipstreamtools.szip(Stream(1,2,3),Stream(4,5,6))# islice -> sslicestreamtools.sslice(Stream(1,2,3,4,5),2,4)Demo, reimplementing SICP 3.5 (Not all of it)importstreamdemo
Package: sicret
Sicret - What Happens in Secret Stays in SicretOverviewSicret is a command-line utility tool designed to securely encrypt and decrypt directories. Using robust cryptography, it ensures the confidentiality of your data.The tool is user-friendly and operates exclusively through the command line, making it suitable for a variety of users who prefer a quick and secure way to protect their folders.InstallationTo install Sicret, ensure you have Python installed on your system.You can install Sicret using pip:pipinstallsicretUsageSicret is straightforward to use with two primary commands: -e for encryption and -d for decryption.Encrypting a DirectoryTo encrypt a directory, use the following command:sicret-e/path/to/folderThis will encrypt the specified folder, and the resulting encrypted file will have the extension .sicret.enc.
The original folder will be deleted after encryption to ensure security.Encrypting a DirectoryTo decrypt a previously encrypted directory, use the command:sicret-d/path/to/folderNote that you do not need to specify the .sicret.enc extension; the tool automatically appends this to locate the encrypted file.
The decrypted folder will be restored to its original state.SecuritySicret uses the Fernet symmetric encryption standard from the cryptography library, ensuring high security for your encrypted data.DisclaimerWhile Sicret is designed with security in mind, it's important to remember that no encryption tool can offer absolute security. Users are advised to keep backups of their important data and use strong, unique passwords for encryption.The developer of Sicret is not responsible for data loss or any potential security breaches.ContributingContributions to Sicret are welcome. Please feel free to fork the repository, make improvements, and submit pull requests.
Package: sicsearch
This utility make it easy to search a previously createdSafe in Clouddatabase. At this point this is just a quick hack to useSICin a Linux
environment.Open the databaseUse the installed script to open the specified database. The script will prompt
for your database password and open the database.sicsearch~/SafeInCloud.dbSearchingFuzzy matchingAt the blue>prompt start typing your search term. The script will use a
fuzzy match algorithm to filter out the entries as you type.Content matchingIf your query is three or more characters long the script will also search
inside each entry and display which field matched in parenthesis.InactivityIf there is no activity (key presses) in three minutes, the script will
shutdown to prevent the database from staying open.KeysUse the following keys while in search mode:ALT-X,ALT-Q- ExitALT-H,ALT-BACKSPACE- Clear the search fieldALT-K,Up- Move selection upALT-JDown- Move selection downEnter,Return- View selected entryView modeOnce an entry is selected, all fields in the card will be displayed.KeysUse the following keys in view mode:X- Exit scriptQ- Return toSearchmodeK- Move field selection upJ- Move field selection downEnter,Return- Open URL or Copy selected field to clipboardTo DoChange/customize key-bindingsToggle masked fields
Package: sida-cs228
sida-cs228Installationpipinstallsida-cs228UsageMoving the data of the hands to make them standardizedimportsida.cs228.standardizeasstddata=...# shape (5,4,6,n)std_data=std.do(data)Show one hand, or save it as a filefromsida.cs228.showimportshow_handdata=...# shape (5,4,6,n)show_hand(data[:,:,:,0],view_point="front",scale="unit")# show the first handshow_hand(data[:,:,:,1],view_point="side",scale="fit",fname="hand1.png")# save the side view of the second hand to a png fileStandardizing stepsThe shape of the argumentdatashould be:(5,4,6,n), wherencan be any integer.The meaning of the shape is:5fingers,4bones,6coordinates,nhands.The result ofdofunction will satisfy those conditions:(1)thebaseofindexfingerontheorigin,(2)thetipofthemetacarpalboneoftheindexfingerwillonthepoint(0,1,0),(3)thetipofthemetacarpalboneofthebabyfingerwillalsoonthex-yplane,(4)thetipofthemetacarpalboneofthethumbwillbeonthe+zside.After standardization, the front view will be like this:And the side view will be like this:The main source code is in this file:https://github.com/liusida/sida-cs228/blob/master/sida/cs228/standardize.py
Package: sidcalculator
Under construction ! Not ready for use yet!
Currently experimenting and planning!Developed by Sid Karmaker (c) 2023Example of How To Use SID CalculatorCreating A Calculatordefadd_numbers(a,b):returna+bdefsub_numbers(a,b):returna-bdefmul_numbers(a,b):returna*bdefdiv_numbers(a,b):returna/bUSES:fromsidcalculatorimportcalculatorcalculator.add_numbers(7,8)
Package: sidc-gui
Sudden ionospheric disturbance colletor (sidc) GUI.Features:sidcdata plottingquery running sidc instance infolive plotRequirements:python 2.6psutil 0.1.3wxPython 2.8matplotlib 0.99.1.1Note: version numbers are just informative, sidc-gui should work fine with latest versions of the requirements.Installation:install sidc-gui (easy_install sidc-guiorpip install sidc-gui)install requirementsrunsidc_gui
Package: sid-doc-cli
DocCliPython 3.10+ utility to build Classes that can be easily modified to create a Python
Argparse specification. The goal of this is to couple a CLI specification to a config
class, making them quicker to build and less likely to break.This leans heavily on theDeclilibrary
to generate Argparse objects.Creating CLI ObjectsCLI objects can be created automatically from a class definition, reading in default
values and descriptions from type hints and the docstring.fromdoccliimportDocCliParserclassCliTool:command_name="cli-tool"def__init__(self,_non_cli_param:str,param_a:str,param_b,param_c:int=5):"""This is the command descriptionArgs:_non_cli_param (str): Underscore leading params aren't included in theCLI specsparam_a: A required parameterparam_b: Note that the type needs to come from the annotationparam_c: This one has a default"""self.param_a=param_aself.param_b=param_bself.param_c=param_cself.non_cli_param=non_cli_param# To create the argparse object:if__name__=="__main__":args=DocliParser(CliTool).parse_args()...Seeexamplesfor more examples, including how to create CLIs withsubcommands.Config File HelpersDocCli also provides theConfigUtilclass which can be used to automatically
create Yaml config files. These include the ability to:Infer config specifications from the__init__methodConvert an instantiated object into a dictionaryThis will ignore config values that have the same value as their defaultAbility to nest Config objects in other objects, to create centralised config filesA sub-config object can still be instantiated from the super YAML fileObjects inheriting from theConfigUtilclass can set the following class level
variables:config_key: strParameters for this object. Defaults to the class namesub_config_list: ListA list of Config Classes that also inherit from ConfigUtil, and are children of this classflatten_sub_configs: boolDefaults to True. When reading from/writing to a dict, sub_configs will either be recorded
as sub-dictionaries, or at the same level as the config items for the current dictionary.Using them togetherThese tools can be used together to create a config class that can:Generate a CLI parserInitiate from a CLI parser, while also filling in unsupplied values from a Config fileWrite supplied values to a config file so they can be remembered laterDocliParser has the methodparse_args_with_config_file, which will attempt to
fill in any unprovided arguments with values provided in the Config File. Note that
this will only work if:The variables are stored as top-level keys in the fileThe variables are stored in a sub-dictionary under the same key as the subcommand nameIf the subcommand class inherits fromConfigUtiland the variables are stored in a
sub-dictionary under the same key as the ConfigUtil.config_key variableAn example of this can be seen inexamples
Package: side-by-side
Print two outputs side-by-side, in Pythonside_by_sideallows users to print two multi-line outputs side-by-side. This produces an effect similar to runningdiff -y file1 file2in a Unix system.UsageThis library provides a single function,side_by_side.print_side_by_side. To print two_strings side-by-side with default settings:from side_by_side import print_side_by_side

print_side_by_side(s1, s2)Optional parametersprint_line_numbers (bool): If True, prints line-numbers along the left column.col_padding (int): the number of spaces to leave between the two columns (and between the text and line number, if applicable)delimiter (str): a delimiter to separate the columnsFancy usageHere's an example of a print format that uses all of the parameters:from side_by_side import print_side_by_side

print_side_by_side(lorem_ipsum, lorem_ipsum, print_line_numbers=True, col_padding=24, delimiter='|++++|')