Skip to content

Instantly share code, notes, and snippets.

View ryaninhust's full-sized avatar

Bowen Yuan ryaninhust

  • NYC
  • 01:22 (UTC -05:00)
View GitHub Profile
import tensorflow as tf
import numpy as np
vocabulary_size = 10
embeddings = tf.placeholder(tf.float32, shape=[vocabulary_size])
a = embeddings
c = a*2
from sklearn.datasets import load_svmlight_file
from numpy.random import random
from numpy.random import uniform
import numpy as np
K=40
data = load_svmlight_file('a9a.tr')
X = data[0].todense()
y = data[1]
U = uniform(0, 0.1/(K**0.5), size=(X.shape[1], K))
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
void print_matrix(int h, int w, int matrix[h][w]){
for(int i=1; i<h-1; i++){
for (int j =1; j<w-1; j++){
if (matrix[i][j])
printf("#");
else
#include <omp.h>
#include <stdio.h>
/* placeNumber */
int placeNumber(int n, int sudoku[9][9])
{
if (n == 81)
return 1;
int row = n / 9;
int col = n % 9;
set mouse=a
set nu
runtime! debian.vim
syntax on
set cursorcolumn
set cursorline
filetype plugin indent on
filetype off
" format and user interface
set nocompatible
@ryaninhust
ryaninhust / Blurred-bubbles.markdown
Created June 16, 2014 13:55
A Pen by Linus Petren.
from copy import deepcopy
RED = 1 # max
BLACK = 2 # min
class Board(object):
def __init__(self, width=5, height=4, win_len=4, depth=2):
self.width = width