Skip to content

Instantly share code, notes, and snippets.

Learning PhD from home

Wannaphong Phatthiyaphaibun wannaphong

Learning PhD from home
View GitHub Profile
View gist:aa037e92368b61495be6
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'u.ui'
# Created: Mon Aug 25 21:48:20 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
# WARNING! All changes made in this file will be lost!
import sys
from PySide import QtCore, QtGui
View gist:bf75ecdd6542d2b37d48
C:\Python34\Scripts\pip run on 09/07/14 11:54:21
Downloading/unpacking PyOpenGL
Getting page
URLs to search for versions for PyOpenGL:
Analyzing links from page
Skipping link (from; unknown archive format: .egg
Skipping link (from; unknown archive format: .egg
Skipping link (from; unknown archive format: .exe
View base.html
{% load cms_tags staticfiles sekizai_tags menu_tags %}
<!DOCTYPE html>
<title>{% block title %}This is my new project home page{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% render_block "css" %}
<link rel="stylesheet" href="//">
<link rel="stylesheet" href="//">
View page.html
{% extends "base.html" %}
{% load cms_tags staticfiles sekizai_tags menu_tags %}
{% block content %}
{% placeholder "content" %}
{% endblock content %}
View gist:de84d873addbccc7210f
# code from
from asciimatics.effects import Stars, Print
from asciimatics.particles import RingFirework, SerpentFirework, StarFirework, \
from asciimatics.renderers import SpeechBubble, FigletText, Rainbow
from asciimatics.scene import Scene
from asciimatics.screen import Screen
from asciimatics.exceptions import ResizeScreenError
from random import randint, choice
import sys
wannaphong /
Created Apr 17, 2016
ตัวอย่างการใช้งาน NEURON กับ Python
# The python version of the legacy NEURON tutorial
# The model consists of an axon and soma with HH channels
# and 3 passive dendrite cones.
# Start with
# $ nrngui -python
# >>> execfile('')
# - E. Muller 03.2009.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import zipfile
from BeautifulSoup import BeautifulSoup, Tag # Better for HTML
from lxml import etree # Better for XML
wannaphong / container.xml
Created Jan 8, 2017 — forked from avinassh/container.xml
Create EPUB files with Python
View container.xml
<?xml version='1.0' encoding='UTF-8'?>
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
<rootfile media-type="application/oebps-package+xml" full-path="content.opf"/>
wannaphong /
Created Jan 22, 2017 — forked from stewartpark/
Simple XOR learning with keras
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation
from keras.optimizers import SGD
import numpy as np
X = np.array([[0,0],[0,1],[1,0],[1,1]])
y = np.array([[0],[1],[1],[0]])
model = Sequential()
model.add(Dense(8, input_dim=2))