Skip to content

Instantly share code, notes, and snippets.


kristian koci kkoci

Block or report user

Report or block kkoci

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import argparse
import re
from multiprocessing.pool import ThreadPool as Pool
import requests
import bs4
root_url = ''
index_url = root_url + '/category/50/pycon-us-2014'
kkoci / _form.php
Created Sep 29, 2016 — forked from lalviarez/_form.php
Yii2 combolist ajax
View _form.php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use yii\web\View;
/* @var $this yii\web\View */
/* @var $model common\models\ConsejoComunal */
View Error rvm on Linux mint Rafaela
[2016-10-23 19:16:49] __rvm_make
__rvm_make ()
\make "$@" || return $?
current path: /usr/share/rvm/src/ruby-2.3.1
command(2): __rvm_make -j2
++ make -j2
CC = gcc
kkoci / .block
Created Jan 6, 2017 — forked from pkowalicki/.block
Pivot table visualization with zoomable partition layout in d3.js
View .block
border: no
height: 900
license: gpl-3.0
kkoci /
Created Dec 4, 2017 — forked from kylehounslow/
Send and receive images using Flask, Numpy and OpenCV
import requests
import json
import cv2
addr = 'http://localhost:5000'
test_url = addr + '/api/test'
# prepare headers for http request
content_type = 'image/jpeg'
headers = {'content-type': content_type}
kkoci / SimplePolicy.ipynb
Created Feb 24, 2018 — forked from bhaktipriya/SimplePolicy.ipynb
Policy gradient method for solving n-armed bandit problems.
View SimplePolicy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View advanced_rasterio_features.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
kkoci /
Created Sep 26, 2018 — forked from julionc/
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
kkoci / python_pretty_time
Created Oct 26, 2018 — forked from n0m4dz/python_pretty_time
python pretty time with localization
View python_pretty_time
# coding: utf-8
from datetime import datetime
from datetime import timedelta
def calc_diff(delta):
delta = abs( delta )
return {
'year' : int(delta.days / 365),
'month' : int(delta.days % 365) / 30,
'day' : int(delta.days % 365) % 30,
kkoci /
Created Jan 6, 2019 — forked from jrjames83/
Roman Numerals Kata - Python 3.6 Dict keys retain input ordering
numerals = {"I":1, "V":5, "X":10, "L": 50, "C": 100, "D": 500, "M": 1000 }
def convert_roman(input_number):
range_flag = None
for symbol, integer in numerals.items():
if integer == input_number: return symbol
if input_number > integer:
range_flag = symbol
remaining = input_number - numerals[range_flag]
You can’t perform that action at this time.