Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am torryt on github.
  • I am guidoperl (https://keybase.io/guidoperl) on keybase.
  • I have a public key ASDJhLDznFvIzb6d96uL0V7yTGjduMLJHxqd66WRduobgQo

To claim this, I am signing this object:

const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const config = {
entry: {
app: './app/index.tsx',
styles: './app/style/main.less',
},
output: {
getExplanationSection() {
const explanation = this.props.explanation;
if (explanation !== undefined) {
return (
<div onClick={() => this.setState({ expanded: !this.state.expanded })}>
<section className={'nokkeltall-explanation'}>
{explanation}
</section>
</div>
);
def load_car():
bc = Bunch()
fn = osp.join(osp.dirname(__file__), 'car.csv')
with open(fn, 'r') as csvfile:
data = np.array(list(csv.reader(csvfile))).T.tolist()
numeric_data = [to_numeric(col) for col in data]
ndata = np.array(numeric_data).T
bc.target = ndata[:, -1]
bc.data = ndata[:, 0:-1]
return bc
@torryt
torryt / index.d.ts
Last active February 16, 2017 15:10
declare module 'react-dates' {
import { Component } from 'react';
import { Moment } from 'moment';
interface MomentAction {
() : Moment;
}
export interface DateInterval {
startDate: Moment;
endDate: Moment;
@torryt
torryt / delete.sh
Created December 13, 2016 12:50
Delete all local and remote git tags
# Slightly modified version of https://gist.github.com/okunishinishi/9424779
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs git push --delete origin
#Delete local tags.
git tag -l | xargs git tag -d