Skip to content

Instantly share code, notes, and snippets.

View jeremychone's full-sized avatar

Jeremy Chone jeremychone

View GitHub Profile
@jeremychone
jeremychone / Json.swift
Last active August 29, 2015 14:23
Simple and convenient Json wrapper for the AnyObject returned by NSJSONSerialization
import Foundation
//
// Json.swift
//
// Simple and convenient JSON wrapper of a AnyObject returned by the NSJSONSerialization parser.
//
// NEXT: probably want to split the promise (done/fail) from the future part (the resolve/reject)
//
// Jeremy Chone 2015-06-21
// test
var math = {
base: 0,
add: add
};
function add(a, b) {
return this.base + a + b;
}
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"plugins": ["react"],
"extends": ["eslint:recommended","plugin:react/recommended"],
## Tutorial >> https://www.tensorflow.org/get_started/mnist/beginners
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
## https://github.com/tensorflow/tensorflow/issues/7778
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
const router = require('cmdrouter');
const fs = require('fs-extra');
const yamljs = require('yamljs');
const jsyaml = require('js-yaml');
// USAGE:
// `node yaml-vs-json-perf write` to create the data data yaml and data.json files, and stringify perf measure.
// `node yaml-vs-json-perf read` to perf measure the parsing.
// Place your key bindings in this file to overwrite the defaults
[
// ------ Terminal --------- //
{
"key": "ctrl+alt+l",
"command": "workbench.action.terminal.focusNext"
},
{
"key": "ctrl+alt+k",
"command": "workbench.action.terminal.focusPrevious"
// test
var math = {
base: 0,
add: add
};
function add(a, b) {
return this.base + a + b;
}
@jeremychone
jeremychone / rust-xp-01-s3.rs
Last active April 13, 2024 16:39
Rust Quick Example to connect to S3 and Minio bucket server
#![allow(unused)] // silence unused warnings while exploring (to comment out)
use std::{error::Error, str};
use s3::bucket::Bucket;
use s3::creds::Credentials;
use s3::region::Region;
use s3::BucketConfiguration;
// Youtube Walkthrough - https://youtu.be/uQKBW8ZgYB8
@jeremychone
jeremychone / rust-xp-02-postgresql-sqlx.rs
Created May 11, 2021 05:48
Rust to PostgreSQL with SQLX | Rust By Example
#![allow(unused)] // silence unused warnings while exploring (to comment out)
use sqlx::postgres::{PgPoolOptions, PgRow};
use sqlx::{FromRow, Row};
// Youtube episode: https://youtu.be/VuVOyUbFSI0
// region: Section
// Start postgresql server docker image: