Skip to content

Instantly share code, notes, and snippets.

# encoding: utf-8
'''
eval_events_euro2016 -- Evaluation of event detection using Precision, Recall and F1
'''
from __future__ import division
import sys
import os.path
from datetime import datetime, timedelta
import re
# encoding: utf-8
'''
eval_events_euro2016 -- Evaluation of event detection using Precision, Recall and F1
'''
from __future__ import division
import sys
import os.path
from datetime import datetime, timedelta
import re
@irokez
irokez / alert.js
Last active August 29, 2015 14:02
alert();
@irokez
irokez / candy_splitting.py
Created April 11, 2012 21:55
Problem C. Candy Splitting
import sys
T = int(sys.stdin.readline().strip())
for t in range(T):
C = int(sys.stdin.readline().strip())
num = sorted(int(n) for n in sys.stdin.readline().strip().split(' '))
left = 0
right = 0
<?php
function writeln ($str) {
echo $str . PHP_EOL;
}
$GLOBALS['cured'] = 1;
function cure($file) {
$re_infected = '\<\?php \/\*\*\/ eval\(base64_decode\("[a-zA-Z0-9\=\/\+]+"\)\);\?\>';
var popup = $('<div>', {
'class': 'popup'
}).appendTo(item);
var corner_wrap = $('<div>', {
'class': 'corner-wrap'
}).appendTo(popup);
var corner = $('<span>', {
'class': 'corner'
}).appendTo(corner_wrap);
@irokez
irokez / solutions
Created February 10, 2012 23:30
Apply embed.ly
problem 1:
>>> fc = lambda n: 1 if n <= 1 else n * fc(n - 1)
>>> def r(n):
... s = str(n)
... d = 0
... for i in s:
... d += int(i)
... return d
>>> R = lambda n: r(fc(n))
>>> i = 0