Skip to content

Instantly share code, notes, and snippets.

View Ir1d's full-sized avatar
💭
Looking for internship

Dejia Xu Ir1d

💭
Looking for internship
View GitHub Profile
@kwea123
kwea123 / colmap_colab.ipynb
Created April 26, 2020 10:07
colmap_colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jokkebk
jokkebk / White balance.ipynb
Created August 17, 2019 11:34
Correcting image white balance with Python PIL and Numpy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ayuusweetfish
ayuusweetfish / bintree.lua
Created January 16, 2019 10:10
Generate binary tree images with Graphviz and ImageMagick
if #arg < 3 then
print('Usage: ' .. arg[0] .. ' <hor-skip> <ver-skip> <node> [<node> ...]')
return
end
local horskip = tonumber(arg[1])
local verskip = tonumber(arg[2])
local nodes = {}
for i = 3, #arg do
nodes[i - 2] = tonumber(arg[i])
@Astrian
Astrian / export.js
Created November 3, 2018 01:13
IITC 数据迁移脚本
// 访问 https://www.ingress.com (记得一定要带 HTTPS,默认访问不带)然后启动控制台工具,复制以下代码。
// 控制台会将旧 IITC 中的所有数据输出,将它复制到剪贴板中再继续下一步(或是启动新的标签页来进行下一步)
function exp() {
let getKey, i = 0, res = {}
do {
getKey = localStorage.key(i++)
let keyres = localStorage.getItem(getKey)
if (getKey) {
try {
@jdx
jdx / get-all-github-status-checks.ts
Last active July 13, 2019 15:38
a set of scripts to migrate github status checks from legacy travis to github app (run with ts-node)
// run this second
import GitHub from '@octokit/rest'
import * as _ from 'lodash'
import * as fs from 'fs-extra'
import pMap from 'p-map'
import repos from '../repos.json'
let statuses: {[repo: string]: string[]}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip
# Unzip
unzip protoc-3.3.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@crcrpar
crcrpar / vgg.py
Created September 14, 2017 02:23
[PyTorch] pre-trained VGG16 for perceptual loss. e.g. Style Transfer
"""Modified VGG16 to compute perceptual loss.
This class is mostly copied from pytorch/examples.
See, fast_neural_style in https://github.com/pytorch/examples.
"""
import torch
from torchvision import models
class VGG_OUTPUT(object):
@neoFelhz
neoFelhz / ga.js
Last active August 31, 2018 17:43
Google Analytics 异步加载方案(PHP)
// ********************
// * Author: JerryQu
// * https://imququ.com
// *********************
(function(window, document, navigator, location) {
var screen = window.screen;
var encode = encodeURIComponent;
var data = [
'dt=' + encode(document.title),
@tafarij
tafarij / install-pulse.sh
Created April 22, 2017 13:05
Install Pulse Secure on Ubuntu 16.04
# https://vt4help.service-now.com/kb_view_customer.do?sysparm_article=KB0010740#linux
wget https://secure.nis.vt.edu/resources/downloads/pulse-8.2R5.i386.deb
sudo dpkg –i pulse-8.2R5.i386.deb
/usr/local/pulse/PulseClient.sh install_dependency_packages