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
from lxml import html | |
import requests | |
import shutil | |
import sys | |
def download(url): | |
name = url.split("/")[-1] | |
response = requests.get(url, stream=True) | |
with open(name, "wb") as out_file: | |
shutil.copyfileobj(response.raw, out_file) |
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
# In chrome console: | |
path="" | |
$x("//*[@id=\"org-repositories\"]/div/div/div[2]/ul/li[*]/div/div[1]/div[1]/h3/a").forEach( | |
function(i){ | |
console.log(i.href); | |
path+=i.href+"\n" | |
}); | |
console.log(path); |
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
// -*- coding:utf-8-unix; mode:c; -*- | |
/* | |
get the active window on X window system | |
http://k-ui.jp/blog/2012/05/07/get-active-window-on-x-window-system/ | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <locale.h> |
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 sys | |
s = [] | |
for i in range(0, int(sys.argv[1])): | |
s.append(raw_input()) | |
s[i] = s[i][:-1] | |
for i in range(0, int(sys.argv[1])/5): | |
print("{0},{1},{2},{3},{4}".format(s[i*5],s[i*5+1],s[i*5+2],s[i*5+3],s[i*5+4])) |
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
<section id="timeline"> | |
<article> | |
<div class="inner"> | |
<span class="date"> | |
<span class="day">30<sup>th</sup></span> | |
<span class="month">Jan</span> | |
<span class="year">2014</span> | |
</span> | |
<h2>The Title</h2> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis rutrum nunc, eget dictum massa. Nam faucibus felis nec augue adipiscing, eget commodo libero mattis.agegLorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis rutrum nunc, eget dictum massa. Nam faucibus felis nec augue adipiscing, eget commodo libero mattis.agegLorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis rutrum nunc, eget dictum massa. Nam faucibus felis nec augue adipiscing, eget commodo libero mattis.agegLorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis rutrum nunc, eget dictum massa. Nam faucibus felis nec augue adipiscing, eget commodo libero mattis.ageg</p> |
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
html, body { | |
margin: 0; | |
padding: 0; | |
font-family: Helvetica, sans-serif; | |
} | |
body { | |
background: #25303B; | |
} | |
section#timeline { | |
width: 80%; |
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 map.py main-bin library-obj | |
# | |
# |
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
export PATH=${PATH}:$2 | |
# flush linux system | |
wget https://odroid.in/ubuntu_14.04lts/ubuntu-14.04lts-server-odroid-xu3-20150725.img.xz | |
unxz ubuntu-14.04lts-server-odroid-xu3-20150725.img.xz | |
sudo dd if=ubuntu-14.04lts-server-odroid-xu3-20150725.img of=$1 bs=1M conv=fsync | |
sync | |
# flash bootloader | |
git clone https://github.com/hardkernel/u-boot.git -b odroidxu3-v2012.07 |
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
''' | |
2D CDF 9/7 Wavelet Forward and Inverse Transform (lifting implementation) | |
This code is provided "as is" and is given for educational purposes. | |
2008 - Kris Olhovsky - [email protected] | |
''' | |
from PIL import Image # Part of the standard Python Library | |
''' Example matrix as a list of lists: ''' |