Skip to content

Instantly share code, notes, and snippets.

Marcel marcelcaraciolo

Block or report user

Report or block marcelcaraciolo

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
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import confusion_matrix
clf = KNeighborsClassifier(n_neighbors=13), y_train)
print "done"
print "="*20
print clf
print "Confusion Matrix"
from yhat import BaseModel, Yhat
class DigitModel(BaseModel):
def require(self):
from PIL import Image
from StringIO import StringIO
import base64
View node_digit_dependencies.js
var express = require('express')
, routes = require('./routes')
, http = require('http')
, path = require('path')
, fs = require('fs')
, uuid = require('uuid')
, yhat = require('yhat');
var app = express();
var yh = yhat.init("your username", "your apikey");
class VM(object):
def __init__(self, uuid, name, status):
self.uuid = uuid = name
self.status = status
def __repr__(self):
return '%s - %s (%s)' % (self.uuid,, self.status)
def export(self, directory_name=None):
marcelcaraciolo /
Last active Aug 29, 2015
example command
def can_pipe(command, fastq_file):
bwa-mem handles longer (> 70bp) reads with improved piping.
Randomly samples 5000 reads from the first two million.
Default to no piping if more than 75% of the sampled reads are small.
min_size = 70
thresh = 0.75
head_count = 8000000
tocheck = 5000
marcelcaraciolo /
Created Feb 25, 2015
Simple admin example
# -*- coding: utf-8 -*-
import xlwt
from django.contrib import admin
from django.http import HttpResponse
from models import (PaymentForm, Order, OrderItem,
Discount, Affiliate)
from forms import DiscountForm
View gist:560831
for monitoramento in monitor_videos.find():
termos = {}
for video in monitoramento['value']['videos']:
x = db.youtube_history.find({'cod_video': video, 'date_year': final_date.year, 'date_hour': final_date.hour,
'date_month': final_date.month, 'date_day':,
'classificacao': True})
for historico in x:
for termo in historico['terms']:
termos[termo] += historico['view_count']
if you in (depressed, sadness, resignation):
print 'me, my sweetheart'
if feel(you) is 'lonely' or feel(you) is 'neglected':
while always:
if is not me:
# I will follow in the madness
# I will
break # down...
import unittest
from datetime import date, timedelta
Vaga para Desenvolvedor Web na empresa Orygens
Script inspirado
from pyroc import *
random_sample = random_mixture_Model() # Generate a custom set randomly
print random_sample
[(1, 0.53543926503331496), (1, 0.50937533997469853), (1, 0.58701681878005862), (1, 0.57043399840000497),
(1, 0.56229469766270523), (1, 0.6323079028948545), (1, 0.72283523937059946), (1, 0.55079104791257383),
(1, 0.59841921172330748), (1, 0.63361144887035825)]
You can’t perform that action at this time.