Skip to content

Instantly share code, notes, and snippets.

View fatihgune's full-sized avatar
🔆

Fatih Güneş fatihgune

🔆
View GitHub Profile
@fatihgune
fatihgune / standardDeviationSample.php
Last active December 6, 2020 16:14
Calculate Standard Deviation (Sample)
<?
/**
* @param array $a
* @param bool $sample
* @return false|float
*/
public function calculateStandardDeviationSample(array $a, $sample = true)
{
$n = count($a);
@fatihgune
fatihgune / ROCCurve.m
Created December 6, 2020 15:51
Generate the ROC Curve in MATLAB (Taffler Z-score Model)
load fisheriris
onetohundred = [
0.01;
0.02;
0.03;
0.04;
0.05;
0.06;
0.07;
@fatihgune
fatihgune / write_contents_as_php_array_into_file.php
Last active September 16, 2023 16:40
Write data into file in php array format
<?php
if (!function_exists('write_contents_as_php_array_into_file')) {
/**
* Writes the contents of given string/object/array to the file in php array format.
*
* @param mixed $contents
* @param bool $die
* @return string
*/
@fatihgune
fatihgune / tr-plate-validation-with-input.html
Created July 26, 2017 21:57
Validation regex for turkish plate system.
<div class="form-group">
<label class="col-md-4 control-label" for="plate">Plate</label>
<div class="col-md-4">
<input pattern="/^(0[1-9]|[1-7][0-9]|8[01])(([A-PR-VYZ])(\d{4,5})|([A-PR-VYZ]{2})(\d{3,4})|([A-PR-VYZ]{3})(\d{2,3}))$/"
minlength="7" maxlength="8" id="plate" name="plate" type="text" placeholder="ex:35GS1905" class="form-control" required>
</div>
</div