Skip to content

Instantly share code, notes, and snippets.

View JohnLockwood's full-sized avatar
💭
Organizing repos 🔢

John Lockwood JohnLockwood

💭
Organizing repos 🔢
View GitHub Profile
@JohnLockwood
JohnLockwood / iris-revised.csv
Created January 30, 2023 16:37
Iris data set alternate
sepal_length sepal_width petal_length petal_width species
5.1 3.5 1.4 0.2 Iris-setosa
4.9 3.0 1.4 0.2 Iris-setosa
4.7 3.2 1.3 0.2 Iris-setosa
4.6 3.1 1.5 0.2 Iris-setosa
5.0 3.6 1.4 0.2 Iris-setosa
5.4 3.9 1.7 0.4 Iris-setosa
4.6 3.4 1.4 0.3 Iris-setosa
5.0 3.4 1.5 0.2 Iris-setosa
4.4 2.9 1.4 0.2 Iris-setosa
@JohnLockwood
JohnLockwood / iris.csv
Created January 30, 2023 15:02
iris data set
sepal_length sepal_width petal_length petal_width species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
@JohnLockwood
JohnLockwood / gspread_dataframe_demo.ipynb
Created March 8, 2022 21:05
gspread_dataframe demo for CodeSolid article
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JohnLockwood
JohnLockwood / 100-days-of-commits.md
Created December 11, 2021 07:17
100 Days of Commits (Experimental)

100 Days of commits

@JohnLockwood
JohnLockwood / ami_lookup.py
Created May 18, 2018 20:25
Given an AWS AMI ID and a region where that AMI is found, create a RegionMap for use with Amazon CloudFormation. Dependencies pip install boto3 pip install docopt
"""AMI Lookup.
Given an AWS AMI ID and a region where that AMI is found, create a RegionMap
for use with Amazon CloudFormation.
Note it assumes your AWS credentials are set up according to the boto3 guide.
http://boto3.readthedocs.io/en/latest/guide/configuration.html.
TODO more error handling etc
@JohnLockwood
JohnLockwood / MyStepName.java
Last active December 4, 2017 13:43
Help Button for Pentaho PDI Custom Step Dialog
public class MyStepNameDialog extends BaseStepDialog implements StepDialogInterface {
// ...
/*
This example shows how to implement a help button in a PDI custom step dialog. This assumes
that you're including a docs directory in your deployment zip, with a help file in HTML format
named "MyStepName.html"
/*
Well yes, this is awfully basic, but the real point is to see if we can embed it in
a Wordpress site and retain the syntax highlighting.
*/
public class HelloWorld {
public static void main(String [] args) {
System.out.println("Hello world");
}
}
#
# A proof of concept for an alternative to Flask-restful that supports GET (for an id) and GET (for a list of objects) on the same
# object -- not to mention POST (don't-know-the-id-yet) and PUT (sure I do).
#
# Usage in the file that defines the Blueprint looks like:
# api_v1_root = '/api/v1'
# v1_api = Blueprint('api/v1', __name__, url_prefix=api_v1_root)
# poc = ProofOfConcept("/poc")
# poc.register_routes(v1_api)
@JohnLockwood
JohnLockwood / index.xhtml
Last active August 29, 2015 14:16
Just a preliminary index page for a JSF demo site.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>JavaCodeGeeks</title>
</h:head>
<h:body>
<p><h:outputText value="#{helloWorldBean.msg}"/></p>
@JohnLockwood
JohnLockwood / gist:f4889418071b8d13afb4
Created February 28, 2015 12:09
Primefaces starter pom based on maven archetype -- bash script
mvn archetype:generate \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-webapp \
-DgroupId=com.codesolid.primefaces \
-DartifactId=pom1