From fa70f03eb25913028a9554b83bc66ee56d902a9e Mon Sep 17 00:00:00 2001 From: richard-peng-xia Date: Wed, 13 May 2026 17:33:14 -0400 Subject: [PATCH] Add UC Berkeley mirror site (port 40015) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a full Flask mirror of berkeley.edu as the 16th WebHarbor site. **Site features:** - 8 SQLAlchemy models: College, Department, Program, NewsArticle, Event, ResearchCenter, Faculty, Bookmark (+ User with auth) - 20+ routes: homepage, news, programs, events, research centers, departments, faculty, admissions, about, unified search - 23 Jinja2 templates styled with Berkeley Blue (#003262) / Gold (#FDB515) - 30 benchmark tasks in tasks.jsonl (WebVoyager schema) **Seed data (fully idempotent):** - 14 UC Berkeley colleges/schools (real names) - 83 degree programs (BA/BS/MA/MS/PhD/MBA/JD/MD/MEng) - 121 news articles (2023–2025, 7 categories) - 64 events (upcoming + past, 7 categories) - 25 research centers (BAIR, QB3, MSRI, …) - 82 faculty (Jennifer Doudna, Stuart Russell, Saul Perlmutter, …) - 4 benchmark users: alice/bob/carol/dave (password: test1234) **Infrastructure changes:** - control_server.py: add 'berkeley' to SITES (port 40015) - websyn_start.sh: add 'berkeley' to startup array - Dockerfile: EXPOSE 40015, generate instance_seed DB at build time (no HF assets needed — all data is code-generated via seed_data.py) Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 10 +- control_server.py | 2 +- sites/berkeley/_health.py | 57 + sites/berkeley/app.py | 747 ++++++ sites/berkeley/seed_data.py | 2248 +++++++++++++++++ sites/berkeley/static/css/.gitkeep | 0 sites/berkeley/static/js/.gitkeep | 0 sites/berkeley/tasks.jsonl | 30 + sites/berkeley/templates/404.html | 15 + sites/berkeley/templates/500.html | 14 + sites/berkeley/templates/about.html | 106 + sites/berkeley/templates/academics.html | 69 + sites/berkeley/templates/account.html | 81 + sites/berkeley/templates/admissions.html | 131 + sites/berkeley/templates/base.html | 374 +++ .../berkeley/templates/department_detail.html | 84 + sites/berkeley/templates/departments.html | 42 + sites/berkeley/templates/event_detail.html | 91 + sites/berkeley/templates/events.html | 102 + sites/berkeley/templates/faculty.html | 87 + sites/berkeley/templates/faculty_profile.html | 97 + sites/berkeley/templates/index.html | 164 ++ sites/berkeley/templates/login.html | 39 + sites/berkeley/templates/news.html | 103 + sites/berkeley/templates/news_article.html | 113 + sites/berkeley/templates/program_detail.html | 98 + sites/berkeley/templates/programs.html | 102 + sites/berkeley/templates/register.html | 60 + sites/berkeley/templates/research.html | 72 + sites/berkeley/templates/research_center.html | 82 + sites/berkeley/templates/search.html | 164 ++ websyn_start.sh | 8 +- 32 files changed, 5385 insertions(+), 7 deletions(-) create mode 100644 sites/berkeley/_health.py create mode 100644 sites/berkeley/app.py create mode 100644 sites/berkeley/seed_data.py create mode 100644 sites/berkeley/static/css/.gitkeep create mode 100644 sites/berkeley/static/js/.gitkeep create mode 100644 sites/berkeley/tasks.jsonl create mode 100644 sites/berkeley/templates/404.html create mode 100644 sites/berkeley/templates/500.html create mode 100644 sites/berkeley/templates/about.html create mode 100644 sites/berkeley/templates/academics.html create mode 100644 sites/berkeley/templates/account.html create mode 100644 sites/berkeley/templates/admissions.html create mode 100644 sites/berkeley/templates/base.html create mode 100644 sites/berkeley/templates/department_detail.html create mode 100644 sites/berkeley/templates/departments.html create mode 100644 sites/berkeley/templates/event_detail.html create mode 100644 sites/berkeley/templates/events.html create mode 100644 sites/berkeley/templates/faculty.html create mode 100644 sites/berkeley/templates/faculty_profile.html create mode 100644 sites/berkeley/templates/index.html create mode 100644 sites/berkeley/templates/login.html create mode 100644 sites/berkeley/templates/news.html create mode 100644 sites/berkeley/templates/news_article.html create mode 100644 sites/berkeley/templates/program_detail.html create mode 100644 sites/berkeley/templates/programs.html create mode 100644 sites/berkeley/templates/register.html create mode 100644 sites/berkeley/templates/research.html create mode 100644 sites/berkeley/templates/research_center.html create mode 100644 sites/berkeley/templates/search.html diff --git a/Dockerfile b/Dockerfile index 991e5ab..73ca143 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # WebHarbor — slim, self-contained image. -# 15 Flask mirror sites + control plane on :8101. +# 16 Flask mirror sites + control plane on :8101. FROM python:3.12-slim-bookworm @@ -28,11 +28,17 @@ WORKDIR /opt/WebSyn # run scripts/fetch_assets.sh to pull them from Hugging Face first. COPY sites/ /opt/WebSyn/ +# Berkeley: all data is code-generated (no scraped images → no HF asset). +# Build the seed DB once at image-build time so websyn_start.sh can copy it on boot. +RUN cd /opt/WebSyn/berkeley && \ + python3 -c "from app import app" && \ + cp instance/berkeley.db instance_seed/berkeley.db + COPY websyn_start.sh /opt/websyn_start.sh COPY control_server.py /opt/control_server.py COPY site_runner.py /opt/site_runner.py RUN chmod +x /opt/websyn_start.sh -EXPOSE 8101 40000-40014 +EXPOSE 8101 40000-40015 CMD ["/opt/websyn_start.sh"] diff --git a/control_server.py b/control_server.py index c255253..7f7daff 100644 --- a/control_server.py +++ b/control_server.py @@ -26,7 +26,7 @@ 'allrecipes', 'amazon', 'apple', 'arxiv', 'bbc_news', 'booking', 'github', 'google_flights', 'google_map', 'google_search', 'huggingface', 'wolfram_alpha', 'cambridge_dictionary', - 'coursera', 'espn', + 'coursera', 'espn', 'berkeley', ] BASE_PORT = 40000 WEBSYN_DIR = '/opt/WebSyn' diff --git a/sites/berkeley/_health.py b/sites/berkeley/_health.py new file mode 100644 index 0000000..f404286 --- /dev/null +++ b/sites/berkeley/_health.py @@ -0,0 +1,57 @@ +"""UC Berkeley mirror health check.""" +from healthcheck import random_user + + +def run(p): + # 1. Home page renders + p.assert_get('home', '/', must_contain='Berkeley') + + # 2. News list renders + p.assert_get('news list', '/news', must_contain='article') + + # 3. Programs list renders + p.assert_get('programs list', '/programs', must_contain='program') + + # 4. Faculty list renders + p.assert_get('faculty list', '/faculty', must_contain='Professor') + + # 5. Search returns results + p.assert_get('search', '/search?q=computer+science', must_contain='result') + + # 6. Register page renders with CSRF + user = random_user() + html = p.assert_get('register page', '/register', must_contain='csrf_token') + token = p.csrf(html) + if not token: + p.check('register csrf token', False, 'no csrf in register form') + return + + # 7. Submit registration + p.assert_post('register submit', '/register', { + 'csrf_token': token, + 'username': user['first_name'].lower() + user['last_name'].lower(), + 'full_name': user['name'], + 'email': user['email'], + 'password': user['password'], + 'confirm': user['password'], + }, accept_status=(200, 302, 303)) + + # Logout so login form is real + p.get('/logout') + + # 8. Login page renders + html = p.assert_get('login page', '/login', accept_status=(200, 302, 303)) + token = p.csrf(html) if html else '' + + # 9. Submit login + if token: + p.assert_post('login submit', '/login', { + 'csrf_token': token, + 'email': user['email'], + 'password': user['password'], + }, accept_status=(200, 302, 303)) + else: + p.check('login submit', True, 'already authenticated from register') + + # 10. Authenticated account page + p.assert_get('account page', '/account', must_contain=user['first_name']) diff --git a/sites/berkeley/app.py b/sites/berkeley/app.py new file mode 100644 index 0000000..54d0288 --- /dev/null +++ b/sites/berkeley/app.py @@ -0,0 +1,747 @@ +#!/usr/bin/env python3 +"""UC Berkeley mirror — Flask application.""" +import os +import re +from datetime import datetime +from math import ceil + +from flask import (Flask, render_template, request, redirect, url_for, + flash, jsonify, session, abort, g) +from flask_sqlalchemy import SQLAlchemy +from flask_login import (LoginManager, UserMixin, login_user, logout_user, + login_required, current_user) +from flask_wtf import FlaskForm +from flask_wtf.csrf import CSRFProtect +from flask_bcrypt import Bcrypt +from wtforms import StringField, PasswordField, TextAreaField, SelectField +from wtforms.validators import DataRequired, Email, Length, EqualTo, Optional + +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) + +app = Flask(__name__) +app.config['SECRET_KEY'] = 'berkeley-mirror-secret-key-2024' +app.config['SQLALCHEMY_DATABASE_URI'] = ( + f"sqlite:///{os.path.join(BASE_DIR, 'instance', 'berkeley.db')}") +app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False +app.config['WTF_CSRF_TIME_LIMIT'] = None + +os.makedirs(os.path.join(BASE_DIR, 'instance'), exist_ok=True) + +db = SQLAlchemy(app) +bcrypt = Bcrypt(app) +login_manager = LoginManager(app) +login_manager.login_view = 'login' +login_manager.login_message = 'Please sign in to continue.' +login_manager.login_message_category = 'info' +csrf = CSRFProtect(app) + +PER_PAGE = 20 + +# ─── Helpers ────────────────────────────────────────────────────────────────── + +def slugify(text): + if not text: + return '' + s = re.sub(r'[^a-zA-Z0-9\s-]', '', text) + s = re.sub(r'[\s]+', '-', s.strip().lower()) + return s + +# ─── Models ─────────────────────────────────────────────────────────────────── + +class User(db.Model, UserMixin): + __tablename__ = 'users' + id = db.Column(db.Integer, primary_key=True) + email = db.Column(db.String(120), unique=True, nullable=False, index=True) + username = db.Column(db.String(80), unique=True, nullable=False, index=True) + password_hash = db.Column(db.String(255), nullable=False) + full_name = db.Column(db.String(150), nullable=False, default='') + role = db.Column(db.String(30), default='student') + bio = db.Column(db.Text, default='') + created_at = db.Column(db.DateTime, default=datetime.utcnow) + + bookmarks = db.relationship('Bookmark', backref='user', lazy=True, + cascade='all, delete-orphan') + + def set_password(self, pw): + self.password_hash = bcrypt.generate_password_hash(pw).decode('utf-8') + + def check_password(self, pw): + return bcrypt.check_password_hash(self.password_hash, pw) + + +class College(db.Model): + __tablename__ = 'colleges' + id = db.Column(db.Integer, primary_key=True) + name = db.Column(db.String(200), nullable=False) + slug = db.Column(db.String(200), unique=True, nullable=False, index=True) + description = db.Column(db.Text, default='') + dean = db.Column(db.String(150), default='') + founded_year = db.Column(db.Integer, default=1868) + undergrad_count = db.Column(db.Integer, default=1000) + grad_count = db.Column(db.Integer, default=500) + dept_count = db.Column(db.Integer, default=10) + + departments = db.relationship('Department', backref='college', lazy=True) + programs = db.relationship('Program', backref='college', lazy=True) + research_centers = db.relationship('ResearchCenter', backref='college', lazy=True) + + +class Department(db.Model): + __tablename__ = 'departments' + id = db.Column(db.Integer, primary_key=True) + name = db.Column(db.String(200), nullable=False) + slug = db.Column(db.String(200), unique=True, nullable=False, index=True) + college_id = db.Column(db.Integer, db.ForeignKey('colleges.id'), nullable=False) + description = db.Column(db.Text, default='') + chair = db.Column(db.String(150), default='') + phone = db.Column(db.String(30), default='') + location = db.Column(db.String(200), default='') + + faculty = db.relationship('Faculty', backref='department', lazy=True) + programs = db.relationship('Program', backref='department', lazy=True) + + +class Program(db.Model): + __tablename__ = 'programs' + id = db.Column(db.Integer, primary_key=True) + name = db.Column(db.String(300), nullable=False) + slug = db.Column(db.String(300), unique=True, nullable=False, index=True) + degree_type = db.Column(db.String(20), default='BA') + college_id = db.Column(db.Integer, db.ForeignKey('colleges.id'), nullable=True) + department_id = db.Column(db.Integer, db.ForeignKey('departments.id'), nullable=True) + description = db.Column(db.Text, default='') + requirements = db.Column(db.Text, default='') + units = db.Column(db.Integer, default=120) + duration_years = db.Column(db.Float, default=4.0) + application_deadline = db.Column(db.String(80), default='') + is_online = db.Column(db.Boolean, default=False) + gre_required = db.Column(db.Boolean, default=False) + + +class NewsArticle(db.Model): + __tablename__ = 'news_articles' + id = db.Column(db.Integer, primary_key=True) + title = db.Column(db.String(300), nullable=False) + slug = db.Column(db.String(300), unique=True, nullable=False, index=True) + category = db.Column(db.String(50), default='Campus Life') + author = db.Column(db.String(150), default='Berkeley News Staff') + published_date = db.Column(db.DateTime, default=datetime.utcnow) + content = db.Column(db.Text, default='') + summary = db.Column(db.Text, default='') + tags = db.Column(db.String(500), default='') + view_count = db.Column(db.Integer, default=0) + featured = db.Column(db.Boolean, default=False) + + +class Event(db.Model): + __tablename__ = 'events' + id = db.Column(db.Integer, primary_key=True) + title = db.Column(db.String(300), nullable=False) + description = db.Column(db.Text, default='') + start_datetime = db.Column(db.DateTime, nullable=False) + end_datetime = db.Column(db.DateTime, nullable=True) + location = db.Column(db.String(300), default='') + building = db.Column(db.String(200), default='') + category = db.Column(db.String(50), default='Lecture') + organizer = db.Column(db.String(200), default='') + registration_required = db.Column(db.Boolean, default=False) + cost = db.Column(db.String(50), default='Free') + url = db.Column(db.String(300), default='') + + +class ResearchCenter(db.Model): + __tablename__ = 'research_centers' + id = db.Column(db.Integer, primary_key=True) + name = db.Column(db.String(300), nullable=False) + slug = db.Column(db.String(300), unique=True, nullable=False, index=True) + description = db.Column(db.Text, default='') + director = db.Column(db.String(150), default='') + college_id = db.Column(db.Integer, db.ForeignKey('colleges.id'), nullable=True) + focus_areas = db.Column(db.String(500), default='') + url = db.Column(db.String(300), default='') + founded_year = db.Column(db.Integer, default=2000) + + +class Faculty(db.Model): + __tablename__ = 'faculty' + id = db.Column(db.Integer, primary_key=True) + name = db.Column(db.String(150), nullable=False) + slug = db.Column(db.String(200), unique=True, nullable=False, index=True) + title = db.Column(db.String(200), default='Professor') + department_id = db.Column(db.Integer, db.ForeignKey('departments.id'), nullable=True) + email = db.Column(db.String(120), default='') + office = db.Column(db.String(200), default='') + phone = db.Column(db.String(30), default='') + research_interests = db.Column(db.String(500), default='') + bio = db.Column(db.Text, default='') + is_emeritus = db.Column(db.Boolean, default=False) + + +class Bookmark(db.Model): + __tablename__ = 'bookmarks' + id = db.Column(db.Integer, primary_key=True) + user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) + item_type = db.Column(db.String(50), nullable=False) + item_id = db.Column(db.Integer, nullable=False) + note = db.Column(db.Text, default='') + created_at = db.Column(db.DateTime, default=datetime.utcnow) + + +# ─── Forms ──────────────────────────────────────────────────────────────────── + +class LoginForm(FlaskForm): + email = StringField('Email', validators=[DataRequired(), Email()]) + password = PasswordField('Password', validators=[DataRequired()]) + +class RegisterForm(FlaskForm): + username = StringField('Username', validators=[DataRequired(), Length(3, 80)]) + full_name = StringField('Full Name', validators=[DataRequired(), Length(2, 150)]) + email = StringField('Email', validators=[DataRequired(), Email()]) + password = PasswordField('Password', validators=[DataRequired(), Length(8, 100)]) + confirm = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('password')]) + +class ProfileForm(FlaskForm): + full_name = StringField('Full Name', validators=[DataRequired(), Length(2, 150)]) + email = StringField('Email', validators=[DataRequired(), Email()]) + bio = TextAreaField('Bio', validators=[Optional(), Length(max=1000)]) + +class BookmarkForm(FlaskForm): + item_type = StringField('Type', validators=[DataRequired()]) + item_id = StringField('ID', validators=[DataRequired()]) + note = TextAreaField('Note', validators=[Optional(), Length(max=500)]) + +# ─── Login Manager ──────────────────────────────────────────────────────────── + +@login_manager.user_loader +def load_user(user_id): + return db.session.get(User, int(user_id)) + +# ─── Context Processors ─────────────────────────────────────────────────────── + +@app.context_processor +def inject_globals(): + return { + 'now': datetime.utcnow(), + 'colleges': College.query.order_by(College.name).all(), + } + +# ─── Routes ─────────────────────────────────────────────────────────────────── + +@app.route('/') +def index(): + featured_news = NewsArticle.query.filter_by(featured=True).order_by( + NewsArticle.published_date.desc()).limit(6).all() + if len(featured_news) < 3: + featured_news = NewsArticle.query.order_by( + NewsArticle.published_date.desc()).limit(6).all() + upcoming_events = Event.query.filter( + Event.start_datetime >= datetime.utcnow() + ).order_by(Event.start_datetime).limit(4).all() + recent_research = ResearchCenter.query.limit(4).all() + stats = { + 'nobel_laureates': 12, + 'top_10_programs': 50, + 'varsity_sports': 30, + 'national_titles': 105, + 'faculty_count': 1629, + 'undergrad_count': 31800, + 'grad_count': 12000, + 'degree_programs': 350, + } + return render_template('index.html', + featured_news=featured_news, + upcoming_events=upcoming_events, + recent_research=recent_research, + stats=stats) + + +@app.route('/news') +def news(): + q = request.args.get('q', '').strip() + category = request.args.get('category', '') + featured = request.args.get('featured', '') + page = request.args.get('page', 1, type=int) + + query = NewsArticle.query + if q: + query = query.filter( + db.or_( + NewsArticle.title.ilike(f'%{q}%'), + NewsArticle.summary.ilike(f'%{q}%'), + NewsArticle.content.ilike(f'%{q}%'), + NewsArticle.tags.ilike(f'%{q}%'), + )) + if category: + query = query.filter(NewsArticle.category == category) + if featured == '1': + query = query.filter(NewsArticle.featured == True) + + query = query.order_by(NewsArticle.published_date.desc()) + total = query.count() + articles = query.offset((page - 1) * PER_PAGE).limit(PER_PAGE).all() + total_pages = ceil(total / PER_PAGE) if total else 1 + + categories = ['Research', 'Campus Life', 'Faculty', 'Student', 'Athletics', + 'Science', 'Arts'] + return render_template('news.html', + articles=articles, + total=total, + page=page, + total_pages=total_pages, + categories=categories, + current_category=category, + q=q, + featured=featured) + + +@app.route('/news/') +def news_article(slug): + article = NewsArticle.query.filter_by(slug=slug).first_or_404() + article.view_count = (article.view_count or 0) + 1 + db.session.commit() + related = NewsArticle.query.filter( + NewsArticle.category == article.category, + NewsArticle.id != article.id + ).order_by(NewsArticle.published_date.desc()).limit(3).all() + return render_template('news_article.html', article=article, related=related) + + +@app.route('/academics') +def academics(): + colleges = College.query.order_by(College.name).all() + total_programs = Program.query.count() + total_depts = Department.query.count() + return render_template('academics.html', + colleges=colleges, + total_programs=total_programs, + total_depts=total_depts) + + +@app.route('/programs') +def programs(): + q = request.args.get('q', '').strip() + college_slug = request.args.get('college', '') + degree = request.args.get('degree', '') + page = request.args.get('page', 1, type=int) + + query = Program.query + if q: + query = query.filter( + db.or_( + Program.name.ilike(f'%{q}%'), + Program.description.ilike(f'%{q}%'), + )) + if college_slug: + col = College.query.filter_by(slug=college_slug).first() + if col: + query = query.filter(Program.college_id == col.id) + if degree: + query = query.filter(Program.degree_type == degree) + + query = query.order_by(Program.name) + total = query.count() + progs = query.offset((page - 1) * PER_PAGE).limit(PER_PAGE).all() + total_pages = ceil(total / PER_PAGE) if total else 1 + + all_colleges = College.query.order_by(College.name).all() + degree_types = ['BA', 'BS', 'MA', 'MS', 'PhD', 'MPH', 'MBA', 'MEng', 'JD', 'MD'] + return render_template('programs.html', + programs=progs, + total=total, + page=page, + total_pages=total_pages, + all_colleges=all_colleges, + degree_types=degree_types, + current_college=college_slug, + current_degree=degree, + q=q) + + +@app.route('/programs/') +def program_detail(slug): + program = Program.query.filter_by(slug=slug).first_or_404() + related = Program.query.filter( + Program.college_id == program.college_id, + Program.id != program.id + ).limit(4).all() + return render_template('program_detail.html', program=program, related=related) + + +@app.route('/events') +def events(): + q = request.args.get('q', '').strip() + category = request.args.get('category', '') + date_filter = request.args.get('date', 'upcoming') + page = request.args.get('page', 1, type=int) + now = datetime.utcnow() + + query = Event.query + if q: + query = query.filter( + db.or_( + Event.title.ilike(f'%{q}%'), + Event.description.ilike(f'%{q}%'), + Event.location.ilike(f'%{q}%'), + Event.organizer.ilike(f'%{q}%'), + )) + if category: + query = query.filter(Event.category == category) + if date_filter == 'upcoming': + query = query.filter(Event.start_datetime >= now) + query = query.order_by(Event.start_datetime) + elif date_filter == 'past': + query = query.filter(Event.start_datetime < now) + query = query.order_by(Event.start_datetime.desc()) + elif date_filter == 'today': + today_start = now.replace(hour=0, minute=0, second=0, microsecond=0) + today_end = now.replace(hour=23, minute=59, second=59) + query = query.filter(Event.start_datetime.between(today_start, today_end)) + query = query.order_by(Event.start_datetime) + else: + query = query.order_by(Event.start_datetime) + + total = query.count() + evts = query.offset((page - 1) * PER_PAGE).limit(PER_PAGE).all() + total_pages = ceil(total / PER_PAGE) if total else 1 + + categories = ['Lecture', 'Sports', 'Arts', 'Career', 'Health', 'Social', 'Virtual'] + return render_template('events.html', + events=evts, + total=total, + page=page, + total_pages=total_pages, + categories=categories, + current_category=category, + date_filter=date_filter, + q=q) + + +@app.route('/events/') +def event_detail(event_id): + event = db.session.get(Event, event_id) + if event is None: + abort(404) + related = Event.query.filter( + Event.category == event.category, + Event.id != event.id, + Event.start_datetime >= datetime.utcnow() + ).order_by(Event.start_datetime).limit(3).all() + return render_template('event_detail.html', event=event, related=related) + + +@app.route('/research') +def research(): + centers = ResearchCenter.query.order_by(ResearchCenter.name).all() + colleges = College.query.order_by(College.name).all() + return render_template('research.html', centers=centers, colleges=colleges) + + +@app.route('/research/') +def research_center(slug): + center = ResearchCenter.query.filter_by(slug=slug).first_or_404() + related = ResearchCenter.query.filter( + ResearchCenter.college_id == center.college_id, + ResearchCenter.id != center.id + ).limit(3).all() + return render_template('research_center.html', center=center, related=related) + + +@app.route('/departments') +def departments(): + colleges = College.query.order_by(College.name).all() + depts_by_college = {} + for college in colleges: + depts_by_college[college] = Department.query.filter_by( + college_id=college.id).order_by(Department.name).all() + return render_template('departments.html', depts_by_college=depts_by_college) + + +@app.route('/departments/') +def department_detail(slug): + dept = Department.query.filter_by(slug=slug).first_or_404() + faculty_list = Faculty.query.filter_by(department_id=dept.id).order_by(Faculty.name).all() + programs = Program.query.filter_by(department_id=dept.id).all() + return render_template('department_detail.html', + dept=dept, + faculty_list=faculty_list, + programs=programs) + + +@app.route('/admissions') +def admissions(): + undergrad_programs = Program.query.filter( + Program.degree_type.in_(['BA', 'BS']) + ).count() + grad_programs = Program.query.filter( + Program.degree_type.in_(['MA', 'MS', 'PhD', 'MPH', 'MBA', 'MEng', 'JD', 'MD']) + ).count() + return render_template('admissions.html', + undergrad_programs=undergrad_programs, + grad_programs=grad_programs) + + +@app.route('/about') +def about(): + stats = { + 'nobel_laureates': 12, + 'top_10_programs': 50, + 'varsity_sports': 30, + 'national_titles': 105, + 'faculty_count': 1629, + 'undergrad_count': 31800, + 'grad_count': 12000, + 'degree_programs': 350, + 'founded': 1868, + 'acres': 1232, + 'libraries': 32, + 'alumni': 600000, + } + return render_template('about.html', stats=stats) + + +@app.route('/search') +def search(): + q = request.args.get('q', '').strip() + results = {'programs': [], 'news': [], 'events': [], 'faculty': [], + 'research': []} + total = 0 + if q: + results['programs'] = Program.query.filter( + db.or_( + Program.name.ilike(f'%{q}%'), + Program.description.ilike(f'%{q}%'), + )).limit(10).all() + results['news'] = NewsArticle.query.filter( + db.or_( + NewsArticle.title.ilike(f'%{q}%'), + NewsArticle.summary.ilike(f'%{q}%'), + NewsArticle.tags.ilike(f'%{q}%'), + )).order_by(NewsArticle.published_date.desc()).limit(10).all() + results['events'] = Event.query.filter( + db.or_( + Event.title.ilike(f'%{q}%'), + Event.description.ilike(f'%{q}%'), + )).limit(10).all() + results['faculty'] = Faculty.query.filter( + db.or_( + Faculty.name.ilike(f'%{q}%'), + Faculty.research_interests.ilike(f'%{q}%'), + Faculty.bio.ilike(f'%{q}%'), + )).limit(10).all() + results['research'] = ResearchCenter.query.filter( + db.or_( + ResearchCenter.name.ilike(f'%{q}%'), + ResearchCenter.description.ilike(f'%{q}%'), + ResearchCenter.focus_areas.ilike(f'%{q}%'), + )).limit(10).all() + total = sum(len(v) for v in results.values()) + return render_template('search.html', q=q, results=results, total=total) + + +@app.route('/faculty') +def faculty(): + q = request.args.get('q', '').strip() + dept_slug = request.args.get('dept', '') + page = request.args.get('page', 1, type=int) + + query = Faculty.query + if q: + query = query.filter( + db.or_( + Faculty.name.ilike(f'%{q}%'), + Faculty.research_interests.ilike(f'%{q}%'), + Faculty.title.ilike(f'%{q}%'), + )) + if dept_slug: + dept = Department.query.filter_by(slug=dept_slug).first() + if dept: + query = query.filter(Faculty.department_id == dept.id) + + query = query.order_by(Faculty.name) + total = query.count() + faculty_list = query.offset((page - 1) * PER_PAGE).limit(PER_PAGE).all() + total_pages = ceil(total / PER_PAGE) if total else 1 + + all_depts = Department.query.order_by(Department.name).all() + return render_template('faculty.html', + faculty_list=faculty_list, + total=total, + page=page, + total_pages=total_pages, + all_depts=all_depts, + current_dept=dept_slug, + q=q) + + +@app.route('/faculty/') +def faculty_profile(slug): + member = Faculty.query.filter_by(slug=slug).first_or_404() + colleagues = [] + if member.department_id: + colleagues = Faculty.query.filter( + Faculty.department_id == member.department_id, + Faculty.id != member.id + ).limit(5).all() + return render_template('faculty_profile.html', member=member, colleagues=colleagues) + + +@app.route('/login', methods=['GET', 'POST']) +def login(): + if current_user.is_authenticated: + return redirect(url_for('index')) + form = LoginForm() + if form.validate_on_submit(): + user = User.query.filter_by(email=form.email.data.lower().strip()).first() + if user and user.check_password(form.password.data): + login_user(user) + next_page = request.args.get('next') + flash('Welcome back!', 'success') + return redirect(next_page or url_for('index')) + flash('Invalid email or password.', 'danger') + return render_template('login.html', form=form) + + +@app.route('/register', methods=['GET', 'POST']) +def register(): + if current_user.is_authenticated: + return redirect(url_for('index')) + form = RegisterForm() + if form.validate_on_submit(): + if User.query.filter_by(email=form.email.data.lower().strip()).first(): + flash('Email already registered.', 'danger') + elif User.query.filter_by(username=form.username.data.strip()).first(): + flash('Username already taken.', 'danger') + else: + user = User( + email=form.email.data.lower().strip(), + username=form.username.data.strip(), + full_name=form.full_name.data.strip(), + ) + user.set_password(form.password.data) + db.session.add(user) + db.session.commit() + login_user(user) + flash('Account created! Welcome to UC Berkeley.', 'success') + return redirect(url_for('index')) + return render_template('register.html', form=form) + + +@app.route('/logout', methods=['GET', 'POST']) +@login_required +def logout(): + logout_user() + flash('You have been logged out.', 'info') + return redirect(url_for('index')) + + +@app.route('/account') +@login_required +def account(): + bookmarks = Bookmark.query.filter_by(user_id=current_user.id).order_by( + Bookmark.created_at.desc()).all() + bookmark_details = [] + for bm in bookmarks: + detail = {'bookmark': bm, 'item': None, 'title': '', 'url': '#'} + if bm.item_type == 'program': + item = db.session.get(Program, bm.item_id) + if item: + detail['item'] = item + detail['title'] = item.name + detail['url'] = url_for('program_detail', slug=item.slug) + elif bm.item_type == 'news': + item = db.session.get(NewsArticle, bm.item_id) + if item: + detail['item'] = item + detail['title'] = item.title + detail['url'] = url_for('news_article', slug=item.slug) + elif bm.item_type == 'event': + item = db.session.get(Event, bm.item_id) + if item: + detail['item'] = item + detail['title'] = item.title + detail['url'] = url_for('event_detail', event_id=item.id) + elif bm.item_type == 'faculty': + item = db.session.get(Faculty, bm.item_id) + if item: + detail['item'] = item + detail['title'] = item.name + detail['url'] = url_for('faculty_profile', slug=item.slug) + elif bm.item_type == 'research': + item = db.session.get(ResearchCenter, bm.item_id) + if item: + detail['item'] = item + detail['title'] = item.name + detail['url'] = url_for('research_center', slug=item.slug) + bookmark_details.append(detail) + return render_template('account.html', bookmark_details=bookmark_details) + + +@app.route('/bookmark/add', methods=['POST']) +@login_required +def bookmark_add(): + item_type = request.form.get('item_type') + item_id = request.form.get('item_id', type=int) + note = request.form.get('note', '') + if item_type and item_id: + existing = Bookmark.query.filter_by( + user_id=current_user.id, item_type=item_type, item_id=item_id + ).first() + if not existing: + bm = Bookmark(user_id=current_user.id, item_type=item_type, + item_id=item_id, note=note) + db.session.add(bm) + db.session.commit() + flash('Saved to bookmarks.', 'success') + else: + flash('Already bookmarked.', 'info') + next_url = request.form.get('next') or request.referrer or url_for('account') + return redirect(next_url) + + +@app.route('/bookmark/remove', methods=['POST']) +@login_required +def bookmark_remove(): + bookmark_id = request.form.get('bookmark_id', type=int) + if bookmark_id: + bm = db.session.get(Bookmark, bookmark_id) + if bm and bm.user_id == current_user.id: + db.session.delete(bm) + db.session.commit() + flash('Bookmark removed.', 'info') + return redirect(request.referrer or url_for('account')) + + +@app.route('/_health') +def health(): + try: + college_count = College.query.count() + program_count = Program.query.count() + return jsonify({ + 'status': 'ok', + 'site': 'berkeley', + 'colleges': college_count, + 'programs': program_count, + }) + except Exception as e: + return jsonify({'status': 'error', 'message': str(e)}), 500 + + +@app.errorhandler(404) +def not_found(e): + return render_template('404.html'), 404 + + +@app.errorhandler(500) +def server_error(e): + return render_template('500.html'), 500 + + +# ─── Startup ────────────────────────────────────────────────────────────────── + +with app.app_context(): + db.create_all() + from seed_data import seed + seed() + +if __name__ == '__main__': + app.run(host='0.0.0.0', port=40015, debug=False) diff --git a/sites/berkeley/seed_data.py b/sites/berkeley/seed_data.py new file mode 100644 index 0000000..3865acd --- /dev/null +++ b/sites/berkeley/seed_data.py @@ -0,0 +1,2248 @@ +#!/usr/bin/env python3 +"""Seed data for UC Berkeley mirror site. Idempotent — safe to call multiple times.""" +import re +from datetime import datetime, timedelta + + +def slugify(text): + if not text: + return '' + s = re.sub(r'[^a-zA-Z0-9\s-]', '', text) + s = re.sub(r'[\s]+', '-', s.strip().lower()) + return s + + +def seed(): + from app import db, College, Department, Program, NewsArticle, Event, \ + ResearchCenter, Faculty, User, Bookmark + from flask_bcrypt import Bcrypt + import app as app_module + + bcrypt = Bcrypt(app_module.app) + + # ── Idempotency gate ────────────────────────────────────────────────────── + if College.query.first(): + return + + # ── Colleges ────────────────────────────────────────────────────────────── + colleges_data = [ + { + 'name': 'College of Letters and Science', + 'slug': 'letters-and-science', + 'description': 'The largest and most diverse college at Berkeley, encompassing the humanities, social sciences, physical sciences, and biological sciences. With over 80 departments and programs, L&S offers students an unparalleled breadth of intellectual exploration.', + 'dean': 'Dean Mary C. Gilly', + 'founded_year': 1868, + 'undergrad_count': 16000, + 'grad_count': 3500, + 'dept_count': 80, + }, + { + 'name': 'College of Engineering', + 'slug': 'engineering', + 'description': 'One of the top engineering schools in the world, Berkeley Engineering offers programs that combine rigorous technical training with broad interdisciplinary perspectives, preparing students to tackle the grand challenges of the 21st century.', + 'dean': 'Dean Tsu-Jae King Liu', + 'founded_year': 1931, + 'undergrad_count': 4500, + 'grad_count': 3200, + 'dept_count': 11, + }, + { + 'name': 'Haas School of Business', + 'slug': 'haas-business', + 'description': 'The Haas School of Business develops leaders who redefine how we do business. Ranked among the top business schools globally, Haas emphasizes innovation, sustainability, and responsible stewardship.', + 'dean': 'Dean Ann Harrison', + 'founded_year': 1898, + 'undergrad_count': 700, + 'grad_count': 1500, + 'dept_count': 6, + }, + { + 'name': 'School of Law', + 'slug': 'law', + 'description': 'Berkeley Law is one of the nation\'s premier law schools. Known for its commitment to public interest law and social justice, Boalt Hall has educated generations of legal scholars, practitioners, and public servants.', + 'dean': 'Dean Erwin Chemerinsky', + 'founded_year': 1894, + 'undergrad_count': 0, + 'grad_count': 900, + 'dept_count': 4, + }, + { + 'name': 'School of Information', + 'slug': 'information', + 'description': 'The School of Information is dedicated to creating and sharing knowledge that serves individuals, organizations, and communities in an information-intensive society. I School researchers and students study the intersection of people, information, and technology.', + 'dean': 'Dean Coye Cheshire', + 'founded_year': 1996, + 'undergrad_count': 200, + 'grad_count': 600, + 'dept_count': 3, + }, + { + 'name': 'College of Chemistry', + 'slug': 'chemistry', + 'description': 'The College of Chemistry is the oldest professional school at Berkeley, and consistently ranks among the top chemistry and chemical engineering programs in the world. The college houses Nobel Prize-winning faculty and cutting-edge research labs.', + 'dean': 'Dean Douglas Clark', + 'founded_year': 1872, + 'undergrad_count': 800, + 'grad_count': 700, + 'dept_count': 2, + }, + { + 'name': 'Graduate School of Education', + 'slug': 'education', + 'description': 'Berkeley\'s Graduate School of Education advances educational equity and excellence through research, practice, and policy. Faculty and students work to transform educational systems and improve outcomes for all learners.', + 'dean': 'Dean Mindy Kornhaber', + 'founded_year': 1892, + 'undergrad_count': 0, + 'grad_count': 600, + 'dept_count': 5, + }, + { + 'name': 'School of Public Health', + 'slug': 'public-health', + 'description': 'The School of Public Health at Berkeley prepares leaders to improve health through research, education, and public service. With expertise spanning epidemiology, biostatistics, health policy, and environmental health.', + 'dean': 'Dean Michael Lu', + 'founded_year': 1943, + 'undergrad_count': 300, + 'grad_count': 800, + 'dept_count': 6, + }, + { + 'name': 'College of Natural Resources', + 'slug': 'natural-resources', + 'description': 'The College of Natural Resources integrates natural, social, and human sciences to develop sustainable approaches to environmental and resource management challenges. Students learn to address complex problems at the intersection of ecology, society, and policy.', + 'dean': 'Dean David Ackerly', + 'founded_year': 1868, + 'undergrad_count': 1800, + 'grad_count': 400, + 'dept_count': 7, + }, + { + 'name': 'College of Environmental Design', + 'slug': 'environmental-design', + 'description': 'The College of Environmental Design prepares students to shape the built and natural environment through architecture, landscape architecture, city planning, and urban design. CED emphasizes sustainable, equitable, and beautiful environments.', + 'dean': 'Dean Jennifer Wolch', + 'founded_year': 1959, + 'undergrad_count': 900, + 'grad_count': 600, + 'dept_count': 3, + }, + { + 'name': 'Goldman School of Public Policy', + 'slug': 'public-policy', + 'description': 'The Goldman School of Public Policy educates students to develop and implement effective, evidence-based policies that address society\'s most pressing challenges. The school bridges rigorous analysis with practical problem-solving.', + 'dean': 'Dean Henry Brady', + 'founded_year': 1969, + 'undergrad_count': 0, + 'grad_count': 350, + 'dept_count': 2, + }, + { + 'name': 'School of Social Welfare', + 'slug': 'social-welfare', + 'description': 'The School of Social Welfare advances the well-being of vulnerable populations and communities through education, research, and service. The school prepares social workers and researchers to address poverty, inequality, and social injustice.', + 'dean': 'Dean Tina Sacks', + 'founded_year': 1944, + 'undergrad_count': 0, + 'grad_count': 350, + 'dept_count': 3, + }, + { + 'name': 'School of Journalism', + 'slug': 'journalism', + 'description': 'The Graduate School of Journalism at Berkeley trains journalists to serve the public interest through rigorous reporting, ethical practice, and innovative storytelling. Graduates work across all media platforms locally and globally.', + 'dean': 'Dean Geeta Anand', + 'founded_year': 1903, + 'undergrad_count': 0, + 'grad_count': 200, + 'dept_count': 2, + }, + { + 'name': 'School of Optometry', + 'slug': 'optometry', + 'description': 'The School of Optometry provides doctoral education in optometry and vision science, combining clinical training with cutting-edge research on visual function, disease, and rehabilitation. The school\'s clinic serves the Bay Area community.', + 'dean': 'Dean John Flanagan', + 'founded_year': 1923, + 'undergrad_count': 0, + 'grad_count': 350, + 'dept_count': 3, + }, + ] + + colleges = {} + for cd in colleges_data: + c = College(**cd) + db.session.add(c) + db.session.flush() + colleges[cd['slug']] = c + + # ── Departments ─────────────────────────────────────────────────────────── + departments_data = [ + # College of Letters and Science + ('Department of Mathematics', 'mathematics', 'letters-and-science', + 'The Department of Mathematics offers comprehensive programs in pure and applied mathematics, statistics, and mathematical physics.', 'Prof. Tatiana Toro', '(510) 642-6550', '970 Evans Hall'), + ('Department of Physics', 'physics', 'letters-and-science', + 'The Physics Department conducts research across particle physics, condensed matter, astrophysics, and quantum information.', 'Prof. Hartmut Haeffner', '(510) 642-2319', '366 LeConte Hall'), + ('Department of History', 'history', 'letters-and-science', + 'The History Department offers rich programs in U.S., European, Asian, African, and Latin American history spanning ancient times to the present.', 'Prof. Scott Saul', '(510) 642-1971', '3229 Dwinelle Hall'), + ('Department of English', 'english', 'letters-and-science', + 'The English Department offers courses in literature, creative writing, rhetoric, and linguistics from medieval to contemporary periods.', 'Prof. Ramona Naddaff', '(510) 642-3467', '322 Wheeler Hall'), + ('Department of Political Science', 'political-science', 'letters-and-science', + 'The Political Science Department explores comparative politics, international relations, American politics, and political theory.', 'Prof. Robert Van Houweling', '(510) 642-6323', '210 Barrows Hall'), + ('Department of Psychology', 'psychology', 'letters-and-science', + 'The Psychology Department bridges cognitive, developmental, social, clinical, and neuroscience approaches to understanding human behavior.', 'Prof. Stephen Hinshaw', '(510) 642-5292', '3210 Tolman Hall'), + ('Department of Economics', 'economics', 'letters-and-science', + 'The Economics Department is home to world-renowned scholars in micro- and macroeconomics, econometrics, development, and behavioral economics.', 'Prof. Ulrike Malmendier', '(510) 642-0822', '508-1 Evans Hall'), + ('Department of Sociology', 'sociology', 'letters-and-science', + 'The Sociology Department investigates social structures, inequality, organizations, culture, and social change with global reach.', 'Prof. Cybelle Fox', '(510) 642-4766', '410 Barrows Hall'), + ('Department of Chemistry', 'chemistry-dept', 'chemistry', + 'The Department of Chemistry is home to Nobel laureates and world-leading researchers in organic, inorganic, physical, and theoretical chemistry.', 'Prof. F. Dean Toste', '(510) 642-5882', '420 Latimer Hall'), + ('Department of Chemical and Biomolecular Engineering', 'chemical-biomolecular-engineering', 'chemistry', + 'CBE combines engineering principles with biological sciences to create innovations in pharmaceuticals, energy, and materials.', 'Prof. Nitash Balsara', '(510) 642-5003', '201 Gilman Hall'), + # College of Engineering + ('Department of Electrical Engineering and Computer Sciences', 'eecs', 'engineering', + 'EECS is consistently ranked as one of the top programs globally, with research spanning AI, systems, hardware, algorithms, and robotics.', 'Prof. James Demmel', '(510) 642-1042', '253 Cory Hall'), + ('Department of Mechanical Engineering', 'mechanical-engineering', 'engineering', + 'The ME department conducts research in design, robotics, biomechanics, manufacturing, and energy systems.', 'Prof. Grace Gu', '(510) 642-5260', '6117 Etcheverry Hall'), + ('Department of Civil and Environmental Engineering', 'civil-environmental-engineering', 'engineering', + 'CEE addresses critical infrastructure, environmental protection, and sustainability challenges through research and education.', 'Prof. Kenichi Soga', '(510) 642-3261', '760 Davis Hall'), + ('Department of Bioengineering', 'bioengineering', 'engineering', + 'The Bioengineering Department develops solutions at the interface of engineering and the life sciences, from medical devices to synthetic biology.', 'Prof. Sanjay Kumar', '(510) 642-5204', '306 Stanley Hall'), + ('Department of Materials Science and Engineering', 'materials-science', 'engineering', + 'MSE research covers nanomaterials, biomaterials, electronic materials, and computational materials design.', 'Prof. Daryl Chrzan', '(510) 642-3801', '210 Hearst Memorial Mining Building'), + ('Department of Nuclear Engineering', 'nuclear-engineering', 'engineering', + 'Nuclear Engineering at Berkeley covers nuclear energy, radiation sciences, plasma physics, and nuclear security.', 'Prof. Massimiliano Fratoni', '(510) 642-5010', '4153 Etcheverry Hall'), + ('Department of Industrial Engineering and Operations Research', 'ieor', 'engineering', + 'IEOR applies mathematical modeling, statistics, and optimization to design and improve complex systems.', 'Prof. Zeynep Erkin Baz', '(510) 642-4616', '4141 Etcheverry Hall'), + # Haas School of Business + ('Finance Group', 'finance', 'haas-business', + 'The Finance Group conducts leading research in corporate finance, investments, financial markets, and behavioral finance.', 'Prof. Terrance Odean', '(510) 642-1752', 'F402 Haas School of Business'), + ('Operations and Information Technology Management', 'operations-it', 'haas-business', + 'OITM researches supply chain management, information systems, data analytics, and technology strategy.', 'Prof. Ying-Ju Chen', '(510) 642-1780', 'F620 Haas School of Business'), + # School of Law + ('Jurisprudence and Social Policy', 'jurisprudence-social-policy', 'law', + 'JSP offers interdisciplinary study of law and social science, preparing scholars and practitioners for complex legal challenges.', 'Prof. Jonathan Simon', '(510) 642-3476', '489 Simon Hall'), + # School of Information + ('Information Studies', 'information-studies', 'information', + 'The I School offers interdisciplinary programs at the intersection of information, technology, and people.', 'Prof. Marti Hearst', '(510) 642-1464', '102 South Hall'), + # School of Public Health + ('Epidemiology and Biostatistics', 'epidemiology-biostatistics', 'public-health', + 'The division trains researchers and practitioners to understand disease distribution and health determinants in populations.', 'Prof. Alan Hubbard', '(510) 642-4712', '50 University Hall'), + ('Environmental Health Sciences', 'environmental-health', 'public-health', + 'EHS investigates how environmental factors affect human health, from air quality to chemical exposures.', 'Prof. John Balmes', '(510) 642-3074', 'Valley Life Sciences Building'), + # College of Natural Resources + ('Department of Environmental Science, Policy, and Management', 'espm', 'natural-resources', + 'ESPM integrates natural and social sciences to address environmental challenges including conservation, agriculture, and climate change.', 'Prof. Katharine Mach', '(510) 642-7171', '130 Mulford Hall'), + ('Department of Nutritional Sciences and Toxicology', 'nutritional-sciences', 'natural-resources', + 'NST investigates the roles of nutrients and dietary factors in human health, disease prevention, and toxicology.', 'Prof. Hei Sook Sul', '(510) 642-0646', '119 Morgan Hall'), + # College of Environmental Design + ('Department of Architecture', 'architecture', 'environmental-design', + 'The Architecture Department offers programs in design, theory, history, and technology of the built environment.', 'Prof. Tom Buresh', '(510) 642-4942', '232 Wurster Hall'), + ('Department of City and Regional Planning', 'city-planning', 'environmental-design', + 'DCRP prepares planners and urban designers to create equitable, sustainable, and vibrant cities and regions.', 'Prof. Malo Hutson', '(510) 642-3256', '228 Wurster Hall'), + ('Department of Landscape Architecture and Environmental Planning', 'landscape-architecture', 'environmental-design', + 'LAEP trains landscape architects and environmental planners to design and manage outdoor spaces and ecosystems.', 'Prof. Joe McBride', '(510) 642-4022', '202 Wurster Hall'), + # Graduate School of Education + ('Cognition and Development', 'cognition-development', 'education', + 'Researchers in Cognition and Development study how learning occurs across the lifespan and in diverse educational contexts.', 'Prof. Alison Gopnik', '(510) 642-2984', '4533 Tolman Hall'), + ('Social and Cultural Studies', 'social-cultural-studies', 'education', + 'SCS examines education through the lenses of race, gender, culture, and social justice to advance equity in schools.', 'Prof. Zeus Leonardo', '(510) 642-0818', '5629 Tolman Hall'), + ] + + departments = {} + for (name, slug, college_slug, desc, chair, phone, location) in departments_data: + college = colleges[college_slug] + d = Department( + name=name, slug=slug, college_id=college.id, + description=desc, chair=chair, phone=phone, location=location + ) + db.session.add(d) + db.session.flush() + departments[slug] = d + + # ── Programs ────────────────────────────────────────────────────────────── + programs_data = [ + # Letters and Science - BA + ('Applied Mathematics', 'BA', 'letters-and-science', 'mathematics', + 'The Applied Mathematics major trains students in mathematical modeling, numerical analysis, and computation for real-world problem solving.', + 'Calculus sequence, Linear Algebra, Differential Equations, Probability, Statistics, Numerical Analysis, plus upper division electives in applied areas.', + 120, 4.0, 'November 30', False, False), + ('Pure Mathematics', 'BA', 'letters-and-science', 'mathematics', + 'Pure Mathematics develops rigorous mathematical reasoning across analysis, algebra, topology, and number theory.', + 'Calculus, Linear Algebra, Abstract Algebra, Real Analysis, Complex Analysis, Topology, plus graduate preparatory courses.', + 120, 4.0, 'November 30', False, False), + ('Physics', 'BA', 'letters-and-science', 'physics', + 'The Physics BA provides a comprehensive foundation in classical and modern physics, preparing graduates for careers in science, technology, and education.', + 'Mechanics, Electricity & Magnetism, Quantum Mechanics, Thermodynamics, Mathematical Methods, plus laboratory courses.', + 120, 4.0, 'November 30', False, False), + ('History', 'BA', 'letters-and-science', 'history', + 'The History major develops critical thinking, research, and writing skills through the study of human societies across time and place.', + 'Lower division breadth requirements, upper division seminars, reading courses, and a senior research thesis.', + 120, 4.0, 'November 30', False, False), + ('English', 'BA', 'letters-and-science', 'english', + 'The English major offers deep engagement with literature, language, and writing across centuries and cultures.', + 'Survey courses in British and American literature, upper division seminars, literary theory, and senior writing project.', + 120, 4.0, 'November 30', False, False), + ('Political Science', 'BA', 'letters-and-science', 'political-science', + 'Political Science prepares students to understand government, politics, and international relations through empirical and theoretical lenses.', + 'Introduction to Political Theory, American Politics, Comparative Politics, International Relations, Methods, senior thesis.', + 120, 4.0, 'November 30', False, False), + ('Psychology', 'BA', 'letters-and-science', 'psychology', + 'The Psychology major explores the science of mind and behavior through biological, cognitive, developmental, and social perspectives.', + 'Introduction to Psychology, Statistics, Research Methods, Biological Bases of Behavior, Cognitive Psychology, upper division electives.', + 120, 4.0, 'November 30', False, False), + ('Economics', 'BA', 'letters-and-science', 'economics', + 'The Economics major provides rigorous training in microeconomics, macroeconomics, and econometrics, with applications across industries.', + 'Principles of Microeconomics, Macroeconomics, Econometrics, Intermediate Micro and Macro, upper division electives.', + 120, 4.0, 'November 30', False, False), + ('Sociology', 'BA', 'letters-and-science', 'sociology', + 'Sociology examines social structures, institutions, inequalities, and social change through empirical and theoretical approaches.', + 'Classical and Contemporary Theory, Research Methods, Statistics, Social Inequality, upper division seminars.', + 120, 4.0, 'November 30', False, False), + # Engineering - BS + ('Computer Science', 'BS', 'engineering', 'eecs', + 'The CS BS at Berkeley is one of the most sought-after programs in the world, covering algorithms, systems, AI, and theory.', + 'Data Structures, Algorithms, Computer Architecture, Operating Systems, AI, Machine Learning, Software Engineering, plus technical electives.', + 128, 4.0, 'November 30', False, False), + ('Electrical Engineering and Computer Sciences', 'BS', 'engineering', 'eecs', + 'The EECS BS integrates hardware and software, preparing graduates for careers at the intersection of computing and electronics.', + 'Circuits, Signals & Systems, VLSI Design, Computer Architecture, Algorithms, Software Engineering, Machine Learning.', + 128, 4.0, 'November 30', False, False), + ('Mechanical Engineering', 'BS', 'engineering', 'mechanical-engineering', + 'The ME BS covers engineering design, thermodynamics, fluid mechanics, solid mechanics, robotics, and manufacturing.', + 'Statics, Dynamics, Thermodynamics, Fluid Mechanics, Materials, Control Systems, Design Projects, senior capstone.', + 128, 4.0, 'November 30', False, False), + ('Civil Engineering', 'BS', 'engineering', 'civil-environmental-engineering', + 'Civil Engineering prepares engineers to design, build, and manage infrastructure including bridges, buildings, and water systems.', + 'Structural Analysis, Geotechnical Engineering, Transportation Engineering, Environmental Engineering, senior design project.', + 128, 4.0, 'November 30', False, False), + ('Bioengineering', 'BS', 'engineering', 'bioengineering', + 'Bioengineering applies engineering principles to medicine and biology, spanning medical devices, biomaterials, and synthetic biology.', + 'Cell and Molecular Biology, Biomechanics, Bioelectricity, Biomaterials, Bioinstrumentation, lab rotations, senior capstone.', + 128, 4.0, 'November 30', False, False), + ('Materials Science and Engineering', 'BS', 'engineering', 'materials-science', + 'MSE trains engineers to design advanced materials from metals and ceramics to polymers and nanomaterials.', + 'Crystal Structure, Thermodynamics, Electronic Properties, Mechanical Behavior, Materials Lab, senior thesis project.', + 128, 4.0, 'November 30', False, False), + ('Industrial Engineering and Operations Research', 'BS', 'engineering', 'ieor', + 'IEOR teaches optimization, statistics, and systems engineering with applications in logistics, finance, and healthcare.', + 'Linear Programming, Probability, Statistics, Simulation, Supply Chain, Human Factors, senior design project.', + 128, 4.0, 'November 30', False, False), + ('Nuclear Engineering', 'BS', 'engineering', 'nuclear-engineering', + 'Nuclear Engineering prepares engineers in reactor design, radiation safety, plasma physics, and nuclear security.', + 'Nuclear Physics, Reactor Theory, Radiation Detection, Thermodynamics, Nuclear Safety, senior project.', + 128, 4.0, 'November 30', False, False), + # Chemistry + ('Chemistry', 'BS', 'chemistry', 'chemistry-dept', + 'The Chemistry BS provides rigorous training in organic, inorganic, physical, and analytical chemistry with extensive laboratory experience.', + 'General Chemistry, Organic Chemistry, Physical Chemistry, Analytical Chemistry, Biochemistry, Spectroscopy, senior research.', + 126, 4.0, 'November 30', False, False), + ('Chemical Engineering', 'BS', 'chemistry', 'chemical-biomolecular-engineering', + 'Chemical Engineering combines chemistry, physics, and mathematics to design processes that convert raw materials into useful products.', + 'Mass and Energy Balances, Fluid Mechanics, Heat Transfer, Thermodynamics, Reactor Design, Process Control, senior design.', + 128, 4.0, 'November 30', False, False), + # Natural Resources + ('Environmental Sciences', 'BS', 'natural-resources', 'espm', + 'Environmental Sciences prepares students to understand and address environmental challenges through an interdisciplinary approach.', + 'Ecology, Chemistry, Statistics, Environmental Policy, Field Methods, Capstone Project.', + 120, 4.0, 'November 30', False, False), + ('Nutritional Sciences', 'BS', 'natural-resources', 'nutritional-sciences', + 'Nutritional Sciences trains students in the biochemistry of nutrients, dietary assessment, and the relationships between diet and health.', + 'Biochemistry, Physiology, Nutritional Biochemistry, Diet and Chronic Disease, Nutritional Epidemiology, senior research.', + 120, 4.0, 'November 30', False, False), + # Environmental Design + ('Architecture', 'BS', 'environmental-design', 'architecture', + 'The Architecture BS develops design skills, technical knowledge, and critical thinking in the built environment.', + 'Design Studios, Structures, Environmental Systems, History and Theory, Materials and Methods, senior thesis studio.', + 120, 4.0, 'November 30', False, False), + # Graduate Programs - MS + ('Computer Science', 'MS', 'engineering', 'eecs', + 'The CS MS at Berkeley provides advanced training in algorithms, systems, artificial intelligence, and computer science theory.', + 'Foundational coursework in theory, systems, and AI; research project or thesis; breadth requirements across CS areas.', + 24, 1.5, 'December 1', False, True), + ('Electrical Engineering', 'MS', 'engineering', 'eecs', + 'The EE MS covers advanced topics in signal processing, communications, power systems, photonics, and nanoelectronics.', + 'Advanced coursework in core EE areas, research project, comprehensive exam.', + 24, 1.5, 'December 1', False, True), + ('Mechanical Engineering', 'MS', 'engineering', 'mechanical-engineering', + 'The ME MS provides specialized training in areas such as robotics, biomechanics, energy systems, and manufacturing.', + 'Advanced coursework, research project or thesis, qualifying exam.', + 24, 1.5, 'December 1', False, True), + ('Data Science', 'MS', 'information', 'information-studies', + 'The MIDS is a professional Master\'s program preparing data scientists for careers in industry, government, and research.', + 'Data Engineering, Machine Learning, Statistics, Research Design, Visualization, Leadership, capstone project.', + 54, 2.0, 'February 1', True, False), + ('Information Management and Systems', 'MS', 'information', 'information-studies', + 'MIMS focuses on information organization, retrieval, interface design, and the social dimensions of technology.', + 'Foundations of Information, Research Methods, Synthesis Projects, User Experience, Technology Policy.', + 48, 2.0, 'January 15', False, False), + ('Public Health', 'MPH', 'public-health', 'epidemiology-biostatistics', + 'The MPH prepares public health professionals to address population health challenges through research, program development, and policy advocacy.', + 'Epidemiology, Biostatistics, Environmental Health, Health Policy, Program Planning, Community Practicum, capstone.', + 42, 2.0, 'December 1', False, False), + ('City and Regional Planning', 'MS', 'environmental-design', 'city-planning', + 'The MCP prepares planners to address urban challenges including housing, transportation, environmental sustainability, and economic development.', + 'Planning Theory, Research Methods, Urban Design Studio, Policy Analysis, Community Development, thesis or professional report.', + 48, 2.0, 'January 5', False, False), + ('Environmental Science, Policy and Management', 'MS', 'natural-resources', 'espm', + 'The ESPM MS trains scholars and practitioners to address environmental challenges from field-level conservation to global climate policy.', + 'Research Methods, Environmental Law, Ecosystem Services, Internship, thesis research.', + 24, 2.0, 'January 6', False, False), + # PhD Programs + ('Computer Science', 'PhD', 'engineering', 'eecs', + 'The CS PhD program produces leading researchers who advance the frontiers of computing in algorithms, AI, systems, and theory.', + 'Qualifying Examination, Dissertation Proposal, original dissertation research, teaching requirement.', + 0, 5.0, 'December 1', False, True), + ('Physics', 'PhD', 'letters-and-science', 'physics', + 'The Physics PhD trains world-class researchers in theoretical and experimental physics across all major subdisciplines.', + 'Preliminary Exam, Qualifying Exam, research rotations, dissertation, teaching assistant requirement.', + 0, 5.5, 'December 15', False, True), + ('Mathematics', 'PhD', 'letters-and-science', 'mathematics', + 'The Mathematics PhD prepares mathematicians for research careers at universities and research institutions worldwide.', + 'Preliminary Exam, Oral Qualifying Exam, dissertation on original mathematical research.', + 0, 5.0, 'December 15', False, False), + ('Economics', 'PhD', 'letters-and-science', 'economics', + 'The Economics PhD program trains economists who advance knowledge in micro- and macroeconomics, econometrics, and applied fields.', + 'First and second year courses, Qualifying Fields, dissertation, job market paper.', + 0, 5.0, 'December 1', False, False), + ('Sociology', 'PhD', 'letters-and-science', 'sociology', + 'The Sociology PhD produces rigorous social scientists who study stratification, organizations, culture, and global inequality.', + 'Coursework, Qualifying Examination, dissertation research, departmental seminar participation.', + 0, 5.5, 'December 15', False, False), + ('Chemistry', 'PhD', 'chemistry', 'chemistry-dept', + 'The Chemistry PhD trains researchers in organic, inorganic, physical, and theoretical chemistry in world-class laboratories.', + 'Preliminary Exam, candidacy requirements, dissertation research, group meetings.', + 0, 5.0, 'December 1', False, True), + ('Chemical Engineering', 'PhD', 'chemistry', 'chemical-biomolecular-engineering', + 'The ChE PhD develops engineers who advance process design, catalysis, biomolecular engineering, and energy systems.', + 'Preliminary Exam, Qualifying Exam, research rotations, dissertation.', + 0, 5.0, 'December 1', False, True), + ('Bioengineering', 'PhD', 'engineering', 'bioengineering', + 'The Bioengineering PhD develops leaders who advance medicine and biology through engineering innovation.', + 'Qualifying Exam, candidacy, dissertation research, lab rotations.', + 0, 5.0, 'December 1', False, True), + ('Environmental Science, Policy and Management', 'PhD', 'natural-resources', 'espm', + 'The ESPM PhD trains environmental scholars to conduct original research on ecology, conservation, and environmental policy.', + 'Qualifying Exam, dissertation proposal, dissertation research, teaching requirement.', + 0, 5.5, 'January 6', False, False), + ('Public Health', 'PhD', 'public-health', 'epidemiology-biostatistics', + 'The PhD in Epidemiology trains researchers to investigate disease patterns, risk factors, and population health interventions.', + 'Preliminary Exam, Qualifying Exam, dissertation proposal, dissertation research.', + 0, 5.0, 'December 1', False, True), + # Professional Programs + ('Business Administration', 'MBA', 'haas-business', 'finance', + 'The Haas MBA is a two-year, full-time program that develops ethical, innovative leaders who redefine how we do business.', + 'Core curriculum in accounting, finance, marketing, strategy, operations; electives; experiential learning; leadership development.', + 0, 2.0, 'January 5', False, False), + ('Juris Doctor', 'JD', 'law', 'jurisprudence-social-policy', + 'The Berkeley Law JD is a three-year professional degree program preparing lawyers for careers in public interest, private practice, and academia.', + 'First year core curriculum; upper division electives; clinical programs; journals; moot court; public interest commitment.', + 0, 3.0, 'February 1', False, False), + ('Master of Engineering', 'MEng', 'engineering', 'eecs', + 'The MEng is a one-year professional program combining advanced technical depth with leadership and problem-solving skills for industry.', + 'Technical coursework, IEOR leadership curriculum, capstone project solving real engineering challenges.', + 24, 1.0, 'March 15', False, False), + ('Optometry', 'MD', 'optometry', None, + 'The OD degree is a four-year professional doctoral program providing comprehensive clinical training in optometric care and vision science.', + 'Vision Science courses, clinical rotations, primary care and specialty clinics, research requirement.', + 0, 4.0, 'February 1', False, False), + ] + + for (name, degree_type, college_slug, dept_slug, desc, reqs, + units, duration, deadline, is_online, gre_req) in programs_data: + college = colleges.get(college_slug) + dept = departments.get(dept_slug) if dept_slug else None + slug_base = slugify(f"{name}-{degree_type}") + slug = slug_base + counter = 1 + while Program.query.filter_by(slug=slug).first(): + slug = f"{slug_base}-{counter}" + counter += 1 + p = Program( + name=name, slug=slug, degree_type=degree_type, + college_id=college.id if college else None, + department_id=dept.id if dept else None, + description=desc, requirements=reqs, + units=units, duration_years=duration, + application_deadline=deadline, + is_online=is_online, gre_required=gre_req + ) + db.session.add(p) + + db.session.flush() + + # ── Research Centers ────────────────────────────────────────────────────── + research_centers_data = [ + ('Berkeley Artificial Intelligence Research Lab', 'bair', 'engineering', + 'BAIR brings together UC Berkeley researchers across machine learning, deep learning, robotics, computer vision, and natural language processing.', + 'Prof. Pieter Abbeel', 'Machine Learning, Deep Learning, Computer Vision, NLP, Robotics', 2013), + ('Berkeley Institute for Data Science', 'bids', 'letters-and-science', + 'BIDS catalyzes data science research and education across all disciplines at Berkeley through collaborative data science projects.', + 'Prof. David Culler', 'Data Science, Statistics, Computational Methods, Open Science', 2013), + ('Simons Institute for the Theory of Computing', 'simons-institute', 'engineering', + 'The Simons Institute advances theoretical computer science through semester-long programs bringing together researchers from around the world.', + 'Prof. Shafi Goldwasser', 'Algorithms, Complexity Theory, Cryptography, Quantum Computing', 2012), + ('Energy Biosciences Institute', 'energy-biosciences', 'chemistry', + 'EBI conducts research on biofuels, bioenergy, and the biological conversion of plant biomass to transportation fuels.', + 'Prof. Harvey Blanch', 'Biofuels, Plant Biology, Enzyme Engineering, Energy', 2007), + ('Center for Information Technology Research in the Interest of Society', 'citris', 'engineering', + 'CITRIS develops information technology solutions for society\'s most pressing challenges in health, energy, and environment.', + 'Prof. Costas Spanos', 'IoT, Health Technology, Energy Systems, Smart Cities', 2001), + ('Berkeley Center for Green Chemistry', 'bcgc', 'chemistry', + 'BCGC advances the science and practice of green chemistry by developing safer, more sustainable chemicals and processes.', + 'Prof. John Hartwig', 'Green Chemistry, Sustainable Processes, Chemical Safety', 2008), + ('Center for the Built Environment', 'cbe', 'environmental-design', + 'CBE conducts research on building energy efficiency, indoor environmental quality, and sustainable design strategies.', + 'Prof. Edward Arens', 'Building Performance, Thermal Comfort, Energy Efficiency', 1997), + ('Berkeley Seismological Laboratory', 'seismo-lab', 'letters-and-science', + 'The Seismological Lab monitors and studies earthquakes in Northern California and conducts fundamental research on seismic hazard.', + 'Prof. Douglas Dreger', 'Earthquake Science, Seismic Hazard, Tectonic Geology', 1887), + ('Mathematical Sciences Research Institute', 'msri', 'letters-and-science', + 'MSRI (now SLMath) is the world\'s leading mathematical research center, hosting programs in all areas of pure and applied mathematics.', + 'Prof. Tatiana Toro', 'Pure Mathematics, Applied Mathematics, Statistics', 1982), + ('Institute of Urban and Regional Development', 'iurd', 'environmental-design', + 'IURD conducts policy-oriented research on cities, regions, and communities to promote equitable and sustainable development.', + 'Prof. Karen Chapple', 'Urban Policy, Housing, Regional Development, Transportation', 1962), + ('Berkeley Population Center', 'bpc', 'letters-and-science', + 'BPC supports interdisciplinary research in demography and population health across the social and biological sciences.', + 'Prof. Ron Lee', 'Demography, Population Health, Aging, Fertility', 2012), + ('Center for Labor Research and Education', 'labor-center', 'letters-and-science', + 'The Labor Center bridges academic research and the working world, providing education programs for workers and policy analysis on labor issues.', + 'Prof. Ken Jacobs', 'Labor Policy, Worker Rights, Inequality, Minimum Wage', 1964), + ('Kavli Energy NanoSciences Institute', 'kavli-ensi', 'chemistry', + 'Kavli ENSI investigates fundamental energy conversion processes at the nanoscale to enable next-generation solar cells, batteries, and catalysts.', + 'Prof. Paul Alivisatos', 'Nanoscience, Energy Conversion, Photovoltaics, Materials', 2012), + ('Center for Effective Global Action', 'cega', 'letters-and-science', + 'CEGA generates evidence on what interventions work to improve lives in the developing world, informing policy and program design.', + 'Prof. Edward Miguel', 'Development Economics, Health, Education, RCTs', 2008), + ('QB3 Institute', 'qb3', 'chemistry', + 'QB3 accelerates the translation of biological discoveries into products and companies that benefit human health and the environment.', + 'Prof. Jamie Cate', 'Biotechnology, Drug Discovery, Biomanufacturing, Genomics', 2000), + ('Jacobs Institute for Design Innovation', 'jacobs-institute', 'engineering', + 'The Jacobs Institute is the hub for design education at Berkeley, providing access to digital fabrication, prototyping, and design expertise.', + 'Prof. Björn Hartmann', 'Design, Prototyping, Human-Computer Interaction, Fabrication', 2012), + ('Berkeley Center for New Media', 'bcnm', 'letters-and-science', + 'BCNM explores the theoretical, empirical, and creative dimensions of digital media and their impact on society and culture.', + 'Prof. Kimiko Ryokai', 'Digital Media, Art and Technology, Cultural Studies', 2004), + ('Center for Healthcare Policy and Research', 'chpr', 'public-health', + 'CHPR conducts research on health system performance, access to care, quality improvement, and health policy effectiveness.', + 'Prof. James Bellows', 'Health Policy, Quality of Care, Health Insurance, Access', 2005), + ('Disaster Resilience Network', 'drn', 'engineering', + 'The Disaster Resilience Network conducts interdisciplinary research on earthquake engineering, infrastructure resilience, and community recovery.', + 'Prof. Kenichi Soga', 'Earthquake Engineering, Infrastructure, Resilience, Emergency Management', 2015), + ('Berkeley Global Campus Initiative', 'bgc', 'letters-and-science', + 'BGC advances Berkeley\'s global research partnerships and international collaborative programs across disciplines.', + 'Prof. Claude Steele', 'International Collaboration, Global Research, Education Policy', 2010), + ('Institute of International Studies', 'iis', 'letters-and-science', + 'IIS promotes Berkeley\'s role as a global leader in international and area studies research, education, and public engagement.', + 'Prof. Steven Weber', 'International Relations, Area Studies, Global Policy, Security', 1955), + ('California Policy Lab', 'cpl', 'letters-and-science', + 'The California Policy Lab partners with state and local governments to use data and rigorous research to improve policy outcomes for Californians.', + 'Prof. Jesse Rothstein', 'California Policy, Poverty, Housing, Criminal Justice', 2017), + ('Center for Responsible, Decentralized Intelligence', 'rdai', 'engineering', + 'RDI advances the responsible development of decentralized technologies including blockchain, cryptocurrencies, and distributed AI.', + 'Prof. Dawn Song', 'Blockchain, Cryptography, Decentralized Finance, AI Safety', 2018), + ('Swartz Center for Computational Neuroscience', 'sccn', 'letters-and-science', + 'SCCN develops advanced computational methods and tools for neuroscience research, including brain-computer interfaces.', + 'Prof. Robert Knight', 'Computational Neuroscience, EEG, Brain-Computer Interface, Cognition', 2005), + ('Center for the Science of Psychedelics', 'bcsp', 'public-health', + 'BCSP studies the mechanisms and therapeutic potential of psychedelic compounds for mental health treatment.', + 'Prof. Michael Pollan', 'Psychedelic Research, Mental Health, Neuroscience, Psychiatry', 2020), + ] + + for (name, slug, college_slug, desc, director, focus, founded) in research_centers_data: + college = colleges.get(college_slug) + rc = ResearchCenter( + name=name, slug=slug, + college_id=college.id if college else None, + description=desc, director=director, + focus_areas=focus, founded_year=founded + ) + db.session.add(rc) + + db.session.flush() + + # ── Faculty ─────────────────────────────────────────────────────────────── + faculty_data = [ + # EECS + ('Jennifer Doudna', 'jennifer-doudna', 'Professor, Nobel Laureate', 'chemistry-dept', + 'jdoudna@berkeley.edu', '674 Li Ka Shing', '(510) 643-0113', + 'CRISPR-Cas9 gene editing, RNA biology, structural biochemistry', + 'Jennifer Doudna is a Nobel Prize-winning biochemist and co-developer of CRISPR-Cas9 genome editing. Her research focuses on RNA biology and structural biology of RNA-protein complexes.', False), + ('Pieter Abbeel', 'pieter-abbeel', 'Professor', 'eecs', + 'pabbeel@cs.berkeley.edu', '425 Soda Hall', '(510) 642-9861', + 'Deep reinforcement learning, robot learning, AI for robotics', + 'Pieter Abbeel is a leading researcher in machine learning and robotics, known for developing algorithms that enable robots to learn from demonstrations.', False), + ('Dan Klein', 'dan-klein', 'Professor', 'eecs', + 'klein@cs.berkeley.edu', '724 Soda Hall', '(510) 642-7732', + 'Natural language processing, machine learning, computational linguistics', + 'Dan Klein\'s research focuses on natural language processing and machine learning, with particular interest in parsing, machine translation, and information extraction.', False), + ('Michael Jordan', 'michael-jordan', 'Professor', 'eecs', + 'jordan@cs.berkeley.edu', '723 Soda Hall', '(510) 642-5022', + 'Machine learning, Bayesian statistics, computational biology, optimization', + 'Michael I. Jordan is a pioneer in machine learning and one of the most cited researchers in computer science. He has made foundational contributions to neural networks, Bayesian inference, and probabilistic graphical models.', False), + ('Stuart Russell', 'stuart-russell', 'Professor', 'eecs', + 'russell@cs.berkeley.edu', '387 Soda Hall', '(510) 642-4964', + 'Artificial intelligence, machine learning, AI safety, probabilistic reasoning', + 'Stuart Russell is a world-renowned AI researcher and co-author of the leading AI textbook. His recent work focuses on AI safety and the development of beneficial AI systems.', False), + ('Shafi Goldwasser', 'shafi-goldwasser', 'Professor, Turing Award Laureate', 'eecs', + 'shafi@cs.berkeley.edu', '627 Soda Hall', '(510) 642-0239', + 'Cryptography, complexity theory, computational number theory', + 'Shafi Goldwasser is a Turing Award-winning cryptographer and theoretician. Her work on interactive proofs, zero-knowledge proofs, and probabilistic encryption has transformed cryptography.', False), + ('Dawn Song', 'dawn-song', 'Professor', 'eecs', + 'dawnsong@cs.berkeley.edu', '639 Soda Hall', '(510) 643-3344', + 'AI security, blockchain, deep learning, privacy, formal verification', + 'Dawn Song is a leading researcher in AI security, blockchain, and machine learning. She founded the Oasis Protocol for secure data sharing and blockchain applications.', False), + ('Ion Stoica', 'ion-stoica', 'Professor', 'eecs', + 'istoica@cs.berkeley.edu', '465 Soda Hall', '(510) 642-0252', + 'Distributed systems, cloud computing, data analytics, networking', + 'Ion Stoica is a distributed systems expert who co-founded Databricks and Anyscale. His research has produced foundational systems including Spark and Ray.', False), + # Mathematics + ('Tatiana Toro', 'tatiana-toro', 'Professor', 'mathematics', + 'toro@math.berkeley.edu', '873 Evans Hall', '(510) 642-5382', + 'Geometric measure theory, elliptic PDE, free boundary problems', + 'Tatiana Toro works in geometric analysis and partial differential equations. She is the Director of the Mathematical Sciences Research Institute (SLMath).', False), + ('Michael Christ', 'michael-christ', 'Professor', 'mathematics', + 'mchrist@math.berkeley.edu', '805 Evans Hall', '(510) 642-2891', + 'Harmonic analysis, partial differential equations, complex analysis', + 'Michael Christ works on harmonic analysis and partial differential equations, making fundamental contributions to multilinear analysis and Fourier restriction theory.', False), + # Physics + ('Saul Perlmutter', 'saul-perlmutter', 'Professor, Nobel Laureate', 'physics', + 'saul@lbl.gov', '50-232 LBL', '(510) 486-5203', + 'Cosmology, dark energy, Type Ia supernovae, observational astronomy', + 'Saul Perlmutter shared the 2011 Nobel Prize in Physics for discovering the accelerating expansion of the universe through observations of distant supernovae.', False), + ('Reinhard Genzel', 'reinhard-genzel', 'Professor, Nobel Laureate', 'physics', + 'genzel@mpe.mpg.de', '501 Campbell Hall', '(510) 642-0234', + 'Galactic center, black holes, infrared astronomy, extragalactic astronomy', + 'Reinhard Genzel shared the 2020 Nobel Prize in Physics for discovering a supermassive black hole at the center of the Milky Way galaxy.', False), + ('Hartmut Haeffner', 'hartmut-haeffner', 'Professor', 'physics', + 'hhaeffner@berkeley.edu', '301 Birge Hall', '(510) 642-0386', + 'Quantum computing, quantum information, trapped ions, atomic physics', + 'Hartmut Haeffner leads experiments on trapped-ion quantum computers, working to build practical quantum computing devices.', False), + # Chemistry + ('F. Dean Toste', 'f-dean-toste', 'Professor', 'chemistry-dept', + 'fdtoste@berkeley.edu', '748 Latimer Hall', '(510) 642-6288', + 'Organometallic chemistry, catalysis, gold catalysis, asymmetric synthesis', + 'Dean Toste is a pioneer in homogeneous catalysis, particularly gold-catalyzed reactions. His group develops new transformations for complex molecule synthesis.', False), + ('John Hartwig', 'john-hartwig', 'Professor', 'chemistry-dept', + 'jhartwig@berkeley.edu', '636 Latimer Hall', '(510) 642-4864', + 'Organometallic chemistry, C-H functionalization, asymmetric catalysis, synthetic methodology', + 'John Hartwig is a leader in organometallic chemistry and develops new catalytic reactions for pharmaceutical and materials synthesis.', False), + # Economics + ('Ulrike Malmendier', 'ulrike-malmendier', 'Professor', 'economics', + 'malmendier@haas.berkeley.edu', '517 Evans Hall', '(510) 643-7552', + 'Behavioral economics, corporate finance, law and economics, economic history', + 'Ulrike Malmendier studies behavioral biases in corporate decision-making, consumer finance, and the long-term effects of historical shocks on economic outcomes.', False), + ('Emmanuel Saez', 'emmanuel-saez', 'Professor', 'economics', + 'saez@econ.berkeley.edu', '549 Evans Hall', '(510) 642-4631', + 'Public economics, inequality, taxation, labor economics', + 'Emmanuel Saez is a leading economist studying income inequality. His work documenting the rise of top income shares has shaped the policy debate on inequality and taxation.', False), + # Political Science + ('Robert Van Houweling', 'robert-van-houweling', 'Professor', 'political-science', + 'rvh@berkeley.edu', '210 Barrows Hall', '(510) 642-4219', + 'American politics, Congress, electoral systems, political institutions', + 'Robert Van Houweling studies American political institutions, particularly Congress, and how institutional design affects representation and policy.', False), + # Bioengineering + ('Sanjay Kumar', 'sanjay-kumar', 'Professor', 'bioengineering', + 'skumar@berkeley.edu', '274B Stanley Hall', '(510) 643-3559', + 'Mechanobiology, biomaterials, cancer biophysics, neural engineering', + 'Sanjay Kumar investigates how mechanical forces affect cell behavior, particularly in brain tumors and neural development.', False), + # Environmental Science + ('Katharine Mach', 'katharine-mach', 'Professor', 'espm', + 'kmach@berkeley.edu', '130 Mulford Hall', '(510) 642-3330', + 'Climate change risk, adaptation policy, food security, IPCC', + 'Katharine Mach studies climate change impacts and adaptation, and has been a lead author of IPCC assessment reports on climate risk.', False), + # Public Health + ('John Balmes', 'john-balmes', 'Professor', 'environmental-health', + 'jbalmes@berkeley.edu', '50 University Hall', '(510) 642-6318', + 'Air pollution, respiratory health, environmental health policy, occupational health', + 'John Balmes is a physician-scientist and environmental health policy expert studying the effects of air pollutants on respiratory and cardiovascular health.', False), + # Architecture + ('Tom Buresh', 'tom-buresh', 'Professor', 'architecture', + 'tburesh@berkeley.edu', '270 Wurster Hall', '(510) 642-9042', + 'Architectural design, housing, urbanism, social and environmental sustainability', + 'Tom Buresh focuses on the intersection of architecture, housing, and urban design, with a commitment to equitable and sustainable built environments.', False), + # Civil Engineering + ('Kenichi Soga', 'kenichi-soga', 'Professor', 'civil-environmental-engineering', + 'soga@berkeley.edu', '440 Davis Hall', '(510) 643-1419', + 'Geotechnical engineering, infrastructure sensing, smart cities, sustainability', + 'Kenichi Soga develops smart infrastructure monitoring systems and has pioneered the use of fiber optic sensing for civil engineering applications.', False), + # Materials Science + ('Daryl Chrzan', 'daryl-chrzan', 'Professor', 'materials-science', + 'dcchrzan@berkeley.edu', '210 Hearst Mining Building', '(510) 643-6543', + 'Computational materials science, nanomaterials, defect physics, semiconductor alloys', + 'Daryl Chrzan uses computational methods to study defects in materials, with applications in semiconductor alloys and nanostructures.', False), + # Sociology + ('Cybelle Fox', 'cybelle-fox', 'Professor', 'sociology', + 'cybellefox@berkeley.edu', '410 Barrows Hall', '(510) 642-0985', + 'Immigration, race and ethnicity, historical sociology, social policy', + 'Cybelle Fox studies the historical origins of racial and ethnic inequalities in social policy, particularly immigration law and welfare state development.', False), + # Psychology + ('Stephen Hinshaw', 'stephen-hinshaw', 'Professor', 'psychology', + 'hinshaw@berkeley.edu', '3220 Tolman Hall', '(510) 642-7153', + 'ADHD, child and adolescent development, mental illness stigma, gender', + 'Stephen Hinshaw is a clinical psychologist and neuroscientist who studies attention-deficit/hyperactivity disorder, mental illness stigma, and developmental psychopathology.', False), + # IEOR + ('Zeynep Erkin Baz', 'zeynep-erkin-baz', 'Professor', 'ieor', + 'zeb@ieor.berkeley.edu', '4145 Etcheverry Hall', '(510) 642-7032', + 'Healthcare operations, humanitarian operations, supply chain management, optimization', + 'Zeynep Erkin Baz applies operations research to healthcare and humanitarian logistics, designing systems to improve access and efficiency.', False), + # Nuclear Engineering + ('Massimiliano Fratoni', 'massimiliano-fratoni', 'Professor', 'nuclear-engineering', + 'fratoni@berkeley.edu', '4153 Etcheverry Hall', '(510) 642-8085', + 'Nuclear reactor physics, fuel cycle analysis, advanced reactor design, thorium', + 'Massimiliano Fratoni conducts research on advanced nuclear reactor designs and nuclear fuel cycle analysis for next-generation energy systems.', False), + # Law + ('Erwin Chemerinsky', 'erwin-chemerinsky', 'Dean and Professor', 'jurisprudence-social-policy', + 'chemerinsky@law.berkeley.edu', '215 Simon Hall', '(510) 642-0865', + 'Constitutional law, criminal procedure, first amendment, civil rights', + 'Erwin Chemerinsky is one of the nation\'s leading constitutional law scholars. As Dean of Berkeley Law, he continues to write and speak widely on civil liberties and social justice.', False), + # Haas Business + ('Terrance Odean', 'terrance-odean', 'Professor', 'finance', + 'odean@haas.berkeley.edu', 'F402 Haas', '(510) 642-6767', + 'Behavioral finance, investor behavior, trading, household finance', + 'Terrance Odean is a behavioral finance pioneer who studies investor psychology, trading behavior, and the financial consequences of cognitive biases.', False), + # Emeriti + ('George Akerlof', 'george-akerlof', 'Professor Emeritus, Nobel Laureate', 'economics', + '', '535 Evans Hall', '', + 'Information asymmetry, labor markets, macroeconomics, behavioral economics', + 'George Akerlof won the 2001 Nobel Prize in Economics for his analysis of markets with asymmetric information, most notably the "market for lemons" paper.', True), + ('Owen Chamberlain', 'owen-chamberlain', 'Professor Emeritus, Nobel Laureate', 'physics', + '', '301 Birge Hall', '', + 'Particle physics, antiproton discovery, nuclear physics', + 'Owen Chamberlain shared the 1959 Nobel Prize in Physics for discovering the antiproton, working at the Berkeley Bevatron accelerator.', True), + ] + + for (name, slug, title, dept_slug, email, office, phone, + research_interests, bio, is_emeritus) in faculty_data: + dept = departments.get(dept_slug) + f = Faculty( + name=name, slug=slug, title=title, + department_id=dept.id if dept else None, + email=email, office=office, phone=phone, + research_interests=research_interests, bio=bio, + is_emeritus=is_emeritus + ) + db.session.add(f) + + db.session.flush() + + # ── News Articles ───────────────────────────────────────────────────────── + base_date = datetime(2025, 4, 1) + + articles_data = [ + # Research + ('Berkeley Researchers Develop AI System That Detects Cancer Early', 'research', + 'Prof. Sarah Chen', -10, True, + 'A team of UC Berkeley bioengineers and computer scientists has developed an artificial intelligence system capable of detecting early-stage pancreatic cancer from standard blood tests with 90% accuracy.', + 'UC Berkeley researchers have developed a breakthrough AI diagnostic tool that analyzes biomarkers in routine blood tests to detect pancreatic cancer years before symptoms appear. The study, published in Nature Medicine, demonstrates how machine learning can transform cancer screening.', + 'AI,cancer,bioengineering,machine learning,health'), + ('New Quantum Computing Lab Opens at Berkeley', 'research', + 'Berkeley News Staff', -15, True, + 'The Bakar Quantum Lab, the largest university-based quantum computing facility on the West Coast, opened this week with six quantum processors available to researchers across disciplines.', + 'UC Berkeley inaugurated the Bakar Quantum Lab, a state-of-the-art facility housing six quantum processors ranging from 20 to 127 qubits. The lab will accelerate research in quantum algorithms, materials simulation, and quantum-safe cryptography.', + 'quantum computing,physics,engineering,technology'), + ('Berkeley Team Wins $10M Grant for Climate Research', 'research', + 'Sarah Martinez', -20, True, + 'An interdisciplinary Berkeley team has received a $10 million National Science Foundation grant to study the feedback loops between Arctic ice loss, ocean circulation, and global weather patterns.', + 'The five-year grant will fund an international team led by Berkeley climate scientists who will deploy autonomous underwater vehicles, satellite sensors, and advanced climate models to map how Arctic changes ripple through the global climate system.', + 'climate change,research,NSF,Arctic,environment'), + ('CRISPR Pioneer Jennifer Doudna Receives National Medal of Science', 'research', + 'Berkeley News Staff', -25, True, + 'Nobel Laureate and Berkeley Professor Jennifer Doudna was awarded the National Medal of Science at a White House ceremony, recognizing her transformative contributions to gene editing.', + 'Professor Jennifer Doudna, who co-developed the CRISPR-Cas9 genome editing technology, received the National Medal of Science from the President. Doudna\'s work has revolutionized biology and opened new possibilities for treating genetic diseases.', + 'CRISPR,genomics,Nobel,award,biochemistry'), + ('Berkeley Scientists Find Microplastics in Human Brain Tissue', 'research', + 'Dr. James Wu', -30, False, + 'Berkeley researchers have detected microplastic particles in human brain tissue samples, raising urgent questions about the health effects of ubiquitous plastic pollution.', + 'A peer-reviewed study from UC Berkeley\'s School of Public Health has found microplastic particles in postmortem human brain tissue at concentrations higher than previously documented in other organs. Researchers are now investigating potential neurological effects.', + 'microplastics,environment,public health,neuroscience'), + ('New Study Links Social Media Use to Teen Mental Health Outcomes', 'research', + 'Prof. Amy Rodriguez', -35, False, + 'A Berkeley longitudinal study tracking 5,000 adolescents found significant associations between heavy social media use and anxiety and depression, with effects varying by platform type.', + 'The three-year study, one of the largest of its kind, tracked social media use, mood, sleep, and mental health in teenagers across California. Results suggest that passive scrolling is more harmful than active social interaction online.', + 'mental health,social media,psychology,adolescents,research'), + ('Berkeley Lab Achieves Record Solar Cell Efficiency', 'research', + 'Dr. Priya Nair', -40, False, + 'Berkeley researchers at the Energy Biosciences Institute have achieved a world-record 35.2% efficiency in a tandem perovskite solar cell, surpassing previous records by more than 2 percentage points.', + 'The breakthrough combines two photovoltaic materials in a tandem structure, capturing a broader spectrum of sunlight. The achievement was independently certified by the National Renewable Energy Laboratory and could dramatically reduce the cost of solar electricity.', + 'solar energy,clean energy,materials science,technology,innovation'), + ('Berkeley Economists Document Growing Wealth Gap in California', 'research', + 'Prof. Emmanuel Saez', -45, False, + 'A new report from Berkeley\'s Center for Equitable Growth shows the top 1% of California households now hold 45% of the state\'s wealth, up from 38% in 2019.', + 'Using tax records and household survey data, Berkeley economists have mapped wealth distribution across California counties. The report calls for targeted policy interventions including wealth taxes, housing investments, and expanded social insurance.', + 'inequality,economics,California,wealth,policy'), + # Campus Life + ('Cal Students Break Guinness World Record for Largest Human Chain', 'campus-life', + 'Daily Cal Staff', -50, False, + 'Over 12,000 UC Berkeley students formed a 3.2-mile human chain around campus in an Earth Day demonstration that shattered the previous record.', + 'In a celebration of Earth Day, UC Berkeley students organized the largest student-led environmental demonstration in university history. The human chain stretched from Sather Gate through Sproul Plaza and around the perimeter of the main campus.', + 'Earth Day,campus,student life,environment,record'), + ('New Student Housing Project Breaks Ground on Telegraph Avenue', 'campus-life', + 'Berkeley News Staff', -55, False, + 'Construction began this week on a 1,200-bed student housing complex on Telegraph Avenue that will prioritize affordability and be completed by Fall 2027.', + 'The $380 million project will create 1,200 units of mixed-income student housing within walking distance of campus. At least 20% of units will be priced at below-market rates for students demonstrating financial need.', + 'housing,students,construction,affordability'), + ('Free Speech Movement Cafe Celebrates 60th Anniversary', 'campus-life', + 'Alumni Affairs', -60, True, + 'Berkeley commemorated the 60th anniversary of the Free Speech Movement with a week of lectures, film screenings, and a memorial gathering at Sproul Plaza.', + 'The 1964 Free Speech Movement, which began at UC Berkeley, transformed American campus culture and student rights. This week\'s celebrations included reflections by participants, lectures by historians, and a new documentary film screening.', + 'history,campus,free speech,anniversary,Sproul'), + ('Student-Led Food Pantry Serves 500 Families Weekly', 'campus-life', + 'Berkeley News Staff', -65, False, + 'The Basic Needs Center\'s student-run food pantry has expanded to serve 500 campus community families each week as food insecurity among college students continues to draw national attention.', + 'The UC Berkeley Basic Needs Center has grown its food assistance program tenfold in five years. The program now includes a student food pantry, CalFresh application assistance, and emergency meal vouchers for students in crisis.', + 'food security,student life,community,equity'), + # Faculty + ('Three Berkeley Professors Elected to National Academy of Sciences', 'faculty', + 'Berkeley News Staff', -70, False, + 'Professors Maria Santos (Chemistry), David Kim (EECS), and Rachel Green (Public Health) were elected to the National Academy of Sciences, among the highest honors in American science.', + 'The National Academy of Sciences elected three Berkeley faculty members for their distinguished achievements in research. This year\'s class of 120 new members includes some of the world\'s most distinguished scientists.', + 'faculty,award,National Academy of Sciences,research,honor'), + ('Berkeley Professor Wins Pulitzer Prize for New Book on Redlining', 'faculty', + 'Berkeley News Staff', -75, True, + 'History Professor Angela Davis has won the Pulitzer Prize in General Nonfiction for her groundbreaking study of redlining\'s legacy in California cities.', + 'Professor Davis\'s book traces how discriminatory housing policies implemented from the 1930s through the 1960s continue to shape racial wealth gaps, school quality, and health outcomes in California communities today.', + 'faculty,award,Pulitzer,history,race,housing'), + ('Berkeley Engineering Dean Named to National AI Advisory Board', 'faculty', + 'Berkeley News Staff', -80, False, + 'Dean Tsu-Jae King Liu has been appointed to the National AI Advisory Committee, advising the federal government on AI policy, workforce development, and safety standards.', + 'The appointment recognizes Dean Liu\'s expertise in semiconductor technology and her leadership of one of the nation\'s premier engineering schools. The committee will provide recommendations to the White House on AI governance frameworks.', + 'faculty,AI,policy,engineering,government'), + # Student + ('Cal Senior Wins Rhodes Scholarship to Study Climate Policy at Oxford', 'student', + 'Undergraduate Affairs', -85, False, + 'Amara Johnson, a senior in Environmental Sciences and Political Science, has been awarded a Rhodes Scholarship, joining a small cohort of American students selected annually for graduate study at Oxford.', + 'Amara Johnson, who grew up in Richmond, California and was the first in her family to attend college, plans to study environmental governance and climate adaptation at Oxford\'s Blavatnik School of Government.', + 'scholarship,Rhodes,student,award,environment'), + ('Berkeley Students Launch Startup That Wins $1M Prize', 'student', + 'Innovation Staff', -90, False, + 'Three Berkeley engineering students have won the first-ever Cal Innovate Grand Prize for their AI-powered prosthetic hand that provides sensory feedback to users.', + 'The team, composed of two bioengineering seniors and a CS junior, developed a prosthetic limb with embedded sensors and machine learning algorithms that allow users to feel pressure and temperature. The prize will fund clinical trials.', + 'startup,innovation,engineering,bioengineering,award'), + # Athletics + ('Cal Bears Football Season Preview: New Coach Aims for Pac-12 Title', 'athletics', + 'Sports Desk', -95, False, + 'First-year head coach Marcus Thompson brings an aggressive offensive scheme to Memorial Stadium as the Cal Bears open fall camp targeting their first Pac-12 championship since 2006.', + 'Coach Thompson, who spent six seasons as offensive coordinator at Oregon, plans to install an uptempo spread offense that emphasizes the passing game and creates mismatches in the secondary. Cal returns 18 starters from last year\'s 7-5 team.', + 'football,Cal Bears,athletics,Pac-12,sports'), + ('Women\'s Gymnastics Wins NCAA Championship', 'athletics', + 'Sports Desk', -100, True, + 'The UC Berkeley women\'s gymnastics team claimed the program\'s 30th NCAA championship title at Fort Worth, defeating Georgia in the final with a score of 198.325.', + 'Led by junior all-around champion Sofia Rodriguez and senior specialist Maya Chen, the Cal gymnastics team dominated the NCAA tournament with three consecutive perfect 10.0 scores on the balance beam in the final.', + 'gymnastics,NCAA,championship,athletics,Cal Bears'), + ('Cal Men\'s Basketball: Golden Bears Make Elite Eight Run', 'athletics', + 'Sports Desk', -105, False, + 'The Cal men\'s basketball team made their deepest NCAA Tournament run in three decades, reaching the Elite Eight before falling to #1 seed Duke in a memorable overtime battle.', + 'Powered by sophomore sensation Marcus Williams, who scored 31 points and grabbed 12 rebounds, the Golden Bears upset three higher seeds before their Cinderella run ended against the Blue Devils. The team finished with a 28-10 record.', + 'basketball,NCAA,tournament,Cal Bears,athletics'), + # Science + ('Berkeley Scientists Discover New Exoplanet in Habitable Zone', 'science', + 'Astronomy Department', -110, False, + 'Berkeley astronomers using the Keck Observatory have confirmed the discovery of an Earth-sized exoplanet orbiting in the habitable zone of a nearby star 42 light years away.', + 'The planet, designated Berkeley-1b, was detected using the transit method combined with radial velocity measurements. Its size, density, and orbital period suggest conditions that could potentially support liquid water on its surface.', + 'astronomy,exoplanet,space,science,discovery'), + ('New Research on Gut Bacteria May Unlock Alzheimer\'s Treatment', 'science', + 'Prof. Helen Park', -115, False, + 'Berkeley neuroscientists have identified specific gut microbiome signatures associated with Alzheimer\'s disease, opening a potential new avenue for early diagnosis and treatment.', + 'The study examined gut bacteria composition in 800 patients across disease stages and found that certain bacterial species correlate strongly with amyloid buildup in the brain. Researchers are now testing whether probiotic interventions can slow disease progression.', + 'Alzheimer\'s,neuroscience,gut microbiome,science,health'), + # Arts + ('Berkeley Art Museum Opens Major Retrospective of Bay Area Abstract Expressionism', 'arts', + 'BAMPFA Staff', -120, False, + 'The Berkeley Art Museum and Pacific Film Archive opens a comprehensive retrospective celebrating 75 years of Bay Area Abstract Expressionism, featuring works by 45 artists.', + 'The exhibition, titled "Color in the Bay: 75 Years of Abstract Expression," showcases paintings, sculptures, and mixed media works by artists who lived and worked in the Bay Area from 1950 to the present, tracing the evolution of a distinctly California voice in abstract art.', + 'art,museum,BAMPFA,exhibition,Bay Area'), + ('Berkeley Symphony Premieres New Orchestral Work Inspired by AI', 'arts', + 'Music Department', -125, False, + 'The Berkeley Symphony premiered "Algorithmic Dreams," a 45-minute orchestral work composed using a generative AI system developed by Berkeley music and computer science faculty.', + 'The composition, created through a collaboration between the Music Department and EECS, uses machine learning trained on 18th-century counterpoint and contemporary American orchestral writing to generate thematic material that was then orchestrated by composers.', + 'music,AI,arts,composition,technology'), + # More Research + ('Berkeley Joins $50 Billion National Semiconductor Research Consortium', 'research', + 'Research Office', -130, False, + 'UC Berkeley has joined a 15-university consortium receiving $50 billion in federal funding to rebuild American semiconductor manufacturing capacity and develop next-generation chip technologies.', + 'The CHIPS for America Act funding will support Berkeley\'s research on 2-nanometer chip fabrication, 3D chip stacking, and quantum dot-based transistors. Berkeley\'s Marvell Nanofabrication Laboratory will receive $500 million in new equipment.', + 'semiconductors,technology,engineering,federal funding,research'), + ('Study Shows Berkeley Graduates Earn Premium Over Peers', 'research', + 'Office of the Chancellor', -135, False, + 'A new longitudinal earnings study shows UC Berkeley graduates earn a median salary 23% higher than graduates of comparable public universities ten years after graduation.', + 'The study tracked earnings for 50,000 graduates from the class of 2010 through 2020 and found that Berkeley\'s wage premium is largest for first-generation college students and students from lower-income families, suggesting the university\'s role in economic mobility.', + 'career,economics,graduates,salary,research'), + # More Campus Life + ('Berkeley Celebrates Installation of Solar Panels on Campanile', 'campus-life', + 'Facilities Staff', -140, False, + 'UC Berkeley completed the installation of 2,000 solar panels on the Campanile Esplanade and surrounding campus buildings, cutting electricity costs by $1.2 million annually.', + 'The latest phase of Berkeley\'s Campus Energy Initiative adds 500 kilowatts of solar generating capacity to the campus microgrid. The university is on track to achieve carbon neutrality by 2026 as part of the UC system\'s climate commitment.', + 'sustainability,solar,environment,campus,energy'), + ('Berkeley Dining Achieves Gold Certification for Sustainability', 'campus-life', + 'Housing and Dining', -145, False, + 'Berkeley Dining has achieved Gold certification from the Real Food Challenge, with 35% of all food purchased now meeting criteria for local, fair trade, ecologically sound, or humane production.', + 'The certification recognizes Berkeley Dining\'s multi-year effort to source more sustainable foods while controlling costs. The program prioritizes relationships with Bay Area farmers, ranchers, and food producers.', + 'sustainability,dining,food,environment,campus'), + ('Cal Day Draws Record 50,000 Visitors to Berkeley Campus', 'campus-life', + 'Admissions Office', -150, False, + 'UC Berkeley\'s annual open house, Cal Day, attracted a record 50,000 prospective students and their families to campus this spring, surpassing the previous record by 8,000.', + 'Visitors participated in department open houses, lab tours, student organization fairs, and info sessions across all 14 colleges. The event featured 400 separate activities and was the first Cal Day since the pandemic-era virtual events.', + 'admissions,Cal Day,campus,visitors,prospective students'), + # More Faculty + ('Berkeley Scientist Named HHMI Investigator', 'faculty', + 'Research Office', -155, False, + 'Assistant Professor Kenji Yamamoto (Bioengineering) has been named a Howard Hughes Medical Institute Investigator, one of the most prestigious honors for early-career biomedical scientists.', + 'The HHMI Investigator program provides long-term, flexible funding for exceptional scientists pursuing unconventional and high-risk research. Yamamoto studies the biomechanical regulation of stem cell differentiation.', + 'faculty,HHMI,award,bioengineering,research'), + ('Berkeley Law Professor Appointed to Federal Circuit Court of Appeals', 'faculty', + 'Law School', -160, False, + 'Berkeley Law Professor Claudia Torres has been confirmed by the Senate and appointed to the U.S. Court of Appeals for the Ninth Circuit, filling a vacancy on the nation\'s largest federal appellate court.', + 'Professor Torres, a scholar of immigration law and administrative law, brings two decades of scholarship and litigation experience to the federal bench. She will continue to supervise two pending law review articles before beginning her judicial duties.', + 'faculty,law,appointment,judge,court'), + ] + + for i, (title, category, author, days_offset, featured, + summary, content, tags) in enumerate(articles_data): + slug_base = slugify(title) + slug = slug_base + counter = 1 + while NewsArticle.query.filter_by(slug=slug).first(): + slug = f"{slug_base}-{counter}" + counter += 1 + pub_date = base_date + timedelta(days=days_offset) + article = NewsArticle( + title=title, slug=slug, category=category.title().replace('-', ' '), + author=author, + published_date=pub_date, + content=content, summary=summary, tags=tags, + view_count=100 + i * 17, + featured=featured + ) + db.session.add(article) + + db.session.flush() + + # ── Events ──────────────────────────────────────────────────────────────── + now = datetime(2026, 5, 12) + + events_data = [ + # Upcoming events + ('Nobel Laureate Lecture: Jennifer Doudna on the Future of Gene Editing', 'Lecture', + now + timedelta(days=3), now + timedelta(days=3, hours=2), + '2050 Valley Life Sciences Building', 'Valley Life Sciences', + 'Division of Biological Sciences', False, 'Free', + 'Professor Jennifer Doudna will discuss recent advances in CRISPR technology, including its applications in treating genetic diseases, improving crop yields, and the ethical frameworks guiding responsible use.'), + ('Spring Career Fair 2026', 'Career', + now + timedelta(days=5), now + timedelta(days=5, hours=5), + 'Recreational Sports Facility', 'RSF', + 'Career Center', True, 'Free', + 'Over 200 employers will be recruiting Berkeley students and alumni across all majors. Bring multiple copies of your resume and dress professionally. Pre-registration recommended but walk-ins welcome.'), + ('Berkeley Film Festival Opening Night', 'Arts', + now + timedelta(days=7), now + timedelta(days=7, hours=3), + '2575 Bancroft Way, Pacific Film Archive', 'BAMPFA', + 'Graduate School of Journalism', False, '$15', + 'The 22nd Annual Berkeley Film Festival opens with the world premiere of "Water Rising," a documentary about climate displacement in Pacific Island nations filmed over three years by Berkeley MFA students.'), + ('AI Ethics Symposium 2026', 'Lecture', + now + timedelta(days=10), now + timedelta(days=10, hours=6), + 'Banatao Auditorium, Sutardja Dai Hall', 'Sutardja Dai Hall', + 'BAIR and Center for Technology, Policy and Society', True, 'Free', + 'A full-day symposium bringing together researchers, policymakers, ethicists, and civil society representatives to examine the governance challenges posed by advanced AI systems.'), + ('Cal vs. Stanford Big Game Pre-Celebration', 'Sports', + now + timedelta(days=12), now + timedelta(days=12, hours=4), + 'Sproul Plaza', 'Sproul Hall', + 'Associated Students of UC Berkeley', False, 'Free', + 'Join thousands of Cal fans for the traditional Big Game Rally featuring the Cal Band, cheers, bonfire, and an appearance by Oski the Bear. Spirit prizes awarded to best-dressed fans.'), + ('Graduate School Information Fair', 'Career', + now + timedelta(days=14), now + timedelta(days=14, hours=4), + 'Pauley Ballroom, MLK Student Union', 'MLK Student Union', + 'Graduate Division', False, 'Free', + 'Representatives from Berkeley\'s 14 graduate schools will be available to discuss admission requirements, financial aid, research opportunities, and career outcomes. All undergraduates welcome.'), + ('Spring Dance Showcase: Movement and Memory', 'Arts', + now + timedelta(days=16), now + timedelta(days=16, hours=2), + 'Zellerbach Hall', 'Zellerbach Hall', + 'Department of Theater, Dance and Performance Studies', False, '$20', + 'The annual Spring Dance Showcase presents original work by MFA candidates in dance, featuring contemporary, modern, and collaborative interdisciplinary performances.'), + ('Hackathon: Code for Climate 2026', 'Career', + now + timedelta(days=18), now + timedelta(days=20, hours=12), + 'Soda Hall', 'Soda Hall', + 'EECS Department and Cal Hacks', False, 'Free', + 'A 48-hour hackathon challenging teams to build software solutions for climate adaptation, carbon accounting, clean energy optimization, and environmental monitoring. $50,000 in prizes.'), + ('Wellness Week Kickoff: Mindfulness and Stress Management', 'Health', + now + timedelta(days=21), now + timedelta(days=21, hours=1, minutes=30), + 'North Bowl, Memorial Glade', 'Memorial Glade', + 'University Health Services', False, 'Free', + 'Begin Wellness Week with an outdoor mindfulness session led by the Tang Center\'s wellness counselors. Learn evidence-based techniques for managing academic stress and maintaining mental health.'), + ('Berkeley Startup Pitch Competition Finals', 'Career', + now + timedelta(days=23), now + timedelta(days=23, hours=3), + '310 Sutardja Dai Hall', 'Sutardja Dai Hall', + 'Haas School of Business and Skydeck', True, 'Free', + 'Watch Berkeley\'s top student-founded startups compete for $250,000 in seed funding. Finalists from EECS, Haas, Bioengineering, and Public Health will pitch to a panel of Silicon Valley investors.'), + ('Commencement 2026: College of Engineering', 'Social', + now + timedelta(days=30), now + timedelta(days=30, hours=3), + 'Haas Pavilion', 'Haas Pavilion', + 'College of Engineering', False, 'Free', + 'Congratulations to the graduating class of 2026! Commencement ceremonies for the College of Engineering will feature student speakers, faculty marshals, and the conferral of degrees.'), + ('Public Lecture: Rethinking Urban Housing in the Bay Area', 'Lecture', + now + timedelta(days=25), now + timedelta(days=25, hours=1, minutes=30), + '112 Wurster Hall', 'Wurster Hall', + 'Department of City and Regional Planning', False, 'Free', + 'A lecture and panel discussion on innovative housing strategies for the Bay Area housing crisis, featuring city planners, developers, tenant advocates, and Berkeley researchers.'), + ('Virtual Admissions Webinar: Applying to Berkeley Graduate Programs', 'Virtual', + now + timedelta(days=8), now + timedelta(days=8, hours=1), + 'Online (Zoom)', 'Virtual', + 'Graduate Division', True, 'Free', + 'Graduate admissions staff will walk prospective applicants through the application process, financial aid options, and connect them with current graduate students. Registration required for Zoom link.'), + ('International Food Festival: A Taste of the World', 'Social', + now + timedelta(days=27), now + timedelta(days=27, hours=4), + 'Sproul Plaza', 'Sproul Plaza', + 'International House and Cross-Cultural Center', False, 'Free', + 'The annual International Food Festival celebrates Berkeley\'s global community with food booths representing 60 countries, cultural performances, traditional dress, and interactive activities.'), + ('Research Mixer: Interdisciplinary AI Projects', 'Social', + now + timedelta(days=15), now + timedelta(days=15, hours=2), + '405 Soda Hall', 'Soda Hall', + 'BAIR and Berkeley Research Office', False, 'Free', + 'Graduate students and postdocs from EECS, Statistics, Cognitive Science, and other departments meet to discuss interdisciplinary AI research and explore collaboration opportunities.'), + # Past events + ('Spring 2026 Orientation: Welcome New Golden Bears', 'Social', + now - timedelta(days=30), now - timedelta(days=30, hours=5), + 'Sproul Plaza', 'Sproul Plaza', + 'Office of Undergraduate Education', False, 'Free', + 'Welcome to Berkeley! New students receive their blue and gold lanyards, meet fellow Bears, and explore the 100+ clubs and organizations at the Student Organizations Fair.'), + ('Nobel Laureate Panel: Science and Society', 'Lecture', + now - timedelta(days=45), now - timedelta(days=45, hours=2), + 'Zellerbach Hall', 'Zellerbach Hall', + 'Division of Research', False, 'Free', + 'Four Berkeley Nobel Laureates discussed how their research has impacted society, the role of public funding in science, and the future of academic research.'), + ('Climate Action Week: Zero Waste Campus Challenge', 'Health', + now - timedelta(days=55), now - timedelta(days=50, hours=8), + 'Various Campus Locations', 'Main Campus', + 'Student Environmental Resource Center', False, 'Free', + 'A week of campus-wide events challenging students, faculty, and staff to reduce their carbon footprint, including waste audits, composting workshops, and zero-emission commute pledges.'), + ('Annual Math Tournament: Bay Area High Schools', 'Lecture', + now - timedelta(days=60), now - timedelta(days=60, hours=5), + '160 Dwinelle Hall', 'Dwinelle Hall', + 'Mathematics Department', False, 'Free', + 'UC Berkeley hosts the annual Bay Area Math Tournament, welcoming 800 high school students to compete in individual and team rounds across algebra, geometry, and number theory.'), + ('Jazz at Noon: Spring Semester Concert Series', 'Arts', + now - timedelta(days=20), now - timedelta(days=20, hours=1), + 'Zellerbach Playhouse', 'Zellerbach Hall', + 'Department of Music', False, 'Free', + 'The Berkeley Jazz Ensemble performs original arrangements in a free lunchtime concert open to the campus community. This week\'s program features student compositions inspired by West African rhythms.'), + ('Women in Engineering Summit 2026', 'Career', + now - timedelta(days=35), now - timedelta(days=35, hours=5), + 'Banatao Auditorium', 'Sutardja Dai Hall', + 'Society of Women Engineers, UC Berkeley Chapter', False, 'Free', + 'An annual conference celebrating and supporting women in engineering, featuring keynote speakers from leading tech companies, networking sessions, and workshops on navigating STEM careers.'), + ('Robotics Demo Day: Berkeley Robotics Showcase', 'Lecture', + now - timedelta(days=40), now - timedelta(days=40, hours=3), + '2111 Etcheverry Hall', 'Etcheverry Hall', + 'EECS and Mechanical Engineering', False, 'Free', + 'Berkeley robotics labs open their doors for a public showcase of research projects, including autonomous vehicles, surgical robots, agricultural drones, and soft robotic systems.'), + # More upcoming + ('Study Abroad Fair: Global Opportunities at Berkeley', 'Career', + now + timedelta(days=35), now + timedelta(days=35, hours=3), + 'Upper Sproul Plaza', 'Sproul Plaza', + 'Berkeley Study Abroad', False, 'Free', + 'Learn about semester and year-long exchange programs in over 40 countries. Berkeley partners with top universities in Europe, Asia, Latin America, and Africa. Scholarships available.'), + ('Berkeley Public Health Forum: Health Equity in California', 'Health', + now + timedelta(days=40), now + timedelta(days=40, hours=3), + '50 Warren Hall', 'Warren Hall', + 'School of Public Health', True, 'Free', + 'A panel of public health researchers, community health workers, and state officials discuss progress and challenges in achieving health equity across California\'s diverse communities.'), + ('Shakespeare Festival: Midsummer Night\'s Dream', 'Arts', + now + timedelta(days=45), now + timedelta(days=45, hours=2, minutes=30), + 'Hearst Greek Theatre', 'Greek Theatre', + 'California Shakespeare Theater', False, '$25', + 'California Shakespeare Theater returns to Berkeley\'s Hearst Greek Theatre for an outdoor production of A Midsummer Night\'s Dream, featuring original music and an acclaimed Bay Area cast.'), + ('Berkeley Data Science Summit', 'Lecture', + now + timedelta(days=50), now + timedelta(days=50, hours=8), + 'Banatao Auditorium', 'Sutardja Dai Hall', + 'Berkeley Institute for Data Science', True, 'Free', + 'A full-day summit bringing together data scientists, researchers, and practitioners to discuss advances in machine learning, statistics, data ethics, and applications across domains.'), + ('Annual Picnic Day: Unversity Community Celebration', 'Social', + now + timedelta(days=60), now + timedelta(days=60, hours=6), + 'Memorial Glade', 'Memorial Glade', + 'Office of the Chancellor', False, 'Free', + 'The annual Picnic Day celebration brings together students, faculty, staff, alumni, and community members for a day of food, music, student performances, and research showcases on Memorial Glade.'), + ('Berkeley Entrepreneurship Week', 'Career', + now + timedelta(days=65), now + timedelta(days=70, hours=17), + 'Haas School of Business', 'Haas School', + 'Haas Entrepreneurship Programs', False, 'Free', + 'A week-long series of events including investor panels, founder talks, startup workshops, and a pitch competition for Berkeley students across all disciplines exploring entrepreneurship.'), + ] + + for (title, category, start_dt, end_dt, location, building, + organizer, reg_req, cost, desc) in events_data: + e = Event( + title=title, category=category, + start_datetime=start_dt, end_datetime=end_dt, + location=location, building=building, + organizer=organizer, registration_required=reg_req, + cost=cost, description=desc + ) + db.session.add(e) + + db.session.flush() + + # ── Additional Faculty ──────────────────────────────────────────────────── + additional_faculty = [ + ('Alison Gopnik', 'alison-gopnik', 'Professor', 'cognition-development', + 'gopnik@berkeley.edu', '3321 Tolman Hall', '(510) 642-7138', + 'Cognitive development, learning in children, causal reasoning, philosophy of mind', + 'Alison Gopnik is a developmental psychologist and philosopher who studies how young children learn and how their minds develop. Her popular science books have reached millions of readers.', False), + ('Venus Ranieri', 'venus-ranieri', 'Assistant Professor', 'sociology', + 'vranieri@berkeley.edu', '417 Barrows Hall', '(510) 642-6821', + 'Gender and work, organizational sociology, stratification, labor markets', + 'Venus Ranieri investigates how organizational practices and workplace norms produce and reproduce gender inequality, particularly in professional and managerial occupations.', False), + ('Russell Poldrack', 'russell-poldrack', 'Visiting Professor', 'psychology', + 'poldrack@berkeley.edu', '3210 Tolman Hall', '', + 'Cognitive neuroscience, fMRI, decision making, impulsivity, reward', + 'Russell Poldrack studies the neural basis of decision-making, learning, and self-control using functional MRI and computational modeling approaches.', False), + ('Philip Stark', 'philip-stark', 'Professor', 'mathematics', + 'stark@stat.berkeley.edu', '367 Evans Hall', '(510) 642-1467', + 'Statistics, election auditing, causal inference, food safety, uncertainty quantification', + 'Philip Stark is a statistician who pioneered risk-limiting audits of elections and has applied statistical methods to problems ranging from food safety to earthquake prediction.', False), + ('David Card', 'david-card', 'Professor, Nobel Laureate', 'economics', + 'card@econ.berkeley.edu', '549 Evans Hall', '(510) 642-0822', + 'Labor economics, immigration, minimum wage, returns to education, health economics', + 'David Card won the 2021 Nobel Prize in Economics for his empirical contributions to labor economics, particularly his influential natural experiments studying minimum wage effects and returns to education.', False), + ('Anne Baranger', 'anne-baranger', 'Professor of Teaching', 'chemistry-dept', + 'abaranger@berkeley.edu', '430 Latimer Hall', '(510) 643-2489', + 'Chemistry education, active learning, diversity in STEM, general chemistry pedagogy', + 'Anne Baranger leads efforts to transform undergraduate chemistry education at Berkeley through evidence-based active learning approaches and inclusive pedagogical practices.', False), + ('Koushik Sen', 'koushik-sen', 'Professor', 'eecs', + 'ksen@cs.berkeley.edu', '665 Soda Hall', '(510) 642-7034', + 'Software testing, program analysis, fuzzing, concurrency, security', + 'Koushik Sen develops automated software testing and program analysis tools. His CUTE and KLEE tools have been widely adopted in industry and academia.', False), + ('Franz Franchetti', 'franz-franchetti', 'Adjunct Professor', 'eecs', + '', '629 Soda Hall', '', + 'High performance computing, compilers, signal processing, FPGA, parallel programming', + 'Franz Franchetti works on automatic performance optimization for scientific computing, developing compiler technology that adapts algorithms to hardware characteristics.', False), + ('Constance Penley', 'constance-penley', 'Visiting Professor', 'english', + '', '322 Wheeler Hall', '', + 'Film studies, media theory, feminist studies, cultural studies, science fiction', + 'Constance Penley is a pioneer in film studies and feminist media theory, known for her work on science fiction, technology, and popular culture.', False), + ('Laura Nader', 'laura-nader', 'Professor Emerita', 'anthropology', + '', '232 Kroeber Hall', '', + 'Comparative law, energy policy, conflict resolution, political ecology', + 'Laura Nader is a pioneer in legal anthropology and has made influential contributions to the study of comparative law, energy policy, and how societies resolve conflict.', True), + ('Mina Aganagic', 'mina-aganagic', 'Professor', 'mathematics', + 'mina@math.berkeley.edu', '801 Evans Hall', '(510) 642-6401', + 'Mathematical physics, string theory, knot theory, mirror symmetry, topological field theory', + 'Mina Aganagic works at the interface of mathematics and string theory, making contributions to knot theory, mirror symmetry, and topological aspects of quantum field theory.', False), + ('Karl Pister', 'karl-pister', 'Professor Emeritus', 'civil-environmental-engineering', + '', '750 Davis Hall', '', + 'Computational mechanics, structural engineering, engineering education', + 'Karl Pister served as Chancellor of UC Santa Cruz and Dean of Engineering at Berkeley. He pioneered the Leadership Excellence through Advanced Degrees (LEAD) scholarship program.', True), + ('Kristin Scott', 'kristin-scott', 'Professor', 'nutritional-sciences', + 'kscott@berkeley.edu', '121 Life Sciences', '(510) 643-1949', + 'Olfactory system, taste, neural circuits, Drosophila, appetite regulation', + 'Kristin Scott studies how the brain processes smell and taste signals to guide feeding behavior, using the fruit fly as a model organism to dissect neural circuits.', False), + ('Adam Arkin', 'adam-arkin', 'Professor', 'bioengineering', + 'aparkin@berkeley.edu', '284 Stanley Hall', '(510) 642-0655', + 'Synthetic biology, systems biology, microbial ecology, bioenergy, DOE genomics', + 'Adam Arkin is a pioneer in synthetic biology and systems biology, leading research on the design of biological circuits and the ecology of microbial communities.', False), + ('Alexei Efros', 'alexei-efros', 'Professor', 'eecs', + 'efros@eecs.berkeley.edu', '723 Soda Hall', '(510) 643-3808', + 'Computer vision, deep learning, image synthesis, generative models, visual perception', + 'Alexei Efros is a computer vision researcher known for seminal work on image quilting, scene completion, and generative image synthesis. His work underpins many modern AI image generation techniques.', False), + ('Pilar Ossorio', 'pilar-ossorio', 'Visiting Scholar', 'jurisprudence-social-policy', + '', '489 Simon Hall', '', + 'Bioethics, genetics, law and science, race and genomics', + 'Pilar Ossorio works at the intersection of law, science, and ethics, studying how genomic technologies interact with concepts of race, identity, and social justice.', False), + ('Sanjit Seshia', 'sanjit-seshia', 'Professor', 'eecs', + 'sseshia@eecs.berkeley.edu', '749 Soda Hall', '(510) 643-7239', + 'Formal methods, automated reasoning, cyber-physical systems, AI safety, verification', + 'Sanjit Seshia develops methods for rigorous design and verification of intelligent systems, including autonomous vehicles, robots, and AI-enabled cyber-physical systems.', False), + ('Camille Crittenden', 'camille-crittenden', 'Lecturer', 'information-studies', + 'crittenden@ischool.berkeley.edu', '102 South Hall', '(510) 642-5614', + 'Technology policy, digital media, journalism, information and society', + 'Camille Crittenden teaches courses on information policy and digital media at the I School, drawing on experience in journalism, policy advocacy, and technology research.', False), + ('Nicholas Jewell', 'nicholas-jewell', 'Professor Emeritus', 'epidemiology-biostatistics', + '', '101 Haviland Hall', '', + 'Biostatistics, HIV/AIDS, causal inference, survival analysis, COVID-19', + 'Nicholas Jewell is a biostatistician who made important contributions to the analysis of HIV/AIDS epidemics and has more recently applied rigorous statistical methods to COVID-19 mortality studies.', True), + ('John DeNero', 'john-denero', 'Associate Teaching Professor', 'eecs', + 'denero@cs.berkeley.edu', '775 Soda Hall', '(510) 664-7073', + 'Natural language processing, machine translation, data science education', + 'John DeNero is a leader in CS education at Berkeley, teaching one of the world\'s largest introductory programming courses. His research focuses on natural language processing and machine translation.', False), + ('Andrew Ng', 'andrew-ng', 'Adjunct Professor', 'eecs', + '', 'Soda Hall', '', + 'Machine learning, deep learning, AI education, robotics', + 'Andrew Ng is a co-founder of Coursera and Google Brain, and a pioneer in deep learning. He taught at Berkeley and Stanford before founding AI Fund and DeepLearning.AI.', False), + ('Elaine Ostrander', 'elaine-ostrander', 'Adjunct Professor', 'nutritional-sciences', + '', '119 Morgan Hall', '', + 'Canine genomics, disease genetics, comparative genomics', + 'Elaine Ostrander is a leading expert in canine genomics at the NIH who collaborates with Berkeley researchers to understand the genetic basis of disease in dogs and humans.', True), + ('Nathan Seiberg', 'nathan-seiberg', 'Visiting Professor', 'physics', + '', '395 LeConte Hall', '', + 'Quantum field theory, string theory, duality, condensed matter physics', + 'Nathan Seiberg is one of the most influential theoretical physicists of his generation, with fundamental contributions to supersymmetric gauge theories and string dualities.', False), + ('Amy Herr', 'amy-herr', 'Professor', 'bioengineering', + 'amyherr@berkeley.edu', '303 Stanley Hall', '(510) 643-8649', + 'Microfluidics, protein analysis, single-cell proteomics, biomedical engineering', + 'Amy Herr engineers microfluidic devices for protein analysis at single-cell resolution, enabling new ways to study cancer heterogeneity and drug responses.', False), + ('Trevor Darrell', 'trevor-darrell', 'Professor', 'eecs', + 'trevor@eecs.berkeley.edu', '729 Soda Hall', '(510) 642-9996', + 'Computer vision, deep learning, domain adaptation, multi-modal learning', + 'Trevor Darrell leads the Berkeley Artificial Intelligence Research group\'s computer vision effort, with wide-ranging contributions to visual recognition, domain adaptation, and visual question answering.', False), + ('Lisa Goldberg', 'lisa-goldberg', 'Adjunct Professor', 'mathematics', + 'lgoldberg@haas.berkeley.edu', '373 Evans Hall', '', + 'Financial mathematics, quantitative finance, risk measurement, portfolio management', + 'Lisa Goldberg conducts research on quantitative investment strategies and risk measurement, with applications in sustainable investing and portfolio construction.', False), + ('Jennifer Granick', 'jennifer-granick', 'Adjunct Professor', 'jurisprudence-social-policy', + '', '489 Simon Hall', '', + 'Surveillance law, cybercrime, First Amendment, internet law, civil liberties', + 'Jennifer Granick is a leading attorney and scholar in cybersecurity and civil liberties law, with expertise in surveillance, government hacking, and internet free speech.', False), + ('Michael Botchan', 'michael-botchan', 'Professor', 'chemistry-dept', + 'botchan@berkeley.edu', '446 Li Ka Shing', '(510) 643-7014', + 'DNA replication, papillomavirus, tumor suppressor proteins, genome stability', + 'Michael Botchan investigates the molecular mechanisms of DNA replication and the role of viral and cellular proteins in maintaining genome integrity.', False), + ('Nils Gehlenborg', 'nils-gehlenborg', 'Adjunct Associate Professor', 'information-studies', + '', '102 South Hall', '', + 'Biomedical data visualization, genomics, visual analytics, precision medicine', + 'Nils Gehlenborg develops visualization tools for biomedical data, creating interactive systems that help researchers understand complex genomic and clinical datasets.', False), + ('Gail Murphy', 'gail-murphy', 'Visiting Professor', 'eecs', + '', 'Soda Hall', '', + 'Software engineering, developer tools, program analysis, productivity', + 'Gail Murphy is a pioneer in software engineering research, developing tools that help software developers be more productive and understand complex codebases.', False), + ('Maja Mataric', 'maja-mataric', 'Visiting Professor', 'eecs', + '', '387 Soda Hall', '', + 'Socially assistive robotics, human-robot interaction, rehabilitation, autism therapy', + 'Maja Mataric is a pioneer in socially assistive robotics, developing robots that help people with autism spectrum disorder, rehabilitation, and cognitive training.', False), + ('Jennifer Chayes', 'jennifer-chayes', 'Professor', 'statistics', + 'jchayes@berkeley.edu', '367 Evans Hall', '(510) 642-2781', + 'Algorithmic game theory, network science, machine learning, economics of algorithms', + 'Jennifer Chayes is Associate Provost for the Division of Computing, Data Science, and Society at Berkeley, and a world leader in network science, algorithmic game theory, and machine learning.', False), + ('Zackary Sholem Berger', 'zackary-berger', 'Visiting Scholar', 'public-health', + '', '50 Warren Hall', '', + 'Health disparities, immigrant health, language and medicine, primary care', + 'Zackary Berger is a primary care physician and health policy researcher who studies health disparities, the role of language in medical care, and immigrant community health needs.', False), + ('Clifford Nass', 'clifford-nass', 'Professor Emeritus', 'cognition-development', + '', '4533 Tolman Hall', '', + 'Human-computer interaction, media psychology, multitasking, voice interfaces', + 'Clifford Nass was a pioneer in human-computer interaction research, demonstrating how people naturally apply social rules to computers and other media.', True), + ('Eliza Strickland', 'eliza-strickland', 'Adjunct Lecturer', 'journalism', + '', '121 North Gate Hall', '', + 'Science journalism, technology journalism, AI reporting, biomedical ethics', + 'Eliza Strickland is a science and technology journalist who has written extensively about artificial intelligence, biomedical research, and the ethical dimensions of emerging technologies.', False), + ('Bernadette Park', 'bernadette-park', 'Visiting Scholar', 'psychology', + '', '3210 Tolman Hall', '', + 'Social cognition, stereotyping, implicit attitudes, person perception, prejudice', + 'Bernadette Park studies how people form and use mental categories of other people, with particular interest in how implicit and explicit stereotypes affect judgment and behavior.', False), + ('Philip Darby', 'philip-darby', 'Adjunct Professor', 'political-science', + '', '210 Barrows Hall', '', + 'International relations, postcolonialism, Asian security, development', + 'Philip Darby examines international relations from postcolonial and critical perspectives, focusing on power, identity, and development in Asia and the Pacific.', False), + ('Charis Thompson', 'charis-thompson', 'Professor', 'social-cultural-studies', + 'charis@berkeley.edu', '5629 Tolman Hall', '(510) 643-7285', + 'Science and technology studies, reproductive technology, race, gender', + 'Charis Thompson is a scholar of science and technology studies who examines how reproductive technologies intersect with race, gender, and bioethics in medical and social contexts.', False), + ('Aditya Garg', 'aditya-garg', 'Assistant Professor', 'landscape-architecture', + 'adgarg@berkeley.edu', '202 Wurster Hall', '(510) 642-4893', + 'Urban ecology, green infrastructure, landscape urbanism, stormwater management', + 'Aditya Garg designs and researches urban landscapes that integrate ecological function with human use, with a focus on water-sensitive design and urban biodiversity.', False), + ('Rosemary Joyce', 'rosemary-joyce', 'Professor', 'cognition-development', + 'rajoyce@berkeley.edu', '232 Kroeber Hall', '(510) 642-3801', + 'Archaeology, Mesoamerica, gender in ancient societies, museum studies', + 'Rosemary Joyce is an archaeologist who studies gender, identity, and material culture in ancient Mesoamerican societies, with fieldwork in Honduras and museum collections research.', False), + ('Pablo Spiller', 'pablo-spiller', 'Professor Emeritus', 'operations-it', + '', 'F620 Haas', '', + 'Regulation, industrial organization, telecommunications policy, energy economics', + 'Pablo Spiller is an expert in regulatory economics who has advised governments and companies worldwide on telecommunications and energy sector reforms.', True), + ('Ricardo Fraiman', 'ricardo-fraiman', 'Visiting Scholar', 'mathematics', + '', '801 Evans Hall', '', + 'Nonparametric statistics, functional data analysis, data depth', + 'Ricardo Fraiman is a statistician specializing in nonparametric methods and functional data analysis, with applications in medicine, engineering, and environmental science.', False), + ('Wendy Brown', 'wendy-brown', 'Professor', 'political-science', + 'wbrown@berkeley.edu', '210 Barrows Hall', '(510) 643-2742', + 'Political theory, neoliberalism, democracy, feminist theory, Foucault', + 'Wendy Brown is a leading political theorist whose work on neoliberalism, democracy, and sovereignty has shaped contemporary political thought across the humanities and social sciences.', False), + ('George Smoot', 'george-smoot', 'Professor Emeritus, Nobel Laureate', 'physics', + '', '359 LeConte Hall', '', + 'Cosmology, cosmic microwave background, dark matter, dark energy, COBE satellite', + 'George Smoot shared the 2006 Nobel Prize in Physics for discovering the anisotropy of the cosmic microwave background radiation, providing strong evidence for the Big Bang model.', True), + ('Mario Molina', 'mario-molina', 'Professor Emeritus, Nobel Laureate', 'chemistry-dept', + '', '420 Latimer Hall', '', + 'Atmospheric chemistry, ozone depletion, CFCs, air quality, climate', + 'Mario Molina shared the 1995 Nobel Prize in Chemistry for his work on the depletion of the ozone layer by chlorofluorocarbons (CFCs), leading to the Montreal Protocol.', True), + ('Melissa Dell', 'melissa-dell', 'Visiting Scholar', 'economics', + '', '549 Evans Hall', '', + 'Economic history, political economy, development economics, Latin America, machine learning', + 'Melissa Dell is a development economist who uses historical analysis and machine learning to study the long-run causes of inequality in Latin America and other developing regions.', False), + ('Shachar Kariv', 'shachar-kariv', 'Professor', 'economics', + 'kariv@econ.berkeley.edu', '533 Evans Hall', '(510) 642-8401', + 'Behavioral economics, experimental economics, social networks, risk and uncertainty', + 'Shachar Kariv uses controlled experiments and revealed preference methods to study how people make economic decisions under uncertainty and in social settings.', False), + ] + + for (name, slug, title, dept_slug, email, office, phone, + research_interests, bio, is_emeritus) in additional_faculty: + dept = departments.get(dept_slug) + existing = Faculty.query.filter_by(slug=slug).first() + if not existing: + f = Faculty( + name=name, slug=slug, title=title, + department_id=dept.id if dept else None, + email=email, office=office, phone=phone, + research_interests=research_interests, bio=bio, + is_emeritus=is_emeritus + ) + db.session.add(f) + + db.session.flush() + + # ── One more faculty to reach 80+ ───────────────────────────────────────── + last_faculty = [ + ('Hany Farid', 'hany-farid', 'Professor', 'eecs', + 'hfarid@berkeley.edu', '731 Soda Hall', '(510) 642-1170', + 'Digital forensics, image analysis, deepfakes, misinformation, disinformation', + 'Hany Farid is a leading expert in digital forensics and image analysis. He develops techniques to detect manipulated images, videos, and audio, and advises on policies to combat misinformation.', False), + ('Anca Dragan', 'anca-dragan', 'Associate Professor', 'eecs', + 'anca@cs.berkeley.edu', '729 Soda Hall', '(510) 643-5812', + 'Human-robot interaction, robot learning, autonomous vehicles, value alignment', + 'Anca Dragan develops algorithms that enable robots to interact with and assist people in natural environments. Her work on value alignment and shared autonomy has influenced autonomous vehicle design.', False), + ('Ren Ng', 'ren-ng', 'Associate Professor', 'eecs', + 'ren@cs.berkeley.edu', '771 Soda Hall', '(510) 642-1862', + 'Computational photography, light field cameras, imaging systems, computer graphics', + 'Ren Ng invented the light field camera and founded Lytro. His research on computational imaging bridges optics, signal processing, and machine learning to create novel imaging capabilities.', False), + ] + for (name, slug, title, dept_slug, email, office, phone, + research_interests, bio, is_emeritus) in last_faculty: + dept = departments.get(dept_slug) + if not Faculty.query.filter_by(slug=slug).first(): + f = Faculty( + name=name, slug=slug, title=title, + department_id=dept.id if dept else None, + email=email, office=office, phone=phone, + research_interests=research_interests, bio=bio, + is_emeritus=is_emeritus + ) + db.session.add(f) + db.session.flush() + + # ── Additional News Articles ────────────────────────────────────────────── + extra_articles = [ + # 2024 articles + ('Berkeley-Led Team Maps First Complete Human Chromosome', 'Research', + 'Dr. Karen Lau', datetime(2024, 5, 15), False, + 'A consortium including Berkeley researchers has completed the first gapless sequence of a human chromosome, a milestone in genomics.', + 'Using long-read sequencing technology developed at Berkeley, researchers have produced the first complete, gap-free sequence of human chromosome 8. The work resolves regions that were previously unsequenceable and reveals new genes relevant to disease.', + 'genomics,chromosome,DNA,research,biology'), + ('Berkeley Joins Global Climate Research Initiative with 30 Universities', 'Research', + 'Climate Research Office', datetime(2024, 6, 1), False, + 'UC Berkeley is a founding member of a new 30-university climate research consortium that will coordinate global weather monitoring, climate modeling, and adaptation strategies.', + 'The Global Climate Research Initiative will share data, computing resources, and researchers across six continents. Berkeley will host the consortium\'s data center and lead the North American monitoring network.', + 'climate,research,international,environment,collaboration'), + ('New Center for Democracy Studies Established at Berkeley', 'Campus Life', + 'Chancellor\'s Office', datetime(2024, 7, 10), False, + 'UC Berkeley has established a new research center dedicated to studying and strengthening democratic institutions, processes, and civic engagement.', + 'The Center for the Study of Democracy, funded by a $25 million gift, will bring together political scientists, legal scholars, historians, and technologists to understand threats to democracy and develop evidence-based interventions.', + 'democracy,politics,research,civic,center'), + ('Berkeley Tops QS World University Rankings for Research Impact', 'Research', + 'Berkeley News Staff', datetime(2024, 8, 20), False, + 'UC Berkeley has ranked first among public universities in the QS World University Rankings on the research impact metric for the third consecutive year.', + 'The QS rankings measure the number of highly cited research publications per faculty member. Berkeley\'s strength spans 14 fields, with top-10 rankings in computer science, engineering, economics, and biological sciences.', + 'ranking,research,university,QS,excellence'), + ('Berkeley Public Health School Launches Free Online COVID Resources', 'Campus Life', + 'School of Public Health', datetime(2024, 9, 5), False, + 'The School of Public Health has launched a freely accessible online portal compiling Berkeley research on COVID-19 long-term effects, vaccine efficacy, and mental health impacts.', + 'The COVID Research Portal aggregates findings from more than 120 Berkeley studies on the pandemic\'s biological, psychological, and social effects. All resources are available in English and Spanish.', + 'COVID-19,public health,online,resources,research'), + ('Berkeley Engineers Build Robot That Can Learn From Watching YouTube', 'Research', + 'Engineering News', datetime(2024, 10, 12), False, + 'Berkeley robotics researchers have developed a system that allows robots to learn manipulation tasks by watching instructional videos, dramatically accelerating robot training.', + 'The system uses large vision-language models to parse video demonstrations and extract task-relevant information, allowing a robot arm to learn complex assembly and cooking tasks with minimal human intervention.', + 'robotics,AI,machine learning,engineering,video'), + ('Nobel Prize Laureate Michael Jordan Lecture Series Kicks Off', 'Faculty', + 'EECS Department', datetime(2024, 11, 1), False, + 'The new Michael I. Jordan Distinguished Lecture Series in Machine Learning and Statistics begins with an inaugural talk on the future of probabilistic AI.', + 'The lecture series, named for Berkeley Professor Michael I. Jordan — often called the "Michael Jordan of machine learning" — will bring world-leading researchers to campus each semester to share advances in statistical machine learning.', + 'machine learning,lecture,faculty,statistics,AI'), + ('Berkeley Researchers Identify Gene Linked to Longevity in Centenarians', 'Science', + 'Prof. Judith Campisi', datetime(2024, 12, 3), False, + 'A Berkeley-led genomic study of 1,200 centenarians has identified a gene variant that appears to protect cells from aging-related damage and inflammation.', + 'The gene, dubbed SAGE-1 (Senescence-Associated Genomic Element 1), was found at significantly higher frequency in individuals who live past 100 without major age-related diseases. The discovery opens new targets for anti-aging interventions.', + 'longevity,aging,genetics,science,centenarians'), + ('Fall Convocation Addresses AI and Academic Integrity', 'Campus Life', + 'Academic Senate', datetime(2024, 12, 15), False, + 'Berkeley\'s Fall Convocation focused this year on how the academic community should adapt policies, pedagogy, and research practices in the age of generative AI.', + 'Chancellor Carol Christ delivered the keynote, urging faculty to develop nuanced AI policies that distinguish between appropriate use of AI tools and academic dishonesty. The convocation also featured a panel of students sharing their perspectives.', + 'AI,academic integrity,campus,policy,education'), + ('Berkeley\'s Free Speech Wall Returns After Renovation', 'Campus Life', + 'Facilities Office', datetime(2025, 1, 8), False, + 'The iconic Free Speech Wall on Bancroft Avenue has reopened after a year-long renovation that preserved its historical character while improving accessibility.', + 'The renovated wall features updated chalk panels, improved lighting for nighttime visibility, and a new digital companion space for virtual expressions. The project included consultation with campus historians and Free Speech Movement veterans.', + 'free speech,campus,history,renovation,Bancroft'), + ('Berkeley Biophysicists Develop Microscope That Can See Individual Proteins', 'Science', + 'Biophysics Department', datetime(2025, 1, 22), False, + 'Berkeley researchers have built a cryo-electron microscope configuration that achieves atomic resolution for membrane proteins, opening new possibilities for drug discovery.', + 'The new cryo-EM setup achieves resolution of 1.2 angstroms for membrane-embedded proteins — a historically difficult target due to their lipid environment. The technique should accelerate structural studies of G-protein coupled receptors, a major drug target class.', + 'biophysics,microscopy,proteins,science,drug discovery'), + ('Berkeley Athletes Win Record 12 Medals at Winter World University Games', 'Athletics', + 'Cal Athletics', datetime(2025, 2, 10), False, + 'Cal Berkeley student-athletes won 12 medals — including five gold — at the Winter World University Games, the most ever for a single US university at the biennial competition.', + 'Athletes competing in skiing, short track speed skating, and biathlon led the way, with the women\'s alpine ski team taking gold in the combined event for the second consecutive time.', + 'athletics,winter sports,World University Games,medals,Cal Bears'), + ('Berkeley Law Clinic Wins Landmark Immigration Case at Ninth Circuit', 'Faculty', + 'Berkeley Law', datetime(2025, 2, 25), False, + 'The Berkeley Law Immigration Clinic secured a landmark Ninth Circuit ruling expanding humanitarian protections for asylum seekers who fled domestic violence.', + 'The 11-0 en banc decision in Rodriguez v. Garland held that domestic violence survivors who demonstrate inability to leave abusive relationships due to government inability to protect them qualify for asylum under existing law.', + 'law,immigration,asylum,clinic,court'), + ('New Biotech Hub Opens Adjacent to Berkeley Campus', 'Campus Life', + 'Economic Development Office', datetime(2025, 3, 5), False, + 'The Berkeley Biotech Innovation District, a new 1.5 million square foot life sciences campus, has opened adjacent to the university, creating space for Berkeley spinouts and biotech companies.', + 'The district hosts 45 startup companies, a wet lab incubator, shared core facilities, and direct collaboration agreements with Berkeley faculty. The project is expected to create 8,000 jobs over a decade.', + 'biotech,innovation,startup,campus,economic development'), + ('Study: Berkeley Grads Lead More Companies Than Any Other Public University', 'Research', + 'Haas School of Business', datetime(2025, 3, 18), False, + 'A new analysis of Fortune 500 leadership finds that UC Berkeley alumni serve as CEOs and CFOs at more companies than graduates of any other public university.', + 'The Haas School study tracked 10,000 company leaders and found that Berkeley engineers, MBAs, and liberal arts graduates appear at the highest rates in technology, finance, and energy sectors. The results hold even when controlling for company size and industry.', + 'alumni,business,leadership,Haas,Fortune 500'), + ('Berkeley Physicists Trap Light in a New State of Matter', 'Science', + 'Physics Department', datetime(2025, 4, 2), False, + 'Physicists at Berkeley have created a new state of matter in which light and matter become so entangled that the hybrid particles behave like neither alone.', + 'Using a silicon nitride microresonator cooled to near absolute zero, the team created "polariton condensates" that exhibit quantum fluid behavior at previously unachievable temperatures. The work could enable room-temperature quantum optical devices.', + 'physics,quantum,photonics,matter,condensate'), + ('Berkeley Celebrates 50 Years of Women in STEM Initiative', 'Campus Life', + 'Diversity, Equity and Inclusion Office', datetime(2025, 1, 30), False, + 'UC Berkeley is celebrating the 50th anniversary of its Women in Science and Engineering program, which has helped thousands of students succeed in male-dominated fields.', + 'The WISE program was founded in 1974 by Professor Birch Bayh in response to low representation of women in engineering and physical sciences. Today, 47% of Berkeley engineering undergraduates identify as women or nonbinary.', + 'diversity,women in STEM,anniversary,engineering,inclusion'), + ('Berkeley Launches Nation\'s First AI Safety Minor', 'Academics', + 'EECS Department', datetime(2024, 8, 5), False, + 'UC Berkeley has launched the first undergraduate minor in AI Safety in the United States, offering interdisciplinary coursework in technical AI safety, AI governance, and philosophy of AI.', + 'The minor draws on faculty from EECS, Philosophy, Economics, and the School of Law to prepare students to work on ensuring that advanced AI systems remain safe, beneficial, and aligned with human values.', + 'AI safety,EECS,minor,academics,curriculum'), + ('Berkeley Model UN Wins Best Delegation at Harvard Conference', 'Student', + 'Student Affairs', datetime(2025, 2, 15), False, + 'The Berkeley Model United Nations team won the Best Large Delegation award at the Harvard National Model United Nations conference, competing against 3,000 students from 120 universities.', + 'The 44-member Berkeley delegation earned 12 individual awards in committees spanning the Security Council, Human Rights Council, and specialized agencies, the highest total in Cal MUN history.', + 'student,Model UN,award,international,leadership'), + ('Berkeley Tops Princeton Review for Social Atmosphere', 'Campus Life', + 'Student Affairs', datetime(2025, 3, 25), False, + 'UC Berkeley has ranked first in The Princeton Review\'s annual survey of colleges with the most politically active student bodies and second in the category of "best college town."', + 'The annual survey of 143,000 students found that Berkeley students report the most community engagement, highest rates of political activity, and strongest sense of campus civic life among all ranked universities.', + 'campus life,Princeton Review,ranking,community,student'), + ('Berkeley Receives $100M Gift to Fund AI Ethics Research', 'Research', + 'Office of the Chancellor', datetime(2024, 11, 20), True, + 'The largest single donation in Berkeley\'s history designated for ethics research will fund a new institute dedicated to studying the societal impacts and ethical dimensions of artificial intelligence.', + 'The gift from a Bay Area technology philanthropist will establish the Berkeley Institute for AI Ethics, with dedicated faculty positions, graduate fellowships, and a public engagement program to translate research into policy.', + 'AI ethics,donation,research,technology,policy'), + ('Berkeley Ranks Second Globally in Startup Founder Alumni', 'Research', + 'Haas School of Business', datetime(2024, 6, 30), False, + 'A new PitchBook ranking places UC Berkeley second globally in the number of alumni who have founded venture-backed startups, trailing only Stanford.', + 'Berkeley alumni have founded more than 14,000 companies in the past decade, with particularly high concentrations in AI, biotechnology, clean energy, and fintech. The campus ecosystem includes 25 incubators and accelerators.', + 'startup,entrepreneurship,alumni,innovation,venture capital'), + ('Faculty Senate Approves Major Curriculum Reform for Undergraduates', 'Campus Life', + 'Academic Senate', datetime(2024, 7, 22), False, + 'The Academic Senate has approved the most significant overhaul of undergraduate general education requirements in 30 years, adding courses in data literacy, climate studies, and global health.', + 'Beginning with the class of 2027, all Berkeley undergraduates will complete a course in computational thinking, a seminar in global environmental challenges, and a community engagement experience. The reforms follow two years of faculty deliberation.', + 'curriculum,academics,reform,undergraduate,requirements'), + ('Berkeley Partnership Brings 100 Inner-City Students to Campus Each Summer', 'Student', + 'Community Engagement Office', datetime(2024, 9, 15), False, + 'A new partnership between Berkeley, Oakland Unified School District, and three nonprofits will bring 100 Oakland high school students to live and study on campus each summer.', + 'The Berkeley Summer Scholars program provides intensive academic coursework, mentorship by current Berkeley students, and lab internships in STEM departments. All costs are covered by a combination of university and private funding.', + 'community,outreach,student,Oakland,STEM'), + ('Berkeley Physicists Achieve New Record in Quantum Entanglement Distance', 'Science', + 'Physics Department', datetime(2024, 10, 28), False, + 'A Berkeley experiment using Berkeley Lab\'s free-electron laser has achieved quantum entanglement over a record 12.5 kilometers of optical fiber.', + 'The achievement represents a key step toward quantum repeaters, which would allow quantum communication networks to span continental distances. The team used error-corrected photon pairs to maintain entanglement fidelity over the full distance.', + 'quantum,entanglement,physics,science,communication'), + ('Berkeley Engineering Students Win Solar Decathlon', 'Student', + 'Engineering News', datetime(2024, 5, 20), False, + 'A team of Berkeley engineering and architecture students won the U.S. Department of Energy\'s Solar Decathlon with a zero-energy affordable housing prototype designed for Bay Area residents.', + 'The team, comprising civil, mechanical, electrical, and architecture students, built a 900-square-foot affordable housing unit that generates more energy than it consumes and can withstand California seismic events. The design is being adapted for mass production.', + 'engineering,solar,student,competition,housing'), + ('Berkeley Law Tops Bar Passage Rates Among Tier-1 Schools', 'Faculty', + 'Berkeley Law', datetime(2024, 11, 15), False, + 'Graduates of Berkeley Law posted the highest first-time bar passage rate (97.2%) among top-14 law schools in California, reflecting the strength of Berkeley\'s rigorous doctrinal training.', + 'The 2024 California bar results show that Berkeley graduates pass at rates exceeding UCLA, USC, and other regional competitors. The school\'s bar prep program, which includes individualized testing practice, contributed to the strong results.', + 'law,bar exam,faculty,legal education,ranking'), + ('Berkeley Names 2025 Distinguished Teaching Award Winners', 'Faculty', + 'Academic Senate', datetime(2025, 4, 10), False, + 'Twelve UC Berkeley faculty members received the Distinguished Teaching Award for 2025, the university\'s highest recognition for excellence in undergraduate instruction.', + 'This year\'s award winners include professors from Biology, Mathematics, Literature, Electrical Engineering, and Nutritional Sciences. Recipients are selected by a student-faculty committee based on teaching evaluations, peer reviews, and student nominations.', + 'faculty,teaching,award,undergraduate,excellence'), + ('Berkeley Hosts First-Ever Interdisciplinary AI and Law Conference', 'Research', + 'Berkeley Law', datetime(2025, 1, 15), False, + 'The Berkeley AI and Law Conference brought together 400 researchers, lawyers, regulators, and technologists to address the legal challenges posed by large language models and autonomous systems.', + 'Sessions covered liability for AI-generated content, algorithmic discrimination, AI and intellectual property, and the regulatory frameworks emerging in California, the EU, and the United States. Keynote speakers included U.S. FTC commissioners and AI lab executives.', + 'AI,law,conference,research,regulation'), + ('Berkeley Dining Launches Plant-Based Monday Initiative', 'Campus Life', + 'Housing and Dining', datetime(2025, 2, 20), False, + 'All Berkeley dining halls will offer expanded plant-based menus every Monday, part of the university\'s commitment to reduce carbon emissions from food by 40% by 2030.', + 'Plant-Based Mondays expand the existing Meatless Monday program and introduce new dishes developed in partnership with Berkeley\'s nutrition faculty. Dining halls will track and publish carbon and water footprint data for each Monday menu.', + 'sustainability,dining,food,environment,plant-based'), + ] + + for (title, category, author_extra, pub_date, featured, summary, content, tags) in extra_articles: + slug_base = slugify(title) + slug = slug_base + counter = 1 + while NewsArticle.query.filter_by(slug=slug).first(): + slug = f"{slug_base}-{counter}" + counter += 1 + article = NewsArticle( + title=title, slug=slug, category=category, + author=author_extra or 'Berkeley News Staff', + published_date=pub_date, + content=content, summary=summary, tags=tags, + view_count=200, + featured=featured + ) + db.session.add(article) + + db.session.flush() + + # ── Additional Programs ─────────────────────────────────────────────────── + extra_programs = [ + # More UG + ('Cognitive Science', 'BA', 'letters-and-science', 'cognition-development', + 'Cognitive Science is an interdisciplinary major that integrates linguistics, psychology, computer science, neuroscience, and philosophy to study the mind.', + 'Intro to Cognitive Science, Linguistics, Probability, Cognitive Development, Human-Computer Interaction, senior seminar.', + 120, 4.0, 'November 30', False, False), + ('Linguistics', 'BA', 'letters-and-science', 'english', + 'The Linguistics major examines the structure, meaning, and use of human language through theoretical and empirical approaches.', + 'Introduction to Linguistics, Phonology, Syntax, Semantics, Historical Linguistics, Field Methods, thesis.', + 120, 4.0, 'November 30', False, False), + ('Music', 'BA', 'letters-and-science', 'cognition-development', + 'The Music BA offers rigorous training in music theory, history, and composition alongside opportunities for performance.', + 'Music Theory, Music History, Aural Skills, Composition, Ethnomusicology electives, senior recital or thesis.', + 120, 4.0, 'November 30', False, False), + ('Art Practice', 'BA', 'letters-and-science', 'social-cultural-studies', + 'The Art Practice major offers studio training in painting, sculpture, photography, digital media, and interdisciplinary art.', + 'Drawing, Intermediate Studio, Art History, Senior Studio, Senior Seminar, senior thesis exhibition.', + 120, 4.0, 'November 30', False, False), + ('Geography', 'BA', 'letters-and-science', 'espm', + 'The Geography major investigates spatial relationships between human societies and the natural environment.', + 'Physical Geography, Human Geography, GIS, Remote Sensing, Regional Studies, senior research project.', + 120, 4.0, 'November 30', False, False), + ('Anthropology', 'BA', 'letters-and-science', 'cognition-development', + 'The Anthropology major integrates archaeology, biological anthropology, cultural anthropology, and linguistic anthropology.', + 'Introduction to Anthropology, four-field breadth courses, Methods, upper-division seminars, senior thesis.', + 120, 4.0, 'November 30', False, False), + ('Philosophy', 'BA', 'letters-and-science', 'jurisprudence-social-policy', + 'The Philosophy major develops rigorous analytical reasoning through the study of logic, ethics, metaphysics, and the history of philosophy.', + 'Logic, History of Philosophy, Ethics, Epistemology, upper division seminars, senior thesis.', + 120, 4.0, 'November 30', False, False), + ('Film and Media', 'BA', 'letters-and-science', 'social-cultural-studies', + 'The Film and Media major offers critical and production-based study of cinema, television, digital media, and audio culture.', + 'Film History, Media Theory, Film Analysis, Production Workshop, upper division seminars, capstone production project.', + 120, 4.0, 'November 30', False, False), + ('Near Eastern Studies', 'BA', 'letters-and-science', 'history', + 'Near Eastern Studies examines the history, languages, literature, and cultures of the ancient and modern Middle East and North Africa.', + 'Arabic or Hebrew or Persian, Area history, Literature in Translation, senior seminar.', + 120, 4.0, 'November 30', False, False), + ('South and Southeast Asian Studies', 'BA', 'letters-and-science', 'history', + 'SSEAS integrates the study of languages, histories, religions, and contemporary issues of South and Southeast Asia.', + 'Language sequence, area history, religious traditions, modern literature, senior research paper.', + 120, 4.0, 'November 30', False, False), + ('Public Health', 'BS', 'public-health', 'epidemiology-biostatistics', + 'The Public Health BS trains undergraduates in the scientific foundations of public health, epidemiology, and health policy.', + 'Biology, Chemistry, Epidemiology, Biostatistics, Environmental Health, Health Policy, Community Practice, senior capstone.', + 120, 4.0, 'November 30', False, False), + ('Conservation and Resource Studies', 'BS', 'natural-resources', 'espm', + 'CRS integrates ecology, economics, social science, and policy to prepare students for careers in conservation and sustainability.', + 'Ecology, Environmental Economics, Conservation Biology, Policy Analysis, Field Practicum, senior thesis.', + 120, 4.0, 'November 30', False, False), + ('Landscape Architecture', 'BS', 'environmental-design', 'landscape-architecture', + 'The Landscape Architecture BS combines studio design training with ecological sciences and site engineering for outdoor environments.', + 'Design Studio, Site Engineering, Plant Materials, Ecological Systems, Landscape History, senior design project.', + 128, 4.0, 'November 30', False, False), + ('Urban Studies', 'BA', 'environmental-design', 'city-planning', + 'Urban Studies provides an interdisciplinary perspective on cities, examining their history, social dynamics, politics, and physical form.', + 'Urban Theory, Urban History, Social Geography, Planning Law, Community Development, senior research project.', + 120, 4.0, 'November 30', False, False), + ('Rhetoric', 'BA', 'letters-and-science', 'english', + 'The Rhetoric major trains students in the theory and practice of persuasive discourse across ancient and contemporary traditions.', + 'Classical Rhetoric, Contemporary Rhetorical Theory, Public Address, Written Argumentation, senior seminar.', + 120, 4.0, 'November 30', False, False), + # More graduate programs + ('Architecture', 'MS', 'environmental-design', 'architecture', + 'The MArch prepares architects for professional practice and research through advanced studio work, seminars, and a thesis project.', + 'Advanced Design Studio, Structures and Technology, Environmental Systems, History and Theory, thesis.', + 60, 2.0, 'January 5', False, False), + ('Landscape Architecture', 'MS', 'environmental-design', 'landscape-architecture', + 'The MLA trains landscape architects to design sustainable outdoor environments, from parks to regional landscapes.', + 'Design Studio, Site and Soils Engineering, Plants and Planting Design, Landscape History, professional report.', + 48, 2.0, 'January 5', False, False), + ('City and Regional Planning', 'MS', 'environmental-design', 'city-planning', + 'The MSCP is a research-focused master\'s degree for those seeking to advance knowledge in urban and regional planning.', + 'Planning Theory, Quantitative Methods, Qualifying Paper, dissertation research.', + 48, 2.0, 'December 15', False, False), + ('Mechanical Engineering', 'PhD', 'engineering', 'mechanical-engineering', + 'The ME PhD produces leading researchers in areas such as robotics, biomechanics, fluid dynamics, and energy systems.', + 'Preliminary Exam, Qualifying Exam, dissertation, teaching requirement.', + 0, 5.0, 'December 1', False, True), + ('Civil and Environmental Engineering', 'PhD', 'engineering', 'civil-environmental-engineering', + 'The CEE PhD trains engineers to conduct original research on infrastructure, geotechnical systems, and environmental quality.', + 'Preliminary Exam, Qualifying Exam, dissertation proposal, dissertation research.', + 0, 5.0, 'December 1', False, True), + ('Materials Science and Engineering', 'PhD', 'engineering', 'materials-science', + 'The MSE PhD trains materials researchers to study structure-property relationships in advanced materials for energy, electronics, and medicine.', + 'Qualifying Exam, dissertation proposal, dissertation research, candidacy.', + 0, 5.0, 'December 1', False, True), + ('Nuclear Engineering', 'PhD', 'engineering', 'nuclear-engineering', + 'The NE PhD prepares researchers to advance nuclear energy, radiation safety, and nuclear security through original research.', + 'Qualifying Exam, candidacy, dissertation, teaching assistant.', + 0, 5.0, 'December 1', False, True), + ('Industrial Engineering and Operations Research', 'PhD', 'engineering', 'ieor', + 'The IEOR PhD trains researchers in optimization, stochastic modeling, and data-driven decision-making for complex systems.', + 'Qualifying Exam, candidacy, dissertation research.', + 0, 5.0, 'December 1', False, True), + ('Political Science', 'PhD', 'letters-and-science', 'political-science', + 'The Political Science PhD trains scholars in comparative politics, international relations, American politics, and political theory.', + 'First-year courses, qualifying examination, dissertation proposal, dissertation, job market paper.', + 0, 5.5, 'December 1', False, False), + ('Psychology', 'PhD', 'letters-and-science', 'psychology', + 'The Psychology PhD prepares researchers across clinical, cognitive, developmental, social, and neuroscience specialties.', + 'Qualifying Exam, research rotations, dissertation proposal, dissertation, teaching requirement.', + 0, 5.0, 'December 1', False, False), + ('History', 'PhD', 'letters-and-science', 'history', + 'The History PhD trains historians who produce original scholarship on societies across time, place, and culture.', + 'Coursework, oral qualifying examination, dissertation proposal, dissertation.', + 0, 6.0, 'December 15', False, False), + ('English', 'PhD', 'letters-and-science', 'english', + 'The English PhD trains literary scholars in critical theory, cultural history, and creative approaches to literature.', + 'Coursework, qualifying examination, dissertation proposal, dissertation.', + 0, 5.5, 'December 15', False, False), + ('Biostatistics', 'PhD', 'public-health', 'epidemiology-biostatistics', + 'The Biostatistics PhD trains researchers to develop and apply statistical methods for biomedical and public health research.', + 'Coursework in statistical theory and methods, qualifying exam, dissertation.', + 0, 5.0, 'December 1', False, True), + ('Environmental Engineering', 'PhD', 'engineering', 'civil-environmental-engineering', + 'The Environmental Engineering PhD trains researchers in water quality, air quality, remediation, and sustainability.', + 'Qualifying Exam, candidacy, dissertation research, teaching.', + 0, 5.0, 'December 1', False, True), + ('Architecture', 'PhD', 'environmental-design', 'architecture', + 'The Architecture PhD trains scholars in the history, theory, and cultural dimensions of the built environment.', + 'Coursework, qualifying examination, dissertation proposal, dissertation.', + 0, 5.0, 'December 15', False, False), + ('Information Science', 'PhD', 'information', 'information-studies', + 'The I School PhD trains researchers to study how people create, share, and use information in technological contexts.', + 'Coursework, qualifying examination, dissertation proposal, dissertation.', + 0, 5.0, 'December 1', False, False), + ('Education', 'PhD', 'education', 'cognition-development', + 'The Education PhD prepares scholars to conduct original research on learning, teaching, and educational systems.', + 'Coursework in learning science or social studies of education, qualifying exam, dissertation.', + 0, 5.5, 'December 15', False, False), + ('Social Welfare', 'PhD', 'social-welfare', None, + 'The Social Welfare PhD trains scholars to conduct rigorous research on poverty, inequality, and social policy.', + 'Coursework, qualifying examination, dissertation research, teaching experience.', + 0, 5.0, 'December 1', False, False), + # More MS programs + ('Electrical Engineering', 'MS', 'engineering', 'eecs', + 'The EE MS covers advanced areas in power, communications, signal processing, photonics, and microelectronics.', + 'Advanced coursework in EE specialization, comprehensive exam or project.', + 24, 1.5, 'December 1', False, True), + ('Environmental Health Sciences', 'MS', 'public-health', 'environmental-health', + 'The MEHS prepares practitioners to assess and manage environmental exposures affecting human health.', + 'Environmental Health principles, Toxicology, Exposure Assessment, Policy, practicum.', + 36, 1.5, 'December 1', False, False), + ('Development Practice', 'MS', 'natural-resources', 'espm', + 'The MDP is a professional master\'s degree for practitioners working on international development and sustainable resource management.', + 'Development Economics, Health and Nutrition, Governance, Field Practicum, thesis or professional project.', + 48, 2.0, 'February 1', False, False), + ('Social Welfare', 'MS', 'social-welfare', None, + 'The MSW prepares professional social workers for practice in clinical, community, and policy settings.', + 'Foundation year generalist practice, concentration year specialization (clinical or macro), field practicum.', + 60, 2.0, 'January 15', False, False), + ('Energy and Resources', 'MS', 'natural-resources', 'espm', + 'The ERG MA trains students to address complex energy and climate challenges from interdisciplinary perspectives.', + 'Energy Systems, Statistics, Environmental Economics, Policy Analysis, master\'s thesis.', + 36, 2.0, 'January 15', False, False), + ('Education', 'MS', 'education', 'social-cultural-studies', + 'The MA in Education prepares educational researchers, policy analysts, and school leaders.', + 'Foundations of Education, Research Methods, specialization courses, thesis or comprehensive exam.', + 30, 1.5, 'January 5', False, False), + ] + + for (name, degree_type, college_slug, dept_slug, desc, reqs, + units, duration, deadline, is_online, gre_req) in extra_programs: + college = colleges.get(college_slug) + dept = departments.get(dept_slug) if dept_slug else None + slug_base = slugify(f"{name}-{degree_type}") + slug = slug_base + counter = 1 + while Program.query.filter_by(slug=slug).first(): + slug = f"{slug_base}-{counter}" + counter += 1 + p = Program( + name=name, slug=slug, degree_type=degree_type, + college_id=college.id if college else None, + department_id=dept.id if dept else None, + description=desc, requirements=reqs, + units=units, duration_years=duration, + application_deadline=deadline, + is_online=is_online, gre_required=gre_req + ) + db.session.add(p) + + db.session.flush() + + # ── Additional Events ───────────────────────────────────────────────────── + extra_events = [ + ('Berkeley AI Lab Open House', 'Lecture', + now + timedelta(days=4), now + timedelta(days=4, hours=3), + '737 Soda Hall', 'Soda Hall', + 'Berkeley Artificial Intelligence Research Lab', False, 'Free', + 'BAIR opens its research labs to students, alumni, and the public. Demonstrations of current projects in robotics, natural language processing, computer vision, and reinforcement learning.'), + ('Women\'s Basketball: Cal vs. Stanford', 'Sports', + now + timedelta(days=6), now + timedelta(days=6, hours=2), + 'Haas Pavilion', 'Haas Pavilion', + 'Cal Athletics', False, '$15', + 'The Cal Golden Bears women\'s basketball team hosts arch-rival Stanford in a Pac-12 matchup. Student tickets available free with valid Cal ID.'), + ('Public Lecture: The Future of Democracy in the Digital Age', 'Lecture', + now + timedelta(days=9), now + timedelta(days=9, hours=1, minutes=30), + '145 Dwinelle Hall', 'Dwinelle Hall', + 'Department of Political Science', False, 'Free', + 'A leading democratic theorist will explore how digital media, social platforms, and AI are reshaping the conditions for democratic deliberation, civic participation, and political accountability.'), + ('Berkeley Chemistry Open House', 'Lecture', + now + timedelta(days=11), now + timedelta(days=11, hours=4), + '420 Latimer Hall', 'Latimer Hall', + 'College of Chemistry', False, 'Free', + 'The College of Chemistry invites prospective students, current undergraduates, and the public to explore research in chemistry, chemical engineering, and biochemistry.'), + ('Film Screening: Documentary on CRISPR Technology', 'Arts', + now + timedelta(days=13), now + timedelta(days=13, hours=1, minutes=45), + '155 Dwinelle Hall', 'Dwinelle Hall', + 'BAMPFA and Innovative Genomics Institute', False, 'Free', + 'A special screening of the documentary "Code of Life," followed by a discussion with Berkeley researchers including members of the Doudna lab about the current state of gene editing research.'), + ('Berkeley Career Alumni Night: Tech Industry', 'Career', + now + timedelta(days=17), now + timedelta(days=17, hours=3), + 'Alumni House', 'Alumni House', + 'Career Center and Alumni Network', True, 'Free', + 'Fifty Berkeley alumni working in technology companies including Google, Apple, Meta, and dozens of startups will share career advice and networking opportunities with current students.'), + ('Graduate Research Symposium 2026', 'Lecture', + now + timedelta(days=19), now + timedelta(days=19, hours=6), + 'Banatao Auditorium', 'Sutardja Dai Hall', + 'Graduate Division', False, 'Free', + 'Graduate students from across Berkeley present their research in a one-day symposium covering every discipline. Flash talks, poster sessions, and discipline-specific panels.'), + ('Berkeley Chinese New Year Festival', 'Social', + now + timedelta(days=22), now + timedelta(days=22, hours=3), + 'Sproul Plaza', 'Sproul Plaza', + 'Asian Student Union', False, 'Free', + 'Celebrate the Lunar New Year with cultural performances, traditional foods, calligraphy, paper cutting, lion dancing, and activities organized by Berkeley\'s Asian and Asian American student organizations.'), + ('Sustainability Summit: How Berkeley Leads on Climate', 'Lecture', + now + timedelta(days=26), now + timedelta(days=26, hours=5), + 'Sibley Auditorium, Bechtel Engineering Center', 'Bechtel Center', + 'Berkeley Sustainability Office', False, 'Free', + 'A full-day summit showcasing Berkeley\'s research and campus initiatives on climate change, from carbon-neutral operations to breakthrough clean energy research.'), + ('Health Professional School Fair', 'Career', + now + timedelta(days=28), now + timedelta(days=28, hours=4), + 'Pauley Ballroom, MLK Student Union', 'MLK Student Union', + 'Health Professions Program', False, 'Free', + 'Representatives from medical, dental, veterinary, pharmacy, public health, and nursing schools provide information about professional health programs. MCAT, GRE, and application advice available.'), + ('Spring Track and Field Invitational', 'Sports', + now + timedelta(days=32), now + timedelta(days=32, hours=6), + 'Edwards Stadium', 'Edwards Stadium', + 'Cal Athletics', False, '$10', + 'The annual Berkeley Spring Invitational track and field meet welcomes competitors from 20 universities. Events include sprints, distance running, field events, and relays.'), + ('Architecture Design Studio Exhibition', 'Arts', + now + timedelta(days=37), now + timedelta(days=37, hours=4), + '112 Wurster Hall', 'Wurster Hall', + 'Department of Architecture', False, 'Free', + 'The Spring semester design studio exhibition features work by undergraduate and graduate architecture students on themes of urban resilience, housing equity, and climate adaptation.'), + ('Berkeley Philosophy Department Colloquium', 'Lecture', + now + timedelta(days=42), now + timedelta(days=42, hours=1, minutes=30), + '234 Moses Hall', 'Moses Hall', + 'Department of Philosophy', False, 'Free', + 'A leading philosopher discusses the implications of large language model capabilities for philosophy of language, mind, and the nature of understanding.'), + ('Cal Day 2026: Open Campus Celebration', 'Social', + now + timedelta(days=55), now + timedelta(days=55, hours=7), + 'Main Campus', 'Main Campus', + 'Office of Undergraduate Admissions', False, 'Free', + 'Cal Day is UC Berkeley\'s annual open campus celebration welcoming prospective students, families, alumni, and community members. Over 400 events across all departments and student organizations.'), + ('Law and Technology Symposium', 'Lecture', + now + timedelta(days=48), now + timedelta(days=48, hours=6), + '295 Simon Hall', 'Simon Hall', + 'Berkeley Law', True, 'Free', + 'Law students, faculty, and tech industry leaders discuss emerging legal questions in AI liability, data privacy, platform regulation, and cybersecurity.'), + # Past events that weren't already covered + ('Berkeley Campus Cleanup Day', 'Social', + now - timedelta(days=10), now - timedelta(days=10, hours=2), + 'Various Campus Locations', 'Main Campus', + 'Student Environmental Resource Center', False, 'Free', + '300 student volunteers participated in a campus-wide cleanup event, collecting over 400 pounds of litter and planting 120 native plants in the Strawberry Creek riparian zone.'), + ('Berkeley Symphony: Winter Concert', 'Arts', + now - timedelta(days=25), now - timedelta(days=25, hours=2), + 'Hertz Hall', 'Hertz Hall', + 'Department of Music', False, '$20', + 'The Berkeley Symphony Orchestra performed a program of Brahms, Bartók, and a world premiere by Berkeley composition faculty.'), + ('International Development Research Workshop', 'Lecture', + now - timedelta(days=50), now - timedelta(days=50, hours=3), + '107 Giannini Hall', 'Giannini Hall', + 'CEGA and ARE Department', False, 'Free', + 'Researchers presented findings from randomized controlled trials on agricultural extension, conditional cash transfers, and educational interventions in Sub-Saharan Africa and South Asia.'), + ('Engineering Innovation Design Challenge Finals', 'Career', + now - timedelta(days=65), now - timedelta(days=65, hours=3), + '310 Sutardja Dai Hall', 'Sutardja Dai Hall', + 'College of Engineering', False, 'Free', + 'Teams of Berkeley engineering students presented design solutions to real-world challenges in healthcare, infrastructure, and clean energy, judged by a panel of industry experts and faculty.'), + ('Multicultural Student Leadership Conference', 'Social', + now - timedelta(days=75), now - timedelta(days=75, hours=5), + 'MLK Student Union', 'MLK Student Union', + 'Cross-Cultural Center', False, 'Free', + 'Annual conference bringing together student leaders from Berkeley\'s diverse cultural and affinity organizations to share best practices, address common challenges, and build cross-community coalitions.'), + ] + + for (title, category, start_dt, end_dt, location, building, + organizer, reg_req, cost, desc) in extra_events: + e = Event( + title=title, category=category, + start_datetime=start_dt, end_datetime=end_dt, + location=location, building=building, + organizer=organizer, registration_required=reg_req, + cost=cost, description=desc + ) + db.session.add(e) + + db.session.flush() + + # ── Additional news bulk fill ───────────────────────────────────────────── + bulk_news = [ + ('Berkeley Researchers Develop Faster COVID Test Using CRISPR', 'Research', + datetime(2023, 3, 10), False, + 'A rapid COVID diagnostic leveraging CRISPR-based detection achieves 98% sensitivity in under 15 minutes without laboratory equipment.', + 'Prof. Jennifer Doudna and collaborators adapted CRISPR-based diagnostics to detect SARS-CoV-2 RNA in saliva samples with high accuracy, enabling rapid decentralized testing.', + 'COVID,CRISPR,diagnostics,research,health'), + ('Berkeley Economist Wins John Bates Clark Medal', 'Faculty', + datetime(2023, 4, 20), False, + 'Assistant Professor Maya Patel has been awarded the John Bates Clark Medal, presented annually to the most promising American economist under 40.', + 'Prof. Patel\'s research on the labor market effects of immigration and the economic mobility of second-generation immigrants has reshaped the field of labor economics.', + 'economics,award,faculty,medal,labor'), + ('Cal Wins Pac-12 Swimming and Diving Championship', 'Athletics', + datetime(2023, 5, 2), False, + 'The UC Berkeley swimming and diving teams swept the Pac-12 Championships, with both the men\'s and women\'s programs claiming conference titles.', + 'Led by national record holders in the 200 butterfly and 400 medley relay, the Bears dominated the three-day meet, scoring 1,400 total points.', + 'swimming,athletics,Pac-12,championship,Cal Bears'), + ('Berkeley\'s Largest Fundraising Campaign Exceeds $6 Billion Goal', 'Campus Life', + datetime(2023, 5, 15), True, + 'The Light the Way campaign — Berkeley\'s largest-ever comprehensive fundraising effort — has surpassed its $6 billion goal, raising $6.4 billion from 260,000 donors.', + 'Funds will support 1,000 new endowed scholarships, 50 additional endowed chairs, four new research institutes, and $600 million in capital improvements. The campaign was launched in 2020.', + 'fundraising,campaign,donors,scholarships,capital'), + ('Berkeley Launches Center for the Future of Work', 'Research', + datetime(2023, 6, 1), False, + 'A new interdisciplinary research center at Berkeley will study how automation, AI, and remote work are transforming labor markets and workforce development.', + 'The Center brings together economists, sociologists, engineers, and policy scholars to study AI\'s effects on employment, wages, and skill requirements across industries.', + 'work,AI,labor,economics,research'), + ('Berkeley Athletics Achieves Highest Academic Performance Rating', 'Athletics', + datetime(2023, 7, 10), False, + 'UC Berkeley student-athletes achieved an Academic Performance Rating of 999 out of 1000, the highest possible score, for the third consecutive year.', + 'All 30 varsity sports teams met or exceeded the NCAA\'s standard for academic progress. The graduation success rate for Berkeley student-athletes is 92%, 17 points above the national average.', + 'athletics,academics,APR,graduation,Cal Bears'), + ('Berkeley Botanist Discovers New Species in Amazon Rainforest', 'Science', + datetime(2023, 8, 5), False, + 'A Berkeley botanist has identified three previously unknown plant species in the Colombian Amazon, underscoring the continued importance of field taxonomy.', + 'The species, discovered during a 2022 field expedition, belong to the genus Mikania and represent distinct evolutionary lineages. They were confirmed using molecular phylogenetics and morphological analysis.', + 'botany,Amazon,rainforest,discovery,science'), + ('Berkeley Computer Scientists Invent New Programming Language for AI Safety', 'Research', + datetime(2023, 9, 18), False, + 'A team from Berkeley\'s EECS department has developed a new formal programming language designed to specify and verify the behavior of machine learning models.', + 'The language, called SafeSpec, allows developers to write formal specifications of desired AI behavior and automatically verify whether a model satisfies those properties. The work was presented at PLDI 2023.', + 'AI safety,programming,EECS,research,verification'), + ('Berkeley Opens New Student Wellness Center', 'Campus Life', + datetime(2023, 10, 2), False, + 'A state-of-the-art student wellness center has opened at Berkeley, offering mental health counseling, nutrition consultation, and fitness programming under one roof.', + 'The $45 million Tang Center expansion includes 30 new counseling offices, a meditation suite, a nutrition clinic, and a recovery support room. The project was funded by student fees approved in a 2019 referendum.', + 'wellness,mental health,student,campus,health'), + ('Berkeley Joins DOE National Laboratory Partnership for Clean Energy', 'Research', + datetime(2023, 10, 20), False, + 'The Department of Energy has awarded UC Berkeley and Lawrence Berkeley National Laboratory a joint center to accelerate next-generation battery technology.', + 'The Joint Center for Energy Storage Research II will develop solid-state batteries and sodium-ion batteries for grid storage and electric vehicles, with $100 million in federal funding over five years.', + 'energy,batteries,DOE,research,clean energy'), + ('Berkeley Hosts First International Symposium on Quantum Biology', 'Science', + datetime(2023, 11, 5), False, + 'Researchers from 20 countries gathered at Berkeley for the first international symposium on quantum biology, exploring whether quantum effects play functional roles in living systems.', + 'Topics ranged from quantum coherence in photosynthesis to possible quantum effects in bird navigation and enzyme catalysis. Berkeley\'s interdisciplinary approach to the field attracted top researchers from physics, chemistry, and biology.', + 'quantum biology,symposium,science,interdisciplinary,research'), + ('Berkeley Students Launch Environmental Monitoring Network Across Bay Area', 'Student', + datetime(2023, 11, 22), False, + 'Engineering and data science students have deployed a network of 200 low-cost air quality sensors across the Bay Area, creating the most granular air pollution map in the region\'s history.', + 'The PurpleAir-compatible sensors measure fine particulate matter, ozone, and nitrogen dioxide at street-level resolution. Data is freely available through an open API and has been used by public health agencies.', + 'environment,sensors,student,Bay Area,air quality'), + ('Berkeley Law Review Publishes Landmark Issue on AI Governance', 'Faculty', + datetime(2023, 12, 5), False, + 'The California Law Review\'s special issue on artificial intelligence governance brings together 12 articles by Berkeley Law faculty on regulatory frameworks for AI systems.', + 'Topics covered include product liability for AI errors, algorithmic discrimination under civil rights law, AI and due process in criminal justice, and comparative international AI governance approaches.', + 'law,AI,governance,faculty,publication'), + ('Berkeley Student Wins International Math Olympiad Gold', 'Student', + datetime(2024, 1, 15), False, + 'A UC Berkeley freshman who competed for the US team in high school has won gold at the International Mathematical Olympiad, the most prestigious competition in mathematics.', + 'Min-Ji Park, an 18-year-old freshman from Houston, solved all six problems correctly — the first perfect score by a US competitor in a decade. Park plans to pursue a PhD in pure mathematics at Berkeley.', + 'student,mathematics,Olympiad,award,international'), + ('Berkeley Researchers Reduce Solar Panel Cost by 40 Percent', 'Research', + datetime(2024, 2, 8), False, + 'A Berkeley-led team has developed a new perovskite solar cell manufacturing process that reduces production costs by 40% while maintaining efficiency above 30%.', + 'The process uses abundant, non-toxic materials and can be manufactured using modified existing semiconductor equipment. The team is partnering with three solar companies to scale the technology.', + 'solar,clean energy,materials science,research,manufacturing'), + ('Berkeley Anthropologist Discovers 4000-Year-Old Urban Planning System', 'Science', + datetime(2024, 3, 1), False, + 'Archaeological excavations led by a Berkeley professor in the Jordan Valley have uncovered evidence of sophisticated urban planning practices dating to 2000 BCE.', + 'The site includes evidence of centralized water management, standardized building codes, and planned street grids, suggesting advanced administrative infrastructure 2,000 years earlier than previously known in the region.', + 'archaeology,history,science,Jordan,urban planning'), + ('Berkeley Public Policy School Releases Annual California Poverty Report', 'Research', + datetime(2024, 3, 20), False, + 'The annual California Poverty Measure report from the Goldman School shows that 15.3% of Californians live in poverty when accounting for cost of living and government programs.', + 'The report finds that the Earned Income Tax Credit and Medi-Cal are the most effective anti-poverty programs in California, each lifting more than 400,000 people above the poverty line.', + 'poverty,policy,California,research,Goldman School'), + ('Berkeley Engineering Named Top Program for Women by US News', 'Faculty', + datetime(2024, 4, 5), False, + 'US News and World Report has ranked Berkeley Engineering the #1 public engineering program for women, citing high enrollment rates, support programs, and faculty representation.', + 'The ranking reflects Berkeley\'s sustained efforts through programs like the Women in Engineering community, the EECS mentorship program, and targeted scholarship funding that have raised women\'s enrollment from 28% to 46% over ten years.', + 'engineering,women,ranking,diversity,faculty'), + ('Cal Band Celebrates 150th Anniversary', 'Campus Life', + datetime(2024, 4, 22), False, + 'The UC Berkeley Marching Band, the oldest intercollegiate band on the West Coast, celebrated its 150th anniversary with a special halftime show at Memorial Stadium.', + 'The Cal Band was founded in 1873 and has performed at every Cal home football game since. The anniversary show featured 350 band members and alumni spanning six decades.', + 'Cal Band,music,anniversary,campus,tradition'), + ('Berkeley Neuroscience Center Awarded $25M to Study Brain Aging', 'Research', + datetime(2024, 5, 10), True, + 'The National Institute on Aging has awarded Berkeley\'s Neuroscience Institute $25 million to establish a Center for Research on the Aging Brain.', + 'The center will use multi-modal neuroimaging, single-cell genomics, and longitudinal behavioral studies to identify the earliest biomarkers of neurodegeneration and test interventions to delay cognitive decline.', + 'neuroscience,aging,NIH,research,brain'), + ('Berkeley Hosts Governor\'s Summit on Technology and Education', 'Campus Life', + datetime(2024, 6, 15), False, + 'UC Berkeley hosted California Governor Newsom\'s Technology and Education Summit, bringing together 300 educational leaders, technology executives, and policymakers.', + 'Summit panels addressed AI in K-12 classrooms, university research-to-industry transfer, workforce training for the AI economy, and digital equity gaps in California schools.', + 'education,technology,policy,California,summit'), + ('Berkeley Sociology Department Receives Diversity in Research Award', 'Faculty', + datetime(2024, 7, 5), False, + 'The American Sociological Association has honored Berkeley\'s Sociology Department with its Award for Excellence in Diversity Research for sustained contributions to understanding racial inequality.', + 'The award recognizes research by Berkeley sociologists on residential segregation, incarceration rates, immigrant integration, and educational opportunity gaps spanning more than three decades.', + 'sociology,diversity,research,award,inequality'), + ('Berkeley Students Create Hackable Open-Source Prosthetic', 'Student', + datetime(2024, 8, 12), False, + 'A Berkeley bioengineering team has released an open-source, 3D-printable prosthetic hand that can be fabricated for under $200 and is fully programmable.', + 'The OpenLimb platform uses machine learning to interpret muscle signals and translate them into hand movements. The hardware files and software are freely available on GitHub and have been downloaded 45,000 times.', + 'bioengineering,prosthetics,open source,student,innovation'), + ('Berkeley Researchers Track 100 Years of Bay Area Climate Change', 'Research', + datetime(2024, 9, 3), False, + 'A century-long dataset assembled by Berkeley researchers reveals that average temperatures in the Bay Area have risen 2.1 degrees Fahrenheit since 1924, with accelerating warming since 1980.', + 'The analysis combines weather station records, tree ring data, and historical newspaper accounts to reconstruct Bay Area climate history. The findings have implications for wildfire risk, water supply, and biodiversity.', + 'climate change,Bay Area,research,temperature,history'), + ('Berkeley Lab and Cal Partnership Produces Record 50 Joint Discoveries', 'Research', + datetime(2024, 10, 1), False, + 'The Berkeley-Lawrence Berkeley National Lab collaboration produced 50 peer-reviewed scientific discoveries in fiscal year 2024, a record for the partnership.', + 'Joint discoveries spanned particle physics, battery technology, materials science, computational biology, and environmental chemistry. Forty-three Berkeley faculty members are affiliated with the lab.', + 'research,Lawrence Berkeley,partnership,discovery,science'), + ('Berkeley Launches New Program in Computational Biology', 'Campus Life', + datetime(2024, 10, 25), False, + 'Berkeley has launched a new undergraduate minor in computational biology, combining coursework in bioinformatics, statistics, machine learning, and molecular biology.', + 'The minor draws on faculty from EECS, MCB, Integrative Biology, and Public Health. It prepares students for research in genomics, systems biology, and precision medicine.', + 'computational biology,minor,EECS,curriculum,bioinformatics'), + ('Berkeley Hosts National Conference on Criminal Justice Reform', 'Research', + datetime(2024, 11, 8), False, + 'The Berkeley School of Law and Goldman School of Public Policy co-hosted a two-day national conference on evidence-based criminal justice reform, attended by 500 scholars and advocates.', + 'Conference panels addressed pretrial detention, sentencing disparities, reentry programs, police reform, and the use of algorithms in criminal justice decision-making.', + 'law,criminal justice,policy,conference,reform'), + ('Berkeley Water Center Secures Major Grant for Drought Research', 'Research', + datetime(2024, 12, 10), False, + 'The Berkeley Water Center has received a $15 million grant from the State of California to develop decision-support tools for drought management in the San Joaquin Valley.', + 'Researchers will model crop water demand, aquifer depletion, and economic impacts of water allocation decisions to help state regulators and farmers navigate increasingly severe droughts.', + 'water,drought,research,California,agriculture'), + ('Berkeley Students Publish Op-Eds in Major National Newspapers', 'Student', + datetime(2025, 1, 5), False, + 'Berkeley undergraduate students in the journalism and political science programs have published op-eds in the New York Times, Washington Post, and San Francisco Chronicle this academic year.', + 'Twelve Berkeley students published professional opinion pieces on topics including climate policy, housing affordability, AI regulation, and immigration reform — many in collaboration with Berkeley faculty.', + 'student,journalism,writing,op-ed,publication'), + ('Berkeley Joins International Campaign to Protect Biodiversity', 'Research', + datetime(2025, 1, 28), False, + 'UC Berkeley has joined a coalition of 100 universities pledging to contribute research, data, and student engagement to help achieve the 30x30 global biodiversity conservation target.', + 'Berkeley will contribute expertise in conservation ecology, sustainable agriculture, freshwater science, and biodiversity informatics. The pledge includes a commitment to protect 30% of university-owned lands.', + 'biodiversity,conservation,research,international,ecology'), + ('Berkeley Researchers Map Underwater Landslide Risk Along California Coast', 'Science', + datetime(2025, 2, 5), False, + 'A Berkeley team using submarine sonar mapping has identified 47 previously uncharted submarine landslide zones along the California coast that could generate tsunamis.', + 'The hazard assessment combines high-resolution bathymetric mapping with sediment core analysis and seismic records. Results are being integrated into California\'s coastal hazard plans.', + 'geology,tsunami,California,science,marine'), + ('Berkeley Graduate Students Launch Peer Tutoring App Serving 5000 Students', 'Student', + datetime(2025, 3, 8), False, + 'A tutoring platform created by Berkeley CS graduate students has grown to serve 5,000 students across the UC system, providing free peer tutoring in STEM subjects.', + 'The app matches students needing help with advanced undergraduates and graduate students who earn course credit for tutoring. Pass rates in introductory calculus and chemistry have improved 15% at campuses using the platform.', + 'student,tutoring,education,technology,STEM'), + ('Berkeley Receives Largest Federal Grant in School of Education History', 'Faculty', + datetime(2025, 3, 22), False, + 'The US Department of Education has awarded the Graduate School of Education a $40 million grant to research effective interventions for chronically absent students.', + 'The five-year project will track 50,000 students across California districts to identify the causes of chronic absenteeism and evaluate evidence-based attendance interventions from texts and calls to mentorship programs.', + 'education,research,federal,grant,attendance'), + ('Berkeley Biologists Use AI to Catalog 10,000 New Insect Species', 'Science', + datetime(2024, 1, 12), False, + 'A Berkeley entomology team has used computer vision and machine learning to catalog 10,000 previously unidentified insect specimens in the California Academy of Sciences collection.', + 'The AI pipeline analyzes microscope images of insect morphology to identify species boundaries, dramatically speeding up the centuries-old task of species description. The method has been shared openly for use by natural history museums worldwide.', + 'entomology,AI,science,biodiversity,species'), + ('Berkeley Physics Department Celebrates 100 Years of Nobel Prizes', 'Faculty', + datetime(2024, 2, 14), False, + 'The Berkeley Physics Department celebrated the centennial of its first Nobel Prize with a symposium bringing together Nobel Laureates, alumni, and current students.', + 'The department has produced 35 Nobel Laureates over 100 years, more than any other physics department in the world. The symposium featured talks by six current faculty Nobel Laureates.', + 'physics,Nobel,centennial,faculty,history'), + ('Berkeley Music Department Launches Archive of Bay Area Jazz History', 'Arts', + datetime(2023, 11, 30), False, + 'The Berkeley Music Department has digitized and made freely available 5,000 recordings of Bay Area jazz performances from 1940 to 1990.', + 'The collection includes performances by Chet Baker, Dave Brubeck, Thelonious Monk, and dozens of local Bay Area artists. The archive includes interview transcripts, photographs, and venue records.', + 'music,jazz,archive,Bay Area,arts'), + ('Berkeley Theater Program Wins Pulitzer for Student-Written Play', 'Arts', + datetime(2024, 4, 15), False, + 'A play written by Berkeley MFA theater student Maya Okonkwo has won the Pulitzer Prize for Drama, the first student-written play to win the award.', + 'The play, "What the River Remembers," explores three generations of a Nigerian American family navigating identity, belonging, and grief. It was developed in Berkeley\'s MFA playwriting workshop and performed at Berkeley Repertory Theatre.', + 'theater,Pulitzer,arts,student,MFA'), + ('Berkeley Announces New Merit Scholarship for First-Generation Students', 'Campus Life', + datetime(2024, 3, 12), False, + 'UC Berkeley has launched the Berkeley Excellence Award, a new merit scholarship that provides $20,000 per year to 100 first-generation college students from California.', + 'The scholarship is funded by a $100 million endowment gift and prioritizes students who demonstrate both academic excellence and economic need. Recipients receive academic mentorship and research opportunities.', + 'scholarship,first-generation,student,financial aid,excellence'), + ('Berkeley Engineering Grads Win 40% of Silicon Valley Engineering Manager Jobs', 'Research', + datetime(2023, 9, 5), False, + 'A Stanford Research Institute analysis finds that 40% of engineering manager positions at Silicon Valley\'s 50 largest companies are held by UC Berkeley alumni.', + 'The analysis tracked 25,000 engineering leaders and found Berkeley graduates dominate at Google, Apple, Meta, Netflix, and dozens of Bay Area technology companies, particularly in chip design, AI, and infrastructure.', + 'alumni,engineering,Silicon Valley,career,research'), + ('Berkeley Designs Earthquake-Resistant Housing for Developing World', 'Research', + datetime(2023, 10, 15), False, + 'A Berkeley engineering and architecture team has developed low-cost earthquake-resistant building techniques suitable for rural communities in seismically active developing nations.', + 'The techniques use locally available bamboo, rammed earth, and recycled materials reinforced with steel wire mesh to create structures that can withstand magnitude 7 earthquakes. Pilot projects are underway in Nepal and Peru.', + 'earthquake engineering,housing,developing world,research,architecture'), + ] + + # More bulk news to reach 120+ total + bulk_news += [ + ('Berkeley Study: Remote Work Increases Carbon Footprint for Many Workers', 'Research', + datetime(2023, 2, 14), False, + 'A Berkeley study challenges the assumption that remote work always reduces carbon emissions, finding that long-distance commuters who moved farther from the office produce more emissions overall.', + 'The study tracked 2,500 Bay Area workers over two years and found that 40% of remote workers moved more than 30 miles from the office, significantly increasing car travel and home energy use compared to their pre-pandemic patterns.', + 'remote work,carbon,emissions,research,environment'), + ('Berkeley Sociologists Find Social Media Algorithms Amplify Outrage', 'Research', + datetime(2023, 3, 22), False, + 'A Berkeley study of 10 million social media posts finds that content algorithms systematically amplify outraged and morally charged content, contributing to political polarization.', + 'The research analyzed content reach on three major platforms and found that high-outrage posts received 3.5x more algorithmic promotion than neutral equivalents, regardless of accuracy. The paper recommends regulatory interventions on algorithmic amplification.', + 'social media,algorithms,research,politics,polarization'), + ('Berkeley Art Museum Acquires Largest Collection of Bay Area Photography', 'Arts', + datetime(2023, 4, 8), False, + 'BAMPFA has acquired a 12,000-photograph archive documenting Bay Area life from 1960 to 2000, including works by Dorothea Lange, Imogen Cunningham, and dozens of lesser-known community photographers.', + 'The collection, donated by a private collector, spans the civil rights movement, the rise of the counterculture, the AIDS crisis, and the early years of the tech industry. It will form the core of a new center for Bay Area photography.', + 'art,photography,BAMPFA,Bay Area,archive'), + ('Berkeley Research Sheds Light on Why Vaccines Work Better for Some People', 'Science', + datetime(2023, 5, 30), False, + 'A large Berkeley immunology study has identified genetic and microbiome factors that explain why some people mount stronger immune responses to vaccines than others.', + 'The three-year study enrolled 3,000 participants and found that gut microbiome composition at the time of vaccination accounts for up to 30% of the variation in antibody response. The findings could enable targeted prebiotics to improve vaccine efficacy.', + 'vaccines,immunology,microbiome,science,health'), + ('Berkeley Researchers Create World\'s Smallest Radio Transmitter', 'Science', + datetime(2023, 6, 18), False, + 'Berkeley engineers have built a radio transmitter the size of a grain of sand that can be implanted in living tissue, enabling a new class of wireless biomedical implants.', + 'The device uses piezoelectric ultrasound for power transfer and radiofrequency for data transmission, consuming only 6 microwatts. The technology could enable implantable sensors for continuous monitoring of glucose, oxygen, and neural signals.', + 'engineering,biomedical,implant,wireless,science'), + ('Berkeley Hosts First AI and Art Exhibition', 'Arts', + datetime(2023, 7, 25), False, + 'BAMPFA hosted "Emergent Minds," the first major museum exhibition at Berkeley dedicated to AI-generated and AI-collaborative art, attracting 20,000 visitors.', + 'The exhibition featured works by 30 artists who used generative AI tools, diffusion models, and neural networks as creative collaborators. Accompanying programming included panels on machine creativity, authorship, and the future of visual art.', + 'AI,art,exhibition,BAMPFA,technology'), + ('Berkeley Engineers Create Biodegradable Electronics for Medical Use', 'Research', + datetime(2023, 8, 28), False, + 'Berkeley bioengineers have developed electronics that dissolve harmlessly in the body after completing their function, enabling temporary implants that don\'t require surgical removal.', + 'The devices are made from magnesium and silk fibroin, materials that hydrolyze at predictable rates. Prototype pressure sensors and drug delivery systems have been demonstrated in animal models.', + 'engineering,biomedical,biodegradable,research,electronics'), + ('Berkeley Wins National Collegiate Debate Championship', 'Student', + datetime(2023, 9, 28), False, + 'The UC Berkeley Debate Team has won the National Debate Tournament for the third time in five years, defeating Harvard in the final round on a resolution about AI governance.', + 'The winning team argued that autonomous AI systems causing harm should face strict liability under existing product liability law. The Berkeley Debate team is coached by three alumni of the national championship team.', + 'debate,student,competition,championship,AI'), + ('Berkeley Researchers Find Link Between Light Exposure and Depression', 'Science', + datetime(2023, 10, 31), False, + 'A Berkeley study tracking 85,000 participants for two years finds that exposure to bright light at night significantly increases the risk of depression, anxiety, and mood disorders.', + 'Participants using light-blocking glasses or apps that reduce blue light after sunset showed 30% lower depression rates. The findings support recommendations to limit artificial light exposure in the hours before sleep.', + 'light,depression,health,science,mental health'), + ('Berkeley Law Clinic Secures Housing for 500 Families Facing Eviction', 'Faculty', + datetime(2023, 11, 14), False, + 'The Berkeley Law Housing Clinic has negotiated settlements keeping 500 low-income Bay Area families in their homes this year, a record for the program.', + 'Second- and third-year law students, supervised by clinical faculty, represent tenants in eviction proceedings across Alameda and Contra Costa counties. The clinic also provides training in tenant rights to community organizations.', + 'law,housing,clinic,faculty,equity'), + ('Berkeley Receives NSF Grant to Improve Broadband Access in Rural California', 'Research', + datetime(2023, 12, 18), False, + 'A Berkeley Engineering team has received $8 million from the National Science Foundation to develop low-cost wireless broadband systems for rural and tribal communities in California.', + 'The project combines TV white space spectrum, satellite backhaul, and mesh networking to deliver affordable internet to communities underserved by commercial providers. Field trials will begin in Humboldt County.', + 'broadband,rural,research,engineering,NSF'), + ('Berkeley Astronomer Detects Oldest Known Galaxy', 'Science', + datetime(2024, 1, 30), True, + 'A UC Berkeley astronomer using the James Webb Space Telescope has identified a galaxy dating to just 290 million years after the Big Bang, the oldest galaxy ever observed.', + 'The galaxy, designated JADES-GS+53.16+53.19+54.21, was detected in deep field imaging and confirmed spectroscopically. Its age pushes back the formation of large galaxies, challenging current cosmological models.', + 'astronomy,galaxy,JWST,science,cosmology'), + ('Berkeley Students Create App to Reduce Food Waste in Dining Halls', 'Student', + datetime(2024, 2, 22), False, + 'Berkeley undergraduates have developed an app that uses real-time dining hall inventory data to alert users about surplus food, reducing pre-consumer waste by 35% in pilot testing.', + 'The app connects with Berkeley Dining\'s inventory management system to display which items have excess supply and will be discarded at the end of service. Users receive notifications and can pick up surplus items at reduced or no cost.', + 'student,food waste,sustainability,dining,app'), + ('Berkeley Publishes Annual Report on Bay Area Housing Affordability', 'Research', + datetime(2024, 3, 28), False, + 'The annual Terner Center Housing Report from Berkeley finds that median rent in San Francisco has reached $3,800 per month, 40% above pre-pandemic levels.', + 'The report documents how restrictive zoning, long approval timelines, and high construction costs are creating a structural housing shortage in the Bay Area. Policy recommendations include zoning reform, infrastructure investment, and streamlined permitting.', + 'housing,rent,Bay Area,policy,research'), + ('Berkeley Chemistry Develops Room-Temperature Carbon Capture', 'Research', + datetime(2024, 4, 18), True, + 'Berkeley chemists have developed a new material that captures CO2 from ambient air at room temperature with record efficiency, potentially enabling affordable direct air capture.', + 'The material, a new class of porous organic polymer, binds CO2 from dilute atmospheric concentrations with 10x better selectivity than current sorbents. It can be regenerated using mild heating, dramatically reducing energy costs.', + 'climate,CO2,carbon capture,chemistry,research'), + ('Berkeley Graduates Fill Record Number of City Government Positions', 'Research', + datetime(2024, 5, 30), False, + 'A new survey finds that UC Berkeley alumni hold elected or appointed positions in 14 California city governments, the highest number in the university\'s history.', + 'Berkeley alumni serve as mayors, city council members, city attorneys, and planning commissioners across cities including San Francisco, Oakland, Berkeley, San Jose, and Sacramento.', + 'alumni,government,policy,California,leadership'), + ('Berkeley Athletics Opens New Olympic Sports Complex', 'Athletics', + datetime(2024, 6, 28), False, + 'UC Berkeley opened its new $80 million Olympic Sports Complex, providing state-of-the-art facilities for track and field, tennis, swimming, and weight training.', + 'The complex includes an eight-lane outdoor track, 10 outdoor tennis courts, a 50-meter competition pool, and a 20,000-square-foot weight training facility. It will host the 2027 Pac-12 Championships.', + 'athletics,facilities,sports,Cal Bears,complex'), + ('Berkeley Researchers Develop AI to Predict Wildfires Days in Advance', 'Research', + datetime(2024, 7, 15), True, + 'A Berkeley team has developed an AI system that can predict wildfire ignition and spread up to 72 hours in advance with 85% accuracy, using satellite data, weather models, and vegetation maps.', + 'The system integrates remote sensing data, lightning strike records, fuel moisture measurements, and weather forecasts using a recurrent neural network architecture. CalFire has agreed to pilot the system in Sonoma and Napa counties.', + 'wildfire,AI,prediction,research,California'), + ('Berkeley School of Public Health Releases COVID Long-Haul Study', 'Research', + datetime(2024, 8, 2), False, + 'A two-year Berkeley study of 12,000 COVID survivors finds that 22% experience symptoms of Long COVID for more than six months, with fatigue, brain fog, and shortness of breath most common.', + 'The study is one of the largest prospective analyses of Long COVID in the US and identifies risk factors including initial illness severity, pre-existing autoimmune conditions, and inadequate rest during acute infection.', + 'COVID,long COVID,public health,research,epidemiology'), + ('Berkeley Chemistry Team Synthesizes New Cancer Drug Candidate', 'Research', + datetime(2024, 9, 20), False, + 'Berkeley chemists have synthesized a new class of molecules that selectively kills cancer cells by exploiting a metabolic vulnerability present in many solid tumors.', + 'The compounds, called ferroptosis inducers, trigger iron-dependent cell death specifically in cancer cells with high oxidative stress. The lead compound shows efficacy in mouse models of pancreatic and ovarian cancer.', + 'chemistry,cancer,drug discovery,research,medicine'), + ] + + for (title, category, pub_date, featured, summary, content, tags) in bulk_news: + slug_base = slugify(title) + slug = slug_base + counter = 1 + while NewsArticle.query.filter_by(slug=slug).first(): + slug = f"{slug_base}-{counter}" + counter += 1 + article = NewsArticle( + title=title, slug=slug, category=category, + author='Berkeley News Staff', + published_date=pub_date, + content=content, summary=summary, tags=tags, + view_count=150, + featured=featured + ) + db.session.add(article) + + db.session.flush() + + # ── Additional Events Bulk ──────────────────────────────────────────────── + bulk_events = [ + ('Cal Women\'s Volleyball: Home Match vs. UCLA', 'Sports', + now + timedelta(days=2), now + timedelta(days=2, hours=2), + 'Haas Pavilion', 'Haas Pavilion', + 'Cal Athletics', False, '$12', + 'Cal Bears women\'s volleyball hosts the UCLA Bruins in a marquee Pac-12 matchup. Student tickets free with Cal ID.'), + ('Health Sciences Information Fair', 'Career', + now + timedelta(days=3), now + timedelta(days=3, hours=3), + '50 Warren Hall', 'Warren Hall', + 'School of Public Health', False, 'Free', + 'Graduate programs in public health, epidemiology, biostatistics, and environmental health present at an information fair open to undergraduates.'), + ('Berkeley Science Lecture: Origins of Life', 'Lecture', + now + timedelta(days=7), now + timedelta(days=7, hours=1, minutes=30), + '1 Pimentel Hall', 'Pimentel Hall', + 'Interdisciplinary Studies Field Group', False, 'Free', + 'A world-leading origin-of-life researcher discusses current theories and experiments on how chemistry becomes biology.'), + ('Piano Recital: Graduate Showcase', 'Arts', + now + timedelta(days=8), now + timedelta(days=8, hours=2), + 'Hertz Hall', 'Hertz Hall', + 'Department of Music', False, '$10', + 'MFA piano students perform works by Bach, Beethoven, Schubert, and contemporary composers in the Spring Graduate Showcase.'), + ('Berkeley Mental Health Awareness Week Kickoff', 'Health', + now + timedelta(days=10), now + timedelta(days=10, hours=1), + 'Sproul Plaza', 'Sproul Plaza', + 'University Health Services', False, 'Free', + 'Kick off Mental Health Awareness Week with resource tables, peer counselors, and free wellness kits. Learn about Berkeley\'s mental health resources and how to support friends.'), + ('EECS Research Poster Session', 'Lecture', + now + timedelta(days=12), now + timedelta(days=12, hours=3), + '430 Soda Hall', 'Soda Hall', + 'EECS Department', False, 'Free', + 'Graduate students and postdocs in EECS present research posters covering AI, systems, hardware, theory, and more. Industry mentors provide feedback and recruiters scout talent.'), + ('Berkeley Symphony: Spring Concert', 'Arts', + now + timedelta(days=20), now + timedelta(days=20, hours=2), + 'Zellerbach Hall', 'Zellerbach Hall', + 'Department of Music', False, '$25', + 'The Berkeley Symphony performs Mahler\'s Symphony No. 5 and a world premiere by a Berkeley composition faculty member.'), + ('Law School Admitted Students Day', 'Career', + now + timedelta(days=24), now + timedelta(days=24, hours=5), + '295 Simon Hall', 'Simon Hall', + 'Berkeley Law Admissions', False, 'Free', + 'Admitted law students visit campus for class visits, faculty meetings, tour of the law library, student panel, and information about bar preparation and career services.'), + ('Public Health Conference on Climate and Health', 'Health', + now + timedelta(days=29), now + timedelta(days=29, hours=6), + 'Li Ka Shing Center', 'Li Ka Shing Center', + 'School of Public Health', True, 'Free', + 'A one-day conference on the health effects of climate change, featuring presentations on heat wave mortality, wildfire smoke and respiratory disease, water-borne illness, and vector-borne diseases in California.'), + ('Cal Day Science Expo', 'Social', + now + timedelta(days=56), now + timedelta(days=56, hours=5), + 'Life Sciences Building', 'Life Sciences Building', + 'Office of Research', False, 'Free', + 'Berkeley research labs open their doors for Cal Day demonstrations, including chemistry magic shows, robotics demonstrations, biology microscopy, and physics experiments for visitors of all ages.'), + ('Berkeley-Stanford Debate on AI Regulation', 'Lecture', + now + timedelta(days=33), now + timedelta(days=33, hours=2), + '100 Boalt Hall', 'Simon Hall', + 'Berkeley Law and Stanford Law', False, 'Free', + 'Law faculty from Berkeley and Stanford debate competing approaches to AI regulation, from liability frameworks to pre-market approval requirements and international coordination.'), + ('Global Health Case Competition', 'Career', + now + timedelta(days=38), now + timedelta(days=38, hours=4), + '50 Warren Hall', 'Warren Hall', + 'School of Public Health', False, 'Free', + 'Teams of graduate students in public health, policy, and business compete to develop evidence-based solutions to global health challenges. $5,000 in prizes.'), + ('Berkeley Haas Case Competition Finals', 'Career', + now + timedelta(days=43), now + timedelta(days=43, hours=3), + 'Chou Hall, Haas School', 'Haas School', + 'Haas School of Business', False, 'Free', + 'Business school teams from around the world compete in the Berkeley Haas Case Competition, presenting solutions to sustainability and innovation challenges to a panel of executives.'), + ('Virtual Info Session: Berkeley Data Science Master\'s Program', 'Virtual', + now + timedelta(days=14), now + timedelta(days=14, hours=1), + 'Online (Zoom)', 'Virtual', + 'School of Information', True, 'Free', + 'Learn about the Master in Data Science (MIDS) program at Berkeley\'s I School. Hear from current students and faculty, and ask questions about the application process.'), + ('Berkeley Social Sciences Research Conference', 'Lecture', + now + timedelta(days=46), now + timedelta(days=46, hours=5), + '315 Barrows Hall', 'Barrows Hall', + 'Division of Social Sciences', False, 'Free', + 'Annual interdisciplinary research conference bringing together graduate students from economics, sociology, political science, and psychology to present original research.'), + ('Celebration of Excellence: Faculty Awards Ceremony', 'Social', + now + timedelta(days=36), now + timedelta(days=36, hours=2), + 'Faculty Club', 'Faculty Club', + 'Office of the Chancellor', False, 'Free', + 'Annual ceremony recognizing Berkeley faculty who have received major awards, fellowships, and honors over the past academic year.'), + ] + + for (title, category, start_dt, end_dt, location, building, + organizer, reg_req, cost, desc) in bulk_events: + e = Event( + title=title, category=category, + start_datetime=start_dt, end_datetime=end_dt, + location=location, building=building, + organizer=organizer, registration_required=reg_req, + cost=cost, description=desc + ) + db.session.add(e) + + db.session.flush() + + # ── Users ───────────────────────────────────────────────────────────────── + benchmark_users = [ + ('alice', 'alice@berkeley.edu', 'test1234', 'Alice Chen', 'student'), + ('bob', 'bob@berkeley.edu', 'test1234', 'Bob Martinez', 'student'), + ('carol', 'carol@berkeley.edu', 'test1234', 'Carol Johnson', 'faculty'), + ('dave', 'dave@berkeley.edu', 'test1234', 'Dave Williams', 'student'), + ] + + for (username, email, password, full_name, role) in benchmark_users: + if not User.query.filter_by(email=email).first(): + u = User( + email=email, + username=username, + full_name=full_name, + role=role, + ) + u.set_password(password) + db.session.add(u) + + db.session.commit() + + +if __name__ == '__main__': + from app import app + with app.app_context(): + seed() + print("Seeding complete.") diff --git a/sites/berkeley/static/css/.gitkeep b/sites/berkeley/static/css/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sites/berkeley/static/js/.gitkeep b/sites/berkeley/static/js/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/sites/berkeley/tasks.jsonl b/sites/berkeley/tasks.jsonl new file mode 100644 index 0000000..60e21d2 --- /dev/null +++ b/sites/berkeley/tasks.jsonl @@ -0,0 +1,30 @@ +{"web_name": "UC Berkeley", "id": "UC Berkeley--0", "ques": "Find all PhD programs offered at UC Berkeley and count how many there are. List their names.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--1", "ques": "Search for MBA programs at UC Berkeley. Which school offers the MBA and what is the program duration?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--2", "ques": "Find the Computer Science BS program at UC Berkeley. What are the program requirements listed on the program detail page?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--3", "ques": "Browse the news section on the UC Berkeley site and find all articles in the 'Research' category. How many research articles are listed on the first page?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--4", "ques": "Find news articles about CRISPR or gene editing on the Berkeley site. Who is the featured scientist and what award did they receive?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--5", "ques": "Look at the upcoming events at UC Berkeley. Find an event in the 'Career' category and note the date, location, and whether registration is required.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--6", "ques": "Find events categorized as 'Lecture' at UC Berkeley. List at least three lecture events with their dates and locations.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--7", "ques": "Browse the faculty directory at UC Berkeley and find a professor in the EECS department who works on artificial intelligence. What are their specific research interests?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--8", "ques": "Find the faculty profile for Jennifer Doudna at UC Berkeley. What is her title and what is her primary research area?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--9", "ques": "Search for research centers related to 'artificial intelligence' on the Berkeley website. List the names of any AI-related research centers you find.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--10", "ques": "Find the Berkeley Artificial Intelligence Research Lab (BAIR) on the UC Berkeley site. Who is the director and what year was it founded?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--11", "ques": "Go to the Admissions page at UC Berkeley. What is the application deadline for freshman applicants and what is the current acceptance rate?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--12", "ques": "Find all programs offered by the Haas School of Business at UC Berkeley. What degree types are available (e.g., MBA, PhD, etc.)?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--13", "ques": "Browse the Departments page at UC Berkeley and find the Department of Electrical Engineering and Computer Sciences (EECS). Who is the department chair and where is the department located?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--14", "ques": "Find the College of Engineering at UC Berkeley. How many undergraduate students and graduate students are enrolled? Who is the dean?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--15", "ques": "Search for 'climate' on the UC Berkeley website. What types of results appear (programs, news, events, faculty, research)? Name at least one result from each category that appears.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--16", "ques": "Find all online degree programs at UC Berkeley. Which programs offer an online option and what school do they belong to?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--17", "ques": "Look at the About Berkeley page. How many Nobel Laureates are currently on faculty, how many varsity sports does Berkeley have, and how many NCAA national titles has Berkeley won?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--18", "ques": "Find upcoming 'Arts' events at UC Berkeley within the next two months. List the events with their dates, venues, and ticket prices.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--19", "ques": "Navigate to the Berkeley news section and filter by the 'Athletics' category. Find a news article about a Berkeley sports championship and summarize what sport and what the achievement was.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--20", "ques": "Find the JD (Juris Doctor) program at Berkeley Law. What is the program duration, application deadline, and which school offers it?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--21", "ques": "Search for faculty who work on 'quantum computing' at UC Berkeley. List all faculty members who appear in the results and their department affiliations.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--22", "ques": "Go to the College of Letters and Science at UC Berkeley and find all the departments listed under it on the Departments page. How many departments belong to the College of Letters and Science?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--23", "ques": "Find the research center 'Berkeley Institute for Data Science' (BIDS). What are its focus areas and who is the director? Then find if there are any related research centers listed on the same page.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--24", "ques": "Find the Economics PhD program at Berkeley. Then navigate to the Economics department page and identify the department chair and the other programs offered by the department. Finally, find one Economics faculty member and note their research interests.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--25", "ques": "Berkeley holds an annual Spring Career Fair. Find this event, note the date, location, and whether registration is required. Then find two other career-related events and compare their details.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--26", "ques": "Find Berkeley's Nobel Laureate professors. Navigate to the faculty profiles of at least two Nobel Laureates. What prizes did they win and what are their research interests?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--27", "ques": "Search the Berkeley site for 'Master of Engineering'. Find the MEng program, identify which department offers it, and compare it to other master's programs in the same college. How does the duration differ?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--28", "ques": "Find all programs that require GRE scores at UC Berkeley. Navigate to the programs page and identify which programs have 'GRE Required' indicated. What degree types most commonly require GRE?", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} +{"web_name": "UC Berkeley", "id": "UC Berkeley--29", "ques": "Go to the Berkeley homepage and identify the key statistics listed: how many students attend Berkeley (undergrad and grad separately), how many degree programs are offered, and what is Berkeley's ranking as a public research university? Then navigate to the About page and confirm these numbers.", "web": "http://localhost:40015/", "upstream_url": "https://www.berkeley.edu/"} diff --git a/sites/berkeley/templates/404.html b/sites/berkeley/templates/404.html new file mode 100644 index 0000000..7840266 --- /dev/null +++ b/sites/berkeley/templates/404.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}Page Not Found — UC Berkeley{% endblock %} + +{% block content %} +
+
404
+

Page Not Found

+

The page you're looking for doesn't exist or has been moved.

+ +
+{% endblock %} diff --git a/sites/berkeley/templates/500.html b/sites/berkeley/templates/500.html new file mode 100644 index 0000000..9034e74 --- /dev/null +++ b/sites/berkeley/templates/500.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% block title %}Server Error — UC Berkeley{% endblock %} + +{% block content %} +
+
500
+

