Skip to content

Instantly share code, notes, and snippets.

View emptymalei's full-sized avatar
📡
sending EM waves to Mars

LM emptymalei

📡
sending EM waves to Mars
View GitHub Profile
User_ID Calories
14733363 231.0
14861698 66.0
11179863 26.0
16180408 71.0
17771927 35.0
15130815 123.0
19602372 112.0
11117088 143.0
12132339 134.0
@emptymalei
emptymalei / python request module
Created June 3, 2019 20:12
GIST created by python code
Python requests has 3 parameters: 1)Request URL
2)Header Fields
3)Parameter
4)Request body
@emptymalei
emptymalei / gm_2008_region.csv
Created June 3, 2019 17:48
regression_data_sample
population fertility HIV CO2 BMI_male GDP BMI_female life child_mortality Region
34811059.0 2.73 0.1 3.328944661018629 24.5962 12314.0 129.9049 75.3 29.5 Middle East & North Africa
19842251.0 6.43 2.0 1.4743533878509398 22.25083 7103.0 130.1247 58.3 192.0 Sub-Saharan Africa
40381860.0 2.24 0.5 4.78516998252535 27.5017 14646.0 118.8915 75.5 15.4 America
2975029.0 1.4 0.1 1.8041062172001 25.35542 7383.0 132.8108 72.5 20.0 Europe & Central Asia
21370348.0 1.96 0.1 18.0163132681972 27.56373 41312.0 117.3755 81.5 5.2 East Asia & Pacific
8331465.0 1.41 0.3 8.18316001754696 26.46741 43952.0 124.1394 80.4 4.6 Europe & Central Asia
8868713.0 1.99 0.1 5.10953829181389 25.65117 14365.0 128.6024 70.6 43.3 Europe & Central Asia
348587.0 1.89 3.1 3.13192132134112 27.24594 24373.0 124.3862 72.2 14.5 America
148252473.0 2.38 0.06 0.31916100201885805 20.39742 2265.0 125.0307 68.4 55.9 South Asia
# 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
emptymalei / perlbrew_libgcc_s.txt
Created May 8, 2019 18:14 — forked from Dreyer/perlbrew_libgcc_s.txt
[perlbrew] ld: library not found for -lgcc_s.10.4
$ 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
@emptymalei
emptymalei / error message installing nokogiri
Last active May 8, 2019 18:10
gem install nokogiri problem
An error occurred while installing nokogiri
(1.8.0), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.0'
--source 'https://rubygems.org/'` succeeds before
bundling.

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@emptymalei
emptymalei / README.md
Created January 23, 2019 22:56
The Central Limit Theorem

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

// [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
emptymalei / BigQuery2GSheets.js
Created January 14, 2019 13:40 — forked from greenido/BigQuery2GSheets.js
An Apps script example to fetch data form Big query to google spreadsheets. For more: http://wp.me/pB1lQ-19i
/**
* Fetching data from BigQuery and present it in our sheet
* Author: Ido Green
* Date: 14/12/2013
*
* See: http://wp.me/pB1lQ-19i
* Misc: https://developers.google.com/bigquery/
*/
//