Skip to content

Instantly share code, notes, and snippets.

View crockpotveggies's full-sized avatar
🥕
carrot

Justin Long crockpotveggies

🥕
carrot
View GitHub Profile
@crockpotveggies
crockpotveggies / wide_opt_chain_3000.v
Created April 27, 2026 20:35
Wide Opt Chain Verilog for benchmarking
module top(input [31:0] a, b, c, d, input [7:0] sel, output [31:0] y);
wire [31:0] w0;
wire [31:0] w1;
wire [31:0] w2;
wire [31:0] w3;
wire [31:0] w4;
wire [31:0] w5;
wire [31:0] w6;
wire [31:0] w7;
wire [31:0] w8;
@crockpotveggies
crockpotveggies / modify_exif.py
Created December 9, 2024 23:06
Modify exif data to match album year
import os
import re
from datetime import datetime
import subprocess
def extract_date_from_folder(folder_name):
"""Extracts a date in the format YYYY-MM-DD, YYYY-MM, or YYYYs from a folder name."""
# Match full date YYYY-MM-DD
match_full = re.match(r"^(\d{4})-(\d{2})-(\d{2})", folder_name)
if match_full:
@crockpotveggies
crockpotveggies / docker-compose.kafka.yml
Created May 26, 2021 20:14
Run Kafka in one command using docker-compose
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
hostname: zookeeper
container_name: zookeeper
ports:
- '2181:2181'
environment:
ZOOKEEPER_CLIENT_PORT: '2181'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@crockpotveggies
crockpotveggies / canada-provinces.json
Created March 16, 2020 21:37
GeoJSON of Canada's individual provinces
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@crockpotveggies
crockpotveggies / canada-healthregions.json
Last active April 7, 2020 06:04
GeoJSON of Canada's Health Regions and Authorities
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import org.apache.commons.io.FileUtils;
import org.datavec.api.records.reader.SequenceRecordReader;
import org.datavec.api.records.reader.impl.csv.CSVSequenceRecordReader;
import org.datavec.api.split.NumberedFileInputSplit;
import org.deeplearning4j.api.storage.StatsStorage;
import org.deeplearning4j.arbiter.ComputationGraphSpace;
import org.deeplearning4j.arbiter.conf.updater.SgdSpace;
import org.deeplearning4j.arbiter.layers.LSTMLayerSpace;
import org.deeplearning4j.arbiter.layers.OutputLayerSpace;
import org.deeplearning4j.arbiter.optimize.api.OptimizationResult;
@crockpotveggies
crockpotveggies / sort-cifar.js
Last active December 14, 2018 07:43
NodeJS script to sort CIFAR-10 dataset of PNGs into label directories
var fs = require('fs')
var labels = fs.readFileSync('labels.txt', 'utf-8')
.split('\n')
.filter(Boolean);
/*for(i = 0; i < labels.length; i++) {
fs.mkdirSync("./train/"+i);
fs.mkdirSync("./test/"+i);
}*/
@crockpotveggies
crockpotveggies / install-apache-maven-3.3.9.sh
Created April 12, 2018 01:33 — forked from miroslavtamas/install-apache-maven-3.3.9.sh
Install Apache Maven 3.3.9 on CentOS
#!/bin/sh
wget http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
tar xzf apache-maven-3.3.9-bin.tar.gz
sudo mkdir /usr/local/maven
sudo mv apache-maven-3.3.9/ /usr/local/maven/
sudo alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn 1
sudo alternatives --config mvn