- Multicore processor 時代の到来
- Mooreの法則は繰り返されない
- ソフトウェア開発者は自分で並列化しないといけない
- この本はshared memoryで通信するmultiprocessorでのプログラミングについて語る(shared-memory multiprocessors)
- 1st part(principle)
- comutability
- concurrent program
- program corectness
- 1st part(principle)
- 2nd part(practice)
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 logging | |
import math | |
from typing import Tuple | |
import optuna | |
from optuna_dashboard._app import create_app | |
host = "127.0.0.1" | |
port = 8080 |
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 os | |
import textwrap | |
import time | |
from typing import NoReturn | |
import optuna | |
from PIL import Image | |
from optuna.trial import TrialState | |
from optuna_dashboard import ObjectiveChoiceWidget, save_note |
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 optuna | |
from dask.distributed import Client | |
from sklearn.datasets import load_digits | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.metrics import accuracy_score | |
from sklearn.model_selection import train_test_split | |
def objective(trial): |
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 argparse | |
import time | |
import lightgbm as lgb | |
import numpy as np | |
import sklearn.datasets | |
import sklearn.metrics | |
from sklearn.model_selection import train_test_split | |
from statistics import mean, stdev | |
import optuna |
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 datetime | |
ymdstr = datetime.date.today().strftime("%y-%m-%d") |
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
int my_account = 0; // 私の預金口座残高 | |
int your_account = 100; // あなたの預金口座残高 | |
// 送金処理: データ競合(data race)あり! | |
bool racy_transfer(int& src, int& dst, int m) | |
{ | |
if (m <= src) { // 未定義動作の可能性あり! | |
src -= m; // 未定義動作の可能性あり! | |
dst += m; // 未定義動作の可能性あり! | |
return true; |
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
#include <cmath> | |
#include <iostream> | |
#include <set> | |
#include <vector> | |
#include <utility> | |
#include <string> | |
int readNum() | |
{ | |
int n; |
NewerOlder