Saravanan666/pypi-org huggingface dataset:
Package: sling-windows-amd64
Slings from a data source to a data target.Installationpip install slingThen you should be able to runsling --helpfrom command line.Running a Extract-Load TaskCLIslingrun--src-connMY_PG--src-streammyschema.mytable\--tgt-connYOUR_SNOWFLAKE--tgt-objectyourschema.yourtable\--modefull-refreshOr passing a yaml/json string or fileslingrun-c'source:conn: MY_PGstream: myschema.mytabletarget:conn: YOUR_SNOWFLAKEobject: yourschema.yourtablemode: full-refresh'# ORslingrun-c/path/to/config.jsonFrom LibfromslingimportSlingconfig={'source':{'conn':'MY_PG','stream':"select * from my_table",},'target':{'conn':"s3://my_bucket/my_folder/new_file.csv",},}Sling(**config).run()Config Schema--src-conn/source.connand--tgt-conn/target.conncan be a name or URL of a folder:MY_PG(connection ref in db, profile or env)postgresql://user:password!@host.loc:5432/databases3://my_bucket/my_folder/file.csvgs://my_google_bucket/my_folder/file.jsonfile:///tmp/my_folder/file.csv(local storage)--src-stream/source.streamcan be an object name to stream from:TABLE1SCHEMA1.TABLE2OBJECT_NAMEselect * from SCHEMA1.TABLE3/path/to/file.sql(if source conn is DB)--tgt-object/target.objectcan be an object name to write to:TABLE1SCHEMA1.TABLE2Example as JSON{"source":{"conn":"MY_PG_URL","stream":"select * from my_table","options":{}},"target":{"conn":"s3://my_bucket/my_folder/new_file.csv","options":{"header":false}}}
Package: slink-api
SlinkInspired byuplink, a simple way to build rest API clients without OpenAPI,
and without a lot of requests boilerplate.InstallpoetryinstallBasic UsageModel your resource in PydanticfrompydanticimportBaseModelclassMyResource(BaseModel):name:strvalue:intCreate an APIfromslinkimportApi,get,post,Query,BodyclassMyTestApi(Api):# Define a get@get("rest/api/3/{resource_key}")defget_resource(self,resource_key:str):returnMyResource(**self.response.json())# Define it with some query params@get("rest/api/3/{resource_key}/param",testvalue=Query())defget_resource_with_param(self,resource_key:str,testvalue:str):returnMyResource(**self.response.json())# And post your body content@post("rest/api/3/{resource_key}",body=Body())defpost_resource(self,resource_key:str,body:dict):returnMyResource(**self.response.json())Then use it:api=MyTestApi(base_url="http://example.com/")result=api.get_resource(resource_key="REST")result=api.get_resource_with_param(resource_key="REST",testvalue="test")result=api.post_resource(resource_key="TEST",body={"foo":"bar"})PaginationSlink allows you to elegantly iterate most style of paged APIs. As example, we can implement one of the most common
pagination patterns, an an offseted pagination API. With such an API, you request an offset of the dataset with some
limit on the size of the data returned:classOffsettedPager:def__init__(self,max_count=5)->None:self.max_count=max_countdefpages(self,url:str)->Generator[Tuple[str,dict],requests.Response,None]:start_at=0total=NonewhiletotalisNoneorstart_at<total:# yield a tuple of the next url and any parameters to be added to the original request, get back the response to update the iterationresponse=yieldurl,{"startAt":start_at,"maxCount":self.max_count,}total=response.json()["total"]start_at+=self.max_countYou can then use the pager with the@get_pagesdecorator to iterate through the pages:classPagedApi(Api):@get_pages("rest/api/3/pages",pager=OffsetedPager())defget_paginated(self)# our data field in the json result just contains a list of ints, but they could be a much more complicated objectforvalueinself.response.json()["data"]:yieldint(value)api=PagedApi(base_url=base_url)all_results=list(api.get_paginated())# note the list construction because pages are returned as generatorsAnother example would be a pagination API where there is a next link:classLinkedPager:defpages(self,url)->Generator[Tuple[str,dict],requests.Response,None]:response=yieldurl,{}# first page is just the raw url# use assignment operator since python 3.8whilenext_url:=response.json()["links"].get("next"):response=yieldnext_url,{}Note in both cases, iteration can be stopped early by simply stopping calling the endpoint, ie the following will make
any more requests once it finds the required value:foreinapi.get_paginated():ife==value_to_find:breakLimitations and TODOsput, deleteerror handling and robustnessretry patternspatch, headsupporting other http client libraries, including async ones
Package: slinkedList
slinkedListWhat is it?slinkedListis a module to automate the operations that can be performed using linked list such as creating a new node, adding a new element,inserting an element at the head node, tail node and required location, merging the linked lists,sorting,duplicates removing and deleting the elements etc.Where to get itThe source code is currently hosted on GitHub at:hereInstallationUse the package managerpipto install slinkedList.FeaturesslinkedList can apply the following operations:creating a single liked list with dataadding a node at starting,ending and particular position of the linked listremoving node at starting,ending and particular position of the linked listBasic statistics like sum, min, max, mean, mode and medianconverting the linked list data to string, list, tuple and setcounting the data occurrences in given linked listsorting the linked list and assign the values in sorted waySearching particular data items in liked listReplacing the values with new dataSlicing the linked listRemoving duplicates, equalizing two liked lists, merging two linked list, copy, clear, push, pop, isempty, lenght etc etc..The main advantage of this linked list is we can traverse using for loop and this linked list has operator overloading so we can perform +, -, *, **, /, //,%, [], +=,-= etc etc operationsInstallationslinkedList requiresPython 3.To install using pip, usepip install slinkedListUsageImport the library:importslinkedListasllcreating a empty linked listempty_list=ll.SingleLinkedList()creating linked list with datatemp=ll.SingleLinkedList([1,2,3,4])Some most commonly used operationsmyList=ll.SingleLinkedList([1,2,3,4,5,6,7,8])#creating ll with datamyList.addToEnd(12)#adds 12 to the ending# printing Lengthprint(myList.length())# printing indexes of given elementsprint(myList.index([2,3,4]))# printing elements at a particular indexesprint(myList.atIndex([3,1]))# removing an elementprint(myList.removeItem([12,1]))# removing elements from a particular positionsmyList.removeAtPosition([3,2,4])#returns a list with descending ordernew_list=myList.new_sorted(reverse=True)Examples1)importslinkedListasll# creating LinkedListm=ll.SingleLinkedList(data=[1,2,3,4])n=ll.SingleLinkedList(data=[5,6,7])o=m+nprint(o)returns,sllist([1,2,3,4,5,6,7])2)importslinkedListasllm=ll.SingleLinkedList(data=[1,2,3,4,5,6,7,8])print(m[:4].toString("->"))returns,1->2->3->43)importslinkedListasllm=ll.SingleLinkedList(data=[1,2,3,4])print(reversed(m))returns,sllist([4,3,2,1])DocumentationThe official documentation is hosted on Drive :docContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMITFor any questions, issues, bugs, and suggestions please visithere
Package: slinker
Slinker provide a single one to one event, we call it alink.Alinkcan only have a single sender and a single reciver.The source code is locate atgithub.IntroductionLink receiver can subscribe to specific link. A reciver function required
a sender argument, and a keyworld argument which is optional.>>> from slinker import Namespace
>>> links = Namespace()
>>> started = links.link('round-started')
>>> def each(round):
...     print "Round %s!" % round
...
>>> started.connect(each)
>>> for round in range(1, 4):
...     started.send(round)
...
Round 1!
Round 2!
Round 3!Here provide a decoratorreceiverwhich can be used for connect. Because a
link can only have one reciever. If you want to connect to another receiver,
you must disconnect the formly receiver.>>> started.disconnect(each)
>>> from slinker import receiver
>>> @receiver(started)
    def test(sender, **kwargs):
