change name of secrets file
This commit is contained in:
parent
2391d11f98
commit
3c9a9ef665
|
|
@ -1,4 +1,4 @@
|
||||||
secrets.py
|
canvas_secrets.py
|
||||||
*.bak
|
*.bak
|
||||||
.ipynb_checkpoints
|
.ipynb_checkpoints
|
||||||
104ab42f11
|
104ab42f11
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import codecs, json, requests
|
import codecs, json, requests
|
||||||
from secrets import cq_token, ph_token
|
from canvas_secrets import cq_token, ph_token
|
||||||
token = cq_token
|
token = cq_token
|
||||||
url = 'https://ilearn.gavilan.edu'
|
url = 'https://ilearn.gavilan.edu'
|
||||||
header = {'Authorization': 'Bearer ' + token}
|
header = {'Authorization': 'Bearer ' + token}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ from bs4 import BeautifulSoup as bs
|
||||||
leafcount = 0
|
leafcount = 0
|
||||||
displaynames = []
|
displaynames = []
|
||||||
|
|
||||||
from secrets import cq_user, cq_pasw
|
from canvas_secrets import cq_user, cq_pasw
|
||||||
|
|
||||||
|
|
||||||
CQ_URL = "https://secure.curricunet.com/scripts/webservices/generic_meta/clients/versions/v4/gavilan.cfc"
|
CQ_URL = "https://secure.curricunet.com/scripts/webservices/generic_meta/clients/versions/v4/gavilan.cfc"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import pandas as pd
|
||||||
import sys, locale, re
|
import sys, locale, re
|
||||||
from pipelines import getSemesterSchedule
|
from pipelines import getSemesterSchedule
|
||||||
|
|
||||||
from secrets import cq_url, cq_user, cq_pasw
|
from canvas_secrets import cq_url, cq_user, cq_pasw
|
||||||
|
|
||||||
|
|
||||||
#sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
|
#sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,36 @@
|
||||||
|
|
||||||
# from pipelines - canvas data
|
# from pipelines - canvas data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
online_courses = {}
|
||||||
|
def prep_online_courses_df():
|
||||||
|
global online_courses
|
||||||
|
schedule = current_schedule() # from banner
|
||||||
|
online_courses = schedule[lambda x: x.type=='online']
|
||||||
|
|
||||||
|
def course_is_online(crn):
|
||||||
|
global online_courses
|
||||||
|
#print "looking up: " + str(crn)
|
||||||
|
#print online_courses
|
||||||
|
course = online_courses[lambda x: x.crn==int(crn)]
|
||||||
|
return len(course)
|
||||||
|
|
||||||
|
def get_crn_from_name(name):
|
||||||
|
#print "name is: "
|
||||||
|
#print(name)
|
||||||
|
m = re.search( r'(\d\d\d\d\d)', name)
|
||||||
|
if m: return int(m.groups(1)[0])
|
||||||
|
else: return 0
|
||||||
|
|
||||||
|
def get_enrlmts_for_user(user,enrollments):
|
||||||
|
#active enrollments
|
||||||
|
u_en = enrollments[ lambda x: (x['user_id'] == user) & (x['workflow']=='active') ]
|
||||||
|
return u_en[['type','course_id']]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
timestamp = nowAsStr()
|
timestamp = nowAsStr()
|
||||||
|
|
||||||
|
|
|
||||||
2
gpt.py
2
gpt.py
|
|
@ -1,7 +1,7 @@
|
||||||
import os, json, sys
|
import os, json, sys
|
||||||
import openai
|
import openai
|
||||||
|
|
||||||
from secrets import openai_org, openai_api_key
|
from canvas_secrets import openai_org, openai_api_key
|
||||||
|
|
||||||
|
|
||||||
openai.organization = "org-66WLoZQEtBrO42Z9S8rfd10M"
|
openai.organization = "org-66WLoZQEtBrO42Z9S8rfd10M"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ from importlib import reload
|
||||||
import server
|
import server
|
||||||
import localcache
|
import localcache
|
||||||
from server import *
|
from server import *
|
||||||
from secrets import flask_secretkey
|
from canvas_secrets import flask_secretkey
|
||||||
|
|
||||||
q = Queue()
|
q = Queue()
|
||||||
|
|
||||||
|
|
|
||||||
30
pipelines.py
30
pipelines.py
|
|
@ -11,8 +11,8 @@ import sys, shutil, hmac, hashlib, base64, schedule, time, pathlib, datetime
|
||||||
import pdb
|
import pdb
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from deepdiff import DeepDiff
|
from deepdiff import DeepDiff
|
||||||
from secrets import apiKey, apiSecret, FTP_SITE, FTP_USER, FTP_PW, GOO, GOO_PIN, token, url, domain, account_id, header, g_id, g_secret
|
from canvas_secrets import apiKey, apiSecret, FTP_SITE, FTP_USER, FTP_PW, GOO, GOO_PIN, token, url, domain, account_id, header, g_id, g_secret
|
||||||
from secrets import instructure_url, instructure_username, instructure_private_key
|
from canvas_secrets import instructure_url, instructure_username, instructure_private_key
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -429,32 +429,6 @@ def getSemesterSchedule(short='sp21'): # I used to be current_sch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
online_courses = {}
|
|
||||||
def prep_online_courses_df():
|
|
||||||
global online_courses
|
|
||||||
schedule = current_schedule() # from banner
|
|
||||||
online_courses = schedule[lambda x: x.type=='online']
|
|
||||||
|
|
||||||
def course_is_online(crn):
|
|
||||||
global online_courses
|
|
||||||
#print "looking up: " + str(crn)
|
|
||||||
#print online_courses
|
|
||||||
course = online_courses[lambda x: x.crn==int(crn)]
|
|
||||||
return len(course)
|
|
||||||
|
|
||||||
def get_crn_from_name(name):
|
|
||||||
#print "name is: "
|
|
||||||
#print(name)
|
|
||||||
m = re.search( r'(\d\d\d\d\d)', name)
|
|
||||||
if m: return int(m.groups(1)[0])
|
|
||||||
else: return 0
|
|
||||||
|
|
||||||
def get_enrlmts_for_user(user,enrollments):
|
|
||||||
#active enrollments
|
|
||||||
u_en = enrollments[ lambda x: (x['user_id'] == user) & (x['workflow']=='active') ]
|
|
||||||
return u_en[['type','course_id']]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################
|
################
|
||||||
################ CANVAS DATA
|
################ CANVAS DATA
|
||||||
|
|
|
||||||
2
tasks.py
2
tasks.py
|
|
@ -17,7 +17,7 @@ import pysftp, os, datetime, requests, re, json, sqlite3, codecs, csv, sys
|
||||||
import funcy, os.path, shutil, urllib
|
import funcy, os.path, shutil, urllib
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from secrets import badgr_target, badgr_hd
|
from canvas_secrets import badgr_target, badgr_hd
|
||||||
|
|
||||||
|
|
||||||
if os.name != 'posix':
|
if os.name != 'posix':
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import re
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from secrets import banner_url1, banner_url2, GOO, GOO_PIN, otter_login, otter_pw
|
from canvas_secrets import banner_url1, banner_url2, GOO, GOO_PIN, otter_login, otter_pw
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue