Saravanan666/pypi-org huggingface dataset:
Package: regent
A Python framework to allow untrusted users to perform privileged system tasks.OverviewRegent comes in two parts:a service which runs as the privileged system user, defines a set of operations it
will perform, and listens for requests on a linux socket filea client library to ask the service to perform the operationsA service is intended for use with clients on a single host. Alternatively its socket
can be mounted within a docker container to control its host or other containers.The authentication system is designed on the assumption that the unprivileged user is
untrusted and can be compromised. For non-harmful operations a basic shared key will
deter casual attackers, and for more high-risk commands it supports out-of-channel
activation, to allow two-factor authentication or administrator approval.ExampleA service which defines a system command (whoami) and returns its output:import subprocess

from regent.service import Operation, Service


class WhoAmI(Operation):
    def perform(self):
        value = subprocess.check_output("whoami")
        value = value.strip()
        return value


service = Service(
    socket_path="/tmp/regent-whoami.sock",
    socket_secret="123456",
)
service.register("whoami", WhoAmI)
service.listen()A client which calls the service:from regent.client import Client

client = Client(
    socket_path="/tmp/regent-whoami.sock",
    socket_secret="123456",
)

response = client.request("whoami")
print(response["data"])More complicated examples can be found in theexamplesdir, including:make changes to the firewallrestart the serverImplementationTesting your service manuallyRegent uses human-readable JSON, terminated in a newline. Usingsocat:socat - UNIX-CONNECT:/tmp/my-regent.socksend the following, ending in a UNIX-style newline (\n):{“secret”: “123456”, “op”: “my-op”}and you’ll receive your response:{"error": "something failed"}Internal messaging APIThis is the raw API between the client and service. Knowledge of this will not be
required in normal Regent use if you’re using a client.A connection to the service API should send a JSON object with the following
key/values:secret          Socket secret
op              Operation name
data            Optional: Data for the operationThe service will return either:error           Error messageorsuccess         True
uid             Unique ID for this operation request, or null if complete
data            Data from the operation or pending async authJSON objects should be terminated with a newline.If the original operation requires an asynchronous authentication step, the
client should send the following JSON object:secret          Socket secret
uid             UID for a stored operation request (passed from async auth)
data            Data for authenticating the auth requestChangelog0.1.0 - 2022-11-19First release of Python version rewritten from original Perl
Package: regeorg
reGeorgFork of regeorg to include support for python2 and python3 and to have
proper socks4 and socks5 support. Since original regeorg is not actively
maintained, this fork is born._____   ______  __|___  |__  ______  _____  _____   ______
 |     | |   ___||   ___|    ||   ___|/     \|     | |   ___|
 |     \ |   ___||   |  |    ||   ___||     ||     \ |   |  |
 |__|\__\|______||______|  __||______|\_____/|__|\__\|______|
                    |_____|
                    ... every office needs a tool like GeorgInstallationYou can install it via pip:pip install regeorgQuick usagePlace tunnel script from tunnels subdirectory somewhere on the webserver and issue
following command locally:reGeorgSocksProxy.py -p 1080 -u http://upload.sensepost.net:8080/tunnel/tunnel.jspNow, you can browse and pivot using socks4/socks5, for example:curl -x socks5://127.0.0.1:1080/ http://192.168.1.1DependenciesreGeorg works with both Python 2.7 and Python 3.x and the following modules:[urllib3] - HTTP library with thread-safe connection pooling, file post, and more.Usageusage: reGeorgSocksProxy.py [-h] [-c] [-l] [-p] [-r] [-s] -u  [-v]

Socks server for reGeorg HTTP(s) tunneller

