Skip to content

Instantly share code, notes, and snippets.

View iamukasa's full-sized avatar
🏠
Working from home

Irving Amukasa iamukasa

🏠
Working from home
View GitHub Profile
~/data
~/data/A/A (1).jpg
~/data/A/A (2).jpg
...
~/data/Z/Z (1).jpg
~/data/Z/Z (2).jpg
@iamukasa
iamukasa / preparedata.py
Created February 27, 2018 14:05
PReprocessing from ubuntu dialog corpus to our dataset
import os
import csv
import itertools
import functools
import tensorflow as tf
import numpy as np
import array
tf.flags.DEFINE_integer(
"min_word_frequency", 5, "Minimum frequency of words in the vocabulary")
@iamukasa
iamukasa / credentials.py
Last active February 23, 2018 19:00
Bot to to troll Nurucoin Influencers on twitter
consumer_key=''
consumer_secret =''
access_token = ''
access_token_secret = '"
@iamukasa
iamukasa / credentials.py
Last active December 6, 2017 09:08
Twitter bot to troll CS Joe Mucheru to stop pushing the ICT Practitioners Bill 2016
consumer_key = ' '
consumer_secret = ' '
access_token = ' '
access_token_secret = ' '
@iamukasa
iamukasa / textai.py
Created October 6, 2017 06:00
LSTM model to create the next version of the text file to finish it look out George rr martin
import numpy as np
import sys
class RecurrentNeuralNetwork:
def __init__(self,xs,ys,rl,eo,lr):
self.x=np.zeros(xs)
self.xs=xs
self.y=np.zeros(ys)
self.ys=ys
self.w=np.random.random((ys,ys))
@iamukasa
iamukasa / monkey.py
Created June 28, 2017 21:18
Program to solve the problem set: A monkey is randomly hitting keys in a keyboard,how long does it take it to type a word
import sys,random,time
alpha=('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','s','t','u','v','w','x','y','z')
words=""
starttime =time.time()
#monkey iterator
while str(sys.argv[1]) not in words :
a=random.choice(alpha)
words+=a
print words