Skip to content

Instantly share code, notes, and snippets.

View fayimora's full-sized avatar
🕺

Fayi FB fayimora

🕺
  • London, England
View GitHub Profile
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
freopen("in.txt","r",stdin);
freopen("out.txt","w",stdout);
i = 0
clean = True
for a, b in zip(list(raw_input()), list(raw_input())):
i += 1
if a is 'A' and b is not 'T' or a is 'T' and b is not 'A':
clean = False
break
elif a is 'C' and b is not 'G' or a is 'G' and b is not 'C':
clean = False
break
@fayimora
fayimora / sum.py
Last active August 29, 2015 13:56
# print sum(map(lambda c: int(c), list(raw_input())))
# print reduce(lambda x, y: int(x) + int(y), raw_input())
print sum(int(c) for c in raw_input())
@fayimora
fayimora / topic_keys.txt
Created February 13, 2014 15:10
20 topics
0 2.5 ipad amp win mini follow retina giveaway chance enter cases competition november amazon man fix number entered tea windows
1 2.5 iphone http video ur hate twitter watching week pls headphones travel feel send code set sp visit sync anymore
2 2.5 http iphone shit brand bad easy ad remote weekend book xxx cheat sbabyfollowtrain knew song series mom faster messages
3 2.5 iphone love charger happierdiwali battery big papa dont mobile gift pink giving won fast gadgets fan read imac excellent
4 2.5 rt https itunes today check year gold released finally downloadtoyboysingle link album playing yeah officialmadband sister protector family broken
5 2.5 ipad mac back give pc meet working news complete managed jumps malware mysterious badbios verizon task fail airgaps jobs
6 2.5 http samsung tablet power satisfaction gameinsight laptop top haha customer aapl put tops page selling iphones place home survey
7 2.5 android bbm bbmtoandroids release official umhdbvxcru features perfect fk chxehtr brother appears
@fayimora
fayimora / topic_keys.txt
Created February 13, 2014 15:10
40 topics
0 1.25 apple store video product issues aapl issue club yay fun htc designed half crazy add js independent associates meangayquotes
1 1.25 iphone gt type dressed developers early doesn panel book glad problems tools damn boast materials marketing god movie ultimate
2 1.25 ipod touch playing class shit senior print hope zebra kf xx conversation carry en advertise health pm head slow
3 1.25 case black cover smartphone verizon pink price sprint smart dad model emoji employee girl chat ends justmustard wear cancer
4 1.25 apple market share news working million cool iphones technology rebound lose continues halloween ipads buying tho young macbarbie promotional
5 1.25 ipad halloween finally sister miss hit spooktacular plink bye numbers zillow minute small powered ve butt ai puts prt
6 1.25 google nexus facebook blackberry call play friends microsoft nsa coming phones lol pass plug da lost group happy wtf
7 1.25 http cases travel minutes yay cut change retail dropping att busuu iamdevloper cd fkliga sit car
@fayimora
fayimora / uva10635.py
Last active August 29, 2015 13:56
Prince and Princess UVA 10635
def lcs(s1, s2):
m, n = len(s1), len(s2)
C = [[0 for j in range(n + 1)] for i in range(m + 1)]
for i in range(1, m + 1):
for j in range(1, n + 1):
if s1[i - 1] == s2[j - 1]:
C[i][j] = C[i - 1][j - 1] + 1
else:
C[i][j] = max(C[i][j - 1], C[i - 1][j])
return C[m][n]
Elizabeth, 15/07/2013
Ana Smith, 10/01/2013
John Scott, 02/03/2001
Barbara Kennedy, 10/01/1978
Peter Johnson, 02/03/2001
import sys
from datetime import date
def make_person(name, dob):
names = name.split()
fname, lname = names[0], names[1] if len(names) > 1 else ""
[day, month, year] = map(int, dob.split("/"))
d = date(year, month, day)
return {"name": name, "fname": fname, "lname": lname, "dob": d}
# Set your git user info
export GIT_AUTHOR_NAME='Fayimora Femi-Balogun'
export GIT_AUTHOR_EMAIL='fayi@fayimora.com'
export GIT_COMMITTER_NAME='Fayimora Femi-Balogun'
export GIT_COMMITTER_EMAIL='fayi@fayimora.com'
# Optionally, set your GitHub credentials
export GITHUB_USER='fayimora'
#export GITHUB_TOKEN='your_github_token'
@fayimora
fayimora / ethan.py
Created March 2, 2014 13:52
Some weirdo code for ethan
import re
def get_matrix(lines):
matrix = []
print "Loading co-occurence matrix"
words = lines[0].split(",")
print "Processing matrix"