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
(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 / 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]
@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 / 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 / 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 / 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 / bubble-pop.pde
Created November 25, 2020 11:57
bubble-pop processing
Bubble b1;
void setup() {
size(640, 360);
b1 = new Bubble(50);
}
void draw() {
background(0);
@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 / 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
#replace for-loop, all iterables in Python can be used in a list comprehension.
full_name = "Yang Zhou"
characters = [char for char in full_name]
print(full_name)
print(characters)
# Yang Zhou
# ['Y', 'a', 'n', 'g', ' ', 'Z', 'h', 'o', 'u']
# using if condition -- filter analog
Genius = ["Yang", "Tom", "Jerry", "Jack", "tom", "yang"]