Gist-modeのテスト
This file contains 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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import argparse | |
from pyquery import PyQuery as pq | |
def main(): | |
parser = argparse.ArgumentParser(description='ChromeToSafari') |
This file contains 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 Cocoa | |
let workTime = 1500 | |
let breakTime = 300 | |
class Count { | |
var restTime = workTime | |
var stopFlag = false | |
var mode = true |
This file contains 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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.cm as cm | |
def bars(target, size, labels=None, width=0.25, margin=0.5, | |
output=None,title=None, xlabel=None, ylabel=None, loc="best"): | |
""" |
This file contains 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
Vagrant.configure('2') do |config| | |
config.vm.hostname = '' | |
config.vm.provider :digital_ocean do |provider, override| | |
provider.client_id = '' | |
provider.api_key = '' | |
provider.ssh_key_name = '' | |
override.ssh.private_key_path = '~/.ssh/id_rsa' | |
override.vm.box = 'digital_ocean' |
This file contains 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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
import math | |
def calc_dcg(score,k): | |
dcg_list = list() | |
dcg= 0.0 |
This file contains 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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import random | |
import sys | |
import csv | |
def main(): |
This file contains 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
/* | |
* shared memoryのサンプルコード | |
* shared memoryを参照し,メモリに格納されている文字列(char*)を表示する | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/ipc.h> | |
#include <sys/shm.h> |
This file contains 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
/* | |
* shared memoryのサンプルコード | |
* すでに作成されている共有メモリに"HELLO_WORLD"をセットする | |
* 引数にshm_receiveを実行した際に表示されたshmidを渡す | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/ipc.h> |