Saravanan666/pypi-org huggingface dataset:
Package: pygyre
PyGYREThis package provides Python support for the GYRE stellar oscillation
code suite.  PyGYRE is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, version 3. See the file
COPYING for further details.Full documentation for PyGYRE can be found on this website:https://pygyre.readthedocs.io/en/latest/
Package: pygyver
PyGyverPyGyver is a user-friendly python package for data integration and manipulation.Named after MacGyver, title character in the TV series MacGyver, and Python, the main language used in the repository.InstallationPyPiPyGyver is available onPyPi.pipinstallpygyverSetupMost APIs requires access token files to authentificate and perform tasks such as creating or deleting objects. Those files need to be generated prior to usingpygyverand stored in the environment you are executing your code against. The package make use of environment variables, and some of the below might need be supplied in your environment:# Access token path
GOOGLE_APPLICATION_CREDENTIALS=path_to_google_access_token.json
FACEBOOK_APPLICATION_CREDENTIALS=path_to_facebook_access_token.json

# Default values
BIGQUERY_PROJECT=your-gcs-project
GCS_PROJECT=your-gcs-project
GCS_BUCKET=your-gcs-bucket

# Optional
PROJECT_ROOT=path_to_where_your_code_livesModulesPyGyver is structured around several modules available in theetlfolder. Here is a summary table of those modules:Module nameDescritionDocumentationdwPerform task against the Google Cloud BigQuery APIdw.mdfacebookPerform task against the Facebook Marketing APIfacebook.mdgooddataPerform task against the GoodData API-gsPerform task against the Google Sheet API-libStore utilities used by other modules-pipelineUtility to build data pipelines via YAML definitionpipeline.mdprepData transformation - ML pipelines-storagePerform task against the AWS S3 and Google Cloud Storage APIstorage.mdtoolkitSets of tools for data manipulation-In order to loadBigQueryExecutorfrom thedwmodule, you can run:from pygyver.etl.dw import BigQueryExecutorContributingTo get started...Step 1👯 Clone this repo to your local machine usinggit@github.com:madedotcom/pygyver.gitStep 2HACK AWAY!🔨🔨🔨The team follows TDD to develop new features onpygyver.
Tests can be found inpygyver/tests.Step 3🔃 Create a new pull request and request review from team members. Where applicable, a test should be added with the code change.FAQHow to release a new version to PyPi?Merge your changes tomasterbranchCreate a new release usinghttps://github.com/madedotcom/pygyver/releases
Package: pygyverhubd
Реализация сервера (устройства) GyverHub на pythonПроект находится в стадии активной разработки, api может быть изменено без уведомления!Текущая версия клиента -https://github.com/GyverLibs/GyverHub/tree/8f81922dd3a19e5e7666789a54b3a08d0334019b(кроме передачи файлов по http)Пример использованияздесьТекущий прогрессСетьИнтерфейс: WebSocketИнтерфейс: MQTTИнтерфейс: BluetoothИнтерфейс: SerialDevice discoveryВстроенный клиентGUIБазовые компонентыCanvasВкладкиУстройствоБазовая информация - название, иконкаРасширенная информация - сеть, памятьАвтоматический сбор расширенной информацииOTAOTA APIОбновление сервера через OTAАвтообновлениеАвтоматическая упаковка обновленийФСAPI файловой системыОтражение API ФС на реальную папкуДругие компонентыПерезапуск сервера по команде rebootCLI API
Package: pygz
Pigz wrapperThis repository is a wrapper for python to utilize gzip or pigz to compress or decompress data in parallel.For installation:python setup.py installFor reading:from pigz import PigzFile
with PigzFile("input.gz") as f:
    for line in f:
        print(line)For writing:from pigz import PigzFile
threads = 4 # default
with PigzFile("output.gz", "wt", threads) as fw:
    for line in lines:
        fw.write(line)For testing:python setup.py testthe output is as follows:============================================================
