A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
| import time | |
| import socket | |
| import base64 | |
| src = '192.168.1.2' # ip of remote | |
| mac = '00-AB-11-11-11-11' # mac of remote | |
| remote = 'python remote' # remote name | |
| dst = '192.168.1.3' # ip of tv | |
| app = 'python' # iphone..iapp.samsung |
| --current time in seconds since midnight | |
| set currentTime to (time of (current date)) | |
| ## Morning | |
| -- (04:00 - 10:30) | |
| set morning to 37800 | |
| set morningVolume to 80 | |
| -- Happy: Wake Up in a Good Mood | |
| set morningTrack to "spotify:user:116779154:playlist:5sYrf2RnhPY22meUSS5fUu" |
| // Problems: http://stackoverflow.com/questions/14033588/javascript-click-method-only-works-once-in-chrome-extension | |
| function _anchorDownloader(url, filename) { | |
| var timeout = 500; | |
| return 'javascript:\'<!doctype html><html>'+ | |
| '<head></head>' + | |
| '<script>' + | |
| 'function initDownload() {'+ | |
| 'var el = document.getElementById("anchor");'+ | |
| 'el.click();' + | |
| 'setTimeout(function() { window.close(); }, ' + timeout + ');' + |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |