Saravanan666/pypi-org huggingface dataset:
Package: exchange-interface
This module allows access to Microsoft Office 365 account calendars.
It allows for personal, delegate, and service accounts.Installpip install exchange_interfaceExample Scriptimport requests
from exchange_interface import EWS
import datetime

ews = EWS(
    username='me@email.com',
    password='SuperSecretPassword',
)
ews.Connected = lambda _, state: print('EWS', state)
ews.Disconnected = lambda _, state: print('EWS', state)
ews.NewCalendarItem = lambda _, item: print('NewCalendarItem(', item)
ews.CalendarItemChanged = lambda _, item: print('CalendarItemChanged(', item)
ews.CalendarItemDeleted = lambda _, item: print('CalendarItemDeleted(', item)

ews.UpdateCalendar()

print('Events happending now=', ews.GetNowCalItems())

print('Event(s) happening next=', ews.GetNextCalItems())

nowDT = datetime.datetime.now()
nowPlus24hrs = nowDT + datetime.timedelta(days=1)

print('Events happening in the next 24 hours=', ews.GetEventsInRange(startDT=nowDT, endDT=nowPlus24hrs))

# You can create a new event like this:
ews.CreateCalendarEvent(
    subjec='Test Subject',
    body='Test Body',
    startDT=datetime.datetime.now(),
    endDT=datetime.datetime.now() + datetime.timedelta(hours=1),
    )Service Accountsimport requests
from exchange_interface import EWS

ews = EWS(
    username='serviceAccount@email.com',
    password='SuperSecretPassword', # the service account password
    impersonation='roomAccount@email.com'
)Oauthimport requests
from exchange_interface import EWS

def GetAccessToken():
    # do the oauth magic here
    return 'theOauthToken'

ews = EWS(
    username='serviceAccount@email.com',
    oauthCallback=GetAccessToken, # this will be called before each HTTP request is sent
    impersonation='roomAccount@email.com'
)
Package: exchangelib
Exchange Web Services client libraryThis module is an ORM for your Exchange mailbox, providing Django-style access to all your data. It is a
platform-independent, well-performing, well-behaving, well-documented, well-tested and simple interface for
communicating with an on-premise Microsoft Exchange 2007-2016 server or Office365 using Exchange Web Services
(EWS). Among other things, it implements autodiscover, and functions for searching, creating, updating, deleting,
exporting and uploading calendar, mailbox, task, contact and distribution list items.TeaserHere's a short example of howexchangelibworks. Let's print the first
100 inbox messages in reverse order:fromexchangelibimportCredentials,Accountcredentials=Credentials("john@example.com","topsecret")account=Account("john@example.com",credentials=credentials,autodiscover=True)foriteminaccount.inbox.all().order_by("-datetime_received")[:100]:print(item.subject,item.sender,item.datetime_received)DocumentationDocumentation is available athttps://ecederstrand.github.io/exchangelib/.
Source code documentation is available athttps://ecederstrand.github.io/exchangelib/exchangelib/.
Package: exchangelib-listener
Inbox event listener for exchangelibThis library listens for events in the inbox and raises an event.UsageCreate listener:fromexchangelibimportDELEGATE,Account,Credentials,Configurationfromexchangelib.propertiesimportNewMailEvent,MovedEventfromexchangelib_listenerimportListenercreds=Credentials(username='EMAIL_ADDRESS',password='PASSWORD')config=Configuration(server='SERVER',credentials=creds)acct=Account(primary_smtp_address='EMAIL_ADDRESS',config=config,access_type=DELEGATE)listener=Listener(acct)Create a method to call when events are raised:defevents_received(events):foreventinevents:ifisinstance(event,NewMailEvent):# Do somethingelifisinstance(event,MovedEvent):# Do somethinglistener.streaming_events_received+=events_receivedlistener.listen()Or receive a single event:defnew_messaged_received():# Do somethinglistener.streaming_event_received+=new_messaged_receivedlistener.listen(NewMailEvent)
Package: exchange-log-handler
exchange_log_handlerLog handler to send log via exchangeDependenciesThis library usedecederstrand/exchangelibto send exchange mail.How to install:pip install exchange_log_handlerUsage:if __name__ == '__main__':
    import logging
    import logging.config
    logging.config.dictConfig({
        'version': 1,
        'disable_existing_loggers': False,
        'handlers': {
            'console': {
                'level': 'INFO',
                'class': 'logging.StreamHandler',
                'stream': 'ext://sys.stdout',
            },
            'email': {
                'level': 'ERROR',
                'class': 'exchange_log_handler.ExchangeHandler',
                'credentials': ('email_address', 'email_password'),
                'subject': lambda r: '{0}-{1}'.format(r.levelname, r.name),
                'toaddrs': 'recipient_email_address',
            },
        },
        'loggers': {
            '': {
                'handlers': [ 'console', 'email' ],
                'level': 'DEBUG',
                'propagate': True,
            },
        },
    })

    logger = logging.getLogger(__name__)
    try:
        raise ValueError('This is a test exception.')
    except Exception as e:
        logger.exception(e)
