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
c := db.DB("db").C("queries") | |
result := Query{} | |
iter:=c.Find(nil).Sort("-SumbitTime").Iter() | |
for iter.Next(&result) { | |
if result.gparsed && result.yparsed { | |
fmt.Println("hellp") | |
} else { | |
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
package main | |
import ( | |
"fmt" | |
"net/url" | |
"github.com/PuerkitoBio/goquery" | |
"time" | |
"strings" | |
"strconv" | |
"math/rand" |
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 <iostream> | |
#include <stdlib.h> | |
#include <fstream> | |
#include <algorithm> | |
#include <string> | |
#include <sstream> | |
using namespace std; | |
const int kECBHeaderLength = 36; |
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/python | |
# coding: utf-8 | |
import sys | |
from optparse import OptionParser | |
def sub_xml(data, fields, template, ofield): | |
print "Data :", data |
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/python | |
import os | |
import sys | |
import os.path | |
from optparse import OptionParser | |
import glob | |
from xml.dom.minidom import parse, parseString | |
from xml.dom.minidom import Node |
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
import multiprocessing | |
#used to trigger the permission for request processing | |
RATED_LOCK = multiprocessing.Lock() | |
#used for messaging obout the state of operation: can do new, or can't | |
RATED_QUEUE = multiprocessing.Queue() | |
#rate-limit decorator, but works only in one thread | |
def RateLimited(maxPerSecond): |