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
| def bfs(coordinates, done, stack): | |
| px, py = stack.pop() | |
| # 移動先がgなら探索終了 | |
| if coordinates[px][py] == 'g': | |
| print("Yes") | |
| sys.exit() | |
| # それ以外なら探索を実施する | |
| for x, y in ([0, 1], [1, 0], [0, -1], [-1, 0]): |
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
| def dfs(coordinates, done, stack): | |
| px, py = stack.pop() | |
| # 移動先がgなら探索終了 | |
| if coordinates[px][py] == 'g': | |
| print("Yes") | |
| sys.exit() | |
| # それ以外なら探索を実施する | |
| for x, y in ([0, 1], [1, 0], [0, -1], [-1, 0]): |
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
| #!/bin/bash | |
| # Ansible Path | |
| ANSIBLE_PATH = ~/Desktop/dotfiles/dotfiles_20210428/ | |
| # Xcode install | |
| sudo xcode-select --install | |
| # homebrew install | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 paramiko import SSHClient, RSAKey, AutoAddPolicy | |
| import pandas as pd | |
| class DataSets: | |
| def __init__(self, hostname, username, key_path): | |
| self.hostname = hostname | |
| self.username = username | |
| self.key_path = key_path | |
| self.client = SSHClient() |
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 subprocess | |
| char_set = str(subprocess.check_output(["file", "--mime", path]))[2:-3].split("=")[1] | |
| print(char_set) |
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 struct | |
| from PIL import Image | |
| import os | |
| filename = 'ETL9B' | |
| for root, dirs, files in os.walk(filename): | |
| for file in sorted(files): | |
| filepath = os.path.join(root, file) | |
| print(file) |
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
| PRG04 START | |
| RPUSH | |
| ;INIT | |
| LAD GR1,1 | |
| LAD GR3,0 | |
| ;RUN | |
| LOOP LD GR2,='0' | |
| ADDA GR2,GR1 | |
| ADDA GR3,GR1 | |
| ST GR2,CNT |
NewerOlder