Skip to content

Instantly share code, notes, and snippets.

View wdecoster's full-sized avatar
🐗
Fork me, and then just push me, until I get your, contribution

Wouter De Coster wdecoster

🐗
Fork me, and then just push me, until I get your, contribution
View GitHub Profile
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)]
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
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,
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')
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']]
from altmetric import Altmetric
import time
import sys
a = Altmetric()
altmetricerrors = []
keyerrors = []
cited_fields = [
#!/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
## 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 *
# Frequently check RSS, save results to database
# Part of PromisingPreprint
# wdecoster
import feedparser
from os import path
import logging
def checkRSS(dois_seen, dbf):
# 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(