Saravanan666/pypi-org huggingface dataset:
Package: invertmeeg
invertmeeg- A high-level M/EEG Python library for EEG inverse solutions :dart:This package contains various (>50) approaches to solve the M/EEG inverse
problems :leftwards_arrow_with_hook:. It integrates with themne-pythonframework.Read theDocumentation here!Install the package frompypi:pip install invertmeegTo check if the installation works run:python -c 'import invert'To test the package simply run:pytest testsTo calculate an inverse solution usingminimum norm estimatessimply type:from invert import Solver

# fwd = ...
# evoked = ...

# Create a Solver instance
solver_name = "MNE"
solver = Solver(solver_name)

# Calculate the inverse operator
solver.make_inverse_operator(fwd)

# Apply the inverse operator to your data
stc = solver.apply_inverse_operator(evoked)

# Plot the resulting source estimate
stc.plot()There are many solvers implemented in the package, and you can find themhere!I am looking for collaborators! If you are interested you can write an :email: tolukas_hecker@web.de
Package: invertransforms
invertransformsA library which turns torchvision transformationsinvertibleandreplayable.InstallationpipinstallinvertransformsUsageSimply replace previous torchvision import statements and enjoy the new features.# from torchvision import transforms as TimportinvertransformsasTtransform=T.Compose([T.RandomCrop(size=256),T.ToTensor(),])img_tensor=transform(img)# invertimg_again=transform.invert(img_tensor)# replayimg_tensor2=transform.replay(img2)# trackforiinrange(n):img_tensor_i=transform.track(img_i)# ...inverse_tf=transform.get_inverse(j)# or transform[j]img_j=inverse_tf(img_tensor_j)All transformations have aninversetransformation attached to it.inv_transform=transform.inverse()img_inv=inv_transform(img)Notes:If a transformation is random, it is necessary to apply it once before callinginvertorinverse(). Otherwise it will raiseInvertibleError.
On the otherhand,replaycan be called before, it will simply set the randomness on its first call.One can create its own invertible transforms either by using the
practicalLambdaclass function or by extending theInvertibleclass available
in theinvertransforms.libmodule.DocumentationThe library'sdocumentationcontains the full list oftransformationswhich includes all the ones from torchvision and more.Use CasesThis library can be particularly useful in following situations:Reverting a NN-model output in order to stack predictionsApplying the same (random) transformations the same way on different inputsFeaturesInvert any transformations, even random onesReplay any transformations, even random onesTrack all transformations to invert them long afterAll classes extend its torchvision transformation equivalent class.
This means, you can just replace your previous torchvision import statements and it will not break your code.Extensive unit testing (100% coverage, be safe, hopefully)Requirementspython>=3.6