Read by gzip subprocess:
Number: 1, Time: 585.19 ms
Number: 2, Time: 726.82 ms
Number: 3, Time: 698.48 ms
Number: 4, Time: 728.64 ms
Number: 5, Time: 698.70 ms
Average time: 687.57 ms
============================================================
Write by gzip subprocess:
Number: 1, Time: 13652.26 ms
Number: 2, Time: 13413.61 ms
Number: 3, Time: 13303.46 ms
Number: 4, Time: 13369.65 ms
Number: 5, Time: 13340.88 ms
Average time: 13415.97 ms
============================================================
Read by pigz subprocess (4 threads):
Number: 1, Time: 339.37 ms
Number: 2, Time: 403.47 ms
Number: 3, Time: 401.11 ms
Number: 4, Time: 408.30 ms
Number: 5, Time: 425.89 ms
Average time: 395.63 ms
============================================================
Write by pigz subprocess (4 threads):
Number: 1, Time: 3562.05 ms
Number: 2, Time: 3511.68 ms
Number: 3, Time: 3519.51 ms
Number: 4, Time: 3518.98 ms
Number: 5, Time: 3513.09 ms
Average time: 3525.06 ms
============================================================
Read by gzip package:
Number: 1, Time: 867.79 ms
Number: 2, Time: 915.57 ms
Number: 3, Time: 893.22 ms
Number: 4, Time: 885.66 ms
Number: 5, Time: 889.74 ms
Average time: 890.40 ms
============================================================
Write by gzip package:
Number: 1, Time: 66520.40 ms
Number: 2, Time: 66305.25 ms
Number: 3, Time: 65591.92 ms
Number: 4, Time: 65327.56 ms
Number: 5, Time: 65716.15 ms
Average time: 65892.26 msThe pigz subprocess show significantly high effectiveness in compressing and decompressing data.
Package: pyH2A
pyH2APyPI:https://pypi.org/project/pyH2ADocumentation:https://pyh2a.readthedocs.ioSource code:https://github.com/jschneidewind/pyH2ApyH2A is an extensible Python framework for the analysis of hydrogen production cost. Its discounted cash flow module is based on the H2A Hydrogen Analysis model developed by theU.S. Department of Energy/NREL.The basic discounted cash flow analysis functionality enables calculation of levelized cost of hydrogen (LCOH2). It can be interfaced with differentPluginsto allow modelling of various hydrogen production technologies. Furthermore, differentAnalysismodules can be applied, allowing for detailed analysis of the discounted cash flow results.It is a command line tool, with the input being provided using Markdown formatted plaintext files and the output being plots (and formatted PDF reports in the future).Note: pyH2A is currently under development and may undergo major changes in its design.InstallationpyH2A can be installed usingpip:pipinstallpyH2ADocumentationDocumentation for pyH2A is available at:https://pyh2a.readthedocs.ioDependenciespyH2A uses Python >=3.7 with the following libraries:NumPy,SciPy,Pandas,MatplotlibandClickUsepyH2A can be used from the command line:pyH2Arun-iinput_file-ooutput_directoryFor example, if the input fileInput.mdis in the../Inputdirectory and the output directory is../Output/Example_Output:pyH2Arun-i../Input/Input.md-o../Output/Example_OutputAlternatively, thepyH2Aclass frompyH2A.run_pyH2A.pycan imported and used within a Python script.Input is provided using a plaintext Markdown file. Input files are structured by headers (designated by '#'), which are followed by Markdown style tables. Headers and tables are parsed bypyH2A.pyto generate dictionaries which are used for computations. Certain input sections are mandatory (such asTechnical Operating Parameters and SpecificationsorFinancial Input Values). Additional input sections can be processed by invokingPlugins, which perform additional calculations that feed into the discounted cash flow analysis. Finally, the input file can invokeAnalysismodules to analyze and visualize the output.Example outputCost breakdownSensitivity analysisWaterfall analysisMonte Carlo analysis, also allowing for comparison of different production pathwaysPublication dataData for the accompanying publication can be found in thedatadirectory.To doImporting plugins and analysis modules from arbitrary locationEnabling use of Default.md file in arbitrary locationBlock diagram illustrating flow of programCreation of graph showing how inputs are processed by series of pluginsLifecycle analysis & net energy analysis?LicenseCopyright (c) Jacob SchneidewindAll software is licensed under a MIT license (seeLICENSEfile).Shield:All other files and their contents are licensed under aCreative Commons Attribution 4.0 International License. (seeLICENSE-CC-BY)
Package: pyh2o
The pyh2o module provides Python binding for theH2O HTTP server. Specifically, it provides high performance
HTTP 1/2 and websocket server for Python.Installationpip install pyh2oIf binary distribution for your platform is not provided, you will needcmake>=2.8.11to install.DevelopmentClone the repository, initialize submodules bygit submodule update --init --recursive.Build:python setup.py buildTest:python setup.py testClean:python setup.py cleanEnd to end test brings up a real server and make requests to it.ExampleBelow is an example of serving static content.importh2oimportsocketclassHandler(h2o.Handler):defon_req(self):self.res_status=200self.send_inline(b'Hello, world!')return0config=h2o.Config()host=config.add_host(b'default',65535)host.add_path(b'/plaintext').add_handler(Handler)sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)sock.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,True)sock.bind(('127.0.0.1',8888))sock.listen(0)loop=h2o.Loop()loop.start_accept(sock.fileno(),config)whileloop.run()==0:pass
Package: pyH2oMojo
pyH2oMojoUnofficial Python wrapper for H2o MOJO'sA lightweight python wrapper around an H2o EasyPredictModelWrapper instanceInstantiating the object will launch the bundled Jar file, and establish a port on localhost on which to communicate with.Dictionaries or JSON strings are passed to the predictor instance over a socket, and the output is read back via the subprocess' stdout pipe.Usagefrom pyH2oMojo import H2oMojoPredictor
# pass at minimum, the filename of the MOJO, and the predictor type
predictor = H2oMojoPredictor("my_nn.zip", "multivariate", verbose=True)

