Skip to content

Instantly share code, notes, and snippets.

View asimjalis's full-sized avatar

Asim Jalis asimjalis

View GitHub Profile
@asimjalis
asimjalis / transcribe_demo.ipynb
Created July 9, 2024 02:31
Code for "Learn Amazon Transcribe"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asimjalis
asimjalis / dbg.py
Last active February 9, 2020 22:41
Print Python Objects as JSON
import json
def dbg(obj,msg=""):
"Print nested data structures recursively for debugging."
def get_serializable(obj):
if hasattr(obj,"__dict__"):
return obj.__dict__
else:
return obj
print(msg, json.dumps(obj, default=get_serializable, sort_keys=True, indent=2))
@asimjalis
asimjalis / fast-clojure-hello-world-using-graal-vm.md
Last active March 14, 2019 12:42
How To Speed Up Clojure Hello World 100x Using GraalVM

How To Speed Up Clojure Hello World 100x Using GraalVM

Performance

Version Command Time (seconds)
Java time java -jar target/fastclj-1.0-standalone.jar 1.354
GraalVM time ./fastclj-1.0-standalone 0.014

Details

@asimjalis
asimjalis / deps.edn
Last active June 30, 2018 23:41 — forked from athos/deps.edn
Try `clojure -Sdeps '{:deps {hello-clojure {:git/url "https://gist.github.com/asimjalis/8ea6121fa652001546c6d6cbd713e301" :sha "1c9a05106171f97f9b8e8ac8f58c7bd8dbe021f9"}}}' -m hello-clojure` on your terminal
{:paths ["."]
:deps {clansi {:mvn/version "1.0.0"}}}

This is a test.

#!/bin/sh
# vim: filetype=sh
## Init.
# Define variables.
source_bucket=asimj-lambda-test
lambda_name=helloworld
lambda_execution_role_name=lambda-${lambda_name}-execution

Data Science Workshop

Moved to

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asimjalis
asimjalis / Spark Neural Network.ipynb
Created February 18, 2016 23:44
Spark Scala example of creating and using Neural Networks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asimjalis
asimjalis / spark-mllib-twitter.scala
Created January 27, 2016 21:52
Spark MLlib Twitter Quickstart
// Load tweets.
import scala.util.control.Breaks._
import scala.collection.JavaConversions._
import twitter4j.{Twitter,Query,TwitterFactory}
val twitter = TwitterFactory.getSingleton
val query = new twitter4j.Query("lang:en")
query.setCount(100)
query.setSince("2016-01-13")