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
# Python | |
import json | |
import requests | |
class Parser(object): | |
def __init__(self, token: str, base_url: str, verbose=0): | |
if base_url[-1] == '/': | |
base_url = base_url[:-1] | |
self.base_url = base_url |
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
<!-- Author: https://github.com/simonjisu | |
Change `div.article-content` to your article container in jekyll blog | |
Put your file into `_include/text-expand.html` | |
--> | |
<script> | |
var elements = document.querySelectorAll('div.article-content')[0].childNodes; // 수정1 | |
var addContent = false; | |
var contentsToAdd = []; | |
var expandtags = null; | |
var detailText = null; |
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
# References: | |
# ============== | |
# WebLogo-2M Dataset | |
# http://www.eecs.qmul.ac.uk/~hs308/WebLogo-2M.html/ | |
# Hang Su, Xiatian Zhu, Shaogang Gong. | |
# Deep Learning Logo Detection with Data Expansion by Synthesising Context | |
# IEEE Winter Conference on Applications of Computer Science (WACV), Santa Rosa, USA, March 2017. | |
# | |
# Hang Su, Shaogang Gong, Xiatian Zhu. | |
# WebLogo-2M: Scalable Logo Detection by Deep Learning from the Web |
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 numpy as np | |
import matplotlib.pyplot as plt | |
def g(y): | |
"""x = g(y)""" | |
return np.log(y) - np.log(1-y) + 5 | |
def g_inv(x): | |
"""y = g^{-1}(x)""" | |
return 1 / (1 + np.exp(-x + 5)) |
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 torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
# Embedding dim: E = 12 | |
# Batch size: B = 2 | |
# Tokens: T = 6 | |
# Hidden Size: H = 20 | |
# Vocab Size: V = 10 | |
E, B, T, H, V = (12, 1, 6, 20, 10) |
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
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz | |
tar xf Python-3.6.5.tar.xz | |
cd Python-3.6.5 | |
./configure && make && make install |
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
#!/bin/bash | |
git clone https://github.com/simonjisu/autoupdate.git | |
python autoupdate/src/main.py \ | |
--opt "new_init" \ | |
-bp "." \ | |
-dp "/usr/bin" \ | |
-ms 1000 \ | |
-sv \ | |
-em $1 \ |