Skip to content

Instantly share code, notes, and snippets.

View mr-eyes's full-sized avatar
🦆

Mohamed Abuelanin mr-eyes

🦆
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mr-eyes
mr-eyes / filter_table.py
Last active May 16, 2019 03:05
Merge multiple <key:value> tables files.
import sys
if len(sys.argv) < 3:
sys.exit("run: python filter_table.py <file> <threshold>")
else:
file_path = sys.argv[1]
threshold = int(sys.argv[2])
with open(file_path, 'r') as f:
"""
Exclude CDHIT Clusters that contains number of sequences below a certain threshold
"""
import sys
args = sys.argv
if len(args) < 3:
@mr-eyes
mr-eyes / DNA_encoding_decoding.ipynb
Last active June 30, 2019 22:03
Convert image to DNA & Convert DNA to Image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import sys
import gzip
class GenoFreq:
def __init__(self, file_name):
self.file_name = file_name
self.all_genotypes = self.get_all_genotypes()
def get_all_genotypes(self):
@mr-eyes
mr-eyes / dbEST_report_to_fasta.py
Last active August 6, 2019 16:34
Converts GenBank dbEST to FASTA
import textwrap
import sys
import os
import gzip
BLOSUM = {
"A" : "A",
"C" : "C",
"G" : "G",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mr-eyes
mr-eyes / Data1.txt
Last active October 28, 2019 16:13
ML-Lab3-LeastSquares
3.2596 1.4977 -1
3.9733 1.2995 -1
2.0559 1.5692 -1
2.0003 2.4876 -1
-1.433 4.1727 -1
2.736 1.4522 -1
3.2213 1.8164 -1
1.1169 2.7368 -1
3.0756 1.876 -1
4.233 1.8611 -1
@mr-eyes
mr-eyes / main.cpp
Created November 29, 2019 13:59
random kmers generation with phmap insertion
/*
simple random kmers generator with storage in parallel hash map.
clone: https://github.com/greg7mdp/parallel-hashmap.git
g++ -Ofast -O3 main.cpp
*/
@mr-eyes
mr-eyes / Assignment 4.html
Last active December 30, 2019 16:15
perceptron_lab
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>Assignment 4</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>