Saravanan666/pypi-org huggingface dataset:
Package: sleuth-automation
This library is an object-oriented wrapper for theSLEUTH urban growth model.It will automatically create scenario files from directories
containing data layers and it can run simulations throughMPIandHT-Condor.InstallationYou may install this library and helper scripts using pip.$pipinstallsleuth_automationApplication Programming Interfaceimportsleuth_automationassa# the library must be configured at least with the path to SLEUTHsa.configure(sleuth_path='/opt/sleuth',use_mpi=True,mpi_cores=32)# a directory containing input layers is given to a location instancel=sa.Location('my_location','/path/to/my_location')l.calibrate_coarse()l.calibrate_fine()l.calibrate_final()l.sleuth_predict(end=2050)Command Line InterfaceA single run may be achieved using the includedsleuth_run.pyscript.$sleuth_run.py--sleuth_path/opt/sleuth/\--location_dir/path/to/location/\--location_namemy_location\--mpi_cores40\--montecarlo_iterations50\--predict_end2060This will create scenario files for coarse, fine and final stages of
calibration, extracting parameters from the control_stats.log files,
and run predict.If one wants to predict for several locations, one may group them in a
directory and run them as a batch.  Using thecreate_sleuth_condor_batch.pyone may create a batch run for the
HT-Condor queue management system.$create_sleuth_condor_batch.py--sleuth_path/opt/sleuth/\--region_dir/path/to/locations_group/\--mpi_cores32\--predict_end2060This will create asubmit.condorfile in the locations directory,
setup with the appropiatesleuth_run.pycommands.DocumentationFull documentation athttp://sleuth-automation.readthedocs.io
Package: sleuth-mock
A minimal Python mocking library# Why Sleuth?Most Python projects use mock, which became unittest.mock in Python 3. So why write Sleuth?Firstly, Sleuth has a different take on mocking than Mock does which can essentially be summarised as “mock functions not objects”. Mocking functions is an explicit, readable and predictable thing to do and leads to clean test cases and
loosely-coupled code.Secondly, Sleuth aims to have a simple and expressive API. With Mock sometimes it’s difficult to tell what’s going on
and which arguments you need to pass to mock things as you need. Sleuth breaks mocking functions into a set of clearly
defined use cases:watch: You want to see how a function is called, but not change its behaviour.switch: You want to replace a function with another one for testing.detonate: You want to throw an exception when the function is called.fake: You want to replace the function with another one which returns a particular value when called.# UsageWatch calls with sleuth.watchwith sleuth.watch(“some.path.to.thing”) as mock:result = thing(1, a=2)
self.assertTrue(mock.called)
self.assertEqual(1, mock.call_count)
self.assertEqual([((1,), {a:2})], mock.calls)
self.assertEqual(result, mock.call_returns[0])Replace functions with sleuth.switch…with sleuth.switch(“some.path.to.thing”, lambda x: ‘something’) as mock:thing(1, a=2)
self.assertTrue(mock.called)
self.assertTrue([‘something’], mock.call_returns)Cause functions to throw exceptions with sleuth.detonate:with sleuth.detonate(“some.path.to.thing”, exception=ValueError):try:thing(1, a=2)except ValueError:passOr…with sleuth.detonate(“some.path.to.thing”, exception=ValueError(“Some custom thingy”)):try:thing(1, a=2)except ValueError:passReplace functions with a specific return value with sleuth.fakewith sleuth.fake(“some.path.to.thing”, return_value=1) as mock:thing(1, a=2)self.assertEqual([1], mock.call_returns)
Package: sleuth-pr
_________.__                 __  .__      ____________________ 
 /   _____/|  |   ____  __ ___/  |_|  |__   \______   \______   \
 \_____  \ |  | _/ __ \|  |  \   __\  |  \   |     ___/|       _/
 /        \|  |_\  ___/|  |  /|  | |   Y  \  |    |    |    |   \
/_______  /|____/\___  >____/ |__| |___|  /  |____|    |____|_  /
        \/           \/                 \/                    \/Sleuth PR is a pull request automation application to help developers waste less time in the PR process.Automate merges based on your team's requirementsRun standalone or embed in another Django applicationApache v2 licenseDocumentationQuickstart GuideInstallre2python3.8 -m venv venv && source venv/bin/activatecp config/dev/env.template config/dev/env # and edit with the correct valuespip install -r requirements.txtmake runRelease GuideTag as vMAJOR.MINOR.PATCH (either via the CLI or GitHub UI)Sit back and relax by watching someSleuth TVContributorsDeni1111