torch>=1.2.0
torchvision>=0.4.0Future Improvements[WIP] Extend the number of tranformations (e.g. random rotation and cropping (within the rotated area))Make the transformations on tensors directly (data augmentation/transformation on GPU)ContributeYou found a bug, think a feature is missing or just want to help ?Please feel free to open an issue, pull request or contact memail@gregunz.io
Package: investec-api-python
About The ProjectA simple Python client library to interact with theInvestec Bank API, one of a number of existing clientimplementationswhich are also mentioned in the acknowledgement section below. This client has a few noteworthy features:No runtime dependencies outside of the Python built-in functionality.A single client interfaceInvestecOpenApiClientwhich inherits function definitions for all supported API scopes.Full support for switching to API sandbox endpoints with a single client parameteruse_sandbox.Additional HTTP headers can be specified to optimize client performance, such as{'Accept-Encoding': 'gzip, deflate, br'}.Full separation of implementation between API scope implementations for ease of extensions.(back to top)LimitationsAt the time of writing, API support is limited to theaccount scopeand limitedcard scope. Pull requests are welcome.Although Investec Bank publish their API schema as an Open API specification, I hadspecificdifficulty in generating a client from only the JSON schema files using a fewoptions. More experimentation is needed to obviate the need to write a client from first principles.(back to top)SetupGet the package onPyPi.I recommend the use ofPoetryfor dependency and runtime management. Follow the instructions on the Poetry sitehere.(back to top)Example UsageFor an example of how this library works, check out this simplesample application.(back to top)LicenseDistributed under the MIT License. SeeLICENSEfor more information.(back to top)AcknowledgmentsAdditional well-established Python clients built by the Investec Programmable Bankingcommunity:ipb-python-wrapperinvestec-open-api-pythoninvestec-openbanking-pythonInvestec Open API:Investec Open APIBuilt with Investec Open APIThis project benefits from these supporting projects:All the Shields(back to top)
Package: investec-open-api
Investec Open APIInvestecs open-banking API gives users and services the ability to automate banking processes otherwise left to requiring manual interaction. The Investec open banking API is under active development and users may experience bugs or service interruptions at times.InstallationRequires python 3.7 or above. Available via pypi package managerpipinstallinvestec-open-apiUsagefrominvestec_open_apiimportInvestecClientclient=InvestecClient('client_id','secret')get_accountsLists the users accounts.client.get_accounts()Example Response[{'accountId':'xxxxxxxxxxxxxxxxxxxxx','accountNumber':'100xxxxxxxxxx','accountName':'MrJSmith','referenceName':'MrJSmith','productName':'PrivateBankAccount'},]get_account_balanceGet the accounts current balance.client.get_balance('account_id')Example Response{'accountId':'xxxxxxxxxxxxxxxxxxxxx','currentBalance':-2269.8,'availableBalance':639.2,'currency':'ZAR'}get_account_transactionsLists all transactions associated with the account in a given time period.client.get_account_transactions('account_id')Example Response[{'accountId':'xxxxxxxxxxxxxxxxxxxxx','type':'DEBIT','transactionType':'DebitOrders','status':'POSTED','description':'COMPANYXXXXXXXXX','cardNumber':'','postedOrder':1116,'postingDate':'2022-10-03','valueDate':'2022-10-03','actionDate':'2022-10-03','transactionDate':'2022-10-03','amount':205.05,'runningBalance':-2269.8},]transferTransfer funds between two internal accounts. The accounts can be retrieved using get_accounts.client.transfer('account_id','beneficiary_account_id',5)get_countriesGets a list of countries.client.get_countries()Example Response[{'Code':'ZA','Name':'SouthAfrica'},{'Code':'GB','Name':'UnitedKingdomofGreatBritainandNorthernIreland(the)'}]get_currenciesGets a list of currencies.client.get_currencies()Example Result[{'Code':'ZAR','Name':'SouthAfricanRand'},{'Code':'GBP','Name':'BritishPound'}]get_merchantsFetches a list of mcc codes, these merchant codes can be used to determine what the transaction can be classified as.client.get_merchants()Example Result[{'Code':'7623','Name':'A/C,RefrigerationRepair'},{'Code':'8931','Name':'Accounting/BookkeepingServices'}]
Package: investec-python
investec-pythonA Python wrapper for the Investec Banking API🛣️Project Roadmap📘Documentation🚀 QuickstartInstall it:pipinstallinvestec-pythonRun it:frominvestec_pythonimportInvestecinvestec=Investec(use_sandbox=True)accounts=investec.accounts.list()foraccountinaccounts:account_balance=account.balance()account_transactions=account.transactions()For interacting with real account data seehere.GoalsInteract with the Investec Banking API in the most Pythonic way possible100% feature parity with the Investec Banking API
Package: investify
investifyUtility tool which scrapes investing.com website for price updates and send whatsapp notification if it breaches a predefined threshold.SetupYou can clone the project and simply run the script. You need to have atwilioaccount (a free one would do as well). Setup your whatsapp dashboard in twilio first and use that numbers in the script. For the authentication export your Account SSID and Authentication token as follows :-Account SSID$ export TWILIO_ACCOUNT_SID='ACXXXXXXXXXXXXXXXXXXXXXXXXXXX'Authentication token$ export TWILIO_AUTH_TOKEN='XXXXXXXXXXXXXXXXXXXXXXXXX'Usage$pythoninvestify.py+1456789012+31234567789cryptobtc-usd6600-6700--sub-marketbitcoin--threshold10This will notify when btc-usd prices breaches the price band of 6600-6700. It currently resets the price band from the last breached price.The tool will logging INFO (or DEBUG) level messages in standard out. This can certainly be redirected to a specified log file.Debug level messages as follows :-$pythoninvestify.py--debug+11234567890+7112356789cryptobtc-usd6600-6700--sub-marketbitcoin--threshold10--interval0.12020-04-0520:13:38[DEBUG]main()-Loggingsettodebug2020-04-0520:13:38[DEBUG]main()-crypto/bitcoin/btc-usdendpointwillbequeried.2020-04-0520:13:39[DEBUG]run()-Fetchedpagesuccessfully.2020-04-0520:13:39[DEBUG]run()-Priceofbtc-usdis$6804.9.2020-04-0520:13:39[INFO]run()-Price6804.9breachedpriceband[6600.0,6700.0].2020-04-0520:13:39[DEBUG]run()-Resettingpricebandwiththresholdvalue10.0.2020-04-0520:13:39[INFO]run()-Resettingpricebandto[6798.0951,6811.704899999999].2020-04-0520:13:39[DEBUG]run()-Sendingtext.2020-04-0520:13:46[DEBUG]run()-Fetchedpagesuccessfully.2020-04-0520:13:46[DEBUG]run()-Priceofbtc-usdis$6803.6.
^C2020-04-0520:13:49[INFO]main()-Caughtinterrupt,exiting...Help menu for the tool.$pythoninvestify.py-h
Usage:investify.py[options...][tonumber][fromnumber][market][contract][priceband]Utiltiyscripttonotifyifinstrumentpricefluctuatesoutofpriceband.

