This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
#define FAST ios::sync_with_stdio(false) | |
#define mp make_pair | |
#define mt make_tuple | |
#define pb push_back | |
#define fi first | |
#define se second | |
#define sz(x) ((int) (x).size()) | |
#define a_size(x) sizeof(x)/sizeof(x[0]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import HttpResponse | |
from django.views.generic import View | |
from django.views.generic.base import TemplateView, RedirectView | |
from {$APP_NAME}.models import UserProfile, OAuthProvider | |
from django.contrib.auth import authenticate, login, logout | |
from django.contrib.auth.models import User | |
import requests | |
BASE_URL = "http://straightmart.com/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.4 | |
import sys | |
#input from STDIN | |
for line in sys.stdin: | |
#remove all trailing and leading whitespaces | |
line = line.strip() | |
#split line into words | |
words = line.split() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.4 | |
from operator import itemgetter | |
import sys | |
current_word = None | |
current_count = 0 | |
word = None | |
#mappers output and reducers input |