This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import random | |
import shutil | |
import cv2 | |
import matplotlib.pyplot as plt | |
import networkx | |
import numpy as np | |
import paths | |
from networkx import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Before | |
public void createUserRepository() { | |
entityManager.getTransaction().begin(); | |
entityManager.createNativeQuery("do\n" + | |
"$$\n" + | |
"declare\n" + | |
" l_stmt text;\n" + | |
"begin\n" + | |
" select 'truncate ' || string_agg(format('%I.%I', schemaname, tablename), ',')\n" + | |
" into l_stmt\n" + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
db: | |
image: postgres:10 | |
restart: always | |
ports: | |
- 5432:5432 | |
environment: | |
POSTGRES_USER: docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cuda_runtime.h" | |
#include "device_launch_parameters.h" | |
#include "cuda_runtime_api.h" | |
// useful defines | |
#ifndef USEFULDEFINES | |
#define USEFULDEFINES | |
#define Mask_width 3 | |
#define Mask_radius Mask_width / 2 | |
#define TILE_WIDTH 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import numpy as np | |
from time import time | |
# Let's take the randomness out of random numbers (for reproducibility) | |
np.random.seed(0) | |
# THIS SCRIPT ISN'T MINE AT ALL: I JUST FOUND IT ON REDDIT. | |
# Useful to benchmark. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import numpy as np | |
import numpy.linalg as LA | |
import scipy.linalg | |
from sklearn.mixture import GaussianMixture | |
from sklearn.preprocessing import normalize | |
from sklearn.decomposition import PCA | |
from multiprocessing.dummy import Pool as ThreadPool | |
import time |