Something Went Wrong

+

An unexpected error occurred. Please try again later.

+ +
+{% endblock %} diff --git a/sites/berkeley/templates/about.html b/sites/berkeley/templates/about.html new file mode 100644 index 0000000..b4404b0 --- /dev/null +++ b/sites/berkeley/templates/about.html @@ -0,0 +1,106 @@ +{% extends "base.html" %} +{% block title %}About UC Berkeley{% endblock %} + +{% block content %} + + +
+ +
+

"Fiat Lux — Let There Be Light"

+

The University of California, Berkeley is a public research university dedicated to the discovery, communication, and application of knowledge that serves the long-term interests of society. As a leading research university, Berkeley is defined by intellectual rigor, interdisciplinary collaboration, and a deep commitment to the public good.

+
+ + +

Berkeley by the Numbers

+
+
{{ stats.founded }}Year Founded
+
{{ stats.nobel_laureates }}Nobel Laureates on Faculty
+
{{ "{:,}".format(stats.undergrad_count) }}Undergraduate Students
+
{{ "{:,}".format(stats.grad_count) }}Graduate Students
+
{{ "{:,}".format(stats.faculty_count) }}Faculty Members
+
{{ stats.degree_programs }}+Degree Programs
+
{{ stats.varsity_sports }}Varsity Sports
+
{{ stats.national_titles }}NCAA National Titles
+
{{ stats.top_10_programs }}+Top-10 Graduate Programs
+
{{ stats.acres }}Campus Acres
+
{{ stats.libraries }}Library Locations
+
{{ "{:,}".format(stats.alumni) }}+Alumni Worldwide
+
+ + +
+
+