...     return sender
>>> func, result = started.send('hello')
>>> func == test
... True
>>> result == 'hello'
...  TrueMore examplessee thetestsdirectory.
Package: slinn
Slinn is a HTTPS and HTTP server frameworkCreate projectUnix-like (Linux, MacOS, FreeBSD...):python3-mslinncreatehelloworldcdhelloworld
venv/bin/pythonmanage.pycreatelocalhosthost=localhosthost=127.0.0.1
venv/bin/pythonmanage.pyrunWindows:py -m slinn create helloworldcdhelloworld
venv\Scripts\activate
py manage.py create localhost host=localhost host=127.0.0.1
py manage.py runSimple example# localhost/app.pyfromslinnimportDispatcher,AnyFilter,LinkFilter,HttpResponse,HttpAPIResponsedp=Dispatcher('localhost','127.0.0.1')@dp(LinkFilter('api'))defapi(request):returnHttpAPIResponse('{"status": "ok"}')@dp(AnyFilter)defhelloworld(request):returnHttpResponse('Hello world!')To config project you should edit./project.jsonTo config app you should edit./%app%/config.jsonFunctions:fromslinnimportServerserver=Server(*dispatchers:list[Dispatcher],ssl_cert:str=None,ssl_key:str=None,http_ver:str='2.0')server.address()->strserver.reload(*dispatchers:list[Dispatcher])server.listen(address:Address)fromslinnimportAddressaddress=Address(port:int,host:str=None)fromslinnimportDispatcherdispatcher=Dispatcher(hosts:list=None)dispatcher.route(filter:Filter)fromslinnimportFilter_filter=Filter(filter:str,methods:list[str]=None)_filter.check(text:str,method:str)->bool_filter.size(text:str,method:str)->int# Special method for Smart Navigation# LinkFilter inherits from FilterfromslinnimportLinkFilterlink_filter=LinkFilter(filter:str,methods:list[str]=None)link_filter.check(text:str,method:str)->bool# AnyFilter as same as Filter('.*')fromslinnimportAnyFilterfromslinnimportHttpResponsehttp_response=HttpResponse(payload,data:list[tuple]=None,status:str='200 OK',content_type:str='text/plain')http_response.set_cookie(key:str,value)http_response.make(type:str='HTTP/2.0')->str# HttpAPIResponse inherits from HttpResponsefromslinnimportHttpAPIResponsehttp_api_response=HttpAPIResponse(payload,data:list[tuple]=None,status:str='200 OK',content_type:str='text/plain')http_api_response.set_cookie(key:str,value)http_api_response.make(type:str='HTTP/2.0')->str# HttpRedirect inherits from HttpResponsefromslinnimportHttpRedirectHttpRedirect(location:str)fromslinnimportRequestRequest(http_data:str,client_address:tuple[str,int])
Package: slipbox
slipboxslipboxis a static site generator for Zettelkasten notes.FeaturesInteractive graph of notes and linksStatic text searchSupports notes in markdown, RST, LaTeX, dokuwiki, Org-mode, txt2tags, Textile and MediaWiki formatsCheckers/linters for detecting unlinked notes, missing citations, bad formatting and moreRequirementspandoc(2.17+)graphvizpython3(3.8+)Installation and usagepipinstallslipboxcdmy-notes
slipboxinit# ...add notesslipboxbuildSeedocs-src/index.mdandhttps://lggruspe.github.io/slipbox.ContributingSeeCONTRIBUTING.md.LicenseMIT.
Package: slipform
🏗 slipformpythonflowdecorator for generating dataflow graphs from raw python.Why?Syntax is natural, you can use a simple decorator to obtain the dataflow graph. No need to rewrite your code for pythonflow.Slipform allows you to write and test code as you normally would, debugging it using the debugger of your choice during runtime. When you are happy with your code, finally, at runtime you can generate the dataflow graph.DisclaimerSlipform was born out of a desire to learn more about the python AST, and potentially use it for my own personal projects if it works out.It is not actively developed, nor should it be considered stable.RoadmapPrioritynaming from assignmentsplaceholders from argsconstant supportfunctions to operationsimport supportcustom operation supportignore comments#[ignore]or#[slipform:ignore]Investigatemodule / import detection from function scopesequences (map, list, tuple, zip, sum, filter)for loop replacement?conditional expression replacement?assertion replacement?try/catch replacement?explicit dependencies?Examples based onUsing PythonflowGet started by importing slipformfromslipformimportslipform# "pf" must be part of scope of any @slipfrom annotated# function. This limitation will be relaxed in future.importpythonflowaspfA simple example is as follows:@slipformdefadd_graph(x):a=5b=32z=a+b+xWith the equivalent pythonflow version:withpf.Graph()asadd_graph:x=pf.placeholder('x')a=pf.constant(5,name='a')b=pf.constant(32,name='b')z=(a+b+x).set_name('z')We can evaluate the graphs like usual using pythonflow:add_graph(['b','z'],x=5)>>>(32,42)A more complicated example@slipfrom()defvae(x,x_target,encoder,decoder,mse):# import ... from ... (as ...) are all supportedimporttorchimporttorch.nn.functionalasF# get the encoding!z_params=encoder(x)# deterministic, we dont reparameterize herez=z_params.z_mean# reconstruct herex_pre_recon=decoder(z)# final activationx_recon=x_pre_reconifmseelsetorch.sigmoid(x_pre_recon)# compute lossloss=F.mse_loss(x_recon,x_target)ifmseelseF.binary_cross_entropy_with_logits(x_pre_recon,x_target)The above will generate code equivalent in functionality to:withpf.Graph()asadd_graph:x=pf.placeholder('x')x_target=pf.placeholder('x_target')encoder=pf.placeholder('encoder')decoder=pf.placeholder('decoder')mse=pf.placeholder('mse')# import everythingtorch=pf.import_('torch')F=pf.import_('torch.nn.functional')# get the encoding!z_params=encoder(x)z_params.set_name('z_params')# deterministic, we dont reparameterize herez=z_params.z_meanz.set_name('z')# reconstruct herex_pre_recon=decoder(z)x_pre_recon.set_name('x_pre_recon')# final activationx_recon=pf.conditional(mse,x_pre_recon,torch.sigmoid(x_pre_recon))x_recon.set_name('x_recon')# compute lossloss=pf.conditional(mse,F.mse_loss(x_recon,x_target),F.binary_cross_entropy_with_logits(x_pre_recon,x_target))loss.set_name('loss')
Package: sliplib
sliplib— A module for the SLIP protocolThesliplibmodule implements the encoding and decoding
functionality for SLIP packets, as described inRFC 1055.
It defines encoding, decoding, and validation functions,
as well as a  driver class that can be used to implement
a SLIP protocol stack, and higher-level classes that
apply the SLIP protocol to TCP connections or IO streams.
Read thedocumentationfor detailed information.BackgroundThe SLIP protocol is described inRFC 1055(A Nonstandard for
Transmission of IP Datagrams over Serial Lines: SLIP, J. Romkey,
June 1988).  The original purpose of the protocol is
to provide a mechanism to indicate the boundaries of IP packets,
in particular when the IP packets are sent over a connection that
does not provide a framing mechanism, such as serial lines or
dial-up connections.There is, however, nothing specific to IP in the SLIP protocol.
SLIP offers a generic framing method that can be used for any
type of data that must be transmitted over a (continuous) byte stream.
In fact, the main reason for creating this module
was the need to communicate with a third-party application that
used SLIP over TCP (which is a continuous byte stream)
to frame variable length data structures.UsageInstallationTo install thesliplibmodule, usepip install sliplibLow-level usageThe recommended basic usage is to run all encoding and decoding operations
through an instantiationdriverof theDriverclass, in combination
with the appropriate I/O code.
TheDriverclass itself works without any I/O, and can therefore be used with
any networking code, or any bytestream like pipes, serial I/O, etc.
It can work in synchronous as well as in asynchronous environments.TheDriverclass offers the methodssendandreceiveto handle
the conversion between messages and SLIP-encoded packets.High-level usageThe module also provides aSlipWrapperabstract baseclass
that provides the methodssend_msgandrecv_msgto send
and receive single SLIP-encoded messages. This base class
wraps an instance of theDriverclass with a user-provided stream.Two concrete subclasses ofSlipWrapperare provided:SlipStreamallows the wrapping of a byte IO stream.SlipSocketallows the wrapping of a TCP socket.In addition, the module also provides aSlipRequestHandlerto facilitate the creation of TCP servers that can handle
SLIP-encoded messages.Error HandlingContrary to the reference implementation described inRFC 1055,
which chooses to essentially ignore protocol errors,
the functions and classes in thesliplibmodule
use aProtocolErrorexception
to indicate protocol errors, i.e. SLIP packets with invalid byte sequences.
TheDriverclass raises theProtocolErrorexception
as soon as a complete SLIP packet with an invalid byte sequence is received .
TheSlipWrapperclass and its subclasses catch theProtocolErrors
raised by theDriverclass, and re-raise them when
an attempt is made to read the contents of a SLIP packet that contained
invalid data.
Package: slipo
SLIPO API Python clientA simple Python client forSLIPO API.TheSLIPO APIcan be used to:Access the remote user file system to browse, upload and
download filesQuery resource catalog and download RDF datasets. All data
are encoded inN-TriplesformatManage existing POI data integration processesExecute a single SLIPO Toolkit component operation. Currently,
SLIPO supportsTransform,Interlink,FuseandEnrichmentoperations
Package: slipoframes
SLIPO API client for Jupyter notebooksSLIPO APIclient for Jupyter notebooks.TheSLIPO APIcan be used to:Access the remote user file system to browse, upload and
download filesQuery resource catalog and download RDF datasets. All data
are encoded inN-TriplesformatManage existing POI data integration processesExecute a single SLIPO Toolkit component operation. Currently,
SLIPO supportsTransform,Interlink,FuseandEnrichmentoperations
Package: slipo-loci
LOCIOverviewLOCI is a Python library providing high-level functions for exploring, mining and visualizing Points and Areas of Interest. It is under ongoing development. It currently supports the following functionalities:Create a GeoDataFrame from POI data in a CSV file.Display POIs on the map.Filter POIs by category or keywords.Compute and visualize statistics about POI categories or keywords.Generate word clouds from POI categories or keywords.Generate heatmaps from POI locations.Construct and visualize a grid structure over POI locations.Compute and visualize POI clusters using density-based clustering.Use LDA to extract and assign topics to clusters.Use of frequent itemset mining to discover frequent location sets.Quick startPlease see the providednotebooks.DocumentationSeehere.LicenseThe contents of this project are licensed under theApache License 2.0.
Package: slippers
Build reusable components in Django without writing a single line of Python.{% #quote %}{%quote_photosrc="/project-hail-mary.jpg"%}{% #quote_text %}“I penetrated the outer cell membrane with a nanosyringe.""You poked it with a stick?""No!" I said. "Well. Yes. But it was a scientific pokewith a very scientific stick.”{% /quote_text %}{% #quote_attribution %}Andy Weir, Project Hail Mary{% /quote_attribution %}{% /quote %}What is Slippers?The Django Template Language is awesome. It's fast, rich in features, and overall pretty great to work with.Slippers aims to augment DTL, adding just enough functionality to make building interfaces just that bit morecomfortable.It includes additional template tags and filters, but its headline feature isreusable components.{% #button variant="primary" %}See how it works{% /button %}See how it worksInstallationpip install slippersAdd it to yourINSTALLED_APPS:INSTALLED_APPS=[...'slippers',...]DocumentationFull documentation can be found on theSlippers documentation site.ContributorsLicenseMIT
Package: slippinj
1.0.7 version para desplegar legacyOozie workflow tools AKA Slippin JimmyGenerating Oozie workflows can be a tedious task, coding XML is not
awesome, so you can generate them from Jinja templates using the
process_templates.py script.Installing the module# pip install slippinjAbout the dependencies, cx_Oracle is a Python extension module
that enables Slippin Jimmy Scribe access to Oracle Database.
This module is currently built against Oracle Client 11.2, 12.1 and 12.2,
and is required for its operation to install the Oracle Instanclient.
You can see how to install it at:http://www.oracle.com/technetwork/database/features/instant-client/index-097480.htmlorhttps://anaconda.org/anaconda/oracle-instantclientfor conda enviroment users.Running the scriptThe arguments not provided and mandatory are asked for during script
execution:jimmy -hRunning the testsRemember to remove the package before running the tests or the installed
version will be used to run them$ make testComponents of the moduleSlippin Jimmy is composed by the above components: * Scribe: It creates
the documentation and basic configuration from the Source database *
Valet: It provisions the cluster with the needed software * Tlacuilo:
It compiles the XML workflows from the YAML configuration * Anabasii:
It uploads the code to the cluster * Cooper: Once the code has been
uploaded it run the workflows * Hersir: Execute compilation, upload and
once is uploaded the code to the cluster run the workflowsalt tag
Package: slippistats
SlippiStatspip install slippistatsPlease refer to thewikifor quick start and API reference. Also check outStatsExamplesjupyter notebooks, which contain some example stat generations from ~1400 of my own replays.SlippiStats is a Python parser for.slpgame replay files forSuper Smash Brothers Meleefor the Nintendo GameCube. These replays are generated by Jas Laferriere'sProject Slippi, which runs on a Wii or theDolphinemulator.OverviewSlippiStats is a library for slippi replay parsing and automatic stat/combo generation. It is based heavily on both slippi-js and py-slippi, though with some modifications.The goal of SlippiStats is to provide a set of more useful, accurate, and detailed statistics than what slippi-js currently offers. The stats are targeted towards competitive players, with a notable absence of some "novelty" stats like APM. The output integrates easily with existing data science libraries and can provide indications for where a player should improve, as well as tracking that improvement over time.FeaturesCombo generation with an enhanced algorithm and togglable criteria (with clippi/dolphin-compatible json output)Stat generation with useful, high detail fields~70-90% faster replay parsing compared to py-slippiEffortless conversion to Pandas/Polars DataFramesDifferences from Py-SlippiSlippiStats originated as afork of py-slippi, which was meant to be merged in at some point. Unfortunately, the scope increased a lot, the dev behind py-slippi has shifted focus from python to rust's Peppi parser, and the changes required to make stats work resulted in more and more breaking changes from py-slippi's existing framework. Thus the decision was made to make this its own project. Below are some of the major changes:Support for all slippi replay features through version 3.14.0Minimum python version 3.7 -> 3.10Live parsing is no longer supportedAll slippi file metrics are present in the output regardless of adjacent stats (e.g.hitstun->misc_timer, no longer requires hitstun bitflag to populate)More robust enums including character-specific states and ground ID's for tournament legal stages.Many variables renamed to keep consistency with community and/or slippi file spec (e.g.damage->percent)Some class structures have been flattened (e.g.slippi.version->slippi_version,metadata.player[i].netplay.code->metadata.player[i].connect_code)Parsing code has been heavily modified to maximize speedAdditional dependencies for data processing supportKnown issues/limitationsStats/combo generation support only games with 2 players. Doubles stats/combos are not supported.
Package: slippy-api
slippy-apiOverviewslippy-api is a simple wrapper for slippi.gg's GraphQL API.Installationpip install slippy-apiUsagefromslippi.slippi_apiimportSlippiRankedAPI# Initialize the SlippiRankedAPI classslippi_api=SlippiRankedAPI()# Show slippi users dataslippi_user=slippi_api.get_player_ranked_date('so#0',True)print(slippi_user)LicenseThis library is licensed under the MIT License. See theLICENSEfile for more information.