Saravanan666/pypi-org huggingface dataset:
Package: macrobond-data-api
Macrobond Data API for PythonThe Macrobond Data API for Python is used to access the world’s most extensive
macroeconomic, aggregate financial and sector database provided byMacrobond.
Exposes a common API in Python for theMacrobond WebandClient dataAPIsYou have to be a licensed user and have a Data+ or data feed user account in
order to use the API.Examples in Jupyter Notebooksto help you get startedAPI referenceBasic usageimportmacrobond_data_apiasmb_apiusgdp=mb_api.get_one_series("usgdp")Advanced usage# webfrommacrobond_data_api.webimportWebClientwithWebClient('client id','client secret')asapi:series=api.get_one_series('usgdp')# comfrommacrobond_data_api.comimportComClientwithComClient()asapi:series=api.get_one_series('usgdp')FeaturesThe Macrobond Data API for Python uses either theMacrobond Web REST APIor theMacrobond Client data APIto obtain time series with values and metadata.
The API consists of a set of functions in common between the underlying APIs as
well as specialized functions unique to each implementation.Installing macrobond-data-api and Supported VersionsMacrobond Data API for Python is available onPyPI:python -m pip install macrobond-data-apiMacrobond Data API for Python officially supports Python 3.8+.Using of system keyring for http proxyFor users operating behind an HTTP proxy, it is advisable to utilize the system keyring to store proxy settings and
credentials.
This can be conveniently accomplished by executing the included script with the following command:python -c "from macrobond_data_api.util import *; save_proxy_to_keyring()"Using of system keyring for credentials[!NOTE]
If u are using a proxy see "Using of system keyring for http proxy" first.When using WebClient it is recommended to use the system keyring to store the API credentials.
This can be done easily by running the include script using this command:python -c "from macrobond_data_api.util import *; save_credentials_to_keyring()"Supported keyringsmacOSKeychainFreedesktopSecret Servicesupports many DE including GNOME (requiressecretstorage)KDE4 & KDE5KWallet(requiresdbus)Windows Credential LockerContributingWe welcome community pull requests for bug fixes, enhancements, and documentation.Getting supportSupport options
Package: macrocorr
macroeconMacrocorr (’macroeconomic correlation’) is a Python package for analyzing the correlation between macroeconomic indicators and time-series data.Pearson's correlationis used to analyze the correlation. This package usesSciPy’s built function to get the Pearson coefficient. For details, please check outscipy.stats.pearsonr.This package is designed to provide the easy process of analyzing and comparing the correlations with multiple macroeconomic indicators at a single time. The result is intended to provide an overview of macroeconomic relationships. It should not be used for profitable purposes.The data of the macroeconomic indicators are extracted fromWorldBankandYahooFinancehistorical database. This package doesn’t guarantee the accuracy of the correlated data.InstallationThe latest stable release (and required dependencies) can be installed frompip.pipinstallmacrocorrUsageFor all macroeconomic indicators and all major categories, check outCATALOG.For more detailed uses of the functions, check outFUNCTIONS.For a step-by-step example use-case, check outexample_basic.ipynb.Quick StartImport package MacrocorrimportmacrocorrasmcrrCreate a correlator with the data you want to analyzemy_correlator=mcrr.Correlator(date=my_data['Date'].values,data_x=my_data['Price'].values)# data_x should be an one-dimensional array of numerical value# make sure the values from date and data_x are matchedAnalyze and compare the correlation with the macroeconomic indicators from a categorymy_correlator.analyze_Correlation(category='population',country='USA',top_num=3)# print the top 3 most correlated indicators from the category (='population')# with their respective Pearson's coefficient and p-value# plot the graph with both the input data and data of the most correlated indicatorAnalyze the correlation with one specific indicatormy_correlator.get_Correlation(y_name="Population, total",graph=True)# print the Pearson's coefficient and p-value of the indicator (='Population, total')# plot the graph with both the input data and data of the indicatorContributingDevelopment takes place onGithubPull requests are welcome. Feel free to add more macroeconomic indicators or analysis methods.For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: macro-creator
Macro RecorderThe best and most accurate macro recorder for Windows.Easy to use and open source.Recordfrommacro_creatorimportRecordermy_recorder=Recorder()my_recorder.record()my_recorder.save("my_macro.json")Runfrommacro_creatorimportRecordermy_recorder=Recorder()my_recorder.load("my_macro.json")my_recorder.play(speed_factor=1.5,only_essential_moves=False)
Package: macrodemos
MACRODEMOSMacroeconomics Demos: A Python package to teach macroeconomics and macroeconometricsThe purpose of this package is to provide tools to teach concepts of macroeconomics and macroeconometrics.To date, the package provides these functions:ARMA( ): Demo for learning about  ARMA processes. It creates a dash consisting of 7 plots to study the theoretical properties of ARMA(p, q) processes, as well as their estimated counterparts. The plots displaya simulated sampleautocorrelationspartial autocorrelationsimpulse response functionspectral densityAR inverse rootsMA inverse roots.Markov('state_0',...,'state_n'): a demo to illustrate Markov chains. User sets the number of states, the transition matrix, and the initial distribution. The demo creates a dash consisting of 2 plots:a simulated samplethe time evolution of the distribution of statesSolow( ): this demo illustrates the Solow-Swan model. Users can simulate the dynamic effect of a shock in a exogenous variable or a change in a model parameter. You will find 6 figures about the Solow-Swan model:Capital stock, per capitaOutput per capita,Savings per capita,Consumption per capita,Change in capital stock, andOutput growth rateIt also presents plots to illustrate how steady-state capital is determined, and the golden rule.filters( ): to illustrate the use of the Hodrick-Prescott, Baxter-King, Christiano-Fitzgeral and Hamilton filters.In a near future, I expect to add a few more demos:Bellman( ): to illustrate the solution of a Bellman equation by value function iterationBoxJenkins( ): to illustrate the Box-Jenkins methodology, by fitting two ARIMA models side-by-side to user-provided data.FilterMyData( ): to filter user-supplied data with several methodologies, comparing their resulting cycles.InstructionsTo use the demos, just install this packagepip install macrodemosand then run any of the demos you want.import macrodemos
macrodemos.ARMA()
macrodemos.Markov()
macrodemos.Solow()
macrodemos.filter()This will open a new tab in your default Internet browser with a Plotly dash. A current limitation is that you can only run
one demo at a time.DisclaimerThis program illustrates basic concepts of macroeconomics and time series econometrics. It was developed for teaching purposes
only: you are free to use it in your own lectures or to learn about these topics.If you have any suggestions, please send me an email atrandall.romero@ucr.ac.crCopyright 2016-2021 Randall Romero-Aguilar
Package: macroeco
Macroeco is a Python package that provides a comprehensive set of functions for analyzing empirical patterns in ecological data, predicting patterns from theory, and comparing empirical results to theory. Many major macroecological patterns can be analyzed using this package, including the species abundance distribution, the species and endemics area relationships, several measures of beta diversity, and many others.Extensive documentation for macroeco, including detailed installation instructions, tutorials, and a reference guide, is available athttp://macroeco.org. The most recent stable version of the macroeco package can be installed from PyPI (pip install macroeco). For users who do not program in Python, a standalone application called Macroeco Desktop, which provides most of the functionality of macroeco through a simple interface that requires no programming, is also available.  To download this standalone application, click on thereleasestab at the top of the repository home page (orthis link) and download the fileMacroecoDesktop_Mac_Standalone.zipfrom the most current version.The current version of macroeco is developed and maintained by Justin Kitzes (UC Berkeley) and Mark Wilber (UC Santa Barbara). Other contributors include Chloe Lewis and Ethan White. The development of macroeco has been supported by the National Science Foundation, the Gordon and Betty Moore Foundation, and the Berkeley Institute for Data Science.
Package: macro-kit
macro-kitmacro-kitis a package for efficient macro recording and metaprogramming in Python using abstract syntax tree (AST).The design of AST in this package is strongly inspired byJulia metaprogramming. Similar methods are also implemented in builtinastmodule butmacro-kit(Julia-style metaprogramming) is more convenient in code operation and also focused on the macro generation and customization.Installationuse pippip install macro-kit -Ufrom sourcepip install git+https://github.com/hanjinliu/macro-kitExamplesDefine a macro-recordable functionfrommacrokitimportMacro,Expr,Symbolmacro=Macro()@macro.recorddefstr_add(a,b):returnstr(a)+str(b)val0=str_add(1,2)val1=str_add(val0,"xyz")macro[Out]
var0x24fdc2d1530 = str_add(1, 2)
var0x24fdc211df0 = str_add(var0x24fdc2d1530, 'xyz')Useformatmethod to rename variable names.# substitute identifiers of variables# var0x24fdc2d1530 -> xmacro.format([(val0,"x")])[Out]
x = str_add(1, 2)
var0x24fdc211df0 = str_add(x, 'xyz')formatalso support substitution with more complicated expressions.# substitute to _dict["key"]expr=Expr(head="getitem",args=[Symbol("_dict"),"key"])macro.format([(val0,expr)])[Out]
_dict['key'] = str_add(1, 2)
var0x24fdc211df0 = str_add(_dict['key'], 'xyz')Record classmacro=Macro()@macro.recordclassC:def__init__(self,val:int):self.value=val@propertydefvalue(self):returnself._value@value.setterdefvalue(self,new_value:int):ifnotisinstance(new_value,int):raiseTypeError("new_value must be an integer.")self._value=new_valuedefshow(self):print(self._value)c=C(1)c.value=5c.value=-10c.show()[Out]
-10Note that value assignments are not recorded in duplicate.macro.format([(c,"ins")])[Out]
ins = C(1)
ins.value = -10
var0x7ffed09d2cd8 = ins.show()evalcan evaluate macro.macro.eval({"C":C})[Out]
-10Record moduleimportnumpyasnpmacro=Macro()np=macro.record(np)# macro-recordable numpyarr=np.random.random(30)mean=np.mean(arr)macro[Out]
var0x2a0a2864090 = numpy.random.random(30)
var0x2a0a40daef0 = numpy.mean(var0x2a0a2864090)Recorded module is stored inSymbolso you can safelyevalthe macro without passing the module object as the global variables.macro.eval()# this worksString parsingparsecallsast.parseinside so that you can safely makeExprfrom string.frommacrokitimportparseexpr=parse("result = f(0, l[2:8])")expr[Out]
:(result = f(0, l[slice(2, 8, None)]))print(expr.dump())[Out]
head: assign
args:
 0: result
 1: head: call
    args:
     0: f
     1: 0
     2: head: getitem
        args:
         0: l
         1: slice(2, 8, None)
