Saravanan666/pypi-org huggingface dataset:
Package: driftmlp
DriftMLPThis package contains tools for implementing the methodology associated with the paperEstimating the travel time and the most likely path from Lagrangian driftersCode to reproduce figures from paper, hence a sample use of this package can be found atGithub link to paper figure reproduction code.DocumentationThe Documentation can be found @https://driftmlp.readthedocs.io/Interactive Web ApplicationMinimal ExampleThe below example produces an estimate of the pathway and travel time of going betweenfrom_locandto_loc.import driftmlp

T_mat = driftmlp.load_default_network()
from_loc = [-90.90, 23.88]
to_loc = [-9.88, 35.80] 
SP = driftmlp.shortest_path.SingleSP(T_mat, from_loc, to_loc)
display(SP)
SP.plot_folium()General usageThe package has 2 main usage componentsDriftMLP.driftfile_to_networkwill form the network from the hdf5 file above which is the most computationally intensive partDriftMLP.shortest_pathmodule contains functions which require a network to run.SingleSPis sufficient for most usage. It will take the network and a pair of locations and results in a class containing both the path there and back. The travel time of this path may be accessed via the .sp.travel_time attribute. Has methods.plot_cartopyand.plot_foliumfor convince.network_pathis a more customizable class which can be used for manual adaptations. It takes in two h3 indices and stores the path going from the first to the second. Stores travel path in network indices (.nid), spatial discretization indices (.h3id) and travel time in days (.travel_time).DriftMLP.rotationscontains functionality to generate random rotations. See paper for further details. This has two options one method by ARVO and one by shoemake. The Shoemake quaternion approach is advised.DriftMLP.plottingVarious functions for h3 index sequence plotting. Two backends are there on using folium, one using cartopy. Folium is easier to view and scroll around with. Cartopy/Matplotlib are far more customizable and can produce publication ready graphics.TODOPublish to pip/ conda-forge.
Package: drift-mqtt
Drift MQTT toolsA collection of helpers to work with MQTT:Client- wrapper aroundpaho.mqtt.Clientthat correctly handles subscriptions after reconnectInstallationpipinstalldrift-mqttOr get the latest version from GitHub:pipinstallgit+https://github.com/panda-official/DriftMqtt.gitUsageProducerfromdrift_mqttimportClientclient=Client('tcp://127.0.0.1:8000','client_id')client.connect()client.loop_start()...client.publish('topic','some message')Consumerfromdrift_mqttimportClientdefmessage_handler(message):print('Got message ',message.payload,message.topic)client=Client('tcp://127.0.0.1:8000',client_id='test_subscriber')client.subscribe('test_topic',message_handler)client.connect()client.loop_forever()For more details please checkexamples/folder
Package: drift-protocol
Drift Protocol for PythonA Python Protobuf library to encode message in Drift infrastructure.
It provides pre-generated Protobuf messages so that you don't need to install protobuf compiler and generate them
yourself.FeaturesProtocol Buffer >=3.12.4 <= 3.20No Protobuf Compiler and generation neededInstallYou can install the library as a PIP package with prebuilt Protobuf messages:pip install -U drift-protocolif you want to build the messages on your machine you can install it from the git repository:pip install git+https://github.com/panda-official/DriftProtocol.git#subdirectory=pythonUsage exampleParsing a Drift package:fromdrift_protocol.commonimportDriftPackage,DataPayload,StatusCodesome_blob_received_from_drift="...."package:DriftPackage=DriftPackage()package.ParseFromString(some_blob_received_from_drift)ifpackage.statuse!=StatusCode.GOOD:exit(-1)forany_datainpackage.data:ifany_data.Is(DataPayload.DESCRIPTOR):payload=DataPayload()any_data.Unpack(payload)data:bytes=payload.dataRelated ProjectsWaveletBuffer- A universal C++ compression library based on
wavelet transformationDrift Python Client- Python Client to access data of
PANDA|Drift
Package: driftpy
DriftPyDriftPy is the Python client for theDriftprotocol. It allows you to trade and fetch data from Drift using Python.Read the full SDK documentation here!Installationpip install driftpyNote: requires Python >= 3.10.⚠️ IMPORTANT ⚠️PLEASE, do not use QuickNode free RPCs to subscribe to the Drift Client.If you are using QuickNode, youmustuseAccountSubscriptionConfig("demo"), and you can only subscribe to 1 perp market and 1 spot market at a time.Non-QuickNode free RPCs (including the public mainnet-beta url) can usecachedas well.Example setup forAccountSubscriptionConfig("demo"):# This example will listen to perp markets 0 & 1 and spot market 0
    # If you are listening to any perp markets, you must listen to spot market 0 or the SDK will break

    perp_markets = [0, 1]
    spot_market_oracle_infos, perp_market_oracle_infos, spot_market_indexes = get_markets_and_oracles(perp_markets = perp_markets)

    oracle_infos = spot_market_oracle_infos + perp_market_oracle_infos

    drift_client = DriftClient(
        connection,
        wallet, 
        "mainnet",             
        perp_market_indexes = perp_markets,
        spot_market_indexes = spot_market_indexes,
        oracle_infos = oracle_infos,
        account_subscription = AccountSubscriptionConfig("demo"),
    )
    await drift_client.subscribe()If you intend to useAccountSubscriptionConfig("demo), youmustcallget_markets_and_oraclesto get the information you need.get_markets_and_oracleswill return all the necessaryOracleInfos andmarket_indexesin order to use the SDK.SDK Examplesexamples/folder includes more examples of how to use the SDK including how to provide liquidity/become an lp, stake in the insurance fund, etc.Setting Up Dev Envbash setup.shBuilding the docsLocal Docs:mkdocs serveUpdating public docs:poetry run mkdocs gh-deploy --forceReleasing a new version of the packagepython new_release.pyCreate a new release athttps://github.com/drift-labs/driftpy/releases.(The CI process will upload a new version of the package toPyPI)DevelopmentEnsure correct python version (using pyenv is recommended):pyenv install 3.10.11
pyenv global 3.10.11
poetry env use $(pyenv which python)Install dependencies:poetry installRun tests:poetry run bash test.shRun Acceptance Testspoetry run bash acceptance_test.sh
Package: drift-python
Drift PythonADrift APIwrapper written in Python.Getting StartedTo get started runpip install drift-pythonfromdriftimportDriftdrift=Drift("YOUR ACCESS TOKEN")ContactsRead the docs here:Contacts API.Available Methodsdrift.contacts.get()contact_id (required)email (optional)limit (optional)drift.contacts.create()**attributes (required)Example:drift.contacts.create(email='johndoe@drift.com')drift.contacts.update()contact_id (required)**attributes (required)drift.contacts.delete()contact_id (required)drift.contacts.add_tags()contact_id (required)tags (required)Example:drift.contacts.add_tags(
  conversation_id=1, 
  tags=[{'name': 'My Tag'}]
)drift.contacts.remove_tag()contact_id (required)tag_name (required)drift.contacts.remove_tags_bulk()contact_id (required)ConversationsRead the docs hereConversations APIAvailable Methodsdrift.conversations.get()conversation_id (required)drift.conversations.list()limit (optional) - defaults to50next_ (optional)drift.conversations.create_message()conversation_id (required)org_id (required)type (required)body (optional)buttons (optional)edited_message_id (optional)edit_type (optional)Example:drift.conversations.create_message(
    conversation_id=1,
    org_id=1,
    type='chat'
)drift.conversations.get_messages()conversation_id (required)next_ (optional)drift.conversations.get_attachments()doc_id (required)drift.conversations.get_metrics()query (required)Example:drift.conversations.get_metrics(
    {
      "metrics": [
        {
          "type": "AVG",
          "property": "numBotMessages"
        }
      ],
      "filters": [
        {
          "property": "createdAt",
          "operation": "BETWEEN",
          "values": ["2018-01-01", "2018-07-31"]
        }
      ]
    }
)UsersRead the docs hereUsers APIAvailable Methodsdrift.users.get()user_id (required)drift.users.list()drift.users.update()user_id (required)**attributes (required)Example:
drift.users.update(243266, phone='555-555-5555')ContributorsLemuel BoycerhymizChris BuonocorecbonozSupport / Feedback / BugsFor support and feedback, you can find us onSlack!If you've found a bug, feel free to open up a PR with a fix or submit an issue. Let us know in the dev slack!
Package: drift-python-client
Drift Python ClientPython Client to access data ofPANDA|DriftDescriptionDrift Python Client is a high level library to get current or historical data with minimal knowledge aboutPANDA|Driftinfrastructure.FeaturesAccess to live Drift dataAccess to history of input dataAccess to history of metricsCross-platformRequirementsPython >= 3.8Installingpip install drift-python-clientIf you need the latest version from GitHub:pip install git+https://github.com/panda-official/DriftPythonClient.gitUsage Exampleimportosfromdatetimeimportdatetimefromdrift_clientimportDriftClientdrift_client=DriftClient("10.0.0.153",os.getenv("DRIFT_PASSWORD"))# Download list of historypackages=drift_client.get_package_names("acc-5",datetime.strptime("2022-01-01 00:00:00","%Y-%m-%d%H:%M:%S"),datetime.strptime("2022-01-02 00:00:00","%Y-%m-%d%H:%M:%S"))print(packages)forpathinpackages:data=drift_client.get_item(path).as_np(scale_factor=2)print(data)References:DocumentationDriftProtocolWaveletBuffer
Package: drill
## Basic Usageimport drilldoc = drill.parse(path_or_url_or_string)# Drill down to a specific element.print unicode(doc.book.title)# Iterate through all "title" tags in the document.for t in doc.iter('title'):print t.attrs, t.data# Find all "bar" nodes with a "baz" child and a "foo" parent.q = doc.find('//foo/bar[baz]')# Easily access the first and last elements of matching results.print q.first(), q.last()# Iterate over results.for e in q:do_something(e)# Parse only elements matching some pathfor e in drill.iterparse(filelike, xpath='root/*/something'):print e.tagname, e.data## Features* Runnable test suite* Python 3 support## Advantages* Pure python* Faster, more efficient parsing than ElementTree* Using ElementTree, a ~150 MB XML file (~3,000,000 elements) took ~46 seconds to parse, consuming ~1.3 GB of RAM* Parsing the same file using drill took ~24 seconds and consumed ~950 MB of RAM* Very unscientific benchmarks performed on a Core i5 @ 2.8 GHz, running Windows 7. YMMV.* Lots of convenience methods for accessing elements quickly:* doc.response.resultCode.data* root[2].child['attr']* first/last/prev/next methods for traversing siblings
Package: drill4snap
drill4snapDISCLAIMER: Take great care and check your gcode files before using them! No responsibility is taken by the developer of this software!Convert Excellon drill files to GCode that can be used with the CNC/milling ability of Snapmaker devices.Provides a small command line tool to generate one gcode file for every drill size in the drill file. These files can
be used either directly via a USB stick or loaded into the Luban software for execution.AboutMotivationAlthough the Snapmaker should accept normal Marlin GCode, newer versions of the firmware come with a custom header
comment. My firmware version refused to even display files that do not contain this header. The header contains
device information and the preview image encoded as a base 64 PNG image.FeaturesSmall CLI tool that provides a quick way to convert Drill produced by tools such as Kicad into usable GCode.produces standard GCode (should work on devices other than Snapmaker too)preview images display required drill size for each filesupports switching between relative and absolute coordinates (all converted into absolute coordinates)supports both mm and inches (switching mid-file is also supported since it is theoretically allowed)rejects files containing non drilling operations to protect tools from damagecalculates required work volume and time estimate per tool runLimitationsOnly a tiny subset of the Excellon file format is supported, since the scope of this tool is drilling only. Also note
that patterns and other more complex operations are not supported although they may be used in drilling operations.Some other limitations:only tested for newest Snapmaker firmware on Snapmaker 2.0 A350not tested for GRBL based devicesonly tested for files produced by KicadUsageInstall via pip:pipinstalldrill4snapGenerate you drill file from Kicad using the plot suboption:Generate the CNC files for Snapmaker using thedrill4snapcommand:drill4snap--devices2mmy_drill_file.drlThis will produce a CNC file with the drill diameter as postfixed for every tool in the drill file:my_drill_file_0.95.cnc
my_drill_file_1.0.cnc
my_drill_file_2.3.cncUse either Luban or the device screen to position the tool head at the work origin and then setting the work origin.Load the gcode files into Luban workspace or transfer them using a USB storage:Using Luban you can now start the Job using ''Let the Snapmaker do the work and enjoy!CreditsBased on drl2gcode (https://github.com/jes/drl2gcode) by James Stanley
which is based on
drl2gcode (https://git.nexlab.net/machinery/drl2gcode) by Franco Lanza.Licensed under LGPL
Package: drill-bits
Installpipinstalldrill-bitsExamplesAll type read & write:fromdrill-bits.ioimportio_utilsdata=io_utils.omni_load(file_name)io_utils.omni_save(file_name,data)Currently supported extensions including:.npy,.txt,.pkl,.jpg,.png.Extract digit information from str:fromdrill_bits.ioimportstr_utilstest_str='img1_h102_w103.img'resolution=str_utils.extract_info(test_str,['h','w'],int)# resolution will be [102, 103]A decorator saves you from reprocessing:importtimefromdrill_bits.operationimportbase_operationdeffoo(n):time.sleep(1)ifn==1:return1else:returnn*foo(n-1)opt=BaseOperation(path).get_handle(force_run=False,verbose=True)foo_warp=opt(foo)print(foo_warp(5))# it will take 5s to runprint(foo_warp(5))# it will finish immediatelyopt=BaseOperation(path).get_handle(force_run=True,verbose=True)foo_warp=opt(foo)print(foo_warp(5))# it will take 5s to run again
Package: drillcore-transformations
FeaturesTransforms measurements from drillcores.Supports alpha, beta and gamma measurements.Supports .csv and .xlsx files.Supports adding the column names of your data files to a custom-built
config.ini file for each user.TODO: Convention supportCurrently supported convention explanation found inDocumentation
and HelpDocumentation and Help:https://drillcore-transformations.readthedocs.io.Running testsTo run pytest in currently installed environment:poetryrunpytestTo run full extensive test suite:poetryruninvoketestFormatting and lintingFormatting and linting is done with a single command. First formats,
then lints.poetryruninvokeformat-and-lintBuilding docsDocs can be built locally to test thatReadTheDocscan also build
them:poetryruninvokedocsInvoke usageTo list all available commands fromtasks.py:poetryruninvoke--listDevelopmentDevelopment dependencies include:invokenoxcopierpytestcoveragesphinxBig thanks to all maintainers of the above packages!CreditsPhD Jussi Mattila for tips, code snippets and sample materials.Authors ofOrientation uncertainty goes
bananasfor great article and
complementary excel-file.LicenseCopyright © 2020, Nikolas Ovaskainen.
Package: drillcore-transformations-py
Drillcore TransformationsDrillcore Transformations allows for alpha, beta and gamma structural drillcore measurement transformations.Free software: GNU General Public License v3Documentation and Help:https://drillcore-transformations.readthedocs.io.FeaturesTransforms measurements from drillcores.Supports alpha, beta and gamma measurements.Supports .csv and .xlsx files.Supports adding the column names of your data files to a custom-built config.ini file for each user.TODO: Convention supportCurrently supported convention explanation found inDocumentation and HelpCreditsPhD Jussi Mattila for tips, code snippets and sample materials.Authors ofOrientation uncertainty goes bananasfor great article and complementary excel-file.This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-02-18)DEV
Package: drillpy
drillpy is a Python wrapper for Apache Drill’s REST API, which lets you query and import data to Python directly from a working Drill cluster/drillbit instance. It is built on top on requests, numpy and pandas.Installationpip install drillpyUsagedrillpy follows the Python Database API Specification v2.0, so it’s usage is pretty similar to the one you can find e.g. in the builtin sqlite3 module from CPython’s Standard Library.As with sqlite3, you should start by creating a Connection object, using drillpy.connect():from drillpy import connectcon = connect(host=”some_drillbit_host”, db=”some_database_managed_by_drill”, port=8047)Once created, you must create a Cursor:cur = con.cursor()Now you can use this cursor to write SQL queries against your Drill cluster. Parameter substitution is handled by question marks ? (as in sqlite3):query = cur.execute(“SELECT * FROM mytable WHERE somecolumn > ? AND someothercolumn < ? LIMIT 10”, (value, other_value))Results are returned in a pandas DataFrame, with NaNs in missing values. Column types are inferred automatically. You can retreive results with fetchone(), fetchmany(size) and fetchall(). With fetchone(), a pandas Series is returned rather than a DataFrame:returned_df = query.fetchall()Keep in mind that drillpy cannot insert new data in your tables/databases, since Drill itself is a querying engine meant to be used for exploratory data analysis and BI/visualization tools.Once finished, you should call Connection.close():con.close()
Package: driloader
DriloaderSelenium drivers downloader tool with standalone CLI support.Why is it for?Selenium needs a specific driver to work with each browser. Every driver has a version that works with specific browser
versions, and it's really annoying reading the changelogs to check if the current driver will work with the new browser
version. Plus, a lot of times a test crashes because the browser has updated and the driver is not compatible anymore.
That's why Driloader exists: To make this process so much easier! Driloader autodetect the browser version (it supports Chrome, Firefox and Internet Explorer) and download the driver according to it's version.RequiresPython 3.4 or higherSetup the projectThis project usesPipenvas packaging tool. Please make sure you have it installed in your system.Also, we usemakeas task runner, so you can see the available tasks by runningmake help.# Clone the projectbash:$gitclonehttps://github.com/lucasmello/Driloader.git
bash:$cdDriloader# Install dependenciesbash:$makeinstall
pipenvinstall--dev
InstallingdependenciesfromPipfile.lock…🐍▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉20/20—00:00:03# Active virtual envbash:$pipenvshellsource~/.local/share/virtualenvs/driloader-ZPASDPNJ/bin/activate# Run linter and tests(driloader-ZPASDPNJ)driloader:$makelinttestInstallingpip install driloaderUsage with Firefoxfromdriloaderimportdriloaderfromselenium.webdriverimportFirefoxdriver_path=driloader.download_gecko_driver()browser=Firefox(executable_path=driver_path)browser.get("http://www.google.com")browser.quit()Usage with Chromefromdriloaderimportdriloaderfromselenium.webdriverimportChromedriver_path=driloader.download_chrome_driver()browser=Chrome(executable_path=driver_path)browser.get("http://www.google.com")browser.quit()Usage with Internet Explorerfromdriloaderimportdriloaderfromselenium.webdriverimportIedriver_path=driloader.download_ie_driver()browser=Ie(executable_path=driver_path)browser.get("http://www.google.com")browser.quit()CLI and standalone usagepython-mdriloader

usage:driloader[-h](--firefox|--chrome|--internet-explorer|--all)optionalarguments:-h,--helpshowthishelpmessageandexit--firefox,-fgetFirefoxversion.--chrome,-cgetGoogleChromeversion.--internet-explorer,-igetInternetExplorerversion.--alllookforbrowsersangettheirversions.Retrieve Firefox version$python-mdriloader--firefox45Retrieve Google Chrome version$python-mdriloader--chrome58Retrieve Internet Explorer version (Windows system)> python -m driloader -i
11Retrieve all browsers version (Windows system)>python-mdriloader--all
InternetExplorer:11Firefox:45GoogleChrome:58Retrieve all browsers version (non-Windows system)# Getting from a non-Windows system$python-mdriloader--all
InternetExplorer:Error:UnabletogettheInternetExplorerversion.Cause:Error:UnabletoretrieveIEversion..Cause:SystemisnotWindows.
Firefox:45GoogleChrome:58
Package: drilsdown
Consolidated repo of theDRILSDOWNprojectan NSF Earthcube supported effortDRILSDOWN (Drawing Rich Integrated Lat-lon-time Subsets from Dataservers Online into Working Notebooks) is a project to facilitate access ro detailed visualizations (in the Integrated Data Viewer,IDV) of Cases of Interest (user-defined) within a Python-based geo-space x time statistical data analyses -- if the data for such visulaizations are available online in nice aggregated repositories.The basic capabilitiesJupyter notebook interactions with an IDV session on the local machine:ipython_IDV extension.IDV enhancements (analysis codes, color scales, templates visible in favorites folders): theMapes IDV Collection.Jupyter-based mechanisms (an IDV kernel) for writing new IDV Jython analysis codes:JyIDV or iJython.Ways to "teleport" a template visualization to Places & Times of Interest:idv_teleport, a Python command line tool.Ways to publish template IDV bundles, template notebooks, and final results to a RAMADDA repository, where they are viewable via browser as well as accessible digitally:ramadda_publish, RAMADDA plugin.How to get the goodnesspip install drilsdownSee the examples, and documentation for the parts. These capabilities are in different languages and forms, and can be useful individually, but are especially powerful together.
Package: drimg
Drawable imageA package to convert images to different sizes for the development of Android applications.InstallationUse the package managerpipto install drimage.pipinstalldrimgUsageconvert one image$drimgfile_nameConvert all images of the current directory$drimg-a:exclamation: It is not possible to process relative paths at this time, and you must use these commands in the directory where the images are located.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT
Package: drinkingbird
drinkingbirdProgram to keep your browser/computer active.InstallationAssuming you have aPython3distribution
withpip:pip3 install drinkingbirdUsageTo run, open some relevant tabs in a browser in the foreground and execute:drinkingbirdReturn the focus to the browser if needed.This will cycle tabs each 10 s.To stop it, just press Esc or close the drinkingbird window.For more options seedrinkingbird --helpTips and tricksTo keep using your computer while drinkingbird is working, run it in a virtual machine. This also helps if you want to
lock your computer.