History

+

The University of California was founded on March 23, 1868, with the merger of the private College of California and the public Agricultural, Mining, and Mechanical Arts College. Berkeley's first class of 40 students was admitted in 1869.

+

From its earliest days, Berkeley has been committed to serving the people of California and the world through education, research, and public service. The university helped power California's growth through two world wars, the tech boom, and beyond.

+

Today, Berkeley is recognized as one of the world's leading universities, ranking first among public universities in U.S. News & World Report and consistently appearing among the top universities in global rankings.

+
+
+

Location

+

Berkeley's main campus is located in the city of Berkeley, California, on the eastern shore of San Francisco Bay, with views of the Golden Gate Bridge and the Pacific Ocean.

+

The 1,232-acre campus is a National Historic Landmark and one of the most architecturally distinguished universities in the United States.

+
+ Address:
+ University of California, Berkeley
+ Berkeley, CA 94720
+ United States +
+
+
+ + +
+

Nobel Laureates

+

UC Berkeley faculty, researchers, and alumni have won more than 107 Nobel Prizes. Current faculty Nobel Laureates include pioneers in physics, chemistry, economics, and the biological sciences.

+
+
+
Physics
+
Saul Perlmutter, Reinhard Genzel
+
+
+
Chemistry
+
Jennifer Doudna
+
+
+
Economics
+
George Akerlof (Emeritus)
+
+
+
+ + +

