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
-- SQLクイズへの回答 https://github.com/neumann-tokyo/sql-quiz/blob/main/store/question.md | |
SELECT r.item_name, | |
r.weeknum, | |
COALESCE(s.price, 0) AS lastweek_price, | |
r.price, | |
CASE | |
WHEN COALESCE(s.price, 0) < r.price THEN '/' | |
WHEN COALESCE(s.price, 0) > r.price THEN '\' | |
ELSE '=' |
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
<?php | |
// mixin クラス | |
class MixinClass | |
{ | |
// インスタンスメソッド(引数あり) | |
// 注:第1引数に、mixin 先のクラスのインスタンスを表す "$that" が必要です。 | |
// 実際呼ぶ時は ->mixin_instance_method($message) ってなります。 | |
public function mixin_instance_method($that, $message, DateTime $date) | |
{ |
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 | |
# UFO Sightings | Kaggle | |
# https://www.kaggle.com/NUFORC/ufo-sightings | |
# NASA/Space Data Hackathon(宇宙デー( タ分析ハッカソン) | Meetup | |
# https://www.meetup.com/ja-JP/Machine-Learning-Meetup-by-team-ai/events/254436043 | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
ds = 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 numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
ds = pd.read_csv('train.csv') | |
# Ageの欠損値を Mr, Mrs, etc ごとの中央値で埋める | |
noage = ds[ ds['Age'].isna() ] | |
honorifics = ['Mr', 'Mrs', 'Ms', 'Miss', 'Master', 'Rev', 'Dr'] | |
for h in honorifics: |
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 ruby | |
# coding: utf-8 | |
# | |
# バックログのタスクをローカルにダウンロードする使い捨てのクソスクリプト | |
# | |
# カレントディレクトリ以下に issues/ って名前のディレクトリを作り、 | |
# issues/ST-1.txt みたいな名前のファイルに課題の内容(タイトル、本文、コメントetc)を記録、 | |
# issues/ST-1/ みたいな名前のディレクトリ以下に課題の添付ファイルをダウンロード | |
# レジューム機能付き。途中で Ctrl-C で停止した場合、前回ダウンロード完了分移行からダウンロード開始する |
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
main(i){for(;;)printf(i%15?i%5?i%3?"%d\n":"Fizz\n":"Buzz\n":"FizzBuzz\n",i++);} |
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
<?php | |
// mixin クラス | |
class MixinClass | |
{ | |
// 静的メソッド | |
public static function mixin_static_method($message, DateTime $date) | |
{ | |
print "これは MixinClass の静的メソッドです $message ".$date->format('Y-m-d')."\n"; | |
} |
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
<?php | |
// mixin クラス | |
class MixinClass | |
{ | |
// インスタンスメソッド | |
// 注:第1引数に、mixin 先のクラスのインスタンスを表す "$that" が必要です。 | |
// 実際呼ぶ時は ->mixin_instance_method($message) ってなります。 | |
public function mixin_instance_method($that, $message, DateTime $date) | |
{ |