Saravanan666/pypi-org huggingface dataset:
Package: bigbrain
bigbrainbigbrain is a toolbox for learning anything and everything from data.No machine learning knowledge needed!With this toolbox, all your data science problems can be solved with a
single command. No longer will you need to know anything about machine
learning in order to use its power to solve all your problems.Learn the best models from your data without any background knowledge!Let the AI learn the best algorithm for your data, and then use what it learned on other data!Techbigbrain wrapsscikit-learnto try many different models on your data and find the best performing algorithm for you.Installationbigbrain can be installed using pypi, either from thewebsite, or from the command line:$pipinstallbigbrainExample UsageWith this package, you can easily create regression or classification models for supervised learning techniques.>>>frombigbrainimportAI####### Classification #######>>>machine=AI(model_type='classification')>>>machine.learn(X_train,y_train)"My big brain has learned everything.">>>predictions=machine.go(X_test)####### Regression #######>>>machine=AI(model_type='regression')"My big brain has learned everything.">>>predictions=machine.go(X_test)
Package: bigbrother
bigbrotherAn evil, awful, terrible, no-good library for watching objects for mutation. Do not use this library.Overviewbigbrotheris a mutation observer library. You can use it to watch your objects for changes. When your object changes,bigbrotherwill trigger your choice of callback.x={1:"a",2:"b",3:"c"}deftrack_changes(obj,method,ref,call_args,call_kwargs):print(f"method:{method}, args:{args}, kwargs:{kwargs}")x=watch(x,track_changes)x[1]="x"# prints: method: setitem, args: (1, 'x'), kwargs: {}bigbrothercan also embed itself recursively in your object by passing in argumentdeepstate=True.Callbackdefcallback(obj,method,ref,call_args,call_kwargs):'''Callback called when object is mutatedArgs:obj (Any): The object being mutated via `method`method (str): The method called on the object (dunders removed)ref (Any): Reference object. If callback installed recursively, `ref` will be the entrypointcall_args (Tuple[Any]): Positional arguments that `method` was called with on `obj`call_kwargs (Dict[Any, Any]): Keyword arguments that `method` was called with on `obj`'''Supported typesBuiltinsMost builtin types are read-only and cannot have their method structure mutated, so we observe via replacement with thin wrappers.listvia_ObservedListappendclearextendinsertpopremovesort__setattr____setitem__dictvia_ObservedDictclearpoppopitemupdate__setattr____setitem__setvia_ObservedSetaddcleardifference_updatediscardintersection_updatepopremovesymmetric_difference_updateupdate__setattr__Librariespydantic.BaseModel
Package: bigbucks-port
IntroductionThis package is used for portfolio analysis in FINTECH 512 Bigbucks project. This package also depends on thebigbucks_dbpackage to interact with the supabase database and Alpha Vantage.Connect to supabase and alpha Vantage# Connect to supabaseSUPABASE_URL=""KEYS=""objs=Table_View(SUPABASE_URL,KEYS)# Connect to Alpha VantageSTOCK_API_KEYS=""objs_realtime=Buy_And_Sell(STOCK_API_KEYS)Import packagefrombigbucks_port.portfolioimport*FunctionsGet the current portfolio holdings for user.It returns a json list includes the stock symbol, number of shares, historical cost and price per share.If you want to get all the stocks for all the users, setid=None. Same for other functions below.id=6holding=holding_json(objs,id)Example output:{"IBM":{"num_shares":100,"historical_cost":13107.0007324219,"price_per_share":131.0700073242}}Calculate the historical daily return for each stock in the holdingreturns=return_json(objs,id)Example output:[{"Symbol":"AAPL","labels":["2018-04-03","2018-04-04"],"data":[{"date":"2018-04-03","return":0.010206911067964735},{"date":"2018-04-04","return":0.01894174279199366}]},{"Symbol":"IBM","labels":["2018-04-03","2018-04-04"],"data":[{"date":"2018-04-03","return":-0.0014670581452283652},{"date":"2018-04-04","return":0.028096725995288337}]}]Calculate the historical daily return for SPYreturns=spy_json(objs)Example output:{"Symbol":"SPY","labels":["2018-04-10","2018-04-11"],"data":[{"date":"2018-04-10","return":0.016588598996312102},{"date":"2018-04-11","return":-0.005540685772461173}]}Calculate the expected return and std of each stock in the portfolioIt returns a a json list of mean and std for each stocker_std=er_std_json(obj,id)Example output:{"AAPL":{"mean":0.2318697889,"std":0.3361717704},"IBM":{"mean":-0.0075799068,"std":0.2759977582}}Get the risk and return for the efficient frontier# num: number of portfolios on the efficient frontierreturn_risk=frontier_json(objs,id,num)Example output{"data":[{"std":0.06906698680510652,"mean":-0.007579906778486523},{"std":0.06906698680510652,"mean":-0.007579906778486523}]}Get the optimal portfolio given a risk free rate# rf: risk free rateopt=optimize_port(rf,objs,id)Example output{"opt mean":0.2318697888966346,"opt std":0.08412521675427394,"opt sharpe":2.7265283555418782}Calculate the risk, return and sharpe for the current holdingrisk_return=cur_risk_return(0.0025,objs,6)Example output{'mean':-0.007579906778486523,'std':0.06906698680510652,'sharpe':-0.1459439197330273}Calculate the holding period return and cash balanceholding_stat=holding_return(objs,6,objs_realtime)Example output# PV: the market value of all cash and stocks in the account# Cash: cash remained in the account balance{'PV':1000106.999206543,'Cash':986892.9992675781,'Holding_return':0.00010699920654300143}
Package: bigbucks-portfolio
IntroductionThis package is used for portfolio analysis in FINTECH 512 Bigbucks project. This package also depends on thebigbucks_dbpackage to interact with the supabase database and Alpha Vantage.Connect to supabase and alpha Vantage# Connect to supabaseSUPABASE_URL=""KEYS=""objs=Table_View(SUPABASE_URL,KEYS)# Connect to Alpha VantageSTOCK_API_KEYS=""objs_realtime=Buy_And_Sell(STOCK_API_KEYS)FunctionsGet the current portfolio holdings for user.
It returns a json list includes the stock symbol, number of shares and price per share (weighted by historical cost)
Note: If you want to get all the stocks for all the users, setid=None. Same for other functions below.holding=current_holding(objs,6)Example output:[{"stock_symbol":"AAPL","num_shares":0,"pv":0.0,"price per share":null},{"stock_symbol":"IBM","num_shares":100,"pv":13107.0007324219,"price per share":131.0700073242}]Calculate the expected return, std and covariance of portfolio
The statistics are calculated based on the historical data.
Note: It returns 4 values, the fourth one is the json list with expected return and std for each stock and the rest 3 are used in later functions.er,std,covar,er_std_json=er_covar(objs,6)Example output ofer_std_json{"mean":{"AAPL":0.2318697889,"IBM":-0.0075799068},"std":{"AAPL":0.3361717704,"IBM":0.2759977582}}Get the risk and return for a list of portfolios with randomly generated weights# N: number of portfolios generatedreturn_risk=rand_scatter(5,objs,6)Example output{"mean":[0.13009300157209497,0.02497749995225248,0.16554410436129516,0.14454572030763208,0.10086096141188186],"std":[0.06705431545265916,0.0656856601122741,0.07160084144613905,0.0686922284906061,0.06474888518469718]}Get the risk and return for the efficient frontierreturn_risk=frontier(objs,6)Example output{"mean":[],"std":[]}Get the optimal portfolio given a risk free rateopt=optimize_port(0.0025,objs,6)Example output{"opt mean":0.2318697888966346,"opt std":0.08412521675427394,"opt sharpe":2.7265283555418782}Get the risk and return for the current portfolio
Note: weight is calculated by the current holdingrisk_return=cur_risk_return(0.0025,objs,6)Example output{'mean':-0.007579906778486523,'std':0.06906698680510652,'sharpe':-0.1459439197330273}Calculate the holding period return and balanceholding_stat=holding_return(objs,6,objs_realtime)Example output# PV: the market value of all cash and stocks in the account# Cash: cash remained in the account balance{'PV':1000000.0,'Cash':986892.9992675781,'Holding period return':0.0}
Package: bigc
bigcAn unofficial Python client for the BigCommerce API.This project is currently in an alpha state.InstallationpipinstallbigcUsageTo authenticate, you'll need the BigCommerce store's hash and an access token.frombigcimportBigCommerceAPIstore_hash='000000000'access_token='0000000000000000000000000000000'bigcommerce=BigCommerceAPI(store_hash,access_token)order:dict=bigcommerce.orders.get(101)orders:list[dict]=list(bigcommerce.orders.all(customer_id=1))The following resources are currently supported:cartscategoriescheckoutscustomer_groupscustomersordersproductsproduct_variantswebhooksDirect API AccessFor resources or parameters that aren't officially supported yet, bigc also includes a flexible API client that can be used to make direct requests to the BigCommerce API.bigcommerce=BigCommerceAPI(store_hash,access_token)product=bigcommerce.api.v3.get('/products/77',params={'include':'videos'})order_messages=bigcommerce.api.v2.get_many('/orders/101/messages')UtilitiesSome extra utility functions that don't interact with the BigCommerce API are available inbigc.utils.bigc.utils.parse_rfc2822_date: Convert anRFC-2822 date(used by some BigCommerce APIs) to adatetimeConstantsFor convenience, some constants are made available inbigc.data.bigc.data.BigCommerceOrderStatus: AnEnumof order statuses and their IDs
Package: bigchaindb-abci
Build blockchain applications in Python for TendermintVersionSupports: ABCI v0.16.0 and Tendermint v0.31.5InstallationRequires Python >= 3.6.5pip--userinstallbigchaindb-abciORpython setup.py installGenerating ProtobufYouONLYneed to mess with the protobuf stuff if you’re developing on this code base, not to create apps.
If you just want to create apps, jump toGetting StartedA note on protobuf.  You’ll notice 2 additional directories:githubandprotobuf.
Thegithubdir is the protobuf generated code used byabci. It adds proper Python
path (via __init___) and preserves all the import statements used by Tendermint for the various
protobuf files spread across their codebase.  Theprotobufdirectory is the
source .proto files.To build the protobuf files:Install protoc so it’s available as a command from a terminalRun thegenproto.pyscriptGetting StartedExtend the BaseApplication classImplement the Tendermint ABCI callbacks - seehttps://github.com/tendermint/abciRun itSee the example appcounter.pyapplication under theexamplesdirectory
here:https://github.com/davebryson/py-abci/blob/master/examples/counter.py
Package: bigchaindb-common
Set of reusable components for BigchainDB Python software.Development Status: Pre-AlphaThe software is released under the terms of the Apache Software License 2.0Documentation:https://bigchaindb-common.readthedocs.io.FeaturesFully (de)serializableTransactionmodel of BigchainDBSupport for the creation and signing of advancedCryptoconditionsEasily overridable methods for easy adaptability of new conceptsCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.0.1a1 (2016-08-17)Planning release on PyPI.
Package: bigcode-astgen
# bigcode-astgen-pyGenerate Python files AST in a format compatible with [150k Python Dataset][1].The code is mostly copied from [150k Python Dataset][1] and adapted to work with Python 3.Note that this tool will only be able to parse the version of Python it is running,
as it is internally using Pythonastmodule, which uses the current Python parser.## InstallThis tool can be installed by running` pip installbigcode-astgen`or by fetching this repository and running` cdast-generators/pythonpip install . `## CLI usage`bigcode-astgen-py-o<output> <input> `<input>should be a file, or a glob expression to files.### Normal modeIn normal mode,<input>is interpreted as a filename and the resulting AST
is outputed in<output>if provided, else printed tostdout.### Batch modeIn batch mode,<input>is interpreted as a glob, and all matching files
are parsed.<output>is a prefix and<output>.json,<output>.txtand<output>_failed.txtfiles will be created.<output>.json- contains a JSON formatted AST per line<output>.txt- contains a filename per line, in the same order as<output>.json<output>_failed.txt- contains a filename per line, with the reason why it could not be parsed### Example#### Normal mode`bigcode-astgen-pybigcode_astgen/normalizer.py `parsebigcode_astgen/normalizer.pyand output the result to stdout.#### Batch mode`bigcode-astgen-py--batch-oresult/asts"src/**/*.py"`parse all.pyfiles insrcdirectory and output results in theresultdirectory
with the prefixasts.## Python API###bigcode_astgen.ast_generator.parse_stringReturns the AST nodes of the given stringArgs:content: string containing a Python program###bigcode_astgen.ast_generator.parse_fileReturns the AST nodes of the given fileArgs:filename: path to a file containing a Python program###bigcode_astgen.ast_bulk_processor.process_filesProcess all the files matched with thefiles_patternand output the results inoutput_dirArgs:files_pattern: a glob pattern containing python filesoutput: the filename (without extension) where to output results## LicenseI could not find the license of [150k Python Dataset][1] source code from whichbigcode_astgen/ast_generator.pyis copied.
Therefore, until further notice, this project does not follow the MIT license as the rest of the repository.[1]:http://www.srl.inf.ethz.ch/py150.php
Package: bigcode-embeddings
# bigcode-embeddingsNOTE: data must be generated with [bigcode-ast-tools][2] before being able to use
this toolbigcode-embeddingsallows to generate and visualize embeddings for
AST nodes.## InstallThis project should be used with Python 3.To install the package either run` pip installbigcode-embeddings`or clone the repository and run` cdbigcode-embeddingspip install-rrequirements.txt python setup.py install `NOTE: tensorflow needs to be installed separately.## Usage### Training embeddingsTraining data can be generated using [bigcode-ast-tools][2]Given adata.txt.gzgenerated from a vocabulary of size 30000,
100D embeddings can be trained using`./bin/bigcode-embeddingstrain-oembeddings/--vocab-size30000--emb-size100--l2-value0.05--learning-rate0.01 data.txt.gz `[Tensorboard][2] can be used to visualize the progress` tensorboard--logdirembeddings/ `After the first epoch, embeddings visualization becomes available from
Tensorboard. The vocabulary TSV file generated bybigcode-ast-toolscan
be loaded to have labels on the embeddings.### Visualizing the embeddingsTrained embeddings can be visualized using thevisualizesubcommand
If the generated vocabulary file isvocab.tsv, the above embeddings
can be visualized with the following command`./bin/data-explorervisualize clusters-membeddings/embeddings.bin-STEP-lvocab.tsv `whereSTEPshould be the largest value found in theembeddings/directory.The-iflag can be passed to generate an interactive plot.[1]: ../bigcode-ast-tools/README.md
[2]:https://github.com/tensorflow/tensorboard
Package: bigcode-fetcher
# bigcode-fetcherA utility to search and fetch code from GitHub.
This tool was build to easily create datasets for repository analysis.The tool works in two phases,searchfinds repositories using the GitHub API,
and saves the result in a JSON file.downloadfetch all the repositories
inside the JSON file.## InstallThis tool can be installed by running` pip installbigcode-fetcher`or by fetching this repository and running` pip install . `in this directory.## Usage###searchcommandBy default, the utility searches for repositories fulfilling the following conditionssizebetween 1M and 100Mstarscount > 10non-virallicense(MIT,Apache-2.0,MPL-2.0,BSD-2-Clause,BSD-3-Clause,BSD-4-Clause,MS-PL)and retrieves the first 100 projects, ordered by number of stars.To avoid API rate limiting, an access token can be provided either with the–tokenCLI argument or with theGITHUB_TOKENenvironment variable.See the help to see all the options:`bigcode-fetchersearch-h`#### ExampleSearch for all Apache commons projects written in Java` mkdir-papache-common-projectsbigcode-fetchersearch--languageJava--userapache--stars'>0'--keywordcommons--max-repos500-oapache-common-projects/apache-commons.json`###downloadcommandThis commands will simplygit cloneall the repositories in theJSONgenerated by thesearchcommand.To reduce the download size, only the latest revision is fetched by default (i.e.git clone –depth 1). This can be disabled by passing in the–fullflag.USERNAME/REPOwill be fetched inOUTPUT_DIR/USERNAME/REPO, whereOUTPUT_DIRis set by the–outputoption.The command will ignore the project if the directory already exists,
so running the command multiple times is safe, and recommended to make
sure all repositories have been fetched.See the help for more information:`bigcode-fetcherdownload-h`#### ExampleDownload all the Apache commons project generated above` mkdir-papache-common-projects/repositoriesbigcode-fetcherdownload-iapache-common-projects/apache-commons.json-oapache-common-projects/repositories`
Package: bigcommerce-api
Note:The Bigcommerce API client is now located in thebigcommercepackage.Wrapper over therequestslibrary for communicating with the
Bigcommerce v2 API.Needsrequestsandstreql(runpip installbigcommerce-apifor easiest way to install), andnoseandvcrpyto run the
tests.UsageConnectingimportbigcommerce# OAuth2-based connection# Access_token is optional, if you don't have one you can use oauth_fetch_token (see below)api=bigcommerce.api.BigcommerceApi(client_id='',store_hash='',access_token='')# Legacy Basic authenticationapi=bigcommerce.api.BigcommerceApi(host='https://store.mybigcommerce.com',auth=('username','api token'))BigcommerceApialso provides two helper methods for connection with
OAuth2:api.oauth_fetch_token(client_secret, client_secret, code, context, scope, redirect_uri)– fetches and returns an access token for your application. As a side
effect, configuresapito be ready for use.BigcommerceApi.oauth_verify_payload(signed_payload, client_secret)– Returns user data from a signed payload.Accessing and objectsTheapiobject provides access to each API resource, each of which
provides CRUD operations, depending on capabilities of the resource:api.Products.all()# GET /productsapi.Products.get(1)# GET /products/1api.Products.create(name='',type='',...)# POST /productsapi.Products.get(1).update(price='199.90')# PUT /products/1api.Products.delete_all()# DELETE /productsapi.Products.get(1).delete()# DELETE /products/1The client provides full access to subresources, both as independent
resources:api.ProductOptions.get(1)                  # GET /products/1/options
api.ProductOptions.get(1, 2)               # GET /products/1/options/2And as helper methods on the parent resoource:api.Products.get(1).options()              # GET /products/1/options
api.Products.get(1).options(1)             # GET /products/1/options/1These subresources implement CRUD methods in exactly the same way as
regular resources:api.Products.get(1).options(1).delete()FiltersFilters can be applied toallmethods as keyword arguments:customer=api.Customers.all(first_name='John',last_name='Smith')[0]orders=api.Orders.all(customer_id=customer.id)Error handlingMinimal validation of data is performed by the client, instead deferring
this to the server. AHttpExceptionwill be raised for any unusual
status code:3xx status code:RedirectionException4xx status code:ClientRequestException5xx status code:ServerExceptionThe low level APIThe high level API provided bybigcommerce.api.BigcommerceApiis a
wrapper around a lower level api inbigcommerce.connection. This can
be accessed throughapi.connection, and provides helper methods for
get/post/put/delete operations.Further documentationFull documentation of the API is available atdeveloper.bigcommerce.comTo doCount endpointsAutomatic enumeration of multiple page responses
Package: bigcommerce-cli
BigCommerce CLIbcliis BigCommerce store management on the command line. It brings the most commonly used store management tools to
the terminal for quick actions and multi-storefront workflows.bcliwas written to help tech savvy store managers save
time by ditching BigCommerce's browser based admin UI.:::::::::   ::::::::  :::        ::::::::::: 
     :+:    :+: :+:    :+: :+:            :+:      
    +:+    +:+ +:+        +:+            +:+       
   +#++:++#+  +#+        +#+            +#+        
  +#+    +#+ +#+        +#+            +#+         
 #+#    #+# #+#    #+# #+#            #+#          
