<commit_before>import csv
import time
from selenium import webdriver
from selenium.webdriver.support.ui import Select, WebDriverWait
from BeautifulSoup import BeautifulSoup

"""
Scrapes precinct-level results from Nevada SOS site
and generates CSV file for a given jurisdiction.
"""

ELECTIONS = [
    {"year": "2012", "type": "primary", "id": "16", "datestring":"20120712"},
    {"year": "2012", "type": "general", "id": "17", "datestring":"20121106"},
    {"year": "2011", "type": "special_general", "id": "15", "datestring":"20110913"},
    {"year": "2010", "type": "primary", "id": "11", "datestring":"20100608"},
    {"year": "2010", "type": "general", "id": "12", "datestring":"20101102"},
    {"year": "2008", "type": "primary", "id": "7", "datestring":"20080812"},
    {"year": "2008", "type": "general", "id": "8", "datestring":"20081104"},
    {"year": "2006", "type": "primary", "id": "3", "datestring":"20060815"},
    {"year": "2006", "type": "general", "id": "4", "datestring":"20061107"},
    {"year": "2004", "type": "general", "id": "1", "datestring":"20041102"}
]

JURISDICTIONS = [
    {'name': "carson_city", "id": "4"},
    {'name': "churchill", "id": "5"},
    {'name': "clark", "id": "6"},
    {'name': "douglas", "id": "7"},
    {'name': "elko", "id": "8"},
    {'name': "esmeralda", "id": "9"},
    {'name': "eureka", "id": "10"},
    {'name': "humboldt", "id": "11"},
    {'name': "lander", "id": "12"},
    {'name': "lincoln", "id": "13"},
    {'name': "lyon", "id": "14"},
    {'name': "mineral", "id": "15"},
    {'name': "nye", "id": "16"},<commit_msg>special__general<commit_after>import csv
import time
from selenium import webdriver
from selenium.webdriver.support.ui import Select, WebDriverWait
from BeautifulSoup import BeautifulSoup

"""
Scrapes precinct-level results from Nevada SOS site
and generates CSV file for a given jurisdiction.
"""

ELECTIONS = [
    {"year": "2012", "type": "primary", "id": "16", "datestring":"20120712"},
    {"year": "2012", "type": "general", "id": "17", "datestring":"20121106"},
    {"year": "2011", "type": "special__general", "id": "15", "datestring":"20110913"},
    {"year": "2010", "type": "primary", "id": "11", "datestring":"20100608"},
    {"year": "2010", "type": "general", "id": "12", "datestring":"20101102"},
    {"year": "2008", "type": "primary", "id": "7", "datestring":"20080812"},
    {"year": "2008", "type": "general", "id": "8", "datestring":"20081104"},
    {"year": "2006", "type": "primary", "id": "3", "datestring":"20060815"},
    {"year": "2006", "type": "general", "id": "4", "datestring":"20061107"},
    {"year": "2004", "type": "general", "id": "1", "datestring":"20041102"}
]

JURISDICTIONS = [
    {'name': "carson_city", "id": "4"},
    {'name': "churchill", "id": "5"},
    {'name': "clark", "id": "6"},
    {'name': "douglas", "id": "7"},
    {'name': "elko", "id": "8"},
    {'name': "esmeralda", "id": "9"},
    {'name': "eureka", "id": "10"},
    {'name': "humboldt", "id": "11"},
    {'name': "lander", "id": "12"},
    {'name': "lincoln", "id": "13"},
    {'name': "lyon", "id": "14"},
    {'name': "mineral", "id": "15"},
    {'name': "nye", "id": "16"},
{'fraction_non_alphanumeric': 0.29103535353535354, 'fraction_numerical': 0.09785353535353536, 'mean_word_length': 5.036190476190476, 'pattern_counts': {'":': 106, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '303420', 'n_tokens_mistral': 1381, 'n_tokens_neox': 1170, 'n_words': 311}