Skip to content

Instantly share code, notes, and snippets.

View electron0zero's full-sized avatar
🎯
Focusing

Suraj Nath electron0zero

🎯
Focusing
View GitHub Profile
@electron0zero
electron0zero / followers_wc.ipynb
Created August 19, 2017 10:56 — forked from simecek/followers_wc.ipynb
Generate wordcloud of followers' descriptions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@electron0zero
electron0zero / gist:ae6b890348cf798d6748c16c93c4a1a2
Created July 10, 2017 22:10 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
#The MIT License (MIT)
# Copyright (c) 2012 Jordan Wright <jordan-wright.github.io>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@electron0zero
electron0zero / setup.py
Created May 1, 2017 19:34 — forked from jhoonb/setup.py
setup.py - cx_Freeze
"""
exemplo setup.py do cx_freeze
"""
from cx_Freeze import setup, Executable
# 3 tipos de input: includes, packages e excludes.
buildOptions = dict(
includes=['fdb', 'os', 'sys', 'sqlite3', 'time',
'datetime', 'configparser', 'hashlib', 'utils'],
@electron0zero
electron0zero / explore.md
Created November 13, 2016 10:53 — forked from shiftkey/explore.md
WTF happened to my line endings?

This is a quick guide to debug potential line ending weirdness.

Note: I've thrown a lot of concepts in here around Git data structures without going into depth. If there's things that are unclear or you'd like some more details, just leave a comment and I'll either reply or expand on this post accordingly...

What sort of weirdness am I referring to? Consider this commit: https://github.com/dalefrancis88/Windsor/commit/e2543e5573781c7ded83166932c9c415feef11c0

While it looks like a very large commit, the contents of the file are unchanged. But the diffs are very intimidating.

@electron0zero
electron0zero / EmptyRecyclerView.java
Created August 30, 2016 08:32 — forked from meoyawn/EmptyRecyclerView.java
RecyclerView doesn't have an emptyView support, we gotta fix that
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.View;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class EmptyRecyclerView extends RecyclerView {
@Nullable View emptyView;
@electron0zero
electron0zero / gist:922285cb9366b169d5508c7bb8909119
Created August 25, 2016 18:11 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

//using String.split to split and assign Object
function splitCurrentURL(){
//query given index.html?this=true&that=good;
var url = location.href.split("?")[1]; // this=true&that=good;
params = {}; //init param obj
url = url.split("&"); // ['this=true','that=good']
for(var i = 0; i<url.length; i++){
var split_cache = url[i].split("="); // ['this','true'], ...
@electron0zero
electron0zero / Cliref.md
Created June 5, 2016 15:13 — forked from yunga/Cliref.md
CLIRef.md
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.bash/cliref.md
/    \  \/|    | |   ||       _/ __ \  __\    copy/paste from whatisdb
\     \___|__  |_|_  ||    |   \  __/|_ |   http://pastebin.com/yGmGiDQX
 \________  /_____ \_||____|_  /____  /_|     yunga.palatino@gmail.com
 20160515 \/ 1527 \/         \/     \/

alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'