Saravanan666/pypi-org huggingface dataset:
Package: reservoir-sampling-cli
reservoir-sampling-cli======================A command line tool to randomly sample k items from an input S containing n items.> Reservoir sampling is a family of randomized algorithms for randomly choosing a sample of k items from a list S containing n items, where n is either a very large or unknown number.> --<cite><http://en.wikipedia.org/wiki/Reservoir_sampling></cite>Installation------------pip install -e git+ssh://git@github.com/RyanBalfanz/preservoir-sampling-cli.git#egg=resampUsage-----Show help message$ resamp -husage: Randomly sample k items from an input S containing n items.[-h] [-k NUM_ITEMS] [--preserve-order][infile] [outfile]positional arguments:infileoutfileoptional arguments:-h, --help            show this help message and exit-k NUM_ITEMS, --num-items NUM_ITEMSAn integer number giving the size of the reservoir--preserve-order      Preserve input orderingSample 10 words from /usr/share/dict/words preserving the original order$ cat /usr/share/dict/words | resamp -k10 --preserve-orderParalipomenonfrankalmoignhauntinglyhellionlaniiformlithifysemicollapsiblesniveledstolkjaerreunaloud
Package: resettabletimer
resettabletimerWrapper forthreading.Timerto provide a resettable Timer implementation. Also provides fake timer for testing.UsageResettableTimerfromresettabletimerimportResettableTimerdelay=5# secondsfunction=print# Create resettable timert=ResettableTimer(delay,function,["Hello"],{"end":" timer!\n"})# Starting and canceling work similarly than with threading.Timert.start()# Wait 1-5 seconds# Reset the timert.reset()# Hello should be printed after five secondsFakeTimerfromresettabletimerimportFakeTimert=FakeTimer(2,print,["Hello"],{"end":" timer!\n"})# Starting and canceling work similarly than with threading.Timert.start()# Wait >2 seconds# Nothing happens# Time passage is controlled with pass_timet.pass_time(2)# Hello should be printedTestingCheck and automatically fix formatting with:pycodestyleresettabletimer
autopep8-aaar--in-placeresettabletimerRun static analysis with:pylint-E--enable=invalid-name,unused-import,useless-object-inheritanceresettabletimerRun unit tests:# Run unit testspython3-munittestdiscover-stst/# Run unit tests with coverage analysiscoveragerun\--branch\--sourceresettabletimer/\-munittestdiscover-stst/
coveragereport-m
Package: resetty
Resetty (Reset Password Middleware for Django). Banzai made.This repo will add an automated functionallity into django apps to allow an automated password reset every 90 days (by default) for Staff and Superuser type users.InstallFrom Pypipip install resettySetupOn your settings file:Add the resetty appINSTALLED_APPS += ['resetty']Add the middlewareAdd resetty's middleware after auth's AuthenticationMiddleware'django.contrib.auth.middleware.AuthenticationMiddleware',
# Resetty must be placed after Session and Authentication Middleware
'resetty.middleware.ResetPasswordMiddleware',Add resetty's password validatorIt's preferable if you add it at the top of your auth validatorsAUTH_PASSWORD_VALIDATORS = [
    {
        "NAME": "resetty.auth_password_validators.DoNotReusePasswordValidator",
    },
    # ... other validators below
]RESETTY OPTIONSYou can override resetty's default values in your settings file. The available options are:RESETTY_USER_CATEGORIES_REQUIRING_RESETInspects your user's instance and determines if it needs to reset password based on the user flagsType: listDefault value:['is_staff']Available values:['is_staff'|'is_superuser']that can be combined in the list.RESETTY_RESET_PASSWORD_DELTA_DAYSDelta time in days after last password update where we require a new oneType: intDefault value:90RESETTY_RESET_PASSWORD_URLURL where the user will reset her/his password.Type: stringDefault value:/admin/password_change/RESETTY_REDIRECT_EXCLUDED_PATHSURL paths which the middleware exempts from redirection. This is important to avoid request loopingType: listDefault value:[ "/admin/login/", "/admin/logout/", "/admin/password_change/", "/admin/password_change/done/" ]and any route that matches the patternr'\/?(.+)?\/reset\/?'Last stepSet your local settings and build your container or pip install. Also, run your migrations.Expected behavior after installAll views not included inRESETTY_REDIRECT_EXCLUDED_PATHSwill require you to change your password if haven't. This behavior will be repeated everytime the passwrod expires (RESETTY_RESET_PASSWORD_DELTA_DAYS).
Package: resf
resf - Result FormatterA simple package for displaying calculation results in a textbased tableInstallpipinstallresfpypi pageHow to useBasicsfromresfimport*initRes()# Initializes new TableaddRes('Name',value)# Add a value to the tableaddRes('Name',value,'Unit',precision)# Unit and Precision can be setprintRes()# prints the resulting tableSample 1foo=15bar=123/14initRes()addRes('Foo',foo,'kg')addEmpty()# Add an empty lineaddRes('0 digits of Bar',bar,precision=0)addRes('4 digits of Bar',bar,precision=4)printRes()Output 1+-----------------+----------------+
| Name            | Value [Unit]   |
|-----------------+----------------|
| Foo             | 15.00 kg       |
|                 |                |
| 0 digits of Bar | 9              |
| 4 digits of Bar | 8.7857         |
+-----------------+----------------+All FunctionsinitRes()addRes(name,value,unit='',precision=2)addEmpty()printRes()Usestabulateto generate the table
Package: res-facenet
ResFacenetThis package is intended as anpytorch hubentry point for my trained facenet model on this repokhrlimam/facenet.
This pretrained model can be used for anyone who want to use it for transfer learning or any other applications.This model trained on VGGv2 dataset and tested on LFW dataset and gained 92% accuracy.This work is distributed under MIT license, so I hope you consider the license's policy. Cheers!
Package: res-facenet-khairulimam
ResFacenetThis package is intended as anpytorch hubentry point for my trained facenet model on this repokhrlimam/facenet.
This pretrained model can be used for anyone who want to use it for transfer learning or any other applications.This model trained on VGGv2 dataset and tested on LFW dataset and gained 92% accuracy.This work is distributed under MIT license, so I hope you consider the license's policy. Cheers!
Package: resfeci
ResFeci for ExcelIn it's current state, this package will allow you to quickly split a single Excel sheet into either separate tabs within the same report or into different Excel reports.  For example, if Column 'B' of your Excel report contains "Names" and "Jack" appears in 3 rows and "Jill" appears in 2, then, this will split the report into 2 separate reports (one for only Jack's rows and another for only Jill's rows); alternatively, this will create a new report with tabs entitled "Jack" and "Jill".By default, the script will split the first worksheet. However, the user may select a specific sheet to split through an optional parameter (see below examples).IMPORTANT: Your sheet must contain a header row to function properly!EXAMPLE OF SPLITTING AN EXCEL SHEET BY UNIQUE VALUES IN COLUMN B INTO DIFFERENT REPORTSfrom resfeci import excel_splitexcel_split.split_into_separate_reports(input_report_path= 'PATH_TO_REPORT.xlsx' , column_number_to_split_by=2)EXAMPLE OF SPLITTING AN EXCEL SHEET BY UNIQUE VALUES IN COLUMN B INTO DIFFERENT TABS OF THE SAME REPORTfrom resfeci import excel_splitexcel_split.split_into_new_tabs_of_single_report(input_report_path= 'PATH_TO_REPORT.xlsx' , column_number_to_split_by=2)EXAMPLE OF SPLITTING AN EXCEL SHEET BY UNIQUE VALUES IN COLUMN 'C' OF A WORKSHEET CALLED 'NAMES' INTO DIFFERENT REPORTSfrom resfeci import excel_splitexcel_split.split_into_separate_reports(input_report_path= 'PATH_TO_REPORT.xlsx' , column_number_to_split_by=3, sheet='NAMES')PARAMETER DESCRIPTIONSinput_report_path = the path to the report to be splitcolumn_number_to_split_by = the NUMBER of the Excel column to split by (A = 1, B = 2, C =3, etc.)sheet = OPTIONAL parameter which allows you to enter the name of the specific sheet to split.  By default, the script will split the first worksheet.DEPENDENCIESOpenpyxl, PandasKNOWN ISSUEThe current version of this script does not support transfer of formulas!!
Package: resfo
resforesfo (Reservoir simulator fortran output) is a parser for the output format
used by several reservoir simulators such asopm
flow, such as found in files with
extensions .UNRST, .EGRID, .INIT, etc. and also the corresponding ascii files
with extension .FUNRST, .FEGRID, .FINIT, etc.Installationresfo can be installed with pip:pipinstallresfoGetting startedReservoir simulator output files consist of a sequence of named arrays. resfo
does not interpret the names, but simply give you a tuple of the name and a
numpy array with the read function:import resfo

