글쓴이: 김정주(haje01@gmail.com)
Caffe는 강력한 딥러닝 툴이지만, 설치가 까다로워 접근하기가 쉽지 않습니다. 이에 Docker를 활용하여 실습하는 방법을 소개합니다.
설치과정은 많은 파일을 받아야 하기에 인터넷이 빠른 곳에서, 충분한 시간(2시간 이상)을 가지고 진행해야 합니다.
-- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
-- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
if application "Spotify" is running then | |
tell application "Spotify" | |
if player state is playing then | |
return (get artist of current track) & " - " & (get name of current track) | |
else | |
return "" | |
end if |
def update_user_social_data(strategy, *args, **kwargs): | |
"""Set the name and avatar for a user only if is new. | |
""" | |
print 'update_user_social_data ::', strategy | |
if not kwargs['is_new']: | |
return | |
full_name = '' | |
backend = kwargs['backend'] |
글쓴이: 김정주(haje01@gmail.com)
Caffe는 강력한 딥러닝 툴이지만, 설치가 까다로워 접근하기가 쉽지 않습니다. 이에 Docker를 활용하여 실습하는 방법을 소개합니다.
설치과정은 많은 파일을 받아야 하기에 인터넷이 빠른 곳에서, 충분한 시간(2시간 이상)을 가지고 진행해야 합니다.
var frm=document.pageForm; | |
var firstURL = "http://first.wifi.olleh.com/starbucks/index_en_new.html"; | |
var secondURL = "https://first.wifi.olleh.com/starbucks/starbucks_en.php"; | |
switch(window.location.href) { | |
case firstURL: | |
document.getElementById('stCheck').checked = false; | |
NextPage('0'); | |
break; | |
case secondURL: | |
frm.cust_email_addr.value = Math.random().toString(36).replace(/[0-9\.]/g, "").substring(0,Math.floor(Math.random()*10)+2)+"@"+["yahoo.com","hotmail.com"][Math.floor(Math.random()*2)]; |
alias dockstart='docker-machine start default' | |
alias dockrestart='docker-machine restart default' | |
alias dockstop='docker-machine stop default' | |
alias dock='eval "$(docker-machine env default)"' | |
alias dockswm='eval "$(docker-machine env -swarm swarm-master)"' | |
alias dps='docker ps -a' | |
alias dqf='docker images -qf "dangling=true"' | |
alias ddqf='docker rmi -f $(docker images -qf "dangling=true")' | |
alias ddrmi='docker rmi -f $(docker images | grep -e "latest" -e "SNAPSHOT" | awk '"'"'{print $3}'"'"')' | |
alias dimg='docker images' |
class Hashmap(object): | |
""" | |
character holding hash map | |
""" | |
def __init__(self, hash_fn, length=100): | |
assert hasattr(hash_fn, '__call__'), 'You must provide a hash function' | |
self._buckets = [None] * length | |
self.hash_len = length | |
self.hash_fn = hash_fn |
"""XLS -> json converter | |
first: | |
$ pip install xlrd | |
then: | |
$ cat in.xls | |
date, temp, pressure | |
Jan 1, 73, 455 | |
Jan 3, 72, 344 |
Solution for collecting, storing, visualizing and alerting on time-series data at scale. All components of the platform are designed to work together seamlessly.
function openInWebView(url) | |
{ | |
var anchor = document.createElement('a'); | |
anchor.setAttribute('href', url); | |
//anchor.setAttribute('target', '_self'); | |
var dispatch = document.createEvent('HTMLEvents') | |
dispatch.initEvent('click', true, true); | |
anchor.dispatchEvent(dispatch); |
# Do the first 6 steps only once. | |
1. pip install --user alembic | |
2. bash: ``cd {{my_project}} && alembic init alembic`` | |
3. bash: ``text_editor {{my_project}}/alembic.ini`` | |
4. Change: "sqlalchemy.url = postgres://{{username}}:{{password}}@{{address}}/{{db_name}}" | |
5. bash: ``text_editor {{my_project}}/alembic/env.py`` | |
6. Now, import your metadata/db object from your app.: | |
# {{my_project}}/{{my_project_dir}}/app.py | |