Saravanan666/pypi-org huggingface dataset:
Package: bodo-jupyterlab
bodo_jupyterlabA JupyterLab extension for use on the Bodo Cloud Platform.The extension has two components: a frontend component (see files insrc) and a server component (see files inbodo_jupyterlab).RequirementsJupyterLab >= 3.0InstallTo install the extension, execute:pipinstallbodo_jupyterlabUninstallTo remove the extension, execute:pipuninstallbodo_jupyterlabContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.You also need to first install our fork of remote-ikernel:https://github.com/Bodo-inc/remote_ikernelsudochownbodo:bodo-R/opt# Make sure you have nodejs installed.# If you don't have mamba installed: conda install -c conda-forge mamba.mambainstall-cconda-forgenodejs=16.12# Clone the repo to your local environment# Install package in development modepipinstall-e.# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmrunbuild# Enable itjupyterserverextensionenablebodo_jupyterlab
jupyterlabextensionenablebodo_jupyterlabYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmrunwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm run buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstallbodo_jupyterlabIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namedbodo-jupyterlabwithin that folder.Packaging the extensionSeeRELEASE
Package: bodo-magic
Bodo IPython MagicThe Bodo IPython Magic is used to write simpler Python code withbodo. For example, you can take the following code:importbodoimportpandasaspd@bodo.jitdeftest():returnpd.read_parquet('sample.pq')df=test()and (using the%%bodomagic) convert it to:%%bodoimportpandasaspddf=pd.read_parquet('sample.pq)Why a Magic?When presentingbodo, we like to use very simple examples like loading a CSV file, performing some simple operations, and so on. However, these cases generally look longer and more compilected in comparison to competing solutions likepyspark,dask,ray, and so on. This magic is intended to target these issues.Arguments%bodo [-v] [-c] [-d] [-o [OUTPUTS [OUTPUTS ...]]]

optional arguments:
  -v, --verbose         Print Verbose and Debugging Info
  -c, --cache           Enable Caching on the Wrapped Function
  -d, --dry-run         Do Not Execute Any Code or Wrapper Function
  -o <[OUTPUTS [OUTPUTS ...]]>, --outputs <[OUTPUTS [OUTPUTS ...]]>
                        Variables to Output from the Wrapped Function (default: Returns All Defined Variables)Supported FeaturesInsertsimport bodoautomaticallyImportsAutomatically adds the@bodo.jitdecorator to any function in the code cell
Package: bodo-platform-dummy-kernel
bodo-platform-dummy-kernelbodo-platform-dummy-kernelis a simple IPython Kernel that displays a warning before executing commands.
Intended for use on the Bodo Platform as the default kernel installed on notebook instances.Inspired byecho_kernel.InstallationTo installbodo-platform-dummy-kernelfrom PyPI::pip install bodo-platform-dummy-kernel
python -m bodo_platform_dummy_kernel.installWhen installing inside a conda environment or virtualenv (recommended), do::pip install bodo-platform-dummy-kernel
python -m bodo_platform_dummy_kernel.install --sys-prefix
Package: bodo-platform-ipyparallel-kernel
bodo-platform-ipyparallel-kernelbodo-platform-ipyparallel-kernelis a simple IPyParallel based wrapper around IPython Kernel
for use on the Bodo Platform.Inspired byecho_kernel.InstallationTo installbodo-platform-ipyparallel-kernelfrom PyPI::pip install bodo-platform-ipyparallel-kernel
python -m bodo_platform_ipyparallel_kernel.installWhen installing inside a conda environment or virtualenv (recommended), do::pip install bodo-platform-ipyparallel-kernel
python -m bodo_platform_ipyparallel_kernel.install --sys-prefix
Package: bodotokenizer
Bodo TokenizerAbout:Bodo is one of the scheduled languages of India and belongs to the Tibeto-Burman branch of the Sino-Tibetan language family. It uses a Devanagari script like other Indian languages such as Hindi, Konkani, Maithili, Marathi, Nepali, Sanskrit, Sindhi, and Dogri. However there are some differences, this python library tokenizes Bodo sentences into its tokens that is useful for NLP tasks.Prerequisite:Python 3.6+Installation:From sourcegitclonehttps://github.com/bodonlp/bodo-tokenizer.gitcdbodo-tokenizer
pythonsetup.pyinstallorpipinstallbodotokenizerAvailable functions:# Tokenize single sentencefrombodotokenizerimporttokenizetokenize(sentence)# Tokenize sentences from a file# Suitable for tokenize sentences in parallel corpusfrombodotokenizerimporttokenize_filetokenize_file(input_file,out_file)Usage:frombodotokenizerimporttokenizesentence="नोंसिनि फरायसालियाव य'गा फोरोंगुरु दङ नामा?"tokenized_sentence=tokenize(sentence)# Output: Tokenized Sentence# "नोंसिनि फरायसालियाव य'गा फोरोंगुरु दङ नामा ?"
Package: bods-client
bods-clientA Python client for the Department for Transport Bus Open Data Service APIInstallationpipinstallbods-clientExampleGTFS RTAll the vehicle locations for vehicles in a geographical location can be obtained
using theget_gtfs_rt_data_feedmethod with a bounding box.frombods_client.clientimportBODSClientfrombods_client.modelsimportBoundingBox,GTFSRTParams# An API key can be obtained by registering with the Bus Open Data Service# https://data.bus-data.dft.gov.uk/account/signup/>>API_KEY="api-key">>bods=BODSClient(api_key=API_KEY)>>bounding_box=BoundingBox(**{"min_latitude":51.26,"max_latitude":51.75,"min_longitude":-0.54,"max_longitude":0.27,})>>params=GTFSRTParams(bounding_box=bounding_box)>>message=bods.get_gtfs_rt_data_feed(params=params)>>message.entity[0]id:"421354378097713049"vehicle{trip{trip_id:""route_id:""}position{latitude:51.712860107421875longitude:-0.38401100039482117bearing:170.0}timestamp:1614396229vehicle{id:"7214"}}This returns agoogle.transit.gtfs_realtime_pb2.FeedMessageobject. More details about
General Transit Feed Specification Realtime Transit (GTFS-RT) can be foundhere.SIRI VMVehicle locations are also provided in the SIRI-VM XML format using theget_siri_vm_data_feedmethod. The data can then parsed using an xml
parser library such aslxml.frombods_client.clientimportBODSClientfrombods_client.modelsimportBoundingBox,Siri,SIRIVMParams>>API_KEY="api-key">>client=BODSClient(api_key=API_KEY)>>bounding_box=BoundingBox(**{"min_latitude":51.267729,"max_latitude":51.283191,"min_longitude":-0.142423,"max_longitude":0.177432,})>>params=SIRIVMParams(bounding_box=bounding_box)>>siri_response=client.get_siri_vm_data_feed(params=params)>>siri=Siri.from_bytes(siri_response)>>siri.service_delivery.vehicle_monitoring_delivery.vehicle_activities[0]VehicleActivity(recorded_at_time=datetime.datetime(2022,1,31,19,48,24,tzinfo=datetime.timezone.utc),item_identifier="05fc46f3-9629-4336-9a8d-f397030f5891",valid_until_time=datetime.datetime(2022,1,31,21,5,21,997139),monitored_vehicle_journey=MonitoredVehicleJourney(bearing=135.0,block_ref=None,framed_vehicle_journey_ref=None,vehicle_journey_ref="447183",destination_name="BEDDINGTON (ABELLIO LONDON)",destination_ref=None,orgin_name=None,origin_ref="40004410084D",origin_aimed_departure_time=datetime.datetime(2022,1,31,19,53,tzinfo=datetime.timezone.utc),direction_ref="1",published_line_name="407",line_ref="296",vehicle_location=VehicleLocation(longitude=-0.077464,latitude=51.282658),operator_ref="TFLO",vehicle_ref="16085",),)Details about the SIRI specification can be foundhere.LicenseMIT
Package: bodybuilder
bodybuilderAn (almost!) drop in replacement in python of theElasticsearch Bodybuilder Package on NPMThe API has been designed to be as close to the original package.Also, you can usehttps://bodybuilder.js.org/to test your constructions with minor changes described below:Variationsfrom->from_becausefromis a python keywordneed\new-line indicator for multi line incantations in python which is not necessary in JSindividual Filter/Query/Aggregations classes not implemented (shouldn't affect user)lambda functions instead of anonymous functions (Duh!)InstallationInstall from sourceClone package locallyGo to the root directorypython3 setup.py installUsagefrombodybuilder.builderimportBodyBuilderasbodyBuilderbodyBuilder().query("a","b","c").build(){'query': {'a': {'b': 'c'}}}Not ImplementedTo be implementedminimum_should_match query and filteraggregation metadataNo plans to implementComplicated multi sortclonemethod (users can usecopy.deepcopy()if required)orQuery,andQuery,notQuerywhich has been deprecated n favor ofboolmethodCreditsThanks toDanpazandcontributors of the original packagefor the original package from which I have liberally copied (with his permission!)
Package: bodyjim
bodyjimcomma bodygymnasium environment API.InstallationTo installbodyjimrun the following command:pip install bodyjimPackage requires comma body with comma three/threex running openpilot 0.9.6 or newer.UsageJust like othergymnasiumenvironments,bodyjimis easy to use. BaseBodyEnvaccepts ip address of the body, list of cameras to stream (valid values:driver- driver camera,road- front camera,wideRoad- front wide angle camera) and list of cereal services to stream (list of services).Environment'sstepmethod accepts action in x, y direction coordinates and retrieves next observation in form of a dict with latest camera frames and cereal messages (structure definitions) received so far. Additional info dictionary contains information about message creation timestamps and validity (which are None, if they haven't been received yet).frombodyjimimportBodyEnvbody_address=...# body ip address, pass localhost if running locally on the bodyenv=BodyEnv(body_address,["driver"],["accelerometer","gyroscope"],render_mode="human")env.reset()# action coordinates assuming the front is the screen-facing side# x-axis: Forward (negative) / Backwards (positive)# y-axis: Left (positive) / Right (negative)action=(1.0,0.0)# (x, y)obs,reward,done,truncated,info=env.step(action)# obs  = { "cameras": { "driver": np.ndarray }, "accelerometer": {...}, "gyroscope": {...} }# info = { "times": <dict_of_ns_timestamps_for_each_service>, "valid": <dict_of_message_validity_for_each_service> }driver_image=obs["camera"]["driver"]# nd.ndarrayaccelerometer,accelerometer_t=obs["accelerometer"],info["times"]["accelerometer"]By default body environment always returns reward = 0 and done = False. Subclasses can customize this behavior by overridingrewardandis_donemethods:classCustomBodyEnv(BodyEnv):defreward(self,obs:Optional[ObsType],action:ActType,next_obs:ObsType)->float:# obs - latest observations, action - most recently executed actions, next_obs - observations after executing such action...defis_done(self,obs:Optional[ObsType],action:ActType,next_obs:ObsType)->bool:# same as for reward...BodyEnvsupports two rendering modes for visualization purposes:rgb_array- returns image formed by horizontally stacking frames from each requested camerahuman- displays pygame window with live view from camerasExamplesRepository comes with few examples, showcasing how to use the library.To control the body with wasd:python3examples/wasd.pybody_ip_address[CAMERA...]To perform "random walk":python3examples/random_walk.pybody_ip_address[CAMERA...]To try follow person mode, which uses YOLOv5 to detect and follow the tallest person in the frame:python3examples/follow_human.pybody_ip_address
Package: body-matrix
Human Body Measurement via Video and ImageDemo VideoInstall the Package$ pip install body-matrixPackage Usage#### LOAD VIDEO, Keypoints and Segmentation Model

