This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Dependencies for the template, React is | |
// required for JSX transform. | |
import React from 'react'; | |
// Other templates and components can be | |
// imported here | |
import OtherTemplate from './other'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* I provide a concise way of matching types: | |
* | |
* matcher(new ReferenceError('Naughty reference')) | |
* (TypeError, err => console.error('You gone done used the wrong type!')) | |
* (ReferenceError, err => console.error('There was a reference error')) | |
* (err => console.error('Dunno what that was...')) | |
*/ | |
var matcher = function (obj) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
public class ProductViewResponseBean implements java.io.Serializable { | |
public ProductViewResponseBean() { | |
// Code here | |
} | |
public void setResponse(Map response) { | |
// Code here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | |
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | |
version="3.0"> | |
<servlet> | |
<servlet-name>cfml</servlet-name> | |
<description>CFML runtime</description> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Server | |
port="8005" | |
shutdown="SHUTDOWN"> | |
<!-- ... --> | |
<Service name="MyExampleService"> | |
<Connector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A mixture of people and gibberish... | |
var people = [{ | |
name: 'Joe' | |
}, { | |
name: 'Greg', | |
friends: [ 'Joe', 'Sue' ], | |
attrs: { | |
age: 42 | |
} | |
}, {}, null, 12, "Hello"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset test = CreateObject( "java", "my.custom.TestObject" ) /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The statsd.js config file | |
{ | |
// Leave graphitePort and graphiteHost unset to avoid sending stats to Graphite. | |
// Set debug flag and leave these unset to run in 'dry' debug mode - | |
// useful for testing statsd clients without a Graphite server. | |
// Hostname or IP of Graphite server | |
//graphitePort: 2003, | |
// Port of Graphite server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Math.floor(Math.log10(x)) + 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
sigmoid = lambda z: 1/(1+numpy.exp(-z)) | |
# Or for free... | |
from scipy.special import expit | |
# https://github.com/scipy/scipy/blob/e758c482efb8829685dcf494bdf71eeca3dd77f0/scipy/special/_logit.c.src#L29 | |
Z = numpy.matrix(((0.0, float('inf')), (1.0, float('-inf')))) | |
sigmoid(Z) | |
# matrix([[ 0.5 , 1. ], |