Skip to content

Instantly share code, notes, and snippets.

View musaprg's full-sized avatar
🐱
meow meow

Kotaro Inoue musaprg

🐱
meow meow
View GitHub Profile
import java.util.Scanner;
import java.util.Queue;
import java.util.LinkedList;
public class MazeMain {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int startX = 0, startY = 0;
int goalX = 0, goalY = 0;
@musaprg
musaprg / template.py
Created July 11, 2017 05:36
Matplotlib Pyplotのアレコレ
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
n = 100
# x,yのデータ
x = np.arange(0, n, 1)
@musaprg
musaprg / replace_cudalib.sh
Created July 21, 2017 08:18
cuda7.5で無理やりtfを動かすアレ
ls /usr/local/cuda/lib64/ | grep '7\.5$' | sed 's/\.7\.5//g' | xargs -I{} sudo ln -s {}.7.5 /usr/local/cuda/lib64/{}.8.0
@musaprg
musaprg / find_cudnn.sh
Created July 21, 2017 08:38
cudnnがどっかいっちゃった時のfind
find /usr -name '*cudnn*' -print
@musaprg
musaprg / backup.sh
Last active September 15, 2017 08:12
GitLabとKnowledgeの自動バックアップ
#!/bin/bash
# NOTICE: This script must be run as root,
# and it also need some packages -> sshpass
# To install it, run the code below.
# `sudo apt-get install sshpass`
##### GitLab #####
# Run Backup
/opt/gitlab/bin/gitlab-rake gitlab:backup:create
@musaprg
musaprg / grep.sh
Created December 4, 2017 10:58
ファイル検索系
# "hoge"が含まれるファイルを探索
grep hoge ./*
# ディレクトリ内を掘って全ファイルを探索
grep -ilr hoge ./*
@musaprg
musaprg / gist:48eb4f10716d50ecb87e3bac3a743c97
Created February 20, 2018 06:05
ipynbがぶっ壊れたときにソースコードだけ救出するときの正規表現
"source":\s\[\n(((.*),\n)*)(.*)\n\s\s\s\]
@musaprg
musaprg / 1.md
Created June 6, 2018 09:31
SECCON Beginners CTF 振り返り講座用
@musaprg
musaprg / regex_snippets.md
Created June 21, 2018 05:44
RegEx Snippets

RegEx Snippets

3桁区切りの数字(半角のみ)

(([0-9]{1,3},)*)[0-9]+

eg.) 1,234 or 1,234