Skip to content

Instantly share code, notes, and snippets.

Herminio Vazquez canimus

  • Valencia, Spain
Block or report user

Report or block canimus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
canimus / graph.html
Created Jan 8, 2020
View graph.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="/static/d3.min.js"></script>
<script src="/static/vue.js"></script>
<script src="/static/jsnetworkx.js"></script>
canimus / msgpack.js
Created Dec 20, 2019
msgpack javascript example
View msgpack.js
function readFile(stream) {
return new Promise((resolve, reject) => {
var fr = new FileReader();
fr.onload = () => {
resolve(msgpack.decode(new Uint8Array(fr.result)))
canimus /
Created Dec 15, 2019
DaskDataFrame Collector Parquet
def extract_data(query_var, file_prefix):
idx = pd.date_range(start="2019-01-01", periods=13, freq="MS").strftime("%Y-%m-%d").values
dt = []
for i in range(len(idx)-1):
name = str(i+1).zfill(2)
df = pd.read_sql(query_var.format(idx[i], idx[i+1]), conn)
# Unique dataframe with all types
canimus /
Last active Dec 11, 2019
Ploting FaceGrid
import seaborn as sns
import pandas as pd
from collections import OrderedDict
x = df[df.statusChangeBy>10].groupby([pd.Grouper(freq="W", key="statusChangedDate"), "Name"]).size().compute()
x = x.reset_index()
x.columns = ["Date", "Team", "Total"]
x = x.sort_values(by="Date")
canimus /
Created Dec 4, 2019
Parquet writer from dataframe
import pandas as pd
import numpy as np
import pymssql
conn = pymssql.connect("localhost", "SA", "yourStrong(!)Password", "FORCE_PAPPA")
with open("task.sql") as infile:
doc_query =
time_range = list(pd.date_range(start='2019-01-01', periods=12, freq="MS").strftime("%Y-%m-%d").values)
canimus /
Created Oct 28, 2019
XML Tag Counter with Python Multiprocess
# Author: Herminio Vazquez
# Date: 2019-10-28
# Project: DataStore
# @canimus
import os
from multiprocessing import Pool
import multiprocessing
import subprocess
from functional import seq
canimus /
Created Sep 13, 2019
Store SSH key with previous version
ssh-keygen -p -m PEM -f ~/.ssh/id_rsa
canimus /
Last active Sep 1, 2019 — forked from vestalisvirginis/
dna manipulation functions
from functional import seq # PyFunctional
from itertools import product
def all_kmers(k):
'''return list of all dna carthesien products of length k'''
all = list(product('ACGT', repeat=k))
return seq(all).map(lambda x: ''.join(x)).to_list()
def kmer_per_segment(dna_segment, k):
'''return all the dna substrings of length k of the different dna strings in dna list'''
canimus /
Created Jun 25, 2019
Build NetworkX Graph
# Navigate through xml tree and build a directed graph
def add_tree(G, node):
for n in node.getchildren():
G.add_edge(node.tag, n.tag)
add_tree(G, n)
View hdf5-alpine.docker
apk --no-cache add --virtual .builddeps.edge \
--repository \
You can’t perform that action at this time.