Skip to content

Instantly share code, notes, and snippets.

Andrew andcarnivorous

Block or report user

Report or block andcarnivorous

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View text-selfsim-matrix.py
from matplotlib import cm as cm
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from nltk.tokenize import word_tokenize
import re
from scipy import sparse
def repetitionMatrix(_input, title = "", kind = False, cmap = "Reds"):
View yodinator.py
from nltk import pos_tag, word_tokenize
def yodinator(text):
text = word_tokenize(text)
tagged = pos_tag(text)
verbs = ("MD", "VB", "VBD", "VBG", "VBN", "VBP", "VBZ", "RB", "RBR", "RBS")
@andcarnivorous
andcarnivorous / matrix_transformation.py
Last active Jan 5, 2019
Basic linear transformations
View matrix_transformation.py
from math import cos,sin,radians
import matplotlib.pyplot as plt
import numpy as np
vec = np.array([-5,-8]) #YOUR VECTOR
k = 1 #decide K for shear
# Transformations
def custom_transf (vector, m1,m2,m3,m4):
@andcarnivorous
andcarnivorous / memory-game.py
Created Sep 28, 2018
Memory game in python for terminals
View memory-game.py
import numpy as np
import random
def table_printer(matrix):
print("")
print(" 1 2 3 4")
print("1 ", matrix[0][:])
print("1 ", matrix[1][:])
print("1 ", matrix[2][:])
print("1 ", matrix[3][:])
You can’t perform that action at this time.