Options:-s,--symbolTEXTContractsymbol.[default:contract]-t,--thresholdFLOATThresholdinbps.[default:100.0]-i,--intervalFLOATIntervaltoperformcheck(mins).[default:1.0]-m,--sub-marketTEXTE.g.cryptoismarketandbitcoinissubmarket.-d,--debugPrintdebugmessages.-h,--helpShowthismessageandexit.to numbershould be your whatsapp number whereasfrom numbershould the number given by Twilio to be used for your whatsapp sandbox. You can consult official Twilio for whatsapppage.
Package: investigraph
investigraphResearch and implementation of an ETL process for a curated and up-to-date public and open-source data catalog of frequently used datasets in investigative journalism.Usingprefect.iofor ftm pipeline processingDocumentationTutorialinstallationinvestigraphrequires at leastPython 3.11pip install investigraphexample datasetsThere is a dedicatedrepofor example datasets that can be used as aBlockwithin the prefect.io deployment.deploymentdockerdocker-compose.ymlfor local development / testing, usedocker-compose.prod.ymlas a starting point for a production setup.More instructions hererun locallyInstall app and dependencies (use a virtualenv):pip install investigraphOr, e.g. when usingpoetry:poetry add investigraphAfter installation,investigraphas a command should be available:investigraph --helpQuick run a local dataset definition:investigraph run -c ./path/to/config.ymlRegister a local datasets block:investigraph add-block -b local-file-system/investigraph-local -u ./datasetsRegister github datasets block:investigraph add-block -b github/investigraph-datasets -u https://github.com/investigativedata/investigraph-datasets.gitRun a dataset pipeline from a dataset defined in a registered block:investigraph run -d ec_meetings -b github/investigraph-datasetsView prefect dashboard:make serverdevelopmentThis package is usingpoetryfor packaging and dependencies management, so firstinstall it.Clone investigraph repository to a local destination.Within the root directory, runpoetry install --with devThis installs a few development dependencies, includingpre-commitwhich needs to be registered:poetry run pre-commit installBefore creating a commit, this checks for correct code formatting (isort, black) and some other useful stuff (see:.pre-commit-config.yaml)testmake testsupported byMedia Tech Lab Bayern batch #3
Package: investingfetcher
📈 PyInvestingDataFetcherA simple Python library to fetch equity data from investing.com.Disclaimer: I created this library for fun and learning. I'm not sure about the proper ways to utilize this data. Maybe it's useful for someone out there! 🤷‍♂️ Also, I haven't checked the terms of service of investing.com closely, so using this might not align with their policies. Please ensure you're in compliance before using! 🚫
📜 Table of Contents📜 Table of ContentsInstallationUsageConfigurationContributingLicense🛠 InstallationTo install the library, just do:pipinstallPyInvestingDataFetcher🚀 UsageFetching data is a breeze with PyInvestingDataFetcher. Here's how:frominvestingfetcher.equityimportEquityfrominvestingfetcher.fetchersimportLazyEquityFetcherif__name__=="__main__":fetcher=LazyEquityFetcher('api_key.config',as_single_df=True)res=fetcher[Equity.tesla]Replace Equity.tesla with your desired equity name and see the magic! 🎩✨⚙ ConfigurationRemember to set up your api_key.config with the necessary keys and configurations to access investing.com data.
api_key.config should look like this:api_key=[your_api_key_here]
Package: investing-tickets-scraper
investing-tickets-scraperThis package scraps all tickets available from "investing.com" siteHow to installInstalling "investing-tickets-scraper" from pypi (recomended).pipinstallinvesting-tickets-scraperHow to use# Import the libraryfrominvesting_tickets_scraper.scraperimportScraperimportpandasaspd# Create the object scraper using the imported classscraper=Scraper()# Configurates the scraperscraper.config(chromedriver_path="C:\Program Files (x86)\chromedriver.exe",# Chromedriver_path = chromedriver for Selenium, if you don't know what is it, check this video "https://youtu.be/Xjv1sY630Uc" and install itcountry="United States")# Country = the country you want to scrap the tickeks. To check all countries available you can use "print(scraper.contries_available())"# Start scrapingscraper.scrap()# It will open the Google Chrome and scrap it. Is recommended not to use the mouse and the keboard# Return the data as a pandas dataframedf=scraper.return_dataframe()print(df)# df
Package: investlib
InvestLibInvestLib is a Python package for backtesting ETF investments. It allows you to create strategies, filter ETFs, and allocate capital based on your personal preferences within a rebalancing period.FlowChoose etfsChoose rebalancing timer (every month, every 3 month at a custom interval)Filter certain ETFs for the next period.Allocate the current budget based on your chosen allocationRebalanceMonthlyTimerclass allow you to set number of month to execute the rebalancing and on which day. Common possibilities includesFirstFriday.FiltersFilters allow you to select a group of etfs in your list based on specific conditions, to create for example a momentum selection every month:
- Percentage variation in month/days
- Sharpe ratio (assuming risk-free rate as zero)AllocationsYou can allocate percentages between the chosen ETFs using:
- Fixed allocation
- Statically
- Dinamically based on the number of filtered ETFs
- PctChangeRank
Allow you to make a ranking on filtered ETF and allocate money based on your preferenceDataThe current unique data source is Tiingo. InvestLib automatically manages cash to avoid making repeated data calls. To use this feature, you need to create a free account on Tiingo and set the following environment variables:tiingo_api_key: the API token provided by Tiingo upon subscriptiontiingo_backup_path: the folder where you want to save the end-of-day CSV data for all the ETFs you need (default '/tmp/Tiingo').InstallationI raccomand to use virtualenv:pip install investlibExampleHere's some code to test out some famousportfolios:60/40 (60 stocks/40 bond)import os