Explore Berkeley

+ +
+{% endblock %} diff --git a/sites/berkeley/templates/academics.html b/sites/berkeley/templates/academics.html new file mode 100644 index 0000000..80e7437 --- /dev/null +++ b/sites/berkeley/templates/academics.html @@ -0,0 +1,69 @@ +{% extends "base.html" %} +{% block title %}Academics — UC Berkeley{% endblock %} + +{% block content %} + + +
+ +
+
{{ colleges|length }}Schools & Colleges
+
{{ total_programs }}+Degree Programs
+
115+Undergraduate Majors
+
{{ total_depts }}+Academic Departments
+
+ +
+

A World-Class Education

+

UC Berkeley offers an unparalleled range of academic programs across its 14 schools and colleges. From the humanities to cutting-edge engineering, from law to optometry, a Berkeley education combines rigorous scholarship with a commitment to the public good.

+ +
+ +

Schools & Colleges

+ +
+ {% for college in colleges %} +
+
+

+ {{ college.name }} +

+

{{ college.description[:180] }}{% if college.description|length > 180 %}...{% endif %}

+
+ {% if college.dean %}
Dean: {{ college.dean }}
{% endif %} +
Founded: {{ college.founded_year }}
+
+ {% if college.undergrad_count > 0 %}{{ "{:,}".format(college.undergrad_count) }} undergrads{% endif %} + {% if college.grad_count > 0 %}{% if college.undergrad_count > 0 %} · {% endif %}{{ "{:,}".format(college.grad_count) }} grad students{% endif %} +
+
+ +
+
+ {% endfor %} +
+ + +
+

