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
#!/usr/bin/python3 | |
import os | |
import sys | |
for pid in sys.argv[1:]: | |
path = '/proc/' + pid + '/task' | |
if os.path.exists(path): | |
for tid in sorted(os.listdir(path)): | |
with open(f"{path}/{tid}/comm", 'r', encoding='utf-8') as r: |
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
M = Matrix(GF(2), 64 * 64) | |
for i in range(64 * 64): | |
M[i, i] = 1 | |
s0 = list(M[0:64]) | |
s1 = list(M[64:128]) | |
ZERO = [vector(GF(2), [0] * 64 * 64)] | |
def shift(v, delta): | |
if delta > 0: | |
return (ZERO * delta + v[0:-delta]) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="tspan getBoundingClientRect"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> |
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
#!/usr/bin/ruby | |
data = `vagrant box list`.gsub(/\(|\)|,/,'').lines.sort.map(&:split) | |
u = [] | |
data.reverse_each do |name, provider, version| | |
if u.include?([name, provider]) | |
system 'vagrant', 'box', 'remove', '--provider', provider, '--box-version', version, name | |
else | |
u << [name, provider] | |
end | |
end |
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
\documentclass[report,11pt,uplatex,a4j]{jsbook} | |
\usepackage{amsmath,amssymb} | |
\usepackage{bm} | |
\usepackage{ascmac} | |
\usepackage{geometry} | |
\geometry{left=25mm,right=25mm,top=30mm,bottom=30mm} | |
\usepackage{url} | |
\usepackage[linesnumbered,ruled]{algorithm2e} | |
\SetKwRepeat{Do}{do}{while} | |
\renewcommand{\baselinestretch}{1.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
/********************************************************** | |
AIのサンプル | |
**********************************************************/ | |
#include "Data.h" | |
#include <cassert> | |
#include <queue> | |
#include "windows.h" | |
#include <string> | |
#include <sstream> |
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 System.Posix.Env (getEnv) | |
import Data.Maybe (maybe) | |
import XMonad | |
import XMonad.Config.Desktop | |
import XMonad.Config.Gnome | |
import XMonad.Config.Kde | |
import XMonad.Config.Xfce | |
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 <vector> | |
#include <cassert> | |
#include <cstring> | |
#include <set> | |
#include <queue> | |
#include <algorithm> | |
#include <tr1/unordered_set> | |
#include <map> | |
using namespace std; |
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
// ==UserScript== | |
// @name Virtual Arena Link Change | |
// @namespace http://twitter.com/k_operafan | |
// @version 1.0.0 | |
// @description Virtual Areena(AOJ)のLiveArchiveのリンクをpdfからhtmlに書きかえる。 | |
// @include http://rhodon.u-aizu.ac.jp:8080/arena/* | |
// ==/UserScript== | |
(function(){ | |
function func(){ |
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
Module MainModule | |
Sub Main() | |
Dim comb(101, 101) As Integer, ans As Integer = 0 | |
comb(0, 0) = 1 | |
For i = 0 To 100 | |
For j = 0 To i | |
comb(i + 1, j) += comb(i, j) | |
If comb(i + 1, j) > 1000000 Then | |
comb(i + 1, j) = 1000000 | |
End If |
NewerOlder