Exemple #1
0
def main(args):

    context = {
        'export': generateCompleteKML,
    }
    interactive.setup()
    interactive.remote(args, context)
Exemple #2
0
def main(args):

  context = {
      'export': generateCompleteKML,
      }
  interactive.setup()
  interactive.remote(args, context)
Exemple #3
0
def main(args):
  """Main routine.
  """

  interactive.setup()

  from soc.models.organization import Organization
  from soc.models.user import User
  from soc.models.student import Student
  from soc.models.mentor import Mentor
  from soc.models.org_admin import OrgAdmin
  from soc.models.job import Job
  from soc.models.student_proposal import StudentProposal
  from soc.models.student_project import StudentProject

  def slotSaver(org, value):
    org.slots = value
  def popSaver(org, value):
    org.nr_applications = value
  def rawSaver(org, value):
    org.slots_calculated = value

  context = {
      'load': loadPickle,
      'dump': dumpPickle,
      'orgStats': orgStats,
      'printPopularity': printPopularity,
      'saveValues': saveValues,
      'getEntities': getEntities,
      'deleteEntities': deleteEntities,
      'getOrgs': getEntities(Organization),
      'getUsers': getEntities(User),
      'getStudents': getEntities(Student),
      'getMentors': getEntities(Mentor),
      'getOrgAdmins': getEntities(OrgAdmin),
      'getStudentProjects': getEntities(StudentProject),
      'getProps': getProps,
      'countStudentsWithProposals': countStudentsWithProposals,
      'convertProposals': convertProposals,
      'addFollower': addFollower,
      'Organization': Organization,
      'Job': Job,
      'User': User,
      'Student': Student,
      'Mentor': Mentor,
      'OrgAdmin': OrgAdmin,
      'StudentProject': StudentProject,
      'StudentProposal': StudentProposal,
      'slotSaver': slotSaver,
      'popSaver': popSaver,
      'rawSaver': rawSaver,
      'startSpam': startSpam,
      'reviveJobs': reviveJobs,
      'deidleJobs': deidleJobs,
      'acceptedStudentsCSVExport': acceptedStudentsCSVExport,
      'startUniqueUserIdConversion': startUniqueUserIdConversion,
  }

  interactive.remote(args, context)
def main(args):

  context = {
      'exit': exit,
      'seed_all': seedAll,
      'seed_one': seedOne,
      'statistics_list': STATISTICS_LIST,
      'set_program': setProgram,
      }

  interactive.remote(args, context)
def main(args):

    context = {
        'exit': exit,
        'seed_all': seedAll,
        'seed_one': seedOne,
        'statistics_list': STATISTICS_LIST,
        'set_program': setProgram,
    }

    interactive.remote(args, context)