from body_matrix import load, infer, process, measure, draw, export

video_path = "/content/drive/MyDrive/Body_Matrix/Raw_Vids/vinmart_customers.mp4"
video_rotate = -90
device = "cuda"
font_path = "/content/drive/MyDrive/Body_Matrix/Roboto-Bold.ttf"

keypoints_model, keypoints_transform = load.keypoints_model(device)
segment_model, segment_transform = load.segment_model(device)

video, frame_counts, fps, sample_frame = load.video(
    video_path=video_path, 
    rotate_angle=video_rotate,
    frame_position=1
)

sample_frame


#### Measure and Visualize Every frame
from body_matrix import score
from torchvision.transforms.functional import to_pil_image

measure_frames = []
measures = []

for index, vid_frame in enumerate(video):
    frame = to_pil_image(vid_frame)
    frame = frame.rotate(video_rotate, expand=True)
    height, leg, hip, shoulder, markers = measure.find_real_measures(
        image_frame=frame,
        device=device,
        keypoints_model=keypoints_model,
        keypoints_transform=keypoints_transform,
        segment_model=segment_model,
        segment_transform=segment_transform
    )

    visualized_frame = draw.visualize_measures(
        height, leg, hip, shoulder, markers, 
        frame, font_path
    )

    measure_frames.append(visualized_frame)
    measures.append(height)


