Introduction copy
Chapter 1
WHY ARE WE INTERESTED IN PROGRAMMING LANGUAGES?
Because w modern machines we must use programming languages
Programming using punch cards
hexadecimal keyboard for older com
import numpy as np
import matplotlib.pyplot as plt
n
X
Y
T
=
=
=
=
1024
np.random.normal(0, 1, n)
np.random.normal(0, 1, n)
np.arctan2(Y, X)
plt.axes([0.025, 0.025, 0.95, 0.95])
plt.scatter(X, Y, s=75
RMSC4002 SAS notes
Chapter 4
Principal component analysis
In the Interactive Data Analysis module, there is a Multivariate option contains many
multivariate procedures including PCA. We illustrate the
RMSC4002 SAS notes
Chapter 7
Neural Network Model
In this chapter, we explain how to build Artificial Neural Network in EM. Let us
continue with the fin-ratio.csv or start a new project by importing f
RMSC4002 SAS notes
Chapter 6
Decision Trees
The notes explain how to use Decision Tree in Enterprise Miner. Using fin-ratio.csv as an
example, we read in the fin-ratio.csv dataset using File->Import d
RMSC4002 SAS notes
Chapter 5
Logistic regression
The notes explain how to use Decision Tree in Enterprise Miner. using fin-ratio1.csv as
an example. First we read in the fin-ratio.csv dataset using Fi
RMSC4002 SAS notes
Chapter 2
Autoreg procedure and GARCH model fitting
There is GARCH model fitting in the Autoreg procdure in SAS. This procedure is used
to fit linear regression model for time serie
RMSC4002 SAS notes
Chapter 1
Plotting Time Series and Normal QQ plot
The notes will briefly introduce how to use SAS software. The first step is to install SAS
on your computer. When the software inst
Notes 5
Models for Non-stationary Time Series:
In Notes 4, the time series we studied are all stationary processes. However, in practice,
a lot of useful time series are nonstationary. At present, we
NOTES 3
Trends of a time series:
Deterministic versus Stochastic Trends
Examples:
yt = at 0.5at1 where at N (0, a2 );
yt = 0 + 1 t + 2 t2 ;
Purely Stochastic.
Purely Deterministic
yt = 0 + 1 t + 2 t2
NOTES 4
Models for Stationary Time Series:
General Linear Processes
A general linear process cfw_Zt is one that can be represented as a weighted linear combination of the present and past terms of a
NOTES 2
Stochastic Process and Time Series:
Definition: A stochastic process is a family of random variables cfw_Zt , t T . T is
thought of as representing time. If T is an interval, then the process
Notes 3 - Supplementary
1. To obtain the least squares estimates for simple linear regression model
For simple linear regression model
Yi = 0 + 1 Xi + i ,
i = 1, ., n,
to obtain 1 and 0 which minimizi
Pumping Lemma?
Regular or not?
Minimization of FA
Examples on Pumping Lemma and
Minimization of DFA
Zhao Qiao
[email protected]
Department of Computer Science & Engineering
The Chinese University
Fall 2011
The Chinese University of Hong
Kong
CSCI 3130: Automata theory and formal languages
NFA to DFA conversion
and regular expressions
Andrej Bogdanov
http:/www.cse.cuhk.edu.hk/~andrejb/cs
c3130
Theory of Computation
Midterm Exam.
Fall 2002 (YEN)
Name:
.
I.D.#:
.
1. (30 pts) True or false (mark O for true; X for false). (Score=Maxcfw_0, Right- 12 Wrong.)
(1) X If L1 is regular and L2 L1 , the
'
Created on 3 Jul 2015
@author: cslui
'
# read string input from console
name = raw_input ("What is your name? ")
city = raw_input("Which City you live in? ")
print "Welcome", name, ", you are living
import numpy as np
import matplotlib.pyplot as plt
n = 20
Z = np.ones(n)
Z[-1] *= 2
plt.axes([0.025, 0.025, 0.95, 0.95])
plt.pie(Z, explode=Z*.05, colors = ['0' % (i/float(n) for i in range(n)])
plt.a
import numpy as np
import matplotlib.pyplot as plt
X = np.linspace(-np.pi, np.pi, 256, endpoint=True)
C, S = np.cos(X), np.sin(X)
plt.plot(X, C)
plt.plot(X, S)
plt.show()
TECH REPORT 2009
1
Visualization of Exception Handling Constructs
to Support Program Understanding
Hina Shah, Carsten Gorg,
and Mary Jean Harrold
Abstract
This paper presents a new visualization techn
Scheme
Textbook, Sections 13.1 13.3, 13.7
1
Functional Programming
Based on mathematical functions
Take argument, return value
Only function call, no assignment
Functions are first-class values
E.
OO Language Comparison
Textbook Chapter 9
https:/en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java
https:/en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B
Language Specs, Primers on Course Web
CSC 4101: Programming Languages
Gerald Baumgartner
[email protected]
Introduction
Textbook, Chapter 1
2
Why Are We Interested in
Programming Languages?
Whats the alternative?
Programming in machine code
Homework 4
CSC 4101, Fall 2015
Due: 19 November 2015
1. (10 pts)
Show the run-time stack with all activation record instances, including static and dynamic chains,
when execution reaches position 1 in
0001 CKH HOLDINGS
0002 CLP HOLDINGS
0003 HK & CHINA GAS
0004 WHARF HOLDINGS
0005 HSBC HOLDINGS
0006 POWER ASSETS
0007 HOIFU ENERGY
0008 PCCW
0009 NINE EXPRESS
0010 HANG LUNG GROUP
0011 HANG
'
Created on 3 Jul 2015
@author: cslui
'
# introduction to "conditions" and "loops"
#ask people how tall they are (in inches)
height = input("How tall are you (in inches)?: ")
if height > 80:
print "W