Saravanan666/pypi-org huggingface dataset:
Package: betting
BettingUtility library to convert between betting odds.Converts to/from:American/Moneyline oddsDecimal oddsFractional oddsImplied probabilityInstallationpip install bettingFunctionsamerican_odds_to_decimal_odds(american_odds: float) -> floatamerican_odds_to_fractional_odds(american_odds: float) -> Tuple[float, float]american_odds_to_probability(american_odds: float) -> floatdecimal_odds_to_american_odds(decimal_odds: float) -> floatdecimal_odds_to_fractional_odds(decimal_odds: float) -> Tuple[float, float]decimal_odds_to_probability(decimal_odds: float) -> floatfractional_odds_to_american_odds(numerator: float, denominator: float) -> floatfractional_odds_to_decimal_odds(numerator: float, denominator: float) -> floatfractional_odds_to_probability(numerator: float, denominator: float) -> floatprobability_to_american_odds(p: float) -> floatprobability_to_decimal_odds(p: float) -> floatprobability_to_fractional_odds(p: float) -> Tuple[float, float]Usagefrom betting import convert

print(f"The implied probability for decimal odds of 3 is {decimal_odds_to_probability(3.)}")
Package: betting-env
betting_envfromIPython.displayimportHTMLimportpandasaspdfrombetting_env.config.localconfigimportCONFIG,DB_HOSTSfrombetting_env.utils.data_extractorimportdata_aggregatorfrombetting_env.betting_envimportBettingEnvInstallpipinstallbetting_envConfigIn order to connect to themongodatabase we require some connection
parameters defined intomlformat and should be read when the library
is loaded. The package will look first under/secrets/config.tomlor
in the environment variableBETTING_ENV_CONFIG. An example ofconfigfile is provided with the package and will be used by default. It is the
user’s responsibility to make sure this file is saved at the right
location if you want to use your own.Simplified betting environmentThe punter starts with$N(N>0) in his Bank account and can use them
to place bets on severalfootballgames.He is offered the option to bet on the 2 main markets:1X2(home/draw/away) andAsian handicap(we focus on the even line) and is
only allowed to place asmall,medium, orbigstake onone and
only oneof the 5 possible selectionshome team win,away team win,
ordraw(1X2case) orhomeoraway(Asian handicap) or skip
the betting opportunity. At each step, the punter is presented with some
information about a game and the associated betting opportunities. If he
decides to bet, he receives arewardthat could bepositive(profit)
ornegative(loss of his stake). His balance is then updated
accordingly and he moves to the next step i.e next game. An episode ends
when the punter goes bankrupt (Balance <= 0) or if no more betting
opportunities are available.Load gamesfixtures=data_aggregator(db_hosts=DB_HOSTS,config=CONFIG,db_host="public_atlas",limit=None)Init environmentenv=BettingEnv(fixtures)max_steps_limit=fixtures.shape[0]Playing random choices# Init RL env.env.reset()# Init done Flag to False.done=False# Init loop counter.i=0# Stops when it is done or when we have bet on all provided games.whilenotdoneandi<max_steps_limit:# Make a step.obs,reward,done,info=env.step(env.action_space.sample())# Increment counter.i=i+1HTML('<img src="./images/img_1.gif">')Playing Medium Stake on Home Team Win (1X2)# Init RL env.env.reset()# Init done Flag to False.done=False# Init loop counter.i=0# Stops when it is done or when we have bet on all provided games.whilenotdoneandi<max_steps_limit:# Make a step.obs,reward,done,info=env.step(2)# Increment counter.i=i+1HTML('<img src="./images/img_2.gif">')
Package: bettyfixer
Betty FixerBetty Fixer is a tool designed to automatically fix coding style issues in C files based on the Betty coding style guidelines. It performs corrections to ensure that the code complies with the Betty style, making it more readable and consistent.FeaturesBetty Style Fixes: Automatically corrects coding style issues following the Betty style guidelines.Vi Script Execution: Runs a Vi script for each fixed file, making it convenient for developers to review and further modify the code.Create header.h: You can now create header file by specifing header file name after flag -H .PrerequisitesBefore using Betty Fixer, ensure you have the following installed:Betty- The Betty linter for C code.Vi Editor- The Vi editor for script execution.Ctags:-sudo apt-get install exuberant-ctagsGetting StartedClone the repository:pipinstallbettyfixerRun Betty Fixer on your C files:bettyfixerfile1.cfile2.c...To create header file run:bettyfixer-H<header_name>.h...Compatibility:The current release ofbettyfixeris optimized for Ubuntu 20.04 LTS (Focal Fossa). We are actively working to expand compatibility to include other Ubuntu releases in future updates. Stay tuned for upcoming releases that will offer support for a broader range of Ubuntu versions.ContributingIf you'd like to contribute to Betty Fixer, please follow these steps:Go to theGithub repositoryFork the repository.Create a new branch for your feature or bug fix.Make your changes and ensure the code style follows the project conventions.Test your changes thoroughly.Create a pull request with a clear description of your changes.Creaters: -@Moealsir@Malazmuzamil98@AhedEisa
Package: betwatch
Betwatch Python SDKThe Betwatch Python SDK allows you to interact with theBetwatch.comAPI to integrate up to date racing price data into your Python applications.DisclaimerThis library is provided on a best-effort basis in order to lower the barrier of entry for accessing the Betwatch API. No guarantees are made for the reliability of this library and development will be ongoing.Installationpip install betwatchUsageSeeexamplesA Betwatch API key is required. Please contactapi@betwatch.comfor more information.
Package: between
BetweenofVCNCfor Python.How to be loved?this is the answer for your question.How to useDate with somebodyInstallBetweenWrite a fun botBe lovedby your loverInstallationSimple.$pipinstallbetweenExampleSimple commands:importbetweenclient=between.Client("YOUR_ID","YOUR_PASSWORD")client.send("Carpe diem!")client.send_sticker()client.send_sticker("85_12")client.send_image("./test.jpg")printclient.get_recent_messages()Simple bot:importbetweendefon_message(ws,message):printmessagedefon_open(ws):ws.send("Hello World!")bot=between.Bot("YOUR_ID","YOUR_PASSWORD",on_open=on_open,on_message=on_message)bot.run_forever()Echo bot:importbetweenclient=between.Client("YOUR_ID","YOUR_PASSWORD")me=client.me.account_idlover=client.lover.account_iddefon_message(ws,message):printmessageifmessage.has_key('p'):ifmessage['p']=='events':foreventinmessage['m']['events']:ifevent['action']=='EA_ADD':msg=event['messageEvent']['message']ifmsg['from']!=me:ifmsg.has_key('attachments'):attachment=msg['attachments'][0]ifattachment.has_key('reference'):# echo imagews.send_image(image_id=attachment['reference'])elifattachment.has_key('sticker'):# echo stickerws.send_sticker(attachment['sticker']['sticker_id'])elifmsg.has_key('content'):# echo messagews.send(msg['content'])bot=between.Bot(client=client,on_message=on_message)bot.run_forever()FeaturesLogin and authenticationSend a messageSend a stickerSend an imageGet recent messagesMessage long pollingGet uploaded image lists (in progress)ScreenshotAuthorsTaehoon Kim /@carpedm20
Package: betwixt
Easily make named infix binary operators in Python.Demo time:# the only useful function in the module
>>> from betwixt import infix_operator

