Saravanan666/pypi-org huggingface dataset:
Package: mdpolars
mdpolars_pya simple tool for convert markdown table to polars in python3.
This tool is a lightweight tool for testing a code, so note that we are not validating the user's input.pandas version is hereinstallpipinstallmdpolarsusageimportpolarsasplimportmdpolarsdf=mdpolars.from_md("""+------------+-------+| id         | score |+------------+-------+| 1          | 15    || 2          | 11    || 3          | 11    || 4          | 20    |+------------+-------+""",schema=[("id",pl.Int64),("score",pl.Int64)])print(df)# shape: (4, 2)# ┌─────┬───────┐# │ id  ┆ score │# │ --- ┆ ---   │# │ i64 ┆ i64   │# ╞═════╪═══════╡# │ 1   ┆ 15    │# │ 2   ┆ 11    │# │ 3   ┆ 11    │# │ 4   ┆ 20    │# └─────┴───────┘# the header can be overwritten if the header existsimportmdpolarsdf=mdpolars.from_md("""+------------+-------+| id         | score |+------------+-------+| 1          | 15    || 2          | 11    || 3          | 11    || 4          | 20    |+------------+-------+""",schema=["foo","bar"])# the default type is str.print(df)# shape: (4, 2)# ┌─────┬─────┐# │ foo ┆ bar │# │ --- ┆ --- │# │ str ┆ str │# ╞═════╪═════╡# │ 1   ┆ 15  │# │ 2   ┆ 11  │# │ 3   ┆ 11  │# │ 4   ┆ 20  │# └─────┴─────┘accepted table patterns| Syntax    | Description |
| --------- | ----------- |
| Header    | Title       |
| Paragraph | Text        |+------------+-------------+
| Syntax     | Description |
+------------+-------------+
| Header     | Title       |
| Paragraph  | Text        |
+------------+-------------+| Syntax    | Description |
| :-------- | ----------: |
| Header    | Title       |
| Paragraph | Text        || Header    | Title       |
| Paragraph | Text        |contributeIf you have suggestions for features or improvements to the code, please feel free to create an issue or PR.
Package: mdprint
mdprintPython tools to print strings to markdown file with styles. Also allows printing dicts and lists to tableInstallationpip install mdprintQuick StartBasicsmdprint('Markdown styles', heading=3)
mdprint('It is convenient to use mdprint just like print.\n')
mdprint('You can make text ', end='')
mdprint('bold', bold=True, end=', ')
mdprint('italics', italics=True, end=', ')
mdprint('or even ', end='')
mdprint('strikethrough', strikethrough=True)
mdprint('\nYou can also write ', end='')
mdprint('code', code=True)
mdprint('from mdprint import mdprint', code_block=True)Markdown stylesIt is convenient to use mdprint just like print.You can make textbold,italics, or evenstrikethroughYou can also writecodefrom mdprint import mdprintWriting to filemdprint takesfileargument similar toprintwith open('README.md', 'w') as f:
    mdprint('Hello', heading=2, file=f)Dictfrom mdprint import mdprint_dict