optional arguments:
  -h, --help           show this help message and exit
  -c , --creds         Credentials for basic authentication as user:pass
  -l , --listen-on     The default listening socks address
  -p , --listen-port   The default listening socks port
  -r , --read-buff     Local read buffer, max data to be sent per POST
  -s , --ssl           check TLS/SSL certificate
  -u , --url           The url containing the tunnel script
  -v , --verbose       Verbose output[INFO|DEBUG]Step 1.Upload tunnel.(aspx|ashx|jsp|php) to a webserver (How you do that is up to
you)Step 2.Configure you tools to use a socks proxy, use the ip address and port you
specified when
you started the reGeorgSocksProxy.py** Note, if you tools, such as NMap doesn't support socks proxies, use
[proxychains] (see wiki)Step 3.Hack the planet :)Example$ python reGeorgSocksProxy.py -p 8080 -u http://upload.sensepost.net:8080/tunnel/tunnel.jspLicenseMITMore agents/tunnelsList of tunnels / agent compatible with this releaseReGeorGo - regeorg in Go:https://github.com/kost/regeorgooriginal regeorg tunnels :https://github.com/sensepost/regeorgReferencesReferences to original tool, similar tools and forksoriginal regeorg:https://github.com/sensepost/regeorgRefactored regeorg (not compatible with this):https://github.com/L-codes/Neo-reGeorgpivotnacci - tool inspired by the reGeorg:https://github.com/blackarrowsec/pivotnacciCreditsThis fork is maintained by@k0st.Original by:@_w_m__@trowalts@kamp_staaldraadTools:urllib3proxychains
Package: regex20200220
regex20200220regex的20200220版本安装包安装方式下载此项目，进入项目根目录，执行如下命令安装：pythonsetup.pyinstall使用pip进行安装pipinstallregex20200220
pipinstall-Ugit+https://github.com/q759729997/regex20200220.git@master# 使用git安装Python包操作当前用户根目录下创建.pypirc，配置pypi信息[distutils]index-servers=pypi[pypi]repository:https://upload.pypi.org/legacy/
username:name
password:xxxx打包上传pythonsetup.pysdistbdist_wheel# 打包twineuploaddist/*.whl--verbose# 将打包后的whl上传# Linux下文件改为：manylinux2010
Package: regex2csv
regex2csvThis script is a python utility that matches the capture groups of a defined regex within a file and puts it into csv format for easy viewing.Author: @marcolongolInput:regex2csv.py <regex> <file>Output: csv format of the regex capture groups consisting of the line number, capture group name, and the capture group value for each line in the fileExample:python regex2csv.py "(?P<word1>\w+):(?P<word2>\w+)" "test.txt"Example Output:line,word1,word2
1,hello,world
2,foo,bar
3,foo,bar
Package: regex2dfa
regex2dfa=========[![Build Status](https://travis-ci.org/kpdyer/regex2dfa.svg?branch=master)](https://travis-ci.org/kpdyer/regex2dfa)This is a command-line utility that converts a regular expression to a DFA.* **input**: A perl-compatible regular expression, as defined by re2 [1].* **output**: An AT&T DFA [2], which accepts an equivelent language to the input regular expression.### References* [1] https://code.google.com/p/re2/* [2] https://openfst.org/Building--------This utillity requires standard build tools: autoconf, make, gcc, etc.Once you have your developement environment setup:```$ ./configure$ make$ ls bin/regex2dfa```Example Usage-------------### Command-line```$ ./bin/regex2dfa -r "^(a|b)*$"0	0	97	970	0	98	980``````$ ./bin/regex2dfa -r "^(a|b)+$"0	1	97	970	1	98	981	1	97	971	1	98	981```### C++ API```C++#include "regex2dfa.h"...std::string input_regex = "^(a|b)*$";std::string minimized_dfa;bool success = regex2dfa::Regex2Dfa(input_regex, &minimized_dfa);std::cout << minimized_dfa << std::endl;...```will output```0       0       97      970       0       98      980```
Package: regex4seq
Welcome to RegEx4SeqThis is a python library that implements regular-expression based pattern matches for sequences of arbitrary objects. For example you can write pattern to determine if a list is a sequence of alternating 1's and 0's like this:fromregex4seqimportItem,Items# The core is a repetition of alternating 0s and 1s. But we need to# account for the pattern starting on a 1 or finishing on a zero.# Analogous to the regex /1?[01]*0?/.pattern=Item(1).optional()&Items(0,1).repeat()&Item(0).optional()pattern.matches([1,0,1,0,1,0,1])# Truepattern.matches([1,0,1,0,1,0,0])# FalseTo learn more about the library, go tothe documentationpage on ReadTheDocs.
Package: regex-as-re-globally
regex-as-re-globallyThis package does very unusual things, and you normally don't need it.
It helps you use the "regex" package which is a backwards-compatible replacement forre, with additional features and better performance in some situations (and worse performance in others).
Normally you can putimport regex as rein your .py files and that's all you need.However, if you want to useregexinstead ofreacross your whole environment, even within 3rd-party libraries, then this package is for you.Runpip install regex-as-re-globallyto install this package.
It will create a .pth file in site-packages which modifiessys.modulesso thatregexis usedeverywhereinstead ofre.This changes behavior within the whole python environment.The wheel files generated are platform and python specific due to the limitations of wheel files, where the relative directory for site-packages needs to be determined at wheel building time, not install time. The directory is dependent on the version of python and the platform you are on.The site-packages .pth technique is heavily inspired byhttps://github.com/dougn/coverage_pthandhttps://nedbatchelder.com/blog/201001/running_code_at_python_startup.htmlThanks!
Package: regex-build
regex-buildBuild complex one-line regex strings.The preferred way of building is using a one line chain of calls on theRegexBuildinstance.
For anything more complex, using it as a context manager will allow for multiple calls to be made on the same instance.Instances ofRegexBuildmay be used interchangeably with strings, allowing for multiple nested instances to be used.>>>original_regex=r'.*\\Roaming\\(Microsoft|NVIDIA|Adobe\\.*(Asset|Native)Cache)\\'# Complex example>>>withRegexBuild(r'.*\\Roaming\\')asbuild_regex:...build_regex(...'Microsoft','NVIDIA',RegexBuild(r'Adobe\\.*')('Asset','Native')('Cache'),...)(r'\\')>>>original_regex==str(build_regex)True# Different ways to build the same regex>>>withRegexBuild('(?i)',exit='$')ascase_insensitive:...# As one line...case_insensitive('prefix1_')('word1','word2')('_suffix1')......# As context managers...withcase_insensitive('prefix2_')asprefix:...withprefix('word2','word3')aswords:...words('_suffix2')......# As context manager using the "end" parameter...withcase_insensitive('prefix3_',end='_suffix3')asprefix:...prefix('word4')...prefix('word5')...>>>case_insensitive'(?i)(prefix1_(word1|word2)_suffix1|prefix2_(word3|word4)_suffix2|prefix3_(word5|word6)_suffix3)$'
Package: regexbuilder-py
RegexBuilder: A functional wrapper for RegEx in Python.Installationpython-mpipinstallregexbuilder-py# orpython-mpipinstallgit+https://github.com/AaravMalani/regexbuilderUsageprint(RegEx().start()\.string('http')\.chars('s').modify(Modifiers.ZERO_OR_ONE)\.string('://')\.group(RegEx().chars('a-zA-Z0-9')\.modify(Modifiers.ONE_OR_MORE)\.chars(r'.'))\.modify(Modifiers.ZERO_OR_MORE)\.chars('A-Za-z0-9').modify(Modifiers.ONE_OR_MORE)\.chars('.')\.chars('A-Za-z').modify(Modifiers.ONE_OR_MORE)\.group(RegEx().string('.')).build())# $(?:http)[s]?(?:://)([a-zA-Z0-9]+[.])*[A-Za-z0-9]+[.][A-Za-z]+((?:.))
Package: regex-cleaner
Regex CleanerThis is a simple python package that can be used to clean a verbose regex pattern of the comments and new lines and return the basic underlying pattern.Installationpython-mpipinstallregex-cleanerUsageTo clean a regex pattern, simply pass the verbose pattern string to the functionclean_regex.fromregex_cleanerimportclean_regexpattern=r"""\w\d{3}# Matches any letter followed by 3 digits."""cleaned_regex=clean_regex(pattern)print(cleaned_regex)\w\d{3}It should be noted that the pattern is cleaned by removing all comments from the string, then removing any whitespace left in the pattern.This means that if you are using whitespace to represent space characters in your pattern they will be trimmed out.importregex_cleanerpattern=r"""\w* # Any letter repeated zero or more times.[. ] # Full stop followed by a space."""cleaned_pattern=regex_cleaner.clean_regex(pattern)print(cleaned_pattern)\w*[.]TestingTests can be run usingpytestortox. To test, clone down the repository and from the root of the repository do eitherpython-mpytestorpython-mtox
Package: regex-crossword
Regex CrosswordTerminal Freaks rejoice!Based on theRegex Crossword, this is an implementation written in pure python using only the standard library to play the game offline entirely from your shell.If you aren't familiar with the concpet of a regex crossword, it's a blank crossword grid that you need to fill so that each row and column will match the specified regex. It's a fun exercise to your regex abilities and an interactive way to learn about them  and practice while playing.I'm a bit of a terminal freak myself and so the moment I started playing the wonderful online version it seemed so natural to me that there needs to be a version of the concept playable from the shell, so I made one using nothing but Python'scursesmodule.InstallationUse the Python package managerpipto installregex_crossword.pipinstallregex_crosswordTo install the scraper functionality as well (more on this below) use:pipinstallregex_crossword[scraper]Note: the scraper uses the Selenium 3rd party package that might need extra setup to be used (specifically the Chrome WebDriver). If you encounter any problems I advise you to check out theirinstallation guide.UsageOnce installed in your environment, simply typeregex_crosswordfrom your terminal and start playing!Loading level packsWhen the game starts it will attempt to load "level packs" for it to use. It looks for them in the following places in descending order:First, it will look wherever the--level-packsoption was pointing when invoking the game command (for a full list of all commands use the-hor--helpflag).If no option was specified, it will look wherever theREGEXCW_LEVEL_PACKSenvironment variable is pointing, if it exists.Lastly and by default, it will search for a directory calledlevel_packsin the current working directory.If all of this fails (or the directory has no packs), an error will pop up informing you no level packs were found.Getting level packsWhen trying to get level packs you have several options:Use the--scrapeflag (this requires you to install thescraperextra). This will scrape some online resources and create level packs based on them for you to load into the offline version.Create your own level packs!Creating your own level packsLevel packs are simply JSON files who follow this format:[{"title":"Beatles","up_to_down":["[^SPEAK]+","EP|IP|EF"],"left_to_right":["HE|LL|O+","[PLEASE]+"],},{"title":"Pisco Sour","up_to_down":["(MA|LM)","[^MESH]+"],"left_to_right":["[LINE]+","[LAM]+"],"right_to_left":["[ISLE]+","[MALE]+"],"down_to_up":["[LAME]*","[^LES]+"]},]The main file json is a list of smaller dictionaries who each implement a "level" format:title- the title of the level.up_to_down- the regexes who will attempt to match the columns from top to bottom (specified from left to right)left_to_right- the regexes who will attempt to match the rows from left to right (specified from top to bottom)down_to_up- same asup_to_downbut will attempt to match the columns from bottom to top.right_to_left- same asleft_to_rightbut will attempt to match the rows from right to left.LicenseMIT
Package: regex-custom-dict
RegexCustomDictRegexCustomDictis a Python class that extends the built-indictclass, allowing you to access dictionary keys using regular expressions.FeaturesAccess dictionary keys using regex patterns.Flatten nested dictionaries into a single level for easy access.Installationbash or windowspip install regex_custom_dict==0.5Usagefrom regex_custom_dict.regex_custom_dict import RegexCustomDict

# Create an instance of RegexCustomDict
my_dict = RegexCustomDict(x={'sde': {'6': 4}}, y=4, xx={'sde': 2, 'sq': 3}, xxx=6.8)

#Alternate - you can even convert a normal_dict into a regex_custom_dict
my_dict = RegexCustomDict(**normal_dict)

# Access keys using regex pattern
result = my_dict['x+']
# The output will be a dictionary containing values of the keys that match the provided regex pattern, mapped with predefined keys.

#To flatten the output.
result = my_dict['x+'].flatten_dict()

#you can also use multiple hierarchies(keys)
my_dict['x+']['s+']

It will flatten out the values and give as a list if your pattern matches multiple keys.
Package: regexdict
# regexdict## 关于regexdict 是一个使用正则表达式查询单词的网站，使用mongodb对正则表达式的支持实现，另外附带了一个不使用数据库的python实现。demo:http://regexdict.com/## 目录介绍1. ./ChangeLog.txt :变更历史
1. ./LICENES.txt :协议
1. ./MANIFEST.in :文件清单，distutils默认只打包指定模块下的.py文件,其它的要在这里指定
1. ./README.md :项目介绍
1. ./requirements.txt :项目需要依赖哪些模块
1. ./setup.py :安装文件
1. ./docs/ :文档目录
1. ./docs/analysis.model.md :概要设计文档
1. ./docs/design.model.md :详细设计文档
1. ./docs/maintain.md :维护文档
1. ./src/ :源码目录
1. ./src/regexdict : 项目代码
1. ./src/regexdict/stuff :杂项文件，在setup.py里用package_data参数指定
1. ./test/ :测试目录
1. ./test/run_all_test.sh :执行test目录下的所有单元测试
1. ./test/test_regexdict.py :测试示例
Package: regex-dictionary
regex-dictionaryPython type to use regex as keys in dictInstallpipinstallregex-dictionaryUsage>>> from regex_dictionary import RegexDict
>>> d = RegexDict({"simple_key": "simple_value", "regex_key.*": "simple_value"})
>>> d["simple_key"]
'simple_value'
>>> d["regex_key_some_stuff"]
'simple_value'
>>> d.get("regex_key_some_stuff", "default")
'simple_value'
>>> d.get("some_stuff_regex_key_some_stuff", "default")
'default'
>>> for k, v in d.items():
...     print(k, v)
...
re.compile('^simple_key$') simple_value
re.compile('^regex_key.*$') simple_value
Package: regex-engine
Regex EngineAn awesome package to generate regexRead DocumentationReport Bug·Request FeatureTable of ContentsAbout the ProjectCoded With LanguageGetting StartedPrerequisitesInstallationUsageRoadmapContributingLicenseContactAcknowledgementsAbout The ProjectGenerating regex can sometimes be complicated. That is why we are introducing this package to help you get things done.Supported functionalities :Regex Generation for Numerical RangeWhat does each functionalities do?1. Regex Generation for Numerical RangeGenerate regex given a numerical range, So when given a new number between this range the regex will match.Person who has motivated me to start this repository is listed in the acknowledgments.Coded With LanguagePython 3.6Getting StartedSimply install the package, import it in your python code and run the method needed.
Look at the docstring or source code to understand what is happening.PrerequisitesPython 3.6 or greaterInstallationpipinstallregex-engineUsage1. Regex Generation for Numerical RangeYou get what you give :If given numbers are integers you get a regex that will only match with integer and if floating-point numbers are given it only match with floating-point number.Supports integer and floating-point numbers. It can even be a negative range.fromregex_engineimportgeneratorgenerate=generator()regex1=generate.numerical_range(5,89)regex2=generate.numerical_range(81.78,250.23)regex3=generate.numerical_range(-65,12)Example regex generated for 25-53^([3-4][0-9]|2[5-9]|5[0-3])$The regex might not be optimal but it will surely serve the purpose.The problem of checking a number is within a range might have been simple if you didn't choose the regex path.if a <= your_input_number <=bwould have simply solved the same problem.We dedicate this method in the package to the people who are pursuing a different path or thinking out of the box.RoadmapSee theopen issuesfor a list of proposed features (and known issues).ContributingContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make aregreatly appreciated.Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License. SeeLICENSEfor more information.ContactRaj Kiran P -@raj_kiran_p-rajkiranjp@gmail.comGitHub :https://github.com/raj-kiran-pWebsite :https://rajkiranp.comAcknowledgementsAshwin Rajeev
Package: regexer
regexerSimplify working with regex.Examples:>>>Regexer([r"(?P<num>\d+)")("Test01 string sentence02")['num']['01','02']>>>RegexerString("Test01 string sentence02")[r"(?P<num>\d+)",'num']['01','02']>>>RegexerString("Test01 string sentence02")[r"(?P<num>\d+)",1,'num']'02'>>>RegexerString("Test01 string sentence02")/r"\w\d{2}"['Tes',' string sentenc']>>>RegexerString("Test01 string sentence02")-r"\d"'Test string sentence'
Package: regexexercises
Python re(gex)? exercisesThis TUI application is intended to help you practice Python regular expressions. There are more than 100 exercises covering both the builtinreand third-partyregexmodule.ScreenshotGuideSeeapp_guide.mdVideo demoYou can view a video demo here:https://youtu.be/0oXPeF8HutQLicenseCode snippets are licensed underMIT LICENSEExercise questions and associated files (likequestions.json) are licensed underCreative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Package: regexf
regexfregexf -h
usage: regexf [-h] [-v] [-s SECTION] [-f FILE] [patterns [patterns ...]]

Compare input patterns to regexf patterns in a regexf.ini file

positional arguments:
  patterns              regexf pattern (e.g. regexf -v aa/bb/cc vac/myvac1/1)

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         increase output verbosity using -v,-vv
  -s SECTION, --section SECTION
                        Specify section (default='default')
  -f FILE, --file FILE  Specify regexf file (default=/usr/local/bin/regexf.ini)
                        e.g. regexf -f ~/myregexf.ini vac/bb/ccWeb sites:http://www.scadat.org/regexf.html