Saravanan666/pypi-org huggingface dataset:
Package: slice-shukuru
slice - Simple file splitter[[TOC]]OverviewSlice is pretty straightforward: it slice your files.RequirementsThis package requires at least Python 3.9 andhumanfriendly10.0 package.If you want to run tests, Slice needs PyTest 7.0.1InstallationThis package is hosted onPyPi repository.To install it, runpython -m pip install slice-shukuru --upgradeUsageOnce installed, just run it withpython -m sliceThis program is far from being complicated to use, have a look to CLI help:usage: slice [-h] [-v] [-V] (-s CHUNK SIZE | -c PARTS COUNT) file

Simple file splitter

positional arguments:
  file                  Path to file you want to be sliced

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Output process on stdout
  -V, --version         Output program version and exit
  -s CHUNK SIZE, --size CHUNK SIZE
                        Numeric or human-readable chunk size value (1024, 16MB, 1GiB, ...)
  -c PARTS COUNT, --count PARTS COUNT
                        Total parts count to slice the file inTL;DR:-soptional parameter to slice on parts size,-cto slice on part total count.Actually, there's no option to concatenate parts and "re-build" the original file.
You have to use UNIXcatcommand to do so.cat*.[0-9]>original_filenameContributionFeel free to open a merge request to propose features or an issue if you found a bug.
You can also contribute to documentation or tests writing.LicenseThis program is distributed underBSD 3-Clause License.
Package: slicetca
SliceTCAThis library provides tools to performsliceTCA.Installationpip install slicetcaFull documentationThe full documentation can be foundhere.ExamplesQuick exampleimportslicetcaimporttorchfrommatplotlibimportpyplotaspltdevice=('cuda'iftorch.cuda.is_available()else'cpu')# your_data is a numpy array of shape (trials, neurons, time).data=torch.tensor(your_data,dtype=torch.float,device=device)# The tensor is decomposed into 2 trial-, 0 neuron- and 3 time-slicing components.components,model=slicetca.decompose(data,(2,0,3))# For a not positive decomposition, we apply uniqueness constraintsmodel=slicetca.invariance(model)slicetca.plot(model)plt.show()NotebookSee theexample notebookfor an application of sliceTCA to publicly available neural data.ReferenceA. Pellegrino@†, H. Stein†, N. A. Cayco-Gaijc@. (2023). Disentangling Mixed Classes of Covariability in Large-Scale Neural Data.https://www.biorxiv.org/content/10.1101/2023.03.01.530616v1.
Package: slicetime
slicetimeCreate time and datetime objects using slice notation.Importing slicettime overrides the standard library datetime objects
so be sure to place it before actually using datetime. Otherwise, continue
to usedate,datetime, andtimeas before. But when you need an instance
with a new time, use the digital clock notation to create it[hh:mm:ss.mmmmmm]When thetimeclass is called with this new notation, a new time instance
is created and returned. When an existing eitherdateordatetimeis
called with this new notation, a newdatetimeinstance is returned that
has the same date as the original instance, but the time specified in the
slice.Exampleimportdatetimeimportslicetimenew_time=datetime.time[12:30:5.55]assertnew_time.hour==12assertnew_time.minute==30assertnew_time.second==5assertnew_time.microsecond==55
Package: sliceup
SliceupPython client of the SliceUp APIInstalling$pipinstallsliceupExamplesImportingfromsliceupimport*Database summaryfromsliceupimport*sliceup=Sliceup('demo.sliceup.co')response=sliceup.summary()ifresponse:print(response.content)else:print('An error has occurred.')Create a tablefromsliceupimport*sliceup=Sliceup('demo.sliceup.co')response=sliceup.create({'name':'orders','columns':[{'name':'time','type':'time'},{'name':'qty','type':'int'},{'name':'price','type':'float'}],'recreate':True})ifresponse:print(response.content)else:print('An error has occurred.')Insert datafromsliceupimport*sliceup=Sliceup('demo.sliceup.co')response=sliceup.insert({'name':'orders','rows':[{'time':'00:00:00','qty':2,'price':9.0},{'time':'00:30:09','qty':2,'price':2.0},{'time':'01:45:01','qty':4,'price':1.0},{'time':'12:10:33','qty':10,'price':16.0},{'time':'16:00:09','qty':4,'price':8.0},{'time':'22:00:00','qty':4,'price':23.0},{'time':'22:31:49','qty':4,'price':45.0},{'time':'22:59:19','qty':4,'price':17.0},]})ifresponse:print(response.content)else:print('An error has occurred.')Query dataCheck out inRunKitSelect from tablefromsliceupimport*sliceup=Sliceup('demo.sliceup.co')response=sliceup.query({'select':['time','qty','price'],'from':'orders'})ifresponse:print(response.content)else:print('An error has occurred.')Visualize datafromsliceupimport*sliceup=Sliceup('demo.sliceup.co')response=sliceup.query({'select':['time','qty','price'],'from':'orders'})ifresponse:print(response.content)else:print('An error has occurred.')Query table statisticsfromsliceupimport*sliceup=Sliceup('demo.sliceup.co')response=sliceup.query({'select':[max('time'),min('time'),min('qty'),max('qty'),min('price'),max('price')],'from':'orders'})ifresponse:print(response.content)else:print('An error has occurred.')Slice the data into hour bucketsfromsliceupimport*sliceup=Sliceup('demo.sliceup.co')response=sliceup.query({'select':count('price'),'by':bar('time',time(1,0,0)),'from':'orders'})ifresponse:print(response.content)else:print('An error has occurred.')Slice and group the quantity by bars of 2fromsliceupimport*sliceup=Sliceup('demo.sliceup.co')response=sliceup.query({'select':count('price'),'by':bar('qty',2),'from':'orders'})ifresponse:print(response.content)else:print('An error has occurred.')LicenseSliceup is copyright (c) 2019-present SliceUp, Inc.Sliceup is free software, licensed under the MIT. See the LICENSE file for more details.
Package: slicevis
slicevisA Python package for interactive slice and segmentation visualization of 3D datasets in Jupyter notebooks.Axial slice of murine CT scan with multi-class segmentation inSliceWidget.Easiest way to installslicevis:pip install slicevisHow to buildslicevisyourself (Windows):Clone this repositorygit clone https://git.rwth-aachen.de/nicholasbook/sce-project-ss22.git.(Optional) Create a virtual environmentpy -m venv envand activate itcall env/Scripts/activate.bat.Install locally usingpip install -e ..Usageslicevisis meant to be used in combination with Jupyter notebooks. I recommend that you use VSCode with the Python and Jupyter extension installed.
Check out theexamplesdirectory in therepositoryfor test data and prepared notebooks.Minimal usage:from slicevis import SliceWidget
data = slicevis.load_image("CT280.gff") # 4D image
widget = slicevis.SliceWidget(data.get_timepoint())LicenseTheslicevispackage is licensed under the terms of theMITlicense.The examples directory of the repository contain data that is licensed underCC-BY-SA 4.0. Please refer toexamples/LICENSE.txtfor more details.AcknowledgementsTheslicevisPython package was developed by me, Nicholas Book, as a final project for the course "Sustainable Computational Engineering", held byDr. Anil YildizandDr. Hu Zhaoof theChair of Methods for Model-based Development in Computational Engineering (MBD). I would like to extend my gratitude to both for their kind support.
Package: slicey
SliceyAdd Mutating Slices to PythonMutating slices (or "reference slices") deal with a subset of a list as if it was its own list. This contrasts python's native "value slicing" where slicing a list provides a new list.Let's Take a LookStarting with python's normal slicingbase=[0,1,2,3,4]slc=base[0:]# take a slice of the whole list# now let's check each element is the same in each listassertall(base[i]==slc[i]foriinrange(len(base)))# if we change the slice (slc) the base won't changeslc[2]=-1# now they should be differentassertbase[2]!=slc[2]However, with slicey you can opt into slices that change the base.fromsliceyimportSlicebase=[0,1,2,3,4]slc=Slice(base)[0:]# slicey slicing syntaxassertall(base[i]==slc[i]foriinrange(len(base)))slc[2]=-1assertbase[2]==slc[2]Excluding that slicey slices mutate the base list, they can be used like a normal slice!fromsliceyimportSlicebase=[7,3,2,5,4]slc=Slice(base)[1:-1]# grab from 1 through 3 ([3, 2, 5])assert[*slc]==[3,2,5]slc[2]=1assertbase[3]==1slc.sort()assertbase==[7,1,2,3,4]WhyDon't get me wrong, I love python! But sometimes... you just want a pointer.The initial inspiration for this project was implementing merge sort, in a clear manner. Often merge sort is written with a variety of indices (i, j, k, etc); I can't speak for other but I can't make heads or tails of it. In languages that expose raw pointers, like c, one can mutate subsections of arrays by referencing an item and passing a smaller length to some function.
In short, I wanted to write a merge sort I sould read.Some Nitty GrittySlicing Slicey Slices ... ( ☉︵ ಠ )?slicey is always opt-in.This means when you slice a slicey slice (an instance of Slice) you'll get an object of whatever slicing the base object would be.In the likely case that was non-sense, let's just take a lookfromsliceyimportSlicebase=[*range(10)]# a native listslc=Slice(base)[1:10]# a slicey slicenatv_sublc=slc[1:-1]# a native list equal to base[2:9]asserttype(natv_sublc)==type(base)assertnatv_sublc==base[2:9]Sometimes it make sense to have a refence slice of a reference slice.# continuing from aboveslcy_subslc=slc.slice[1:-1]# an instance of Sliceasserttype(slcy_subslc)isSliceassert[*slcy_subslc]==base[2:9]# for the generic programmers among us Slices can be subsliced like a listgnrl_slc=Slice(slc)[1:-1]Transparent Slice CollapsingSome steps have been taken to avoid indirection when sub-slicing instances ofSlice. Taking a sub-slice of aSliceis always equivalent to take a slice out of the base objectreadme todochanging base list size not permitted, b/c notificationsexcluding.pop()and other length mutating methodstyping andSliceable
Package: slicing
支持的文件格式gzzipsql分割 SQL调用方式frompathlibimportPath# absolute_file_path 读取文件的绝对路径# absolute_out_put_folder 输出的文件夹的绝对路径# 返回的 任务IDtask_id=SliceFactory.slice(absolute_file_path=Path("D:\\workspace\\Resources\\eclinical_edc_prod_21_20230630025243.sql.gz"),absolute_out_put_folder=Path("YYYYY"))输出的结果YYYYY输出的文件夹cdfe5a8a9811459d9b0a940aa86abd89根据任务 ID 生成的对应文件夹CREATE创建 表单的 SQL 语句INSERT插入 表单数据的 SQL 语句file_list.json生成的文件信息SQL 文件名的格式:{表名}-{uuid}获取 SQL 文件信息# where SQL 文件夹的绝对路径file_list=FileInfoList(where=Path("D:\\aws\\eclinical40_auto_testing\\slicing\\src\\slicing\\XXXX\\89f20cdac717425091fb0fb9220481fe"))文件信息sql_typeCREATE(创建表单) 或 INSERT(插入数据)name文件的全名 {table 或 view 或 index 或 procedure}-{id}table表名iduuidsize文件大小，单位字节noSQL 的顺序编号view视图名procedure存储过程名index索引名operation_object操作的对象获取表名file_list=FileInfoList(where="文件夹的绝对路径")# FileInfoList.CREATE_LIST  创建表单S表名# FileInfoList.INSERT_LIST  插入表单数据的表名# FileInfoList.ALL_LIST     所有创建表单和插入表单数据的表名的交集file_list.table(mode=FileInfoList.CREATE_LIST)根据表名获取 文件信息file_list=FileInfoList(where="文件夹的绝对路径")# FileInfoList.CREATE_LIST  创建表单的SQL# FileInfoList.INSERT_LIST  插入表单数据的SQL# FileInfoList.ALL_LIST     所有创建表单和插入表单数据的所有SQL# 返回的是一个列表sqls=file_list.find("eclinical_crf_item",mode=FileInfoList.ALL_LIST)获取 文件信息详细例子可查看 tests//file_info_examplefile_list=FileInfoList(where="文件夹的绝对路径")# FileInfoList.CREATE_LIST  创建表单的SQL# FileInfoList.INSERT_LIST  插入表单数据的SQL# FileInfoList.ALL_LIST     所有创建表单和插入表单数据的所有SQL# 返回的是一个列表sqls=file_list.lists(mode=FileInfoList.INSERT_LIST)过滤生成针对大的 Dump 文件,只能支持 过滤 Table 名详细例子可查看 tests//big_dump_example# absolute_file_path 读取文件的绝对路径# absolute_out_put_folder 输出的文件夹的绝对路径# reader 指定为# 返回的 任务IDtid=SliceFactory.slice(absolute_file_path=file,absolute_out_put_folder=Path("Result"),reader=DumpReader(tables=["eclinical_study_site"]))通用过滤详细列子可查看 tests//custom_filter_exclude_example,custom_filter_include_example,table_filter_example# absolute_file_path 读取文件的绝对路径# absolute_out_put_folder 输出的文件夹的绝对路径# before_condition 在解析 sql 行前过滤# after_condition 在解析 Sql 行后，生成文件前过滤# PS，指定after_condition 会比较慢, 但是过滤功能最强tid=SliceFactory.slice(absolute_file_path=file,absolute_out_put_folder=Path("Result"),before_condition=DumpTableByteCondition(tables=["eclinical_crf_codelist_item"]),after_condition=DumpTableCondition(tables=["eclinical_crf_codelist_item"]))flowchart LR
    A[before condition 根据文本过滤] --> b[解析 SQL 语句] --> C[after condition 根据属性过滤]Release 1.0.1修改了生成的文件ID和记录的文件ID 不一致的BUG在文件信息中，增加了文件大小信息，单位为字节Release 1.0.2SliceFactory is_valid_folder_name 修改了正则表达式Release 1.0.3修改了writer结束线程的条件Release 1.0.4添加了序号过滤了注释文件修改了若干BUGRelease 1.0.5增加了支持拆分:存储过程,Alter,Update,Delete,Call,TRUNCATE删除了创建语句中自动生成的Drop增加了遗漏为处理的日志快速在大文件中拆分指定表Release 1.0.6增加了/*!mysqlversion ... */ 的支持Release 1.0.7临时增加了对 Linux的路径支持