Exemple #6
0
def main(args):
  """Main routine.
  """

  interactive.setup()

  from google.appengine.api import users
  from google.appengine.ext import db

  from soc.models.user import User
  from soc.modules.gsoc.models.program import GSoCProgram
  from soc.modules.gsoc.models.organization import GSoCOrganization
  from soc.modules.gsoc.models.student import GSoCStudent
  from soc.modules.gsoc.models.profile import GSoCProfile
  from soc.modules.gsoc.models.profile import GSoCStudentInfo
  from soc.modules.gsoc.models.proposal import GSoCProposal
  from soc.modules.gsoc.models.project import GSoCProject
  from soc.modules.gsoc.models.mentor import GSoCMentor
  from soc.modules.gsoc.models import org_admin
  from soc.modules.gsoc.models.student_proposal import StudentProposal
  from soc.modules.gsoc.models.student_project import StudentProject
  from soc.modules.gsoc.tasks.accept_proposals import ProposalAcceptanceTask

  from soc.modules.gci.models.task import GCITask
  from soc.modules.gci.models.comment import GCIComment
  from soc.modules.gci.models.student import GCIStudent
  from soc.modules.gci.models.organization import GCIOrganization
  from soc.modules.gci.models.profile import GCIProfile
  from soc.modules.gci.models.program import GCIProgram
  from soc.modules.gci import tasks as gci_tasks

  def slotSaver(org, value):
    org.slots = value
  def popSaver(org, value):
    org.nr_applications = value
  def rawSaver(org, value):
    org.slots_calculated = value
  def getGSoC2011Profile(link_id):
    program = GSoCProgram.get_by_key_name('google/gsoc2011')
    return GSoCProfile.all().filter('scope', program).filter('link_id', link_id).get()
  def getGSoC2011Proposal(link_id, id):
    profile = getGSoC2011Profile(link_id)
    return GSoCProposal.get_by_id(id, profile)
  def getGSoC2011Project(link_id, id):
    profile = getGSoC2011Profile(link_id)
    return GSoCProject.get_by_id(id, profile)
  def withdrawProject(link_id, id):
    proposal = getGSoC2011Proposal(link_id, id)
    proposal_key = proposal.key()
    profile = proposal.parent()
    profile_key = profile.key()
    project = GSoCProject.all().ancestor(profile).get()
    project_key = project.key()

    def withdraw_project_txn():
      proposal = db.get(proposal_key)
      project = db.get(project_key)
      profile = db.get(profile_key)

      proposal.status = 'withdrawn'
      project.status = 'withdrawn'
      profile.number_of_projects = 0
      db.put([proposal, project, profile])

    db.run_in_transaction(withdraw_project_txn)

  context = {
      'load': loadPickle,
      'dump': dumpPickle,
      'users': users,
      'db': db,
      'orgStats': orgStats,
      'printPopularity': printPopularity,
      'saveValues': saveValues,
      'getEntities': getEntities,
      'deleteEntities': deleteEntities,
      'getOrgs': getEntities(GSoCOrganization),
      'getUsers': getEntities(User),
      'getStudents': getEntities(GSoCStudent),
      'getMentors': getEntities(GSoCMentor),
      'getOrgAdmins': getEntities(org_admin.GSoCOrgAdmin),
      'getStudentProjects': getEntities(StudentProject),
      'getStudentProjects': getEntities(StudentProposal),
      'getProps': getProps,
      'countStudentsWithProposals': countStudentsWithProposals,
      'setOrganizationInSurveyRecords': setOrganizationInSurveyRecords,
      'convertProposals': convertProposals,
      'addFollower': addFollower,
      'p': getGSoC2011Profile,
      'o': getGSoC2011Proposal,
      'r': getGSoC2011Project,
      'accepter': ProposalAcceptanceTask(),
      'withdrawProject': withdrawProject,
      'GSoCOrganization': GSoCOrganization,
      'User': User,
      'GSoCStudent': GSoCStudent,
      'GSoCMentor': GSoCMentor,
      'GSoCOrgAdmin': org_admin.GSoCOrgAdmin,
      'GSoCProgram': GSoCProgram,
      'GCIProgram': GCIProgram,
      'GSoCProfile': GSoCProfile,
      'GCIProfile': GCIProfile,
      'GCITask': GCITask,
      'Request': Request,
      'SRequest': StudentKeyRequest,
      'GCIStudent': GCIStudent,
      'GCIComment': GCIComment,
      'GCIOrganization': GCIOrganization,
      'GSoCStudentInfo': GSoCStudentInfo,
      'GSoCProposal': GSoCProposal,
      'GSoCProject': GSoCProject,
      'gci_tasks': gci_tasks,
      'StudentProject': StudentProject,
      'StudentProposal': StudentProposal,
      'slotSaver': slotSaver,
      'popSaver': popSaver,
      'rawSaver': rawSaver,
      'exportStudentsWithProjects': exportStudentsWithProjects,
      'exportUniqueOrgAdminsAndMentors': exportUniqueOrgAdminsAndMentors,
      'exportOrgsForGoogleCode': exportOrgsForGoogleCode,
      'exportRolesForGoogleCode': exportRolesForGoogleCode,
      'surveyRecordCSVExport': surveyRecordCSVExport,
      'turnaroundTime': turnaroundTime,
  }

  interactive.remote(args, context)
