Skip to content

Instantly share code, notes, and snippets.

View tau0's full-sized avatar

Nick Sukhanov tau0

  • Facebook
  • London
View GitHub Profile
#include <iostream>
using namespace std;
vector<int> doubleValues (const vector<int>& v)
{
vector<int> new_values;
new_values.reserve();
for (auto itr = v.begin(), end_itr = v.end(); itr != end_itr; ++itr )
{
@tau0
tau0 / brew build log
Created August 31, 2014 20:06
Octave build logs
This file has been truncated, but you can view the full file.
Warning: No Fortran optimization information was provided. You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.
If you like the default optimization level of your compiler, ignore this
warning.
Warning: No Fortran optimization information was provided. You may want to consider
setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to
`brew install` if your compiler is compatible with GCC.
@tau0
tau0 / codeforces tags
Created November 3, 2014 18:05
codeforces tags distribution
import json
import urllib2
url = "http://codeforces.com/api/problemset.problems"
data = json.dumps({})
req = urllib2.Request(url, data, {'Content-Type': 'application/json'})
f = urllib2.urlopen(req)
response = f.read()
f.close()
data = json.loads(response)
@tau0
tau0 / tags distribution for codeforses
Last active April 29, 2024 18:44
tags distribution for codeforses
import json
import operator
# Original version by tau0 and st3v3n on codeforces
# Go the URL below on your browser and download the file to the same directory as this script
# https://codeforces.com/api/problemset.problems
data = json.load(open("/Users/tau0/Downloads/problemset.problems.json"))
counter = dict()
problems = data["result"]["problems"]