Skip to content

Instantly share code, notes, and snippets.

View samehkamaleldin's full-sized avatar

Sameh Mohamed samehkamaleldin

View GitHub Profile
from collections import Counter
from typing import Dict
def main():
# ----------------- Configuration ----------------- #
fasta_filepath = "./data/Hsym_primary_v1.0.aa.fasta"
window_size = 16
slide_size = 4
aa_min_occurrences = {'R': 5, 'G': 3}
@samehkamaleldin
samehkamaleldin / generate_pse_dataset.py
Last active August 27, 2020 15:46
Generate pse dataset
# -*- coding: utf-8 -*-
import os
import numpy as np
import gzip
import math
def export_entry(entry, out_fd):
"""
\documentclass{standalone}
\usepackage{times}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=2]
%\fontfamily{times}
\tikzstyle{rect}=[rectangle,draw=black!75,fill=black!20,minimum size=0mm, node distance=7.5pt]
\tikzstyle{circ}=[circle,thick,draw=black!75,fill=blue!30,minimum size=0mm, node distance=80pt]
@samehkamaleldin
samehkamaleldin / record_renamer.py
Last active June 29, 2018 11:16
Record RENAMING
import os
from datetime import datetime, timedelta
from shutil import copyfile
# ------------------------------------------------------------------------------------
# [Things to Change] please input exact format of the date and time like the example
# ------------------------------------------------------------------------------------
records_directory = "/Users/sameh/Downloads/records"
site_name = "Cork_7"
first_date = "21/5/2012 14:31:51"
@samehkamaleldin
samehkamaleldin / awesome-kge.md
Created October 29, 2017 11:56 — forked from mommi84/awesome-kge.md
Awesome Knowledge Graph Embedding Approaches
########## Start of header ################
# Title: Data Analysis Assignment [SeaWeed dataset]
#
# Description:
# Analysis of SeaWeed dataset
# extracted of from a field experiment on an island off Connemara
#
# Author:
# Date: 20.07.2017
########## End of header ###################
import scipy.io
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
# (get the data from files)
# read train data into python from .mat file
mat = scipy.io.loadmat('classifier_data.mat')
x_train = mat['TrainData_2d']
@samehkamaleldin
samehkamaleldin / cpp11_demo.cpp
Created June 13, 2017 16:53
Demo for some of C++11 capabilities
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <memory>
#include <functional>
using namespace std;
// usage of auto as function return type that depends on template params
@samehkamaleldin
samehkamaleldin / link.py
Created March 16, 2017 13:56
Combin 2 json files

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: