Skip to content

Instantly share code, notes, and snippets.

package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
package main
import "code.google.com/p/go-tour/tree"
import (
"fmt"
)
/*
type Tree struct {
package main
import (
"fmt"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
Fetch(url string) (body string, urls []string, err error)
#!/bin//bash
DIR_SPEC="spec"
if [ -d ]; then
mkdir $DIR_SPEC
fi
cd spec
cat /proc/cpuinfo > cpuinfo.log
cat /proc/meminfo > meminfo.log
select
a.*
, (
select
score
from test_table
where min <= diff
and max >= diff
) as s
, (
#!/bin/bash
servers=(
server1
server2
server3
)
select server in ${servers[@]}
do
ls *.gz | awk -F'.' '{print $1}' | xargs -I % bash -c "gunzip -c %.gz > %.tsv"

word2vec環境構築(CentOS6.4)

概要

  • ホストOS Windows/ゲストOS CentOS6.4
  • vagrant でのゲストOS立ち上げ
  • 上記より、sudo xxx/pass:vagrant での実行をメインとする

repository 追加

#!/bin/bash
cut -d' ' -f-"$(expr $(wc -w < word.txt) / 2)" > word_half.txt < word.txt
# -*- coding: utf-8 -*-
import json
import os
import urllib
import urlparse
from requests.auth import OAuth1
import requests
import twitter
from study import p
import study