Skip to content

Instantly share code, notes, and snippets.

View yukoga's full-sized avatar

yukoga yukoga

  • Japan
View GitHub Profile

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

from keras.preprocessing.text import Tokenizer
# ベクトル化したい文章をリストで宣言します。
texts = ["I am a student. He is a student, too.", "She is not a student."]
# Tokenizerをインスタンス化し、上で用意した文章を与えます。
tokenizer = Tokenizer()
tokenizer.fit_on_texts(texts)
# 与えられた文章の数を取得します。
@yukoga
yukoga / gist:32f0fc21bfbdd8a6760ac17a2535d9bb
Created May 24, 2019 02:26
AppDelegate.m for Firebase DynamicLinks measurement
//
// Copyright (c) 2015 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software

C++初心者がC++を使って競技プログラミングするための備忘録のようなもの

この記事は、C++ (fork) Advent Calendar 2013の12日目の記事です。

はじめに

記事を書く人が居ないみたいなので、C++初心者ですが箸休め的な記事を書こうと思い立ち、いざ書き上げてみたら思いの外長くなりました。

この記事は、C++初心者な著者が、C++を用いて競技プログラミングをするために、調べたことや試した事などのまとめです。 記事中に誤り、問題点やご指摘、ご質問等ありましたら、@rigibunまでご連絡下さい(特にpush_bach)

githubのmarkdownを使いたかったことと、変更履歴が見られることからgistで書きました。

BASE_PATH=result/rnn/pad.ns-25.bs-20.nl-2.hs-20 sh rnn.sh --padding t --num_steps 25 --batch_size 20 --num_layers 2 --hidden_size 20
# かなり良かった
BASE_PATH=result/rnn/pad.ns-25.bs-40.nl-2.hs-20 sh rnn.sh --padding t --num_steps 25 --batch_size 40 --num_layers 2 --hidden_size 20
# 少し悪かった(2->eが多かったようだ)
BASE_PATH=result/rnn/nopad.ns-25.bs-40.nl-2.hs-20 sh rnn.sh --nopadding --num_steps 25 --batch_size 40 --num_layers 2 --hidden_size 20
BASE_PATH=result/rnn/pad.ns-25.bs-100.nl-2.hs-20 sh rnn.sh --padding t --num_steps 25 --batch_size 100 --num_layers 2 --hidden_size 20
BASE_PATH=result/rnn/nopad.ns-25.bs-100.nl-2.hs-20 sh rnn.sh --nopadding --num_steps 25 --batch_size 100 --num_layers 2 --hidden_size 20
#!/bin/sh
DATASET_PATH=${DATASET_PATH:-"sample/seq_dataset.pkl"}
BP="result/rnn/$(date '+%Y%m%d-%H%M%S')"
BASE_PATH=${BASE_PATH:-$BP}
MODEL_PATH="${BASE_PATH}/seq_model.pkl"
SAMPLING_PATH="${BASE_PATH}/seq_sample.txt"
FIGURE_PATH="${BASE_PATH}/figure.png"
#!/usr/bin/env python
# coding: utf-8
"""Compare data distribution"""
import json
from itertools import chain
import cPickle as pickle
import tensorflow as tf
import pandas as pd
#!/usr/bin/env python
# coding: utf-8
"""Sampling Sequence Data from model"""
import numpy as np
import tensorflow as tf
import json
import cPickle as pickle
import itertools as it
from rnnlib import PTBModel
#!/usr/bin/env python
# coding: utf-8
from cPickle import load
import numpy as np
import tensorflow as tf
from tensorflow.models.rnn import rnn_cell, seq2seq
from scipy.stats import entropy
#!/usr/bin/env python
# coding: utf-8
"""Create Model"""
import os
import numpy as np
import tensorflow as tf
import time
import cPickle as pickle