Package: slew
An easy to use, multiplatform GUI library. Features include (but not limited to):Backends-based architecture; currently there’s one backend coded in C++ and based on QtSupport for loading interface definitions from XML filesComplete widgets set, including (editable) item based views (Grid, TreeView, etc…)Printing supportGDI classes to draw on top of bitmaps, on widgets, and while printingThis version has been developed and tested on Python 2.7; support for Python 3.x may come in the future.
Package: slf4py
slf4pySimple Logging Facade for Python.How to use# at Terminal$pipinstallslf4py# at example.pyfromslf4pyimportset_logger@set_loggerclassExample:defhi(self):self.log.info("Hello World")e=Example()e.hi()# [INFO] [2022-05-01 11:22:35,493] [example.py:9] Hello World
Package: slff
SLFFProvides a utility suite for SLFF.Usage:fromslff.scoringimportscore_team_eventfromtbapyimportTBAtba=TBA('my tba key')scores=score_team_event(2791,'2019nytr')Currently only supports 2019 scoring.score_team_eventtba: tbapy.TBA: tbapy class that SLFF uses internally; will be removed in future versionteam_number: int: team number (not key)event_key: str: event key to score the team at (Einstein scoring currently unimplemented)score_as_year: Union[int, NoneType] = None: force SLFF to score the event as if it happened in the given year; a value ofNonewill instead score it as the year the event occurred
Package: slfortigate
Installation PreconditionsYou must have a SoftLayer account; if you were not provided with one, or you cannot use the provided credentials to authenticate athttps://control.softlayer.com/, please contact a support person in your group.InstallationThe SL Fortigate tool is a Python module installable from the public PyPI repository,https://pypi.python.org/pypi. If you have a system with an installed, configured copy of the SoftLayer library (https://pypi.python.org/pypi/SoftLayer), you can install the slfortigate package with this command:pip install slfortigateYou can access usage information by invoking the command with the help argument, e.g.:slfortigate –help(Note that recent versions of the HTTP client used by the SoftLayer tool may complain about out-of-date SSL native libraries. For more information about this issue, consulthttps://urllib3.readthedocs.org/en/latest/security.html.)If you do not have a suitable Linux system or SoftLayer installed and configured, follow the below instructions to provision a system in SoftLayer and configure it.Setting up a Linux system in SoftLayerUse your SoftLayer credentials to provision a Virtual Server (VS) with the SoftLayer control panel athttps://control.softlayer.com/. Please provision a CentOS 7 64bit system. Once provisioned, use SSH to connect to the system and issue the following commands:yum install -y epel-release && yum install -y python-pip python-devel gcc openssl-devel libffi-devel && pip install –upgrade pip && pip install slfortigateConfigure the SoftLayer toolTo configure the SoftLayer command line tool, execute:slcli config setupIf you need to obtain a SoftLayer API key to complete the CLI configuration procedure, consulthttp://knowledgelayer.softlayer.com/procedure/generate-api-key.Once your SoftLayer account is configured you may use the slfortigate tool. To access usage information, invoke slfortigate with the help argument, e.g.:slfortigate –helpCopyrightThis software is Copyright (c) 2015 IBM, Inc.See the bundled LICENSE file for more information.
Package: slg-decorators
Python Package BoilerplateThis is an minimal example of how to publish a python package.You can follow along with theguide.WARNING: do not run apply_custom_naming.py from another directory. It will delete things (potentially).INFO: If no script name is entered, it will delete both the scripts directory and scripts line from setup.pyTo apply a custom name to your package, run:python3 apply_custom_naming.pyIn order for the automated publishing workflow to work on release, you must first add these secrets, as they are not automatically imported from the template:PYPI_USERNAME
PYPI_PASSWORD
Package: slg-dev-ops
Python Package BoilerplateThis is an minimal example of how to publish a python package.You can follow along with theguide.WARNING: do not run apply_custom_naming.py from another directory. It will delete things (potentially).INFO: If no script name is entered, it will delete both the scripts directory and scripts line from setup.pyTo apply a custom name to your package, run:python3 apply_custom_naming.py
Package: slg-ff-helpers
Python Package BoilerplateThis is an minimal example of how to publish a python package.You can follow along with theguide.WARNING: do not run apply_custom_naming.py from another directory. It will delete things (potentially).INFO: If no script name is entered, it will delete both the scripts directory and scripts line from setup.pyTo apply a custom name to your package, run:python3 apply_custom_naming.py
Package: slg-file-operations
Python Package BoilerplateThis is an minimal example of how to publish a python package.You can follow along with theguide.WARNING: do not run apply_custom_naming.py from another directory. It will delete things (potentially).INFO: If no script name is entered, it will delete both the scripts directory and scripts line from setup.pyTo apply a custom name to your package, run:python3 apply_custom_naming.py
Package: slg-nimrod
NimrodDescriptionThis is a repo with minimal tooling, modules, models and recipes to get
easily get started with deep learning training and experimentation with
an emphasis on speech, audio and language modeling.Installyou need python <3.12pipinstallslg-nimrodUsageCheck recipes inrecipes/folder. For instance:gitclonehttps://github.com/slegroux/nimrod.gitcdnimrod/recipes/images/mnist
pythontrain.pydatamodule.num_workers=10trainer.max_epochs=20trainer.accelerator='gpu'headconf/train.yamlAll the parameters of the experiment are editable and read from a .yaml
file which details:data and logging directory pathsdata module with data source path and batching parametersmodel architecturetrainer with hardware acceleration and number of epochscallbacks for early stopping and automatic logging to WandbDockerYou might want to use docker containers for reproductible development
environment or run your project in the cloudmakecontainer
dockerpullslegroux/nimrod
dockerrun-it--rm-p8888:8888slegroux/nimrod/bin/bashYou can also use docker-compose to define services and volumescd.devcontainer
docker-composeup
docker-composedownDeveloppipinstall-e.Authors2023 Sylvain Le Grouxsylvain.legroux@gmail.com
Package: slgs1
# slgs1#### 介绍
推特爬虫打包#### 软件架构
软件架构说明#### 安装教程xxxxxxxxxxxx#### 使用说明xxxxxxxxxxxx#### 参与贡献Fork 本仓库新建 Feat_xxx 分支提交代码新建 Pull Request#### 特技使用 Readme_XXX.md 来支持不同的语言，例如 Readme_en.md, Readme_zh.mdGitee 官方博客 [blog.gitee.com](https://blog.gitee.com)你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目[GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目，是综合评定出的优秀开源项目Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
Package: slg-setup
Python Package BoilerplateThis is an minimal example of how to publish a python package.You can follow along with theguide.WARNING: do not run apply_custom_naming.py from another directory. It will delete things (potentially).INFO: If no script name is entered, it will delete both the scripts directory and scripts line from setup.pyTo apply a custom name to your package, run:python3 apply_custom_naming.py
Package: slg-test-7
Python Package BoilerplateThis is an minimal example of how to publish a python package.You can follow along with theguide.WARNING: do not run apply_custom_naming.py from another directory. It will delete things (potentially).INFO: If no script name is entered, it will delete both the scripts directory and scripts line from setup.pyTo apply a custom name to your package, run:python3 apply_custom_naming.py
Package: slg-utilities
Python Package BoilerplateThis is an minimal example of how to publish a python package.You can follow along with theguide.WARNING: do not run apply_custom_naming.py from another directory. It will delete things (potentially).INFO: If no script name is entered, it will delete both the scripts directory and scripts line from setup.pyTo apply a custom name to your package, run:python3 apply_custom_naming.py
Package: sliceable-dict
sliceable-dictA simple dictionary that support slicing and multiple key selection.Installation and requirementssliceable-dictrequires Python 3.7+ to run and can be installed by runningpipinstallsliceable-dictUsageThe provided classSliceDictis an extended dictionary. It behaves exactly as the
buildindictfor single (hashable) keys, but adds some additional features.
Namely, getting and setting multiple keys at once, slicing with integers and boolean
selection.An example usage:>>>fromsliceable_dictimportSliceDict>>>d=SliceDict(zero=0,one=1)>>>d{'zero': 0, 'one': 1,}# multi-key support>>>d[['two','three']]=2,3>>>d[['one','three']]{'one': 1, 'three': 3}# slicing>>>d[:]{'zero': 0, 'one': 1, 'two': 2, 'three': 3}>>>d[1:-1]{'one': 1, 'two': 2}>>>d[1::2]{'one': 1, 'three': 3}# boolean selection>>>bool_list=[True,False,True,False]>>>selection=d[bool_list]>>>selection{'zero': 0, 'two': 2}# views as for buildin dict>>>kv=selection.keys()>>>kvKeysView({'zero': 0, 'two': 2})>>>list(kv)['zero', 'two']>>>vv=selection.values()>>>vvValuesView({'zero': 0, 'two': 2})>>>list(vv)[0, 2]
Package: sliceable-generator
sliceable-generator: Powerful generator for PythonIn python, generators are designed for one-time use,
zero space complexity, lazy computation collection.However, sometimes we need a lazy computation list,
with the capability to index, slice and reuse,
which is the propose of this package.Installationpipinstallsliceable-generatorUsageSliceable generator aims to provide the same experience as builtin generators, but more powerful.
So, simply wrap the builtin generators is ok.fromsliceable_generatorimportSliceableGeneratorg=SliceableGenerator(range(300,400))foriing[50:53]:print(i)# 350# 351# 352Nested generatorsPay attention that python builtin generators will perform unexpected when nested.
The parent variable will not pass to child generators.g=(((i,j)forjinrange(20,30))foriinrange(10,20))sub1,sub2,sub3=next(g),next(g),next(g)print(list(sub2))# [(12, 20), (12, 21), (12, 22), (12, 23), (12, 24), (12, 25), (12, 26), (12, 27), (12, 28), (12, 29)]print(list(sub1))# [(12, 20), (12, 21), (12, 22), (12, 23), (12, 24), (12, 25), (12, 26), (12, 27), (12, 28), (12, 29)]Sliceable generator will not operate such case, so if you use nested generators,
please manage your generator like such code:g=((lambdai:((i,j)forjinrange(20,30)))(i)foriinrange(10,20))sub1,sub2,sub3=next(g),next(g),next(g)print(list(sub2))# [(11, 20), (11, 21), (11, 22), (11, 23), (11, 24), (11, 25), (11, 26), (11, 27), (11, 28), (11, 29)]print(list(sub1))# [(10, 20), (10, 21), (10, 22), (10, 23), (10, 24), (10, 25), (10, 26), (10, 27), (10, 28), (10, 29)]Thanks to QQ user村长for providing this solution.If provided correct nested generator, wrap it withSliceableGenerator:fromsliceable_generatorimportSliceableGeneratorg=SliceableGenerator(((lambdai:((i,j)forjinrange(20,30)))(i)foriinrange(10,20)),depth=2)print(g[3:5,4:6].to_list())# [[(13, 24), (13, 25)], [(14, 24), (14, 25)]]print(g[3:5,4].to_list())# [(13, 24), (14, 24)]AttentionPay attention that this package provide a low performance generator implementation.
Only when you need both lazy computation and subscript functions,
you can use this package.
Otherwise, use builtin generator expressions instead.ContributionThis is a tiny package and if you want to contribute, just raise a pull request,
and any proposals are welcome!Historyv0.1.2: fix type hint bugv0.1.1: add type hintv0.1.0: finish basic logiclength of generatorreusable generatorsliceable generatorsubscriptable generatornested generator
Package: slice-aggregator
A library for aggregating values assigned to indices by slices>>>importslice_aggregator>>>a=slice_aggregator.ixs_by_slices()>>>a[-5]+=1>>>a[10]-=2.5>>>a[-10:]-1.5and the other way around>>>importslice_aggregator>>>a=slice_aggregator.slices_by_ixs()>>>a[:-5]+=1>>>a[-10:10]-=2.5>>>a[-10]-1.5Read the docsto find out more!Installationpipinstallslice-aggregator
Package: slice-a-portion
slice-a-portionget the i/n slice of a sequenceInstallationInstall this library usingpip:pipinstallslice-a-portionUsageThere are two functions>>> from slice_a_portion import slice_by_coefficients, slice_by_portionslice_by_coefficients(sequence: Sequence, start: Optional[float] = None, end: Optional[float] = None)
        Return the slice between the coefficients `start` and `end`
        between 0 and 1.
        
        Corner elements may be repeated in consecutive slices.
        
        >>> slice_by_coefficients(abc", 0, 0.333)
        'a'
        >>> slice_by_coefficients("abc", 0.666, 1)
        'c'
        >>> slice_by_coefficients("abcd", 0, 0.499)
        'ab'
        >>> slice_by_coefficients("abcd", None, 0.499)
        'ab'
        >>> slice_by_coefficients("abcd", 0.5, 1)
        'cd'
        >>> slice_by_coefficients("abcd", 0.5)    # until the end
        'cd'slice_by_fraction(sequence: Sequence, i: int, n: int)
       Split a sequence in `n` slices and then return the i-th (1-indexed).
       The last slice will be longer if the sequence can't be splitted even-sized or
       n is greater than the sequence's size.
       
       >>> from slice_a_portion import slice_by_fraction
       >>> slice_by_fraction("abcdefghi", 1, 2)
       'abcd'
       >>> slice_by_fraction("abcdefghi", 2, 2)
       'efghi'
       >>> slice_by_fraction("abcdefghi", 1, 3)
       'abc'
       >>> slice_by_fraction("abcdefghi", 2, 3)
       'def'
       >>> slice_by_fraction("abcdefghi", 3, 3)
       'ghi'        
       >>>DevelopmentTo contribute to this library, first checkout the code. Then create a new virtual environment:cdslice-a-portion
python-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: slice-bin
python-sliceInstallInstallslice-binfrom PyPI, which will installsliceas a command line tool.pipinstallslice-binUsageAssuming stdin is split on a newline and put into an array,
the output can be filtered by Python's slice notation.$seq1012345678910$seq10|slice34$seq10|slice3:45678910$seq10|slice3:545$seq10|slice-3:8910$seq10|slice:3123$seq10|slice:-31234567$seq10|slice::213579$seq10|slice::-2108642
Package: slicecap
Installpython setup.py installUsageThe below is an example to slice a pcap file into 10 files.slicecap -r source.pcap -n 10 -- "cat - > dest-{SLICE_ID}.pcap"The-ror--infileoption specifies input pcap file to slice.
Stdin is not acceptable becauseslicecapwill change file handle
pointer using theseek()method.The-nor--numberoption specifies the total number of sliced
pcap files. This default value is 2.The-gor--maxgapoption specifies the maximum time difference
(in seconds) used to compare packet timestamps to find the pcap pkthdr
boundary. The default value is 3600.The-por--paralleloption specifies the maximum number of
parallel subprocesses. The default value is automatically determined
based on the number of cores of the host node. It doesn’t make sense to
specify a larger value than the number of cores.After the--option, you can specify a subprocess to process the
sliced pcap data. In the above example, the sliced data will just
redirected into files. In the subprocess definition, you can use the
following keywords that are replaced dynamically when executed. Since
the replacement will be done by the Python text formatting function, you
can specify formatting rules using the standard Python text formatter
syntax.OFFSET: The file offset value in bytes.SIZE: The size of the sliced pcap data.SLICE_ID: The ID number (begins from 0) of the sliced file.Bug ReportsPlease submit bug reports or patches through the GitHub interface.AuthorKeiichi SHIMA / IIJ Innovation Institute Inc. / WIDE project
Package: sliced
slicedsliced is a python package offering a number of sufficient dimension reduction (SDR) techniques commonly used in high-dimensional datasets with a supervised target. It is compatible withscikit-learn.Algorithms supported:Sliced Inverse Regression (SIR)[1]Sliced Average Variance Estimation (SAVE)[2]Documentation / Website:https://joshloyal.github.io/sliced/ExampleExample that shows how to learn a one dimensional subspace from a dataset with ten features:fromsliced.datasetsimportmake_cubicfromslicedimportSlicedInverseRegression# load the 10-dimensional datasetX,y=make_cubic(random_state=123)# Set the options for SIRsir=SlicedInverseRegression(n_directions=1)# fit the modelsir.fit(X,y)# transform into the new subspaceX_sir=sir.transform(X)InstallationDependenciessliced requires:Python (>= 2.7 or >= 3.4)NumPy (>= 1.8.2)SciPy (>= 0.13.3)Scikit-learn (>=0.17)Additionally, to run examples, you need matplotlib(>=2.0.0).InstallationYou need a working installation of numpy and scipy to install sliced. If you have a working installation of numpy and scipy, the easiest way to install sliced is usingpip:pip install -U slicedIf you prefer, you can clone the repository and run the setup.py file. Use the following commands to get the copy from GitHub and install all the dependencies:git clone https://github.com/joshloyal/sliced.git
cd sliced
pip install .Or install using pip and GitHub:pip install -U git+https://github.com/joshloyal/sliced.gitTestingAfter installation, you can use pytest to run the test suite via setup.py:python setup.py testReferences:[1]: Li, K C. (1991)
“Sliced Inverse Regression for Dimension Reduction (with discussion)”,
Journal of the American Statistical Association, 86, 316-342.[2]: Shao, Y, Cook, RD and Weisberg, S (2007).
“Marginal Tests with Sliced Average Variance Estimation”,
Biometrika, 94, 285-296.
Package: sliced-prediction
sliced-predictionInstallation & Use# Install sliced-prediction>pipinstallsliced-prediction

>sliced-prediction--helpExamplesliced-prediction\--overlap_width_ratio0\--overlap_height_ratio0\--slice_width1024\--slice_height1024\--input_directory./tests/data\--output_manifest_file./tmp/manifest.jsonl\--model_path./tmp/best.pt\--confidence_threshold.2\--devicecpu