Saravanan666/pypi-org huggingface dataset:
Package: published
Python library that serves as an example/template for a package publishing guide.PurposeThis library is an illustration of the various tasks and components involved in the process of publishing a small open-source Python package on PyPI, including establishment of linting standards, implementation of unit tests, measurement of coverage, and basic continuous integration.Package Installation and UsageThe package is available on PyPI:python -m pip install publishedThe library can be imported in the usual ways:import published
from published import publishedTesting and ConventionsAll unit tests are executed and their coverage is measured when usingnose(seesetup.cfgfor configuration details):nosetestsAlternatively, the unit tests that are included in the module itself can be executed usingdoctest:python published/published.py -vStyle conventions are enforced usingPylint:pylint publishedContributionsIn order to contribute to the source code, open an issue or submit a pull request on the GitHub page for this library.VersioningThe version number format for this library and the changes to the library associated with version number increments conform withSemantic Versioning 2.0.0.
Package: publish-event-sns
Publish Data Event to SNS TopicThis package helps you to publish a dict object as JSON into SNS Topic, including fields as attributespipinstallpublish-event-snsfrompublish_event_snsimportpublishmy_dict={"foo":"bar"}response=publish("topic_name",my_dict)This code will transform DICT into JSON and publish into SNS Topic withfooas attribute asbarvalue.publishfunction will automaticaly exclude from attributes non primitive values (dict, object, etc)ParametersSome aditional configuration is possible while publishing event:region_name: Region name to use in internal boto3 client;session: If you need to provide a existing boto3 sessionattr_exclude: A list of fields to force exclusion while including fields as attributes
Package: publishextrator
PublishNews extractorFree software: BSD 2-Clause LicenseInstallationpip install publishextratorYou can also install the in-development version with:pip install https://github.com/JonasBrother97/python-publishextrator/archive/master.zipDocumentationhttps://python-publishextrator.readthedocs.io/DevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.4 (2021-11-25)First release on PyPI.
Package: publishing-test
Publishing TestPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseFeaturesTODOCreditsThis package was created withCookiecutterand thepaul_armstrong/cookiecutter-pypackage, which was forked from theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2023-11-26)First release on PyPI.
Package: publish-markdown
Publish markdownPublish articles written in Markdown files to the following platforms:medium.comdev.toMarkdown files should include YAML frontmatter with at least atitle. Addingtagswill help your posts reach a wider audience on the target platforms:---
title: Some title or other
tags: ["webdev", "writing"]
---

