Skip to content

Instantly share code, notes, and snippets.

View simonjisu's full-sized avatar

Soo simonjisu

View GitHub Profile
@simonjisu
simonjisu / Parser
Last active September 25, 2021 12:27
Parser Code in Request
# 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
@simonjisu
simonjisu / text-expand.html
Last active April 15, 2025 14:31
Jekyll Collapsible Text Expander
<!-- 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;
# 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
@simonjisu
simonjisu / prml_ex1.4
Created March 22, 2020 08:18
prml excercise 1.4 code
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))
@simonjisu
simonjisu / pack.py
Created October 28, 2019 05:46
pack_padded_sequence, pad_packed_sequence 설명
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)
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
#!/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 \