This file contains 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
#!/usr/bin/env python3 | |
import numpy as np | |
import gym | |
from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv | |
env_name = 'Pendulum-v0' | |
nproc = 8 | |
T = 10 |
This file contains 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
# Reference : https://stackoverflow.com/a/59539843 | |
from PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
from PyQt5.QtWidgets import * | |
from PyQt5.QtCore import QObject, pyqtSignal | |
import sys | |
import time | |
import threading |
This file contains 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 static java.lang.Math.*; | |
public class GaussSmooth { | |
private static double gauss(double sigma, double x) { | |
double expVal = -0.5 * (pow(x, 2) / pow(sigma, 2)); | |
return exp(expVal); | |
} | |
private static double[] gaussKernel1d(double sigma, int lw) { |
This file contains 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 torch | |
import torch.nn.functional as F | |
from torchvision.datasets import MNIST | |
from torchvision.transforms import ToTensor | |
from torch.utils.data import DataLoader | |
from torch_geometric.utils import grid | |
from torch_geometric.nn import SplineConv | |
train_dataset = MNIST('/tmp/MNIST', train=True, transform=ToTensor()) |
This file contains 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.path as osp | |
import argparse | |
import torch | |
import torch.nn.functional as F | |
from torch_geometric.datasets import Planetoid | |
import torch_geometric.transforms as T | |
from torch_geometric.data import NeighborSampler | |
from torch_geometric.nn import GAE, SAGEConv | |
from torch_geometric.utils import train_test_split_edges |
This file contains 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 cv2 | |
import cPickle | |
import socket | |
import struct | |
TCP_IP = '127.0.0.1' | |
TCP_PORT = 9501 | |
server_address = (TCP_IP, TCP_PORT) | |
i = 0 |
This file contains 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 numpy as np | |
def makeGaussian(size, fwhm = 3, center=None): | |
""" Make a square gaussian kernel. | |
size is the length of a side of the square | |
fwhm is full-width-half-maximum, which | |
can be thought of as an effective radius. | |
""" |
This file contains 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
#!/usr/bin/env python | |
from PySide.QtCore import * | |
from PySide.QtGui import * | |
import cv2 | |
import sys | |
class MainApp(QWidget): | |
def __init__(self): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer