Skip to content

Instantly share code, notes, and snippets.

@renyuanL
renyuanL / ry20_dodger_v1.py
Created May 9, 2015 19:30
這是剛學 python 及 pygame 時寫的程式。主要是修改 Al Sweigart 第一本 pygame 書中的 Ch20 的範例程式。
'''
ry20_dodger_v1.py
這是剛學 python 及 pygame 時寫的程式。
已經大約4年前了。
主要是修改 Al Sweigart 第一本 pygame 書中的 Ch20 的範例程式。
dodger.py
執行時需要使用下列4個多媒體檔案:
@renyuanL
renyuanL / ryBinCum.py
Last active August 29, 2015 14:18
Binomial 的累積機率 (Cumulative Probability) 列表
'''
ryBinCum.py
Binomial 的累積機率 (Cumulative Probability) 列表
目的:
# 寫出 計算出 課本 p. 355 ~ p. 359
# 有關 binomial 的
#
@renyuanL
renyuanL / ryA2.py
Created March 25, 2015 08:40
a homework @ CSIE/CGU 2015, Python class
'''
ryA2.py
a homework, deadline= 2015/04/10
A2 Problem Domain: Deoxyribonucleic Acid (DNA)
http://spark-public.s3.amazonaws.com/programming1/a2/a2.html
author: Renyuan Lyu
@renyuanL
renyuanL / tc_bytedesign.py
Last active August 29, 2015 14:14
a set of 18 Python Turtle Graphic Programs in Traditional Chinese
#!/usr/bin/env python3
'''龜例如套房:
        tdemo_bytedesign.py
改編自例子套房為例
對PythonCard的烏龜圖形。
它是基於在BYTE雜誌上的一篇文章
問題解決標誌:使用海龜
@renyuanL
renyuanL / ryByteDesign003_tc.py
Last active August 29, 2015 14:11
a small set of programs in Chinese to demo Turtle Graphics
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
ryByteDesign003_tc.py
'''
#from turtle import Turtle, mainloop
from turtle_tc import 龜類, 主迴圈
class 設計師類(龜類):
@renyuanL
renyuanL / ryCamera.py
Last active March 8, 2016 06:37 — forked from amueller/mlp.py
This program use 4 types of classifiers to do classification task of MNist Database.
#!/usr/bin/env python3
'''
ryCamera.py
using pygame's camera module
you can capture a picture from the camera
and then it is possible
to make MNist task become real-time system
Renyuan, 2014/12/12
@renyuanL
renyuanL / rySudoku01.py
Created November 5, 2014 20:26
Super Simple Sudoku Solver in Python
'''
rySudoku01.py
Super Simple Sudoku Solver in Python
http://code.activestate.com/recipes/578140-super-simple-sudoku-solver-in-python-source-code/
Takes a partially filled in grid, inserts the min value in a cell (could be a random cell, in this case the first free cell).
If the min value is not legal it will increment until the max value is reached (number 9), checking each time if the incremented value is legal in that cell (ie does not clash with any already entered cells in square, col or row).
@renyuanL
renyuanL / hi.py
Created November 2, 2014 16:00
ryClass04
# hi.py
# An example of how to use your turtle_font module
from turtle import *
import turtle_font
# change to an actual turtle
shape("turtle")
# change line width
'''
ryClass03.py
solve 2-variable linear equation
a x + b y = c
d x + e y = f
x = ?
y = ?
'''
ryOlmp2013_01.py
呂仁園,2014/08/27
----------------------------
第一題:拼字問題
執行時間: 1 秒