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 pathlib | |
import shutil | |
from typing import List, Tuple | |
def search_extra_file_list(image_directory_path_str: str, image_file_ext: str, raw_file_ext: str)\ | |
-> Tuple[List[str], List[str]]: | |
# 画像ファイルのファイル名一覧、およびRAWファイルのファイル名一覧を取得する | |
image_directory_path = pathlib.Path(image_directory_path_str) |
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
# Pillowは7.2.0だと駄目で、7.0.0にする必要あり | |
import os | |
from pprint import pprint | |
from typing import Dict, Any | |
from PIL import Image, ImageDraw, ImageFont | |
from PIL.ExifTags import TAGS | |
from PIL.MpoImagePlugin import MpoImageFile | |
# Exif情報を取得するためのシグネチャ |
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 glob | |
import os | |
from pprint import pprint | |
from typing import Dict, Any | |
from PIL import Image | |
from PIL.ExifTags import TAGS | |
from PIL.MpoImagePlugin import MpoImageFile | |
# Exif情報を取得するためのシグネチャ |
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
def judge_hand(name: str) -> int: | |
"""役を判定する | |
Parameters | |
---------- | |
name : str | |
「大石泉すき」から重複を許して5文字取って並べたもの | |
Returns | |
------- |
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
// コールバックのインターフェース | |
public interface ICallback { | |
void onResponse(String data); | |
} | |
// コールバックを利用するメソッド | |
public class SampleApi { | |
void sendRequest(ICallback callback) { | |
callback.onResponse("test"); // 入れる値の例 | |
} |
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 <iostream> | |
#include <chrono> | |
using namespace std; | |
using namespace std::chrono; | |
const size_t LOOP_COUNT = 10000; | |
int judge_hand(const int digit[]) { | |
// ロイヤルストレートフラッシュ | |
if (digit[0] == 0 && digit[1] == 1 && digit[2] == 2 && digit[3] == 3 && digit[4] == 4) |
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 itertools | |
import collections | |
from typing import List | |
def judge_hand(name : str) -> str: | |
"""手役を判定する | |
Parameters | |
---------- | |
name : str |
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
# coding: UTF-8 | |
import math | |
import pandas | |
import pulp | |
# 必要な資材量 | |
want_supply = { | |
'人力': 10000, | |
'弾薬': 22000, |
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
○対象となる艦載機の一覧を取得 | |
[零観, 紫雲, 夜偵, 天山村田, 九七友永, 九七友永, 天山友永, 天山村田, 流星改] | |
○命中値で安定ソート | |
[零観(命中2), 紫雲(1), 夜偵(1), 天山村田(2), 九七友永(3), 九七友永(3), 天山友永(3), 天山村田(2), 流星改(0)] | |
↓ | |
[九七友永(3), 九七友永(3), 天山友永(3), 零観(2), 天山村田(2), 天山村田(2), 紫雲(1), 夜偵(1), 流星改(0)] | |
○それぞれの触接選択率を計算 | |
[九七友永(索敵4), 九七友永(4), 天山友永(5), 零観(6), 天山村田(4), 天山村田(4), 紫雲(8), 夜偵(3), 流星改(2)] |
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
// Angularを知らない人向けの説明: | |
// AngularにはHttpClientクラスがあり、それを使うことでGETなどのHTTPリクエストが実行できる。 | |
// また、コンストラクタの引数にするだけでDI(依存性の注入)できる | |
import { HttpClient } from '@angular/common/http'; | |
constructor(private http: HttpClient) {} | |
private async getHoge(): Promise<string> { | |
return await this.http.get<string>(url).toPromise(); | |
} |
NewerOlder