This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sympy.solvers import solve | |
from sympy.abc import x | |
def getDeepDotQuality(func, arg, val, n = 3): | |
dy = func.diff(arg) | |
dyn = dy.subs(arg, val) | |
if (dyn == 0): | |
return getDeepDotQuality(dy, arg, val, n+1) | |
elif (n % 2 == 1): | |
return 'has an inflection point' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(kknn) | |
library(dplyr) | |
library(stringr) | |
set.seed(2342) | |
# Data preprocessing | |
data <- | |
read.csv('lab8_data.csv', sep=',') %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(cluster) | |
library(stringr) | |
library(caret) | |
set.seed(2342) | |
# Data preprocessing | |
raw_data <- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function normalGenerator() | |
count = 1000; | |
actualCount = count*2; | |
adCount = count * 2 + 100; | |
mu = 2; | |
sigma = 0.5; | |
kSize = 20; | |
t = 1.964; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function monteKarloGenerator() | |
count = 5000; | |
a = 0; | |
b = 4; | |
M = 0.5; | |
p = @func; | |
kSize = 20; | |
t = 1.964; | |
%part1 = @(x) (x/4), 0, 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR %%I IN (*.pdf) DO (mkdir %%~nI & magick convert -density 400 %%I -resize 1280x720 ./%%~nI/slide.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' 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. |
NewerOlder