Skip to content

Instantly share code, notes, and snippets.

First install all these prerequisites for compiling:

sudo apt install g++ autoconf libfontconfig1-dev pkg-config libjpeg-dev libopenjpeg-dev gnome-common libglib2.0-dev gtk-doc-tools libyelp-dev yelp-tools gobject-introspection libsecret-1-dev libnautilus-extension-dev

First download the encoding files (no need to compile these) to the current working directory

wget https://poppler.freedesktop.org/poppler-data-0.4.7.tar.gz
import pickle
a = [1,2]
b = [3,4]
with open("tmp.pickle", "wb") as f:
pickle.dump((a,b), f)
with open("tmp.pickle", "rb") as f:
a,b = pickle.load(f)
import IPython.nbformat.current as nbf
nb = nbf.read(open('test.py', 'r'), 'py')
nbf.write(nb, open('test.ipynb', 'w'), 'ipynb')
@sai10
sai10 / Git New Repo
Last active July 15, 2018 19:02
New repository creation in command line and then pushing to git hub
echo "xxx" >> README.md [or] touch README.md
git init
git add . --all
git commit -m "Initial commit"
git remote add origin <git-web-url>
git push -u origin master
if error: failed to push some refs to <git link> then:
git pull --rebase origin master
git push -u origin master
@sai10
sai10 / The Technical Interview Cheat Sheet.md
Created July 2, 2018 21:47 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.

Username Regular Expression Pattern

^[a-z0-9_-]{3,15}$
EXPLANATION
    ^                    # Start of the line
  [a-z0-9_-]	     # Match characters and symbols in the list, a-z, 0-9 , underscore , hyphen
             {3,15}  # Length at least 3 characters and maximum length of 15
$                    # End of the line
@sai10
sai10 / Pl-Sql-GUIDE.md
Last active July 26, 2017 18:06
PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension for SQL and the Oracle relational database.

1-Pl-SQL Quick Reference

2-Pl-SQL NOTES

3-Pl-SQL Frameworks

1-PL/SQL Quick Reference

  • SELECT Statement

    SELECT [DISNCT] {*, column [alias],...} FROM table [WHERE condition(s)] [ORDER BY {column, exp, alias} [ASC|DESC]]

1×× Informational

An informational response indicates that the request was received and understood. It is issued on a provisional basis while request processing continues. It alerts the client to wait for a final response.

100 Continue
101 Switching Protocols
102 Processing

2×× Success

This class of status codes indicates the action requested by the client was received, understood, accepted, and processed successfully.

200 OK