Skip to content

Instantly share code, notes, and snippets.


Shane Barratt sbarratt

View GitHub Profile
sbarratt / keyboardhook.cpp
Created May 31, 2016
Create a keyboard hook using Win32 System API and log what the user types into a console.
View keyboardhook.cpp
#include <stdio.h>
#include <tchar.h>
#include <Windows.h>
#include <iostream>
HHOOK hHook{ NULL };
enum Keys
ShiftKey = 16,
sbarratt /
Last active Aug 15, 2016
Implementation of the 3-Base Periodicity Property:
import matplotlib.pyplot as plt
from numpy.fft import fft
from numpy.fft import fftshift
import numpy as np
import random
dictionary = ['A','C','G','T']
def generate_random_sequence(N):
return [dictionary[random.randint(0,len(dictionary)-1)] for _ in range(N)]