mydict = {'dogs': ['goldie', 'labrador', 'bulldog'], 'cats': ['polydactyl', 'snowshoe', 'calico'], 'fish': ['cod', 'herring', 'mackerel']}mdprint_dict(mydict)dogscatsfishgoldiepolydactylcodlabradorsnowshoeherringbulldogcalicomackerelListfrom mdprint import mdprint_list
mylist = [['goldie', 'labrador', 'bulldog'], [4, 5, 6], [7, 8, 9], [10, 11, 12]]mdprint_list(mylist)goldielabradorbulldog456789101112AdvancedYou can sort, invert and combine commandsmdprint_list([['animal type', 'variety 1', 'variety 2', 'variety 3']], end='')
mdprint_dict(b, keys_as_headers=False, sort_keys=True, start='')animal typevariety 1variety 2variety 3catspolydactylsnowshoecalicodogsgoldielabradorbulldogfishcodherringmackerelContributingPull requests are very welcome.Fork the repoCreate new branch with feature name as branch nameCheck if things work with a jupyter notebookRaise a pull requestLicencePlease see attachedLicence
Package: md-pro
Markov Decision ProcessMarkov Decision ProcessMarkov Decision ProcessInstallationpipinstallmd-proUsage##################### Parameters #####################parser=argparse.ArgumentParser()parser.add_argument('--sample_time','-Ts',type=float,help='Ts=0.1',default='0.1',required=False)parser.add_argument('--gamma','-gam',type=float,help='gamma=0.9',default='0.9',required=False)parser.add_argument('--x_grid','-xgr',type=int,help='x_grid=5',default='8',required=False)parser.add_argument('--y_grid','-ygr',type=int,help='y_grid=5',default='5',required=False)parser.add_argument('--n_optimal','-nopt',type=int,help='n_optimal=5',default='5',required=False)args=parser.parse_args()params=vars(args)####################################################### Challenge with Markov Decision Process (MDP) ########################################################start pointstrt_pnt='0'# pointsP=get_meshgrid_points(params)# TopologyT,S=get_simple_topology_for_regular_grid(params,P)# rewardsR={'35':100}mdp_challenge={'S':S,'R':R,'T':T,'P':P}dict_mdp=start_mdp(params,mdp_challenge)reach_set=reach_n_steps(strt_pnt,mdp_challenge,dict_mdp,params,steps=8)optimal_traj=get_trajectory(strt_pnt,dict_mdp,reach_set)plot_the_result(dict_mdp,mdp_challenge)... should produce:CitationPlease cite following document if you use this python package:TODOImage source:https://www.pexels.com/photo/photo-of-black-and-beige-wooden-chess-pieces-with-white-background-1083355/
Package: mdproptools
MDPropTools: MD Property ToolsRasha Atwi, Matthew Bliss, Maxim Makeev, and Nav Nidhi RajputStony Brook UniversityTable of ContentsIntroductionMDPropTools is a Python package for computing structural and dynamical properties from
LAMMPS trajectory and output files.Source:https://github.com/molmd/mdproptoolsInstallationMDPropTools can be installed using pip:pip install mdproptoolsOr by cloning the repository and running the setup script:git clone https://github.com/molmd/mdproptools.git
cd mdproptools
python setup.py installUsageCitationIf you use MDPropTools in your research, please cite the following paper:Atwi, R., Bliss, M., Makeev, M., & Rajput, N. N. (2022).MISPR: An automated infrastructure for high-throughput DFT and MD simulations. Scientific Reports, 12(1), 1-16.
Package: md-protobuf
md-protobuf provides a generator for generating mardown documnetation files from google protocol buffer files.Producing Codemd-protobuf provides a plugin for theprotocprotocol buffer compiler (it ships with protocol buffers). This plugin tellsprotocto produce a set of mardown output files, which contains documentation derived from the comments in the proto file.First, obtain a copy of md-protobuf:$ git clone git@github.com:mickem/md-protobuf.git
$ cd md-protobufNext, install md-protobuf:$ python setup.py installFinally, launch protoc and tell it to produce Md output:$ protoc -I/path/to/your/proto/files --md_out=/output/path file1.proto file2.protoYou simply need to add--md_outto the arguments toprotocto get it to produce the Markdown output files.Under the hood,protocis looking for the programprotoc-gen-mdsomewhere in your $PATH. You can modify $PATH in lieux of installing the package, if you desire.
Package: mdpt
mdmtis a protocol for data transferproject include:_ request generator_ request parser_ simple socket server / clientrequest:mdpt/0.1
length: ##
##meta##

-
##data##generating:mdpt(meta).g(data)parsing data:mdpt().u(pkg)parsing metadata:mdpt().m(pkg)parsing data length:mdpt().l(pkg, include_meta, minus)include_meta: bool if True returns length with metadata
minus: int subtracts minus value
Package: mdpw
This package generates a PrettyMIDI object from Array of Array.
Here is a sample code.import mdpw
a = ['s',['n',64,1,64,1],['n',68,1,64,1],['n',71,1,64,1],
   ['c',['n',64,1,64,1],['n',68,1,64,1],['n',71,1,64,1]]]
