This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for t in [1, 2, 3, 4, 5, 6, 7, 8]: | |
| print("Using {} workers.".format(t)) | |
| %timeit -r 100 [i for i in stream_fastq_full("test.fastq", t)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import concurrent.futures as cfutures | |
| import nanomath | |
| from Bio import SeqIO | |
| def stream_fastq_full(fastq, threads): | |
| ''' | |
| Extract from a fastq file: | |
| -readname | |
| -average and median quality | |
| -read_lenght |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| winners.plot( | |
| linewidth=0.2, | |
| legend=None, | |
| ylim=(0, 250), | |
| xlim=(0, 92)) | |
| plt.xlabel('Days since publication') | |
| plt.ylabel('Altmetric score') | |
| plt.axhline( | |
| y=31.3, | |
| linewidth=2.5, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| winners.plot( | |
| linewidth=0.2, | |
| legend=None, | |
| ylim=(0, 1000)) | |
| plt.xlabel('Days since publication') | |
| plt.ylabel('Altmetric score') | |
| plt.axhline( | |
| y=31.3, | |
| linewidth=2.5, | |
| linestyle='dotted') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| df = pd.read_csv("Altmetric-biorxiv.txt", sep="\t", header=0) | |
| winners = df.loc[df["score"] > 31.3, ['1d', '2d', '3d', '4d', '5d', '6d', '1w', '1m', '3m', '6m', '1y']].T | |
| winners.index = [pd.Timedelta(i).days for i in ['1d', '2d', '3d', '4d', '5d', '6d', '7d', '31d', '92d', '184d', '365d']] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from altmetric import Altmetric | |
| import time | |
| import sys | |
| a = Altmetric() | |
| altmetricerrors = [] | |
| keyerrors = [] | |
| cited_fields = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Simple SHELL script for Linux and UNIX system monitoring with ping command | |
| # ------------------------------------------------------------------------- | |
| # Copyright (c) 2006 nixCraft project <http://www.cyberciti.biz/fb/> | |
| # This script is licensed under GNU GPL version 2.0 or above | |
| # ------------------------------------------------------------------------- | |
| # This script is part of nixCraft shell script collection (NSSC) | |
| # Visit http://bash.cyberciti.biz/ for more information. | |
| # ------------------------------------------------------------------------- | |
| # Setup email ID below |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Periodically query altmetric all entries in database younger than 1 week | |
| ## As soon as threshold (better than top 90% score journal) is passed, tweet about article | |
| # Part of PromisingPreprint | |
| # wdecoster | |
| from altmetric import Altmetric | |
| from os import path | |
| from time import sleep | |
| from datetime import datetime | |
| from secrets import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Frequently check RSS, save results to database | |
| # Part of PromisingPreprint | |
| # wdecoster | |
| import feedparser | |
| from os import path | |
| import logging | |
| def checkRSS(dois_seen, dbf): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Always prefer setuptools over distutils | |
| from setuptools import setup, find_packages | |
| # To use a consistent encoding | |
| from codecs import open | |
| from os import path | |
| here = path.abspath(path.dirname(__file__)) | |
| exec(open('nanoplot/version.py').read()) | |
| setup( |