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
Pick an element from an array every day, with 3 conditions. 1. while a loop, the element should not be same. 2. for every loop, order should be random. 3. no external memory. | |
ある配列から、毎日要素を取り出したい。ただし、配列が一周するまでは要素が重複してはいけず、また、毎周の順番が固定でもいけない。 | |
an array. | |
ある配列がある。 | |
``` | |
["apple", "banana", "carrot"] | |
``` |
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
// Put this file on top directory in your expo project. | |
APP_JSON_FILE = 'app.prod.json' | |
var app_json = require(APP_JSON_FILE) | |
version = app_json.expo.version | |
console.log(`Latest version: ${version}`) | |
match = /([0-9]+\.[0-9]+\.)([0-9]+)/.exec(version) | |
major_minor_version = match[1] | |
patch_version = match[2] |
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
cmd=$1 | |
stack_name=$2 | |
if [ $cmd = "create" ]; then | |
case $3 in | |
"") echo "Error: Please give a template file path!"; exit 0;; | |
/*) absolute=$3 ;; | |
*) absolute=$PWD/$3 ;; | |
# S3にはこれから対応する、かも | |
esac |
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
{ | |
// Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", |
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
.column{ | |
font-size:42px; | |
width:100%; | |
} | |
.item-box{ | |
background-color:white; | |
} | |
.js-column-header{ | |
display:none; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>1行が2段組のテーブルを縞々に表示する</title> | |
<style type="text/css"> | |
.table-striped-2span tbody tr:nth-of-type(4n+1), .table-striped-2span tbody tr:nth-of-type(4n+2) { | |
background-color: #c0c0c0; | |
} | |
</style> |
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 java.io.*; | |
import java.util.*; | |
import java.util.concurrent.*; | |
public class IOByExec implements Runnable{ | |
private ExecutorService exec = Executors.newCachedThreadPool(); | |
private String name; | |
private int count; | |
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
# coding:utf-8 | |
from sklearn import cluster, datasets | |
import pandas as pd | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
# このデータが曲者で、数値データの中に英字や記号が混ざってた | |
df = pd.read_csv("scrubbed.csv") |
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 java.io.*; | |
import org.apache.commons.csv.CSVRecord; | |
import org.apache.commons.csv.CSVFormat; | |
public class Csv{ | |
public static void main(String[] args){ | |
try{ | |
String homeDir = System.getenv("HOME"); | |
Reader reader = new FileReader(homeDir + "/dev/lrn/java/file/read.csv"); | |
FileWriter writer = new FileWriter(homeDir + "/dev/lrn/java/file/write.csv"); |
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
# -*- coding: utf-8 -*- | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def main(): | |
n = 30 | |
fib_list = [] | |
rate_list = [] |