mean, median, minim, maxim = score.best_scores(
    measures,
    100, 
    200
)

best_score, frame_index = score.find_nearest(
    measures, 
    median
)

#### Export Instagram Video with Measures
export.generate_instagram_vid(
    vid_name="instameasures_hoangdo.mp4", 
    vid_width = sample_frame.width, 
    vid_height = sample_frame.height, 
    pil_images = measure_frames, 
    stop_index=frame_index, 
    fps=fps, 
    repeat_rate=2, 
    slow_motion_rate=1
)
Package: body-measurements
3D Body MeasurementsThrough this library you can obtain the body measurements of a human body made up of vertices and faces generated by SMPL model.RequirementsPython 3.8+TrimeshInstallationYou can install the package by runningpip install body_measurementsBody MeasurementsA: Height (meters)B: Chest (meters)C: Hip (meters)D: Waist (meters)E: Thigh (meters)F: Outer leg (meters)G: Inner leg (meters)H: Neck-Hip length (meters)I: Shoulder (meters)Weight (Kilos - Pending validation)IMPORTANTWe strongly recommend generate the vertices with 'A' pose of human body to make the measurements to more accurate as possible.To get the 'A' pose throught SMPL model you can set all values of the pose param in zero except the positions 50 and 53, the values of these positions must be 5.6 and -5.6 respectively.
Package: body-organ-analysis
BOA: Body and Organ AnalysisWhat is it?BOA is a tool for segmentation of CT scans developed by theSHIP-AI group at the Institute for Artificial Intelligence in Medicine. Combining theTotalSegmentatorand theBody Composition Analysis, this tool is capable of analyzing medical images and identifying the different structures within the human body, including bones, muscles, organs, and blood vessels.The BOA tool can be used to generate full body segmentations of CT scans:Additionally, the generated segmentations can be used as input to generate realistic images usingSiemens' Cinematic Rendering.CitationIf you use this tool, please cite the following papers:BOA:Haubold, J., Baldini, G., Parmar, V., Schaarschmidt, B. M., Koitka, S., Kroll, L., van Landeghem, N., Umutlu, L., Forsting, M., Nensa, F., & Hosch, R. (2023). BOA: A CT-Based Body and Organ Analysis for Radiologists at the Point of Care. Investigative radiology, 10.1097/RLI.0000000000001040. Advance online publication. https://doi.org/10.1097/RLI.0000000000001040TotalSegmentator:Wasserthal J, Breit H-C, Meyer MT, et al. TotalSegmentator: Robust Segmentation of 104 Anatomic Structures in CT Images. Radiol. Artif. Intell. 2023:e230024. Available at: https://pubs.rsna.org/doi/10.1148/ryai.230024.nnU-Net:Isensee F, Jaeger PF, Kohl SAA, et al. nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nat. Methods. 2021;18(2):203–211. Available at: https://www.nature.com/articles/s41592-020-01008-z.How to run?Set up theenvironment variables.Either use thePACS integrationor thecommand line tool.Notes on PerformanceTo make an estimate on how much power and time is needed to process a study, we used thefollowing tableprovided by the TotalSegmentator. However, for very large series (e.g. 1600 slices 1mm), the performance may be worse and more CPU power may be needed. According to our tests, 16GB of GPU should be sufficient.
Package: boexplain
BOExplain, Explaining Inference Queries with Bayesian OptimizationBOExplain is a library for explaining inference queries with Bayesian optimization. The corresponding paper can be found athttps://arxiv.org/abs/2102.05308.Installationpip install boexplainDocumentationThe documentation is available athttps://sfu-db.github.io/BOExplain/. (shortcut tofmin,fmax)Getting StartedDerive an explanation for why the predicted rate of having an income over $50K is higher for men compared to women in the UCI MLAdult dataset.Load the data and prepare it for ML.importpandasaspdfromsklearn.ensembleimportRandomForestClassifierfromsklearn.model_selectionimporttrain_test_splitdf=pd.read_csv("adult.data",names=["Age","Workclass","fnlwgt","Education","Education-Num","Marital Status","Occupation","Relationship","Race","Gender","Capital Gain","Capital Loss","Hours per week","Country","Income"],na_values=" ?")df['Income'].replace({" <=50K":0,' >50K':1},inplace=True)df['Gender'].replace({" Male":0,' Female':1},inplace=True)df=pd.get_dummies(df)train,test=train_test_split(df,test_size=0.2)test=test.drop(columns='Income')Define the objective function that trains a random forest classifier and queries the ratio of predicted rates of having an income over $50K between men and women.defobj(train_filtered):rf=RandomForestClassifier(n_estimators=13,random_state=0)rf.fit(train_filtered.drop(columns='Income'),train_filtered['Income'])test["prediction"]=rf.predict(test)rates=test.groupby("Gender")["prediction"].sum()/test.groupby("Gender")["prediction"].size()test.drop(columns='prediction',inplace=True)returnrates[0]/rates[1]Use the functionfminto minimize the objective function.fromboexplainimportfmintrain_filtered=fmin(data=train,f=obj,columns=["Age","Education-Num"],runtime=30,)Reproduce the ExperimentsTo reproduce the experiments, you can clone the repo and create a poetry environment (installPoetry). RunpoetryinstallTo setup the poetry environment a for jupyter notebook, runpoetryrunipythonkernelinstall--name=boexplainAn ipython kernel has been created for this environemnt.Adult ExperimentTo reproduce the results of the Adult experiment and recreate Figure 6, follow the instruction inadult.ipynb.Credit ExperimentTo reproduce the results of the Credit experiment and recreate Figure 8, follow the instruction incredit.ipynb.House ExperimentTo reproduce the results of the House experiment and recreate Figure 7, follow the instruction inhouse.ipynb.Scorpion Synthetic Data ExperimentTo reproduce the results of the experiment with Scorpion's synthetic data and corresponding query, and recreate Figure 4, follow the instruction inscorpion.ipynb.
Package: boeygh
website_statsgenerate website reportsWeb-stats is a simple library that allows you to generate website reports in less than 60 seconds , by scraping data frominsites.comonly10requests/ip are allowedyou will have to use proxiesonly60 secondsto generate a reportRequirementspipinstallhtml_to_jsonInstallationpipinstallwebsite_statsUsagefromwebsite_statsimportgenerate_reportgenerate_report('https://www.dafk.net/what/')Output example[{'name':'Overall','rating':'good','value':'6.7'},{'name':'Accessibility','rating':'better','value':'8.3'},{'name':'Experience','rating':'good','value':'5.2'},{'name':'Marketing','rating':'good','value':'5.1'},{'name':'Technology','rating':'better','value':'8.1'},{'name':'Twitter','value':'0.0'},{'name':'Analytics','value':'0.0'},{'name':'Printability','value':'0.0'},{'name':'Freshness','value':'0.0'},{'name':'Meta tags','value':'1.0'},{'name':'Mobile','value':'3.0'},{'name':'Popularity','value':'5.6'},{'name':'Amount of content','value':'7.8'},{'name':'Server behavior','value':'10.0'},{'name':'Page titles','value':'10.0'},{'name':'Headings','value':'10.0'},{'name':'Incoming links','value':'10.0'},{'name':'Images','value':'10.0'},{'name':'Internal links','value':'10.0'},{'name':'URL format','value':'10.0'},{'name':'Domain age','value':'i'}]LicenseMITfree stuff , hell yeah !
Package: bofa-scraper
bofa_scraperBank of America does not currently have a consumer-facing API for requesting
balance and transaction data. The goal of this project is to make personal
data accessible to allow for automated budgeting projects.This project includes a web scraper written inPythonusingSelenium. As such, this project is not capable
of fetching any data that could not be collected by a human in a web browser.Please always take care to secure your account credentials!Getting StartedInstall the package.pip install bofa_scraperInstall FirefoxDownload theGeckoDriverbinary, and add to your PATH.UsageNOTE: API has been reworked since v0Import and initializefrombofa_scraperimportBofAScraper# Import the packagescraper=BofAScraper('YOUR_BankOfAmerica_ONLINE_ID','YOUR_BankOfAmerica_PASSCODE',timeout_duration=5,# Timeout to allow for page loads, defaults to 5sheadless=True,# Optional, defaults to Trueverbose=True,# Optional, defaults to True)scraper.login()# Log inStart scraping# Fetch a list of accounts# Transaction data is not automatically populatedaccounts=scraper.get_accounts()accounts[0].get_name()# See account nameaccounts[0].get_balance()# See account balance# Start a scraping session for an account(scraper.open_account(accounts[0])# Start session.scrape_transactions()# Scrape visible transactions.load_more_transactions()# Load more transactions.scrape_transactions()# Scrape new and re-scrape old transactions.close()# Close session)# Dictionary populated with transactionstransactions=accounts[0].get_transactions()# transaction infotransactions[0].amounttransactions[0].datetransactions[0].desctransactions[0].typetransactions[0].uuidClean upscraper.quit()Security & LicensingThis project is licensed under the GNU General Public License 3.0 (GPLv3).This project is intended for PERSONAL USE ONLY to document/calculate finances.Please take security into account when handling financial credentials.