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)
// CSS Color Names | |
// Compiled by @bobspace. | |
// | |
// A javascript object containing all of the color names listed in the CSS Spec. | |
// This used to be a big array, but the hex values are useful too, so now it's an object. | |
// If you need the names as an array use Object.keys, but you already knew that! | |
// | |
// The full list can be found here: https://www.w3schools.com/cssref/css_colors.asp | |
// Use it as you please, 'cuz you can't, like, own a color, man. |
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<html> | |
<head> | |
<title>Google Test Report</title> | |
</head> | |
<body> | |
<table cellpadding="2" cellspacing="0" width="100%" border="1"> |
# Get all nodes of type Read | |
readnodes = nuke.allNodes('Read') | |
for readnode in readnodes: | |
print readnode | |
# List all knobs for selected node | |
print( nuke.toNode('Read1') ) | |
# List all knobs for specific node | |
print( nuke.selectedNode() ) |
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)
// NOTICE 2020-04-18 | |
// Please see the comments below about why this is not a great PRNG. | |
// Read summary by @bryc here: | |
// https://github.com/bryc/code/blob/master/jshash/PRNGs.md | |
// Have a look at js-arbit which uses Alea: | |
// https://github.com/blixt/js-arbit | |
/** |
package main | |
import ( | |
"fmt" | |
"image" | |
"image/color" | |
"image/gif" | |
"math" | |
"os" | |
) |
/** | |
* Draw an arrowhead on a line on an HTML5 canvas. | |
* | |
* Based almost entirely off of http://stackoverflow.com/a/36805543/281460 with some modifications | |
* for readability and ease of use. | |
* | |
* @param context The drawing context on which to put the arrowhead. | |
* @param from A point, specified as an object with 'x' and 'y' properties, where the arrow starts | |
* (not the arrowhead, the arrow itself). | |
* @param to A point, specified as an object with 'x' and 'y' properties, where the arrow ends |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft