Saravanan666/pypi-org huggingface dataset:
Package: bbdl
Download Borneo Bulletin :newspaper:UsageThis only works onPython3:snake:python3 bbdl.pyif you have Python2 and Python3 installed or;python bbdl.pyif you only have Python3 installed.:whale:If you have Docker/podman installed, this can be done easily with a single command line where${pwd}will be the host directory that it will copy its files from the container to:docker run -it --rm -v ${pwd}:/usr/src/app/news docker.pkg.github.com/Anak-IT-Brunei/bb-dl/bbdl:2.0.3DownloadFor the Python Script, find it on the release pagehereFor the Docker Image, find it on Github PackageshereDocumentationSource code for the documenation are in the/docsfolder. Be sure to install the dependencies (at least, mkdocs and mkdocs-custommill via pip) to be able to runmkdocs serveto contribute to the documentations.CreditsDecided to make a Borneo Bulletin download script thanks to Tim's Telegram News Bot for exposing the URL.Feel free to fork and contribute
Package: bbdraw
bbdrawLibrary for drawing labeled bounding boxes / bounding polygonsExample image showing labeled bounding boxes and bounding polygonsBasically, a small wrapper around the python pillow library that
combines drawing boxes and writing labels into one simple function call:corners = [(650, 290), (715, 335)]
image = bbdraw.rectangle(image, corners, text="cactus", color="red")InstallationNeeds python >= 3.5pip3 install bbdrawUsagefrom PIL import Image

import bbdraw

image = Image.open("example.jpg")

# box/rectangle is given by two corners
# either as list of tuples [(x0, y0), (x1, y1)] or flat list [x0, y0, x1, y1]
corners = [(650, 290), (715, 335)]
image = bbdraw.rectangle(image, corners, text="cactus", color="red")

# polygon is given by list of vertices
# either as list of tuples [(x0, y0), (x1, y1), (x2, y2), ...]
# or as flat list [x0, y0, x1, y1, x2, y2, ...]
vertices = [(440, 360), (400, 265), (525, 195), (590, 280), (520, 360)]
image = bbdraw.polygon(image, vertices, text="shrub", color="green")

# use in_place=True to directly draw on the input image, instead of making a copy
corners = [(1080, 350), (1180, 285)]
bbdraw.rectangle(image, corners, text="cactus", color="red", in_place=True)

image.save("example_out.jpg")
Package: bbdr-morpheme
bbdr-morphemebbdr-morpheme is a Python library for distributed morpheme analysis for the AGASA system.InstallationUse the package managerpipto install bbdr-morpheme.pipinstallbbdr-morphemeUsage#showusage[user@dev]$bbdr-morpheme-hContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: bbd-table-parser
Table ParserIntended to be used withpytest_bddfor parsing inline tables from str into dictExample:GivenI have a thingWhenI do stuff:|Heading|Other Heading||to do|Also||more|Other|Theneverything is greatfrompytest_bddimportwhen,parsersfromtable_parser.table_parserimporttable_parser@when(parsers.cfparse('I do stuff:\n{table}'))defverify_date_from_request(table):table_dict=table_parser(table)
Package: bbgun
bbgun moves phpBB forums to WordPress blogs. bbgun pulls a forum entry from
the phpBB database, translates the text (bbCode to strict XHTML), date, and
other fields, and pushes the translated entry into the WordPress database.With bbgun, you can move individual posts, move entire threads, move only
certain users’ posts, map phpBB users to WordPress authors, and specify
WordPress categories for the new entries.
Package: bbhamux
Barebones-HAMUXHAMUXbuilt usingequinox, minimal implementation. A temporary solution as HAMUX is being rebuilt.Build any hopfield network using energy fundamentals. See the originalHAMUX documentationfor explanation.Install: File copyAll logic is in one file:hamux.py. Please copy this file into whatever project you are working on, and modify as needed. You will need to manually install dependencies:pip install equinox jax
pip install pytest # for testsInstall correct version ofjaxlibfor your hardware (e.g., to run on GPUs).Rundemo.ipynbfor an example training on MNIST.Works best with GPUInstall: PipTestsAll basic tests for this package are intest.py.pytest test.pyCitationIf this repository is useful for this work, please cite the following:@inproceedings{
hoover2022universal,
title={A Universal Abstraction for Hierarchical Hopfield Networks},
author={Benjamin Hoover and Duen Horng Chau and Hendrik Strobelt and Dmitry Krotov},
booktitle={The Symbiosis of Deep Learning and Differential Equations II},
year={2022},
url={https://openreview.net/forum?id=SAv3nhzNWhw}
}
Package: bbhash
pybbhashThis is a Python (Cython) wrapper for theBBHash codebasefor buildingminimal perfect hash functions.Right now, this is supporting k-mer-based hashing needs fromspacegraphcats,
using hash values generated (mostly) by murmurhash, e.g. fromkhmer's Nodetableandsourmashhashing.  As such, I
am focused on building MPHF for 64-bit hashes and am wrapping only
that bit of the interface; the rest should be ~straightforward (hah!).I've also added a Python-accessible "values table",BBHashTable, in
thebbhash_tablemodule. This is a table that supports a dictionary-like
feature where you can associate a hash with a value, and then query the
table with the hash to retrieve the value. The only tricky bit here is
that unlike the bbhash module, this table supports queries with hashes
that arenotin the MPHF.Thoughts for further improvement.I would like to be able to use generic Python iterators in the PyMPHF
construction. Right now there is a round of memory-inefficient copying of
hashes, which is bad when you have a lot of k-mers!I would like to be able to save to/load from strings, not just files.I also need to investigate thread safety.UsageUsage of core bbhash functionality:import bbhash

# some collection of 64-bit (or smaller) hashes
uint_hashes = [10, 20, 50, 80]

num_threads = 1 # hopefully self-explanatory :)
gamma = 1.0     # internal gamma parameter for BBHash

mph = bbhash.PyMPHF(uint_hashes, len(uint_hashes), num_threads, gamma)

for val in uint_hashes:
    print('{} now hashes to {}'.format(val, mph.lookup(val)))

# can also use 'mph.save(filename)' and 'mph = bbhash.load_mphf(filename)'.Usage of BBHashTableimport random
from collections import defaultdict
from bbhash_table import BBHashTable

all_hashes = [ random.randint(100, 2**32) for i in range(200) ]
half_hashes = all_hashes[:100]

table = BBHashTable()

# hash the first 100 of the hashes
table.initialize(half_hashes)

# store associated values
for hashval, value in zip(half_hashes, [ 1, 2, 3, 4, 5 ] *20):
   table[hashval] = value
   
# retrieve & count for all (which will include hashes not in MPHF)
d = defaultdict(int)
for hashval in all_hashes:
   value = table[hashval]
   d[value] += 1

assert d[1] == 20
assert d[None] == 100The last for loop can be done quickly, in Cython, usingd = table.get_unique_values(all_hashes)Motivation: the table is a useful way to (just for one hypothetical
example :) store a mapping from k-mers to compact De Bruijn graph node
IDs.  (We use this in several places in spacegraphcats!)CTB Oct 2020
Package: bbhbot
BBHbotA script to find and react to !BBH commands in comments on the Hive blockchain.Please note that this software is in early Beta stage, and that you need to know what you are doing to use it.InstallationFor Ubuntu and Debian install these packages:sudo apt-get install python3-pip build-essential libssl-dev python3-dev python3-setuptools python3-gmpy2Install Python PackagesInstall bbhbot by (you may need to replace pip3 by pip):sudo pip3 install -U bbhbot beem hiveengineConfigure And Run BBHbotFirst clone the Github repository to your home directory:cd ~
git clone https://github.com/flaxz/bbhbotAfter that edit your comment templates using Nano, if you want to change anything, there are 4 comment templates.sudo apt install nano 
cd ~/bbhbot/templates
ls
nano COMMENT-TEMPLATE-1-2-3-4Then edit your configuration file.cd ~/bbhbot
nano bbhbot.configCopy your configuration and comment templates to your working directory.cd ~/bbhbot
sudo cp -R templates /usr/local/bin
sudo cp bbhbot /usr/local/bin
sudo cp bbhbot.config /usr/local/bin
sudo cp run-bbhbot.sh /usr/local/binMake the startup scripts executable.cd /usr/local/bin
sudo chmod u+x bbhbot
sudo chmod u+x run-bbhbot.shCopy the Systemd config to it's directory.cd ~/bbhbot
sudo cp bbhbot.service /etc/systemd/systemReload Systemd and start the bot.sudo systemctl daemon-reload
sudo systemctl start bbhbot.serviceGet status and error messages.sudo systemctl status bbhbot.service
qStop the bot.sudo systemctl stop bbhbot.serviceAs has been stated above this bot is in early Beta and bugs and issues are likely to occur.
Package: bbibbi
It’s a simple service locator that I made for use.Installationpip install bbibbiUsagefrom bbibbi import container, Symbol

