Skip to content

Instantly share code, notes, and snippets.

@serzh
serzh / Readme.md
Last active February 12, 2018 10:26
Programming Assignment for NLP Course

Linguistic Assignment

a - 2
b - 3 (men)
c - 8 (pen)
d - 7 
e - 5 (zevi)
f - 1 (segiz)
g - 9

h - 6 (eki)

@serzh
serzh / kafka.cs
Last active October 12, 2016 06:55
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RdKafka;
namespace ConsoleApplication1
{
class Program
package Memoize;
import java.util.*;
/**
* Task: https://gist.github.com/serzh/59fe8814b504a6382ff7
*
* Output example:
* Added: 1 > 2
* Added: 2 > 3
@serzh
serzh / gist:59fe8814b504a6382ff7
Last active August 29, 2015 14:19
Test Task - Bounded Memoize
;; Memoize function allows you to create functions that cache their results by args.
;; The next calls will look at cache at first, and if restult not found computation will be performed
;; and saved to the cache.
;; The task is to write bounded-memoize function, wich will cache last N computations.
;; Returned function must be thread-safe.
;; For example:
(defn bounded-memoize
"f - function to memoize,
ns favfeed-spot.log
(:use clojure.pprint))
(def ls (line-seq (clojure.java.io/reader "console.log")))
(defn read-body [ls]
(->> ls
(take-while #(not (re-find #"^\d\d:\d\d:\d\d" %)))
(filter seq)
(map #(subs % 17))
(def b (Files/readAllBytes (Paths/get (URI. "file:///home/serzh/new2-output.txt"))))
echo "JAVA_CMD=${LEIN_JAVA_CMD-drip}\nLEIN_FAST_TRAMPOLINE=y" > ~/.lein/leinrc
@serzh
serzh / form-with-formstamp.html
Last active August 29, 2015 13:57
Habra article
<div>
<fs-form-for model="samurai">
<fieldset class="form-horizontal">
<fs-input as="text" name="username" required="" label="Name"></fs-input>
<fs-input as="email" name="email" required="" label="Email"></fs-input>
<fs-input as="password" name="password" required="" label="Email"></fs-input>
<fs-input as="fs-date" name="birthdate" required="" label="Date of Birth"></fs-input>
</fieldset>
</fs-form-for>
</div>