Skip to content

Instantly share code, notes, and snippets.

View wannaphong's full-sized avatar
🧭
out-of-time

Wannaphong Phatthiyaphaibun wannaphong

🧭
out-of-time
View GitHub Profile
# -*- 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
------------------------------------------------------------
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
{% 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>
{% extends "base.html" %}
{% load cms_tags staticfiles sekizai_tags menu_tags %}
{% block content %}
<div>
{% placeholder "content" %}
</div>
{% endblock content %}
โฟลเลอร์หลัก\
cal\
__init__.py
cal.py
setup.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 April 17, 2016 06:43
ตัวอย่างการใช้งาน 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('neuron_example.py')
#
# - 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
wannaphong / container.xml
Created January 8, 2017 11:12 — forked from avinassh/container.xml
Create EPUB files with Python
<?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 January 22, 2017 05:09 — forked from stewartpark/xor.py
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))