Skip to content

Instantly share code, notes, and snippets.

🤘
<div><ståtús/></div>

Shubham Chaudhary ylogx

🤘
<div><ståtús/></div>
Block or report user

Report or block ylogx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ylogx
ylogx / perf_bytes_io.py
Created Nov 13, 2018
Performance Analysis of Bytes IO vs File IO
View perf_bytes_io.py
"""
Usage:
>>> ipython
>>> %load perf_bytes_io.py
>>> <ENTER>
"""
import logging
import tempfile
import cv2
View keybase.md

Keybase proof

I hereby claim:

  • I am ylogx on github.
  • I am chaudhary (https://keybase.io/chaudhary) on keybase.
  • I have a public key ASD1Ch1-5EWG9Sr7RwFNaIGhe-WSVzAlJLv_FNHByL0c2Ao

To claim this, I am signing this object:

@ylogx
ylogx / xgboost_incremental.ipynb
Last active Oct 2, 2019
XGBoost Incremental Learning
View xgboost_incremental.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase_chaudhary_expired.md

Keybase proof

I hereby claim:

  • I am shubhamchaudhary on github.
  • I am chaudhary (https://keybase.io/chaudhary) on keybase.
  • I have a public key whose fingerprint is FBD2 1E51 18DF 1B4C 2F18 82B1 71B6 881F FAB5 2DCA

To claim this, I am signing this object:

@ylogx
ylogx / zomato_bookmarklet.js
Last active Sep 26, 2018
A bookmarklet to find various zomato resource properties. To use, copy this code and paste it in URL field of a new bookmark.
View zomato_bookmarklet.js
javascript: void
function($) {
var loadBookmarklet = function($) {
(function() {
if ("www.zomato.com" == document.domain) {
var msg = "";
try {
splits = $('meta[property="al:android:url"]').attr("content").split("/");
const id = splits[3],
page_type = splits[2];
@ylogx
ylogx / load_and_cache.py
Created Jul 21, 2016
Load a dataset and cache it for further calls
View load_and_cache.py
import numpy as np
import pickle
def load_and_cache(filename):
output = None
cache_dir = '/tmp/my_project_cache/'
os.makedirs(cache_dir, mode=0o744, exist_ok=True)
cache = cache_dir + filename + '.pkl'
if not os.path.exists(cache):
output = np.genfromtxt(filename, dtype=float, delimiter=',') # TODO: Fill your logic
View DeviceUuidFactory.java
package com.peplet.hulkdownloader.app.background.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.provider.Settings.Secure;
import android.support.annotation.NonNull;
import android.telephony.TelephonyManager;
import java.io.UnsupportedEncodingException;
import java.util.UUID;
@ylogx
ylogx / build.gradle
Created Mar 21, 2016
Fancy Print test results with gradle
View build.gradle
tasks.withType(Test) {
testLogging {
// set options for log level LIFECYCLE
events "passed", "skipped", "failed", "standardOut"
showExceptions true
exceptionFormat "short"
showCauses true
showStackTraces true
@ylogx
ylogx / build-and-run.sh
Last active May 29, 2017
Build Script for doing Android Studio 'run' equivalent from command line
View build-and-run.sh
PACKAGE=com.example.demo
ACTIVITY=.MainActivity
APK_LOCATION=app/build/outputs/apk/app-debug.apk
echo "Package: $PACKAGE"
echo "Building the project with tasks: $TASKS"
./gradlew $TASKS
echo "Uninstalling $PACKAGE"
adb uninstall $PACKAGE
echo "Installing $APK_LOCATION"
adb install $APK_LOCATION
@ylogx
ylogx / Makefile
Last active Aug 29, 2015
A makefile to compile all source code in a given folder
View Makefile
#########################################################################
#
# Makefile - This Makefile compiles all c files in given folder
# Copyright (c) 2014-2015 Shubham Chaudhary <me@shubhamchaudhary.in>
#
#########################################################################
#SPECIFIED_SRC_FILE = $(foreach d,$(SPECIFIED_SRC_DIRS),$(wildcard $(addprefix $(d)/*,*.c)))
#CC = gcc
You can’t perform that action at this time.