Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

kristian koci kkoci

🎯
Focusing
View GitHub Profile
@kkoci
kkoci / modern-geospatial-python.md
Created Mar 8, 2019 — forked from jacquestardie/modern-geospatial-python.md
Modern remote sensing image processing with Python
@kkoci
kkoci / roman_numerals.py
Created Jan 6, 2019 — forked from jrjames83/roman_numerals.py
Roman Numerals Kata - Python 3.6 Dict keys retain input ordering
View roman_numerals.py
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 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
kkoci / 00.howto_install_phantomjs.md
Created Sep 26, 2018 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

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
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
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.
@kkoci
kkoci / client.py
Created Dec 4, 2017 — forked from kylehounslow/client.py
Send and receive images using Flask, Numpy and OpenCV
View client.py
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 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
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
PATH=/home/kristian/.rbenv/bin:/home/kristian/.pyenv/shims:/home/kristian/.pyenv/bin:/home/kristian/bin:/home/kristian/bin:/home/kristian/Downloads/gcloud/google-cloud-sdk/bin:/home/kristian/.sdkman/candidates/grails/current/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/share/rvm/bin
command(2): __rvm_make -j2
++ make -j2
CC = gcc
@kkoci
kkoci / _form.php
Created Sep 29, 2016 — forked from lalviarez/_form.php
Yii2 combolist ajax
View _form.php
<?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 */
You can’t perform that action at this time.