Skip to content

Instantly share code, notes, and snippets.

View tcibinan's full-sized avatar

Andrei Tcibin tcibinan

View GitHub Profile
@tcibinan
tcibinan / gpssModelling.gps
Last active March 25, 2018 12:25
GPSS modelling
MEM STORAGE 150
GENERATE 17.5,7.5,,,1
GATE SNF MEM,EXITTERM
QUEUE MEM,1
ENTER MEM,1
TRANSFER ALL,CHAN1,CHAN5,6
GENERATE 8.75,3.75,,,2
GATE SNF MEM,EXITTERM
QUEUE MEM,1
ENTER MEM,1
@tcibinan
tcibinan / basicClassification.R
Created March 19, 2018 09:49
Classify with kknn method with and without cross-validation
library(kknn)
library(dplyr)
library(stringr)
set.seed(2342)
# Data preprocessing
data <-
read.csv('lab8_data.csv', sep=',') %>%
@tcibinan
tcibinan / basicClustering.R
Created March 18, 2018 22:28
Clustering with kmeans method and hierarchy clustering with agnes method.
library(dplyr)
library(cluster)
library(stringr)
library(caret)
set.seed(2342)
# Data preprocessing
raw_data <-
@tcibinan
tcibinan / normalGenerator.m
Last active December 13, 2017 19:43
Generate normal random sequence that is based on the given conditions. Also calculate different stats and show correlation graphs.
function normalGenerator()
count = 1000;
actualCount = count*2;
adCount = count * 2 + 100;
mu = 2;
sigma = 0.5;
kSize = 20;
t = 1.964;
@tcibinan
tcibinan / monteKarloGenerator.m
Last active November 6, 2017 17:30
Generate Monte Karlo random sequence that is based on the given function. Also calculate different stats and show correlation graphs.
function monteKarloGenerator()
count = 5000;
a = 0;
b = 4;
M = 0.5;
p = @func;
kSize = 20;
t = 1.964;
%part1 = @(x) (x/4), 0, 2;
@tcibinan
tcibinan / puassonDiscreteGeneratorMethod1.m
Last active November 6, 2017 15:12
Generate Poisson discrete random sequence that is based on given argument. Also calculate different stats and show correlation graphs
function puassonDiscreteGeneratorMethod1()
count = 1000;
puassonCount = 30;
t = 1.964;
lambda = 7;
inputData = zeros(2, puassonCount);
for i = 1:puassonCount
inputData(1, i) = i-1;
inputData(2, i) = getP(lambda, i-1);
@tcibinan
tcibinan / pptx_to_pdf.vbs
Last active October 2, 2017 18:23
Script from the previous employment. Converts PPTXs in the input folder to PDFs in the output folder.
' Converts PPTXs in the input folder to PDFs in the output folder.
' To run this file it is essential to have microsoft office 2013 or older.
' Just type such a command in the command line.
' CSCRIPT pptx_to_pdf.vbs input_folder output_folder
' Microsoft constants
Const ppPrintAll = 1 ' Print all slides in the presentation.
Const ppPrintSelection = 2 ' Print a selection of slides.
Const ppPrintCurrent = 3 ' Print the current slide from the presentation.
@tcibinan
tcibinan / convertPDFsToPNGs.cmd
Last active October 2, 2017 18:24
Script from the previous employment. Converts all PDF files in the current directory to a list of folders with PNG slides. One folder for each PDF.
FOR %%I IN (*.pdf) DO (mkdir %%~nI & magick convert -density 400 %%I -resize 1280x720 ./%%~nI/slide.png)
@tcibinan
tcibinan / discreteGenerator.m
Last active October 7, 2017 16:05
Generate discrete random sequence that is based on input data. Also calculate different stats and show correlation graphs
function discreteGenerator()
count = 1000;
t = 1.964;
inputData = [
7, 16, 28, 33, 39, 46, 56;
0.01, 0.05, 0.07, 0.1, 0.17, 0.25, 0.35
];
intervals = generateIntervals(inputData);
@tcibinan
tcibinan / generator.m
Last active September 28, 2017 11:32
Generate random values from 0 to 1
function generator()
m = 2^31 - 1;
a = 630360016;
n = 1001;
count = 1000;
y = zeros(count, 1);
ec = zeros(count, 1);
ec(1) = 34238443;
for i = 2:1:n