Skip to content

Instantly share code, notes, and snippets.

View bhachauk's full-sized avatar
🎮
https://bhachauk.github.io

Bhanuchander Udhayakumar bhachauk

🎮
https://bhachauk.github.io
View GitHub Profile
FROM debian:buster-slim
ENV LANG=en_EN.UTF-8
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests --allow-unauthenticated -y \
gnupg \
ca-certificates \
wget \
@bhachauk
bhachauk / Early_stopping
Created April 28, 2020 11:48
Stop training when the requirment done...
class myCallback(tf.keras.callbacks.Callback):
def on_epoch_end(self, epoch, logs={}):
if(logs.get('accuracy')>0.6):
print("\nReached 60% accuracy so cancelling training!")
self.model.stop_training = True
@bhachauk
bhachauk / stack-overflow-reputation.html
Created January 10, 2020 14:45
StackOverflow information
<h3>Stack overflow Repuration</h3>
<div id="stack-rep">Value</div>
<script>
function getJSON(url) {
var resp ;
var xmlHttp ;
resp = '' ;
xmlHttp = new XMLHttpRequest();
@bhachauk
bhachauk / Visited_Places.geojson
Created September 4, 2019 05:22
Visited Places ... !
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bhachauk
bhachauk / CollectMap
Created June 15, 2019 12:03
Using Map in Better Way
groovy -e 'a=["a": ["b",1], "c": ["d",2]]; println a.collectEntries{k,v -> ["$k":v[0]]}'
@bhachauk
bhachauk / Millis_Date_Oracle_Query.sql
Last active January 14, 2019 07:27
Accessing the Unix time in Oracle database with specific date format in SQL query
DEFINE cnv_time = "24 * 60 * 60 * 1000";
select TIMESTAMP '1970-01-01 00:00:00.000' + NUMTODSINTERVAL(TIME / 1000, 'SECOND') as dat FROM FM_ALARM_11_12_2018 where
to_number(to_date('01-JAN-2019 10:00:00','DD-MON-YYYY HH24:MI:SS') - to_date('01-JAN-1970','DD-MON-YYYY')) * &cnv_time > TIME;
@bhachauk
bhachauk / cipynb.py
Created October 6, 2018 11:14 — forked from iamaziz/cipynb.py
Convert all ipython notebook(s) in a given directory into the selected format and place output in a separate folder. Using: ipython nbconvert and find command (Unix-like OS).
#!/usr/bin/env python
__author__ = 'Aziz'
"""
Convert all ipython notebook(s) in a given directory into the selected format and place output in a separate folder.
usages: python cipynb.py `directory` [-to FORMAT]
Using: ipython nbconvert and find command (Unix-like OS).
@bhachauk
bhachauk / spherical-cart.py
Created September 15, 2018 04:43
spherical <--> cart
def sph2cart1(r, th, phi):
x = r * cos(phi) * sin(th)
y = r * sin(phi) * sin(th)
z = r * cos(th)
return x, y, z
def cart2sph1(x, y, z):
r = sqrt(x**2 + y**2 + z**2) + 1e-15
th = acos(z / r)
git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"
@bhachauk
bhachauk / git_merge_dry-run
Last active July 24, 2018 09:12
git merge with no fast forward and no commit :octocat:
git merge --no-commit --no-ff newbranch
git diff --cached
git merge --abort