Skip to content

Instantly share code, notes, and snippets.

Subject Number of students % of all students
Mathematics 99,895 32.3%
Psychology 75,300 24.4%
Biology 68,170 22.1%
Chemistry 58,120 18.8%
History 43,095 13.9%
Sociology 42,115 13.6%
Business studies 40,900 13.2%
Physics 39,935 12.9%
Economics 39,275 12.7%
import random
answer = True
maxint = 1000
numrandom = 10000
books = list(set([random.randint(1, maxint) for _ in range(numrandom)]))
if answer:
#a random set of integers will be a positive example with a very high probability.
selected_books = books
# Sorts 0s and 1s in a sequence.
#to be used at turingmachine.io
input: '0010110100001'
blank: ' '
start state: valid0
table:
# Valid string ending in zero
valid0:
0 : R
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{
"date": "08/08/13",
"YoYgrowth": [
null,
"35.1%",
"37.2%",
null
],
"ticker": "CVT",
@fhuszar
fhuszar / prediction_example.py
Last active June 13, 2022 06:56
This is an example solution to the London Big Data Hackathon Data Science Challenge organised by Data Sceince London on the weekend 13-14 April 2013.
#!/usr/bin/python
# -*- coding: utf8 -*-
# SAMPLE SUBMISSION TO THE BIG DATA HACKATHON 13-14 April 2013 'Influencers in a Social Network'
# .... more info on Kaggle and links to go here
#
# written by Ferenc Huszár, PeerIndex
from sklearn import linear_model
from sklearn.metrics import auc_score