Skip to content

Instantly share code, notes, and snippets.

View PkuRainBow's full-sized avatar
🎯
Focusing

Researcher.YuanYuhui PkuRainBow

🎯
Focusing
View GitHub Profile
import json
from collections import Counter
SAS = "" # e.g sp=r&st=...
with open("canva.benchmark.json", "r") as f:
data = json.load(f)
print("""
<html>
@yzh119
yzh119 / st-gumbel.py
Created January 12, 2018 12:25
ST-Gumbel-Softmax-Pytorch
from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
def sample_gumbel(shape, eps=1e-20):
U = torch.rand(shape).cuda()
return -Variable(torch.log(-torch.log(U + eps) + eps))
@paclopes
paclopes / HungarianCUDA.cu
Last active April 2, 2023 14:37
Fast CUDA implementation of the Hungarian algorithm.
// Fast Block Distributed CUDA Implementation of the Hungarian Algorithm
//
// Annex to the paper:
// Paulo A. C. Lopes, Satyendra Singh Yadav, Aleksandar Ilic, Sarat Kumar Patra ,
// "Fast Block Distributed CUDA Implementation of the Hungarian Algorithm",
// Parallel Computing
//
// Hungarian algorithm:
// (This algorithm was modified to result in an efficient GPU implementation, see paper)
//
@mick001
mick001 / earthMoon.py
Created August 29, 2015 12:54
Earth Moon system orbiting around the Sun and VPython. Full article at http://www.firsttimeprogrammer.blogspot.com/2014/12/earth-moon-system-orbiting-around-sun.html
import math
from visual import *
# Data in units according to the International System of Units
G = 6.67 * math.pow(10,-11)
# Mass of the Earth
ME = 5.973 * math.pow(10,24)
# Mass of the Moon
MM = 7.347 * math.pow(10,22)
@marekrei
marekrei / caffe_feature_extractor.py
Created June 22, 2015 00:12
Caffe feature extractor
import numpy as np
import os, sys, getopt
# Main path to your caffe installation
caffe_root = '/path/to/your/caffe/'
# Model prototxt file
model_prototxt = caffe_root + 'models/bvlc_googlenet/deploy.prototxt'
# Model caffemodel file
@rxaviers
rxaviers / gist:7360908
Last active November 18, 2024 03:32
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.