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/usr/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
z=sorted(str(sys.builtin_module_names))[-1] | |
b=sorted(str(sys.builtin_module_names))[231] | |
f=sorted(sys.copyright)[162] | |
i=sorted(sys.copyright)[186] | |
u=sorted(sys.copyright)[294] | |
#this heavily depends on Python environment |
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 <iostream> | |
#include <string> | |
std::string fizzbuzz = "FizzBuzz"; | |
std::string fizz = "Fizz"; | |
std::string buzz = "Buzz"; | |
struct dummyint | |
{ | |
dummyint(const int i); |
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
for i in range(1,101):print "Fizz"*(i%3<1)+"Buzz"*(i%5<1)or i |
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/sh | |
#自分の配信URL | |
OUTPUT_URL="" | |
#デフォルトのエンコーダはavconv | |
#ffmpegにしても動作するが、現在DebianやUbuntuはlibavに移行しているので推奨されない | |
ENCODER=avconv | |
FRAMERATE=30 |
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 <iostream> | |
#include <cmath> | |
template<typename T> struct complex | |
{ | |
T real,imag; | |
complex(T arg1,T arg2) : real(arg1),imag(arg2) | |
{ | |
} | |
complex(T arg) : real(arg),imag(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/sh | |
DEVICE=/dev/sr0 | |
OUTPUTBASE=disc | |
READSPEED=8 | |
OFFSET=0 | |
command_exist(){ | |
if ! type $1 >/dev/null 2>&1; then | |
echo "$1が存在しません" | |
exit 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
# this is a config file for system to recognize WQHD monitor | |
# put this under /etc/X11/xorg.conf.d/ | |
# | |
# Intel Graphics's HDMI(or Single-Link DVI) can not output 2560x1440 at 60Hz, | |
# for its limitation of dot clock | |
# This file provides settings of 2560x1440 by 55Hz using "reduced blanking" | |
# Thanks, http://blog.keshi.org/hogememo/2013/08/27/linux-hdmi-wqhd-tips | |
# and http://www.notebookcheck.net/2560x1440-or-2560x1600-via-HDMI.92840.0.html | |
Section "Device" |
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
# -*- coding: utf-8 -*- | |
# 失う信用のない人向けプラグイン。 | |
# なにも聞かずに対象ツイートを消す。 | |
Plugin.create :force_delete do | |
command(:force_delete, | |
name: '何も聞かずに消す', | |
condition: Plugin::Command[:IsMyMessageAll], | |
visible: true, | |
role: :timeline) do |opt| |
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
#00.文字列の逆順 | |
s = "" | |
for c in "stressed": | |
s += c | |
print(s) | |
#01.「パタトクカシーー」 | |
f = "パタトクカシーー" | |
s = "" | |
l = [1,3,5,7] |
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
#準備 | |
wget http://www.cl.ecei.tohoku.ac.jp/nlp100/data/hightemp.txt | |
#10. 行数のカウント | |
wc -l hightemp.txt | |
#別解 | |
grep -c "" hightemp.txt | |
#11. タブをスペースに置換 | |
cat hightemp.txt |tr "\t" " " |
OlderNewer