mdpw.compile(a, 120).write("hello.mid")‘n’ means a note and followed values are pitch, duration, velocity and instrument. The instrument 129 means Drum.
‘s’ means to play sequentially and ‘c’ means to play simultaneously.
Package: mdpyformat
Advanced course on Python3This course covers several topicsPython decoratorsThe python object system / meta classesIterators, generators and asyncioAlso see my text onPython import systemEach lesson is a python program, the output of that program is the rendered markdown text that makes up the lesson. This approach gives me some confidence about the quality of the material.mdpyformat literate programming libraryI am using a kind ofliterate programming tooldeveloped for this course.
The tool is right here in this repository, in themdpyformat packageThe main function of themdpyformat packageiseval_and_quote(string_arg). This function does the following steps:Renders the argument string as a code snippetEvaluates the string argument as a python script, with the global variable context of the calling moduleRenders the result of evaluating the code (both standard output and standard error)There is alsoprint_md(*args)- this shows the outut as a markdown regular text sectionheader_md(line, nesting=1)- this renders the line as a headerprint_quoted(*args)- shows the aguments as markdown quoted textInstallation of mdpyformatThe mdpyformat library can be installed via pippip3 install mdpyformatHere is thelink to pypitable of content generation scriptThe mdpyformat package contains a script for the generation of table of contents in the generated markdown files.To invoke this script runpython3 -m mdpyformat.tocgen MARKDOWN_INPUT_FILE MARKDOWN_OUTPUT_WITH_ADDED_TABLE_OF_CONTENTThe script has beend derived from thisgistThanks!
Package: mdr
MDR is a library detect and extract listing data from HTML page. It implemented base on theFinding and Extracting Data Records from Web Pagesbut
change the similarity to tree alignment proposed byWeb Data Extraction Based on Partial Tree AlignmentandAutomatic Wrapper Adaptation by Tree Edit Distance Matching.Requiresnumpyandscipymust be installed to build this package.UsageDetect listing dataMDR assume the data record close to the elements has most text nodes:[1]: import requests
[2]: from mdr.mdr import MDR
[3]: mdr = MDR()
[4]: r = requests.get('http://www.yelp.co.uk/biz/the-ledbury-london')
[5]: candidates, doc = mdr.list_candidates(r.text.encode('utf8'))
...

[8]: [doc.getpath(c) for c in candidates[:10]]
 ['/html/body/div[2]/div[3]/div[2]/div/div[1]/div[1]/div[2]/div[1]/div[2]/ul',
 '/html/body/div[2]/div[3]/div[2]/div/div[1]/div[2]',
 '/html/body/div[2]/div[3]/div[2]/div/div[1]/div[2]/div[2]',
 '/html/body/div[2]/div[3]/div[1]/div/div[4]/div[1]/div/div[1]/div/div[2]/div[1]/div[1]/div',
 '/html/body/div[2]/div[3]/div[1]/div/div[4]/div[2]/div/div[3]',
 '/html/body/div[2]/div[3]/div[1]/div/div[4]/div[1]/div/div[2]/ul/li[2]/div/div/ul',
 '/html/body/div[2]/div[3]/div[2]/div/div[1]/div[1]/div[2]/div[1]',
 '/html/body/div[2]/div[3]/div[2]/div/div[1]/div[2]/div[2]/div[1]/table/tbody',
 '/html/body/div[2]',
 '/html/body/div[2]/div[4]/div/div[1]']Extract data recordMDR can find the repetiton pattern by using tree matching under certain candidate DOM tree.then it will build a mapping from so-calledseed elementto a list of matched elements from different DOM trees.Used with annotation (optional)You can annotate the seed record with any tools (e.g.scrapely) you like, then mdr will be able to find the other  data in the page.e.g. you can find this demo pagehere. the colored data in first row are annotated manually, the rest are extracted by MDR.AuthorTerry Peng <pengtaoo@gmail.com>LicenseMIT
