- Serverless - framework to work with AWS
- Postman - tool to test API
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
// alignas C++11, C++14 | |
class alignas(32) Foo {...} | |
// address &foo is aligned to 32-byes boundary | |
Foo foo{}; | |
// it is not guarantee that address pFoo is aligned to 32-byes boundary | |
Foo* pFoo = new Foo(); |
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
# copy the code to $PROFILE.CurrentUserAllHosts | |
# and restard PowerShell. | |
# Now you can switch between different versions of Python using EnablePython <Version> | |
# or short aliases: py36, py37, py38 | |
Function Get-OriginalPath { | |
if (-not $env:ORIGINAL_PATH) { | |
$env:ORIGINAL_PATH = $env:PATH | |
} | |
return $env:ORIGINAL_PATH |
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
""" | |
Principal component analysis (PCA) | |
>>> np.random.seed(111) | |
>>> m = np.array([[3, 2], [2, 6]]) | |
>>> frobenius_norm(m) | |
7.280109889280518 | |
>>> power_iter(m, np.ones((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
#include <iostream> | |
#include <future> | |
#include <condition_variable> | |
#include <mutex> | |
#include <thread> | |
#include <queue> | |
// One Way Channel a.k.a. Message Queue | |
template <typename T> |
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 qualified Data.Vector.Storable as V | |
import qualified Numeric.LinearAlgebra as LA | |
-- | Process outputs for Multiclass Classification. | |
-- Takes number of labels and output vector y. | |
-- Returns matrix of binary outputs (One-vs-All Classification). | |
-- It is supposed that labels are integerets start at 0. | |
processOutputMulti :: Int -> Vector -> Matrix | |
processOutputMulti numLabels y = LA.fromColumns $ map f [0 .. numLabels-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
#!/usr/bin/env bash | |
IFS="$(printf '\n\t')" # eliminate whitespace in pathnames | |
# function real_path (path) | |
function real_path () { | |
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" | |
} | |
# function build_href (caption, url) |
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
#!/usr/bin/env python | |
# Finding the points of intersecion of two circles. | |
import math | |
class Point: | |
def __init__(self, x = 0, y = 0): | |
self.x = x | |
self.y = y |
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
#!/usr/bin/env bash | |
export PLATRORM=darwin-amd64-64 | |
# build and install utils | |
cd $HADOOP_INSTALL/src/c++/utils | |
chmod +x configure install-sh | |
./configure --prefix=$HADOOP_INSTALL/c++/$PLATFORM | |
make install |
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
#!/usr/bin/env bash | |
# global parameters | |
g_tmp_folder="ncdc_tmp"; | |
g_output_folder="ncdc_data"; | |
g_remote_host="ftp.ncdc.noaa.gov"; | |
g_remote_path="pub/data/noaa"; | |
NewerOlder