Saravanan666/pypi-org huggingface dataset:
Package: bruhcolor
bruhcolorbruhcolor is a Python package that allows you to color text in the terminal. It supports both 8-color and 256-color formatting, providing a wide range of colors to choose from. The package is available on PYPI and is licensed under the MIT license.InstallationTo install bruhcolor, you can use pip:pipinstallbruhcolorUsageTo use bruhcolor, simply import thebruhcoloredfunction from the package:frombruhcolorimportbruhcoloredYou can then use thebruhcoloredfunction to color your text. Here's an example:colored_text=bruhcolored("Hello world!",color="red",on_color=194,attrs=["bold","blink"])print(colored_text)This will output the text "Hello world!" in red color, with a background color of 194 and the attributes "bold" and "blink" applied.Available Colorsbruhcolor supports a wide range of colors. You can use either the 8-color or 256-color formatting. Here are some examples of available colors:8-color: black, grey, red, green, yellow, blue, magenta, cyan, light_grey, dark_grey, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan, white256-color: You can use any number between 0 and 255 to specify a color.To see a full list of available colors, you can use thecolorsfunction:frombruhcolorimportcolorscolors(support="full")This will print out all the available colors.Available Attributesbruhcolor also supports various attributes that you can apply to your text. Here are some examples of available attributes:bolddarkitalicunderlineblinkreverseconcealedcrossed-outTo see a full list of available attributes, you can use thevalid_effectsfunction:frombruhcolorimportvalid_effectsvalid_effects()This will print out all the available attributes.Licensebruhcolor is licensed under the MIT License. SeeLICENSEfor more information.
Package: bruin
Bruin CLIA toolbox for UCLA students in various eventsProject published on PyPi:https://pypi.org/project/bruin/Author: Oswald Hezifanhe1202@g.ucla.eduInstallation:pipinstallbruinor download this repo and runpythonsetup.pyinstallSimple Usages:MealPrint today's dining menubruinmealPrint hour of operations:bruinmeal--hour=['','all','De Neve',etc.]Print detail menu:bruinmeal--detail=['Breakfast','Lunch','Dinner']CalendarPrint today's events/classesbruincalendarTasksPrint your remaining tasks:bruintasksAdd a new task (it will pop several prompts):bruintask--addComplete a task and move to review later:bruintask--complete=[%d]Terminate a task (or finish your review):bruintask--terminate=[('t'|'r'|'d')(%d)]Remove a daily recurring tasks:bruintask--remove=[%d]TroubleshootingCannot find certain packages: Make sure you install Python 3.6 or higher and use it throughout your system.ModuleError: No module <module_name>: Check whether the path you are running python is the same as wherepipinstall all the dependencies. The root should be in the output log when you run either commands.ContributeYou can directly create a PR on a branch, but please create an issue first and after we talked about whether this improvement is needed, you can start your development.
Package: bruinen
Bruinen Python SDKWelcome to the Bruinen Python SDK! The SDK makes it easy for you to access the Bruinen API without having to interact with server code directly.The SDK provides three modules to help with accessing Bruinen's API:client: Wrapper around all API endpointsconfirm: Module to enable user confirmation of actions at call timelangchain: Set of out-of-the-box tools for use in LangchainagentsTo install the SDK, runpip install bruinen. For more details on how to use the SDK, visit thedocs.If you have any questions, feel free to join ourDiscordfor access to the team.
Package: brule
Dr. Steve Brule Name GeneratorSimple module that generates names that even Dr. Steve Brule could say correctly (example of Dr. Brule on YouTube)I thought it'd be fun to make my own Python package and publish it to PyPi, so this is the resultIt's kinda handy for making dummy data or other random usecases when you need a list of namesInstallationpip install bruleUsage>>>importbruleasb>>>>>># random name>>>b.full_name()'Franky Rangus'>>>>>># generate based on a name>>>b.full_name('Steve','Brule','male')'Stevie Bringus'Help>>>importbruleasb>>>>>># use built-in `help` utility>>>help(b.full_name)>>>help(b.first_name)>>>help(b.last_name)
Package: brunch
<pre><h1>brunch</h1><b># drive operations</b><article><h2>notes</h2><p>These need access to the the block special file pathwhere the drive is attached.example: /dev/sd----</p><h2>erase</h2><code>[ZSH] brunch erase entirely --drive-path /dev/sd0000 --last-byte-index 31914983423##	It's possible to check with:#[ZSH] xxd -len 20 -seek 31914983420 /dev/sde</code><code>[TCSH] brunch erase entirely --skip-over 2 --drive-path /dev/sd0000 --last-byte-index 31914983423SKIP_OVER = 0	-> SKIPS NOTHINGSKIP_OVER = 1 -> SKIPS FIRST sculptSKIP_OVER = 2 -> SKIPS TO SECOND LOOP</code><h2>concepts</h2>meal: This is the entire span of indexes to be read.plate: This is one span of indexes within the meal.</pre>
Package: brunel
Brunel defines a highly succinct and novel language that produces interactive data visualizations usingpandas DataFrameobjects. The language is well suited for both data scientists and more aggressive business users. The system interprets the language syntax and produces live visualizations directly within Jupyter notebooks.Articles and notes on Brunel can be found in thebrunelvis.orgblog.  Videos are available onYouTube.Details about the language can be found in theBrunel Language TutorialExamples can be found in theBrunel Visualization Galleryand theBrunel Visualization Cookbook.See theRelease Change Logfor new features and changes.Please report any issues on ourGithubsite.  Q&A available onGitterDependenciesBrunel Visualization currently only works in IPython/Jupyter notebooks which must be installed prior to installing Brunel.Java 1.7+must be installedIt is likely that environment variableJAVA_HOMEalso needs to be properly set to the location of the Java installation.Installationpip install brunelNote, if after installing the visualizations are not visible try installing using:pip install brunel--userExampleSample code that reads data from aCSVfile and creates a simple bar chart of averages using the Brunel magic function:import pandas as pd
import brunel