# any function of 2 arguments would do
>>> from fnmatch import fnmatch

# make the binary function into an operator, delimited by `*`
>>> matches = infix_operator('*', fnmatch)

# use it
>>> 'foo.txt' *matches* '*.txt'
True

# other delimiters can be used
>>> matches = infix_operator('|', fnmatch)
>>> 'foo.txt' |matches| '*.txt'
TrueA decorator form can also be used:>>> @infix_operator('|')
... def contains(left, right):
...   return right in left

>>> [1, 2, 3] |contains| 1
True

>>> [1, 2, 3] |contains| 0
FalseFinally,betwixtis provided as a shorter (and, perhaps, more
expressive) alias toinfix_operator:>>> from betwixt import betwixt

>>> @betwixt('*')
... def joining(left, right):
...   return left.join(right)

>>> '_' *joining* ['a', 'b', 'c']
'a_b_c'

>>> split_at = betwixt('//', lambda lhs, rhs: lhs.split(rhs))

>>> 'a_b_c' //split_at// '_'
['a', 'b', 'c']All these example operators and a few more are available in modulebetwixt.examples.The idea was taken fromhttp://code.activestate.com/recipes/384122-infix-operators/and by a
similar C++ hack whose code on the web I cannot find any more, but no
actual code has been stolen.Installationpip install betwixtDocumentationhttps://betwixt.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxCopyright and licenseCopyright (c) 2016-2020 Riccardo Murri <riccardo.murri@gmail.com>This is free software, available under the terms and conditions
of the GNU LGPL – see file LICENSE for details.Changelog1.0.0 (2019-01-31)First release on PyPI.
Package: beunique
beuniqueThis is a basic project for learning how to make the PIP(PyPI) packageTo install the package!On Windows:$pipinstallbeuniqueOn macOS and Linux:$sudopip3installbeuniqueChangelogCheck thechangelog here.Available modules in beunique package is|_beunique|_data_collection|_repeatHow to use:Example 1:frombeuniqueimportdata_collection# instanciate a variable for data_collection class.collector=data_collection()#A url or path is expected, default url is 'https://raw.githubusercontent.com/cs109/2014_data/master/countries.csv'collector.print_head()#Default value of rows is 5.outputCountry  Region
0   Algeria  AFRICA
1    Angola  AFRICA
2     Benin  AFRICA
3  Botswana  AFRICA
4   Burkina  AFRICAExample 2:collector.print_head(3)# Here we are specifying for 3 rows.outputCountry  Region
0  Algeria  AFRICA
1   Angola  AFRICA
2    Benin  AFRICAExample 3:frombeuniqueimportrepeat# instanciate a variable for repeat class.repetitor=repeat()repetitor.print_repeat()#The default word is hello and count is 100.outputhello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello hello 
                hello hello hello hello helloExample 4:repetitor.print_repeat("congrats",10)# Here we are specifying word as congrats for 10 times.outputcongrats congrats congrats congrats congrats 
            congrats congrats congrats congrats congratsLicenseMIT LicenseCopyright (c) 2020Dara Ekanth
