Skip to content

Instantly share code, notes, and snippets.

@tjennings
tjennings / instructions.txt
Created April 25, 2023 04:06
Replacing cudnn libraries on ubuntu linux for improved performance on 4090 GPUs
Inspiration: https://www.reddit.com/r/StableDiffusion/comments/y71q5k/4090_cudnn_performancespeed_fix_automatic1111/
This document describes how to replace the libcudnn libs in an Ubuntu environment to improve the performance
of pytorch with 4090 GPUs.
Follow the standard nvidia cudatoolkit installation instructions using apt (do NOT use the runfile,
these instructions may not work). Instructions here: https://developer.nvidia.com/cuda-downloads
ensure your installation is functional. The following command should list your driver and cuda versions as well
as your specific GPU information.
@tjennings
tjennings / gist:5a5cfee29571d1a362b8da985751b81c
Created May 26, 2017 21:46
Treatment bucketing using consistent hashing
package com.jes.experiment;
import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation;
import org.apache.commons.math3.stat.descriptive.moment.Variance;
import java.nio.ByteBuffer;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.HashMap;
<?xml version="1.0" encoding="UTF-8"?>
<md:EntityDescriptor [-ID="_27cfcb2b12e216b283b5d84242dfec6d" entityID="https://go.edovo.com/sso/idp/metadata"-] {+ID="_b2f9d961067b59298b54f38e08aa5d05" entityID="https://corrections.edovo.com/sso/idp/metadata"+} xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference [-URI="#_27cfcb2b12e216b283b5d84242dfec6d"><ds:Transforms><ds:Transform-] {+URI="#_b2f9d961067b59298b54f38e08aa5d05"><ds:Transforms><ds:Transform+} Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod [-Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>n0LHQp+/M0K+ttmNO2/UU1WnVPk=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValu
diff --git a/common/src/main/java/com/jes/services/EventsProcessor.java b/common/src/main/java/com/jes/services/EventsProcessor.java
index 614c6f4..761ae19 100644
--- a/common/src/main/java/com/jes/services/EventsProcessor.java
+++ b/common/src/main/java/com/jes/services/EventsProcessor.java
@@ -7,6 +7,7 @@ import org.javalite.activejdbc.Base;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.sql.SQLException;
import java.util.concurrent.ConcurrentLinkedQueue;
(ns ml-jam.core
(:use clojure-csv.core))
(def training-data
(for [row (rest (parse-csv (slurp "./digitssample.csv")))]
(for [x row] ( Integer/parseInt x))))
(def check-data
(for [row (rest (parse-csv (slurp "./digitssample.csv")))]
(for [x row] ( Integer/parseInt x))))
def areUreturning
6%2
end
(ns fraud.detectors.bktree)
(defn root [distance-fn] {:distance-fn distance-fn :children {} :matches []})
(defn new-node [term] {:term term :children {} :matches []})
(defn empty-node? [node]
(= nil (:term node)))
(defn insert
(ns fraud.detectors.bktree)
(defn root [distance-fn] {:distance-fn distance-fn :children {} :matches []})
(defn new-node [term] {:term term :children {} :matches []})
(defn empty-node? [node]
(= nil (:term node)))
(defn insert
(ns bktree)
(defn root [distance-fn] {:distance-fn distance-fn :children {} :matches []})
(defn new-node [term] {:term term :children {} :matches []})
(defn insert
([element node]
(insert element node (:distance-fn node)))
([element node distance-fn]
(ns bktree)
(defn root [distance-fn] {:distance-fn distance-fn :children {} :matches []})
(defn new-node [term] {:term term :children {} :matches []})
(defn insert
([element node]
(insert element node (:distance-fn node)))
([element node distance-fn]