Exemple #7
0
def main():
  """Main routine.
  """

  interactive.setup()
  interactive.setDjango()

  from google.appengine.api import users
  from google.appengine.ext import db

  from soc.models.user import User
  from soc.modules.gsoc.models.program import GSoCProgram
  from soc.modules.gsoc.models.organization import GSoCOrganization
  from soc.modules.gsoc.models.profile import GSoCProfile
  from soc.modules.gsoc.models.profile import GSoCStudentInfo
  from soc.modules.gsoc.models.proposal import GSoCProposal
  from soc.modules.gsoc.models.project import GSoCProject

  from soc.modules.gci.models.task import GCITask
  from soc.modules.gci.models.comment import GCIComment
  from soc.modules.gci.models.organization import GCIOrganization
  from soc.modules.gci.models.profile import GCIProfile
  from soc.modules.gci.models.program import GCIProgram
  from soc.modules.gci import tasks as gci_tasks

  def slotSaver(org, value):
    org.slots = value
  def popSaver(org, value):
    org.nr_applications = value
  def rawSaver(org, value):
    org.slots_calculated = value
  def getGSoC2012Profile(link_id):
    program = GSoCProgram.get_by_key_name('google/gsoc2012')
    return GSoCProfile.all().filter('scope', program).filter('link_id', link_id).get()
  def getGSoC2012Proposal(link_id, id):
    profile = getGSoC2012Profile(link_id)
    return GSoCProposal.get_by_id(id, profile)
  def getGSoC2012Project(link_id, id):
    profile = getGSoC2012Profile(link_id)
    return GSoCProject.get_by_id(id, profile)
  def withdrawProject(link_id, id):
    proposal = getGSoC2012Proposal(link_id, id)
    proposal_key = proposal.key()
    profile = proposal.parent()
    profile_key = profile.key()
    project = GSoCProject.all().ancestor(profile).get()
    project_key = project.key()

    def withdraw_project_txn():
      proposal = db.get(proposal_key)
      project = db.get(project_key)
      profile = db.get(profile_key)

      proposal.status = 'withdrawn'
      project.status = 'withdrawn'
      profile.number_of_projects = 0
      db.put([proposal, project, profile])

    db.run_in_transaction(withdraw_project_txn)

  context = {
      'load': loadPickle,
      'dump': dumpPickle,
      'users': users,
      'db': db,
      'orgStats': orgStats,
      'printPopularity': printPopularity,
      'saveValues': saveValues,
      'getEntities': getEntities,
      'deleteEntities': deleteEntities,
      'getOrgs': getEntities(GSoCOrganization),
      'getUsers': getEntities(User),
      'setOrganizationInSurveyRecords': setOrganizationInSurveyRecords,
      'convertProposals': convertProposals,
      'addFollower': addFollower,
      'p': getGSoC2012Profile,
      'o': getGSoC2012Proposal,
      'r': getGSoC2012Project,
      'withdrawProject': withdrawProject,
      'GSoCOrganization': GSoCOrganization,
      'User': User,
      'GSoCProgram': GSoCProgram,
      'GCIProgram': GCIProgram,
      'GSoCProfile': GSoCProfile,
      'GCIProfile': GCIProfile,
      'GCITask': GCITask,
      'Request': Request,
      'SRequest': StudentKeyRequest,
      'GCIComment': GCIComment,
      'GCIOrganization': GCIOrganization,
      'GSoCStudentInfo': GSoCStudentInfo,
      'GSoCProposal': GSoCProposal,
      'GSoCProject': GSoCProject,
      'gci_tasks': gci_tasks,
      'slotSaver': slotSaver,
      'popSaver': popSaver,
      'rawSaver': rawSaver,
      'exportOrgsForGoogleCode': exportOrgsForGoogleCode,
      'exportRolesForGoogleCode': exportRolesForGoogleCode,
      'surveyRecordCSVExport': surveyRecordCSVExport,
      'turnaroundTime': turnaroundTime,
  }

  interactive.remote(sys.argv[1:], context)
