Skip to content

Instantly share code, notes, and snippets.

View Makazone's full-sized avatar

Makar Makazone

View GitHub Profile
@Makazone
Makazone / matan.m
Created November 16, 2015 19:57
Complex plain transformation, task 3 N = 8
function [ output_args ] = untitled2( input_args )
figure
hold on
n = 8; % too lazy to hold shift
center = (2*n+1 - 1i*n) / (n+5);
radius = (n+3)/(2*n+1);
% plot(real(center), imag(center), '.g')
import itertools
import sys
from operator import itemgetter
def getScore(p1, p2, el):
if p1.count(el) > p2.count(el):
return 1
elif p1.count(el) < p2.count(el):
return -1
else:
@Makazone
Makazone / git_snippets
Created July 13, 2015 08:07
Useful git commands
#The tools to compare branches:
git diff b1..b2
git log b1..b2
git shortlog b1..b2
# See files different in two branches
git diff --name-status b1..b2
#Optimal git text width (based on http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
:set textwidth=72 # vim setting
/* Author: Stetsenko Makar */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <time.h>
#define MIN 1