print(H2oMojoPredictor.predict({"sepal_length":4.9, "sepal_width":3.0, "petal_length":1.4,"petal_width":0.2}))
>>> {"prediction":"Iris-setosa", "predictionIndex":1, "classProbabilities":[0.0, 0.944, 0.056]}

print(H2oMojoPredictor.supported_predictors())
>>> ["multivariate", "regression", "ordinal", "binomial", "autoencoder", "clustering", "dimreduction"]

# other constructor parameters include:
# x_cols=None # List of columns to be passed to predict() - by default everything is passed
# x_types=None # Dictionary of column name and types ('int', 'real', 'str') - these values will be converted before being sent to the model. 
# connection_timeout=10.0 # Number of seconds to wait for the Java subprocess to start before raising a runtime error
# prediction_timeout=3.0 # Number of seconds to wait for a response from the Java subprocess before raising a runtime error
Package: pyha
====pyha====.. image:: https://img.shields.io/pypi/v/pyha.svg:target: https://pypi.python.org/pypi/pyha.. image:: https://img.shields.io/travis/gasparka/pyha.svg:target: https://travis-ci.org/gasparka/pyha.. image:: https://pyup.io/repos/github/gasparka/pyha/shield.svg:target: https://pyup.io/repos/github/gasparka/pyha/:alt: Updates.. image:: https://coveralls.io/repos/github/gasparka/pyha/badge.svg?branch=develop:target: https://coveralls.io/github/gasparka/pyha?branch=develop* Free software: Apache Software License 2.0Install-------From pip:``pip install --user pyha``RTL/NETLIST level simulations require `Docker <https://docs.docker.com/install/>`_ :``curl -fsSL https://get.docker.com | sh``Follow the instructions to add yourself to the 'docker' group.Features--------* Describe hardware in Python and convert to VHDL* Cycle-accurate and fast simulator* Debuggable in Python – very useful as Python and VHDL sources are highly correlated* Simple testing framework by pairing pytest and cocotb* Builtin fixed-point and complex typesQuick start-----------Take a look at the cores implemented in Pyha, each of them have a Notebook to ease the experimentation.For example, start with the moving-average core:`Python source <https://github.com/gasparka/pyha/blob/develop/pyha/cores/filter/moving_average/moving_average.py>`_`Notebook <https://github.com/gasparka/pyha/blob/develop/pyha/cores/filter/moving_average/moving_average.ipynb>`_`VHDL conversion <https://github.com/gasparka/pyha/blob/develop/pyha/cores/filter/moving_average/example_conversion/src/MovingAverage_0.vhd>`_And then see how the 'dc-removal' is built by reusing the 'moving-average' component:`Python source <https://github.com/gasparka/pyha/blob/develop/pyha/cores/filter/dc_removal/dc_removal.py>`_`Notebook <https://github.com/gasparka/pyha/blob/develop/pyha/cores/filter/dc_removal/dc_removal.ipynb>`_`VHDL conversion <https://github.com/gasparka/pyha/blob/develop/pyha/cores/filter/dc_removal/example_conversion/src/DCRemoval_0.vhd>`_Documentation-------------Under construction!
Package: pyhabr-proxy
интересная задача для практики на pythonОписание действий-запустите:  python3 _getsense_main.py-В internet browser введите: http://127.0.0.1:43433/ или http://localhost:43433, должен появится https://habr.com c следующим изменением:к словам размером 6 символов добавлен знак "TM"любая ссылка на https://habr.com заменяется на http://127.0.0.1:43433/Что еще:в модуле _getsense_proxy.py в описании class _getsense_proxy self.my_url -> как соединяться с local srv и на что меняем self.habr_url в ссылкахЭту практику на языке python придумали вот эти ребята:https://github.com/ivelum/job/blob/master/code_challenges/python.md
Package: pyhac
Human Action Controller (HAC)GoalA human action controller running on different platforms.FunEasy-to-useAccurateAnywhereFun ExamplesMouse ControlKeyboard ControlPlaying GameEnhancing interactionSolutions provided by HACPlatformModuleProgressCommentPC / Win10Mouse ControlVPC / Win10Keyboard ControlVPC / UbuntuMouse ControlVPC / UbuntuKeyboard ControlVGetting startedInstallation$ pip install pyhacRun the demo of mouse control$ git clone https://github.com/dabit-lucas/hac.git
$ cd hac
$ python demo_mouse_control_fast_slow.pyRecording custom actions$ python recording.py -d {action name} -k TruePress key "r" to start recording, the data will be saved into./dataTraining a custom moduleHere is an example of a config file of action set,{
    "actions": [
        "r_zero",
        "r_one",
        "r_five",
        "l_zero",
        "l_one",
        "l_five",
        "two_index_fingers_up",
        "two_index_fingers_down",
        "55",
        "sit"
    ],
    "type": "gesture_only"
}These actions form a model by running a training process:$ python train.py --conf {path_of_action} --model_name {name_of_model}The generated model will become a module. Take mouse control module as an exmaple, it can create mappings among actions and controls by the following code:# add predefined modules
mouse_module = hac.add_module("mouse_control_fast_slow")
hac.set_init_module(mouse_module)

