Skip to content

Instantly share code, notes, and snippets.

View Omig12's full-sized avatar
🙃
I feel a nice productive summer coming up!

Israel O. Dilán-Pantojas Omig12

🙃
I feel a nice productive summer coming up!
View GitHub Profile
@Omig12
Omig12 / de_bruijn_mod.py
Last active December 15, 2017 16:39
For the research
# code taken from https://raw.githubusercontent.com/pmelsted/dbg/master/dbg.py
# import multiprocessing as mp
import collections, sys
from Bio import Seq, SeqIO, SeqRecord
# Create reverse complement
def twin(km):
return Seq.reverse_complement(km)
@Omig12
Omig12 / dept-setup.sh
Last active September 3, 2017 05:26
Minimal software bundle for computers in the department
#!/bin/sh
# New Xubuntu 16.04.3 LTS
# Software Setup Install
{
# Create user
useradd -m -U -s /bin/bash -p '' student
# Copy Folder
@Omig12
Omig12 / led_blink_toggle.v
Last active March 22, 2017 20:14
Switches Led on and off according to a clock.
@Omig12
Omig12 / reverse_list_substring.py
Last active March 17, 2017 19:45
This function allows an user to reverse a sub-string within a string or a sub-list within a list. I don't know why but this might be useful to someone.
#!/usr/bin/env python3
# l = Full list or string to be reversed.
# start = Index where the sub-string to be reversed starts
# end = Index where the sub-string to be reversed ends
def rev_sub(l, start, end):
return l[0:start]+l[start:end+1][::-1]+l[end+1:]
@Omig12
Omig12 / rand_graph.py
Last active March 4, 2017 16:12
Pseudo-Random Pseudo-Graph Generator
# n parameter:
# represents the ammount of nodes desired in the graph.
from random import *
def rand_graph(n=2):
randgraph = {}
Nodes = [x for x in range(n)]
shuffle(Nodes)
Edges = [(x,randint(0,n)) for x in Nodes]
@Omig12
Omig12 / pap-in.sh
Created February 10, 2017 23:25
Papilio-Loader simple installer script
#!/bin/bash
# Must run as sudo
# Example: $ sudo bash pap-in.sh
# Search for Papilio Loader and compiles it from source
# Places the binary in the /usr/local/bin folder
# Install Dependencies
apt-get install git autogen automake g++ libftdi-dev