Package: macro-lightning
Welcome tomacro_lightning, the code-base for a paper on constraining macroscopic dark matter models with observations of lightning on Earth and Jupiter. If you are looking for the paper, the peer-reviewed journal article will belinked hereand thearXiv preprint here. Alternatively, the source code for the paper is included as a sub-module in the folder “docs/papers_and_presentations/paper”.Macroscopic dark matter (macros) is a broad class of alternative candidates to particle dark matter. These candidates would transfer energy to matter primarily through elastic scattering. A sufficiently large macro passing through the atmosphere would produce a straight channel of ionized plasma. If the cross-section of the macro is\sigma_x \gtrapprox 6 \times10^{-9}\rm{cm}^2, then under atmospheric conditions conducive to lightning (eg. a thunderstorm) the plasma channel would be sufficient to seed a lightning strike with a single leader.This is entirely unlike ordinary bolt lightning in which a long sequence of hundreds or thousands of few-meter-long leaders are strung together. This macro-induced lightning would be extremely straight, and thus highly distinctive. Neither wind shear nor magnetohydrodynamic instabilities would markedly spoil its straightness. The only photographically documented case of a straight lightning bolt is probably not straight enough to have been macro-induced.For any discussion or derivations, see the paper. For code documentation, seeReadTheDocs. This is the raw code.NotebooksFolder contains Mathematica notebooks to compute event rates for macro-induced lightning, as well as the constraints in mass and cross-section, both for lightning events on Earth and on Jupiter. There is also a notebook to compute the fraction of the Maxwell distribution of DM particles with velocities high enough to produce straight lightning bolts (ie. traveling faster than a lightning leader would ordinarily propagate).Further notebooks can be found in “docs/examples”Papers and PresentationsLook in “docs/papers_and_presentations”CODEThe code is included in themacro_lightningfolder.ReferencesMany of the sources cited in the paper are downloaded and included here.How to contributeWe welcome contributions from anyone via pull requests onGitHub. If you don’t feel comfortable modifying or
adding functionality, we also welcome feature requests and bug reports asGitHub issues.The development process follows that of theastropy-package-templatefrom Astropy’srelease procedure.AttributionCopyright 2020 - Nathaniel Starkman, Jagjit Sidhu, Harrison Winch, Glenn Starkan, and contributors.macro_lightningis free software made available under the BSD-3 License. For details see theLICENSEfile.If you make use of this code, please consider citing the Zenodo DOI as a software citation@software{macro_lightning:zenodo,
  author       = {Nathaniel Starkman and Jagjit Sidhu and Harrison Winch and Glenn Starkman},
  title        = "Constraints from Macro-Induced Lightning",
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.3911476},
  url          = {https://zenodo.org/badge/latestdoi/275470390}
}
Package: macrometa-source-oracle
macrometa-source-oracleMacrometa source connector that extracts data from aOracledatabase and produces JSON-formatted data following theSinger spec.How to use itInstall and RunFirst, make sure Python 3 is installed on your system or follow these
installation instructions forMacorUbuntu.It's recommended to use a virtualenv:python3-mvenvvenvpipinstallmacrometa-source-oracleor from source using,Install poetry usinghttps://python-poetry.org/docs/#installationRunpoetrybuild
pipinstalldist/macrometa_source_oracle-<version>*.whlConfigurationRunning the the macrometa source connector independently requires aconfig.jsonfile.Example configuration:{"host":"dev.oracledb.io","port":1521,"user":"C##HELLO","password":"password","service_name":"ORCLCDB","filter_schema":"C##HELLO","filter_table":"CUSTOMERS","replication_method":"LOG_BASED","pdb_name":"ORCLPDB1","multitenant":true,"scn_window_size":10}You can run a discover run using the previousconfig.jsonfile to acquire all the tables definitionmacrometa-source-oracle --config /tmp/config.json --discover >> /tmp/catalog.jsonThen use the catalog.json to run a full export:macrometa-source-oracle --config /tmp/config.json --catalog /tmp/catalog.json
Package: macropad
MacroPadSimple Exampleimportmacropad# Create Pad Instancelp=macropad.MacroPad()# Bind function btn_up to Button X0 Y0 with color red and on press color green@lp.bind(x=0,y=0,colorcode=5,color_on_activate=21)defbtn_up():print("X-0 Y-0 PRESSED!")# Start the Button Listener Threadlp.start_binding_execution_thread()# Wait foreverwhileTrue:continue# Only needed if the programm is ending and not killed, without you get some MIDI errorslp.close()Stop Button Listener Threadlp.stop_binding_execution_thread()Unbind Keys# Unbind Button X0 Y0lp.unbind(x=0,y=0)# Unbind Every Buttonlp.unbind_all()Coltrol Led's# Turn Led X0 Y0 redlp.enable_led(x=0,y=0,colorcode=5)# Turn Led X0 Y0 offlp.disable_led(x=0,y=0)# Turn all LedÂ´s offlp.disable_all_leds()
Package: macropragma
macropragma - apply macros/substitutions/modifications on top of your source codeIntroductionThe intention is to easily modify/add/remove macros within source files. Typical usage is during installation procesess in order to modify involved source files.UsageCreate "my.yaml" file.Add it to the prebuild, build or installation task.ExamplesExecutionpython3 -m macropragma -h
# Typical usage:
python3 -m macropragma -c <CONFIG_YAML=my.yaml> -d <PROJECT_ROOT><CONFIG_YAML=my.yaml># One full entry
db/evr-mtca-300u.db: #file to process
    greps: #grep for the lines under concern
        - "$(SYS)"
        - "$(D)"
    subs: #substitute the elements
        "{$(D)}": "$(D)"
        "{$(D)": "$(D)"
        "$(D)-": "$(D)"
        "}": "-"
        ":": ""
        "$(SYS)$(D)": "$(P)$(R=)$(S=:)"
    output: #store the processed file into
        "db/evr-mtca-300u-univ.db"
