browser-assistant 2.9.17 → 2.9.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ function mountJournalCountdown(signal) {
12
12
  function getCountdownLabel() {
13
13
  const now = Date.now();
14
14
  const path = location.pathname.replace(/\/$/, '');
15
- const aurora = location.origin === 'https://sidus.net';
15
+ const aurora = location.origin === 'https://sidus.net' || location.origin === 'https://www.sidus.net';
16
16
  const visible = timers.filter(timer => timer.deadline > now
17
17
  && (!aurora || (path.startsWith('/modules/reflective-journal/') && timer.path !== path)));
18
18
  if (!visible.length)
@@ -1,6 +1,9 @@
1
1
  function formatJournalTime(seconds) {
2
2
  return `${String(Math.floor(seconds / 60)).padStart(2, '0')}:${String(seconds % 60).padStart(2, '0')}`;
3
3
  }
4
+ function isSidusJournalOrigin(origin) {
5
+ return origin === 'https://sidus.net' || origin === 'https://www.sidus.net';
6
+ }
4
7
  function browserAssistantJournal(global) {
5
8
  'use strict';
6
9
  const keys = ['experience', 'feelings', 'learning', 'application', 'conclusion'];
@@ -111,7 +114,7 @@ function browserAssistantJournal(global) {
111
114
  const api = { validate, metadata, fields, pageText, readField, writeField, remainingSeconds };
112
115
  if (typeof module !== 'undefined')
113
116
  module.exports = api;
114
- if (!global.document || global.location?.origin !== 'https://sidus.net')
117
+ if (!global.document || !isSidusJournalOrigin(global.location?.origin))
115
118
  return;
116
119
  if (!/^\/modules\/reflective-journal\//.test(global.location.pathname))
117
120
  return;
@@ -135,7 +138,7 @@ function browserAssistantJournal(global) {
135
138
  panel.innerHTML = '<strong>Reflective Journal</strong><p data-info></p><p data-countdown></p><textarea aria-label="Your class experience and feelings" placeholder="Your actual class experience / feelings (optional)" rows="3"></textarea><button type="button">Fill &amp; Submit Journal</button><p role="status" aria-live="polite"></p>';
136
139
  document.body.appendChild(panel);
137
140
  const controls = document.createElement('div');
138
- controls.innerHTML = '<label>Subject <select data-subject aria-label="Journal subject"><option value="">Detect from page</option><option>Backend Development Fundamentals</option><option>Computer Organization and Architecture</option><option>Advanced Data Structures</option><option>Linear Algebra Essentials</option><option>Fundamentals of Artificial Intelligence</option></select></label><label>Module / Journal <select data-number aria-label="Journal number"><option value="">Detect from page</option>' + Array.from({ length: 10 }, (_, i) => `<option value="${i + 1}">${i + 1}</option>`).join('') + '</select></label>';
141
+ controls.innerHTML = '<label>Subject <select data-subject aria-label="Journal subject"><option value="">Detect from page</option><option>Backend Development Fundamentals</option><option>Computer Organization and Architecture</option><option>Advanced Data Structures</option><option>Linear Algebra Essentials</option><option>Fundamentals of Artificial Intelligence</option><option>Foundation of Data Science</option></select></label><label>Module / Journal <select data-number aria-label="Journal number"><option value="">Detect from page</option>' + Array.from({ length: 10 }, (_, i) => `<option value="${i + 1}">${i + 1}</option>`).join('') + '</select></label>';
139
142
  panel.insertBefore(controls, panel.querySelector('textarea'));
140
143
  const status = panel.querySelector('[role=status]'), button = panel.querySelector('button');
141
144
  const countdown = panel.querySelector('[data-countdown]');
@@ -590,7 +593,7 @@ function browserAssistantJournal(global) {
590
593
  document.removeEventListener('keydown', shortcutListener, true);
591
594
  }
592
595
  }
593
- if (typeof window !== 'undefined' && location.origin === 'https://sidus.net') {
596
+ if (typeof window !== 'undefined' && isSidusJournalOrigin(location.origin)) {
594
597
  const ongoingJournalStartLink = () => {
595
598
  const links = [...document.querySelectorAll('a[href*="/modules/reflective-journal/"]')].filter(link => [...(link.closest('tr,[role="row"]')?.querySelectorAll('*') || [])].some(node => /^Ongoing$/i.test(node.textContent.trim())) && link.getClientRects().length
596
599
  && new URL(link.href, location.origin).origin === location.origin
@@ -645,7 +648,7 @@ if (typeof window !== 'undefined' && location.origin === 'https://sidus.net') {
645
648
  }
646
649
  }
647
650
  browserAssistantJournal(typeof window === 'undefined' ? globalThis : window);
648
- if (typeof window !== 'undefined' && location.origin === 'https://sidus.net' && !window.BrowserAssistantJournalBoot) {
651
+ if (typeof window !== 'undefined' && isSidusJournalOrigin(location.origin) && !window.BrowserAssistantJournalBoot) {
649
652
  window.BrowserAssistantJournalBoot = true;
650
653
  let lastDeadline;
651
654
  const storage = window.chrome?.storage?.local;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Browser Assistant",
4
- "version": "2.9.17",
4
+ "version": "2.9.19",
5
5
  "description": "Scans webpages for MCQs and coding problems. Powered by Groq (cloud) and Ollama (local fallback).",
6
6
  "permissions": [
7
7
  "activeTab",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-assistant",
3
- "version": "2.9.17",
3
+ "version": "2.9.19",
4
4
  "description": "Chrome extension and local Python backend for exploring webpage questions and coding exercises",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -59,6 +59,23 @@
59
59
  "10": "Singular Value Decomposition and Applications Singular Value Decomposition – need for SVD, definition and properties, computation of SVD, relationship between SVD and matrices, dimensionality reduction, image compression, implementation using NumPy."
60
60
  }
61
61
  },
62
+ "data_science": {
63
+ "name": "Foundation of Data Science",
64
+ "aliases": ["Foundations of Data Science"],
65
+ "source": "Foundation of Data Science_year_2_term_2.pdf",
66
+ "modules": {
67
+ "1": "Basics of Data Science. Introduction to AI, machine learning and data science, data science classification and process, data types, data collection and preprocessing. Lab: NumPy array creation, attributes, data types, indexing and slicing.",
68
+ "2": "Tool Boxes for Data Scientist. Python libraries SciPy, scikit-learn, Matplotlib, Seaborn, PyBrain and Pylearn2. Read, select, filter, manipulate, sort, group, rank and plot data. Normalization. Lab: NumPy operations and mathematical functions, Pandas loading, selecting, filtering, sorting, grouping and aggregation, and basic Matplotlib and Seaborn visualizations.",
69
+ "3": "Data Analysis and Data Analytics. Descriptive analysis of variables, frequency distributions, centrality and dispersion. Correlations for diagnostic analytics. Predictive, prescriptive, exploratory and mechanistic analysis. Lab: dataset preprocessing, feature engineering with Pandas, statistical analysis, performance visualization and an analytics dashboard.",
70
+ "4": "Dimensionality Reduction and Feature Engineering. Principal component analysis (PCA), linear discriminant analysis (LDA), t-SNE and singular value decomposition (SVD). Feature extraction, selection and transformation, and creation of interaction features. Lab: feature selection and engineering, data transformation through melting and cleaning.",
71
+ "5": "Data Models. Regression, classification and clustering. Multiple, ridge and lasso regression, logistic regression and decision trees, and k-means and hierarchical clustering. Lab: dataset merging and comparative and pattern analysis.",
72
+ "6": "Model Evaluation. Evaluation metric types, training versus validation versus testing, regression, classification and clustering metrics, cross-validation, overfitting and underfitting. Lab: descriptive statistics, correlation analysis and exploratory data analysis with Python.",
73
+ "7": "Recommendation Systems. Collaborative filtering, content-based filtering, advanced collaborative filtering techniques, hybrid recommendation systems, evaluation and real-world applications.",
74
+ "8": "Data Visualization. Types of visualizations, basic plotting in Matplotlib, advanced Seaborn visualizations, interactive visualization, exploratory data analysis visualizations and geospatial data. Lab: time series visualization, return analysis and volume analysis.",
75
+ "9": "Advanced Data Visualization Techniques. 3D plotting, complex subplot layouts, facet grids, heatmaps with hierarchical clustering, interactive Plotly dashboards, visualization for big data, and an introduction to Tableau and Power BI. Lab: scikit-learn evaluation metrics, cross-validation experiments and a collaborative-filtering movie recommendation system.",
76
+ "10": "Ethics and Data Science. Responsible data science, data ownership, the Five Cs and their implementation, ethics and security training, guiding principles, ethics in a data-driven culture, regulation, future directions and a case study. Lab: interactive Plotly dashboard, Tableau or Power BI dashboard, geospatial visualization and an ethical data science case study."
77
+ }
78
+ },
62
79
  "ai": {
63
80
  "name": "Fundamentals of Artificial Intelligence",
64
81
  "aliases": ["Fundamentals of Artificial Intelligence", "Fundamentals of AI", "Artificial Intelligence Fundamentals"],
package/server/main.py CHANGED
@@ -192,7 +192,7 @@ async def lifespan(_app: FastAPI):
192
192
  client.close()
193
193
 
194
194
 
195
- app = FastAPI(title="Browser Assistant API", version="2.9.17", lifespan=lifespan)
195
+ app = FastAPI(title="Browser Assistant API", version="2.9.19", lifespan=lifespan)
196
196
  install_local_guards(app)
197
197
 
198
198
  @app.exception_handler(HTTPException)