Package: exchange-metadata-converter
SetupInstalling from PyPIThe package is published onPyPI.$ pip install exchange-metadata-converterInstalling from source codeTo install the package from source code, run$ git clone https://github.com/CODAIT/exchange-metadata-converter.git
$ cd exchange-metadata-converter
$ pip install .ValidationThe package should pass flake8 and the unit tests in the/testsdirectory.$ pip install -r test_requirements.txt
$ flake8 .
$ python -m unittest tests/*.pyRunning the converterDisplay help:$ python metadata_converter/apply.py -hReplace{{...}}placeholders inmy.templatewith values frommy.yaml. The completed template is displayed on STDOUT.$ python metadata_converter/apply.py my.yaml my.templateReplace{{...}}placeholders inmy.templatewith values frommy.yaml. The completed template is stored inmy_completed.template.$ python metadata_converter/apply.py my.yaml my.template -o my_completed.templateProgrammatic invocationSee example source code inexamples/.TemplatesExample template files for DLF and OpenAIHub can be found in thetemplates/directory.DAX data set descriptorsDescriptor files for DAX data sets can be found in thedax-data-set-descriptors/directory.LicenseApache-2.0
Package: exchange-radar
exchange-radar: Real-time Crypto Exchange Trades MonitorWelcome to Exchange Radar, your gateway to real-time trade data from major cryptocurrency exchanges.Supported ExchangesExchange Radar currently supports the following top exchanges by reputation and trading volume:BinanceCoinbaseKrakenKuCoinOKXBybitBitstampMEXCHTXBuild & RunGet started effortlessly:Locally$ docker-compose -f local.yml up --build -dProduction$ docker-compose -f production.yml up --build -dScale the consumer service horizontally with 2 instances:$ docker-compose -f production.yml up --build --scale consumer=2Run Test Cases & Code CoverageTests$ make testsCode Coverage$ make coverageRun Benchmarks$ make benchmarkExample of the benchmark output can be seenhere.UIExplore real-time trade information effortlessly:Visithttp://127.0.0.1:9000/BTCto access real-time BTC trades.To track BTC whales' transactions, navigate tohttp://127.0.0.1:9000/BTC/whales.For BTC dolphins' transactions, usehttp://127.0.0.1:9000/BTC/dolphins.To monitor BTC octopuses' transactions, head tohttp://127.0.0.1:9000/BTC/octopuses.Feel free to replace BTC with any other supported coin across the exchanges.Hardware RequirementsExchange Radar operates efficiently without requiring extensive resources. In fact, all services run seamlessly on a single Raspberry Pi 4.
Package: eXchangeRate
XR (exchange rate)사전작업ROOT_PATH 를 OS-환경변수로 수동으로 저장.
: export ROOT_PATH=your_root_path임시방편 작업 (PyPI 패키지 정식 등록 전)LIB_PATH 를 OS-환경변수로 수동으로 저장.
: export LIB_PATH=~/libs
Package: exchange-rate-alert
Exchange Rate AlertCreates desktop alerts when the Transferwise exchange rates hit a target rate. Checks conversion rate every time the polling interval has passed.Currently running on Windows and Linux, PIP version 20.0.1Before UsingBefore the module can be used the user has to create a Transferwise API token. The detailed instructions can be found here -https://api-docs.transferwise.com/#payouts-guide-api-accessThe program will try and find the access token in the following mannerSystem Variable named TCR - create a system variable named TCRConfiguration file - located at%HOMEDRIVE%%HOMEPATH%/.tcron windows or~/.tcron linuxAdd the token information in the file[default]
token=aaaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeInstallationInstall package from pippip install exchange-rate-alertUsage1. From Command Promptera --source SEK --target INR --alert-rate 8.5 --poll-interval=30eraand respond to prompts2. As a python moduleImport into python scriptfrom ratealert import ConversionAlertCall the constructor, wait for alert, profit!ConversionAlert(source, target, alert_rate, poll_interval)Examplefrom ratealert import ConversionAlert
ConversionAlert('SEK', 'INR', 8.5, 60)This will create a notification when the Transferwise exchange rate crosses the alert rate.The rates will be checked every 60 seconds if the polling interval option is not provided.Exit the script by Ctrl+CChange notes0.8 - Polling interval as an option, minor fix for Linux0.7 - support for Linux, installs packages based on OS0.6 - Command line execution, input prompts0.3 - Alert on a target conversion rate0.1 - Alert at specified intervalsNext stepsQuotation request and transfer lock on target conversion rateOAuth login for TransferwiseSupport for other clients (Remitly?)
Package: exchangerate-client
IntroductionThis is unofficialexchangerate.hostpython client library.exchangerate.host is a simple and lightweight free service for current and historical foreign exchange rates & crypto exchange rates.Getting startedInstallationUsing pippip install exchangerate-clientUsageGet all currency symbolsimport exchangerate
client = exchangerate.ExchangerateClient()
print(client.symbols())Get latest ratesimport exchangerate
client = exchangerate.ExchangerateClient()
print(client.latest())Development guideTestingThis package usestoxto run testing automation against multiple python versions, to install and run tox, usepip install tox
toxLocal developmentInstall to local env withpip install --editable .Then this will workpython -c "import exchangerate"
Package: exchangeratesapi
pyexchangeratesapiThis is an unofficial Python wrapper for freeExchangeRatesAPI, which provides exchange rate lookups courtesy of theCentral European Bank. It features a number of useful functions and can be installed easily usingpip.
Additionally wrapper is providing CLI interface.InstallationpipinstallexchangeratesapiPython usagefromexchangeratesapiimportrateslatest=rates.latest()latest["base"]latest["date"]latest=rates.Rates()latest.baselatest.datehistory=rates.history(start_at="2020-01-01",end_at="2020-12-31",base="PLN")history["base"]history["start_at"]history["end_at"]history=rates.HistoryRates(start_at="2020-01-01",end_at="2020-12-31",base="PLN")history.basehistory.start_athistory.end_at
Package: exchange-rates-last-hm-alex
Exchange rates serviceYandex last homework task. Realization of exchange rates serviceGetting project from gitlabFirstly you must download source code of project from gitlab repository$ git clone https://gitlab.com/ExampleUserForYandex/lastand go inside project's folder$ cd /path/to/cloned/projectRun project's testsFor run tests firstly activate virtual environment by:$ source venv/bin/activateand after that install requirements by:$ (venv) pip3 install -r requirements.txt
$ (venv) pip3 install -r requirements.tests.txtNow we can run tests$ (venv) pytest testIf all is ok you'll get=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.7.3, pytest-5.2.2, py-1.8.0, pluggy-0.13.0
rootdir: /path/to/cloned/project
plugins: aiohttp-0.3.0, aiomisc-9.4.1
collected 5 items                                                                                                                                                                                                 

test/test_rest.py ..                                                                                                                                                                                        [ 40%]
test/test_services.py .                                                                                                                                                                                     [ 60%]
test/test_updater.py ..                                                                                                                                                                                     [100%]

================================================================================================ 5 passed in 1.28s ================================================================================================Collect python packageFirstly check setup.py file for may be some config changes (e.g. package name, version and etc).To collect python package run:$ python3 setup.py sdist bdist_wheelNote: Be sure that you are in project root folderNext step is install utility for uploading to Python Package index$ pip3 install --user --upgrade twineFinally, we can upload out project to Python Package index$ python3 -m twine upload dist/*And it will be available onyour project listsNote: that you must have account for uploading your packageCreate docker image runTo create docker image run:$ sudo docker build -t any_name .Note:any_namewill be name of created image. So may be you want change itRun docker imageTo run docker image write:$ sudo docker run -d -p 8082:8082 image_nameNote:image_namemust be a name of created image in previous step.Now our service is available.Check it
Package: exchange-rates-mariana-drozd
Official Repo:https://gtlb.jetsoftpro.com/mariana.drozd/exchange_rates_mariana_drozdIt uses the following libraries:Requestsfor requests to exchange ratesPandasfor working with tablesMatplotlibfor plotsQuick Install / Usagepipinstallexchange_rates_mariana_drozdfromdatetimeimportdatetimefromexchange_rates_mariana_drozdimportget_exchange_rates_from_date_to_datedefmain():exchange_rates_from_date_to_date=get_exchange_rates_from_date_to_date(datetime(day=15,month=4,year=2019),datetime(day=20,month=4,year=2019),currency="USD",save_to_csv_file=False,save_to_json_file=False,show_plot=False)print(exchange_rates_from_date_to_date)# Output:#    {# "15.04.2019": {#  "date": "15.04.2019",#  "bank": "PB",#  "baseCurrency": 980,#  "baseCurrencyLit": "UAH",#  "exchangeRate": [#   {#    "baseCurrency": "UAH",#    "currency": "UZS",#    "saleRateNB": 0.003243,#    "purchaseRateNB": 0.003243#   },#   {#    "baseCurrency": "UAH",#    "currency": "BYN",#    "saleRateNB": 12.64203,#    "purchaseRateNB": 12.64203#   },#   {#    "baseCurrency": "UAH",#    "currency": "TMT",#    "saleRateNB": 7.774029,#    "purchaseRateNB": 7.774029#   },#    ...Note:If you need to save data in CSV or/and JSON file, set needed parameter (save_to_csv_fileand/orsave_to_json_file) to "True".Also, if you want to see plot of selected currency, setshow_plotto "True"Example of USD currency plot:
Package: exchange-web-server
Exchange Web ServerThis project contains the basic files to send and save an email/attachment through the moduleexchangelib.InstallationNote that the module requiresPython 3.6or higher.To install the module, run a pip command like the following:pip install exchange-web-serverSetting .env VariablesTo work properly, this module needs your companies:tenant_idclient_idclient_secretUsage create_accountSimply import the modules via the following import statements:from exchange-web-server import create_account
account = create_account('user@provider.com')Thecreate_accountfunction requires your Outlook-Exchange email-address.Usage sendSimply import the modules via the following import statements:from exchange-web-server import send_emailThesend_emailfunction requires your account, subject, body, recipients and optional attachments.To send an email, the following code provides the core functionality:send_email(account, 'TestSubject', 'TestBody', ['recepient@provider.com'], ['path/to/your/attachments'])Usage saveSimply import the modules via the following import statements:from exchange-web-server import save_attachmentThesave_attachmentfunction requires your Outlook Exchange Folder, which needs to be located in your inbox. Also it needs a path where to save and an exchangelib account.To save an attachment, the following code provides the core functionality:save_attachment(account, 'TestSubject', 'TestBody', ['recepient@provider.com'])LicenseThis project is licensed by a MIT License.
Package: exciton
Exciton NLP - A tool for natural language processingExciton NLP is designed and maintained by the Exciton Research for different NLP tasks, including multilingual classification, NER, translation, etc.InstallationUsepipto install exciton. Run:pip install -U excitonUsagefrom exciton.nlp.translation import M2M100

model = M2M100(model="m2m100_1.2b", device="cuda")
source = [
    {"id": 1, "source": "I love you!", "source_lang": "en", "target_lang": "zh"},
    {"id": 2, "source": "我爱你！", "source_lang": "zh", "target_lang": "en"}
]
results = model.predict(source)
Package: exclog
Logging decorator.out ->brief   : function that takes a string.
default : printrtrn ->brief   : exclog return value
default : Falset ->brief   : Error indentation
default : ‘’
note    : Use tabulation or other symbolsImportpipinstallexclogUsageimportexclog@exclog.logging()def...deffileWrite(text:str):...@exclog.logging(__write=fileWrite,__rtrn='Error!',__t='\t\t')def...
Package: exclude-until-coverage-plugin
Acoverage.pyplugin that excludes lines until a marker is found.The plugin is pip installable:$ pip install exclude-until-coverage-pluginTo run it, add this setting to your.coveragercfile:[run]
plugins =
    exclude_until_coverage_pluginThen run your tests undercoverage.py.
This will use the default marker# = exclude above lines =and exclude all lines above the line this text appears on.
Use the plugin options to change the marker.
To change the marker, add this configuration value to your.coveragercfile:[exclude_until_coverage_plugin]
marker=# my marker
Package: exclusiveAI
This is a simple python library developed by Francesco Paolo Liuzzi and Paul Maximilian Magos for the Machine Learning course
of the University of Pisa AI Master's Degree.First time you clone the repo:>python3-mvenvbatNNvenv
>sourcebatNNvenv/bin/activate
>pipinstall--upgradepip
>pipinstall-rrequirements.txtActivate local env :>sourcebatNNvenv/bin/activateBuild the library:>pythonsetup.pybdist_wheelInstall the library:>pipinstall/dist/*.wheelOnce you have installed it you can call it like any other library:import batNNlib
from batNNlib import batNNNotice that this installation, if performed this way, will install the library in the local env.
To install it in any other environment such as your global env, deactivate the local one and activate yours:>deactivate

%condaactivatemyenv
or%pyenvactivatemyenvoretc...
Package: excolor
excolorsExtexnded color utilities for pythonInstallationpip install excolorExtra colormapsimport excolor

cmap = plt.get_cmap("gruvbox")
cmapColorize black-and-white imageHue and saturation cannot colorize black-and-white image. They only change pixels where levels of red, gree, blue are not the same.Colorize() function takes a greyscale or b&w image and adds colors to dark and light areas.fname = "pacman.png"

img = excolor.load_image(fname)

plt.figure(figsize=(2,2), facecolor="#00000000")
plt.imshow(img)
plt.axis("off")
plt.show()

img = excolor.colorize(fname, "yellow", "green")

plt.figure(figsize=(2,2), facecolor="#00000000")
plt.imshow(img)
plt.axis("off")
plt.show()Color cyclerSet ax color cycler based on cmap or list of colorsfrom sklearn.metrics import confusion_matrix

# Generate data for heatmap and scatter plot
np.random.seed(10)
y_true = (np.arange(50) > 25).astype(float)
x0 = np.random.normal(0,1,50) + y_true
x1 = np.random.normal(0,1,50) + y_true

# Predict y_true based on x0
y_pred = x0 > 0
c = confusion_matrix(y_true, y_pred)

# Plot heatmap of confusion matrix using "viridis" colormap
plt.figure(figsize=(4,2), facecolor="white")
plt.subplot(121)
plt.title("Heatmap")
sns.heatmap(c, annot=True, cmap="viridis", vmin=0)
plt.subplot(122)
plt.title("Scatterplot")

# Set "viridis" colors for color cycler to make scatter plot
excolor.set_color_cycler("viridis", n=2)
for i in range(2):
    mask = y_true == i
    plt.scatter(x0[mask], x1[mask])
plt.tight_layout()
plt.show()Log-scaling colormapsColor perlin noise using log-scaled colormap to visualize water causticsfrom pythonperlin import perlin

dens = 32
shape = (8,8)
x = perlin(shape, dens=dens)

# Log-scaled colormap
cmap = excolor.logscale_cmap("GnBu_r")

plt.figure(figsize=(6,6), facecolor="#00000000")
plt.imshow( np.abs(x), cmap=cmap)
plt.axis("off")
plt.show()Documentationhttps://excolor.readthedocs.io
Package: exconfig
Aboutexconfigis a Python library for working with input parameter files. It
provides parameter description and validation, as well as ways of working
with various file formats.Requirementsexonfigrequires Python 3.Apart from Python,exconfighas a number of other requirements, all of which
can be obtained through eitherpiporconda, that will be automatically
installed when you installexconfig.To see a full listing of the requirements, have a look at the project’srequirements.txtfile.If you are a developer ofexconfigyou will also want to install
additional dependencies for runningexconfig’s tests to make sure
that things are working as they should. These dependencies are listed
inrequirements-testing.txt.InstallationStable Releaseexconfig, and its dependencies, can be installed either withpiporconda. Usingpip:$ pip install exconfigUsingconda:$ conda install exconfig -c conda-forgeFrom SourceAfter downloading theexconfigsource code, run the following fromexconfig’s top-level folder (the one that containssetup.py) to
installexconfiginto the current environment:$ pip install -e .
Package: excoverflow
This package adds links to google and stackoverflow search results to the end
of uncaught exceptions in Python. It should work with either Python 2 or 3.To install:pipinstallexcoverflowTo use, simply import the package in any project file for which you want
internet results pages printed after the exception.importexcoverflowUnhandled exception output will be appended with links to google and
stackoverflow search results for python, the exception type, and the
exception message; e.g.Traceback(mostrecentcalllast):File"test.py",line5,in<module>val=5/0ZeroDivisionError:divisionbyzerohttps://www.google.com/search?q=python+ZeroDivisionError+division+by+zerohttps://stackoverflow.com/search?q=%5Bpython%5D+%22ZeroDivisionError+division+by+zero%22Inspired by this reddit posthttps://www.reddit.com/r/ProgrammerHumor/comments/7z6x65/the_button_we_all_needed/