Skip to content

Instantly share code, notes, and snippets.

View kkoci's full-sized avatar
🎯
Focusing

kristian koci kkoci

🎯
Focusing
  • Feeltech LTD
  • London
  • 20:03 (UTC -12:00)
View GitHub Profile
@kkoci
kkoci / modern-geospatial-python.md
Created March 8, 2019 17:28 — forked from jqtrde/modern-geospatial-python.md
Modern remote sensing image processing with Python
@kkoci
kkoci / roman_numerals.py
Created January 6, 2019 22:24 — forked from jrjames83/roman_numerals.py
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]
@kkoci
kkoci / python_pretty_time
Created October 26, 2018 13:49 — forked from n0m4dz/python_pretty_time
python pretty time with localization
# 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
kkoci / 00.howto_install_phantomjs.md
Created September 26, 2018 01:27 — forked from julionc/00.howto_install_phantomjs.md
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
kkoci / advanced_rasterio_features.ipynb
Created March 18, 2018 19:34 — forked from sgillies/advanced_rasterio_features.ipynb
Advanced Rasterio features notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkoci
kkoci / SimplePolicy.ipynb
Created February 24, 2018 03:44 — forked from bhaktipriya/SimplePolicy.ipynb
Policy gradient method for solving n-armed bandit problems.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkoci
kkoci / client.py
Created December 4, 2017 15:42 — forked from kylehounslow/client.py
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
kkoci / .block
Created January 6, 2017 04:28 — forked from pkowalicki/.block
Pivot table visualization with zoomable partition layout in d3.js
border: no
height: 900
license: gpl-3.0
@kkoci
kkoci / _form.php
Created September 29, 2016 15:18 — forked from lalviarez/_form.php
Yii2 combolist ajax
<?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 */
import argparse
import re
from multiprocessing.pool import ThreadPool as Pool
import requests
import bs4
root_url = 'http://pyvideo.org'
index_url = root_url + '/category/50/pycon-us-2014'