Exemple #8
0
def main(args):
  """Main routine.
  """

  interactive.setup()

  from soc.models.user import User
  from soc.modules.gsoc.models.program import GSoCProgram
  from soc.modules.gsoc.models.organization import GSoCOrganization
  from soc.modules.gsoc.models.student import GSoCStudent
  from soc.modules.gsoc.models.mentor import GSoCMentor
  from soc.modules.gsoc.models import org_admin
  from soc.modules.gsoc.models.student_proposal import StudentProposal
  from soc.modules.gsoc.models.student_project import StudentProject

  from soc.modules.gci.models.task import GCITask
  from soc.modules.gci.models.student import GCIStudent
  from soc.modules.gci.models.organization import GCIOrganization
  from soc.modules.gci import tasks as gci_tasks

  def slotSaver(org, value):
    org.slots = value
  def popSaver(org, value):
    org.nr_applications = value
  def rawSaver(org, value):
    org.slots_calculated = value

  context = {
      'load': loadPickle,
      'dump': dumpPickle,
      'orgStats': orgStats,
      'printPopularity': printPopularity,
      'saveValues': saveValues,
      'getEntities': getEntities,
      'deleteEntities': deleteEntities,
      'getOrgs': getEntities(GSoCOrganization),
      'getUsers': getEntities(User),
      'getStudents': getEntities(GSoCStudent),
      'getMentors': getEntities(GSoCMentor),
      'getOrgAdmins': getEntities(org_admin.GSoCOrgAdmin),
      'getStudentProjects': getEntities(StudentProject),
      'getStudentProjects': getEntities(StudentProposal),
      'getProps': getProps,
      'countStudentsWithProposals': countStudentsWithProposals,
      'setOrganizationInSurveyRecords': setOrganizationInSurveyRecords,
      'convertProposals': convertProposals,
      'addFollower': addFollower,
      'GSoCOrganization': GSoCOrganization,
      'User': User,
      'GSoCStudent': GSoCStudent,
      'GSoCMentor': GSoCMentor,
      'GSoCOrgAdmin': org_admin.GSoCOrgAdmin,
      'GSoCProgram': GSoCProgram,
      'GCITask': GCITask,
      'Request': Request,
      'SRequest': StudentKeyRequest,
      'GCIStudent': GCIStudent,
      'GCIOrganization': GCIOrganization,
      'gci_tasks': gci_tasks,
      'StudentProject': StudentProject,
      'StudentProposal': StudentProposal,
      'slotSaver': slotSaver,
      'popSaver': popSaver,
      'rawSaver': rawSaver,
      'exportStudentsWithProjects': exportStudentsWithProjects,
      'exportUniqueOrgAdminsAndMentors': exportUniqueOrgAdminsAndMentors,
      'exportOrgsForGoogleCode': exportOrgsForGoogleCode,
      'exportRolesForGoogleCode': exportRolesForGoogleCode,
      'surveyRecordCSVExport': surveyRecordCSVExport,
  }

  interactive.remote(args, context)
