Skip to content

Instantly share code, notes, and snippets.

Avatar
😅
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 https://pypi.python.org/simple/PyOpenGL/
URLs to search for versions for PyOpenGL:
* https://pypi.python.org/simple/PyOpenGL/
Analyzing links from page https://pypi.python.org/simple/pyopengl/
Skipping link https://pypi.python.org/packages/2.4/P/PyOpenGL/PyOpenGL-3.0.0a5-py2.4.egg#md5=cbeb31ba956718619861606475baafab (from https://pypi.python.org/simple/pyopengl/); unknown archive format: .egg
Skipping link https://pypi.python.org/packages/2.5/P/PyOpenGL/PyOpenGL-3.0.0a5-py2.5.egg#md5=6e78974653066d08b0e1957fb7b21d2d (from https://pypi.python.org/simple/pyopengl/); unknown archive format: .egg
Skipping link https://pypi.python.org/packages/any/P/PyOpenGL/PyOpenGL-3.0.1.win32.exe#md5=513cc194af65af4c5a640cf9a1bd8462 (from https://pypi.python.org/simple/pyopengl/); unknown archive format: .exe
View base.html
{% load cms_tags staticfiles sekizai_tags menu_tags %}
<!DOCTYPE html>
<html>
<head>
<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="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
</head>
View page.html
{% extends "base.html" %}
{% load cms_tags staticfiles sekizai_tags menu_tags %}
{% block content %}
<div>
{% placeholder "content" %}
</div>
{% endblock content %}
View gist:de84d873addbccc7210f
โฟลเลอร์หลัก\
cal\
__init__.py
cal.py
setup.py
View HAPPY_NEW_YEAR.py
# code from https://github.com/peterbrittain/asciimatics/blob/master/samples/fireworks.py
from asciimatics.effects import Stars, Print
from asciimatics.particles import RingFirework, SerpentFirework, StarFirework, \
PalmFirework
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
wannaphong / 1.py
Created Apr 17, 2016
ตัวอย่างการใช้งาน NEURON กับ Python
View 1.py
# 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('neuron_example.py')
#
# - E. Muller 03.2009.
View epub-embed-fonts.py
#!/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
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">
<rootfiles>
<rootfile media-type="application/oebps-package+xml" full-path="content.opf"/>
</rootfiles>
</container>
@wannaphong
wannaphong / xor.py
Created Jan 22, 2017 — forked from stewartpark/xor.py
Simple XOR learning with keras
View xor.py
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))