# create mapping between controls and actions
mouse_module.add_mouse_mapping("mouse_left_down", ["r_one", "r_zero"])
mouse_module.add_mouse_mapping("mouse_left_up", "r_one")
mouse_module.add_mouse_mapping("mouse_left_down", ["r_five", "r_zero"])
mouse_module.add_mouse_mapping("mouse_left_up", "r_five")

mouse_module.add_mouse_mapping("mouse_right_down", ["l_one", "l_zero"])
mouse_module.add_mouse_mapping("mouse_right_up", "l_one")
mouse_module.add_mouse_mapping("mouse_right_down", ["l_five", "l_zero"])
mouse_module.add_mouse_mapping("mouse_right_up", "l_five")

mouse_module.add_mouse_mapping("right_move_diff", ["r_zero", "r_zero"], sensitivity_factor=2.0)
mouse_module.add_mouse_mapping("right_move_diff", ["r_one", "r_one"], sensitivity_factor=4.0)
mouse_module.add_mouse_mapping("right_move_diff", ["r_five", "r_five"], sensitivity_factor=1.0)

mouse_module.add_mouse_mapping("left_move_diff", ["l_zero", "l_zero"], sensitivity_factor=2.0)
mouse_module.add_mouse_mapping("left_move_diff", ["l_one", "l_one"], sensitivity_factor=4.0)
mouse_module.add_mouse_mapping("left_move_diff", ["l_five", "l_five"], sensitivity_factor=1.0)

