Skip to content

Instantly share code, notes, and snippets.

Tolga Tezel ttezel

Block or report user

Report or block ttezel

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
View gist:3c992f8e7fecf30f2fdb2829d8316e5a
ffmpeg -i -s 600x400 -pix_fmt rgb24 -r 10 -f gif - > out.gif
ttezel / download_popular_insta_photos.js
Last active Oct 17, 2016
Download instagram photos with >= N likes (run from an instagram user's profile page)
View download_popular_insta_photos.js
View Generate an instagram access token from your
  • Login to instagram developers site and add http://localhost as a redirect API in your API client's settings
  • Navigate to<CLIENT_ID>&redirect_uri=http://localhost&response_type=token
  • Get token from URL after redirect occurs back to http://localhost
View jsfeat_with_console_logs.js
* @author Eugene Zatepyakin /
* this code is a rewrite from implementation
* @author Martin Tschirsich /
(function(global) {
"use strict";
import json
import time
import ujson
NUM_RUNS = 1000000
obj = {}
for i in range(NUM_OBJ_KEYS):
obj[i] = 'foo'
ttezel / gist:6143316
Last active Apr 9, 2016
Elasticsearch fuzzy search scores the same for exact match and non-exact match
View gist:6143316
curl -XPOST 'http://localhost:9200/fuzzytest/' -d '
settings: {
index: {
analysis: {
analyzer: {
default: {
type: "custom",
tokenizer: "uax_url_email",
filter: [ "lowercase" ]
ttezel / extended_euclid.m
Created Jan 25, 2013
Extended Euclid Algo for finding the GCD of two integers. Works using Euclid's law: if `d` is the GCD of `a` and `b`, then there exists an `x` and `y` such that ```ax + by = d```
View extended_euclid.m
Problem 7 (ii) - Extended Euclid
Input: positive integers a,b with a >= b >= 0
Output: integer array [ x,y,d ] such that
d = gcd(a,b) and ax + by = d
function result = extended_Euclid (a, b)
if (b == 0)
ttezel / gcd-euclid.m
Last active Dec 11, 2015
gcd algorithm (extended-euclid)
View gcd-euclid.m
Problem 7 (ii) - extended-euclid function
Given two integers a and b, it finds the largest integer that
divides both of them - known as their greatest common divisor (gcd).
Input: integers a and b where a >= b >= 0
Output : gcd(a, b)
function result = euclid (a, b)
ttezel / modexp.m
Last active Aug 9, 2019
Modular Exponentiation in Matlab (x ^ y mod n)
View modexp.m
Problem 7 (i): modexp function
Returns x ^ y mod n for x, y, and n > 1.
function result = modexp (x, y, n)
%anything raised to 0th power = 1 so return 1
if (y == 0)
result = 1;
You can’t perform that action at this time.