Package: slick
ContentsIntroductionUsageConfig FileInstallUbuntuRedhatChangelogIntroductionThis tool provides an easy way for users to retrieve their SLCS certificates from a SWITCH SLCS server.UsageUsage:$ slick-init --help
Usage: slick-init [options] [idp]

Options:
  -h, --help            show this help message and exit
  -d DIR, --storedir=DIR
                        find IdP(s) whose name or unique ID contain a
                        specified string
  -f SEARCHSTRING, --find=SEARCHSTRING
                        find IdP(s) whose name or unique ID contain a
                        specified string
  -i IDP, --idp=IDP     unique ID of the IdP used to log in
  -k, --key             prompt for key-passphrase (use Shibboleth password
                        by default)
  -l, --list            list all available IdP(s)
  -s SLCS, --slcs=SLCS  location of SLCS server (if not specified, use
                        SLCS_SERVER system variable or settings from
                        [storedir]/slcs-client.properties
  -w, --write           write the arguments specified on the command line to
                        a config file
  -v, --verbose         print status messages to stdout
  --debug               print alot of messages to stdoutConfig FileThe contents of a simple config file:$ cat ~/slcs-client.properties
[slcs]
idp = VPAC
url = https://slcs1.arcs.org.au/SLCS/loginInstallUbuntuapt-get install python-setuptools python-m2cryptoeasy_install –index-urlhttp://code.arcs.org.au/pypislickRedhatyum install m2crypto python-setuptoolseasy_install –index-urlhttp://code.arcs.org.au/pypislickChangelog1.0 (2009-07-09)Initial releaseUses arcs.gsi to build certificates.Shibboleth support
Package: slick-app
SlickEasy to use secure file sendingSlick makes it easy to send files or chat between two people. It is end-to-end encrypted, and uses HTTPS as its transport.InstallationUsing python 3.7, run:pip install slick-appUsageTo start slick, runsk. Running/helpyou'll get:/list           -- show active friends and nearby people
/add  [subject] -- add a person
/talk [subject] -- talk to someone
/end            -- stop talking to someone
/quit           -- quit the program
/send           -- send a file
/get            -- get a file
/infoAdding a friendTo add a friend, use the/addcommand. They will need to approve the request on their side by adding you back.Interacting with a friendTo interact with a specific friend, use/talk [name]ChattingOnce you're interacting with a friend, anything you type without a leading slash will be interpretted as chatting.Sending a fileTo send a file, use/sendReceiving a fileTo receive a file, use/get #DesignSlick uses multicast DNS to broadcast a) a digest of the certificate used by HTTPS b) a tor service to facilitate the initial key exchange.
Package: slick-bitcoinrpc
Just another Python bitcoin-rpc client.
Built as faster alternative to python-bitcoinlib rpc (https://github.com/petertodd/python-bitcoinlib) and python-bitcoinrpc (https://github.com/jgarzik/python-bitcoinrpc) using pycurl and ujson.Installationpip install slick-bitcoinrpcExamplefromslickrpcimportProxybitcoin=Proxy("http://%s:%s@127.0.0.1:8332"%(rpcuser,rpcpassword))print(bitcoin.getblock(bitcoin.getbestblockhash()))Performance ComparisonMethodHere’s bash script able to measure performance of such bitcoin rpc clientsRPC_URL='http://username:password@127.0.0.1:8332'TASKS=("p.getinfo()""p.getblock(p.getbestblockhash())""map(lambda tx: p.getrawtransaction(tx['txid'], 1), p.listtransactions())")SETUPS=("from slickrpc import Proxy; p = Proxy(service_url='$RPC_URL');""from bitcoinrpc.authproxy import AuthServiceProxy; p = AuthServiceProxy(service_url='$RPC_URL');""from bitcoin.rpc import Proxy; p = Proxy(service_url='$RPC_URL');")forTASKin"${TASKS[@]}"doforSETUPin"${SETUPS[@]}"dopython-mtimeit-s"$SETUP"-n1000"$TASK"donedoneResultsValues are best of 3, msec per loopgetinfo()p.getblock(p.getbestblockhash())map(lambda tx: p.getrawtransaction(
tx[‘txid’], 1), p.listtransactions()slick-
bitcoinrpc1.01 msec1.17 msec27.7 msecpython-
bitcoinrpc2.53 msec3.89 msec41.9 msecpython-
bitcoinlib2.76 msecDeserializationExtraDataErrorAttributeError
Package: slickdeals
A command line tool forSlickdealsDependencyrequestsbeautifulsoupHow to installpip install slickdealspython setup.py installUsageslickdeals [option]Options-f--free: show items free or ship free on frontpage-F--FREE: show items which are free on frontpage-nNUM: limit the number of results-s'search string': search item, quotation marks are required especially when your search string contains spaceExampleshow first 10 free items on frontpage:slickdeals-F-n10search amazon xbox deals:slickdeals-s'amazon xbox'search free amazon deals, show 10 results:slickdeals.py-s'amazon'-f-n10
Package: slickdeals-dbt-spark
dbtenables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.dbt is the T in ELT. Organize, cleanse, denormalize, filter, rename, and pre-aggregate the raw data in your warehouse so that it's ready for analysis.dbt-sparkThedbt-sparkpackage contains all of the code enabling dbt to work with Apache Spark and Databricks. For
more information, consultthe docs.Getting startedInstall dbtRead theintroductionandviewpointJoin the dbt CommunityBe part of the conversation in thedbt Community SlackRead more on thedbt Community DiscourseReporting bugs and contributing codeWant to report a bug or request a feature? Let us know onSlack, or openan issueWant to help us build dbt? Check out theContributing GuideCode of ConductEveryone interacting in the dbt project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow thedbt Code of Conduct.
Package: slickpy
SlickPyA lightweightASGIPython 3.8+ toolkit, optimized for great performance, flexibility and
productivity.InstallpipinstallslickpyOverviewexample.py:fromslickpyimportApp,Writerapp=App()@app.route("/")asyncdefwelcome(w:Writer)->None:awaitw.end(b"Hello, world!")main=app.asgi()Then run the example withuvicorn:uvicornexample:mainSeeexamplesfor more.
Package: slickqa
This library is a python client for accessing and reporting results to Slick.  Slick is an
open source QA result and test manager available fromhttps://github.com/slickqa/slickqaweb.Use is intended to be simple, and explorable.  All the types are defined, and code completion
will be available through most IDEs.  Here is an example of how the library is used:from slickqa import SlickConnection, Project

slick = SlickConnection('http://localhost:8080')

proj = slick.projects.findByName('A Project')
release = slick.projects(proj).releases(proj.defaultRelease).get()

print("The default release for project " + proj.name + " is " + release.name + ".")
Package: slickqa-narc
Narc is a a program that’s primary function is to be an auto-responder to Slick
(http://code.google.com/p/slickqa) events.Although it’s first usage will be for sending emails (or narc’ing on slick),
narc is built to be pluggable and respond to any events in slick.Usage is simple, a command line script is included in the program, simply run
it.  By default it looks for a configuration file in /etc/narc.ini, however
you can customize what configuration file it uses by using the command line
switch of -c or –config and specify a different configuration file.
Package: slickqa-snot
Snot is a nose plugin that will allow results from python unit tests to report to Slick.*OPTIONS:*–slick-urlthe base url of the slick web app [SLICK_URL]–slick-project-namethe name of the project in slick to use [SLICK_PROJECT_NAME]–slick-releasethe release under which to file the results in slick [SLICK_RELEASE]–slick-buildthe build under which to file the results in slick [SLICK_BUILD]–slick-build-from-functionget the slick build from a function.  The parameter should be the module and function name to call [SLICK_BUILD_FROM_FUNCTION].–slick-testplanthe testplan under which to file the results in slick [SLICK_TESTPLAN]–slick-testrun-namethe name of the testrun to create in slick [SLICK_TESTRUN_NAME]–slick-environment-namethe name of the environment in slick to use in the testrun [SLICK_ENVIRONMENT_NAME]–slick-testrun-groupthe name of the testrun group in slick to add this testrun to (optional) [SLICK_ENVIRONMENT_NAME]–slick-agent-namewhat to put in slick’s hostname field in the result.–slick-schedule-resultsSchedule empty results in slick, but do not run the tests–slick-schedule-add-requirementAdd a requirement to all results when scheduling.–slick-schedule-add-attributeAdd an attribute to all results when scheduling.–slick-schedule-new-requiresapply the requires directly on the result as an attribute.–slick-testrun-idInstead of creating a new testrun, use an existing one.–slick-result-idInstead of creating a new result in the testrun, update an existing one.–snot-no-log-captureDon’t capture the logs from the logging framework–slick-organize-by-tagA space delimited list of tag keys to base test run names after. Will be “ - “ delimited.–slick-sequential-testrunUse with slick-schedule-results; schedules an entire testrun to be ran in sequence rather than distributed.–slick-duplicateDuplicate each test x number of times.
Package: slick-siphon
What is this?Make 3rd-party functions capable of hanlding new inputsExamplespip install slick-siphonfromslick_siphonimportsiphonimporttorchfromtorchimporttensor# a new data type that torch.tensor() doesn't know how to handleclassMyCustomContainerStackQueWhatever:def__init__(self,list_items):self.list_items=list_itemsself.other_data="blah blah blah"# wrap torch.tensor with a siphon!# -> when the lambda returns true# -> the function below is run INSTEAD of the original torch.tensor()#    EVEN IN OTHER MODULES@siphon(when=lambdaa_list:isinstance(a_list,MyCustomContainerStackQueWhatever),is_true_for=tensor,)deftensor(a_list):# the siphon redirects args to <- this custom handleractually_a_custom_container=a_listprint("this is the siphoned case!")returntensor(actually_a_custom_container.list_items)## usage!#importtorchtorch.tensor(MyCustomContainerStackQueWhatever([1,2,3]))# >>> "this is the siphoned case!"# >>> torch.tensor([1,2,3])torch.tensor([1,2,3])# >>> "this is the non-siphoned part"# >>> torch.tensor([1,2,3])# extend it again, so it'll accept None as an input (not recommended but its an example)@siphon(when=(lambdaarg1:isinstance(arg1,type(None))),is_true_for=torch.tensor)deftorch.tensor(arg1):returntorch.tensor([])## usage!#torch.tensor(None)# >>> torch.tensor([])torch.tensor(MyCustomContainerStackQueWhatever([1,2,3]))# >>> "this is the siphoned case!"# >>> torch.tensor([1,2,3])torch.tensor([1,2,3])# >>> "this is the non-siphoned part"# >>> torch.tensor([1,2,3])