mouse_module.add_mouse_mapping("roll_up", "two_index_fingers_up")
mouse_module.add_mouse_mapping("roll_down", "two_index_fingers_down")If thefivegesture with a right hand shows in consecutive two frames["r_five", "r_five"], then do controlright_move_diff, which means moving the mouse cursor. The above description can be represented by the following code:mouse_module.add_mouse_mapping("right_move_diff", ["r_five", "r_five"])Development guidelineThe structure of HACCommunityWelcome to ask any question in issues.ContributingAny contribution is welcomed. Please fork this repo and summit a pull request.
Package: pyhackernews
pyhackernewsmimicking HN look and feel in terminalHN in terminal with tmux:instalation and usage:pip install pyhackernewsand then in terminal:hnconfiguration:Custom keybindings can be defined in either:$HOME/.pyhackernewsOr:$HOME/.config/pyhackernewsLike so:[Keys]
quit = q
open = o
tabopen = O
refresh = r
scroll_up = k
scroll_down = j
bottom = G

[Commands]
; %URL is a placeholder for where the actual URL will be inserted.
; Remove these if unused.

open = dwbremote :open %URL
tabopen = dwbremote :tabopen %URL
Package: py-hacker-news
Py Hacker NewsA Simple command line tool written in python to browse Hacker news.IntroductionHacker News is a social news website focusing on computer science and entrepreneurship.py_hacker_news is a command line tool which fetches and displays results from Hackernews website.
You can browse latest, top and past articles from the command line itself.Installationpy_hacker_news is written in python and can be installed with pip.This program only supports python3pip3 install py_hacker_news --userYou need to make sure that~/.local/binis in your PATH variable.To add this to the PATH tryexport PATH=$PATH:~/.local/binYou can also download source and trypip install -r requirements.txtpython3 -m hnewsUsageThe tool can be run from the terminal using thehnewscommand.You can pass in various arguments to browse different parts of the Hackernews website.The tool supports the following arguments:type - Type of news to fetch. Options are news, latest, past. Default is newsnumber - number of pages to fetch. Each pages contains 30 articles. Default is 1age - age of the pages to fetch. It only works is 'past' flat is passed.proxy - network proxy if you are using a proxy server.Examplehnews- displays 30 popular articles from hackernewshnews -n 5- displays 150 (30 * 5) popular articles from hackernewshnews -t latest- displays 30 newest articles from hackernewshnews -t past -a 20 -n 2- displays  60 (30 * 2) articles that were on front page 20 days ago from hackernewshnews -p https://proxy_address:port- uses this proxy to connect to fetch articlesProxyThe tool automatically used proxy from environment variables if no proxy is provided in args. Ifa proxy flag is passed, that value is used instead. To set proxy environment variable:On Linuxexport http_proxy=http://user:password@proxy.domain.com:portexport https_proxy=http://user:password@proxy.domain.com:portexport ftp_proxy=http://user:password@proxy.domain.com:portOn Windowsset http_proxy=http://user:password@proxy.domain.com:portset https_proxy=http://user:password@proxy.domain.com:portHelpIn case of any trouble or if you think that the code could be improved, please open an issue of github.You can also contact me athosvarshith@gmail.com
Package: pyhackrf
pyhackrfMotivationAll python bindings for hackrf are experimental at best, and the installation is quite quirky and weird.
This is an attempt to change that.Installationsudo apt-get update
sudo apt-get install -y libusb-1.0-0-dev libfftw3-dev
pip install pyhackrfQuick ExampleTo take samples and plot the power spectral density:fromhackrfimport*frompylabimport*# for plottingwithHackRF()ashrf:hrf.sample_rate=20e6hrf.center_freq=88.5e6samples=hackrf.read_samples(2e6)# use matplotlib to estimate and plot the PSDpsd(samples,NFFT=1024,Fs=hackrf.sample_rate/1e6,Fc=hackrf.center_freq/1e6)xlabel('Frequency (MHz)')ylabel('Relative power (dB)')show()More Example UseTo create a hackrf device:fromhackrfimport*hrf=HackRF()If you have two HackRFs plugged in, you can open them with thedevice_indexargument:hackrf1=HackRF(device_index=0)hackrf2=HackRF(device_index=1)Callbacksdefmy_callback(hackrf_transfer):c=hackrf_transfer.contentsvalues=cast(c.buffer,POINTER(c_byte*c.buffer_length)).contentsiq=bytes2iq(bytearray(values))return0# Start receiving...hackrf.start_rx(my_callback)# If you want to stop receiving...hackrf.stop_rx()GainsThere is a 14 dB amplifier at the front of the HackRF that you can turn on or off.
The default is off.The LNA gain setting applies to the IF signal.
It can take values from 0 to 40 dB in 8 dB steps.
The default value is 16 dB.The VGA gain setting applies to the baseband signal.
It can take values from 0 to 62 dB in 2 dB steps.
The default value is 16 dB.The LNA and VGA gains are set to the nearest step below the desired value.
So if you try to set the LNA gain to 17-23 dB, the gain will be set to 16 dB.
The same applies for the VGA gain; trying to set the gain to 27 dB will result in 26 dB.# enable/disable the built-in amplifier:hackrf.enable_amp()hackrf.disable_amp()# setting the LNA or VGA gainshackrf.lna_gain=8hackrf.vga_gain=22# can also use setters or gettershackrf.set_lna_gain(8)hackrf.set_vga_gain(22)AcknowledgementsFor now most of the work is based onthis.
That is going to change, also this notice will be removed then.LicenseThis project is licensed under the GPL-3 license.
Package: pyhacks
pyhacksPython module to ease writing scripts go over big amount of data in order to perform the same actions. A simple preconfigured threads and queue management and more hacking utilsWill elaborate more when it will get mature enough :)capabilitiesPyHacksUsing all below capabilities to easily manage threads and queue to perform operations on Item objects.frompyhacksimportPyHacks,Netif__name__=="__main__":net=Net()defhandle_item(item):host=item.get("host")url=item.get("url")replied_to_ping=net.reply_to_ping(host)ip=net.resolve(host)ifip==None:returnFalseitem.set("Reply To Ping",replied_to_ping)item.set("ip",ip)hacks.logger.green("{}{}{}".format(host,replied_to_ping,ip))hacks.exporter.put(item)returnTruehacks=PyHacks(handle_item,25,"output.csv")hosts=hacks.parse.csv("ips.csv")forhostinhosts:hacks.qt.put(host)hacks.finish()QueueThreadsQueueThreads class allows you to manage queue and threads easily.qt=QueueThreads(handle_function,num_worker_threads,logger)qt.put({"counter":1,"key1":"value1"})qt.finish()# waiting until job is finishedparametershandle_function - a function recevies item parameter from queue, will be used in all threads defined, return value has to be booldefhandle_item(item):host=item.get("host")url=item.get("url")replied_to_ping=net.reply_to_ping(host)ip=net.resolve(host)ifip==None:returnFalseitem.set("Reply To Ping",replied_to_ping)item.set("ip",ip)hacks.logger.green("{}{}{}".format(host,replied_to_ping,ip))hacks.exporter.put(item)returnTruenum_worker_threads - numbers of threads used to run handle_functions on queue items
logger - a Logger instance to be used for automatic loggingParserParse files and returns list of Item objectsparse=Parser()items=parse.csv("ips.csv")foriteminitems:qt.put(item)LoggerEasy logging mechanism + writing into files under logs directory, used by QueueThreads for autoamtic logginglogger=Logger(verbose=False)logger.green("text")logger.red("text")logger.yellow("text")ExporterExporting Item objects into a csv/txt fileexport=Exporter(output.csv)export.put({"counter":1,"key1":"value"})export.finish()