<commit_before>#!/usr/bin/env python
import pycurl
import time
from multiprocessing import Process, Queue
from StringIO import StringIO
start_time = time.time()
round_ix = 0

def spawner():

def dospawn(callsign, url):
  c = pycurl.Curl()
  c.setopt(c.URL, 'http://live.scpr.org/kpcclive/')
  c.setopt(pycurl.WRITEFUNCTION, cback)
  c.perform()
  c.close()

def cback(data): 
  global round_ix, start_time

  round_ix += 1
  print str(float(round_ix) / (time.time() - start_time))
       
<commit_msg>multiprocessed version<commit_after>#!/usr/bin/env python
import pycurl
import time
from multiprocessing import Process, Queue
from StringIO import StringIO
start_time = time.time()
round_ix = 0

def cback(data): 
  global round_ix, start_time

  round_ix += 1
  print str(float(round_ix) / (time.time() - start_time))

def dospawn(callsign, url):
  c = pycurl.Curl()
  c.setopt(c.URL, 'http://live.scpr.org/kpcclive/')
  c.setopt(pycurl.WRITEFUNCTION, cback)
  c.perform()
  c.close()

def spawner():
  p = Process(target=dospawn, args=('kpcc', 'http://live.scpr.org/kpcclive/',))
  p.start()
  p.join()

  
       
spawner()
{'fraction_non_alphanumeric': 0.14463176574977818, 'fraction_numerical': 0.00354924578527063, 'mean_word_length': 4.058295964125561, 'pattern_counts': {'":': 0, '<': 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': '6223162', 'n_tokens_mistral': 454, 'n_tokens_neox': 435, 'n_words': 94}