#########   ########  ########## ###########Installationbcliis available on PyPI. Use the commandpip install bigcommerce-clifor easy installation.Getting StartedUse thebcli settings add-storecommand to save a store forbclito use later. Then, use
thebcli settings active-storecommand to select which saved store should be used for your management commands.Oncebclihas an active store, you can make DELETE, GET, POST, and PUT commands to manage resources on that store.Supported CommandsDelete a BigCommerce resource.bcli delete customers <customer id>bcli delete products <product id>bcli delete webhooks <webhook id>Get a list of BigCommerce resources.bcli get customersbcli get order-products <order id>bcli get ordersbcli get product-variants <product id>bcli get productsbcli get webhooksGet details about a BigCommerce resource.bcli get customers <customer id>bcli get order-products <order id> <order product id>bcli get orders <order id>bcli get product-variants <product id> <variant id>bcli get products <product id>bcli get webhooks <webhook id>Update a BigCommerce resource.bcli put customers <customer id>bcli put product-variants <product id> <variant id>bcli put products <product id>bcli put webhooks <webhook id>Create a BigCommerce resource.bcli post customersbcli post productsbcli post webhooksManagebclisettings.bcli settings delete-storebcli settings list-storesbcli settings add-storebcli settings active-store
Package: bigcsv
bigcsv: A small Python library to manipulate large csv files that can't fit in memory.Transpositionbigcsvallows for easy calculation of csv transposes, even when the csv is much too large to fit in memory.Converting to h5adIf data is purely numeric, it is much more efficient to store in inh5ad(readable byAnnData), which uses the amazing HDF5 format under-the-hood.InstallationTo install, runpip install bigcsvHow to useAll operations are method of theBigCSVclass, which contains metadata information used to do all calculations.frombigcsvimportBigCSVobj=BigCSV(file='massive_dataset.csv',chunksize=400,# Number of rows to read in at each iteration# leave as default# insep=',',# outsep=',',# chunksize=400,# save_chunks=False,# quiet=False,)obj.to_h5ad(outfile='converted.h5ad')# Or maybe we want to keep as csv, but transpose it (in the case of non-numerical data)obj.transpose(outfile='dataset_T.csv')Documentationbigcsv.BigCSVClass containing methods for manipulating csvs.Parameters:file: Path to input fileoutfile: Path to output file (transposed input file)insep=',': Input separator for delimited file, by default is,outsep=',': Output separator for delimited file (in the case of csv --> csv operations)chunksize=400: Number of lines per iterationsave_chunks: To save intermediate chunks or notchunkfolder=None: Optional, Path to chunkfolderquiet=False: Boolean indicating whether to print progress or notbigcsv.BigCSV.transpose_csvParameters:outfile=None: Ouput file to write to, or if specified in initialization, writes to that file namebigcsv.BigCSV.to_h5adParametersoutfile=None: Ouput file to write to, or if specified in initialization, writes to that file namesparsify: bool=False: Sparsify rows in h5 matrixcompression: str='infer': Compression format of input csv, if compressed. Probably just leave to infer unless the filename is weird.lines: int=None: Number of lines in the file. If you know a priori, this saves some time. Also cannot be calculated for compressed files.dtype: Any=None: dtype of entries of input matrixindex_col: str=None: Column of input csv to use as index, if any.index: bool=True: Save index when converting to h5ad.