Skip to content

Instantly share code, notes, and snippets.

View elais's full-sized avatar

Elais Player elais

View GitHub Profile
@elais
elais / keybase.md
Last active November 20, 2016 21:42

Keybase proof

I hereby claim:

  • I am elais on github.
  • I am elais (https://keybase.io/elais) on keybase.
  • I have a public key whose fingerprint is 502B 0F0C 2B47 AD8A 8053 4777 B627 4890 48A0 860C

To claim this, I am signing this object:

@elais
elais / hideSidebar.js
Created March 23, 2016 15:44
Hides Discord sidebar, keeping server list
window.addEventListener('keydown', function(event) {
if (event.ctrlKey && event.keyCode === 84) {
var channelWrap = $('.flex-vertical.channels-wrap');
var titleWrap = $('.title-wrap');
if (channelWrap.getAttribute('style') === 'display: none') {
channelWrap.setAttribute('style', '');
if (titleWrap) {
titleWrap.setAttribute('style', '');
}
} else {
def maxNum(M, k):
x = [int(x) for x in str(M)]
y = k
z = sorted(x, reverse = True) # nondeterminism
def swap(i, j, l):
tmp = l[i]
l[i] = l[j]
l[j] = tmp
return l
def find_index(number, i, l):
@elais
elais / BLOSUM62.py
Created May 7, 2013 16:58
BLOSUM62
class Blosum62(webapp.RequestHandler):
def post(self):
try:
gap = int(self.request.get('Gap')) # gap penalty... or bonus if you'd prefer.
seq1 = str(self.request.get('Sequence1')) # first input sequence
seq2 = str(self.request.get('Sequence2')) # second input sequence
seq1 = seq1.upper()
seq2 = seq2.upper()
seq1 = ' ' + ''.join(seq1.split())
@elais
elais / SmithWaterman.py
Created March 12, 2013 13:17
An implementation of the smith waterman algorithm using google app engine and python. Mainpage code and webapp settings not included.
class SmithWaterman(webapp.RequestHandler):
def post(self):
try:
gap = int(self.request.get('Gap')) # gap penalty... or bonus if you'd prefer.
matchScores = False
try:
match = int(self.request.get('Match'))
mismatch = int(self.request.get('Mismatch'))
matchScores = True
except:
@elais
elais / Needleman-wunsch.py
Last active December 14, 2015 09:38
Here is the sourcecode for the needleman-wunsch algorithm assignment for Dr. Hill's Bioinformatics II course. It uses google app engine.
#!/usr/bin/env python
#
# Copyright 2013 Elais Jackson.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@elais
elais / Euler4.py
Created August 7, 2012 18:58
Solution To Project Euler Problem #4
import sys
import os
def main():
count = 1
big = 998
while count != 0:
big -= 1
front = str(big)