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
// If for some reason you don't / can't use Compass... | |
@function pow($number, $exp) { | |
$value: 1; | |
@if $exp > 0 { | |
@for $i from 1 through $exp { | |
$value: $value * $number; | |
} | |
} | |
@else if $exp < 0 { |
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
@echo off | |
setlocal enableextensions disabledelayedexpansion | |
(for %%a in (%*) do if exist "%%~a" ( | |
pushd "%%~dpa" && ( copy /b "%%~nxa"+,, & popd ) | |
) else ( | |
type nul > "%%~fa" | |
)) >nul 2>&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
#!/bin/bash | |
# Description: Creates a new python module skeleton in your project. | |
# Note: will exit if the directory already exists to prevent overwriting. | |
# | |
# usage: pymod MODULE_NAME | |
# example: $ pymod foo | |
# result: foo/ | |
# |_ __init__.py | |
# |_ foo.py | |
# |
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
#ifndef _POLYNOMIAL_REGRESSION_H | |
#define _POLYNOMIAL_REGRESSION_H __POLYNOMIAL_REGRESSION_H | |
/** | |
* PURPOSE: | |
* | |
* Polynomial Regression aims to fit a non-linear relationship to a set of | |
* points. It approximates this by solving a series of linear equations using | |
* a least-squares approach. | |
* | |
* We can model the expected value y as an nth degree polynomial, yielding |
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
import { Pipe } from '@angular/core'; | |
/** | |
* Formats a byte value to a human-readable format. | |
* | |
* Example uses: | |
* ------------- | |
* {{ value | formatBytes }} - use short units. | |
* {{ value | formatBytes: "long"}} - use long name units | |
*/ |
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
/** | |
* @class LinkedList | |
* @brief A simple linked list. | |
* | |
* A linked list is a data structure represented by a series of nodes wherein | |
* each node maintains a record of its stored value and a pointer to another | |
* node. | |
* | |
* This implementation is intended to provide very basic functionality, | |
* including insertion, deletion, and size. |