https://github.com/Rust-SDL2/rust-sdl2 を使う
macならbrewで入る
brew install sdl2 sdl2_gfx sdl2_image sdl2_ttf
| module CSV | |
| ( CSV | |
| , Record | |
| , Field | |
| , csv | |
| , parseCSV | |
| , parseCSVFromFile | |
| , parseCSVTest | |
| , printCSV | |
| ) |
| [ | |
| // replace ctrl by meta | |
| {"key":"meta+end","command":"cursorBottom","when":"textInputFocus"}, | |
| {"key":"meta+shift+end","command":"cursorBottomSelect","when":"textInputFocus"}, | |
| {"key":"meta+home","command":"cursorTop","when":"textInputFocus"}, | |
| {"key":"meta+shift+home","command":"cursorTopSelect","when":"textInputFocus"}, | |
| {"key":"meta+a","command":"editor.action.selectAll","when":"textInputFocus"}, | |
| {"key":"meta+i","command":"expandLineSelection","when":"textInputFocus"}, | |
| {"key":"meta+shift+z","command":"redo","when":"textInputFocus && !editorReadonly"}, | |
| {"key":"meta+y","command":"redo","when":"textInputFocus && !editorReadonly"}, |
| import re | |
| import io | |
| import sys | |
| from collections import namedtuple | |
| import logging | |
| logger = logging.getLogger(__name__) | |
| logger.setLevel(logging.DEBUG) |
| import random | |
| class TreapNode: | |
| __slots__ = ['parent', 'value', 'priority', 'left', 'right'] | |
| def __init__(self): | |
| self.parent = None | |
| self.value = None | |
| self.priority = None |
| def binary_search(a, x, low, high): | |
| while low < high: | |
| mid = (low + high) // 2 | |
| if x < a[mid]: | |
| high = mid | |
| else: | |
| low = mid + 1 | |
| return low | |
| import math | |
| def insertion_sort(a): | |
| for i in range(1, len(a)): | |
| tmp = a[i] | |
| j = i | |
| while j > 0 and a[j - 1] > tmp: | |
| a[j] = a[j - 1] | |
| j -= 1 |
| import argparse | |
| import logging | |
| import boto3 | |
| def main(): | |
| parser = argparse.ArgumentParser(description="ec2 private IP describer") | |
| parser.add_argument("vpc_id", nargs="+", help="vpc ids") | |
| args = parser.parse_args() |
| from collections import namedtuple | |
| NFA = namedtuple('NFA', 'transition initial accept') | |
| empty = "empty" | |
| def lookup(automata, state, s): | |
| x = [(i, empty) for i in automata.transition.get((state, empty), [])] | |
| if not s: |
| open Core | |
| type ('a, 'b) dfa = { | |
| alphabet: 'a list; | |
| transition: ('b * 'a * 'b) list; | |
| initial: 'b; | |
| accept: 'b list; | |
| } | |
| let alphabet = [0; 1;] |
https://github.com/Rust-SDL2/rust-sdl2 を使う
macならbrewで入る
brew install sdl2 sdl2_gfx sdl2_image sdl2_ttf