SERVICE_SYMBOL = Symbol("SomeService")

class Service:
    def ten(self) -> int:
        return 10

container.register(SERVICE_SYMBOL, Service())

service: Service = container.get(SERVICE_SYMBOL)
assert service.ten() == 10
Package: bbk.smartImage
# Smart Imagefast Smart Image Processing Tools included:1. non-maximum-suppressiondeploy:1. write requirements.txte.g. numpy==1.13.32. write setup.py, please refer to https://pypi.python.org/pypi?:action=list_classifiers to get the format of 'classifires' option in setup.py3. write .pypirc and copy .pypirc into path ~/i.e. the .pypirc record your login information to pypi.org4. run setup.py checkcommand: python setup.py check5. build up python package e.g. smartImagecommand: python setup.py sdist6. upload the python package to pypi.orgcommand: python setup.py sdist upload -r pypi,please note that pre-registeration has been removed in present pypi upload process7. install the costumerized python packagecommand: pip install bbk.smartImage
Package: bblearn
Blackboard Learn API ClientThis project is not endorsed by Blackboard© but developed independentlyDeveloped withtiny-api-clientThis library started as part ofBlackboard Sync, but decided it could be extracted into its own distribution package.fromblackboardimportBlackboardSessionsession=BlackboardSession('http://blackboard.example.com/learn/api/public/v{version}',cookies=...)session.fetch_version()InstallationpipinstallbblearnLicenseThis software is distributed under theGeneral Public License v2, more information available at theFree Software Foundation.
Package: bblib
beambusters librarybeambusters library. It refines the detector center of diffraction patterns.Python versionPython 3.10.5Installationpip install bblibUsageTo utilize the methodsCenterOfMass,FriedelPairs,MinimizePeakFWHMandCircleDetectionit is required to have two configuration dictionaries, one for PeakFinder8 and another one for this library itself. The follow snippet shows the expected structure for both:config={"plots_flag":...,"force_center":{"mode":...,"x":...,"y":...},"search_radius":...,"pf8":{"max_num_peaks":...,"adc_threshold":...,"minimum_snr":...,"min_pixel_count":...,"max_pixel_count":...,"local_bg_radius":...,"min_res":...,"max_res":...},"starting_frame":...,"offset":{"x":...,"y":...},"peak_region":{"min":...,"max":...},"outlier_distance":...,"canny":{"sigma":...,"low_threshold":...,"high_threshold":...},"method":...,"bragg_peaks_positions_for_center_of_mass_calculation":...,"pixels_for_mask_of_bragg_peaks":...,"skip_methods":...,"polarization":{"skip":...,"axis":...,"value":...}}PF8Info={"max_num_peaks":"adc_threshold":"minimum_snr":...,"min_pixel_count":...,"max_pixel_count":...,"local_bg_radius":...,"min_res":...,"max_res":...,"pf8_detector_info":...,"bad_pixel_map_filename":...,"bad_pixel_map_hdf5_path":...,"pixel_maps":...,"pixel_resolution":...,"_shifted_pixel_maps":...}Thepf8_detector_infoparameter is a dictionary containing the detector layout information:pf8_detector_info={"asic_nx":...,"asic_ny":...,"nasics_x":...,"nasics_y":...}Thepixel_mapsparameter is a dictionary containing the pixel maps numpy array:pixel_maps={"x":...,"y":...,"z":...,"radius":...,"phi":...}The methodsFriedelPairs,MinimizePeakFWHMandCircleDetectionneed aplots_infoparameter if you want to save plots:plots_info={"file_name":...,"folder_name":...,"root_path":...}To calculate the refined detector center of raw data frame as a numpy array using the following methods:frombblib.methodsimportCenterOfMasscenter_of_mass_method=CenterOfMass(config=config,PF8Config=PF8Config,plots_info=plots_info)center_coordinates_from_center_of_mass=center_of_mass_method(data=...)frombblib.methodsimportCircleDetectioncircle_detection_method=CircleDetection(config=config,PF8Config=PF8Config,plots_info=plots_info)center_coordinates_from_circle_detection=circle_detection_method(data=...)TheFriedelPairsandMinimizePeakFWHMmethodneed an initial guess for the refined detector center coordinatesinitial_guess = [x_0, y_0]frombblib.methodsimportMinimizePeakFWHMminimize_peak_fwhm_method=MinimizePeakFWHM(config=config,PF8Config=PF8Config,plots_info=plots_info)center_coordinates_from_minimize_peak_fwhm=minimize_peak_fwhm_method(data=...,initial_guess=...)frombblib.methodsimportFriedelPairsfriedel_pairs_method=FriedelPairs(config=config,PF8Config=PF8Config,plots_info=plots_info)center_coordinates_from_friedel_pairs=friedel_pairs_method(data=...,initial_guess=...)Author:Ana Carolina Rodrigues (2021 - )email:ana.rodrigues@desy.de
Package: bbm
bbm📊 Buzzni Batch process Monitor -> BBMInstallationpipinstallbbmExampleloggingfrombbmimportInterval,logging,setup@logging()deftemp_func():return"Hello World"@logging(process_name="custom_name_of_process",interval=Interval.A_DAY)deftemp_func2():return"Hello World"if__name__=="__main__":setup(es_url="your-es-url",index_prefix="your-index-prefix")temp_func()temp_func2()post reportfrombbmimportreporter,setupif__name__=="__main__":# init bbmsetup(es_url="your-es-url",index_prefix="your-index-prefix")# init reporter and send simple messagesreporter=reporter.Reporter(slack_token="your-slack-token",slack_channel_id="your-slack-channel-id")post_response=reporter.post_message(title="title",text="text")ts=post_response["ts"]post_message_to_thread=reporter.post_message(title="title",text="text",ts=ts)# send reportreporter.post_report()Report sampleNeed to check reportFull report (It will be sent as a file at 'need to check report' thread)
Package: bbm92-cw
BBM92_CWThis project is an implementation of the model laid out in[1].The model treats a Continuous Wave (CW) source of photon pairs that are perfectly correlated in time,
and formalises what the expected asymptotic secure key rate (AKR) is if you use them to perform passive BBM92.The package is meant to calculate the optimal brightness, coincidence window and corresponding AKR for a given link loss.Installationpip install bbm92_cwExamplesseehereReferences[1]Neumann et al. (2021).
Phys. Rev. A 104, 02240610.1103/PhysRevA.104.022406
Package: bbndb
BBNDBConfiguration database for BBN Qubit Measurement Framework. Used by both Auspex and QGL as a shared, versioned, means of storing instrument, qubit, and filter configurations. Based on SQLAlchemy framework.Upgrading your channel library to a new versionWe usealembicto facilitate migrations. Examining theurl.sqlalchemyfield inalembic.iniyou can see the database that is being tracked by default.sqlalchemy.url = sqlite:///BBN.sqliteThese do not always work with SQLite due to the inability to alter the tables in certain ways.In the simplest case alembic can be run as follows:bash alembic upgrade headFor information on how to generate your own migrations, please seealembic/README.
Package: bbnotify
DescriptionMonitors activity of buildbot server.Displays status icon in tray iconNotifies on new build completedInstallpip install -e 'git://github.com/aleszoulek/bbnotify.git#egg=bbnotify'UsageUsage: bbnotify.py [options] http://buildboturl/xmlrpc