Package: md_rbrb
multilanguage Rabi-Ribi displayMIT-licensed, 2017/02/19,ed@irc.rizon.nethttps://ocv.me/stuff/md_rbrb.png– screenshothttps://ocv.me/stuff/md_rbrb.mp4– videohttps://pypi.org/project/md_rbrb/– downloadusageinstallmecab.exewithUTF-8 dictionary charset:http://taku910.github.io/mecab/#winopen a terminal:WIN+Rcmdinstall md_rbrb:pip install md_rbrbrun md_rbrb:md_rbrb(or maybepython-mmd_rbrb)visithttp://127.0.0.1:8086/if you are running md_rbrb from the source code directory, disregard all the above (except for the mecab part) and just runstart-md_rbrb.bathow it worksit attaches to rabiribi.exe and uses hardcoded memory addresses to read out the currently visible dialogue line from the process memoryon each new line it parses the game’s dialogue file from disk and reads out the japanese and english variant of said linean httpd offers a document which displays the current dialogue line and autorefreshes to load new linesmaintainersif there’s a new version of rabi-ribi and this script has died, open up the following file for reference along with cheatengine:C:\ProgramFiles(x86)\Steam\steamapps\common\Rabi-Ribi\localize\event\story_en.rbrbstart a new gametap past the first two lines of dialogue (...and...?)stop at the 3rd line (Yawn...)CTRL-F the dialogue line in story_en.rbrb, you’ll see its block ID right above the search resultdo a 4byte search for that ID (10000), you’ll see a couple resultsskip 3 lines ahead until just after the cutscene, then stop at the 1st line (Wh-Whatis this place?)do another search for the new ID (10001), now there’s only two search resultsadd the 1st result to the code list by doubleclicking it, then rightclick it in the codelist andPointerscan for this address, use default settings, hit OK and Yes (it’ll only take like 44kB)the top result will have “Offset 0“ =0and the other offsets are blank, you just foundADR_BLOCK_IDwhich is the hexadecimal value under “Base Address“without advancing the dialogue, start a new 4byte search for 0, then move one line ahead ingame and search for 1, then one more line and search for 2 etc until there’s just one result with green textpointerscan that result and grab the first result with “Offset 0“ =0, that isADR_BLOCK_POSnote that if the dialogue box goes away for a camera pan or whatever then you have to start over since that makes it go back to 0, so do this with a dialogue scene that goes on for a bit uninterruptedchangelog2017/03/24: v1.1 for Rabi-Ribi v1.882017/02/19: v1.0 for Rabi-Ribi v1.75
Package: mdrec
# MDRec : Markdown Recorder from python[![Current version on PyPI](http://img.shields.io/pypi/v/mdrec.svg)](PyPI)[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)MDRec creates markdown file easily from python object.You can also convert this to html file at once.## Installation```bashpip install mdrec```## ExampleHere is example code, output result and raw_file respectively.### Code```pythonfrom mdrec import MDRecsave_file = "./out/test_txt.md"# set markdown file. (You may also try not to set this option.)r = MDRec(save_file=save_file)# suppoort header. write "#### testtest\n\n" in designated save_file.r.rec("testtest", h=4)# plain txtr.rec("this is example below")# express itemization via Iterable objectr.rec([1,2,3])# draw vertical liner.line()# support jar.rec(["あ", "い", "う", {"え" : "お"}])# you should draw a vertical line explicitlyr.line()# support nested list, dict or Iterable.r.rec([1,[1,2],[2,[3],4], [{"a": 100, "b": 234}], {"c" : [3,4,5]}])## support quoter.increase_quote_level()## If you set raw option to be False, suppress markdown output in jupyter notebook.r.rec("testtest", h=2, raw=False)r.increase_quote_level()r.rec(["z", 'x'])r.reset_quote_level()from pandas import DataFrame# support DataFrame or Series ((NOT support list of list)df = DataFrame([[12, 2, 4, 3], [3, 3, 3, 4]], columns=list("abcd"), index=["AB", "BB"])# display table with titler.rec(df, title="test", h=3)# set link. support both url and local file path.r.link(src="./test01.png", title="test", text="sample")# image link with markdown syntax. To display image in jupyter notebook syncronously, set copy_sync=Truer.img(src="./test01.png", title="test", text="sample", copy_sync=True)# export markdown file to html via github API. (You can set your username and password in ~/.grip/settings.py.)r.to_html()```### Output`<start>`#### testtestthis is example below- 1- 2- 3---- あ- い- う- え: お---- 1- - 1- 2- - 2- - 3- 4- - a: 100b: 234- c:- 3- 4- 5> ## testtest>>> - z>> - x>>### test|   |  a  |  b  |  c  |  d  ||---|----:|----:|----:|----:||AB |   12|    2|    4|    3||BB |    3|    3|    3|    4|[sample](../test01.png "test")![sample](img/test01.png "test")`<end>`### Raw```markdown#### testtestthis is example below- 1- 2- 3---- あ- い- う- え: お---- 1- - 1- 2- - 2- - 3- 4- - a: 100b: 234- c:- 3- 4- 5> ## testtest>>> - z>> - x>>### test|   |  a  |  b  |  c  |  d  ||---|----:|----:|----:|----:||AB |   12|    2|    4|    3||BB |    3|    3|    3|    4|[sample](../test01.png "test")![sample](img/test01.png "test")```## Usage+ By default, results are also displayed in jupyter notebook, so if you switch off the option, let `r.rec(obj, raw=False)`.## Configuration+ If you use `MDRec.to_html`, note that this call [Grip](https://github.com/joeyespo/grip) and github API implicitly. To set github username and password, see the link, https://github.com/joeyespo/grip#configuration.
Package: md-redact
Markdown RedactAn extremely simple markdown extension that will optionally redact content from
a document.InstallationThis extension is designed forpython-markdown.pip install markdown md-redactUsageIn your environment:exportMD_REDACT_CONTENT=1In your markdown document:This is $some sensitive content$ in a markdown document.In your Python code:importmarkdownwithopen("filename.md","r")asinput_file:text=input_file.read()html=markdown.markdown(,extensions=["md_redact"])# html == '<p>This is <span class="redacted">(redacted)</span> in a markdown document.</p>'Or from the command line:MD_REDACT_CONTENT=1python-mmarkdown-xmd_redactfilename.mdWhy?Processing markdown for a project where some users were allowed to see specific
content while others were not. Figured an inline processor might be easier than
locking the users lacking permissions out of the page entirely.
Package: mdrnn
Multi-Directional Multi-Dimensional Recurrent Neural NetworksA library built on top of TensorFlow implementing the model described in
Alex Graves's paperhttps://arxiv.org/pdf/0705.2011.pdf.
The library comes with a set of custom Keras layers.
Each layer can be seamlessly used in Keras to build a model and
train it as usual.Status: under developmentThis repository is in its early stages. The code presented here is not stable yet
and it wasn't extensively tested. Use it at your own riskFeaturesLayers available now:MDRNN: layer analogous to Keras SimpleRNN layer for processing multi-dimensional inputsMDLSTM: analogous to Keras LSTM layerMultiDirectional: layer-wrapper analogous to Keras Bidirectional for creating
multi-directional multi-dimensional RNNLayers currently under development (coming soon):MDGRU: analogous to Keras GRU layerAdditional features:easy to use with KerasKeras-like API for each layeroption to choose order/direction in which to process inputscomputations are run on CPUInstallationInstall the package from PyPI:pip install mdrnnAlternatively, clone the repository and install dependencies:git clone <repo_url>
cd <repo_directory>
pip install -r requirements.txtQuick StartCreate a 2-dimensional RNN:from mdrnn import MDRNN, MDLSTM, MultiDirectional
import numpy as np
import tensorflow as tf
rnn = MDRNN(units=16, input_shape=(5, 4, 10), activation='tanh', return_sequences=True)
output = rnn(np.zeros((1, 5, 4, 10)))Build a Keras model consisting of 1 MDRNN layer and train it:model = tf.keras.Sequential()
model.add(MDRNN(units=16, input_shape=(2, 3, 6), activation='tanh'))
model.add(tf.keras.layers.Dense(units=10, activation='softmax'))
model.compile(loss='categorical_crossentropy', metrics=['acc'])
model.summary()
x = np.zeros((10, 2, 3, 6))
y = np.zeros((10, 10,))
model.fit(x, y)Similarly, create and train a multi-directional MDRNNx = np.zeros((10, 2, 3, 6))
y = np.zeros((10, 40,))

