Skip to content

Instantly share code, notes, and snippets.

@shihyu
shihyu / test.py
Last active October 26, 2018 10:29
import pandas as pd
import numpy as np
import seaborn as sns
def magnify():
return [dict(selector="th",
props=[("font-size", "4pt")]),
dict(selector="td",
props=[('padding', "0em 0em")]),
// +-\/-+
// (+) VCC 1| |14 GND (-)
// coil 1 A00 2| |13 A10 low_pin
// coil 2 A01 3| |12 A09 high_pin
// RESET 4| |11 A08
// coil 3 A02 5| |10 A07 button_input
// A03 6| |9 A06 led_cathode
// A04 7| |8 A05 led_anode
// +----+
int low_pin = 10;
class A
{
public:
A()
{
m_gA = this;
}
static void test()
{
m_gA->m_a += 1;
import java.util.Random;
import java.util.Scanner;
import java.io.*;
public class Main
{
public static String reverse(String originalStr)
{
String resultStr = "";
for (int i = originalStr.length() - 1 ; i >= 0 ; i--) {
@shihyu
shihyu / test
Created September 16, 2018 02:34
set -g tmate-server-host "106.104.121.78"
set -g tmate-server-port 5432
set -g tmate-server-rsa-fingerprint "9d:80:d3:31:02:f2:24:9e:1a:71:ec:0d:d3:b9:0e:d6"
set -g tmate-server-ecdsa-fingerprint "ec:8f:30:3d:88:4c:fe:89:7d:11:80:b5:e7:23:42:67"
from keras.models import Model
from keras.layers import Input, Dense, Dropout, Flatten, Conv2D, MaxPooling2D, BatchNormalization
from keras.callbacks import ModelCheckpoint, EarlyStopping, TensorBoard
from PIL import Image
import numpy as np
import csv
in1 = Input((60, 200, 3))
Traceback (most recent call last):
File "test1.py", line 54, in <module>
select.select_by_visible_text("7")
File "/home/shihyu/anaconda3/lib/python3.6/site-packages/selenium/webdriver/support/select.py", line 120, in select_by_visible_text
self._setSelected(opt)
File "/home/shihyu/anaconda3/lib/python3.6/site-packages/selenium/webdriver/support/select.py", line 212, in _setSelected
option.click()
File "/home/shihyu/anaconda3/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/home/shihyu/anaconda3/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 628, in _execute
@shihyu
shihyu / ctf_tools.sh
Created February 21, 2018 08:01 — forked from AkashiSN/ctf_tools.sh
CTF tool installation script.
#!/bin/bash
# Advance preparation
echo "source $HOME/.ctf_tool" >> $HOME/.zshrc
# Support 32-bit elf.
sudo apt install -y lib32z1
# Install other tools.
sudo apt install -y gdb binutils build-essential strace ltrace\
@shihyu
shihyu / gdb-trace.py
Created February 20, 2018 09:36 — forked from quark-zju/gdb-trace.py
Trace all function calls using gdb
#!/usr/bin/env python
try:
import gdb
inside_gdb = True
except ImportError:
inside_gdb = False
if inside_gdb:
@shihyu
shihyu / gdb-trace.py
Created February 20, 2018 09:36 — forked from Houdini/gdb-trace.py
Trace all function calls using gdb
#!/usr/bin/env python
try:
import gdb
inside_gdb = True
except ImportError:
inside_gdb = False
if inside_gdb: