Saravanan666/pypi-org huggingface dataset:
Package: brown-clustering
Brown ClusteringEasy to use and fast Brown Clustering in python.Quick StartRequirements and InstallationThe project is based on Python 3.7+, because method signatures and type hints are beautiful.
If you do not have Python 3.7, install it first.Here is how for Ubuntu 16.04.
Then, in your favorite virtual environment, simply do:pip install brown-clusteringExample UsageLet's run named entity recognition (NER) over an example sentence. All you need to do is make aSentence, load
a pre-trained model and use it to predict tags for the sentence:frombrown_clusteringimportBigramCorpus,BrownClustering# use some tokenized and preprocessed datasentences=[["This","is","an","example"],["This","is","another","example"]]# create a corpuscorpus=BigramCorpus(sentences,alpha=0.5,min_count=0)# (optional) print corpus statistics:corpus.print_stats()# create a clusteringclustering=BrownClustering(corpus,m=4)# train the clusteringclusters=clustering.train()Done! We have trained a brown clustering.# use the clustered wordsprint(clusters)# [['This'], ['example'], ['is'], ['an', 'another']]# get codes for the wordsprint(clustering.codes())# {'an': '110', 'another': '111', 'This': '00', 'example': '01', 'is': '10'}AlgorithmThis repository is based onyangyuan/brown-clustering,
A full python implementation based on two papers:Original Brown Clustering PaperOptimization by precomputation (page 46)The computational complexity isO(n(m²+n) + T)where T is the total token count,
n is the unique token count and m is the computation window size.Improvements towards the originalAllow filtering the vocabulary by the minimum word countImplement aDefaultValueDictwhich allows the Laplace Smoothing to not artificially explode the ram for all non-existing 2grams, but stores the alpha as default value.UseTqdmfor a nice progressbarUseNumbato speed up the performance by compiling to C code and using parallelism.Mask unused rows and columns instead of reallocating all matrices all the time.Publishing on PypiProper CI-CD and testingBenchmarkingI benchmarked using thesmall_fraud_corpus_in.jsonas input,m=1000clusters on aLenovo Legion 7iwithProcessor	Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, 2592 Mhz, 6 Core(s), 12 Logical Processor(s)running the original code took me more than16 hours. With the current optimizations it takes6:51 minutes.Other Brown Clustering librariesrepositorymain-languageInstallationbenchmark speedbrown-clusteringpythonclone & run~ 16:00:00generalized-brownC++ & pythonclone & make & runn.a.brown-clusterC++clone & make & runn.a.Thispythonpipy install & import00:06:51if you know any missing libraries, please create an issue or a pull request.
Package: brownian-diffuser
brownian-diffuserForward integrate torch neural networksSimilar totorchsde.sdeintortorchdiffeq.odeintbut for vanilla neural networks as implemented byTorchNetsExample usageBrownianDiffuserfrombrownian_diffuserimportBrownianDiffuserdiffuser=BrownianDiffuser()fromtorch_netsimportTorchNetimporttorchnet=TorchNet(50,50,[400,400])X0=torch.randn([200,50])t=torch.Tensor([2,4,6])X_pred=diffuser(net,X0,t,n_steps=40,stdev=0.5,max_steps=None,return_all=False)X_pred.shapetorch.Size([3, 200, 50])BrownianMotionfrombrownian_diffuserimportBrownianMotionX_state=torch.randn([400,50])BM=BrownianMotion(X_state,stdev=0.5,n_steps=40)Z=BM()Z.shapetorch.Size([40, 400, 50])Installationpip install brownian-diffuser
Package: brownian-motion-generator
IntroLibrary to generate Brownian motion random walks for multiple series that exhibit mean reversion, correlation, skew, kurtosis, and/or custom distributions that do not follow typical normal distributions.This can be used for testing trading strategies, risk analysis, tokenomics design stress testing, Monte Carlo simulations, and inputs into existing testing, modeling, and simulation frameworks such as cadCAD and radCAD - see the Examples folder for details.Installation and Usagepip install brownian_motion_generatorfrom brownian_motion_generator import brownian_motion_generator as bmgCommon Use CasesStress testing collateral based systems. Generating random walks of asset prices can help to identify potential exploits or risks of undercollateralization.Optimizing rates of emission/inflation. Generating random walks of TVL/users/revenue growth can help to identify how emissions may need to be tweaked.Identifying critical thresholds. Generating random walks of user activity, TVL, and/or protocol revenues can help identify any crucial levels to hit (or avoid) where sustainable growth kicks in (or death spiral feedback loops begin).Understanding risks and levels of exposure to general market conditions or the performance of a given asset outside your control. Generating random walks of S&P 500 or BTC prices can help identify the degree and critical levels in macro risks.Model positive feedback loops and/or death spirals in user behavior. For example generating random walks of NFT marketplace trading activity helps protocols identify and minimize the risks of wash trading.Assumption testing. Generating random walks of critical model inputs can stress test any general system design to identify which assumptions must hold true for the system to be sustainable, and/or identity any assumptions which are unlikely to hold true in practice based on realistic random walks.How to UseSee the Examples folder for tutorials in Jupyter notebook and equivalent html file format. Tutorials cover quick examples of generating multiple simulations of multiple correlated series with mean reverting, correlated, and/or non-normal distributions of returns, and how to integrate the generated random walks into existing simulation frameworks such as radCAD.Feedback, Questions, Improvements?Please open an issue on GitHub orget in touchCreditsOriginal credit to these two resources which were the building blocks:https://towardsdatascience.com/stochastic-processes-simulation-brownian-motion-the-basics-c1d71585d9f9https://gist.github.com/raddy/4084ade3d3a82911d43df9375f9697f4
Package: brownian-stock
BrownianBrownianは日本株取引に対応した株取引フレームワークです。JQuantsからのデータダウンロード, 取引モデルの作成, バックテスト, 実取引まで網羅的にサポートします.Usage以下のサブコマンドを実行すると指定したディレクトリ以下にJQuantesから取得した情報をCSVで保存します.brownian download <保存先のディレクトリ名>ログイン情報の設定またdownloadオプションには--usernameおよび--passwordオプションが用意されていて、実行時にこれらの引数を指定して実行することもできます。
これらの引数は.brownianrcの内容より優先して利用されます。DBの更新・CSVの生成以下のコマンドを実行すると, ダウンロードしたデータを集計してSQLiteデータベース上に格納します.
またデータベースから銘柄毎の株価情報・決算情報を集計しCSVを生成します.$ brownian download <保存先フォルダ名>
$ brownian generate <保存先フォルダ名>ディレクトリの構成raw_stockJQuantsから取得した日毎の株価情報raw_statementsJQuantsから取得した日毎の決算情報stockgenereateコマンドで生成した銘柄毎の株価情報.　株価は調整済みの数字.Install各種コマンドのインストール前にvenvをactivateしてください.python3-mvenv.venvsource.venv/bin/activateFor DeveloperPrerequiresryeghSet upRun following commands.rye syncUtility commands.To test.ryerunpytestLint and formatryeruninvokelint
ryeruninvokeformatPublish a releaseRun the following command.
This command increment the version number and make a release PR..bump_version.shtest runryerunbrownian...
Package: browniebroke-utils
Browniebroke UtilsA collections of small scripts.InstallationInstall this via pip (or your favourite package manager):pip install browniebroke-utilsUsageThis tool provides a few random scripts I use in my day to day work.pych-prettierConfigurePrettieras file watcher in the current PyCharm project. This is done by editing the appropriate files in the.ideafolder.pych-pywatchersSetup a few Python-related linting tools as file watchers in the current PyCharm project:BlackisortpyupgradeThis is done by editing the appropriate files in the.ideafolder.Contributors ✨Thanks goes to these wonderful people (emoji key):Bruno Alla💻🤔📖This project follows theall-contributorsspecification. Contributions of any kind welcome!CreditsThis package was created withCopierand thebrowniebroke/pypackage-templateproject template.
Package: brownie-safe
Brownie Safe: Gnosis Safe tx builderRead DocumentationBrownie Safe allows you to iteratively build complex multi-step Gnosis Safe transactions and safely preview their side effects from the convenience of a locally forked mainnet environment.Previously known as Ape SafeInstallationpip install -U brownie-safeQuickstartbrownieconsole--networkmainnet-forkfrombrownie_safeimportBrownieSafesafe=BrownieSafe('ychad.eth')dai=safe.contract('0x6B175474E89094C44Da98b954EedeAC495271d0F')vault=safe.contract('0x19D3364A399d251E894aC732651be8B0E4e85001')amount=dai.balanceOf(safe.account)dai.approve(vault,amount)vault.deposit(amount)safe_tx=safe.multisend_from_receipts()safe.preview(safe_tx)safe.post_transaction(safe_tx)SeeDocumentationfor more examples and full reference.
Package: brownieSort
#brownieSort
A programme for sortingbrowniesinto groups (tents)
of equal size according to friendships. Brownies and
friendship choices are imported from a text file.
An algorithm is run to find the optimal (or near best)
groupings of brownies. The best camp can be printed to the screen
as a list of tents, their occupants, and the associated
happiness scores.in the UK, a brownie is a junior girl-guide (or junior girl-scout)
Package: brownie-token-tester
brownie-token-testerHelper objects for generating ERC20s while testing a Brownie project.Dependenciespython3version 3.6 or greater, python3-devbrownieversion1.11.6or greaterganache-cliversion6.11.0or greaterInstallationviapipxIf you have installed Brownie usingpipx, you need to addbrownie-token-testerinto the same virtual environment:pipxinjecteth-browniebrownie-token-testerviapipYou can install the latest release viapip:pipinstallbrownie-token-testerviasetuptoolsYou can clone the repository and usesetuptoolsfor the most up-to-date version:gitclonehttps://github.com/iamdefinitelyahuman/brownie-token-tester.gitcdbrownie-token-tester
python3setup.pyinstallQuick UsageImport the library from within a Brownie test, script or console:frombrownie_tokensimportERC20,MintableForkTokenYou can then make use of the following functionality:ERC20Deploys a generic ERC20 contract for testing purposes.defERC20(name:str="Test Token",symbol:str="TST",decimals:int=18,success:Union[bool,None]=True,fail:Union[bool,str,None]="revert",)->Contract:Thesuccesskwarg is used to set the token's return value upon a successful call toapprove,transferortransferFrom. Valid values areTrue,False, andNone.Thefailkwarg sets the token's behaviour upon failed calls to the above methods. Use"revert"if the transaction should revert, orTrue,False, andNoneto return a value without reverting.The resulting deployment adheres to theERC20 Token Standardand additionally implements one non-standard method:def_mint_for_testing(target:address,amount:uint256):nonpayableThis method increases the balance oftargetbyamount. It may be called by any account.MintableForkTokenMintableForkTokenis used to standardize the process of minting tokens when working in aforked mainnetenvironment. TheMintableForkTokenclass inherits from and may be used interchangeably with theContractclass. It exposes one additional method,_mint_for_testing, with the same API as given above.For tokens wherecustom logic is implemented, this is an actual minting event. For most tokens, the "minting" process involves a query to theEthplorer APIto get a list of top token holders, and then transferring their balances totarget. If you want to exclude some holders from this process useskip_holders(*addresses). If you have too many requests at a time set$ETHPLORER_API_KEY(seeethplorer.io) as environment variable.Tokens for which custom logic is currently implemented:Aave tokensDAIEURSLinkUSDpBTCSynthetix synthsrenBTCrenZECrETHRSVUSDCUSDNUSDTtBTCwBTCwZECDevelopmentThis project is still in early development and should be considered an alpha. Comments, questions, criticisms and pull requests are welcomed.LicenseThis project is licensed under theMIT license.
Package: brownpaperbag
brownpaperbagBut you try and tell the young people today that...installationpip install brownpaperbagConfigurationYou need to use the official app, and to be logged with the installer codeYou'll need the open password: From the app, you can set it on Other>System. You'll also need your gateway's IP: Again from the app, you can find it in Other>NetworkSo if your ip is 192.168.1.10 and your password is qwerty:export BPB_HOST=192.168.1.10
export BPB_PASSWORD=qwerty
export BPB_PORT=20000Commandsbrownpaperbag --help
Usage: brownpaperbag [OPTIONS] COMMAND [ARGS]...

  Console script for brownpaperbag.

  Provides interaction with myhomeserver1