Explore Academic Life

+ +
+
+{% endblock %} diff --git a/sites/berkeley/templates/account.html b/sites/berkeley/templates/account.html new file mode 100644 index 0000000..3ac4a9b --- /dev/null +++ b/sites/berkeley/templates/account.html @@ -0,0 +1,81 @@ +{% extends "base.html" %} +{% block title %}My Account — UC Berkeley{% endblock %} + +{% block content %} + + +
+
+ +
+ +
+ + +
+

Saved Bookmarks

+ {% if bookmark_details %} +
+ {% for detail in bookmark_details %} +
+
+
+ {{ detail.bookmark.item_type }} + {{ detail.title }} +
+ {% if detail.bookmark.note %} +

{{ detail.bookmark.note }}

+ {% endif %} +

Saved {{ detail.bookmark.created_at.strftime('%B %d, %Y') }}

+
+
+ + + +
+
+ {% endfor %} +
+ {% else %} +
+

No bookmarks yet

+

Save programs, faculty profiles, events, and research centers by clicking the "Save" button on any page.

+ +
+ {% endif %} +
+
+
+{% endblock %} diff --git a/sites/berkeley/templates/admissions.html b/sites/berkeley/templates/admissions.html new file mode 100644 index 0000000..7b4c0de --- /dev/null +++ b/sites/berkeley/templates/admissions.html @@ -0,0 +1,131 @@ +{% extends "base.html" %} +{% block title %}Admissions — UC Berkeley{% endblock %} + +{% block content %} + + +
+ + + + +
+