Package: bev
Flexible version control for files and folders.InstallThe simplest way is to get it from PyPi:pipinstallbevCheatsheetAdding new filesls# image.png ids.json some-folderbevaddimage.png
ls# image.png.hash ids.json some-folderbevaddids.jsonsome-folder
ls# image.png.hash ids.json.hash some-folder.hashgitaddimage.png.hashids.json.hashsome-folder.hash
gitcommit-m"added new files"Restoring the hashed files and foldersls# image.png.hash ids.json.hash some-folder.hashbevpullimage.png.hash--modecopy
ls# image.png ids.json.hash some-folder.hashbevpullsome-folder.hash--modecopy
ls# image.png ids.json.hash some-folderBrowsing a hashed folderIn this recipe we "expand" the hashed folder and fill it with the hashes of the files it contains.
This is much faster than copying back the entire folder.ls# image.png.hash ids.json.hash some-folder.hashbevpullsome-folder.hash--modehashls# image.png.hash ids.json.hash some-folderlssome-folder# photo.jpg.hash some-text-file.txt.hash nested-folderAfterwards you can add the folder backbevaddsome-folder
ls# image.png.hash ids.json.hash some-folder.hashGetting startedChoose a folder for your repository and create a basic config (.bev.yml):main:storage:/path/to/storage/foldermeta:hash:sha256RuninitbevinitAdd files to bevbevadd/path/to/some/file.json# also can provide several pathsbevadd/path/to/some/folder//path/to/some/image.png... and to gitgitaddfile.json.hashfolder.hashimage.png.hash
gitcommit-m"added files"Access the files from pythonimportimageiofrombevimportRepository# `version` can be a commit hash or a git tagrepo=Repository('/path/to/repo',version='8a7fe6')image=imageio.imread(repo.resolve('image.png'))Or from cli# replace the folder's hash by the hashes of its filesbevpullfolder.hash--modehash# entirely restore the folder (inverse of `bev add folder`)bevpullfolder.hash--modecopy# same for filesbevpullimage.png.hash--modecopyAdvanced usageHere are some tutorials that cover more advanced configuration, including multiple storage locations and machines:Create a repository- needed only at first time setupAdding filesAccessing filesWhy not DVC?DVCis a great project, and we took inspiration from it while designingbev.
However, out lab has several requirements thatDVCdoesn't meet:Our data caches are spread across multiple HDDs - we need support for multiple cache locationsWe have multiple machines, and each of them has a different storage configuration: locations, number of HDDs, their
volumes - we need a flexible way of choosing the right config depending on the machineOften we simultaneously conduct experiments on different versions of the same data - we need easy access to multiple
version of the same dataThe need fordvc checkoutaftergit checkoutis error-prone, because it can lead to situations when the data is
not consistent with the current commit - we need a more constrained relation between data andgitbevsupports all four out of the box!However, if these requirements are not essential to your project, you may want to stick withDVC- its community and
tests coverage is much larger.
Package: beves
bevesbeves is a simple wrapper to send messages with Telegram Bot. Useful to alert on something or to notify when scripts are finished!Table of contentsIntroductionInstallingGetting startedUsageReferencesLicenseIntroductionThis module provides a simple way to send messages with Telegram Bot. Is useful to notify you when scripts are finished.
You can import it into your code or using the command-line utility. In the command-line utility, beves
reads the message data as a parameter or from stdin.InstallingYou can install or upgrade beves with:$pipinstallbeves--upgradeOr you can install from source with:$gitclonehttps://github.com/andremmorais/beves--recursive
$cdbeves
$pythonsetup.pyinstallGetting startedTo use Beves you will need the bot token and the chat_id of the sender.The token can be generated talking with @BotFather on telegram and the chat_id can checked athttps://api.telegram.org/bot<YourBOTToken>/getUpdatesInitialize beves config$beves
Token:xxxxx
ChatID:xxxxxRun from command-line with message data as argv$sleep5&&beves"sleep finished";Run from command-line with message data from stdin$echo"this is a test message"|bevesRun from command-line passing token and chat_id as args$beves-txxxxx-ixxx"this is a test message"Importing into your codefrombevesimportBevesbot=Beves()bot.push('test')If you dont have the configuration you will need to pass them as arguments:frombevesimportBevesbot=Beves('token','chat_id')bot.push('test')Usageusage:beves[-h][-tTOKEN][-iCHAT_ID][-cCONFIG][-v][--version][message[message...]]SimplewrappertosendnotificationswithTelegramBot

