Skip to content

Instantly share code, notes, and snippets.

sending EM waves to Mars

LM emptymalei

sending EM waves to Mars
Block or report user

Report or block emptymalei

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
emptymalei /
Created Sep 6, 2019 — forked from Susensio/
Inherit property setter in python 3.7

Python @property inheritance the right way

Given a Parent class with value property, Child can inherit and overload the property while accessing Parent property getter and setter.

Although we could just reimplement the Child.value property logic completely without using Parent.value whatsover, this would violate the DRY principle and, more important, it wouldn't allow for proper multiple inheritance (as show in the example bellow).

Two options:

  • Child redefines value property completely, both getter and setter.
View gist:3b517b6382357e8b4183c455d0ce38fb
# This is a really old post, in the comments (and stackoverflow too) you'll find better solutions.
def find(key, dictionary):
for k, v in dictionary.iteritems():
if k == key:
yield v
elif isinstance(v, dict):
for result in find(key, v):
yield result
elif isinstance(v, list):
emptymalei / perlbrew_libgcc_s.txt
Created May 8, 2019 — forked from Dreyer/perlbrew_libgcc_s.txt
[perlbrew] ld: library not found for -lgcc_s.10.4
View perlbrew_libgcc_s.txt
$ cd /usr/local/lib
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.4.dylib
View gist:0db5dc160449ed8637433803cb86d067

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices


emptymalei /
Created Jan 23, 2019
The Central Limit Theorem

This animation demonstrates the central limit theorem for a uniform sampling distribution.

View BigQuery_to_Google_sheet.js
// [START apps_script_bigquery_update_sheet]
* Runs a BigQuery query and replace the existing sheet
* Add a custom menu to the spreadsheet when it is opened.
function onOpen() {
var spreadsheet = SpreadsheetApp.getActive();
emptymalei / BigQuery2GSheets.js
Created Jan 14, 2019 — forked from greenido/BigQuery2GSheets.js
An Apps script example to fetch data form Big query to google spreadsheets. For more:
View BigQuery2GSheets.js
* Fetching data from BigQuery and present it in our sheet
* Author: Ido Green
* Date: 14/12/2013
* See:
* Misc:
emptymalei /
Created Nov 7, 2018 — forked from messefor/
Example to show how to plot histogram with accumulate ratio. Plot multiple histograms using seaborn.FacetGrid().
"""Example to show how to plot histogram with accumulate ratio.
Plot multiple histogram using seaborn.FacetGrid()
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
% matplotlib inline
  • Update HISTORY.rst
  • Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.


The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

You can’t perform that action at this time.