Table of Contents:
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 | |
# | |
# This hook will look for code comments marked '//no-commit' | |
# - case-insensitive | |
# - dash is optional | |
# - there may be a space after the // | |
# | |
noCommitCount=$(git diff --no-ext-diff --cached | egrep -i --count "(@No|\/\/\s?no[ -]?)commit") | |
if [ "$noCommitCount" -ne "0" ]; then | |
echo "WARNING: You are attempting to commit changes which include a 'no-commit'." |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
def Gauss_Seidel(A, b, N): | |
"""Solves the linear system Ax = b using Gauss-Seidel method.""" | |
x = np.zeros(len(b)) | |
e_inverse = np.linalg.inv(np.tril(A)) | |
for i in range(N): | |
x += np.dot(e_inverse, b - np.dot(A, x)) | |
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
def equigen( | |
x: pd.DataFrame, | |
y: pd.Series, | |
batch_size: int = 256, | |
seed: int = seed, | |
preproc: callable = None, | |
preproc_kwargs: dict = {}): | |
"""Balanced generator for 0, 1 binary classification problems""" | |
np.random.seed(seed) |
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
def capped_relu(x): | |
"""Mirrored-Z shaped activation function: min(10, relu(x))""" | |
return tf.minimum(tf.keras.activations.relu(x), 10) |
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
{ | |
"update_id": 99737762, | |
"message": { | |
"message_id": 3746, | |
"from": { | |
"id": 993903016, | |
"is_bot": false, | |
"first_name": "Mher", | |
"last_name": "Movsisyan", | |
"username": "Movsisyannn", |