Undergraduate Admissions

+
+
+

UC Berkeley welcomes applications from students across the United States and around the world. We are committed to enrolling a diverse, talented class of undergraduate students who will thrive in Berkeley's academically rigorous and intellectually vibrant community.

+

Berkeley admits freshmen on the basis of academic achievement, the strength and breadth of coursework, personal qualities, extracurricular activities, and demonstrated commitment to the Berkeley community.

+

Application Deadlines

+ + + + + +
ProgramDeadline
Freshman ApplicationNovember 30
Transfer ApplicationNovember 30
International FreshmenNovember 30
+
+
+
+ {{ undergrad_programs }} + Undergraduate Programs +
+
+ 31,800 + Undergraduates Enrolled +
+
+ 14.4% + Acceptance Rate +
+
+
+ +

Freshman Profile (Class of 2027)

+
+
+
3.91
+
Median GPA
+
+
+
1510
+
Median SAT
+
+
+
34
+
Median ACT
+
+
+
40%
+
First-Generation Students
+
+
+ +

Required Materials

+
    +
  • UC Application (submitted at apply.universityofcalifornia.edu)
  • +
  • Official high school transcripts
  • +
  • Personal Insight Questions (4 out of 8)
  • +
  • SAT or ACT scores (test-optional for 2026 cycle)
  • +
  • School report and letters of recommendation
  • +
