I hereby claim:
- I am frnsys on github.
- I am frnsys (https://keybase.io/frnsys) on keybase.
- I have a public key ASAvmZ40BDsDnDvSA1Gk5otOjOKmLmFe-tK1dGb3S18gjAo
To claim this, I am signing this object:
| # Adapted from | |
| # http://pytables.github.io/usersguide/libref/homogenous_storage.html#the-carray-class | |
| import os | |
| import numpy | |
| import tables | |
| from itertools import groupby | |
| from operator import itemgetter | |
| from time import time |
| import operator | |
| from itertools import combinations | |
| from functools import reduce | |
| import numpy as np | |
| def hac(vecs, sim_func, threshold): | |
| """ | |
| Hierarchical Agglomerative Clustering. | |
| """ |
| import random | |
| import networkx as nx | |
| class Person(): | |
| def __init__(self, name, stance=None): | |
| self.name = name | |
| if stance is None: | |
| self.stance = random.randrange(0, 2) | |
| else: |
| import sys | |
| import logging | |
| import numpy | |
| import gensim | |
| logging.basicConfig(level=logging.INFO) | |
| train_sentences = gensim.models.doc2vec.LabeledLineSentence(sys.argv[1]) | |
| model = gensim.models.Doc2Vec(train_sentences, size=400, window=8, min_count=2, |
| # Copyright (c) 2012, Ryan Gomba | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # | |
| # 1. Redistributions of source code must retain the above copyright notice, this | |
| # list of conditions and the following disclaimer. | |
| # 2. Redistributions in binary form must reproduce the above copyright notice, | |
| # this list of conditions and the following disclaimer in the documentation |
I hereby claim:
To claim this, I am signing this object:
| import numpy as np | |
| # the 2d array of our samples, | |
| # each component is a category label | |
| a = np.array([[1,2,3],[4,5,6]]) | |
| # the 3d array that will be the one-hot representation | |
| # a.max() + 1 is the number of labels we have | |
| b = np.zeros((a.shape[0], a.shape[1], a.max() + 1)) |
| ! Enabled modi | |
| rofi.modi: window,run,ssh | |
| ! Window opacity | |
| rofi.opacity: 100 | |
| ! Window width | |
| rofi.width: 50 | |
| ! Number of lines | |
| rofi.lines: 15 | |
| ! Number of columns | |
| rofi.columns: 1 |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <title>hello</title> | |
| </head> | |
| <body> | |
| <div id="root">Loading...</div> | |
| <script src="bundle.js"></script> |
| import numpy as np | |
| from pyqtree import Index | |
| from shapely import geometry | |
| import matplotlib.pyplot as plt | |
| from matplotlib.patches import Polygon | |
| plt.style.use('ggplot') | |
| # distance we expect the bus stop to be from the road | |
| # will pad all bounding boxes accordingly | |
| radius = 0.1 |