from investlib.strategy import Strategy
from investlib.rebalance import FixedAllocation
from investlib.rebalance import MonthlyTimer
from investlib.rebalance import FirstFriday
from investlib.report.draw import generate_report

os.environ['tiingo_api_key'] = '<tiingo_api_key>'

start = '2007-01-01'
end = '2021-06-04'
tickers = ['VTI', 'IEF']

# We create a strategy that rebalances the current money (invested + cash) to 60% VTI and 40% IEF
# every month on the first Friday.
s = Strategy(
    tickers, 
    start=start, 
    end=end, 
    timer=MonthlyTimer(months=1, day=FirstFriday()),
    allocation_class=FixedAllocation({'VTI':0.6,'IEF':0.4})
)
s.run()

generate_report(s, path='/tmp/6040.pdf', name='60/40')Futures- Add more stats
- Add more source of data
- Currency
- Tax
- Portfolio over Strategy
Package: investment
A Python App for InvestmentFeatures9000+ tickers as included in major indexes and exchanges (DOW 30, NASDAQ 100, S&P 500, Russell 2000, ARK investment, etc.)Breakdown by 11 sectors and 145 industries; key info for each ticker; Common indicators: ADX, RSI, Money Flow, OBV, A/D, MACD, PPO, PVI/NVI, Bollinger BandsAn ETF database of 2000+ tickers, and an equity database of 7000+ tickersInstall and Execute$python-mvenvenv# the binary may be called 'python3'$sourceenv/bin/activate# for Linux and macOS$env\Scripts\activate.bat# for Windows$pipinstallinvestment# this only needs to be done once$python-minvestment# after installation, execute within the virtual environment (recommended)# Note: to obtain price target, package 'selenium' and a Chrome browser driver must be installed on your computer first
# see https://pypi.org/project/selenium/Sample Screenshot
Package: investment-rebalancer
ReadmeOverviewinvestment-rebalancer is a terminal application that helps one to rebalance one's portfolio. A configuration is used to define the classifications into which you want to divide your portfolio (e.g. regions, factor investing, core/satellite).Example configurations70/30 portfolioThis example describes a classic 70/30 portfolio. The portfolio is invested 70% in developed markets and 30% in emerging markets.
In this example, the two ETFsLyxor Core MSCI Worldand LyxorMSCI Emerging Marketswere chosen as investments.{"classifications":{"Regions":{"Developed World":{"target_allocation":70.0,"assets":["LU1781541179"]},"Emerging Markets":{"target_allocation":30.0,"assets":["LU0635178014"]}}},"etf":{"LU1781541179":{"name":"Lyxor Core MSCI World","enabled":true,"quantity":100,"ter":0.12},"LU0635178014":{"name":"Lyxor MSCI Emerging Markets","enabled":true,"quantity":50,"ter":0.14}}}70/30 portfolio with small capsThis example is an extension to the above 70/30 portfolio. Again, 70% of the capital is allocated to developed markets and 30% to emerging markets. In addition to the already existing classification Regions, there is now also a classification Factor. 15% of the capital is supposed to be invested with the factor small caps. The remaining 85% should be invested in large and mid caps.
In addition the two ETFs iSharesMSCI World Small CapandSPDR MSCI Emerging Markets Small Capwere selected for this example.{"classifications":{"Regions":{"Developed World":{"target_allocation":70.0,"assets":["LU1781541179","IE00BF4RFH31"]},"Emerging Markets":{"target_allocation":30.0,"assets":["LU0635178014","IE00B48X4842"]}},"Factor":{"Large Cap":{"target_allocation":85.0,"assets":["LU1781541179","LU0635178014"]},"Small Cap":{"target_allocation":15.0,"assets":["IE00BF4RFH31","IE00B48X4842"]}}},"etf":{"LU1781541179":{"name":"Lyxor Core MSCI World","enabled":true,"quantity":200,"ter":0.12},"LU0635178014":{"name":"Lyxor MSCI Emerging Markets","enabled":true,"quantity":50,"ter":0.14},"IE00BF4RFH31":{"name":"iShares MSCI World Small Cap","enabled":true,"quantity":65,"ter":0.35},"IE00B48X4842":{"name":"SPDR MSCI Emerging Markets Small Cap","enabled":true,"quantity":2,"ter":0.55}}}
Package: investment-tracker
Investment TrackerTracks investments by pulling investment data from the web and storing your transaction data locally on your machine.Free software: MIT licenseDocumentation:https://investment-tracker.readthedocs.io.FeaturesCompletedSQLAlchemy models with relationshipsStoring data offline in a portable file using sqliteLogging stock transactions for different usersManual tracking of stock prices and some stock metadata in a databaseTODOCommand line interface with clickIEXFinance API integration to retrieve stock data from the webAggregate overview of investment statistics and plot generation using MatplotlibProper tests with PyTest and CI with Travis CIComplete documentationCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-02-12)First release on PyPI.
Package: investos
InvestOSWelcome to theInvestOSportfolio engineering and backtesting framework!InvestOS is an opinionated framework for constructing and backtesting portfolios in a consistent, albeit flexible way. We built it to make institutional-grade backtesting and portfolio optimization simple, extensible, and open-source.DocsPackageMetaGetting Started🔗Read the full Getting Started guides HerePrerequisitesTo run InvestOS you'll need:Python +3.8You candownload it hereIf you're working on MacOS, you may wish toinstall it via HomebrewpipFor installing InvestOS (and any other Python packages)pip installation instructions hereAlthough not required, running InvestOS might be easier if you have:Poetry, a package and dependency managerFamiliarity withpandasThe popular Python data analysis package (originally) released by AQR Capital ManagementInstallationIf you're using pip:$pipinstallinvestosIf you're using poetry:$poetryaddinvestosImporting InvestOSAt the top of your python file or .ipynb, add:importinvestosasinvCongratulations on setting up InvestOS!Let's move on to our next guide:How InvestOS WorksContributingInvestOS is an open-source project and we welcome contributions from the community.If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.Contributors ✨