Skip to content

Instantly share code, notes, and snippets.

View usametov's full-sized avatar

Ulan Sametov usametov

  • Asta Nova Enterprise Solutions
View GitHub Profile
@usametov
usametov / bubbles.pde
Created November 25, 2020 11:55 — forked from schalkneethling/bubbles.pde
Make bubble arrays, and art with Processing
/*
* Creative Coding
* Week 1, 02 - Draw your name! (part 2)
* by Indae Hwang and Jon McCormack
* Updated 2016
* Copyright (c) 2014-2016 Monash University
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@usametov
usametov / Bubble.pde
Created November 25, 2020 11:58 — forked from 0xLeon/Bubble.pde
Bubbles Processing
class Bubble {
float x = random(0, width);
float y = height;
void zeichnung() {
fill(0, 200, 220);
stroke(0, 127, 220);
ellipse(x, y, 20, 20);
}
@usametov
usametov / data-vis-using-clojisr.md
Created December 10, 2020 20:18
Tutorial showcasing the usage of the ClojisR library to visualize data in Clojure

Data Visualization in Clojure using ggplot2 from R

We'll be using the ClojisR library to visualize data in Clojure. This library is a Clojure-R interop and it allows us to call R functions on R objects in Clojure.

Usage requirements

Before starting ensure that you have the following installed on your computer:

  • JDK 1.8 or later
  • Clojure 1.9.0 or later
  • R
@usametov
usametov / core.clj
Created December 15, 2020 03:29 — forked from Jeiwan/core.clj
Custom log4j appender in Clojure
(ns woof.core
(:gen-class)
(:require [clojure.tools.logging :as log])
(:import StringAppender))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(log/info "Hello, world!")
(println "Done")
@usametov
usametov / clipboard.clj
Created February 1, 2021 03:49 — forked from baskeboler/clipboard.clj
Write pretty printed Clojure data structures to the clipboard
(ns clipboard.core
(:require [clojure.pprint :refer [pprint]])
(:import (java.awt.datatransfer DataFlavor Transferable StringSelection)
(java.awt Toolkit)
(java.io StringWriter))
(defn get-clipboard
"get system clipboard"
[]
(-> (Toolkit/getDefaultToolkit)
@usametov
usametov / vidwiz.clj
Created February 3, 2021 22:47 — forked from adam-james-v/vidwiz.clj
Clojure/babashka script to help automate some of my video editing pipeline
#!/usr/bin/env bb
(ns vidwiz.main
"This is a prototype script for automating a portion of my video editing using ffmpeg."
(:require [clojure.java.shell :refer [sh]]
[clojure.string :as st]))
;; util
(defn get-extension
[fname]
(ns talk
(:require [overtone.core :refer :all]
[clojure.java.io :as io]
[clj-http.client :as http]
[clojure.test :as test]))
(def talk
{:title "Sequencing dance music with Clojure"
:author "Piotr Jagielski"
:company {:name "TouK" :what "Software house" :from "Warsaw, Poland"}
(ns talk
(:require [overtone.core :refer :all]
[clojure.java.io :as io]
[clj-http.client :as http]
[clojure.test :as test]))
(def talk
{:title "Sequencing dance music with Clojure"
:author "Piotr Jagielski"
:company {:name "TouK" :what "Software house" :from "Warsaw, Poland"}
@usametov
usametov / instaparse.clj
Created April 4, 2021 01:35 — forked from taylorwood/instaparse.clj
Clojure Instaparse examples
;; "human" date/time format parsing
(def human-time-parser
(insta/parser
"S = H (':' M)? ' '? P? (' ' Z)?
H = #'[1-9]' | #'1[0-2]'
M = #'0[0-9]' | #'[1-5][0-9]'
P = AM | PM
AM = 'A' 'M'?
PM = 'P' 'M'?
@usametov
usametov / Docker
Last active April 16, 2021 21:26 — forked from mitchwongho/Docker
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
# without the /bin/ part
docker run -it ubuntu bash
# nothing else but bash...
docker run -it bash
#if image has a defined ENTRYPOINT. For these cases use:
docker run -it --entrypoint /bin/bash <image>