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 matplotlib | |
import matplotlib.font_manager as fm | |
!wget http://qinghe.com.tw/fonts/Noto%20Sans%20TC/regular.ttf | |
fm.fontManager.ttflist += fm.createFontList(['regular.ttf']) | |
matplotlib.rc('font', family='Noto Sans TC') |
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
pragma solidity 0.4.24; | |
import "./CtfFramework.sol"; | |
import "./SafeMath.sol"; | |
contract Donation is CtfFramework{ | |
using SafeMath for uint256; | |
uint256 public funds; |
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
pragma solidity 0.4.24; | |
import "./CtfFramework.sol"; | |
import "./SafeMath.sol"; | |
contract Donation is CtfFramework{ | |
using SafeMath for uint256; | |
uint256 public funds; |
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
pragma solidity ^0.4.0; | |
contract Ballot { | |
struct Voter { | |
uint weight; | |
bool voted; | |
uint8 vote; | |
address delegate; | |
} | |
struct Proposal { |
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
# Install oh-my-zsh | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
# Change ZSH theme | |
sed -i -e 's/robbyrussell/af-magic/' .zshrc | |
# Install vimrc | |
git clone --depth=1 git://github.com/amix/vimrc.git ~/.vim_runtime | |
sh ~/.vim_runtime/install_basic_vimrc.sh |
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
# This is a simple echo bot using the decorator mechanism. | |
# It echoes any incoming text messages. | |
import subprocess | |
import commands | |
import telebot | |
from telebot import types | |
API_TOKEN = '' | |
bot = telebot.TeleBot(API_TOKEN) |
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
javascript:(function()%7Bfunction callback()%7B(function(%24)%7Bvar jQuery%3D%24%3Bvar questions %3D %5B%5D%2Coptions %3D %5B%5D%2Ccount %3D 0%3B%24('%5Btype%3D"radio"%5D').each( function() %7Boptions.push(%24(this).attr('id'))%3Bcount%2B%2B%3Bif( count %25 5 %3D%3D 0 ) %7Bquestions.push(options)%3Boptions %3D %5B%5D%7D%7D)%3Bfor( key in questions ) %7Bvar rnd %3D Math.floor((Math.random() * 3) %2B 1)-1%3B%24('%23' %2B questions%5Bkey%5D%5Brnd%5D).attr('checked'%2C 'checked')%3B%7D%7D)(jQuery.noConflict(true))%7Dvar s%3Ddocument.createElement("script")%3Bs.src%3D"https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.7.1%2Fjquery.min.js"%3Bif(s.addEventListener)%7Bs.addEventListener("load"%2Ccallback%2Cfalse)%7Delse if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)() |
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
#/bin/sh | |
du -k -d 1 | sort -nr | awk ' | |
BEGIN { | |
split("KB,MB,GB,TB", Units, ","); | |
} | |
{ | |
u = 1; | |
while ($1 >= 1024) { | |
$1 = $1 / 1024; | |
u += 1 |
This file has been truncated, but you can view the full file.
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
140.118.1.1 => ima1.pc-lab.im.ntust.edu.tw | |
140.118.1.2 => ima2.im.ntust.edu.tw | |
140.118.1.3 => server1.im.ntust.edu.tw | |
140.118.1.4 => ima4.im.ntust.edu.tw | |
140.118.1.5 => ima5.im.ntust.edu.tw | |
140.118.1.6 => ima6.im.ntust.edu.tw | |
140.118.1.7 => ima7.im.ntust.edu.tw | |
140.118.1.8 => ima8.im.ntust.edu.tw | |
140.118.1.9 => ima9.im.ntust.edu.tw | |
140.118.1.10 => ima10.pc-lab.im.ntust.edu.tw |
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
sudo apt install -y build-essential cmake git pkg-config | |
sudo apt install -y libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev | |
# For GUI | |
# sudo apt install -y libgtk2.0-dev | |
sudo apt install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev | |
sudo apt install -y libatlas-base-dev gfortran | |
# install pip |
NewerOlder