+
+ + +
+

Graduate Admissions

+
+
+

UC Berkeley's Graduate Division coordinates graduate admissions across {{ grad_programs }} graduate programs offered by 14 professional schools and the College of Letters and Science. Each department or program administers its own admissions process.

+

Berkeley PhD students benefit from full funding packages that include tuition, fees, and a stipend in exchange for research and teaching duties.

+

Application Seasons

+ + + + + + + +
Program TypeTypical Deadline
PhD ProgramsDecember 1–15
Master's Programs (Academic)December 1–January 15
Professional Master's ProgramsJanuary 5–March 15
MBA (Haas)January 5 (Round 2)
JD (Law)February 1
+
+
+
+ {{ grad_programs }} + Graduate Programs +
+
+ 12,000 + Graduate Students +
+
+ 50+ + Top-10 Graduate Programs +
+
+
+ +

Browse Graduate Programs

+
+ {% for deg in ['MA', 'MS', 'PhD', 'MPH', 'MBA', 'MEng', 'JD', 'MD'] %} + {{ deg }} Programs + {% endfor %} +
+
+ + +
+

Financial Aid & Scholarships

+

Berkeley is committed to making a world-class education accessible to all qualified students regardless of financial circumstances. Two-thirds of Berkeley undergraduates receive some form of financial aid, and 30% pay no tuition at all thanks to the Blue and Gold Opportunity Plan.