Options:
  --host TEXT      MyHomeServer1 IP
  --port INTEGER   MyHomeServer1 port
  --password TEXT  OPEN password
  -v, --verbose    Verbose mode, can be used twice
  --help           Show this message and exit.

Commands:
  cover  Interact with a cover.
  event  Subscribe to gateway events.
  light  Interact with a light.
  list   List known devices.
  raw    Send raw openwebnet command.Cover interactionUsage: brownpaperbag cover [OPTIONS] COVER_ID

  Interact with a cover.

Options:
  --status  Get status
  --up      Open
  --down    Close
  --stop    Stop
  --help    Show this message and exit.Listen to eventsUsage: brownpaperbag event [OPTIONS]

  Subscribe to gateway events.

Options:
  --human  Human readable
  --help   Show this message and exit.Light interactionUsage: brownpaperbag light [OPTIONS] ID

  Interact with a light.

Options:
  --status  Get status
  --on      Turn On
  --off     Turn Off
  --help    Show this message and exit.List every devicesUsage: brownpaperbag list [OPTIONS]

  List known devices.

Options:
  --lights / --no-lights  Include lights
  --covers / --no-covers  Include covers
  --help                  Show this message and exit.Send raw commandUsage: brownpaperbag raw [OPTIONS] COMMAND

  Send raw openwebnet command.

