This file contains hidden or 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
| """ | |
| このスクリプトはなに? | |
| 各種実験データの動画(mp4)のサムネイルを作ります。 | |
| 実行したディレクトリ配下のすべてのmp4をrecurciveに取得し、 | |
| 「そのmp4の配下のgifディレクトリ」にmp4を作ります。 | |
| サムネイルは1,2,3,4,11,22,33...%の時間軸を切り取ります | |
| また、実行時に元のmp4がなくなったgifを削除します。 | |
| """ |
This file contains hidden or 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 "DEV_Config.h" | |
| #include "LCD_1in3.h" | |
| #include "GUI_Paint.h" | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #define WIDTH 240 | |
| #define HEIGHT 240 |
This file contains hidden or 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 | |
| # coding: utf-8 | |
| windowX, windowY = 700, 700 | |
| rule = [0] * 8 | |
| rule = [0, 1, 1, 1, 1, 0, 0, 0] | |
| import sys, random | |
| from PyQt5.QtWidgets import QWidget, QApplication |
This file contains hidden or 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 | |
| # coding: utf-8 | |
| windowX, windowY = 300,300 | |
| import sys, random | |
| from PyQt5.QtWidgets import QWidget, QApplication | |
| from PyQt5.QtGui import QPainter, QColor, QPen, QImage | |
| from PyQt5.QtCore import Qt | |
| import sys |
This file contains hidden or 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 <bits/stdc++.h> | |
| using namespace std; | |
| int solve1(int N, std::vector<int> a){ | |
| sort(a.begin(), a.end()); | |
| for(int i = 0; i < N+1; i++){ | |
| if(a[i] == a[i+1]) return a[i]; | |
| } | |
| return -1; | |
| } |
This file contains hidden or 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 <bits/stdc++.h> | |
| #define ALL(x) (x).begin(), (x).end() | |
| #define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++) | |
| #define IFOR(i, begin, end) for(int i=(end)-1,i##_begin_=(begin);i>=i##_begin_;i--) | |
| #define REP(i, n) FOR(i,0,n) | |
| #define IREP(i, n) IFOR(i,0,n) | |
| ////////////////////////////////////// | |
| #include <iostream> |
This file contains hidden or 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 <bits/stdc++.h> | |
| #define ALL(x) (x).begin(), (x).end() | |
| #define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++) | |
| #define IFOR(i, begin, end) for(int i=(end)-1,i##_begin_=(begin);i>=i##_begin_;i--) | |
| #define REP(i, n) FOR(i,0,n) | |
| #define IREP(i, n) IFOR(i,0,n) | |
| ////////////////////////////////////// | |
| #include <iostream> |
This file contains hidden or 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度と同じグループになれない」 | |
| 今後の展望: | |
| - k回回して候補がなかった場合、ペナルティスコアが最も低い候補を表示する | |
| - 「絶対に組み合わせをしたい」ペアを指定できるようにする | |
| ■これはなに? | |
| ■前提条件 |
This file contains hidden or 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
| from typing import List | |
| class Solution: | |
| def findRepeatedDnaSequences(self, s: str) -> List[str]: | |
| import collections | |
| table = {"A":0, "C":1, "G":2, "T": 3} # 2bit表現 | |
| if s is None: | |
| return [] | |
| ll = len(s) | |
| if ll < 10: | |
| return [] |
This file contains hidden or 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 sys | |
| import itertools | |
| import random | |
| ll = list(range(1, 17)) | |
| random.shuffle(ll) | |
| ans, qcount = None, 0 | |
| print(ll, file=sys.stderr) | |
| maval = max(ll) | |
| for i in range(len(ll)): |