Skip to content

Instantly share code, notes, and snippets.

Tong Xiao Cysu

Block or report user

Report or block Cysu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Cysu
Cysu / SimpleCNN.ipynb
Last active Feb 24, 2017
PyTorch Tutorial
View SimpleCNN.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Cysu
Cysu / Matplotlib.ipynb
Created Jan 20, 2017
[ELEG5491] Python Tutorial
View Matplotlib.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Cysu
Cysu / resnet50_trainval.prototxt
Created Aug 8, 2016
Pre-ResNet Caffe prototxt
View resnet50_trainval.prototxt
name: "ResNet_50"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
@Cysu
Cysu / gist:7596046
Created Nov 22, 2013
Python: PyQt- Move widget to center
View gist:7596046
fg = self.frameGeometry()
cp = QtGui.QDesktopWidget().availableGeometry().center()
fg.moveCenter(cp)
self.move(fg.topLeft())
@Cysu
Cysu / gist:7463103
Created Nov 14, 2013
Python: Network Registration for ERGWAVE Wi-Fi
View gist:7463103
import urllib
import urllib2
import socket
import uuid
macaddr = ':'.join(['{:02x}'.format((uuid.getnode() >> i) & 0xff) for i in range(0,8*6,8)][::-1])
ipaddr = socket.gethostbyname(socket.getfqdn())
url = 'https://securelogin.arubanetworks.com/cgi-bin/login?cmd=login&mac={0}&ip={1}&essid=%20'.format(macaddr, ipaddr)
@Cysu
Cysu / gist:7461066
Last active Jul 16, 2019
Python: PyQt- FlowLayout
View gist:7461066
#! /usr/bin/python2
# -*- coding: utf-8 -*-
from PyQt4 import QtCore, QtGui
class FlowLayout(QtGui.QLayout):
def __init__(self, parent=None, margin=0, spacing=-1):
super(FlowLayout, self).__init__(parent)
if parent is not None:
You can’t perform that action at this time.