Clojureを仕事で使った経験をメモしておきます。 2015年の冬に本番稼働したシステムのため、使用したライブラリ等については、必ずしも現在の流行に沿っていないと思います。
- スタッフがウェブブラウザによりアクセスし、ログインして使用する業務システム
- 商品管理、売上管理、支払管理etc..
- DBテーブル数80程度
- 画面数200程度
#!/bin/bash | |
# Usage : ./scanio.sh <save file> | |
# Example: ./scanio.sh cname_list.txt | |
# Premium | |
function ech() { | |
spinner=( "|" "/" "-" "\\" ) | |
while true; do | |
for i in ${spinner[@]}; do | |
echo -ne "\r[$i] $1" |
require(ggplot2) | |
require(purrr) | |
require(stringr) | |
require(glue) | |
require(qrencoder) | |
require(png) | |
require(gridExtra) | |
# given_name 必須. 名 | |
# family_name 任意. 姓 |
package main | |
import ( | |
"context" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" |
(ns switch | |
(:require [clojure.pprint :as pprint])) | |
(defn project-clj-map [filename] | |
(->> (slurp filename) | |
(read-string) | |
(drop 1) | |
(partition 2) | |
(map vec) | |
(into {}))) |
envrcみたいなファイル名で保存して、これはgitignore | |
``` | |
export BITFLYER_API_KEY=xxxxxxxxxxxxxxxxxxxxxx | |
export BITFLYER_API_SECRET=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy | |
export BITFLYER_PUBNUB_SUBSCRIBE_KEY=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | |
``` | |
環境変数を読み込み |
(ns your-proj.views.posts | |
(:require [your-proj.components :as c] | |
[coast.core :as coast])) | |
(defn post [m] | |
(let [{:keys [id title body created-at]} m] | |
[:tr | |
[:td id] | |
[:td title] | |
[:td body] |
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Nops subscriptions in feedly Cloud</title> | |
</head> | |
<body> | |
<outline text="Security" title="Security"> | |
<outline type="rss" text="X-Force Research – Security Intelligence" title="X-Force Research – Security Intelligence" xmlUrl="http://securityintelligence.com/topics/x-force/feed/" htmlUrl="https://securityintelligence.com"/> | |
<outline type="rss" text="SecurityIntelligence" title="SecurityIntelligence" xmlUrl="http://securityint.blogspot.com/feeds/posts/default" htmlUrl="http://securityint.blogspot.com/"/> |
import numpy as np | |
import tensorflow as tf | |
import edward as ed | |
from edward.models import Bernoulli, Beta, PointMass | |
ed.set_seed(42) | |
# DATA | |
n = 4 |
この記事はHaskell (その3) Advent Calendar 2017の5日目の記事です。Haskellの環境構築につまずいた経験をシェアーします。
関数型プログラミング言語の親玉Haskell。昨今の関数型ブームで学びたいと思ってる人も多いんじゃないでしょうか。 今年は『Haskellによる関数プログラミングの思考法』『Haskell 教養としての関数型プログラミング』に『Haskell入門 関数型プログラミング言語の基礎と実践』と入門書がバンバン出ています。 まさしくHaskell入門元年ですね。
というわけでこのビッグウェーブに乗じて入門しようと思ったのですが、環境構築で失敗しました。