Saravanan666/pypi-org huggingface dataset:
Package: pymdict
PyMDictAdvanced Python Mongo Dict.
A Python dictionary based on a MongoDB. It allows to treat a collection as a dictionary in Python, with extensive capabilities, like allowing basic queries, bulk operations and versioning (forks).INSTALLATIONCurrently it is only supported Python3.4 onwards. It can be installed through pip:$pip3installpymdictUSAGEIn order to run, a MongoDB server is required.A Mongo-based dictionary can be instantiated as follows:>>>frompymdict.mongo_dictimportMongoDict>>>>>>m=MongoDict("custom_id",mongo_host="localhost",mongo_port=27017)Oncemis instantiated, it can be used as a normal dictionary.>>>m["key"]="value">>>m[44]="value2">>>m["key2"]="value3">>>m["number"]=44>>>print(list(m.keys()))["key",44,"key2, "number"]>>>forkey,valueinm.items():...print("{}:{}".format(key,value))key:value44:value2key2:value3number:44In addition, there are advanced functionalities like queries:>>>forkey,value,_inm('key% ey'):...print("{}:{}".format(key,value))key:valuekey2:value3>>>forkey,value,_inm('key% ey or value = 44'):...print("{}:{}".format(key,value))key:valuekey2:value3number:44Queries also support to query with sub-dict elements:>>>m["first"]={"example":44}>>>m["second"]={"example":45}>>>m["third"]={"example":46}>>>forkey,value,_inm('value.example > 44 and value.example < 46'):...print("{}:{}".format(key,value))second:45(TODO: Check the wiki page for more information about the query syntax)Note that all the stores and removals are stored within a MongoDB. This means for each addition,edit and removal there is at least one connection to the MongoDB backend. In order to optimize it, a bulk operation can be used to wrap such amount of operations in a single connection:>>>withm.bulk(buffer_size=100)asm:...forxinrange(2000):...m["key{}".format(x)]={"example":x}Also, a mongo dict can be forked without the need to copy its content. This is specially useful if the target dict is extremely big and a copy is wanted. Note that a fork is an immediate process, and it allows to override or remove elements without modifying an original dictionary. It is achieved by applying a versioning technique with the dictionaries and it is still in an experimental state.(TODO: More information about forking and versioning in the wiki page)>>>m['foo']="bar">>>fork=m.fork()>>>print(fork['foo'])bar>>>fork['foo']="foo">>>print(fork['foo'],m['foo'])foobar
Package: pymdocx
pydocx is a Python library for merging revised and commented Microsoft Word files.Installationpip install pymdocxUsageimport os

from pymdocx.common.utils import get_doc
from pymdocx.doc.paragraph import merge_paragraph_comment_revision
from pymdocx.doc.table import merge_table_comment_revision

DIR_PATH = './../data/test_table'

# merge_docx
doc_o_path = os.path.join(DIR_PATH, 'table.docx')
doc_a_path = os.path.join(DIR_PATH, 'table_a.docx')
doc_b_path = os.path.join(DIR_PATH, 'table_b.docx')
doc_o = get_doc(doc_o_path)
doc_a = get_doc(doc_a_path)
doc_b = get_doc(doc_b_path)
merge_paragraph_comment_revision(doc_o, [doc_a, doc_b])
merge_table_comment_revision(doc_o, [doc_a, doc_b])
doc_o.save('table_new.docx')
Package: pymdown-csv2md
Python Markdown Extension: csv2mdSee:https://pypi.org/project/mdtable/SettingsSettingDefaultDescriptionbase_path'.'Base path from where relative paths are calculated.padding1Padding to use in raw formatted markdown table.delimiter','Delimiter character in CSV file.quotechar'"'Quote character in CSV file.escapechar''Escape character in CSV file.Example Input[caption](./path/to/my/file.csv)Example Output (markdown)|Code              |Prompt                           |Type     |Required|
|------------------|---------------------------------|---------|--------|
|question_type     |Question Type                    |select   |Yes     |
|                  |facet                            |         |No      |
|                  |value                            |         |No      |
|                  |hybrid                           |         |No      |
|facet_field       |Facet Field                      |text     |No      |
|keyword           |Keyword (over heading)           |text     |No      |
|short_description |Short Description (under heading)|memo     |No      |
|long_description  |Long Description (in popup)      |memo     |No      |
|load_answer_images|Load Answer Images               |checkbox |No      |
|disable_when_true |Disable When True                |multitext|No      |
Package: pymdown-env
PyMdown pymdown-env extensionReplaces~~~${ENV_VAR_HERE}~~~with the content of the environment variableENV_VAR_HEREUseful for generating static sites withmkdocsin CI pipelines.Disclaimer: Don't blame me if this extension leaks your secret deploy tokens etc.Installationpipinstallpymdown-envInmkdocs.yml:markdown_extensions:
    - pymdown_envExamplebefore[Download version ~~~${VERSION}~~~](/binaries/~~~${VERSION}~~~/myapp.exe)after[Download version 1.0.0](/binaries/1.0.0/myapp.exe)LicenseMIT
Package: pymdown-include
Pymdown-IncludeI tried hard to make the base name of the file to be included in the search
path, but I couldn't figure out how to do that. During the "preprocessor"
phase, I have no information about the file being processed. I just have the
content of the file as an array of lines.Some useful comands for developingpoetry install
poetry build
poetry run pytest
poetry run pytest --cov=pymdown_include
Package: pymdown-typehint
Python Markdown Extension: typehintAn extension forPython-Markdown. Replaces[@TYPENAME]text with styled "bubble" with a unique color.Example Input## Uppercase

[@ANY]
[@ARRAY]
[@BOOLEAN]
[@CLASS]
[@DATE]
[@ELEMENT]
[@FLOAT]
[@FUNCTION]
[@INT]
[@NUMBER]
[@OBJECT]
[@REGEXP]
[@STRING]

## Title Case

[@Any]
[@Array]
[@Boolean]
[@Class]
[@Date]
[@Element]
[@Float]
[@Function]
[@Int]
[@Number]
[@Object]
[@RegExp]
[@String]

## Lower Case

[@any]
[@array]
[@boolean]
[@class]
[@date]
[@element]
[@float]
[@function]
[@int]
[@number]
[@object]
[@regexp]
[@string]

## Custom

[@any any]
[@array \[\]]
[@boolean true]
[@class MyClass]
[@date myDate]
[@element HTMLElement]
[@float 4.32]
[@function myFunction]
[@int 32]
[@number myNumber]
[@object {}]
[@regexp myRegex]
[@string 'testing']Example Output
Package: pymdownx-blocks
PyMdown Extensions BlocksThese are a collection of blocks for thePyMdown Extensionsthat I find useful.This project is not affiliated with the PyMdown Extensions project and is currently in a very early stage. Currently, there is only one block:DirTree.Installationpipinstallpymdownx-blocksUsageThis can be used in MkDocs or by itself. To use in a Python file, we use the following:importmarkdownyaml_str=...md=markdown.Markdown(extensions=['pymdownx_blocks.dirtree'])To use in MkDocs, register the extension....markdown_extensions:...-pymdownx_blocks.dirtree...In a markdown file,///dirtree

root:
- subdir:
  - File
- another subdir:
  - anotherfile.txt
  - file.csv
///When rendered, this will produce the following treeDirectory Structureroot
├── subdir 
│   └── File
└── another subdir
    ├── anotherfile.txt 
    └── file.csvContributingMore blocks are always welcome! This project usesryefor dependency
management.Fork the repositoryCreate a branch with the name of the blockImplement the blockCreate a pull request.
Package: pymdownx-superfence-filter-lines
Frequenz Filter Lines SuperfenceIntroductionA custom superfence for pymdown-extensions that can filters lines and plays
nice with MkDocs.This is particularly useful when you want to hide some comments or some
boilerplate code from the documentation for any reason.A typical use case is when you are testing your examples in the documentation,
so you might need to add some initialization code, or importing some dependencies
that are not relevant for the point you are trying to make in the
documentation, but you still need the example code to work to make sure they are
not inadvertedly broken.Quick ExampleWhen writing some documentation, and you want to show some code block, but
you want to show only some lines, you can use this superfence as follows:```textshow_lines=":2,4,7,10:12,15:"
This is line 1
This is line 2
This is line 3
This is line 4
This is line 5
This is line 6
This is line 7
This is line 8
This is line 9
This is line 10
This is line 11
This is line 12
This is line 13
This is line 14
This is line 15
This is line 16
This is line 17```This will show the following block of code in the rendered output:This is line 1
This is line 2
This is line 3
This is line 4
This is line 5
This is line 6
This is line 7
This is line 8
This is line 9
This is line 10
This is line 11
This is line 12
This is line 13
This is line 14
This is line 15
This is line 16
This is line 17SeeUsagefor a more detailed explanation of the available options.ConfigurationMkDocsTo use this superfence withMkDocs, you can use
something like this:markdown_extensions:-pymdownx.superfences:custom_fences:-name:"*"class:"highlight"format:!!python/name:pymdownx_superfence_filter_lines.do_formatvalidator:!!python/name:pymdownx_superfence_filter_lines.do_validateStandaloneTo use this superfence standalone, you can use something like this:importmarkdownfrompymdownx_superfence_filter_linesimportdo_format,do_validatehtml=markdown.markdown(markdown_source,extensions=['pymdownx.superfence'],extension_configs={"pymdownx.superfences":{"custom_fences":[{'name':'*','class':'highlight','validator':do_validate,'format':do_format}]}})print(html)UsageSeeQuick Examplefor an example.The superfence supports the following options:show_linesA comma separated list of line numbers or ranges of line numbers to show.The line numbers are 1-based. If any line number is zero or negative, a warning
is logged and the line or range are ignored.Ifshow_linesis omitted, it defaults to showing all lines.RangesRanges are inclusive and are defined as follows:The ranges are specified asstart:end, wherestartandendare the line
numbers of the first and last lines to show, respectively.Ifstartis omitted, it defaults to the first line. Ifendis omitted, it
defaults to the last line.Ifstartis greater thanend, a warning is logged and the range is
ignored.Ifstartis greater than the number of lines in the code block, the range
is ignored.Ifendis greater than the number of lines in the code block, it is set to
the number of lines in the code block.ContributingIf you want to know how to build this project and contribute to it, please
check out theContributing Guide.
Package: pymdpages
pymdpages: a minimalistic python-markdown static page generator for academic articlesInstallationpipinstallpymdpagesUsagepymdpagesrequires that you have, within your working directory:css/main.cssandcss/highlight.cssfor main sheetstyling and Pygments syntax highlighting;js/mathjax-config.jsto configure MathJax 3 to work;bib/containing bibliography references;template/head.htmlandtemplate/tail.htmlas HTML templates to be used before and after the
Markdown text.This repository comes with example files. See the help information for how to pass these topymdpages:pymdpages--helpOnce you have these set up, simply do:pymdpagesmarkdown_file_1.mdmarkdown_file_2.md...pymdpageswill emulate the same file structure as the.mdfiles you pass it, e.g.a/b/c/d.mdwill createout/a/b/c/d.html.
Package: pymdstat
A pythonic library to parse Linux /proc/mdstat file.>>>frompymdstatimportMdStat>>>mds=MdStat()# Read the /proc/mdstat file>>>mdsPersonalities:[raid1][raid6][raid5][raid4]md1:activeraid1sdb2[1]sda2[0]136448blocks[2/2][UU]md2:activeraid1sdb3[1]sda3[0]129596288blocks[2/2][UU]md3:activeraid5sdl1[9]sdk1[8]sdj1[7]sdi1[6]sdh1[5]sdg1[4]sdf1[3]sde1[2]sdd1[1]sdc1[0]1318680576blockslevel5,1024kchunk,algorithm2[10/10][UUUUUUUUUU]md0:activeraid1sdb1[1]sda1[0]16787776blocks[2/2][UU]unuseddevices:<none>>>>mds.get_stats(){'arrays':{'md0':{'available':'2','components':{'sda1':'0','sdb1':'1'},'config':'UU','status':'active','type':'raid1','used':'2'},'md1':{'available':'2','components':{'sda2':'0','sdb2':'1'},'config':'UU','status':'active','type':'raid1','used':'2'},'md2':{'available':'2','components':{'sda3':'0','sdb3':'1'},'config':'UU','status':'active','type':'raid1','used':'2'},'md3':{'available':'10','components':{'sdc1':'0','sdd1':'1','sde1':'2','sdf1':'3','sdg1':'4','sdh1':'5','sdi1':'6','sdj1':'7','sdk1':'8','sdl1':'9'},'config':'UUUUUUUUUU','status':'active','type':'raid5','used':'10'}},'personalities':['raid1','raid6','raid5','raid4']}>>>mds.personalities()['raid1','raid6','raid5','raid4']>>>mds.arrays()['md2','md3','md0','md1']>>>mds.type('md3')'raid6'>>>mds.status('md3')'active'>>>mds.components('md3')['sdk1','sdj1','sde1','sdl1','sdg1','sdf1','sdh1','sdc1','sdd1','sdi1']>>>mds.available('md3')10>>>mds.used('md3')10>>>mds.config('md3')'UUUUUUUUUU'
Package: pymdt
pyMDT (Messy Data Tools)This Python package handles a variety of tasks I run into regularly in wrangling various messy data into useful states. This is all higher level logic dealing with specific kinds of data but built for things that I routinely need to do across various use cases. It focuses on things like connecting dots between various identifier systems in order to link data together and pull in other useful properties for analysis.I'm not currently building this for others, but I am trying to do a reasonable job on organizing everything here for my own purposes. If you happen to find it useful and would like to collaborate, feel free to get in touch.
Package: pymdtoc
.. raw:: html<!-- starttoc -->Table of contents=================-  `mdTOC <#mdtoc>`__-  `Installation <#installation>`__-  `Usage <#usage>`__-  `Generate TOC <#generate-toc>`__-  `Generate and update file <#generate-and-update-file>`__-  `Via python <#via-python>`__-  `Optional arguments <#optional-arguments>`__.. raw:: html<!-- endtoc -->mdTOC=====Create Table of contents for markdown filesInstallation------------.. code:: shellpip install pymdtocUsage-----Generate TOC~~~~~~~~~~~~.. code:: shellmdtoc generate filename.mdGenerate and update file~~~~~~~~~~~~~~~~~~~~~~~~.. code:: shellmdtoc inplace filname.mdVia python----------.. code:: pythonfrom pymdtoc import TOCtoc = TOC(file="filename.md")print(toc.toc)print(toc.content)Optional arguments~~~~~~~~~~~~~~~~~~-  ``toc_heading`` - Table of contents heading (str)-  ``anchor_function`` - Ability to provide custom anchor tag generator
Package: pymdtools
pymdtools 🐸A small python module to manipulate markdown content.
We use this library to manage a lot of content in markdown.FeaturesRead MarkdownNormalize markdown (it is more a beautifier)Convert to html with multiple converter (python markdown, python mistune)Convert to pdf with convertermanage links inside the markdown (change update links)add some instructions (in html comment format):variable or data easy to findinclude file (like license or header)share content between md file (define some shared paragraph)LicenseThe pymdtools is licensed under the terms of the MIT license and is available for free.LinksWeb siteDocumentationForumIssue trackerSource code
Package: pymdvar
pymdvar - Python-Markdown Variable extensionSimple extension meant to be used to convert variables to their corresponding values. Works with environment variables too. This is really just built to be used with my other projectpyssg, as I need it there but I figured it could be released as an extension.It uses the${variable}syntax. For example, givenvariable=value, the following text:Foo ${variable} barBecomes:<p>Foo value bar</p>Installpymdvarcan be installed viapip:python-mpipinstallpymdvarUsageThe basic usage requires a dictionary with the variables to be passed to theVariableExtensionoptions:>>>importmarkdown>>>frompymdvarimportVariableExtension>>>markdown.markdown('foo *${test}* bar',extensions=[VariableExtension(variables={'test':'value'})])'<p>foo <em>value</em> bar</p>'ifenable_env=Trueoption is set, then it will read environment variables, too. Variables invariablestake preference.Syntax for the variables should only include the characters:a-z,A-Z,_and0-9; this limitation is set like this by personal preference, as the "variable" could be any string, could even include spaces and special chars. Variables not found are just replaced by an empty string.Passing the extension as a string is supported:>>>importmarkdown>>>markdown.markdown('foo *${test}* bar',extensions=['pymdvar'],extension_configs={'pymdvar':{'variables':{'test':'value'}}})'<p>foo <em>value</em> bar</p>'OptionsOnly supported options:variables(defaultdict()):Dictionary containing key-value pairs for variable-values. Examplevariables={'test':'value','key':'value'}enable_env(defaultFalse):Enables environment variable reading.
Package: pyme31-gamgee
pyme31Module for reading data from Digital Multimeter Metex ME-31 via RS-232Installpipinstallpyme31-gamgeeUsagefrompyme31importMe31defmain():# on windows use COM1, COM2...dmm=Me31('COM1')# on unix machines use /dev/ttyXXdmm=Me31('/dev/ttyXX')measurment=dmm.get_measurment()print(measurment)print(measurment.value)print(measurment.unit)print(measurment.measuring_mode)if__name__=="__main__":main()example outputAC19.1mV19.1
Unit.MILIVOLT
MeasuringMode.AC
Package: pymean
pyMEAN: Metabolomic Enrichment ANalysis in PythonThe pyMEAN package is designed to facilitate semi-automated enrichment analysis for metabolomic experiments.InstallationpyMEAN requires Python 3+ and is unfortunately not compatible with Python 2. If you are still using Python 2, a clever workaround is to install Python 3 and use that instead.The easiest way of installing pyMEAN is using pip:pip install pymeanAlternatively, you can use git and pip in unison to get the development branch:pip install https://github.com/KeironO/pyMEANUsageHere's a starting template to get you started:# Import pyMEAN module into Python.frompymeanimportEnrichmentAnalysis# A compound list of inchikeys.compound_list=["WDJHALXBUFZDSR-UHFFFAOYSA-N",# acetoacetic acid"UCMIRNVEIXFBKS-UHFFFAOYSA-N",# beta-alanine"CVSVTCORWBXHQV-UHFFFAOYSA-N",# creatine"FFDGPVCHZBVARC-UHFFFAOYSA-N",# dimethylglycine"VZCYOOQTPOCHFL-OWOJBTEDSA-N",# fumaric acid"DHMQDGOQFOQNFH-UHFFFAOYSA-N",# glycine"FFFHZYDWPBMWHY-UHFFFAOYSA-N",# l-homocysteine"XUJNEKJLAYXESH-REOHCLBHSA-N",# l-cysteine"COLNVLDHVKWLRT-QMMMGPOBSA-N",# l-phenylalanine"BTNMPGBKDVTSJY-UHFFFAOYSA-N"# phenylpyruvic acid]# Create an EnrichmentAnalysis object for the analysis of hsaea=EnrichmentAnalysis(compound_list,organism="hsa")# Run the analysisea.run_analysis(pvalue_cutoff=0.05)# Obtain results (in the format of a pandas dataframe)resuklts=ea.resultsIf you'd like to plot out your results, take inspiration from the following method:defplot_enrichment_analysis_results(results:pd.DataFrame,adj_method:str):fold_enrichment=np.abs(np.log(results["%sadj. p-value"%(adj_method)]))plt.figure()plt.title("Metabolite Sets Enrichment Overview")plt.barh(results["Pathway Name"],fold_enrichment,height=0.5)plt.xlabel("Fold Enrichment")plt.yticks(fontsize=6)plt.tight_layout()plt.show()plot_enrichment_analysis_results(results,"fdr_bh")Which will return the following chart:LicenseCode released under theGPLv3.
Package: pymeanings
Video Demo:Description:IntroductionThis is my final project inCS50x
Harvard. This program can work in Debian
Linux based computers (but it can work on Mac OS also, although I’ve not
checked). This project is a program that finds meanings of words. This
version of the program uses internet and it will run with a keyboard
shortcut. If you want to find a meaning of a word then follow the
following steps:Connect to the internet.Select the word you want to find the meaning of.Press the keyboard shortcut you had set (Go to‘Setting up your
PyMeanings’)Setting up your PyMeaningsInstalling dependenciesxsel: Check thatxselis installed in your system by typingxsel--versionin your terminal. If it is not installed then
install it by typingsudo apt install xselin your terminal.xselis a program that retrieve and set the X selection as it is
given in the manual page accessed by typingman xsel. It is the
program responsible for capturing the selected text by the user.Installing pymeaningsThis program works onPythonversion = 3.7+.
Install the package by typing in your terminalpip install pymeaningsThe keyboard shortcut can be anything you want. In your terminal runwhich pymeaning. Assign your keyboard shortcut to the location given
the bash script you had run. Following are some links which can tell you
how to make keyboard shortcuts in different Linux-based OS:ForXubuntuForUbuntuForLinux
MintForMac OS
XDifferent outputsIf the output gives you an “Error” window. Then it must be a loss of
steps you made. Following are the list of errors:Message: “Please select word for finding meaning”. Then it means you
forgot to select the word.Message: “Can’t find meaning of ‘{your word}’. Check your internet
connection or the word you selected might not mean anything!!”. Then
it means you are disconnected from the internet or the word you
selected does not make sense.If the output is something else other than the errors and shows a bulb
symbol, then it means you followed the steps properly.Best of Luck with PyMeaningsAdhrit Pramanik
Package: pyMeasureMap
pyMeasureMapPython implementation of the MeasureMap specificationUsageClone the repositoryInstall the package:If you only want to use the package, install it with pip:pip install .(where.stands for the directory with your local clone)If you want to run the tests:pip install ".[testing]"If you want to contribute, make sure to include-e(for editable) and run:pip install -e ".[dev]"Running all testsTo run the tests you need a clone of thealigned_bach_choralesrepository. By default, it will be cloned into your
home directory under~/git. To set it up yourself:Clonealigned_bach_chorales(submodules not required)Point pyMeasureMap’s tests to the directory of the clone by setting the constantREPOSITORY_PATHto the
directory that includes thealigned_bach_choralesdirectory.To run the tests, head to your pyMeasureMaps clone and runtox.Command line interfaceOnce the package is installed, theMMwill be available in your commandline. Typing it will print the available
sub-commands.Extracting measure mapsTypeMM extract-hto print the help with all arguments.Parsing all files inpath/to/choralesthat music21 can parse:MM extract -d path/to/corpus                    # creates measure maps next to the parsed files
MM extract -d path/to/corpus -o path/to/output  # creates measure maps in the specified directory
MM extract -d path/to/corpus -r "^bwv"          # only parses files that match the regex (i.e., start with "bwv")
MM extract -d path/to/corpus -x .mxl .xml       # only parses files with the specified extensionsLoading and writingmm=MeasureMap.from_json_file("path/to/file.mm.json")mm.to_json_file("path/to/new_file.mm.json")Compress a MeasureMap objectmm=MeasureMap.from_json_file("path/to/file.mm.json")compressed=mm.compress()compressed.to_json_file("path/to/compressed.mm.json")Making Changes & ContributingThis project usespre-commit, please make sure to install it before making any
changes:pip install pre-commit
cd pyMeasureMap
pre-commit installIt is a good idea to update the hooks to the latest version:pre-commit autoupdateDon’t forget to tell your contributors to also install and use pre-commit.NoteThis project has been set up using PyScaffold 4.5. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.