{content in Markdown}I wrote this to cross-post article frommy own Jekyll blog, in a GitHub workflow (which I may yet publish as an action).Installation$pip3installpublish-markdownPublishing to medium.com$exportMEDIUM_TOKEN={your-integration-token}$publish-to-medium_posts/2022-01-01-my-first-post.md--canonical-url="https://my-blog.com/2022/01/02/my-first-post"FounduserID:{your-user-id}-Articlepublishedathttps://medium.com/@auser/my-first-post-50134f3aeba0
-Added'medium.com'to'published_to'metadataOptimisationsYou can avoid the code having to retrieve your user ID every time by setting it as an environment variable as well:exportMEDIUM_USER_ID={your-user-id}Publishing to dev.to$exportDEV_TO_TOKEN={your-api-token}$publish-to-DEV_posts/2022-01-01-my-first-post.md--canonical-url="https://my-blog.com/2022/01/02/my-first-post"-Articlepublishedathttps://dev.to/auser/my-first-post-74n
-Added'dev.to'to'published_to'metadataIs cross-posting allowed / a good idea?Cross-posting to extra platforms gets your post to be seen by more communities. This is mostly a good thing - people in one community are unlikely to also be in another simultaneously.While plainly duplicating content on the internet is not generally a good idea, cross-posting or syndicating is fine where it's done right. Dev.to, Medium and Hashnode all explicitly support cross-posting, by providing the ability to set arel=canonicalmeta tag inside their posts. AndGoogle explicitly mentionsyndication of articles as a legitimate use of therel=canonicaltag.So yes, cross-posting is a good idea.
Package: publishnewsextratorp
An example package. Generated with cookiecutter-pylibrary.Free software: BSD 2-Clause LicenseInstallationpip install publishnewsextratorpYou can also install the in-development version with:pip install https://github.com/JonasBrother97/python-publishnewsextratorp/archive/master.zipDocumentationhttps://python-publishnewsextratorp.readthedocs.io/DevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.6 (2021-11-28)First release on PyPI.
Package: publish-sphinx-docs
A simple Python 3.6+ CLI to publish your Sphinx documentation to a
Github Pages or Gitlab Pages repository.Installationpoetry add publish_sphinx_docsUsageAt the command line, enterpublish-sphinx-docs--help.AuthorsAlex Raichev (2018-12-03), maintainerDocumentationOn Github Pageshereand built using this library :-)NotesExperimental, so use at your own risk.Changes1.0.2, 2021-10-07Updated dependencies again.1.0.2, 2021-10-07Updated dependencies.1.0.1, 2019-04-04Removed sphinx-click from dependencies, because it was meant to be a development dependency.1.0.0, 2018-12-04First release.
Package: publish-to-zhihu
Inconvenience选择mdnice或zhihu格式今天这个项目依赖mdnice来转化公式，但是从mdnice复制到知乎编辑器时，所有H1、H2、H3标题通通会被变成H1。mdnice没有做错，应该是知乎编辑器的问题。所以，对于没有公式的文章，请不加"--mdnice" flag，直接上传生成的md到知乎。对于有公式的文章，用上"--mdnice" flag。功能这个工具帮助将Obsidian风格的Markdown文件转化为mdnice的格式，主要有以下功能自动上传本地图片到Azure blob storage保证每个image link都在每行的最开始，没有额外的空格自动为每个list item前面增加额外的回车，不然知乎不识别转换Obsidian的图片链接![[attachments/Pasted image 20230511181810.png]]到知乎格式想要转化为知乎格式，其实还需要下面几个工作，不过我们依赖mdnice来做下面的转换。自动转换latex公式安装首先自行创造Azure storage account和blob container设置环境变量IMAGEHOST_CONN_STR，这个变量要求包含形如AccountName=(.*?);.*EndpointSuffix=(.*?)($|;)")的信息安装工具pipxinstallpublish-to-zhihu如果过去安装过，可以用下面的命令升级pipx upgrade publish-to-zhihu日常使用生成知乎格式的md文件并上传所有图片假设你有多个md文件需要发布，下面是命令# Convert standard Markdown file to Zhihu Format and upload all local images
zhihu_prepare_md --container container_name image_link_root output_folder md_file0 md_file1其中container_name是Azure blob container的名字，假设为publishpic本工具假设图像是相对路径，如![[attachments/Pasted image 20230511181810.png]]。假设在你硬盘上的真实路径是C:\Cloud\OneDrive\note\attachments\Pasted image 20230511181810.png，那么image_link_root就是C:\Cloud\OneDrive\note。output_folder是知乎格式md文件存放的目录。所以，我自己发布《曼昆经济学》成本笔记.md时用的命令就是zhihu_prepare_md --container publishpic c:\Cloud\OneDrive\note\ c:\Cloud\OneDrive\published_to_zhihu\  C:\Cloud\OneDrive\note\经济学\《曼昆经济学》成本笔记.md发布到知乎发布访问c:\Cloud\OneDrive\published_to_zhihu\找到刚刚生成的文件打开mdnice，把md文件拷贝进去。然后从mdnice拷贝出渲染好的适合知乎的内容打开知乎，发表新文章，粘贴从mdnice得到的内容保证知乎成功导入图片：知乎会从图床中导入图片，有的时候图片上传不成功，需要手工点击图片重试一次手工填写标题对于长文章，点击“目录”按钮来生成目录如果需要投稿到问题，手工操作手工选择标签预览发表修改已发表的文章点击文章的修改按钮或链接清空文章的所有内容粘贴从mdnice得到的内容重新导入本地生成的md文件保证知乎成功导入图片预览发表进一步简化从Obisidan中发布文件的流程安装ObsidianShell Commands插件，增加一个下面的命令zhihu_prepare_md --container publishpic c:\Cloud\OneDrive\note\ c:\Cloud\OneDrive\published_to_zhihu\  {{file_path:absolute}}这样，在Obisidian中打开需要发布的文件，然后打开command palette，搜索"zhihu"命令运行就能够生成知乎格式的md文件了。Setup Dev EnvironmentFirst clone this repo then change to the repo directory.Then run following command:pipinstallpoetry
poetryinstall# Create virtual environement, install all dependencies for the projectpoetryshell# activate the virtual environmentpre-commitinstall# to ensure automatically formatting, linting, type checking and testing before every commitIf you want to run unit test manually, just activate virtual environment and run:pytest本地开发流程测试脚本是否正确python-mpublish_to_zhihu.prepare_md--containerpublishpicc:\Cloud\OneDrive\note\c:\Cloud\OneDrive\published_to_zhihu\C:\Cloud\OneDrive\note\经济学\《曼昆经济学》成本笔记.md发布到pipxbump version发布poetry publish --build --username %PYPI_USERNAME% --password %PYPI_PASSWORD%本地升级最新版pipx upgrade publish-to-zhihuAcknowledgement搭建图床与自动上传 - 知乎 (zhihu.com)markdown公式转为知乎格式 - 知乎
Package: publishtutorial
Publish package tutorialInstallationCreate a virtualenv and then install the librarypip3installpublishtutorialUsagefromsrc.myfuncimportsay_hello,averagefromsrc.second_scriptimportsecond_function# Generate "Hello, World!"say_hello()# Generate "Hello, Everybody!"say_hello("Everybody")# Compute average between two numbers (default values are 1 and 2 -> 1.5)average()# Compute average between two numbers (2.5)average(2,3)# Sum to input value the average between the input and 2 (default value is 1 -> 1 + average(1,2) = 2.5)second_function()# Sum to input value the average between the input and 2 (5.5)second_function(3)DevelopingTo install publishtutorial,
along with the tools you need to develop and run tests,
run the following in your virtualenv:# Clone the repo$gitclonegit@github.com:matteobollettino/publish_tutorial.git# Install package, along with the tools you need to develop and run tests$pip3install-e.[dev]# Run the tests already present$pytestCredits to:Coding TechandNeuralNine
Package: pubmad
ProgettoBIOHow to use the no-code interfaceRun the server with the following commands:export FLASK_APP=serverpython server.pyThen head over to the react client (https://github.com/Pier297/BioSearch)
and execute:npm startHow to use pubmad pyp libraryTo perform installation run:pip install pubmadThen check out the documentation to look at the available commands (https://pier297.github.io/ProgettoBIO/) or look at demo.ipynb notebook to get an overview of potential use of the commands.
Package: pubmed2
Install1 install from pippip install pubmed22 install from source codegit clone https://github.com/suqingdong/pubmed2.git
cd pubmed2
python setup.py install3 use it directlygit clone https://github.com/suqingdong/pubmed2.git
cd pubmed2/pubmed2
pubmed -hUsagepubmed 'ngs AND association'
pubmed '(LVNC) AND (mutation OR variation)' -m 50 -mif 5FAQInstall failed?Windows maybe needVCForPythonLinux maybe needpython-devorpython-devel
Package: pubmed2pdf
A Python package to download PDFs from OA publications in PubMed. The underlying code is forked fromhttps://github.com/billgreenwald/Pubmed-Batch-Download. Downloaded files are located  by default in your personal folder under the ‘pubmed2pdf’ directory.Installationpubmed2pdfcan be installed fromPyPIwith the following command in your terminal:$python3-mpipinstallpubmed2pdfThe latest code can be installed fromGitHubwith:$python3-mpipinstallgit+https://github.com/ddomingof/PubMed2PDF.gitFor developers, the code can be installed with:$gitclonehttps://github.com/ddomingof/PubMed2PDF.git$cdPubMed2PDF$python3-mpipinstall-e.How to UsePubMed2PDF works by simply typing the list of PubMed identifiers in your command line interface or reading them from a
file.Example from file:$python3-mpubmed2pdfpdf--pmidsfile="/my/path/to/the/file"$python3-mpubmed2pdfpdf--pmids="123, 1234, 12345"Run the help command to see all functionalities$python3-mpubmed2pdfpdf--help
Package: pubmedasync
PubMed asyncAsyncronous wrapper around PubMed apiFree software: MIT licenseDocumentation:https://pubmedasync.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-12-18)First release on PyPI.
Package: pubmed-bibtex
Python Script & Module to Generate BibTeX Entries for PubMed
PublicationsUtilizes the API of TeXMed, a BibTeX interface for PubMed.TeXMed was written by Arne Mullerhttps://www.bioinformatics.org/texmed/Installpip3install--userpubmed-bibtexUsage$pubmed-bibtex31025164@Article{pmid31025164,Author="...",Title="...",Journal="...",...}orfrompubmed_bibteximportbibtex_entry_from_pmidprint(bibtex_entry_from_pmid(123456789))Testspip3install--userpipenvgitclonehttps://github.com/fphammerle/pubmed-bibtex.gitcdpubmed-bibtexpipenvrunpylintfreesurfer_surfacepipenvrunpytest--cov=freesurfer_surface
Package: pubmed-download
Download PDF by pmidgithubinstallpipinstallpubmed_downloadexample:# -*- encoding:utf-8 -*-frompubmed_downloadimportDownloadPdfp_list=['29632648','22640600','25898960','27780853']download_path=r"D:/data"DownloadPdf(download_path,p_list).run()# pdf files will store in D:/data/{pmid}.pdf
Package: pubmed-embedding
Building PubMed embedding, automatically.Install the packageAs usual, just install from Pypi:pipinstallpubmed_embeddingUsage examplesYou can retrieve embedding for PubMed IDs of interest as such:BERTfrompubmed_embeddingimportget_pubmed_embedding_from_curiespubmed_ids=["PMID:24774509","PMID:15170967","PMID:7850793"]bert_features=get_pubmed_embedding_from_curies(curies=pubmed_ids,version="pubmed_bert_30_11_2022")And the result is:SciBERTscibert_features=get_pubmed_embedding_from_curies(curies=pubmed_ids,version="pubmed_scibert_30_11_2022")And the result is:Specterspected_features=get_pubmed_embedding_from_curies(curies=pubmed_ids,version="pubmed_specter_30_11_2022")And the result is:Citing this workIf you have found these datasets useful, please do cite:@software{cappellettiPubMed2022,author={Cappelletti, Luca and Fontana, Tommaso and Reese, Justin},month={12},title={{BM25-weighted BERT-based embedding of PubMed}},url={https://github.com/LucaCappelletti94/pubmed_embedding},version={1.0.14},year={2022}}
Package: pubmedflow
PUBMED-FLOWOpen source data collection tool to fetch data from pubmedContribute and Support🎮 Featuresfetch pubmed ids (pmids) based on keyword query (supports multiple keywords query)Fetch Abstract of research papers from pubmed based on pmidsDownload the full pdf of respective pmid -> if available on pubmedcentral (pmc)if pdf not available on pmc -> download from scihub internallyHow to obtain ncbi key?Follow thistutorialInstallationFrom sourcepythonsetup.pyinstallORpip install git+https://github.com/nfflow/pubmedflowHow to use api?Arguments:NameInputDescriptionfolder_nameOptional, strpath to store output dataQuick Start:Download pubmed articles as PDF and DataFrame -importeutilsfrompubmedflowimportLazyPubmedpb=LazyPubmed(title_query,folder_name='pubmed_data',api_key='',max_documents=None,download_pdf=True,scihub=False)Perform unsupervised learning to make a pre-trained model from the collected data:pb.pubmed_train(model_name='sentence-transformers/all-mpnet-base-v2',model_output_path='pubmedflow_model',model_architecture='ct')Do question answering on the downloaded text to get answer spans from each article:qa_results=pb.pubmed_qa(qa_query='What are the chronic diseases',)print(qa_results)Summarise each of themsumm_results=pb.pubmed_summarise()print(summ_results)Perform entity extraction on each of thements=pb.pubmed_entity_extraction()print(ents)
Package: pubmed-screen
PubMed ScreenAutomates the initial screening phase of systematic PubMed search using keywords.DevelopingTo install this package for development on Linux:Create a virtual environment.$ python3 -m venv venv
$ source venv/bin/activateInstall an editable development version of the package withpip.$ pip3 install --editable .[dev]Edit thesrc/pubmed_screen/main.pyfile to make changes.Run the script with thepmscreencommand that was installed by pip.$ pmscreen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Welcome to PubMed Screen.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PubMed Screen allows you to optimize your search strategy.
Would you like to create a search (enter: 1) or compare searches (enter: 2)?
Package: pubmed-sdk
pubmed-sdkpython SDK for searching PubMedpubmed_sdkPubmed_SDK is a Python client library for searching PubMed using the NCBI E-Utilities.ExamplesAbout Pubmed_sdkUsageAbout Pubmed_sdkPubmed_SDK is a Python SDK that facilitates searching PubMed and retrieving article details using the NCBI E-Utilities. It abstracts the process of making HTTP requests to the E-Utilities API and parsing the XML responses, making it easier to focus on the data itself.Installationpip install pubmed_sdkUsageSearch PubMedYou can search PubMed by creating aPubMedobject and calling thesearchmethod with your search term:frompubmed_sdkimportPubMedpubmed=PubMed()results=pubmed.search('COVID-19')Thesearchmethod supports the following parameters:term: The search term.db: The database to search (default is 'pubmed').retmax: The maximum number of results to return (default is 20).usehistory: Whether to use the NCBI history feature (default is 'y').Fetch Article DetailsAfter searching, you can fetch the details of the articles using the fetch_details method:id_list=results['id_list']# ['33725716', '33725717']details=pubmed.fetch_details(id_list).get('PubmedArticle')This method accepts a list of IDs and returns a list of dictionaries containing the details of each article.Here's an example of how to iterate through the results and print some information about each article:fordetailindetails:article=detail['MedlineCitation']['Article']print(article['ArticleTitle'])print(article['Abstract']['AbstractText'],'\n\n')
Package: pubmed-searchx
ExampleInstallationpipinstallpubmed_searchxRunning from command linepython-mpubmed_searchxPATH_TO_GENE_LISTPATH_TO_TERM_LIST{-r:Optionalforusinghreflinkpubmed}{-dPATH_TO_RESULT_DIR}Example:Input:gene_test.txt:RESTCJKGCORINEGF1term_test.txt:depressionmigrainepython-mpubmed_searchx-ggene_test.txt-tterm_test.txt-d"./"Output example:
Folder:
REST_CJKG_CORIN_EGF1_depression_{time_stamp}/pubmed_id_results.csv:GenePubmed_IdsREST35216520,35231204,31376646,34555652,32739332,34388482,35522984,34709765,25785575,30761967,23856279,28488270,30979801,17653294,30962366,24256499,15167093,27185312,21677641,24313703CJKGNo_HitCORIN26667411,7759658,36097420,30148170,32257992,37895290,7798487,2766190,1825625,3383412EGF115892860(With -r option, the pubmed_id becomes: 35216520(https://pubmed.ncbi.nlm.nih.gov/35216520))cout_hist.csv:Gene#HitsREST20CJKG0CORIN10EGF11json_dir/*.json: (e.g. CORIN.json)[
{
"authors": "Monroe SM;Harkness KL",
"title": "Major Depression and Its Recurrences: Life Course Matters.",
"year": "2022",
"pubmed_id": "35216520"
},
....
]
Package: pubmedtools
PubmedTools (pubmedtools)PubmedTools (pubmedtools) package provides functions for searching and
retrieving articles from the PubMed database using Biopython and NCBI Entrez
Direct. This is not an official NCBI library and has no direct affiliation
with the organization.Featurespubmedtoos.search.biopython_search: Searches the PubMed database using a
Biopython Entrez module (Bio.Entrez).pubmedtoos.search.edirect_search: Searches the PubMed database using the
official Entrez Direct tool.pubmedtoos.prepenv.edirect_folder: Prepares the Entrez Direct folder for use
with the edirect_search function.InstallationYou can install PubmedTools using pip:pip install pubmedtoolsFunctionssearchpubmedtools.search.biopython_searchSearches the PubMed database using a given term and retrieves the abstract,
title, publication date, authors, MeSH terms, and other terms related to each
article. This function use the Bio.Entrez module from Biopython. The search is
limited to 10,000 results.Parametersterm: strThe search term to be used in the query.email: str, optionalEmail address to be used in case the Entrez server needs to contact you.api_key: str, optionalAPI key to access the Entrez server.batch_size: int, optionalNumber of articles to be downloaded per iteration. Default is 1000.verbose: bool, optionalWhether to print progress messages. Default is True.Returnspandas.DataFrameA DataFrame with columns 'pmid', 'ti', 'ab', 'fau', 'dp', 'mh', and 'ot'.Each row contains information related to a single article retrieved from
the search term query.RaisesException
- If the search returns more than 10,000 results, which is the limit of
this function.
In this case, the user should use thepubmedtools.search.edirect_searchfunction.pubmedtools.search.edirect_searchSearches the PubMed database using a given term and retrieves the abstract,
title, publication date, authors, MeSH terms, and other terms related to each
article. This function use the official NCBI Entrez Direct tool.Parametersquery: strThe query to be searched in PubMed.api_key: str, optionalThe NCBI API key. If not provided, the search will be performed without
the API key.Returnspandas.DataFrameA pandas DataFrame containing the search results.NotesThis function works with Linux and Windows systems using WSL (Windows
Subsystem for Linux).RaisesExceptionIf the operating system is not recognized.prepenvpubmedtools.prepenv.edirect_folderFunction to prepare the edirect folder for pubmed_search_edirect. Checks in
pubmedtools package path if the edirect folder exists and contains the
necessary files. If not, it downloads and extracts the required files.
Package: pubmed-xml
PubMed XML ParserInstallationpython3-mpipinstallpubmed_xmlUsageCommandLinepubmed_xml--help# parse singlepubmed_xml30003000# parse batchpubmed_xml30003000,30003001,30003002# parse multiplepubmed_xml300030003000300130003002# parse from xml filepubmed_xmltests/pubmed22n1543.xml.gz-oout.jl# save filepubmed_xml30003000,30003001,30003002-oout.jlPythonfrompubmed_xmlimportPubmed_XML_Parserpubmed=Pubmed_XML_Parser()forarticleinpubmed.parse('30003000,30003001,30003002'):print(article)# Article<30003002>print(article.data)# dict objectprint(article.to_json(indent=2))# json stringprint(article.pmid,article.title,article.abstract)# by attributeprint(article['pmid'],article['title'],article['abstract'])# by key