Skip to content

Instantly share code, notes, and snippets.

View 345161974's full-sized avatar
🎯
Focusing

Lucas 345161974

🎯
Focusing
View GitHub Profile
@345161974
345161974 / setup.py
Created May 10, 2017 04:40 — forked from stlehmann/setup.py
py2exe setup script for PyQt5 application including matplotlib, numpy, scipy, pandas
#! python3.4
from setuptools import setup
import os
import py2exe
import matplotlib
includes = ["sip",
"PyQt5",
"PyQt5.QtCore",
"PyQt5.QtGui",
@345161974
345161974 / answer_word_count.go
Created May 1, 2017 06:48 — forked from tetsuok/answer_word_count.go
An answer of the exercise: Maps on a tour of Go
package main
import (
"code.google.com/p/go-tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
m := make(map[string]int)
a := strings.Fields(s)
@345161974
345161974 / answer_pic.go
Created May 1, 2017 06:18 — forked from tetsuok/answer_pic.go
An answer of the exercise: Slices on a tour of Go
package main
import "code.google.com/p/go-tour/pic"
func Pic(dx, dy int) [][]uint8 {
// Allocate two-dimensioanl array.
a := make([][]uint8, dy)
for i := 0; i < dy; i++ {
a[i] = make([]uint8, dx)
}
package main
import (
"database/sql"
"gopkg.in/gorp.v1"
"log"
"strconv"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
@345161974
345161974 / splashscreen_demo_1.py
Created March 15, 2017 13:02
PyQt SplashScreen Demo
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import time
class Form(QDialog):
""" Just a simple dialog with a couple of widgets
"""
def __init__(self, parent=None):
super(Form, self).__init__(parent)
@345161974
345161974 / splashscreen_demo.py
Created March 15, 2017 12:33
PyQt splashscreen demo
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4 import QtCore, QtGui
import time
class Form(QDialog):
""" Just a simple dialog with a couple of widgets
"""
def __init__(self, parent=None):
super(Form, self).__init__(parent)
@345161974
345161974 / qtableview_demo.py
Created February 28, 2017 08:31
PyQt QTableView with CheckBox and Model Update demo code(PyQt 4.8.7, Python 3.4.3)
''' pqt_tableview3.py
explore PyQT's QTableView Model
using QAbstractTableModel to present tabular data
allow table sorting by clicking on the header title
used the Anaconda package (comes with PyQt4) on OS X
(dns)
'''
#coding=utf-8