Skip to content

Instantly share code, notes, and snippets.

View ProfAvery's full-sized avatar

Kenytt Avery ProfAvery

  • California State University, Fullerton
  • Fullerton, CA
View GitHub Profile
@ProfAvery
ProfAvery / .gitignore
Last active October 8, 2020 09:04
POSIX Multithreading Example
burncpu
multithread
mutex
semaphore
@ProfAvery
ProfAvery / onethread.cpp
Created September 22, 2020 23:24
C++ variant of Figure 4.11
#include <cstdlib>
#include <iostream>
#include <pthread.h>
using std::cout;
using std::cerr;
using std::endl;
// Don't forget to compile with -pthread
@ProfAvery
ProfAvery / Basic Linear Regression.ipynb
Created September 11, 2020 16:08
Linear Regression with scikit-learn on the Olympic men's 100m dataset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ProfAvery
ProfAvery / forking.cpp
Created September 16, 2020 06:55
C++ variant of Figure 3.8
#include <cstdlib>
#include <iostream>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
using std::cout;
using std::cerr;
using std::endl;
@ProfAvery
ProfAvery / grandparent.cpp
Created September 16, 2020 06:51
In-class Exercise: Parent and Child Processes
#include <cstdlib>
#include <iostream>
#include <sys/wait.h>
#include <unistd.h>
using std::cout;
using std::endl;
int main()
@ProfAvery
ProfAvery / info.cpp
Created September 9, 2020 06:45
In-class Exercise: Linux Programmer's Manual
#include <cstdlib>
#include <iostream>
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
using std::cout;
using std::endl;
@ProfAvery
ProfAvery / logging.ini
Created June 20, 2020 09:18
Simple logging configuration for Python
#
# Simple logging configuration for Python
#
# NOTE: Don't add spaces between comma-separated lists in this file
#
[DEFAULT]
filename = 'output.log'
[loggers]
@ProfAvery
ProfAvery / config1.py
Created April 8, 2020 14:16
Flask-Dynamo configuration fixes
app.config['DYNAMO_TABLES'] = [
dict(
TableName='users',
KeySchema=[dict(AttributeName='username', KeyType='HASH')],
AttributeDefinitions=[dict(AttributeName='username', AttributeType='S')],
ProvisionedThroughput=dict(ReadCapacityUnits=5, WriteCapacityUnits=5)
), dict(
TableName='groups',
KeySchema=[dict(AttributeName='name', KeyType='HASH')],
AttributeDefinitions=[dict(AttributeName='name', AttributeType='S')],
@ProfAvery
ProfAvery / data.csv
Last active February 14, 2020 01:27
Skeleton code for in-class exercise
1 6
2 6
3 10
4 12
@ProfAvery
ProfAvery / hebb.py
Last active February 10, 2020 02:26
Hebb Net example - Character recognition
#!/usr/bin/env python3
# Hebb Net example - Character recognition
#
# See Fausett, Example 2.8, pp. 55-56
#
TRAINING_X = [
'#...#',
'.#.#.',