positionalarguments:messageMessagetosend

optionalarguments:-h,--helpshowthishelpmessageandexit-tTOKEN,--tokenTOKENtelegrambottoken-iCHAT_ID,--chat_idCHAT_IDsenderchatid-cCONFIG,--configCONFIGconfigurationfileinsteadof/Users/andre.morais/.beves-v,--verbosityincreaseoutputverbosity--versionshowprogram'sversionnumberandexitReferencesTelegram Botshttps://core.telegram.org/botsTelegram API documentationhttps://core.telegram.org/bots/apipython-telegram-bot documentationhttps://python-telegram-bot.readthedocs.io/LicenseYou may copy, distribute and modify the software provided that modifications are described and licensed for free underLGPL-3. Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be.
Package: bevis3d
BEVis3D这是一个基于web的3D可视化工具1.环境配置Install environmentpipinstall-rrequirements.txt2.数据准备准备需要可视化的数据集，将数据集放在目录 ./data 下数据集文件结构如下：./data/dataset_dir/
<dataset_dir>:
    |___param
        |___imu_to_vehicle_extrinsics.yaml
        |___vehicle_to_flu_extrinsics.yaml
    |___pandar_AT128
        |___*****.pcd
    |___bbox
        |___*****.txt
    |___velocity
        |___**_velocity_flu.txt
    |___andes_final
    |___andes_final_lidar
    |___andes_hmi
    |___onsemi_obstacle
    |___spherical_left_forward
    |___spherical_right_forward
    |___spherical_left_backward
    |___spherical_right_backward
    |___spherical_backward3.运行代码运行bevis3dbashrun_record.sh参数介绍：--bevis_dir 存储bevis3d的文件夹路径