Exemple #9
0
def main(args):
    """Main routine.
  """

    interactive.setup()

    from soc.models.user import User
    from soc.modules.gsoc.models.program import GSoCProgram
    from soc.modules.gsoc.models.organization import GSoCOrganization
    from soc.modules.gsoc.models.student import GSoCStudent
    from soc.modules.gsoc.models.mentor import GSoCMentor
    from soc.modules.gsoc.models import org_admin
    from soc.modules.gsoc.models.student_proposal import StudentProposal
    from soc.modules.gsoc.models.student_project import StudentProject

    from soc.modules.gci.models.task import GCITask
    from soc.modules.gci.models.student import GCIStudent
    from soc.modules.gci.models.organization import GCIOrganization
    from soc.modules.gci import tasks as gci_tasks

    def slotSaver(org, value):
        org.slots = value

    def popSaver(org, value):
        org.nr_applications = value

    def rawSaver(org, value):
        org.slots_calculated = value

    context = {
        'load': loadPickle,
        'dump': dumpPickle,
        'orgStats': orgStats,
        'printPopularity': printPopularity,
        'saveValues': saveValues,
        'getEntities': getEntities,
        'deleteEntities': deleteEntities,
        'getOrgs': getEntities(GSoCOrganization),
        'getUsers': getEntities(User),
        'getStudents': getEntities(GSoCStudent),
        'getMentors': getEntities(GSoCMentor),
        'getOrgAdmins': getEntities(org_admin.GSoCOrgAdmin),
        'getStudentProjects': getEntities(StudentProject),
        'getStudentProjects': getEntities(StudentProposal),
        'getProps': getProps,
        'countStudentsWithProposals': countStudentsWithProposals,
        'setOrganizationInSurveyRecords': setOrganizationInSurveyRecords,
        'convertProposals': convertProposals,
        'addFollower': addFollower,
        'GSoCOrganization': GSoCOrganization,
        'User': User,
        'GSoCStudent': GSoCStudent,
        'GSoCMentor': GSoCMentor,
        'GSoCOrgAdmin': org_admin.GSoCOrgAdmin,
        'GSoCProgram': GSoCProgram,
        'GCITask': GCITask,
        'Request': Request,
        'SRequest': StudentKeyRequest,
        'GCIStudent': GCIStudent,
        'GCIOrganization': GCIOrganization,
        'gci_tasks': gci_tasks,
        'StudentProject': StudentProject,
        'StudentProposal': StudentProposal,
        'slotSaver': slotSaver,
        'popSaver': popSaver,
        'rawSaver': rawSaver,
        'exportStudentsWithProjects': exportStudentsWithProjects,
        'exportUniqueOrgAdminsAndMentors': exportUniqueOrgAdminsAndMentors,
        'exportOrgsForGoogleCode': exportOrgsForGoogleCode,
        'exportRolesForGoogleCode': exportRolesForGoogleCode,
        'surveyRecordCSVExport': surveyRecordCSVExport,
    }

    interactive.remote(args, context)
Exemple #10
0
def main(args):
    """Main routine.
  """

    interactive.setup()

    from soc.models.organization import Organization
    from soc.models.user import User
    from soc.models.student import Student
    from soc.models.mentor import Mentor
    from soc.models.org_admin import OrgAdmin
    from soc.models.job import Job
    from soc.models.student_proposal import StudentProposal
    from soc.models.student_project import StudentProject

    def slotSaver(org, value):
        org.slots = value

    def popSaver(org, value):
        org.nr_applications = value

    def rawSaver(org, value):
        org.slots_calculated = value

    context = {
        'load': loadPickle,
        'dump': dumpPickle,
        'orgStats': orgStats,
        'printPopularity': printPopularity,
        'saveValues': saveValues,
        'getEntities': getEntities,
        'deleteEntities': deleteEntities,
        'getOrgs': getEntities(Organization),
        'getUsers': getEntities(User),
        'getStudents': getEntities(Student),
        'getMentors': getEntities(Mentor),
        'getOrgAdmins': getEntities(OrgAdmin),
        'getStudentProjects': getEntities(StudentProject),
        'getProps': getProps,
        'countStudentsWithProposals': countStudentsWithProposals,
        'setOrganizationInSurveyRecords': setOrganizationInSurveyRecords,
        'convertProposals': convertProposals,
        'addFollower': addFollower,
        'Organization': Organization,
        'Job': Job,
        'User': User,
        'Student': Student,
        'Mentor': Mentor,
        'OrgAdmin': OrgAdmin,
        'StudentProject': StudentProject,
        'StudentProposal': StudentProposal,
        'slotSaver': slotSaver,
        'popSaver': popSaver,
        'rawSaver': rawSaver,
        'startSpam': startSpam,
        'reviveJobs': reviveJobs,
        'deidleJobs': deidleJobs,
        'exportStudentsWithProjects': exportStudentsWithProjects,
        'exportUniqueOrgAdminsAndMentors': exportUniqueOrgAdminsAndMentors,
        'exportOrgsForGoogleCode': exportOrgsForGoogleCode,
        'exportRolesForGoogleCode': exportRolesForGoogleCode,
        'startUniqueUserIdConversion': startUniqueUserIdConversion,
        'surveyRecordCSVExport': surveyRecordCSVExport,
    }

    interactive.remote(args, context)