code
stringlengths
1
1.72M
language
stringclasses
1 value
# -*- coding: utf-8 -*- from appenginepatcher import on_production_server, have_appserver import os DEBUG = not on_production_server # The MEDIA_VERSION will get integrated via %d MEDIA_URL = '/media/%d/' # The MEDIA_URL will get integrated via %s ADMIN_MEDIA_PREFIX = '%sadmin_media/' ADMINS = () DATABASE_ENGINE = '...
Python
from django.conf import settings from django.http import HttpResponseServerError from ragendja.template import render_to_string def server_error(request, *args, **kwargs): debugkey = request.REQUEST.get('debugkey') if debugkey and debugkey == getattr(settings, 'DEBUGKEY', None): import sys from...
Python
# -*- coding: utf-8 -*- from django.conf import settings from django.utils.cache import patch_cache_control from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError from google.appengine.ext import db from ragendja.template import render_to_response from ragendja.views import server_error, maintenan...
Python
# -*- coding: utf-8 -*- from settings import * import sys if '%d' in MEDIA_URL: MEDIA_URL = MEDIA_URL % MEDIA_VERSION if '%s' in ADMIN_MEDIA_PREFIX: ADMIN_MEDIA_PREFIX = ADMIN_MEDIA_PREFIX % MEDIA_URL TEMPLATE_DEBUG = DEBUG MANAGERS = ADMINS # You can override Django's or some apps' locales with these folder...
Python
# -*- coding: utf-8 -*- from django.db.models import signals from django.http import Http404 from django.utils import simplejson from google.appengine.ext import db from ragendja.pyutils import getattr_by_path from random import choice from string import ascii_letters, digits def get_filters(*filters): """Helper m...
Python
#!/usr/bin/env python if __name__ == '__main__': from common.appenginepatch.aecmd import setup_env setup_env(manage_py_env=True) # Recompile translation files from mediautils.compilemessages import updatemessages updatemessages() # Generate compressed media files for manage.py update impor...
Python
from ragendja.settings_post import settings settings.add_app_media('combined-%(LANGUAGE_CODE)s.js', 'jquery/jquery.js', 'jquery/jquery.fixes.js', 'jquery/jquery.ajax-queue.js', 'jquery/jquery.bgiframe.js', 'jquery/jquery.livequery.js', 'jquery/jquery.form.js', )
Python
#!/usr/bin/env python if __name__ == '__main__': from common.appenginepatch.aecmd import setup_env setup_env(manage_py_env=True) # Recompile translation files from mediautils.compilemessages import updatemessages updatemessages() # Generate compressed media files for manage.py update impor...
Python
''' Created on May 21, 2010 Cleans up projects stuck in In_Progress for GitHub @author: StevenNorris ''' import sys from GitHubutils import GitHubutils import traceback def main(argv): try: datasource_id=argv[1] test=argv[2] except: print("Format arguments thus...
Python
''' Created on Jun 5, 2009 @author: Steven Norris This module provides basic utilities for the FLOSS mole spiders. ''' import MySQLdb import httplib import traceback class GitHubutils: #this gathers the initial connection to the database def __init__(self,file_name): try: ...
Python
''' Created on Jul 18, 2009 @author: Steven Norris This module creates the jobs to be run for GitHub RUN INSTRUCTIONS Run from command line using this format [Interpret] GitHubJobs.py [DatasourceID] [Test mode True/False] Test mode is based on string comparison so make sure capitalization and spelling ...
Python
''' Created on Jul 19, 2009 This module houses all the parsers needed for GitHub @author: Steven Norris ''' import re #This parses the description for the XML def parse_description(xml): p=re.compile('<description>.+?</description>',re.DOTALL) results=p.findall(xml) if(results): d...
Python
''' Created on Jun 9, 2009 @author: Steven Norris This module runs the jobs from github.com. RUN INSTRUCTIONS Run from command line using this format [Interpret] GitHubSpider.py [DatasourceID] [Test mode True/False] Test mode is based on string comparison so make sure capitalization and spelling are exac...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_60day jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_60day jobs print("\nStarting 60day clean up.") #Gets Job job=utils.get_cleanup_job(datasou...
Python
''' Created on Apr 12, 2010 This method is made to clean up the jobs left In_Progress by machine error and prepare them for a second run. @author: StevenNorris ''' from SourceForgeUtils import SourceForgeUtils import sys import SourceForgeIndexCleanUp import SourceForgeDevelopmentCleanUp import SourceForgeDe...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_messages jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_messages jobs print("\nStarting messages clean up.") #Gets Job job=utils.get_cleanup_jo...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_memberlist jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_memberlist jobs print("\nStarting developers clean up.") #Gets Job job=utils.get_clea...
Python
''' Created on Feb 14, 2010 This module collects the donor page for each project. @author: Steven Norris ''' import re import sys import traceback import time BASE_SITE='sourceforge.net/' #The spiders the given page for the donors link def donorsSpider(html): matches=re.search('project/project...
Python
''' Created on Apr. 12, 2010 This module performs the clean up for gather_index jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_index jobs print("\nStarting index clean up.") #Gets Job job=utils.get_cleanup_job(dataso...
Python
''' Created on Dec 13, 2009 This module collects the mailing list page for each project given a utilities module and datasource_id. @author: Steven Norris ''' import re import sys import time BASE_INDEX='sourceforge.net/projects/' BASE_SITE='sourceforge.net/' #This parses the mailnglist link from ...
Python
''' Created Dec. 13, 2009 This module is used to spider the mailing list pages for message pages and store them in the database. @author: Steven Norris ''' import re import sys import time from datetime import date BASE_INDEX='sourceforge.net/mailarchive/' BASE_SITE='sourceforge.net/' def mailing_m...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_mailinglistsspecific jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_mailinglistsspecfic jobs print("\nStarting mailing lists specific clean up.") #G...
Python
''' Created on Aug 16, 2009 This module is designed to populate the jobs database for sourceforge.net. RUN INSTRUCTIONS Run this module from command line with the following format: [Interpreter] SourceForgeJobs.py [datasource_id] [Test T/F] Test is a string variable. Be sure to use a capital 'T' to denote test ...
Python
''' Created on Dec 13, 2009 This module is used to spider the main mailing list page for each project and insert it's subsequent specific mailing list pages into the database. @author: Steven Norris ''' import re import sys import time BASE_INDEX='sourceforge.net/projects/' BASE_SITE='sourceforge.net...
Python
''' Created on Aug 16, 2009 This module includes the necessary utilities for the source forge spider. @author: StevenNorris ''' import MySQLdb import traceback import urllib2 import socket class SourceForgeUtils: #this gathers the initial connection to the database def __init__(self,file_name): ...
Python
''' Created on Sep 28, 2009 This module spiders the yearly stats page for each job and prepares for individual developer spidering. @author: Steven Norris ''' import re import sys import traceback import time BASE_INDEX='sourceforge.net/projects/' BASE_SITE='sourceforge.net/' #This spider finds the...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_year jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_60day jobs print("\nStarting year clean up.") #Gets Job job=utils.get_cleanup_job(datasourc...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_development jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_development jobs print("\nStarting development clean up.") #Gets Job job=utils.get_c...
Python
''' Created on Oct 14, 2009 This module is used after an initial run to rerun any timed out errors. @author: Steven Norris ''' from SourceForgeUtils import SourceForgeUtils import sys import SourceForge60day import SourceForgeYear #!!!!WARNING!!!!! Running this error fix will only collect 60day stats a...
Python
''' Created on Sep 28, 2009 This module spiders the 60 day stats page for each job and prepares for yearly spidering. @author: Steven Norris ''' import re import sys import traceback import time BASE_INDEX='sourceforge.net/projects/' BASE_SITE='sourceforge.net/' #This spider finds the link fot the ...
Python
''' Created on Sep 28, 2009 This module spiders the developers page for each project and prepares for 60 day stats spidering. @author: Steven Norris ''' import re import sys import traceback import time BASE_INDEX='sourceforge.net/projects/' BASE_SITE='sourceforge.net/' #This spider finds the membe...
Python
''' Created on Sep 28, 2009 This module spiders the individual developer pages for each job and completes the job cycle. @author: Steven Norris ''' import re import sys import traceback import time BASE_INDEX='sourceforge.net/projects/' BASE_SITE='sourceforge.net/' def developersSpider(page): ...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_resumes jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_resumes jobs print("\nStarting resumes clean up.") #Gets Job job=utils.get_cleanup_job(d...
Python
''' Created on Sep 28, 2009 This module spiders the index page of each job and prepares for development spidering. @author: Steven Norris ''' import re import sys import traceback import time BASE_INDEX='sourceforge.net/projects/' BASE_SITE='sourceforge.net/' def run(utils,datasource_id,stage): ...
Python
''' Created on Sep 28, 2009 This module spiders the development pages for each job and prepares for the developers spidering. @author: Steven Norris ''' import re import sys import traceback import time BASE_INDEX='sourceforge.net/projects/' BASE_SITE='sourceforge.net/' #This spider finds the links...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_mailinglists jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_mailinglists jobs print("\nStarting mailing lists clean up.") #Gets Job job=utils.g...
Python
''' Created Dec. 13, 2009 This module is used to spider the mailing list pages for message pages and store them in the database. @author: Steven Norris ''' import re import sys import time BASE_INDEX='sourceforge.net/mailarchive/' BASE_SITE='sourceforge.net/' #This method finds page links for a mail...
Python
''' Created on Aug 16, 2009 This module is designed to run the necessary code to spider the information from sourceforge.net and add the information to the oss_mole database. RUN INSTRUCTIONS Run this module from command line with the following format: [Interpreter] SourceForgeSpider.py [datasource_id] [Test T...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_donors jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_donors jobs print("\nStarting donors clean up.") #Gets Job job=utils.get_cleanup_job(data...
Python
# -*- coding: utf-8 -*- import re import StringIO import sys import os import tarfile import zipfile #from pyparsing import dblQuotedString #from pyparsing import sglQuotedString import sqlalchemy from sqlalchemy import * import shutil from mpi4py import MPI import ConfigParser config = ConfigParser.RawConfigParser() ...
Python
# Carter Kozak # c4kofony@gmail.com # ckozak@elon.edu # parser for Tigris data # flossmole.org # Copyright (C) 2011 Carter Kozak # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versio...
Python
# Carter Kozak # c4kofony@gmail.com # ckozak@elon.edu #collector for Tigris data # flossmole.org # Copyright (C) 2011 Carter Kozak # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ver...
Python
# Carter Kozak # c4kofony@gmail.com # ckozak@elon.edu #collector/parser for Tigris mailing list data # flossmole.org # Copyright (C) 2011 Carter Kozak # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Fou...
Python
''' Created on Apr 12, 2010 This method is made to clean up the jobs left In_Progress by machine error and prepare them for a second run. @author: StevenNorris ''' from GoogleCodeUtils import GoogleCodeUtils import sys import GoogleCodeHomeCleanUp import GoogleCodeUpdatesCleanUp import GoogleCodePeopleCleanU...
Python
''' Created on Mar 27, 2010 This module does the spidering for the code.google.com project people pages. @author: StevenNorris ''' BASE_LINK="http://code.google.com/p/" import sys import time import traceback def run(utils,datasource_id): print("\nGathering people pages.") #runs jobs ...
Python
''' Created on Mar 27, 2010 This module is designed to populate the jobs database for sourceforge.net. RUN INSTRUCTIONS Run this module from command line with the following format: [Interpreter] GoogleCodeJobs.py [datasource_id] [Test T/F] Test is a string variable. Be sure to use a capital 'T' to denote test m...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_issues jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_issues jobs print("\nStarting issues clean up.") #Gets Job job=utils.get_cleanup_job(data...
Python
''' Created on Mar 27, 2010 This module does the spidering for the code.google.com project home pages. @author: StevenNorris ''' BASE_LINK="http://code.google.com/p/" import sys import time import traceback def run(utils,datasource_id): print("\nGathering home pages.") #runs jobs job...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_home jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_home jobs print("\nStarting home clean up.") #Gets Job job=utils.get_cleanup_job(datasource...
Python
''' Created on Mar 27, 2010 This module does the spidering for the code.google.com project wiki pages. @author: StevenNorris ''' BASE_LINK="http://code.google.com/p/" import sys import time import traceback def run(utils,datasource_id): print("\nGathering wiki pages.") #runs jobs job...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_updates jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_updates jobs print("\nStarting updates clean up.") #Gets Job job=utils.get_cleanup_job(d...
Python
''' Created on Mar 27, 2010 This module does the spidering for the code.google.com project individual people pages. @author: StevenNorris ''' BASE_LINK="http://code.google.com" import sys import time import traceback import re #This method spiders the given page for the specific people links def people...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_downloads jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_downloads jobs print("\nStarting downloads clean up.") #Gets Job job=utils.get_cleanup...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_people jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_people jobs print("\nStarting people clean up.") #Gets Job job=utils.get_cleanup_job(data...
Python
''' Created on Mar 27, 2010 This module does the spidering for the code.google.com project issues pages. @author: StevenNorris ''' BASE_LINK="http://code.google.com/p/" import sys import time import traceback def run(utils,datasource_id): print("\nGathering issues pages.") #runs jobs ...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_people_specific jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_wiki jobs print("\nStarting people specific clean up.") #Gets Job job=utils.get_...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_wiki jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_wiki jobs print("\nStarting wiki clean up.") #Gets Job job=utils.get_cleanup_job(datasource...
Python
''' Created on Mar 27, 2010 This module is designed to run the necessary code to spider the information from code.google.com and add the information to the oss_mole database. RUN INSTRUCTIONS Run this module from command line with the following format: [Interpreter] GoogleCodeSpider.py [datasource_id] [Test T/...
Python
''' Created on Mar 27, 2010 This module does the spidering for the code.google.com project individual issue pages. @author: StevenNorris ''' BASE_LINK="http://code.google.com" import sys import time import traceback import re #This method spiders the given page for the individual issue links def issues...
Python
''' Created on Mar 27, 2010 This module includes the necessary utilities for the Google Code spider. @author: StevenNorris ''' import MySQLdb import traceback import urllib2 import socket class GoogleCodeUtils: #this gathers the initial connection to the database def __init__(self,file_name): ...
Python
''' Created on Mar 27, 2010 This module does the spidering for the code.google.com project downloads pages. @author: StevenNorris ''' BASE_LINK="http://code.google.com/p/" import sys import time import traceback def run(utils,datasource_id): print("\nGathering downloads pages.") #runs job...
Python
''' Created on Apr 12, 2010 This module performs the clean up for gather_issues_specific jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up gather_wiki jobs print("\nStarting people specific clean up.") #Gets Job job=utils.get_...
Python
''' Created on Mar 27, 2010 This module does the spidering for the code.google.com project updates pages. @author: StevenNorris ''' BASE_LINK="http://code.google.com/p/" import sys import time import traceback def run(utils,datasource_id): print("\nGathering updates pages.") #runs jobs ...
Python
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly invalid) XML or HTML document into a tree representation. It provides methods and Pythonic idioms that make it easy to navigate, search, and modify the tree. A well-formed X...
Python
''' Created on May 2, 2010 @author: StevenNorris ''' import SavannahParsers import sys import traceback def run(utils,data_source_id): #Parses indexes for projects print("\nParsing Indexes") job=utils.get_job(data_source_id,'indexparsing') if (utils.error): sys.exit() ...
Python
''' Created on May 2, 2010 This module performs the clean up for skills jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up skills jobs print("\nStarting skills clean up.") #Gets Job job=utils.get_cleanup_job(datasource_id,'skil...
Python
''' Created on Jun 5, 2009 @author: Steven Norris This module provides basic utilities for the FLOSS mole spiders. ''' import MySQLdb #import httplib import traceback import urllib2 class SavannahUtils: #forms initial connection with database def __init__(self,file_name): ...
Python
''' Created on May 26, 2009 @author: Steven Norris This program runs as a spider for the the savannah.gnu.org to add information about both the GNU projects and non-GNU projects to a database for further investigation. RUN INSTRUCTIONS Run from command line using this format [Interpret] SavannahSpider.py [...
Python
''' Created on May 2, 2010 This module performs the clean up for parsing jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up parsing jobs print("\nStarting parsing clean up.") #Gets jobs for indexParsing print("\nIndex parsing c...
Python
''' Created on Jul 16, 2009 @author: Steven Norris This program creates the jobs for savannah.gnu.org RUN INSTRUCTIONS Run from command line using this format [Interpret] SavannahJobs.py [DatasourceID] [Test mode True/False] Test mode is based on string comparison so make sure capitalization and spelling...
Python
''' Created on Jun 14, 2009 @author: Steven Norris This module parses the html documents found on savannah. ''' import re from BeautifulSoup import BeautifulSoup #parses description from index pages def parse_index(html): p=re.compile('<div class="indexcenter\">.+<!-- end indexcenter -->',re.DOTALL) ...
Python
''' Created on May 2, 2010 This module spiders the index page of each job and prepares for skills spidering. @author: Steven Norris ''' from HTMLParser import HTMLParser import re import time import sys import traceback BASE_SITE1='savannah.gnu.org' BASE_SITE2='savannah.nongnu.org' ''' This spide...
Python
''' Created on May 2, 2010 This module performs the clean up for index jobs. @author: StevenNorris ''' import sys import traceback def run(utils,datasource_id): #Cleans up index jobs print("\nStarting index clean up.") #Gets Job job=utils.get_cleanup_job(datasource_id,'indexHT...
Python
''' Created on May 2, 2010 This module spiders the index page of each job and prepares for skills spidering. @author: Steven Norris ''' from HTMLParser import HTMLParser import re import time import sys import traceback BASE_SITE1='savannah.gnu.org' BASE_SITE2='savannah.nongnu.org' ''' This spide...
Python
''' Created on May 21, 2010 Performs the clean up for projects left In_Progress for Savannah. @author: StevenNorris ''' import sys from SavannahUtils import SavannahUtils import SavannahIndexCleanUp import SavannahSkillsCleanUp import SavannahParsingCleanUp def main(argv): #set variables ...
Python
import urllib import re import time import sys import gzip import sqlalchemy from sqlalchemy import * import codecs import warnings warnings.filterwarnings('ignore') import ConfigParser config = ConfigParser.RawConfigParser() config.read('al.conf') try: #config.get('alioth','username') DB_USER = config.get('ali...
Python
import urllib import re import time import sys import gzip import sqlalchemy from sqlalchemy import * from sqlalchemy import exc import codecs from datetime import datetime from dateutil.parser import parse import warnings warnings.filterwarnings('ignore') import ConfigParser config = ConfigParser.RawConfigParser(...
Python
import re import sys import os import sqlalchemy from sqlalchemy import * import ConfigParser import warnings config = ConfigParser.RawConfigParser() config.read('udd.conf') #disables warnings warnings.filterwarnings('ignore', '.*') try: DB_USER = config.get('udd','user') DB_PASS = config.get('udd','pass') DB_AD...
Python
#!/usr/bin/env python import MySQLdb import sys import re import traceback import signal import threading from debian_Utilities import Debian_Utilities #Global variables (not sure if we need this) #isError = False #Class for main routine class Debian_ParseDevelopers: #Signal handler for clean exiting (SIGINT...
Python
#!/usr/bin/env python import MySQLdb import sys import re import traceback import signal import threading from debian_Utilities import Debian_Utilities #Global variables (not sure if we need this) #isError = False #Class for main routine class Debian_ParseDescriptions: #Signal handler for clean exiting (SIGI...
Python
#!/usr/bin/env python import MySQLdb import sys import traceback import signal import threading import re from debian_Utilities import Debian_Utilities #Global variables (not sure if we need this) #isError = False #Class for main routine class Debian_ParseCopyrights: #Signal handler for clean exiting (SIGINT...
Python
#!/usr/bin/env python import MySQLdb import sys import re import traceback import signal import threading from debian_Utilities import Debian_Utilities #Global variables (not sure if we need this) #isError = False #Class for main routine class Debian_ParseDescriptions: #Signal handler for clean exiting (SIGI...
Python
#!/usr/bin/env python #This script will fill the job queue with the desired set of Debian projects #for parsing. import MySQLdb import urllib2 import sys import re from optparse import OptionParser from debian_Utilities import Debian_Utilities STABLEPACKAGESURL = "http://packages.debian.org/stable/allpackages" TESTI...
Python
#!/usr/bin/env python import MySQLdb import sys import re import traceback import signal import threading from debian_Utilities import Debian_Utilities #Global variables (not sure if we need this) #isError = False #Class for main routine class Debian_ParseDevelopers: #Signal handler for clean exiting (SIGINT...
Python
#!/usr/bin/env python import MySQLdb import sys import traceback import signal import threading import re from debian_Utilities import Debian_Utilities #Global variables (not sure if we need this) #isError = False #Class for main routine class Debian_ParseCopyrights: #Signal handler for clean exiting (SIGINT...
Python
#!/usr/bin/env python import sys import MySQLdb import traceback #Constants DBFILENAME = 'dbInfo.txt' class Debian_Utilities: #Executes the supplied query string using the supplied parameters and returns #the first row returned by the query def execQuery(self, queryString, *params): try: ...
Python
#!/usr/bin/env python import MySQLdb import sys import traceback import signal import threading import urllib2 import re from debian_Utilities import Debian_Utilities #Debian URL constants STABLEURLBASE = 'http://packages.debian.org/stable/' TESTINGURLBASE = 'http://packages.debian.org/testing/' UNSTABLEURLBASE = 'htt...
Python
#!/usr/bin/env python #This script will fill the job queue with the desired set of Debian projects #for parsing. import MySQLdb import urllib2 import sys import re from optparse import OptionParser from debian_Utilities import Debian_Utilities STABLEPACKAGESURL = "http://packages.debian.org/stable/allpackages" TESTI...
Python
#!/usr/bin/env python import sys import MySQLdb import traceback #Constants DBFILENAME = 'dbInfo.txt' class Debian_Utilities: #Executes the supplied query string using the supplied parameters and returns #the first row returned by the query def execQuery(self, queryString, *params): try: ...
Python
#!/usr/bin/env python import MySQLdb import sys import traceback import signal import threading import urllib2 import re from debian_Utilities import Debian_Utilities #Debian URL constants STABLEURLBASE = 'http://packages.debian.org/stable/' TESTINGURLBASE = 'http://packages.debian.org/testing/' UNSTABLEURLBASE = 'htt...
Python
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
Python
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
Python
import whois from pprint import pprint domains = ''' marktplaats.nl bla.marktplaats.nl google.info blabluble.info calling.com.tw konly7393.idv.st www.katzenuhren.de katzen.tv produto.arremate.com.br sHzAP.abowey.com abowey.com google.com.br google.cz google.fr google.at google.jp www.google.co.jp yahoo.com google.a...
Python
from distutils.core import setup setup( name='whois', version='0.6.5', description='Python module/library for retrieving WHOIS information of domains.', long_description = open('README').read(), author='DDarko.org', author_email='ddarko@ddarko.org', license='MIT http://www.opensource.org/licenses/mit-license.ph...
Python
import sys import datetime PYTHON_VERSION = sys.version_info[0] class Domain: def __init__(self, data): self.name = data['domain_name'][0].strip().lower() self.registrar = data['registrar'][0].strip() self.creation_date = str_to_date(data['creation_date'][0]) self.expiration_date = str_to_date(data[...
Python
import subprocess import time import sys import os PYTHON_VERSION = sys.version_info[0] CACHE = {} CACHE_MAX_AGE = 60*60*48 # 48h if PYTHON_VERSION >= 3: import json else: import simplejson as json def cache_load(cf): if not os.path.isfile(cf): return global CACHE f = open(cf, 'r') try: CACHE = json.load(f...
Python
""" Python module/library for retrieving WHOIS information of domains. By DDarko.org ddarko@ddarko.org http://ddarko.org/ License MIT http://www.opensource.org/licenses/mit-license.php Usage example >>> import whois >>> domain = whois.query('google.com') >>> print(domain.__dict__) {'expiration_date': date...
Python
com = { 'extend': None, 'domain_name': r'Domain Name:\s?(.+)', 'registrar': r'Registrar:\s?(.+)', 'registrant': None, 'creation_date': r'Creation Date:\s?(.+)', 'expiration_date': r'Expiration Date:\s?(.+)', 'updated_date': r'Updated Date:\s?(.+)', 'name_servers': r'Name Server:\s?(.+)', 'status':...
Python
from . import tld_regexpr import re TLD_RE = {} def get_tld_re(tld): if tld in TLD_RE: return TLD_RE[tld] v = getattr(tld_regexpr, tld) extend = v.get('extend') if extend: e = get_tld_re(extend) tmp = e.copy() tmp.update(v) else: tmp = v if 'extend' in tmp: del tmp['extend'] TLD_RE[tld] = dict((k, re...
Python
#!/usr/bin/env python import ConfigParser import os import sys import time from threading import Thread from optparse import OptionParser import subprocess def getServers(sectionname) : """ Returns a list of hostnames for a given sectionname in the configuration file. If the section was a group, we...
Python