Skip to content

Instantly share code, notes, and snippets.

View fayimora's full-sized avatar
🕺

Fayi FB fayimora

🕺
  • London, England
View GitHub Profile
import pandas as pd
from ggplot import *
from sklearn.datasets import fetch_20newsgroups
from sklearn.metrics import roc_curve
# vectorizer
from sklearn.feature_extraction.text import HashingVectorizer
# our classifiers
from sklearn.naive_bayes import BernoulliNB, MultinomialNB
/**
The MIT License (MIT)
Copyright (c) 2013 Jean Helou
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
.hll { background-color: #ffffcc }
.c { color: #586E75 } /* Comment */
.err { color: #93A1A1 } /* Error */
.g { color: #93A1A1 } /* Generic */
.k { color: #859900 } /* Keyword */
.l { color: #93A1A1 } /* Literal */
.n { color: #93A1A1 } /* Name */
.o { color: #859900 } /* Operator */
.x { color: #CB4B16 } /* Other */
.p { color: #93A1A1 } /* Punctuation */
/* global google */
var GoogleMapComponent = Ember.Component.extend({
places: [],
width: 500,
height: 500,
attributeBindings: ['style'],
style: function () {
return 'width:'+this.width+'px; height:'+this.height+'px';
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client
@fayimora
fayimora / Quine.c
Created December 5, 2013 15:17 — forked from nocturnalact/Quine.c
/** my sample quine code**/ #include <stdio.h>
static char quine[] = "\n\t\\\"";
int main(void) {
const char *code = "/** my sample quine code**/ #include <stdio.h>%c%cstatic char quine[] = %c%cn%ct%c%c%c%c%c;%c%cint main(void) {%c%cconst char *code = %c%s%c;%c%cprintf(code, quine[0], quine[0], quine[3], quine[2], quine[2], quine[2], quine[2], quine[2], quine[3], quine[3], quine[0], quine[0], quine[0], quine[1], quine[3], code, quine[3], quine[0], quine[1], quine[0], quine[0], quine[1], quine[0], quine[0]);%c%c%creturn 0;%c}%c";
printf(code, quine[0], quine[0], quine[3], quine[2], quine[2], quine[2], quine[2], quine[2], quine[3], quine[3], quine[0], quine[0], quine[0], quine[1], quine[3], code, quine[3], quine[0], quine[1], quine[0], quine[0], quine[1], quine[0], quine[0]);
return 0;
}
@fayimora
fayimora / ExamProg.java
Last active December 29, 2015 17:59 — forked from anonymous/ExamProg
import javax.swing.*;
class ExamProg
{
public static void main (String[] param)
{
askfood();
System.exit(0);
}
/*
* Copyright (c) 2012, Lawrence Livermore National Security, LLC. Produced at
* the Lawrence Livermore National Laboratory. Written by Keith Stevens,
* kstevens@cs.ucla.edu OCEC-10-073 All rights reserved.
*
* This file is part of the S-Space package and is covered under the terms and
* conditions therein.
*
* The S-Space package is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as published
@fayimora
fayimora / .ctags
Created July 2, 2013 13:33 — forked from jg/.ctags
--langdef=Scala
--langmap=Scala:.scala
--regex-Scala=/^[ \t]*class[ \t]*([a-zA-Z0-9_]+)/\1/c,classes/
--regex-Scala=/^[ \t]*object[ \t]*([a-zA-Z0-9_]+)/\1/o,objects/
--regex-Scala=/^[ \t]*trait[ \t]*([a-zA-Z0-9_]+)/\1/t,traits/
--regex-Scala=/^[ \t]*case[ \t]*class[ \t]*([a-zA-Z0-9_]+)/\1/r,cclasses/
--regex-Scala=/^[ \t]*abstract[ \t]*class[ \t]*([a-zA-Z0-9_]+)/\1/a,aclasses/
--regex-Scala=/^[ \t]*def[ \t]*([a-zA-Z0-9_=]+)[ \t]*.*[:=]/\1/m,methods/
--regex-Scala=/[ \t]*val[ \t]*([a-zA-Z0-9_]+)[ \t]*[:=]/\1/V,values/
--regex-Scala=/[ \t]*var[ \t]*([a-zA-Z0-9_]+)[ \t]*[:=]/\1/v,variables/