Skip to content

Instantly share code, notes, and snippets.

View rjlutz's full-sized avatar

Bob Lutz rjlutz

  • Georgia Gwinnett College
  • Lawrenceville, GA
View GitHub Profile
@rjlutz
rjlutz / # mumps - 2018-03-06_00-14-37.txt
Created March 6, 2018 05:22
mumps (udacity/carnd-mpc-project/mumps) on macOS 10.13.3 - Homebrew build logs
Homebrew build logs for udacity/carnd-mpc-project/mumps on macOS 10.13.3
Build date: 2018-03-06 00:14:37
@rjlutz
rjlutz / detect.py
Last active March 19, 2024 00:47
Starter code and data files for neural net / python practice assignment
## modified from:
## https://github.com/miloharper/simple-neural-network and
## https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1
## thanks!
import csv
from numpy import exp, array, random, dot
class NeuralNetwork():
def __init__(self):
@rjlutz
rjlutz / BubbleSort.java
Last active November 10, 2017 17:15
Sorting and Searching (Chapter 23) -- examples from Liang Intro to Java Comprehensive 10e
public class BubbleSort {
/** Bubble sort method */
public static void bubbleSort(int[] list) {
boolean needNextPass = true;
for (int k = 1; k < list.length && needNextPass; k++) {
// Array may be sorted and next pass not needed
needNextPass = false;
for (int i = 0; i < list.length - k; i++) {
if (list[i] > list[i + 1]) {
@rjlutz
rjlutz / 1 notes
Last active April 1, 2018 13:46
Bike and Barge notes and text bits
add drawables
add to strings (can use translations or copy/paste)
create a new TableLayout underlayouts called photos.xml
add rows (can be found below)
create a new LinearLayout underlayouts called tours.xml
add stuff (can be found below)
@rjlutz
rjlutz / Circle.java
Last active June 25, 2019 21:04
Lists, Stacks, Queues and Priority Queues (Chapter 20) -- examples from Liang Intro to Java Comprehensive 10e
public class Circle extends GeometricObject {
private double radius;
public Circle() {
}
public Circle(double radius) {
this.radius = radius;
}
@rjlutz
rjlutz / AnyWildCardDemo.java
Created October 19, 2017 19:07
Java Generics (Chapter 19) -- examples from Liang Intro to Java Comprehensive 10e
public class AnyWildCardDemo {
public static void main(String[] args ) {
GenericStack<Integer> intStack = new GenericStack<Integer>();
intStack.push(1); // 1 is autoboxed into new Integer(1)
intStack.push(2);
intStack.push(-2);
print(intStack);
}
@rjlutz
rjlutz / ComputeFactorial.java
Created October 12, 2017 18:27
Abstract Classes and Interfaces (Chapter 18) -- examples from Liang Intro to Java Comprehensive 10e
import java.util.Scanner;
public class ComputeFactorial {
/** Main method */
public static void main(String[] args) {
// Create a Scanner
Scanner input = new Scanner(System.in);
System.out.print("Enter a non-negative integer: ");
int n = input.nextInt();
@rjlutz
rjlutz / PixabayResult.java
Created October 10, 2017 22:09
Pixabay starter code
package edu.ggc.lutz.pixabayretrofit;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
@rjlutz
rjlutz / gist:4e2a84bf3000e5364dd4cb022750623e
Created October 10, 2017 22:02
fixerIO with retrofit notes
capture json from curl or postman, like
{
"base": "USD",
"date": "2017-10-10",
"rates": {
"CAD": 1.2499,
...
...
}
}
@rjlutz
rjlutz / Circle.java
Last active April 28, 2023 11:41
Abstract Classes and Interfaces (Chapter 13) -- examples from Liang Intro to Java Comprehensive 10e
public class Circle extends GeometricObject {
private double radius;
public Circle() {
}
public Circle(double radius) {
this.radius = radius;
}