Skip to content

Instantly share code, notes, and snippets.

View max-kov's full-sized avatar

Max Kovalovs max-kov

View GitHub Profile
@max-kov
max-kov / csanalysis.tex
Created May 9, 2017 20:49
my cs analysis in latex
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}{\huge\bfseries}{}{}{}
\setlength{\parindent}{4em}
\setlength{\parskip}{1em}
\begin{document}
\author{Maksims Kovalovs}
\title{Computer science programming project}
@max-kov
max-kov / circles3
Created March 21, 2017 22:45
circle rolling in another circle
import pygame
import numpy as np
# change these values
points = 50000
radius1 = 100.0
radius2 = 70.0
point_disp = 100.0
angle_ratio =radius1/radius2
@max-kov
max-kov / circles2.py
Created March 21, 2017 22:23
drawing circles on a circle (which is moving)
import pygame
import numpy as np
# change these values
points_temp = 1000
radius1 = 100
radius2 = 100
angular_speed_1 = 0.01
angular_speed_2 = 0.0002
import pygame
import numpy as np
# change these values
points = 10000
circles = 30.0
radius = 200.0
resolution = np.array([1000, 500])
@max-kov
max-kov / cycloid.py
Created November 7, 2016 22:39
cycloid animation
import pygame, math
pygame.init()
windowsSurfaceObj = pygame.display.set_mode((750,300))
fpsClock = pygame.time.Clock()
whiteColor = (255,255,255)
greenColor = (0,255,0)
blackColor = (0,0,0)
@max-kov
max-kov / matrix.pas
Last active November 21, 2015 07:04
matrix falling code sim
program matrix;
uses
graph,
SysUtils;
const
colnum = 15;
var
GrDriver, GrMode, GrError: smallint;
@max-kov
max-kov / calculator.lex
Created November 15, 2015 17:36
stack calculator lex implementation
%option noyywrap
%{
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
%}
%%
int nums[100],i=0;
[\-0-9]*|[0-9]* {
i++;