--bevis_name 当前场景的命名，最终输出的文件路径是<path_to_save_bevis3d>/<file_name_bevis3d>
--data_dir 待可视化的数据集存储的路径
--lidar_dir 待可视化的数据集的点云数据的存储路径，默认None
--param_dir 待可视化的数据集的外参的存储路径，默认None
--bbox_list 待可视化的数据集的3D BBox的存储路径的file name，默认None
--vis_camera 是否要可视化相机bev图像，如果是则加入 --vis_camera
--vis_lidar 是否要可视化点云图像
--vis_bbox 是否要可视化3D目标检测框
--vis_andes 是否要可视化andes图像bevis3d输出文件存放在<path_to_save_bevis3d>/<file_name_bevis3d>下运行web可视化bevis3d --vis_dir $path_to_vis_dir --host 0.0.0.0 --port 19090在本地设备上运行http://localhost:19090即可打开可视化界面ThanksThis project referencesWis3D, and we are grateful for the outstanding work of the CAD team of Zhejiang University.Citation@article{sun2022onepose,
    title={{OnePose}: One-Shot Object Pose Estimation without {CAD} Models},
    author = {Sun, Jiaming and Wang, Zihao and Zhang, Siyu and He, Xingyi and Zhao, Hongcheng and Zhang, Guofeng and Zhou, Xiaowei},
    journal={CVPR},
    year={2022},
}
Package: bevy.events
Bevy.EventsBevy.Events is an events system designed to be used with theBevydependency injection framework. It usesGullyfor creating observable streams of event objects.Installationpipinstallbevy.eventsDocumentationBevy.Events is incredibly straightforward. You can use it as an annotation type on any injectable class.@bevy.injectableclassExample:events:bevy.events.EventDispatch...It is also possible to have multiple event dispatchers in the same Bevy context by giving them names.@bevy.injectableclassExample:events:bevy.events.EventDispatch["my-event-dispatch"]...To send an event use thedispatchon the event dispatch and pass it the event name to dispatch and all the args to pass to the watchers.@bevy.injectableclassExample:events:bevy.events.EventDispatch...asyncdefrecieved_message(self,message):awaitself.dispatch("message-received",message)To register a watcher just callwatchon the event dispatch and pass it an event name towatchfor and a coroutine callback. The callback will be passed all args that were given to thedispatchmethod.@bevy.injectableclassExample:events:bevy.events.EventDispatchdef__init__(self):self.events.watch("message-received",self.on_message_received)asyncdefon_message_received(self,message):...watchreturns aGully observerso that the event watcher can be enabled or disabled as needed.The event dispatchers will be shared by all class instances in the Bevy context. Events dispatched on a named dispatcher will only be sent to watchers of that event dispatcher. Any class in the context can access the same same event dispatcher just by giving the annotation the same name.
Package: beward
Please :star: this repo if you find it usefulpy-bewardPython API for Beward Cameras and Doorbells. This is used inHome Assistant componentbut should be generic enough that can be used elsewhere.InstallationpipinstallbewardUsage exampleDiscovery devices:frombewardimportBewardfordevinBeward.discovery().values():print(f"Found device\"{dev.name}\"at http://{dev.host_ip}:{dev.http_port}")Initialize one device and listen for events:importtimefrombewardimportBewardfrombeward.constimportALARM_ONLINE,ALARM_MOTION,ALARM_SENSORdefhandler(device,timestamp,alarm,state):print('Handling alarm "%s". State:%d'%(alarm,state))DEVICE_HOST='192.168.1.100'DEVICE_USER='admin'DEVICE_PASS='password'bwd=Beward.factory(DEVICE_HOST,DEVICE_USER,DEVICE_PASS,stream=1)bwd.add_alarms_handler(handler)bwd.listen_alarms(alarms=(ALARM_ONLINE,ALARM_MOTION,ALARM_SENSOR))print('Live image URL:',bwd.live_image_url)print('RTSP live video URL:',bwd.rtsp_live_video_url)print('Live image:',bwd.camera_image())fordecadeinrange(10):print('Time:%ds'%(decade*10))time.sleep(10)print('Bye')Contributions are welcome!This is an active open-source project. We are always open to people who want to
use the code or contribute to it.We have set up a separate document containing ourcontribution guidelines.Thank you for being involved! :heart_eyes:Authors & contributorsThe original setup of this library is byAndrey "Limych" Khrolenok.For a full list of all authors and contributors, checkthe contributor's page.This project was created and is updated using thePy-Blueprint template. You can use this template to maintain your own projects.Licensecreative commons Attribution-NonCommercial-ShareAlike 4.0 International LicenseSee separatelicense filefor full text.
Package: bewegung
BEWEGUNG/bəˈveːɡʊŋ/ (German, noun, feminine: motion/movement/animation)Synopsisbewegungis a versatile video renderer, primarily targeting scientific visualizations of large quantities of data. Its core concepts aresequencesandlayers. Sequences describe a certain time span within a video and can overlap. Each sequence can hold multiple layers. Layers can be generated withcairo,Pillow,datashader,matplotlibandbewegung's internal drawing systemDrawingBoard. Final compositing of every video frame and video effects are implemented viaPillow. Video encoding is handled byffmpeg.bewegungalso includes a simplevector algebra systemand a"camera" for 3D to 2D projections.bewegungis developed with ease of use, compute time and memory efficiency in mind.Installationbewegungcan be installed both viacondaand viapip.ViacondaAn almost complete installation can be triggered by running:condainstall-cconda-forgebewegungPlease note thatmplcairo, a dependency ofbewegungand alternative backend formatplotlib, is currently not available viacondaand must be installed manually.bewegungdoes also work withoutmplcairopresentand falls back to thecairobackend ofmatplotlib.ViapipA bareminimumofbewegungcan be installed with Python's package managerpip:pipinstall-vUbewegungAcompleteinstallation of all optional Python components and development tools can be triggered by running:pipinstall-vUbewegung[all]Certain non-Pythonprerequisitesmust installed separately and before invoking the above command.For detailed instructions, see documentation. Most notably,ffmpegshould be installed for producing actual video files instead of video frames as individual files. Seedownload sectionof theffmpegproject website for further instructions.ExampleSeedemo.py.You can directly test it by running:curlhttps://raw.githubusercontent.com/pleiszenburg/bewegung/master/demo/demo.py|python3This resultingvideo.mp4file should look like this:UsageSeedocumentation.bewegung's development status is "well-tested alpha". Its API should not be considered stable until the project is labeled "beta" or better.bewegungcan be drastically accelerated by deactivating debugging features. Seerelevant section in the documentation.
Package: bew-wp
bew-wpIntroductionA very easy tool to publish Markdown post to your WordPress websiteRequirementsTo be finished.Recommended modulesTo be finished.InstallationTo be finished.ConfigurationTo be finished.UsageTo be finished.Troubleshooting & FAQTo be finished.MaintainersCurrent maintainers:Jinhang Zhu -https://github.com/JinhangZhu