for kw, arr in resfo.read("my_grid.egrid"):
    print(kw)

>>> "FILEHEAD"
>>> "GRIDHEAD"
>>> "COORD"
>>> "ZCORN"
>>> "ACTNUM"
>>> "MAPAXES"For more information, seethe docs.
Package: resgen
Responsive generatorResponsive images generator is a command line python package that would convert all the images in your folder to responsive ones
in their own designated folder. The main goal of this package is to help developers quickly generate
responsive images in bulk.Image Sizes that would be generatedThe Image sizes that would be generated would be based on the recommendations of thisarticle1920px (For FullHD Screens and up)1600px (For desktops anf tables in portrait mode1366px (Desktop)1024px (1024X768 screens)768px (Useful for 2x 375px mobile screens as well as any device)640px (for smartphones)Installation and updatingUse the package managerpipto install Res like below.
Rerun this command to check for and install  updates .pipinstallresgenUsageMake use you have python installed and Python script has been added toWindows Path,Mac's Pathor Linux PathYou need to run the command in the folder where your image folder would be
For example, in the tree below,  if your image folder is  images, you run the command in root├──root
│├──imagesWhile inside the folder, set the output folder and input folderresgen--input_folder[input_folder]--output_folder[output_folder]or (if you havent added Python/Script to path)python-mresgen--input_folder[input_folder]--output_folder[output_folder]input_folder: The name of the input folder where the images are. Don't use ./input_folder . Just the name onlyoutput_folder: The name of the input folder where you want to save the filesFor Windows: To use this command without adding Python -m as the beginning, Make sure Python Script
is added to your PATH.Refer HereThe command would create folders in the output folder depending on the number of the images you have.├──output_folder
│├──image_1├──image_1_640_.jpeg├──image_1_760_.jpegimage_1_760_.jpeg represent the image with 760px for instanceDemo:resgen--input_folderinput_folder--output_folderoutput_folderContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT
Package: reshadow
Python ShadowCopy Analyzer for Cyber Security Researchers!Medium Link for DevelopersClick hereInstallationPyPi :PyShadowCopyExample Code# List all ShadowCopy
'''
Example Result
ID : {e9a894be-dae7-49cb-9196-b5a22148210b}
Creation Date : 6.11.2022 19:58:20
Shadow Copy Location : \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy7
'''
list = ReShadowCode.VSS_ListShadows()
for shadowlist in list:
    print("ID : " + shadowlist["id"] + "\nCreation Date : " + shadowlist["creation_time"] + "\nShadow Copy Location : " + shadowlist["shadowcopy"] + "\n")
#Create a ShadowCopy
ReShadowCode.VSS_Create()
#Create a pipe/symlink with ShadowCopy() (Ex. \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopyid)
ReShadowCode.VSS_Create_Pipe("C:\\Shadow1", "id")
#Get file list from ShadowCopy
'''
Example Result
Ali
Ali Can Gönüllü
Ali_000_vcRuntimeMinimum_x64.log
Ali_000_vcRuntimeMinimum_x86.log
Ali_001_vcRuntimeAdditional_x64.log
Ali_001_vcRuntimeAdditional_x86.log
All Users
Default
Default User
desktop.ini
Public
TEMP
'''
list = ReShadowCode.VSS_Get_FileList("C:\\Shadow1\\Users")
for files in list:
    print(files)Images
Package: reshape
reshapeThe missing Numpy’s reshape for Python.Free software: MIT licenseDocumentation:https://reshape.readthedocs.io.Features>>> import reshape
>>> for row in reshape.reshape(range(20), 3):
...     print(row)
...
(0, 7, 14)
(1, 8, 15)
(2, 9, 16)
(3, 10, 17)
(4, 11, 18)
(5, 12, 19)
(6, 13, None)
>>>
>>> for row in reshape.reshape("HVNfromPymiVN"):
...     print(row)
...
('H', 'o', 'i')
('V', 'm', 'V')
('N', 'P', 'N')
('f', 'y', None)
('r', 'm', None)TODOUse mypyCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2017-12-01)First release on PyPI.
Package: reshape-helper
Reshape Python helperThis is a Python helper library for the automated, zero-downtime schema migration toolReshape. To achieve zero-downtime migrations, Reshape requires that your application runs a simple query when it opens a connection to the database to select the right schema. This library automates that process with a simple method which will return the correct query for your application. It alsoworks great with Django!Installationpip install reshape_helperUsageThe library includes aschema_querymethod which will find all your Reshape migration files and determine the right schema query to run. Here's an example of how to use it:importschema_queryfromreshape_helper# Run the schema query against your database when you open a new connectiondb.execute(schema_query())By default,schema_querywill look for migrations files inmigrations/, but you can specify your own directories as well:importschema_queryfromreshape_helperquery=schema_query("src/users/migrations","src/todos/migrations",)Usage with DjangoUsing Reshape for zero-downtime migrations with Django is really simple. After installingreshape_helper, update yourapp.pyand add a handler for theconnection_createdsignal. This handler will run the schema query whenever a new database connection is opened:fromdjango.db.backends.signalsimportconnection_createdimportschema_queryfromreshape_helperclassYourAppConfig(AppConfig):defready(self):connection_created.connect(new_connection_handler)defnew_connection_handler(sender,connection,**kwargs):connection.cursor().execute(schema_query())Now your Rails app is ready for use with Reshape. Rather than creating standard Django migrations, you should createReshape migration filesinmigrations/. If you'd prefer to use other folders for your migrations, you can pass them toschema_query():defnew_connection_handler(sender,connection,**kwargs):connection.cursor().execute(schema_query("yourapp/users/migrations","yourapp/todo/migrations"))LicenseReleased under theMIT license.
Package: reshaper
# ReshaperSplits and recombines shapefiles based on lat-long data.## Installationconda install -c conda-forge gdal
pip install reshaper## UsageTo split a state map based on a branch list, use:reshaper state.shp branch.csv output.shp –id branchname –lat lat_col –lng lng_colThis takes 3 arguments:state.shp: path to the original shapefilebranch.csv: path to the CSV file with points data. The output shapefile will
have one shape per row of this fileoutput.shp: path to the output shapefilebranch.csvshould have at least these 3 indicators:–id branchname: indicates that thebranchnamecolumn holds the branch
identifier. The values in this column must be unique–lat lat_col: thelat_colcolumn holds the latitude in degrees–lng lng_col: thelng_colcolumn holds the longitude in degreesThe program splits and re-combines shapes based the following logic:If a state does not have a branch, assign it fully to the nearest branchIf a state has only one branch, assign it fully to that branchIf a state has multiple branches, split it between the branches and assign each broken state to the respective branchThe output shapefile has anidcolumn holding the–idvalue.## ReleaseChange the“version”insetup.pyto“x.x.x”, commit and tag:git commit . -m”Describe features / bug fixes”
git tag -a vx.x.x -m”one-line summary of release”To [distribute](https://packaging.python.org/en/latest/distributing.html), run:rm -rf build dist
flake8 .
python setup.py test
python setup.py sdist bdist_wheel –universal
twine upload dist/*
Package: reshell
Deployment debugging with hacker’s tools.InstallpipinstallreshellUsageOn the host launch receiver with$nc-lvp12345On destination host launch reverse shell:$reshell127.0.0.1:12345(or with env variable instead of argument):$exportRESHELL_TARGET=127.0.0.1:12345$reshellTeamCity Command Line Build Step:virtualenv.env..env/bin/activatepipinstallreshellreshellMake sure you addenv.RESHELL_TARGETto Build Parameters.reshellwill try to connect to it’s target every 10 seconds for 10 minutes.
After 10 minutes it will exit.TerminologySince not all developers are familiar with hacker’s technics,
I’ll briefly describe what is this all about.When you open terminal on your machine, it’slocalshell.When you run SSH to connect to remote machine, it’sremoteshell.When you listen on port on your machine and make remote machine to connect to you, it’sreverseshell.EthicsThis tool isnotusefullforactualhacking.
Since you already have an ability to execute arbitrary code on remote machine,
it won’t buy anything in terms of access.
You just need a shell as anarbitrary code.Reverse benefitsReverse shells have some advantages over remote shells:Bypass firewall- incoming connections are often blocked on unused ports.
Whereas outgoing connections are usually allowed.More secure- instead of inviting everyone to backdoor, reverse shell communicates with single host:portDestination can be unknown- even inaccessible.
It’s the host machine that must be accessible from the destination.
Not the other way around.Background (use case)Imaginecrazyenvironment.
You can deploy Python application tocloudyremote host and have it running.
But you don’t have SSH access and can’t debug it or see startup logs.
Also you don’t know in advance what will be network address of the remote host.But you have a dev machine in the same network, where you are free to run anything:
1. So you launch server on dev machine and deploy reverse shell through regular deployment process.
2. Once the application is deployed, it will connect to the server and turn itself into bash.
3. … You can poke around and figure out what’s wrong …
4. PROFIT!Bonus (Pro tips)ncis not the most convinient shell, you would want to use in day job.
You won’t have access to shortcuts, such as up arrow, or Ctrl-P for previous command.
It doesn’t expand tabs in-place, but does it after command is sent.
For example you could write:$ls/us<TAB>loc<TAB>lils /usr/local/libSpecial caution should be taken when dealing with Keyboard Interrupt.
If you pressCtrl+Cinsidencsession, it will be caught byncprocess
itself and though will not be sent to remote machine.
Instead you can place a signal trap for SIGINT before launchingnc:$trap''INT$nc-lvp12345To sendCtrl+Cto remote machine (to iterrupt current process)
you can use combinationCtrl+V Ctrl+C Return.Ctrl+Vsays bash to send following symbol as-is,
without processing it.Returnis needed to actually send^Ccommand.When finished, terminate remote session with:$exitHistory0.1.0 (2015-02-30)First release on PyPI.
Package: reside-porter
porterTable of ContentsUsageTestInstallationLicenseUsage"""Usage:
porter --version
porter backup  --to=HOST [--exclude=TARGETS] [--include=INCLUDE]
porter restore  --from=HOST [--exclude=TARGETS] [--include=INCLUDE]Options:
--exclude=TARGETS  Comma separated string of target names to exclude (default is to include all)
--include=TARGETS  Comma separated string of target names to include (default is to include all)
"""<path>is the path to a directory containing aporter.jsonfile. This file should contain at least one target
and at least one host. See./config/porter.jsonfor an example. By default all targets in the config file are used,
but this can be overridden by explicitly including or excluding targets by name.Test and linthatch run testhatch run lint:fmtTo get coverage reported locally in the console, usehatch run cov.
On CI, usehatch run cov-cito generate an xml report.Installationpip install porterInstall from local sourceshatch buildpip install dist/porter-{version}.tar.gzPublishPublish to PyPiEnsure you have built a new version of the package:hatch cleanhatch buildThen publish to the test server:hatch publish -r testYou will be prompted to enter yourtest.pypi.orgusername and password.
To test the installation, first run Python in a container:docker run --rm -it --entrypoint bash pythonThen:pip install --index-url https://test.pypi.org/simple reside-porter --extra-index-url https://pypi.org/simpleNow you should be able to runporterfrom the command line and see the usage instructions.If it is working, you can publish to the real PyPi:hatch publishLicenseporteris distributed under the terms of theMITlicense.
Package: residual-anomaly-detector
residual-anomaly-detectorAdd a short description here!DescriptionA longer description of your project goes here...UsageFor a local install,cdto the root of this repository and simply;python setup.py developDocumentationDocumentation should be available athttps://eliavw.github.io/residual-anomaly-detector.AdministrationOpen the foldernote/deployfor notebooks that contain annotated scripts for the different administrative tasks you may want to undertake with this software project.
Package: residuated-binars
Generating Algebraic Structures with IsabelleAttention!If you’re looking for a reproducible example for AITP 2021 paper, find ithere.Attention!The project is inactive.This package serves for generating and validating examples of different algebraic structures usingIsabelle proof assistant.DependenciesMake sure that an installation of Isabelle is on the$PATHHow to InstallThe best way to installresiduated-binarsis to usepip:pip install residuated-binarsAlternatively, one can use Docker:dockerbuild-tresiduated-binarshttps://github.com/inpefess/residuated-binars.gitdockerrun-it--rm-p8888:8888residuated-binarsjupyter-lab--ip=0.0.0.0--port=8888--no-browserFinally, one can run it onBinderHow to UseSeeexamples/residuated-binars-example.ipynb.
Package: residue
Downloads and DocsFull documentation is available onRead the Docs.Built packages are available onPyPI.Source codeis available onGitHub. Feel free to:Create an issueto request a
feature or a report a bug.Fork the repositoryand make
changes to themasterbranch for next release.Send a pull request and pester the maintainer until it’s merged. Make sure
to add yourself toAUTHORSand updateCHANGES.Build Status