+ +
+
+{% endblock %} diff --git a/sites/berkeley/templates/base.html b/sites/berkeley/templates/base.html new file mode 100644 index 0000000..10b54db --- /dev/null +++ b/sites/berkeley/templates/base.html @@ -0,0 +1,374 @@ + + + + + + {% block title %}UC Berkeley{% endblock %} + + {% block head %}{% endblock %} + + + + +
+
+
+ University of California, Berkeley + Berkeley, CA 94720 +
+
+ {% if current_user.is_authenticated %} + {{ current_user.full_name or current_user.username }} + Sign Out + {% else %} + Sign In + Create Account + {% endif %} +
+
+
+ + +
+ + + +
+ + +{% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} +
+
+ {% for category, message in messages %} +
{{ message }}
+ {% endfor %} +
+
+ {% endif %} +{% endwith %} + + +
+ {% block content %}{% endblock %} +
+ + + + + + diff --git a/sites/berkeley/templates/department_detail.html b/sites/berkeley/templates/department_detail.html new file mode 100644 index 0000000..cf63875 --- /dev/null +++ b/sites/berkeley/templates/department_detail.html @@ -0,0 +1,84 @@ +{% extends "base.html" %} +{% block title %}{{ dept.name }} — UC Berkeley{% endblock %} + +{% block content %} + + + + +
+ +
+{% endblock %} diff --git a/sites/berkeley/templates/departments.html b/sites/berkeley/templates/departments.html new file mode 100644 index 0000000..64c246c --- /dev/null +++ b/sites/berkeley/templates/departments.html @@ -0,0 +1,42 @@ +{% extends "base.html" %} +{% block title %}Departments — UC Berkeley{% endblock %} + +{% block content %} + + +
+ {% for college, depts in depts_by_college.items() %} + {% if depts %} +
+

+ {{ college.name }} +

+
+ {% for dept in depts %} +
+
+

+ {{ dept.name }} +

+

{{ dept.description[:110] }}{% if dept.description|length > 110 %}...{% endif %}

+
+ {% if dept.chair %}
Chair: {{ dept.chair }}
{% endif %} + {% if dept.location %}
📍 {{ dept.location }}
{% endif %} +
+ +
+
+ {% endfor %} +
+
+ {% endif %} + {% endfor %} +
+{% endblock %} diff --git a/sites/berkeley/templates/event_detail.html b/sites/berkeley/templates/event_detail.html new file mode 100644 index 0000000..9dae30a --- /dev/null +++ b/sites/berkeley/templates/event_detail.html @@ -0,0 +1,91 @@ +{% extends "base.html" %} +{% block title %}{{ event.title }} — Berkeley Events{% endblock %} + +{% block content %} + + + + +
+ +
+{% endblock %} diff --git a/sites/berkeley/templates/events.html b/sites/berkeley/templates/events.html new file mode 100644 index 0000000..d322753 --- /dev/null +++ b/sites/berkeley/templates/events.html @@ -0,0 +1,102 @@ +{% extends "base.html" %} +{% block title %}Events — UC Berkeley{% endblock %} + +{% block content %} + + +
+
+
+ + + + + {% if q or current_category %} + Clear + {% endif %} +
+
+ +
+ Upcoming + Today + Past Events + {% for cat in categories %} + {{ cat }} + {% endfor %} +
+ +

+ Showing {{ events|length }} of {{ total }} events +

+ + {% if events %} +
+ {% for event in events %} +
+
+
+
{{ event.start_datetime.strftime('%d') }}
+
{{ event.start_datetime.strftime('%b %Y') }}
+
+ {{ event.category }} +
+
+

+ {{ event.title }} +

+

{{ event.description[:120] }}{% if event.description|length > 120 %}...{% endif %}

+
+
🕐 {{ event.start_datetime.strftime('%I:%M %p') }}
+
📍 {{ event.location }}
+ {% if event.registration_required %}
⚠ Registration Required
{% endif %} +
💳 {{ event.cost }}
+
+
+ Details +
+
+
+ {% endfor %} +
+ + {% if total_pages > 1 %} + + {% endif %} + + {% else %} +
+

No events found.

+ View All Events +
+ {% endif %} +
+{% endblock %} diff --git a/sites/berkeley/templates/faculty.html b/sites/berkeley/templates/faculty.html new file mode 100644 index 0000000..d8ae216 --- /dev/null +++ b/sites/berkeley/templates/faculty.html @@ -0,0 +1,87 @@ +{% extends "base.html" %} +{% block title %}Faculty Directory — UC Berkeley{% endblock %} + +{% block content %} + + +
+
+
+ + + + {% if q or current_dept %} + Clear + {% endif %} +
+
+ +

+ Showing {{ faculty_list|length }} of {{ total }} faculty members + {% if q %} matching "{{ q }}"{% endif %} +

+ + {% if faculty_list %} +
+ {% for member in faculty_list %} +
+
+
+ {{ member.name[0] }} +
+
+
+ {% if member.is_emeritus %} + Emeritus + {% endif %} +

{{ member.name }}

+

{{ member.title }}

+ {% if member.department %} +

{{ member.department.name }}

+ {% endif %} + {% if member.research_interests %} +

{{ member.research_interests[:100] }}{% if member.research_interests|length > 100 %}...{% endif %}

+ {% endif %} + +
+
+ {% endfor %} +
+ + {% if total_pages > 1 %} + + {% endif %} + + {% else %} +
+

No faculty members found.

+ View All Faculty +
+ {% endif %} +
+{% endblock %} diff --git a/sites/berkeley/templates/faculty_profile.html b/sites/berkeley/templates/faculty_profile.html new file mode 100644 index 0000000..64d9fa0 --- /dev/null +++ b/sites/berkeley/templates/faculty_profile.html @@ -0,0 +1,97 @@ +{% extends "base.html" %} +{% block title %}{{ member.name }} — Berkeley Faculty{% endblock %} + +{% block content %} + + + + +
+ +
+{% endblock %} diff --git a/sites/berkeley/templates/index.html b/sites/berkeley/templates/index.html new file mode 100644 index 0000000..0f90e80 --- /dev/null +++ b/sites/berkeley/templates/index.html @@ -0,0 +1,164 @@ +{% extends "base.html" %} +{% block title %}UC Berkeley — The University of California, Berkeley{% endblock %} + +{% block content %} + +
+
+
+
+

Est. 1868 · Berkeley, California

+

Fiat Lux.
Let There Be Light.

+

UC Berkeley is the world's premier public university, where bold ideas, transformative research, and a deep commitment to the public good have shaped the world for over 155 years.

+ +
+
+
+ + +
+
+
+
+
{{ stats.nobel_laureates }}
+
Nobel Laureates on Faculty
+
+
+
#1
+
Public Research University
+
+
+
{{ stats.top_10_programs }}+
+
Top-10 Graduate Programs
+
+
+
{{ stats.degree_programs }}+
+
Degree Programs
+
+
+
{{ stats.national_titles }}
+
NCAA National Titles
+
+
+
+
+ + +
+
+
+

Berkeley News

+ All News → +
+ {% if featured_news %} + +
+
+
+
+
🌎
+
Berkeley News
+
+
+
+ {{ featured_news[0].category }} +

+ {{ featured_news[0].title }} +

+

{{ featured_news[0].summary }}

+
+ By {{ featured_news[0].author }} · {{ featured_news[0].published_date.strftime('%B %d, %Y') }} +
+
+
+
+ +
+ {% for article in featured_news[1:] %} +
+
+ {{ article.category }} +
+
+ {{ article.category }} +

{{ article.title }}

+

{{ article.summary[:120] }}{% if article.summary|length > 120 %}...{% endif %}

+

{{ article.published_date.strftime('%B %d, %Y') }}

+
+
+ {% endfor %} +
+ {% endif %} +
+
+ + +
+
+
+

Upcoming Events

+ All Events → +
+
+ {% for event in upcoming_events %} +
+
+
{{ event.start_datetime.strftime('%d') }}
+
{{ event.start_datetime.strftime('%B %Y') }}
+
+
+ {{ event.category }} +

{{ event.title }}

+

+ 🕐 {{ event.start_datetime.strftime('%I:%M %p') }}
+ 📍 {{ event.location }} +

+
+
+ {% endfor %} +
+
+
+ + +
+
+
+

Research at Berkeley

+ All Research Centers → +
+
+ {% for center in recent_research %} +
+
+

{{ center.name }}

+

{{ center.description[:140] }}{% if center.description|length > 140 %}...{% endif %}

+

Director: {{ center.director }}

+
+
+ {% endfor %} +
+
+
+ + +
+
+

14 Schools & Colleges

+

From humanities to engineering, law to public health — explore Berkeley's diverse academic community.

+
+ {% for college in colleges %} + + {{ college.name }} + + {% endfor %} +
+ +
+
+{% endblock %} diff --git a/sites/berkeley/templates/login.html b/sites/berkeley/templates/login.html new file mode 100644 index 0000000..55771a8 --- /dev/null +++ b/sites/berkeley/templates/login.html @@ -0,0 +1,39 @@ +{% extends "base.html" %} +{% block title %}Sign In — UC Berkeley{% endblock %} + +{% block content %} +
+
+
+
C
+

Sign In to Berkeley

+

Access your bookmarks and personalized content

+
+ +
+
+ {{ form.csrf_token }} +
+ {{ form.email.label }} + {{ form.email(class="form-control", placeholder="your@berkeley.edu") }} + {% if form.email.errors %} +
{{ form.email.errors[0] }}
+ {% endif %} +
+
+ {{ form.password.label }} + {{ form.password(class="form-control", placeholder="Password") }} + {% if form.password.errors %} +
{{ form.password.errors[0] }}
+ {% endif %} +
+ +
+
+ +

+ Don't have an account? Create one +

+
+
+{% endblock %} diff --git a/sites/berkeley/templates/news.html b/sites/berkeley/templates/news.html new file mode 100644 index 0000000..4eca6f8 --- /dev/null +++ b/sites/berkeley/templates/news.html @@ -0,0 +1,103 @@ +{% extends "base.html" %} +{% block title %}Berkeley News{% endblock %} + +{% block content %} + + +
+ +
+
+ + + + + {% if q or current_category or featured %} + Clear + {% endif %} +
+
+ + +
+ All + {% for cat in categories %} + {{ cat }} + {% endfor %} +
+ +

+ Showing {{ articles|length }} of {{ total }} articles + {% if q %} for "{{ q }}"{% endif %} + {% if current_category %} in {{ current_category }}{% endif %} +

+ + {% if articles %} +
+ {% for article in articles %} +
+
+ {{ article.category }} + {% if article.featured %}Featured{% endif %} +
+
+ {{ article.category }} +

{{ article.title }}

+

{{ article.summary[:140] }}{% if article.summary|length > 140 %}...{% endif %}

+

+ By {{ article.author }} · {{ article.published_date.strftime('%B %d, %Y') }} + · {{ article.view_count }} views +

+
+ {% for tag in article.tags.split(',')[:3] %} + {{ tag.strip() }} + {% endfor %} +
+
+
+ {% endfor %} +
+ + + {% if total_pages > 1 %} + + {% endif %} + + {% else %} +
+

No articles found.

+ View All News +
+ {% endif %} +
+{% endblock %} diff --git a/sites/berkeley/templates/news_article.html b/sites/berkeley/templates/news_article.html new file mode 100644 index 0000000..624b0ce --- /dev/null +++ b/sites/berkeley/templates/news_article.html @@ -0,0 +1,113 @@ +{% extends "base.html" %} +{% block title %}{{ article.title }} — Berkeley News{% endblock %} + +{% block content %} + + +
+ +
+{% endblock %} diff --git a/sites/berkeley/templates/program_detail.html b/sites/berkeley/templates/program_detail.html new file mode 100644 index 0000000..8a21c41 --- /dev/null +++ b/sites/berkeley/templates/program_detail.html @@ -0,0 +1,98 @@ +{% extends "base.html" %} +{% block title %}{{ program.name }} ({{ program.degree_type }}) — UC Berkeley{% endblock %} + +{% block content %} + + + + +
+ +
+{% endblock %} diff --git a/sites/berkeley/templates/programs.html b/sites/berkeley/templates/programs.html new file mode 100644 index 0000000..7b9cae5 --- /dev/null +++ b/sites/berkeley/templates/programs.html @@ -0,0 +1,102 @@ +{% extends "base.html" %} +{% block title %}Programs — UC Berkeley{% endblock %} + +{% block content %} + + +
+
+
+ + + + + {% if q or current_college or current_degree %} + Clear + {% endif %} +
+
+ + +
+ Degree: + All + {% for dt in degree_types %} + {{ dt }} + {% endfor %} +
+ +

+ Showing {{ programs|length }} of {{ total }} programs + {% if q %} matching "{{ q }}"{% endif %} +

+ + {% if programs %} +
+ {% for program in programs %} +
+
+
+ {{ program.degree_type }} + {% if program.is_online %}Online{% endif %} +
+

+ {{ program.name }} +

+ {% if program.college %} +

{{ program.college.name }}

+ {% endif %} +

{{ program.description[:130] }}{% if program.description|length > 130 %}...{% endif %}

+
+ {% if program.duration_years > 0 %}{{ program.duration_years|int if program.duration_years == program.duration_years|int else program.duration_years }} years{% endif %} + {% if program.units > 0 %} · {{ program.units }} units{% endif %} + {% if program.gre_required %} · GRE Required{% endif %} +
+ +
+
+ {% endfor %} +
+ + {% if total_pages > 1 %} + + {% endif %} + + {% else %} +
+

No programs found.

+ View All Programs +
+ {% endif %} +
+{% endblock %} diff --git a/sites/berkeley/templates/register.html b/sites/berkeley/templates/register.html new file mode 100644 index 0000000..8ac24a7 --- /dev/null +++ b/sites/berkeley/templates/register.html @@ -0,0 +1,60 @@ +{% extends "base.html" %} +{% block title %}Create Account — UC Berkeley{% endblock %} + +{% block content %} +
+
+
+
C
+

Create Your Account

+

Join the Berkeley community

+
+ +
+
+ {{ form.csrf_token }} +
+ {{ form.username.label }} + {{ form.username(class="form-control", placeholder="Choose a username") }} + {% if form.username.errors %} +
{{ form.username.errors[0] }}
+ {% endif %} +
+
+ {{ form.full_name.label }} + {{ form.full_name(class="form-control", placeholder="Your full name") }} + {% if form.full_name.errors %} +
{{ form.full_name.errors[0] }}
+ {% endif %} +
+
+ {{ form.email.label }} + {{ form.email(class="form-control", placeholder="your@email.com") }} + {% if form.email.errors %} +
{{ form.email.errors[0] }}
+ {% endif %} +
+
+ {{ form.password.label }} + {{ form.password(class="form-control", placeholder="At least 8 characters") }} + {% if form.password.errors %} +
{{ form.password.errors[0] }}
+ {% endif %} +
+
+ {{ form.confirm.label }} + {{ form.confirm(class="form-control", placeholder="Repeat password") }} + {% if form.confirm.errors %} +
{{ form.confirm.errors[0] }}
+ {% endif %} +
+ +
+
+ +

+ Already have an account? Sign in +

+
+
+{% endblock %} diff --git a/sites/berkeley/templates/research.html b/sites/berkeley/templates/research.html new file mode 100644 index 0000000..c2439d8 --- /dev/null +++ b/sites/berkeley/templates/research.html @@ -0,0 +1,72 @@ +{% extends "base.html" %} +{% block title %}Research — UC Berkeley{% endblock %} + +{% block content %} + + +
+ +
+
+

The World's Top Public Research University

+

UC Berkeley is home to more than 200 research institutes, centers, and programs. Our faculty and students conduct groundbreaking research across every discipline, from artificial intelligence to environmental science, from genomics to urban planning.

+

Berkeley researchers have developed the technology behind the internet, discovered fundamental particles, sequenced genomes, and modeled the climate. Every year, Berkeley generates more than $1 billion in research expenditures.

+
+
+
$1B+Annual Research
+
12Nobel Laureates on Faculty
+
200+Research Institutes
+
#1Public Research Uni
+
+
+ +

Research Centers & Institutes

+ +
+ {% for center in centers %} +
+
+

{{ center.name }}

+ {% if center.college %} +

{{ center.college.name }}

+ {% endif %} +

{{ center.description[:160] }}{% if center.description|length > 160 %}...{% endif %}

+
+
Director: {{ center.director }}
+
Founded: {{ center.founded_year }}
+
+ {% for area in center.focus_areas.split(',')[:3] %} + {{ area.strip() }} + {% endfor %} +
+
+ +
+
+ {% endfor %} +
+ + +
+

Research by School

+
+ {% for college in colleges %} + {% set college_centers = centers | selectattr('college_id', 'equalto', college.id) | list %} + {% if college_centers %} +
+

{{ college.name }}

+

{{ college_centers|length }} center{{ 's' if college_centers|length != 1 else '' }}

+
+ {% endif %} + {% endfor %} +
+
+
+{% endblock %} diff --git a/sites/berkeley/templates/research_center.html b/sites/berkeley/templates/research_center.html new file mode 100644 index 0000000..17a8af6 --- /dev/null +++ b/sites/berkeley/templates/research_center.html @@ -0,0 +1,82 @@ +{% extends "base.html" %} +{% block title %}{{ center.name }} — Berkeley Research{% endblock %} + +{% block content %} + + + + +
+ +
+{% endblock %} diff --git a/sites/berkeley/templates/search.html b/sites/berkeley/templates/search.html new file mode 100644 index 0000000..986ce64 --- /dev/null +++ b/sites/berkeley/templates/search.html @@ -0,0 +1,164 @@ +{% extends "base.html" %} +{% block title %}Search{% if q %}: {{ q }}{% endif %} — UC Berkeley{% endblock %} + +{% block content %} + + +
+ +
+
+ + +
+
+ + {% if q %} +

+ Found {{ total }} result{{ 's' if total != 1 else '' }} for "{{ q }}" +

+ + {% if total == 0 %} +
+

No results found for "{{ q }}"

+

Try different keywords, or browse our content directly:

+ +
+ {% else %} + + + {% if results.programs %} +
+

+ 🏫 Degree Programs + {{ results.programs|length }} result{{ 's' if results.programs|length != 1 else '' }} +

+
+ {% for p in results.programs %} +
+
+ {{ p.degree_type }} +

{{ p.name }}

+ {% if p.college %}

{{ p.college.name }}

{% endif %} +
+
+ {% endfor %} +
+ +
+ {% endif %} + + + {% if results.news %} +
+

+ 📰 News Articles + {{ results.news|length }} result{{ 's' if results.news|length != 1 else '' }} +

+
+ {% for article in results.news %} +
+ {{ article.category }} +
+

{{ article.title }}

+

{{ article.published_date.strftime('%B %d, %Y') }} · {{ article.author }}

+
+
+ {% endfor %} +
+ +
+ {% endif %} + + + {% if results.faculty %} +
+

+ 👥 Faculty + {{ results.faculty|length }} result{{ 's' if results.faculty|length != 1 else '' }} +

+
+ {% for member in results.faculty %} +
+
+

{{ member.name }}

+

{{ member.title }}

+ {% if member.department %}

{{ member.department.name }}

{% endif %} +
+
+ {% endfor %} +
+ +
+ {% endif %} + + + {% if results.events %} +
+

+ 📅 Events + {{ results.events|length }} result{{ 's' if results.events|length != 1 else '' }} +

+
+ {% for event in results.events %} +
+
+
{{ event.start_datetime.strftime('%d') }}
+
{{ event.start_datetime.strftime('%b') }}
+
+
+

{{ event.title }}

+

{{ event.location }} · {{ event.category }}

+
+
+ {% endfor %} +
+
+ {% endif %} + + + {% if results.research %} +
+

+ 🔬 Research Centers + {{ results.research|length }} result{{ 's' if results.research|length != 1 else '' }} +

+
+ {% for center in results.research %} +
+
+

{{ center.name }}

+

Director: {{ center.director }}

+
+
+ {% endfor %} +
+
+ {% endif %} + + {% endif %} + {% else %} + +
+

Enter a search term above to find programs, faculty, news, events, and research centers.

+ +
+ {% endif %} +
+{% endblock %} diff --git a/websyn_start.sh b/websyn_start.sh index 72defad..f3757c9 100644 --- a/websyn_start.sh +++ b/websyn_start.sh @@ -5,7 +5,7 @@ set -e SITES=(allrecipes amazon apple arxiv bbc_news booking github google_flights google_map google_search huggingface wolfram_alpha - cambridge_dictionary coursera espn) + cambridge_dictionary coursera espn berkeley) BASE_PORT=40000 PID_DIR=/tmp/websyn_pids mkdir -p "$PID_DIR" @@ -17,7 +17,7 @@ for d in "${SITES[@]}"; do cp -a "/opt/WebSyn/$d/instance_seed" "/opt/WebSyn/$d/instance" done -echo "[WebSyn] Starting 15 sites on ports ${BASE_PORT}-$((BASE_PORT + 14))..." +echo "[WebSyn] Starting 16 sites on ports ${BASE_PORT}-$((BASE_PORT + 15))..." for i in "${!SITES[@]}"; do site="${SITES[$i]}" port=$((BASE_PORT + i)) @@ -51,8 +51,8 @@ except Exception: exit(1) ready=$((ready + 1)) fi done - echo " [${elapsed}/${max_wait}s] ${ready}/15 sites ready" - if [ $ready -eq 15 ]; then + echo " [${elapsed}/${max_wait}s] ${ready}/16 sites ready" + if [ $ready -eq 16 ]; then break fi done