Skip to content

Instantly share code, notes, and snippets.

View nenadg's full-sized avatar
🍺
out

Nenad Golubovic nenadg

🍺
out
View GitHub Profile
@nenadg
nenadg / absorbent_barriers.py
Created January 31, 2020 20:32 — forked from breeko/absorbent_barriers.py
Testing the idea of survival, absorbent barriers based on different strategies and payoffs
import numpy as np
import matplotlib.pyplot as plt
MAX_NUM_STEPS = 1000000
NUM_TRIALS = 100
START_CAPITAL = 100
MIN_BET_SIZE = 0.01
def test(payout, strategy, start_capital=START_CAPITAL, num_trials=NUM_TRIALS, max_num_steps=MAX_NUM_STEPS, min_bet_size=MIN_BET_SIZE):
""" Returns the capital based on given strategy

'Users hate change'

This week NN Group released a video by Jakob Nielson in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

@nenadg
nenadg / nouns.txt
Created May 24, 2019 14:03 — forked from sudodoki/nouns.txt
list of uncountable nouns aka mass nouns scraped from http://simple.wiktionary.org/wiki/Category%3aUncountable_nouns
abaft
abandon
abasia
abating
abbreviated
abducted
able-bodiedism
able-bodism
ableism
ablepharia
CC Coord Conjuncn and,but,or
CD Cardinal number one,two
DT Determiner the,some
EX Existential there there
FW Foreign Word mon dieu
IN Preposition of,in,by
JJ Adjective big
JJR Adj., comparative bigger
JJS Adj., superlative biggest
LS List item marker 1,One
@nenadg
nenadg / dedit.sh
Created December 26, 2016 14:59 — forked from dmohs/dedit.sh
#!/bin/bash
IFS=$'\n\t'
set -euox pipefail
CNAME="$1"
FILE_PATH="$2"
TMPFILE="$(mktemp)"
docker exec "$CNAME" cat "$FILE_PATH" > "$TMPFILE"
/**
* isMatch.js
*
* Evan Steinkerchner - 2015
* https://gist.github.com/Roundaround/87835b53690135aa0529
*
* A string matching function that utilizes a variety of methods to provide 'intelligent'
* string matching functionality. A pair of strings will be considered a match when either:
*
* 1. the strings are both phoenetically similar as per the double metaphone algorithm, and
@nenadg
nenadg / levenshtein.js
Created July 7, 2016 12:15 — forked from andrei-m/levenshtein.js
Levenshtein distance between two given strings implemented in JavaScript and usable as a Node.js module
/*
Copyright (c) 2011 Andrei Mackenzie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
sudo zypper in php5-phar php5-openssl
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
@nenadg
nenadg / xerxes.c
Created June 7, 2016 08:02 — forked from Xe/xerxes.c
//Xerxes, code assumed to be public domain
//by tH3j3st3r
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <netdb.h>
#include <signal.h>
@nenadg
nenadg / titin.txt
Created May 16, 2016 08:34
Titin Full IUPAC name
methionylthreonylthreonylglutaminylalanylprolylthreonylphenylalanylthreonylglutaminylprolylleucylglutaminylserylvalylvalylvalylleucylglutamylglycylserylthreonylalanylthreonylphenylalanylglutamylalanylhistidylisoleucylserylglycylphenylalanylprolylvalylprolylglutamylvalylseryltryptophylphenylalanylarginylaspartylglycylglutaminylvalylisoleucylserylthreonylserylthreonylleucylprolylglycylvalylglutaminylisoleucylserylphenylalanylserylaspartylglycylarginylalanyllysylleucylthreonylisoleucylprolylalanylvalylthreonyllysylalanylasparaginylserylglycylarginyltyrosylserylleucyllysylalanylthreonylasparaginylglycylserylglycylglutaminylalanylthreonylserylthreonylalanylglutamylleucylleucylvalyllysylalanylglutamylthreonylalanylprolylprolylasparaginylphenylalanylvalylglutaminylarginylleucylglutaminylserylmethionylthreonylvalylarginylglutaminylglycylserylglutaminylvalylarginylleucylglutaminylvalylarginylvalylthreonylglycylisoleucylprolylasparaginylprolylvalylvalyllysylphenylalanyltyrosylarginylaspartylglycylalanylglutamylisoleucy