This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author = "Nathan" | |
# bingo.py | |
import wx | |
import sys | |
''' VARIABLES ''' | |
# list of goals in a typical bingo row | |
goals = ['goal1','goal2','goal3','goal4','goal5'] | |
ID_NEW_ROW = 100 | |
ID_EXIT = 101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Nathan' | |
import socket | |
import string | |
import sys | |
# for debugging purposes | |
debug = True | |
# connect variables | |
owner = "neutrondude" | |
server = "irc.twitch.tv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// one should rename this file to assign9.java before trying to compile it | |
public class assign9 { | |
public static void main(String[] args) { | |
// assignment question number | |
int questionNumber = 3; | |
// bounds for bisection methods | |
double jMin = 0.001; | |
double jMax = 0.500; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Math; | |
public class stats285 { | |
public static void main(String[] args) { | |
// pass | |
} | |
} | |
class methods { | |
public static double variance(sample) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# return true if the number is prime | |
def isPrime(num): | |
# 1,2,3 are prime | |
if (num>3): | |
# only check the odd numbers | |
if (num%2 == 0): | |
return False | |
else: | |
for i in range(3, (num/2)+1, 2): | |
if (num%i) == 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### SET UP CONSOLE, WORKSPACE AND OUTPUT #### | |
rm(list=ls()); cat("\014"); options(warn=-1); exportHtml = TRUE | |
if (exportHtml==FALSE) { graphics.off(); plotDims=c(2,2); par(mfrow=plotDims) } | |
#### vars #### | |
A = 0.00022 | |
B = 2.5e-05 | |
c = 1.1 | |
l20 = 1e+05 | |
x = 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cmpt 130, Assignment 4 | |
* | |
* @author Nathan Esau (nesau@sfu.ca) | |
* @date 2014-03-14 21:26:18 | |
* @version 1.0 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cmpt 130, Assignment 3 | |
* | |
* @author Nathan Esau (nesau@sfu.ca) | |
* @date 2014-03-15 11:46:02 | |
* @version 1.0 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cmpt 130, Assignment 4 | |
* | |
* @author Nathan Esau (nesau@sfu.ca) | |
* @date 2014-03-14 21:26:18 | |
* @version 1.1 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
void brute_force_test(); | |
int is_permutation(int arr[], int n); | |
int* reverse(int *arr, int n); | |
int score(int arr[], int n); | |
void print(int arr[], int n); | |
int* make_perm(int n); | |
int factorial(int n); |
OlderNewer