Options:
  --help  Show this message and exit.Help & tricksDiscovering devicesthe commandbrownpaperbag event --humancan help you to identify devices$ brownpaperbag event --human
light 15 is OFF (*1*0*15##)
light 11 is OFF (*1*0*11##)
light 0010 is OFF (*1*0*0010##)
light 0011 is OFF (*1*0*0011##)
light 0012 is OFF (*1*0*0012##)
light 02 is OFF (*1*0*02##)
light 0014 is OFF (*1*0*0014##)
light 0111 is OFF (*1*0*0111##)
light 04 is OFF (*1*0*04##)
light 19 is OFF (*1*0*19##)
light 01 is OFF (*1*0*01##)
light 09 is OFF (*1*0*09##)
cover 07 is STOPPED (*2*0*07##)
cover 0113 is STOPPED (*2*0*0113##)
cover 13 is STOPPED (*2*0*13##)
cover 17 is STOPPED (*2*0*17##)
cover 16 is STOPPED (*2*0*16##)
cover 06 is STOPPED (*2*0*06##)
cover 08 is STOPPED (*2*0*08##)
cover 06 is UP (*2*1000#1*06##)
cover 06 is STOPPED (*2*1000#0*06##)
cover 06 is DOWN (*2*1000#2*06##)
cover 06 is STOPPED (*2*1000#0*06##)
light 0111 is ON (*1*1*0111##)
light 0111 is OFF (*1*0*0111##)
light 0111 is ON (*1*1*0111##)
light 0111 is OFF (*1*0*0111##)
cover 06 is DOWN (*2*1000#2*06##)
cover 06 is STOPPED (*2*1000#0*06##)
cover 06 is UP (*2*1000#1*06##)
cover 06 is STOPPED (*2*0*06##)
Package: browscap-python
Detect browserimportredisimportbrowscapfrombrowscap.cache.redisimportRedisCacheua="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"redis_cache=redis.Redis(db=5)bc=browscap.Browscap(cache=RedisCache(redis_cache))browser=bc.get_browser(ua)Detect browser with asynciofrompprintimportpprintimportasyncioimportasyncio_redisfrombrowscap.aioimportBrowscapAsyncfrombrowscap.aio.cache.redisimportRedisPoolAioCacheloop=asyncio.get_event_loop()@asyncio.coroutinedefget_browser():ua="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"redis_cache=awaitaioredis.create_pool(('localhost',6379),minsize=5,maxsize=100)bc=BrowscapAsync(cache=RedisPoolAioCache(redis_cache))browser=yield frombc.get_browser(ua)cache.close_connection()returnbrowserif__name__=='__main__':loop=asyncio.get_event_loop()browser=loop.run_until_complete(get_browser())pprint(browser)Update baseimportredisimportbrowscapfrombrowscap.cache.redisimportRedisCachefrombrowscapimportIniLoaderredis_cache=redis.Redis(db=5)bc=browscap.Browscap(cache=RedisCache(redis_cache))bc.update(type=IniLoader.PHP_INI_FULL)
Package: browseapi
This package is a Python client for eBay Browse API. It is asynchronous
and designed to send a large number of requests by one function call.For more information about this API visit officialdocumentation.InstallationInstall from PyPI bypip install browseapiSupported methodsOnly these methods are now implemented (names changed to lowercase
notation):searchsearch_by_imageget_itemget_item_by_legacy_idget_items_by_item_groupcheck_compatibilityQuickstartCreate a BrowseAPI instance with your application id (app_id) and
application secret (cert_id) and start sending requests:frombrowseapiimportBrowseAPIapp_id='<your_app_id>'cert_id='<your_cert_id>'api=BrowseAPI(app_id,cert_id)responses=api.execute('search',[{'q':'drone','limit':50},{'category_ids':20863}])# this will make 'search' request two times with parameters# q=drone and limit=50 for the first time and# category_ids=20863 for the second timeprint(responses[0].itemSummaries[0])All response fields have similar names and types as those mentioned in
official docs.TestsFor running tests put yoursecret.jsonfile with fields'eb_app_id'and'eb_cert_id'to thebrowseapi/testsdirectory, then run a command from the parent browseapi directory:python-munittest browseapi.tests.test_clientYou may get warnings like this:ResourceWarning: unclosed transportJust ignore it.RequirementsPython >= 3.5.3aiohttpDocumentationDocumentation built withmkdocs.browseapi.readthedocs.io
Package: browseapi-sandbox
This package is a Python client for eBay Browse API. It is asynchronous
and designed to send a large number of requests by one function call.For more information about this API visit officialdocumentation.InstallationInstall from PyPI bypip install browseapi_sandboxSupported methodsOnly these methods are now implemented (names changed to lowercase
notation):searchsearch_by_imageget_itemget_item_by_legacy_idget_items_by_item_groupcheck_compatibilityQuickstartCreate a BrowseAPI instance with your application id (app_id) and
application secret (cert_id) and start sending requests:frombrowseapiimportBrowseAPIapp_id='<your_app_id>'cert_id='<your_cert_id>'api=BrowseAPI(app_id,cert_id)responses=api.execute('search',[{'q':'drone','limit':50},{'category_ids':20863}])# this will make 'search' request two times with parameters# q=drone and limit=50 for the first time and# category_ids=20863 for the second timeprint(responses[0].itemSummaries[0])All response fields have similar names and types as those mentioned in
official docs.TestsFor running tests put yoursecret.jsonfile with fields'eb_app_id'and'eb_cert_id'to thebrowseapi/testsdirectory, then run a command from the parent browseapi directory:python-munittest browseapi.tests.test_clientYou may get warnings like this:ResourceWarning: unclosed transportJust ignore it.RequirementsPython >= 3.5.3aiohttpDocumentationDocumentation built withmkdocs.browseapi.readthedocs.io
Package: browsenextfile
View local files (images or videos) using web browser.Change to next or previous file in the directory by mouse click.All image and video file formats supported by the browser can be opened.(Under the hood, the program uses Selenium project to control the browser.)To install the program on Linux, open command line and type:$ python3 -m pip install --no-cache-dir browsenextfileTo install the program on Windows, open command line or Windows PowerShell and type:$ py -m pip install --no-cache-dir browsenextfileDuring the installation,NextFileicon will be created on the Desktop.
To run the program, double-click on this icon and wait for new browser window to open.
In the browser, home page will open with information about the program.
Package: browseon
browseonTo browse web.Installationpip install -U browseonUsageusage: browseon [options]

optional arguments:
  -h, --help     show this help message and exit
  -v, --version  show version number and exit.

to browse web:
  -q , --query    query to search
  -u , --url      url to open
  -e , --engine   search engine to search (Optional)Python ScriptTo browse web.frombrowseonimportbrowsebrowse.open('scheme://sub-domain.domain.top-level-domain/')# to open urlbrowse.search("pypi browseon")# to search queryCommand LineTo search in web browser.$ browseon --query "pypi browseon"Issues:If you encounter any problems, please file anissuealong with a detailed
description.
Package: browser2requests
Creates Proxies and binds them to a NIC - Windows onlypip install nic2proxyTested against Windows / Python 3.11 / AnacondaMultiProxyServerclassformanagingandstartingmultipleproxyserversonWindows.Thisclassprovidesfunctionalitytoconfigure,start,andmanageproxyservers.Itbindseachproxytoaspecificnetworkinterface.ItalsoincludesmethodsforgeneratingYAMLconfigurationfiles,retrievingthepublicIPv4addressofthehost,andhandlingconsoleeventsforcontrollingserverprocesses.Ituseshttps://github.com/hang666/s5lightunderthehoodUsage:1.CreateaninstanceofMultiProxyServerwiththedesiredinterfacesandlogfolder.2.WritetheYAMLconfigurationfilewiththewrite_yaml_config()method.3.Starttheproxyserverswiththestart_proxy()method.(Usespowershell-mightneedelevatedrights)4.Getinformationabouttherunningserverswiththe__str__()method.Example:fromnic2proxyimportMultiProxyServerinterfaces={0:{"bind_address":"0.0.0.0","bind_port":None,# None -> finds a free one"out_address":"192.168.9.100",# Address of the NIC you want to use"tcp_timeout":60,"udp_timeout":60,"whitelist":(),},1:{"bind_address":"0.0.0.0","bind_port":None,"out_address":"192.168.10.100",# Address of the NIC you want to use"tcp_timeout":60,"udp_timeout":60,"whitelist":(),},}prox=MultiProxyServer(interfaces=interfaces,logfolder="c:\\proxylogs")prox.write_yaml_config().start_proxy()print(prox)#  prox.kill_proxy() to kill 'em all!
Package: browseragents
BrowserAgentsGenerates a random browser user agentInstall (automatic)$ pip install browseragentsInstall (manual)$ git clone git@github.com:walidsa3d/browseragents.git
$ cd browseragents
$ python setup.py installLicenseThe MIT License (MIT)

Copyright (c) 2015 Walid Saad

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.