Skip to content

Instantly share code, notes, and snippets.

View jgera's full-sized avatar

Jatin Gera jgera

View GitHub Profile
@arnaldog12
arnaldog12 / custom_metrics.py
Last active January 9, 2023 17:34
Custom Metrics for Keras and TensorFlow
import numpy as np
import tensorflow as tf
from keras import backend as K
def recall(y_true, y_pred):
true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))
possible_positives = K.sum(K.round(K.clip(y_true, 0, 1)))
recall_keras = true_positives / (possible_positives + K.epsilon())
return recall_keras
@marshyyyy
marshyyyy / BlockYouTubeHostsFile
Created November 18, 2017 05:02
Block YouTube Hosts File
0.0.0.0 host.youtube.com
0.0.0.0 mx.youtube.com
0.0.0.0 admin.youtube.com
0.0.0.0 devel.youtube.com
0.0.0.0 stats.youtube.com
0.0.0.0 http.youtube.com
0.0.0.0 mx0.youtube.com
0.0.0.0 administration.youtube.com
0.0.0.0 development.youtube.com
0.0.0.0 svn.youtube.com
@kirtan403
kirtan403 / unzip.php
Last active January 22, 2023 12:51 — forked from jonmaim/zip.php
PHP script to remotely zip/unzip archives of your FTP
<?php
function show($str){
echo $str . "<br/>\n";
flush();
ob_flush();
}
$archiveDir = "temp";