Skip to content

Instantly share code, notes, and snippets.

geraldstanje

Block or report user

Report or block geraldstanje

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:06c790adbb633e6d0c4f
find . -name "*.php" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done
View gist:bf87d04781da60c91f63
################################################################################
#
# Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
#
# NVIDIA Corporation and its licensors retain all intellectual property and
# proprietary rights in and to this software and related documentation.
# Any use, reproduction, disclosure, or distribution of this software
# and related documentation without an express license agreement from
# NVIDIA Corporation is strictly prohibited.
#
View gist:6113322effcaa4f233c6
################################################################################
#
# Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
#
# NVIDIA Corporation and its licensors retain all intellectual property and
# proprietary rights in and to this software and related documentation.
# Any use, reproduction, disclosure, or distribution of this software
# and related documentation without an express license agreement from
# NVIDIA Corporation is strictly prohibited.
#
View gist:51c292d691c3732c84cf
#! /usr/bin/python
from sklearn.feature_extraction.text import CountVectorizer
content = ["Bursting the Big Data bubble starts with appreciating certain nuances about its products and patterns","the real solutions that are useful in dealing with Big Data will be needed and in demand even if the notion of Big Data falls from the height of its hype into the trough of disappointment"]
X = vectorizer.fit_transform(content)
vectorizer = CountVectorizer(min_df=1)
print(vectorizer)
@geraldstanje
geraldstanje / Makefile
Created Aug 2, 2014
common-gcc-cuda-4.0.mk
View Makefile
MODELNAME := _ConvNet
INCLUDES := -DCUDA_6 -I$(PYTHON_INCLUDE_PATH) -I$(CUDA_HELPER_INCLUDE_PATH) -I$(ATLAS_INCLUDE_PATH) -I$(NUMPY_INCLUDE_PATH) -I$(CUDA_SDK_PATH) -I./include -I./include/common -I./include/cudaconv2 -I./include/nvmatrix -I./dummyinclude/
#INCLUDES := -I$(PYTHON_INCLUDE_PATH) -I$(ATLAS_INCLUDE_PATH) -I$(NUMPY_INCLUDE_PATH) -I./include -I./include/common -I./include/cudaconv2 -I./include/nvmatrix
LIB := -lpthread -L$(ATLAS_LIB_PATH) -L$(CUDA_INSTALL_PATH)/lib -lcblas
USECUBLAS := 1
PYTHON_VERSION=$(shell python -V 2>&1 | cut -d ' ' -f 2 | cut -d '.' -f 1,2)
LIB += -lpython$(PYTHON_VERSION)
View gist:4a317489448f080f7a36
import net.liftweb.json.Xml // converts XML to JSON
import com.mongodb.casbah.Imports._ // To put stuff in Mongo
import com.mongodb.casbah.MongoDB // To connect to Mongo
import com.mongodb.util.JSON // To parse JSON into a MongoDBObject
import net.liftweb.json._ // To output Lift JSON as actual JSON
import scala.xml.XML // To load XML
// load the XML
val xml = XML.load("http://www.w3schools.com/xml/note.xml")
// fire up mongo connection
View gist:2517a923d6a75f7a4d2e
package main
import "fmt"
import "go/parser"
import "go/ast"
const debug = true
// Define one of these for each translation you need.
type Translator func(node *ast.CallExpr) string
View gist:2e6ca5b1ada087ec97c0
package main
import (
"log"
"os"
"text/template"
"regexp"
)
var reg = regexp.MustCompile(`(^[^/]+[\w]+)\(([\w]*)[,\s]*([\w]*)\);`)
View gist:cfaf6919ccae6fbf2744
package main
import "encoding/json"
import "fmt"
import "bytes"
type tableEntry struct {
Name string
Age string
Gender string
View gist:3e507756e32cf5df9dfe
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package heap provides heap operations for a type A and a comparison
// function Less. A heap is a tree with the property that each node
// is the minimum-valued node in its subtree.
//
// The minimum element in the tree is the root, at index 0.
//
You can’t perform that action at this time.