Options:
  -h, --help            show this help message and exit
  -f, --forward         don't run in background
  -i builder_name, --ignore-builder=builder_name
                        don't display the status of this builderUsing a configuration fileYou can save some of your options in the file ~/.bbnotifyrc in the form[bbnotify]
url=http://buildboturl/xmlrpc
ignore-builders=list of builders to ignore
Package: bbo-acm-traingiu
ACM-trainguiGUI to label frames for training of ACM-dlcdetect, by Arne MonseesInstallationInstall AnacondaStart Anaconda Prompt (Windows) / terminal (linux) and navigate into repository directoryCreate conda environmentconda env create -f https://raw.githubusercontent.com/bbo-lab/ACM-traingui/main/environment.ymlRunningStart Anaconda Prompt (Windows) / terminal (linux) and navigate into repository directorySwitch to environmentconda activate bbo_acm-trainguiRun withpython -m ACM-traingui [options ...]OptionsAssistant modeRun withpython -m ACM-traingui [base data directory].
This starts a GUI in drone mode, for the use by assistants with limited options to influence how the program runs and were it saves. This expects the following file structure:[base data directory]/data/users/{user1,user2,...}/labeling_gui_cfg.py
[base data directory]/users/{user1,user2,...} will be presented in a selection dialog on startup. Marking results will be placed in[base data directory]/users/Master modeRun withpython -m ACM-traingui [configdir] --master.
This starts a GUI in master mode. Only do this if you know what you are doing.Check modeRun withpython -m ACM-traingui [directory of labels.npz] --check [bbo_calibcam calibration npy].
This gives sorted text output of 3d and reprojections errors. Reporjection errors above 5-10px usually indicate errors in labeling and respective frames have to be checked.Join modeRun withpython -m ACM-traingui [configdir of ACM-dlcdetect] --check [multiple directories containing labels.npz files].
This joins all marked labels in the labels.npz files into the labels.npz file in the dlcdetect configuration. Marked labels overwrite existing labels framewise.
Package: bbo-acm-traingui
ACMtrainguiGUI to label frames for training of ACM-dlcdetect, by Arne MonseesInstallation(You do not need to clone this repository.)Install AnacondaStart Anaconda Prompt (Windows) / terminal (linux) and navigate into repository directoryCreate conda environmentconda env create -f https://raw.githubusercontent.com/bbo-lab/ACM-traingui/master/environment.ymlUpdateStart Anaconda Prompt (Windows) / terminal (linux) and navigate into repository directoryUpdate withconda env update -f https://raw.githubusercontent.com/bbo-lab/ACM-traingui/master/environment.yml --prune.RunningStart Anaconda Prompt (Windows) / terminal (linux) and navigate into repository directorySwitch to environmentconda activate bbo_acm-trainguiRun withpython -m ACMtraingui [options ...]OptionsAssistant modeRun withpython -m ACMtraingui [base data directory].
This starts a GUI in drone mode, for the use by assistants with limited options to influence how the program runs and were it saves. This expects the following file structure:[base data directory]/data/users/{user1,user2,...}/labeling_gui_cfg.py
[base data directory]/users/{user1,user2,...} will be presented in a selection dialog on startup. Marking results will be placed in[base data directory]/users/Master modeRun withpython -m ACMtraingui [configdir] --master.
This starts a GUI in master mode. Only do this if you know what you are doing.Check modeRun withpython -m ACMtraingui [directory of labels.npz] --check [bbo_calibcam calibration npy] # to use specified npy or
python -m ACMtraingui [directory of labels.npz] --check [labeling_gui_cfg.py folder] # to use standardCalibrationFile from labeling_gui_cfg.py or
python -m ACMtraingui [directory of labels.npz] --check '-' # or
python -m ACMtraingui [directory of labels.npz] --check # to use backup labeling_gui_cfg.py in labels.npy folder. (Will often fail due to different paths between checker und labeler, as relative pathes are resolved, here).This gives sorted text output of 3d and reprojections errors. Reporjection errors above 5-10px usually indicate errors in labeling and respective frames have to be checked.Join modeRun withpython -m ACMtraingui [configdir of ACM-dlcdetect] --check [multiple directories containing labels.npz files] [--strict].
This joins all marked labels in the labels.npz files into the labels.npz file in the dlcdetect configuration. Marked labels overwrite existing labels framewise.--strictonly merges frames where all cameras have marked points.TODODocument configDocument sketch file (2d sketch of animal. If not presented, 3d wireframe is shown instead)Documentmodel file
Package: bbo-calibcam
calibcamA charuco based calibrator for camera setups (intrinsic and extrinsic parameters), including omnidirectional cameras.First,OpenCV is used for single camera calibration., followed by an initial estimation of camera positions and orientations.
Subsequently, all intrinsic and extrinsic parameters are optimised for reprojection error usingJaxautograd.Seecalibcamlibfor a library for triangualtion, reprojection etc.InstallationWindows(If not already done:)Install AnacondaCreate conda envconda env create -f https://raw.githubusercontent.com/bbo-lab/calibcam/main/environment.ymlSwitch to calibcam environment:conda activate calibcamUsageWindowsFrom[repository]/boards, copy the appropriate board into the calibration video directory and rename toboard.npyOpen Anaconda prompt via Start MenuSwitch to calibcam environment:conda activate calibcamRun the program withpython -m calibcam --videos [LIST OF VIDEOS TO INCLUDE]BBO internal MATLAB use only:Use MATLAB functionmcl = cameralib.helper.mcl_from_calibcam([PATH TO MAT FILE OUTPUT OF CALIBRATION])from bboanlysis_m to generate an MCL file.FormatResultmulticam_calibration.npy/matholds a dictionary/struct with the calibration result. The filed"calibs"holds an array of calibration dictionarys/structs with entries* 'rvec_cam': (3,) - Rotation vector of the respective cam (world->cam)
* 'tvec_cam': (3,) - Translation vector of the respective cam (world->cam)
* 'A': (3,3) - Camera matrix
* 'k': (5,) - Camera distortion coefficientsFor further structure, refer tocamcalibrator.build_result()BoardBesides the videos, each calibration folder (folder of first video) needs to contain a fileboard.npy. For the boards at BBO, files are available in the boards directory of the repository. Else, files must be created, containing a dict with the following entries:* boardWidth: int - number of checkerboard squares
* boardHeight: int - number of checkerboard squares
* square_size_real: float - Absolute edge length of checkerboard squares, unit determines unit of calibration
* marker_size: float - Relative marker size
* dictionary_type: int - Aruco dictionary typeThese values are used to create the board in the following way:board=cv2.aruco.CharucoBoard_create(board_params['boardWidth'],board_params['boardHeight'],board_params['square_size_real'],board_params['marker_size']*board_params['square_size_real'],cv2.aruco.getPredefinedDictionary(board_params['dictionary_type']))
Package: bbo-ccvtools
ccvtoolsIncludes imageio filter and some commandline tools to work with the CCV data format, used by the BBO lab at MPI-NB.InstallationInstall withpip install bbo-ccvtools.UsageImageiofrom ccvtools import rawioto add ccv support to imageio.Command lineCreate a compressed movie withpython -m ccvtools -a convert --quality [quality between 1 and 10, suggestion 7] --fps [your frame rate] [ccv_file]The result will be in the same location with additional extension .mkv.
Alternatively, specify an output file with-o [output file].Specify a frame idx range with--idxrange [startidx] [endidx].
Note that these are python slice indices, so first frame is 0, and--idxrange 10 20would be equivalent to MATLABs 11:20 (sic!).