Package: macropython
# macropython

class RecordMacro

    args:
        _filename : ``str`` - the file to output to.
        _startup_delay : ``float`` - the delay before recording inputs
        _enable_output : ``bool`` - should print debug info

    methods:

        logic() - the function for saving macro data
            ~ note: this method should not be used manually, it is used my the class itself

        start(startup_delay : ``float``) - use this method is called to start recording input
        args:
            startup_delay : ``float`` - this args is optional, dont pass anything to skip
        ~ note: after the recording is started, use the ESC or Escape key to stop recording

class PlayMacro

    args:

        _filename : ``str`` - the file to load the macro from
        _startup_delay : ``float`` - the delay before recording inputs
        _enable_output : ``bool`` - should print debug info

    methods:

        start(startup_delay : ``float``) - use this function to play the macro
        args:
            startup_delay : ``float`` - this args is optional, dont pass anything to skip
        ~ note: after the recording is started, close the python program to quit playing

class HotKeyMacro

    args:

        _data_ : ``list`` - this is a ``list`` of ``dict``
            info:

                the ``dict``s inside the ``list`` are structured as shown below
                {
                    'trigger' : ``str`` - the key that starts the macro

                    'file' : ``str`` - the location of the macro

                    'repeat' : ``bool`` - repeat the macro forever until the trigger is released
                        ~ note: if set to False, the macro will only once when the trigger is pressed

                    'delay' : ``float`` - time to wait before repeating the macro again
                        ~ note: will only wait if repeat is set to True
                }


        _startup_delay : ``float`` - the delay before recording inputs
        _enable_output : ``bool`` - should print debug info

    methods:
    
        start(startup_delay : ``float``) - use this function to start the hot key macros
        args:
            startup_delay : ``float`` - this args is optional, dont pass anything to skip
        logic() - the function for triggering macros
            ~ note: this method should not be used manually, it is used my the class itself
        _stop_all_threads() - this is to stop all macros
            ~ note: this method should not be used manually, it is used my the class itself
        _play_thread(index : ``int``) - this function is used for each macro 
            ~ note: this method should not be used manually, it is used my the class itself