model = tf.keras.Sequential()
model.add(tf.keras.layers.Input(shape=(2, 3, 6)))
model.add(MultiDirectional(MDRNN(10, input_shape=[2, 3, 6])))

model.compile(loss='categorical_crossentropy', metrics=['acc'])
model.summary()

model.fit(x, y, epochs=1)Similarly, create and train a multi-directional multi-dimensional LSTM (MDLSTM)x = np.zeros((10, 2, 3, 6))
y = np.zeros((10, 40,))

model = tf.keras.Sequential()
model.add(tf.keras.layers.Input(shape=(2, 3, 6)))
model.add(MultiDirectional(MDLSTM(10, input_shape=[2, 3, 6])))

model.compile(loss='categorical_crossentropy', metrics=['acc'])
model.summary()

model.fit(x, y, epochs=1)RequirementsTensorFlow version >= 2.0References[1] A. Graves, S. Ferńandez, and J. Schmidhuber. Multidimensional recurrent neural networks.[2] A. Graves and J. Schmidhuber. Offline Handwriting Recognition with Multidimensional Recurrent Neural Networks.
Package: md-rst
Command-line tool to convert Markdown files to reStructuredText using
Pandoc.InstallationInstall the converter using pip:pipinstallmd-rstUsageRun the converter from the command line:md-rstinput.mdoutput.rstReplace input.md with the path to your input Markdown file and
output.rst with the desired output reStructuredText file.
If you do not specify “output.rst” it will use the same name as the .md file.LicenseThis project is licensed under the GNU-GPL3 License. Read LICENSE for
more information.
Package: mdrunner
mdrunnerA framework for running user-defined calculations (here called models)1. Installationpip install mdrunner2. Get startedSample code on how to define, register and run user-defined models.2.1 User-defined model typesEach type of model shall be defined inModelTypefromenumimportEnum,autoclassModelType(Enum):S=auto()A=auto()B=auto()2.2 User-defined model classesEach model shall be defined in a separate class that inherits from theModel()base classFor each model class declarethe model typeModelTypethe dependencies to other models ininit()the calculations to execute inrun()frommdrunnerimportModelclassS2(Model):model_type=ModelType.Sdefinit(self):"""Expecting external input data from runner.add_input()"""passdefrun(self):passclassA1(Model):model_type=ModelType.Adefinit(self):self.depend_on(ModelType.S)defrun(self):self.add_output(name='x',val=self.S.input.p1*self.S.input.p2)classB1(Model):model_type=ModelType.Bdefinit(self):self.depend_on(ModelType.S)self.depend_on(ModelType.A)defrun(self):self.add_output(name='x',val=self.A.output.x*self.S.input.p3)2.3 Model parametersModel input and output values are passed between models as ('name', 'value') pairs.
The 'name' must be astrand the 'value' can beanyobject like e.g.{'p1':2,'p2':3.12e5,'s32':'my text','x':numpy.array([1,2,3]),'df22':pandas.DataFrame,'y':MyCustomClass,...}2.4 Model libraryPut the models in a separate directory and include a__init__.pyto make it an importable python module/models/__init__.pymodels.py2.4 Register and run the modelsimport the user-defined modelsselect the models to runsupply any model with input valuesrun the modelscollect the resultsThe framework figures out the right order of execution. The result of the calculations are accessed through the Runner instance.importimportlibfrommdrunnerimportRunnerfrommodelsimportModelType# Register modelsall_models=importlib.import_module('models')selected_models=['A1','S2','B1']runner=Runner(all_models,selected_models)# feed models with external inputsvalues={'p1':2.0,'p2':3.0,'p3':4.0}runner.add_output(values,ModelType.S)# run modelsrunner.run_models()# check model resultsassertrunner.input=={'S.p1':2.0,'S.p2':3.0,'S.p3':4.0}assertrunner.output=={'A.output.x':6.0,'B.output.x':24.0,}assertrunner.A.output.x==6.0assertrunner.B.output.x==24.0assertrunner.S.input.p1==2.0assertrunner.S.input.p2==3.0assertrunner.S.input.p3==4.03. Further readingFor more usage examples see thedocsandtestsfolders
Package: mds
mds - markdown serverMarkdownServer is a simple Python application that serves local markdown files in your browser for simple viewing and editing. Markdown server is still in early development.InstallationVia pip:pip3 install mdsVia setup.py:pip3 install mistune bottlepython3 setup.py installUsageTo use markdown server you simply need to point it to a directory where you keep markdown files. It will recursively search through the directory for files with a*.mdextension. These can then be viewed and edited in the browser at localhost:3000.Serve notes on default port:mds ~/notesServe notes on specific ports:mds -p 8080 ~/notesContributingContributing is welcome, just make a PR.LicenseMIT