Skip to content

Instantly share code, notes, and snippets.

View Hiyorimi's full-sized avatar
💎
The Open Network

Kir Malev Hiyorimi

💎
The Open Network
View GitHub Profile
@Hiyorimi
Hiyorimi / keybase.md
Created September 17, 2016 08:52
Keybase verification

Keybase proof

I hereby claim:

  • I am Hiyorimi on github.
  • I am malev (https://keybase.io/malev) on keybase.
  • I have a public key whose fingerprint is ADFA 8AA3 A2D3 5330 F400 CAAE DB4E 01C4 B7A8 0F83

To claim this, I am signing this object:

stty -ixon -ixoff
export PATH=/usr/local/bin:$PATH
export PS1="\h:\t ~> \W $ "
#from http://stackoverflow.com/questions/31864585/cant-get-theano-to-link-against-cudnn-on-osx
CUDA_ROOT=/usr/local/cuda
export PATH=$CUDA_ROOT/bin:$PATH
export PATH=/Developer/NVIDIA/CUDA-7.5/bin:$PATH
export DYLD_LIBRARY_PATH=$CUDA_ROOT/lib:$DYLD_LIBRARY_PATH:/usr/local/cuda/lib/
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-7.5/lib:$DYLD_LIBRARY_PATH
@Hiyorimi
Hiyorimi / time_adjuster.py
Created December 28, 2018 23:32
script to adjust access and modification time based on the filename
import os
import glob
import re
import datetime as dt
from stat import *
if __name__ == '__main__':
regexp = re.compile("(\d{4}\d{2}\d{2}_\d{2}\d{2}\d{2})")
for file in glob.iglob("*.jpg"):
@Hiyorimi
Hiyorimi / utils.go
Created January 11, 2019 10:52
Minimal TCP testing server implementation
package main
import (
"bufio"
"errors"
"fmt"
"io"
"net"
"strings"
"time"
@Hiyorimi
Hiyorimi / handy_geo.py
Last active January 27, 2019 14:28 — forked from amites/center_geo.py
Center Geolocations
from math import cos, sin, asin, atan2, sqrt, radians, degrees
def _hsin(theta):
return pow(sin(theta/2), 2)
def distance(lat1, lon1, lat2, lon2):
"""
Calulates distance between two points set as 4 coordinates.
"""
# convert to radians
@Hiyorimi
Hiyorimi / main.go
Created February 7, 2019 12:15
GeoHashingResearch
package main
import (
"bufio"
"flag"
"fmt"
"io"
"log"
"os"
"strconv"
@Hiyorimi
Hiyorimi / main.go
Created April 22, 2019 14:34
Simple go echo server
package main
import (
"flag"
"log"
"net"
)
func echoServer(c net.Conn) {
for {
@Hiyorimi
Hiyorimi / .zshrc
Last active December 12, 2019 21:27
My .zshrc
# Uncomment next and the last line to profile
# zmodload zsh/zprof
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/usr/local/go/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
void main() {
var example9Array = const ["a", "b"];
example9() {
for (int i = 0; i < example9Array.length; i++) {
print("Example9 for loop '${example9Array[i]}'");
}
var i = 0;
while (i < example9Array.length) {
print("Example9 while loop '${example9Array[i]}'");
i++;
-- Demonstration on how Cohort Analysis is done. In order to do this we just need 2 tables:
-- auth_user (id, timestamp)
-- reaction_view (user_id, timestamp)
-- The below example use the following table names and fields, feel free to replace them with yours.
-- - auth_user (id, date_joined)
-- - reaction_view (user_id, created_at)
-- Demo: https://demo.holistics.io/queries/11118-buyer-cohort-retention-analysis
-- Forked from https://gist.github.com/nvquanghuy/bd0fda7b88e5b2fd8e46e047e391d25f