Package: macros
Macros=====Version 0.0.1.Macros is a collection of Hy macros. It will be developedfurther to provide further convenience. It is on a very early stage.DO NOT USE IN PRODUCTION.install with.. code-block:: shpip install git+git://github.com/Hylands/macros.gitfor the very latest version, or.. code-block:: shpip install macrosfor the more stable version.Then use the macros in hy using.. code-block:: hy(require macros.flask)(require macros.flow)and then use the route macro... code-block:: hy(route "/" "home.html")(route "/"  (defn womethods [] ("hello, world")))(route "/" ["GET" "POST"] (defn wmethods [] ("hello, world")))(route "/" ["GET" "POST"] "templatewmethods.html")(route "/<name>/<address>" "template.html" [name] [[address "N/A"]])The syntax is for a template:.. code-block:: hy(route *route-endpoint* [*possibly a list of methods*] *template* [*required args*] [*optional args*])where *optional args* can be of the form [arg1 arg2] for the default value of Noneor [[arg1 42] arg2] where arg1 would have the default value of 42, but arg2 would have the default value of None.
Package: macros.py
macros.pyMacros in pythonmacros.py is an implemention of macros similar to ones found in C using a custom codec to implement a feature into pythonGuido van Rossum would hate meExamplesMax function-macro# coding: macrosmacrodefMAX(a,b):(aifa>belseb)# print the max of 1 and 5defmax_1_and_5():print(MAX(1,5))max_1_and_5()# output:# 5This code gets translated to python-readable code:# coding: macros# print the max of 1 and 5defmax_1_and_5():print((1if1>5else5))max_1_and_5()# output:# 5More examples can be found in the examples directoryHow it worksYou might be wondering, how the hell did you make macros in python. It's possible due to a quirk in python that allows custom encodings to be created and preprocess the code before it is run. When a macro is defined it doesn't actually define it as a python variable, it saves the bytecode and name of a macro in a list of macros that is checked against when token of typetokenize.NAMEis seen. When a macro is used, it yields the tokens of the macro in place (and if the macro has args, replaces those).InstallingFrom pippy-mpipinstall-Umacros.pyFrom sourcegitclonehttps://github.com/spookybear0/macros.pycdmacros.py
python3-mpipinstall-U.A side noteThis library is a joke, please do not ever use this in a real project.This code is also of terrible quality, but I might decide to improve it soon
Package: macross-serial
IntroductionThe main goalThis project access for the serial port and It is able to script control.Installationpip install macross-serialFor developersgit clone git@github.com:rondou/macross-serial.git
cd macross-serial
poetry installUsageAccess for the serial port and run script.macross-serial run [--repeat N] <port-name> <macro-file>Show serail port name.macross-serial list-portMacro file format<method>	<content>	[<timeout-second>	[progress-message]]Simple examplescript.tsvwait_for_str	'system started at UTC'
send	'account\n'
send	'password\n'
wait_for_regex	r'\b(([0-9A-Fa-f]{2}:){5})\b'
send	'reboot\n'MethodssendWrite data to serial portE.g.send	'poweroff\n'wait_for_strWaiting until for find out a specific string then continue to execute next step.E.g.wait_for_str	'system started at UTC'wait_for_regexWaiting until for find out a regular expression pattern then continue to execute next step.E.g.wait_for_regex	r'\b(([0-9A-Fa-f]{2}:){5})\b'wait_for_secondWait/sleep/pause for N seconds.E.g.wait_for_second	10
Package: mac-say
Installation$[sudo]pipinstallmac-sayExamples>>>importmac_say>>>mac_say.say("hello world")>>>mac_say.say(["-f","file.txt","-v","Alex"])voices list>>>mac_say.voices("en")[('Alex','en_US','Most people recognize me by my voice.'),...]background - addbackground=True>>>mac_say.say("hello world",background=True)Google Text-To-Speech>>>mac_say.gtts.mp3("en","hello world")/Users/username/Library/Caches/say/<hash>.mp3>>>mac_say.gtts.say("en","hello world")$python-mmac_say.gtts"en""hello world"readme42.com