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
$ ./watch_rsync | |
---- watch_rsync ---- | |
#!/bin/sh | |
fswatch --exclude="/.git/" --exclude="/target/" -x ../ | xargs -I "file_path" ./conv_rsync_path.py "file_path" | |
---- watch_rsync ---- | |
---- conv_rsync_path.py ---- | |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- |
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 play.api.db.slick._ | |
import scala.slick.jdbc.{StaticQuery => Q} | |
// 全てのユーザーの id を返す | |
def users(): List[Int] = { | |
DB withSession { | |
Q.queryNA[Int](""" | |
select id from users | |
""").list | |
} |
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
$ sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb | |
$ sudo apt-get update | |
$ sudo apt-get install cuda |
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
package main | |
import ( | |
"fmt" | |
"github.com/DDRBoxman/go-amazon-product-api" | |
"github.com/PuerkitoBio/goquery" | |
"io/ioutil" | |
"os" | |
"strings" | |
"time" |
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 -*- | |
import time | |
from lxml import objectify | |
class ImageInfo: | |
def __init__(self): | |
self.url = '' | |
self.width = '' | |
self.height = '' |
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
package main | |
import ( | |
"fmt" | |
"github.com/PuerkitoBio/goquery" | |
"io/ioutil" | |
"strconv" | |
"strings" | |
"time" | |
) |
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
package main | |
import ( | |
"fmt" | |
"github.com/PuerkitoBio/goquery" | |
"io/ioutil" | |
"strconv" | |
"strings" | |
"time" | |
) |
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
type PageItem struct { | |
Page int | |
Str string | |
} | |
type Page struct { | |
Items []PageItem | |
MaxPage int | |
} |
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
{{define "base"}} | |
<html lang="en"> | |
<head> | |
<title>{{template "title" .}}</title> | |
</head> | |
<body> | |
{{template "body" .}} | |
</body> | |
</html> | |
{{end}} |
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 os | |
import concurrent.futures as confu | |
def target_func(x): | |
return x + 1 | |
def main(): | |
count = 10 |