cars = pd.read_csv("data/Cars.csv")

%brunel data('cars') x(origin) y(horsepower) mean(horsepower) bar tooltip(#all) :: width=300, height=300
Package: bruneus
bruneusBigQuery helper library for PythonHow to useSelect from tableimport bruneus
bruneus.select("SELECT * FROM `foo.bar.purchases` LIMIT 20").as_dicts()
bruneus.select("SELECT * FROM `foo.bar.purchases` ORDER BY created_at LIMIT 1", client=bigquery.Client(project="foobar")).first_as_dict()
bruneus.select("SELECT * FROM `foo.bar.purchases` LIMIT 20").to_dataframe()Create table from querybruneus.select("SELECT * FROM `some.source.table`").to_table("foo.bar.new_table")Create temp table from querybruneus.select("SELECT * FROM `some.source.table`").to_table("foo.bar.new_table").expires_in(days=7)Export table to GCS as csvbruneus.export_table("foo.bar.sample").as_csv(gzip=True).to_gcs("my-bucket", "exported-table.csv.gz")Generate random table namebruneus.random_table_name("prefix-here")DevelopmentRun testsdocker compose run bruneus
Package: brunner
wmillThe core client for theBrunnerplatform.UsageBasic UsageThewmillpackage has several methods at the top-level for the most frequent operations you will need.The following are some common examples:importtimeimportwmilldefmain():# Get the value of a variablewmill.get_variable("u/user/variable_path")# Run a script synchronously and get the resultwmill.run_script("f/pathto/script",args={"arg1":"value1"})# Get the value of a resourcewmill.get_resource("u/user/resource_path")# Set the script's statewmill.set_state({"ts":time.time()})# Get the script's statewmill.get_state()Advanced UsageThewmillpackage also exposes theBrunnerclass, which is the core client for the Brunner platform.importtimefromwmillimportBrunnerdefmain():client=Brunner(# token=...  <- this is optional. otherwise the client will look for the WM_TOKEN env var)# Get the current version of the clientclient.version# Get the current userclient.user# Convenience get and post methods exist for https://app.windmill.dev/openapi.html#/# these are thin wrappers around the httpx library's get and post methods# list worker groupsclient.get("/configs/list_worker_groups")# create a groupclient.post(f"/w/{client.workspace}/groups/create",json={"name":"my-group","summary":"my group summary",})# Get and set the state of the scriptnow=time.time()client.state={"ts":now}assertclient.state=={"ts":now}# Run a job asynchronouslyjob_id=client.run_script_async(path="path/to/script")# Get its statusclient.get_job_status(job_id)# Get its resultclient.get_result(job_id)
Package: brunns-builder
brunns-builderTest object builders.SetupInstall with pip:pip install brunns-builder(As usual, use of avenvorvirtualenvis recommended.)UsageTODODevelopingRequirestox. Runmake precommittells you if you're OK to commit. For more options, run:make helpReleasingRequireshub,setuptools,wheelandtwine. To release versionn.n.n, first
update the version number insetup.py, then:version="n.n.n"# Needs to match new version number in setup.py.gitcheckout-b"release-$version"makeprecommit&&gitcommit-am"Release$version"&&gitpush--set-upstreamorigin"release-$version"# If not already all pushed, which it should be.hubreleasecreate"V$version"-t"release-$version"-m"Version$version"pythonsetup.pysdistbdist_wheel
twineuploaddist/*$version*
gitcheckoutmaster
gitmerge"release-$version"
Package: brunns-matchers
brunns-matchersVarious customPyHamcrestmatchers.SetupInstall with pip:pip install brunns-matchers(As usual, use of avenvorvirtualenvis recommended.)DevelopingRequirestox. Runmake precommittells you if you're OK to commit. For more options, run:make helpReleasingRequireshub,setuptools,wheelandtwine. To releasen.n.n:version="n.n.n"# Needs to match new version number in setup.py.gitcheckout-b"release-$version"makeprecommit&&gitcommit-am"Release$version"&&gitpush--set-upstreamorigin"release-$version"# If not already all pushed, which it should be.hubreleasecreate"V$version"-t"release-$version"-m"Version$version"pythonsetup.pysdistbdist_wheel
twineuploaddist/*$version*
gitcheckoutmaster
gitmerge"release-$version"
Package: brunns-row
brunns-rowConvenience wrapper for DB API and csv.DictReader rows, and similar, inspired byGreg Stein's lovelydtuple module.SetupInstall with pip:pip install brunns-row(As usual, use of avenvorvirtualenvis recommended.)UsageThe basic approach is to create a wrapper object from some kind of description - typically aDBAPI cursor'sdescription, or acsv.DictReader'sfieldnamesattribute - then to use the wrapper'swrap(row)method to wrap each row.wrap(row)returns an object from which you can access the row's fields as
attributes. A couple of simple examples:DB APIcursor=conn.cursor()cursor.execute("SELECT kind, rating FROM sausages ORDER BY rating DESC;")wrapper=RowWrapper(cursor.description)rows=[wrapper.wrap(row)forrowincursor.fetchall()]forrowinrows:print(row.kind,row.rating)csv.DictReaderreader=csv.DictReader(csv_file)wrapper=RowWrapper(reader.fieldnames)rows=[wrapper.wrap(row)forrowinreader]forrowinrows:print(row.kind,row.rating)Attributes names are simply the column names where possible, converted to valid identifiers where necessary by replacing
invalid characters with "_"s, prefixing any leading numerics with "a_", and de-duplicating where necessary by adding
numeric suffixes.DevelopingRequirestox. Runmake precommittells you if you're OK to commit. For more options, run:make helpReleasingRequireshub,setuptools,wheelandtwine. To release versionn.n.n, first
update the version number insetup.py, then:version="n.n.n"# Needs to match new version number in setup.py.gitcheckout-b"release-$version"makeprecommit&&gitcommit-am"Release$version"&&gitpush--set-upstreamorigin"release-$version"# If not already all pushed, which it should be.hubreleasecreate"V$version"-t"release-$version"-m"Version$version"pythonsetup.pysdistbdist_wheel
twineuploaddist/*$version*
gitcheckoutmaster
gitmerge"release-$version"
Package: brunodb
brunodbBrunodb is a lightweight but useful python interface for sqlite and
postgres. It is tailored to data science workflows which are basically
high throughout streaming computation patterns (rather than
transactional patterns).The idea is to use databases instead of files and also do most of your
work in pure python in streaming fashion rather than using batch libraries
like pandas and other data frame libraries. Databases allow for operations
like joins, ordering and simple aggregations without having to put
everything in memory.The idea of the library is part of a strategy
to enable very productive proof of concepts on
local resources (your laptop) which can migrate naturally and painlessly
into production applications without extensive rewrites.
Brunodb can be an efficient solution by itself for moderate data sizes.
Streaming pattern pipelines can be ported to Spark or some
distributed cluster compute system fairly easily.Brunodb frees you from some of the lower level details of dealing with
these python database clients. It gives you any easy and natural way to
schema and load data from either files or streams. It gives you some
shortcuts for doing queries while also allowing you full SQL functionality
when you need it. It makes working on either SQLite or Postgres the same.
And it allows for very fast bulk loads for Postgres by levering
the dbcrossbar library.There are no real dependencies besides sqlite3 which is a standard library
module and pytest for running tests. psycopg2 and a postgres database is needed
to run the interface on postgres. dbcrossbar (easy to install rust library)
is required for doing extremely fast bulk loads of postgres.To installpip install brunodbSeeherefor a demo:Or to run demo:from brunodb import demo
demo()To run tests:python -m pytest testIf you have postgres installed, you can test it as well. You'll need to put
the database password in the POSTGRES_PWD environment variable and have the
usual standards: running on localhost, usual port, user name postgres etc.python -m pytest test_postscriptIf you install dbcrossbar you can do much faster postgres loads.
Around 80X faster.python -m pytest test_postgres_bulk_loadOr run all tests if you have postgres and dbcrossbar installedpython -m pytestThere is a wrapper for either Database class called DBase:For in memory sqlite database:from brunodb import DBase
config = {'db_type': 'sqlite'}
dbase = DBase(config)Or with a file:config = {'db_type': 'sqlite', 'filename': 'path/my_database.db'}
dbase = DBase(config)Or using postgres:config = {'db_type': 'postgres'}
dbase = DBase(config)Or add other config options:config = {'db_type': 'postgres', 'port': 5555, 'password':'foo'}
dbase = DBase(config)First version April 30, 2020Make block=False the default for loading
version='0.1.3'Added Postgres functionality
version '0.2.0'Added dbcrossbar fast bulk loads to postgres making it much
faster than SQlite rather than much slower as before
version '0.3.0'Demo and some cleanup, some aliases added
version '0.3.2'
Package: bruno-image-processing
package_nameDescription.
The package package_name is used to:
processing
- Histogram matching
- Structural similarity
- Resize image
Utils
- Read image
- Save image
- Plot image
- Plot results
- Plot histogramInstallationUse the package managerpipto install package_namepipinstallimage_processingUsagefrompackage_nameimportfile1_namefile1_name.my_function()AuthorBrunoLicenseMIT
Package: brunotest
brunotestA coursework templating and testing engine to consolidate assignment code and ensure robust assignment quality.The idea behind this framework is that it woul allow us to write onlyonesolution code, and then carefully work out stencil around it (in fact, have the stencilgenerated automaticallyfrom the solution code).The idea on how to do this is to useRegiontags in the code, andAll of the templating will be done in a__brunotest__hidden folder (that could be gitignored). The general use case is as follows (we'll say with thefibonacciexample given inexamples):Define our stencil/chaff/solution codeRunbrunotestto run the solution code against thetestsRunbrunotest stencilto run the compiled stencil code against thetestsRunbrunotest [chaff name]to run the compiled chaff code against thetests.Runbrunotest allto run all of the code (solution, stencil, chaffs) against thetests.Ideally, this would also be enhanced by a VSCode extension that could allow you to more easily see the different chaffs/stencil alongside the current document you are editing (maybe similar to how Markdown preview works).Some other considerations/definitions for now:The chaff implementations will be stored in.chafffiles, and:Do not require all of the regions defined in the solution to be overwritten, but regions that are not specified will remain the same.Can (somehow?) define which tests should fail and with what values, likely at the top?This may be somewhat challenging because we have to incorporate failing partial tests, test names, etc.The stencil code will be in asingle.stencilfile in the root directory (error on multiple found).The stencil also does not have to specify every distinct region to overwrite, but those which are not specified will beleft blank.Gradescope Autograder SpecificationsThe gradescope autograder, with the configuration that we use it in, has the following directory structure:/autograder/ # Base Directory
/autograder/student # Student submission
/autograder/solution # Solution code
Package: brushtail
BrushtailA simple way to structure web scraping; using chained functions to express dense workflow simply.In development, with a short roadmap to version 1.BackgroundI find some of the structure of webscraping a little tedious; it can require many repetetive steps, and scripts often need to change as websites change.Thus, a solution which can chain steps together, with a goal of creating more easily disposible (or fixable) scraping scripts.The drawback of chaining things in this fashion is that by connecting many failure points, the overall script may fail easily; but that isn't an issue for my use cases.RoadmapClearer comments and typingCode examples
Package: brusnika-airflow
Brusnika Airflow PackageThis Python package contains a set of frequently used functions for using in DAGs.Table of Contents[Quick Start][Functions]grants_for_tablegenerate_table_name_for_temp_storecreate_empty_table_like_thiscopy_data_between_tablescopy_data_between_tables_without_trancatetable_existsQuick StartInstall the package:pipinstallbrusnika-airflowExample of usage:import brusnika_airflow

tablename = brusnika_airflow.generate_table_name_for_temp_store('temp_tablename')Functionsgrants_for_table(pg_hook, schema, table): Grants privileges to a user on a specific table.generate_table_name_for_temp_store(table_prefix): Generates a temporary table name for storing data temporarily.create_empty_table_like_this(pg_hook, source_schema, source_table, destination_schema, destination_table): Creates an empty table with the same structure as the source table.copy_data_between_tables(pg_hook, source_schema, source_table, destination_schema, destination_table): Truncate data in the destination table. Copies data from the source table to the destination table and then deletes the source table.copy_data_between_tables_without_trancate(pg_hook, source_schema, source_table, destination_schema, destination_table): Copies data from the source table to the destination table and then deletes the source table.copy_data_between_tables_with_deleting_data(pg_hook, source_schema, source_table, destination_schema, destination_table, delete_clause): Delete data in the destination table with use delete_clause condition. Copies data from the source table to the destination table and then deletes the source table.table_exists(pg_hook, schema, table): Checks if a table exists in a given schema.dtypes_for_sql(dataframe, json_columns): Create dtype for dataframe with json.
Package: brutal-ng
brutal-ngis the new generation ofbrutal, an asyc centered chat
bot framework for python programmers written using the twisted framework.brutalhas been created by Corey Bertram at Netflix, its repositoriy
can be found athttps://github.com/Netflix/brutal/brutal-ngis currently maintained and developed by members of the XLC
Team.DocumentationSee documentation ofbrutalcan be found athttp://brutal.readthedocs.orgBackwards compatibilitybrutal-ngtries to be as backwards compatible as possible. The goal is
to be able to replacebrutalwithbrutal-ngand not to be required
to change any plugin you wrote for the older version.TestsBelieve it or not, we do have some tests now. To run them you can execute:nosetests tests/
Package: brute-curvefit
This is a simple script which tries to find the global minima using scipy.optimize.curve_fit as well as a parameter search over the parameter space.
It first generates ntol random models, then selects ntol*returnnfactor best models and does scipy.optimize.curve_fit on all of them. It then returns the best model of them all.
This script improves scipy.optimize.curve_fit in two ways - No need to give initial values and thus getting global minima instead of local minima. And second, it automatically normalize and standardizes the data.FUTURE:ParallelizeUse Genetic algorithm instead of brute-forceUSAGE EXAMPLE:
import brute_curvefit as bf
import numpy as np
import matplotlib.pyplot as plt
def yourfunc(x, A,B,C):
return (x-A)/B +Cparams, error = bf.brute_then_scipy(func=yourfunc, x=np.arange(100), y=np.arange(100)**2, restrict=[[-1000,-1000,-1000],[1000,1000,1000]])
plt.plot(np.arange(100), np.arange(100)**2) #plotting data
plt.plot(np.arange(100), yourfunc(np.arange(100), *params)) #plotting the fitted function
plt.show()
#As simple as that
Package: bruteforceDict
>>> from bruteforceDict import bruteforceDict
>>> a = bruteforceDict(size=4, fileName='res.txt', chars='asd')
>>> a.toFile() # Запись в файл res.txt
>>> arr = []
>>> for i in a.bruteforce():
>>>     arr.append(i) # Заполнение массива
>>> print(*arr)
Package: brutelib
Building something"""
def md5(args): - converts "args" to md5
arg = hashlib.md5()
arg.update(args)
arg.digest()def sha256(args): - converts "args" to sha256
arg = hashlib.sha256()
arg.update(args)
arg.digest()def hexList(args):  - Shows an hash list in md5 and sha256
arg = hashlib.md5()
sha = hashlib.sha256()
sha.update(args)
arg.update(args)
arg.hexdigest()
sha.digest()def crack(): #Cracks hash md5 password and sha256 and normal password ( STRING PASSWORDS )
[...]
"""