Skip to content

Instantly share code, notes, and snippets.

View mamigot's full-sized avatar

Miguel Amigot mamigot

View GitHub Profile
@mamigot
mamigot / cnn-example
Created December 2, 2022 22:58
CNN in Python that you could use to predict your final grade in a course based on the grades you have received on various assessments:
import tensorflow as tf
# Define the input data
X = np.array([
[10], # grade on first assessment
[20], # grade on second assessment
[30] # grade on third assessment
])
# Define the target variable
@mamigot
mamigot / openedx.py
Last active July 14, 2023 13:05
Calling an Open edX API
# Open edX APIs often require an access token that is obtained through the OAuth2 protocol. Here are the general steps you would take:
# Request an access token: The first step is to request an access token. For this, you would send a POST request to the /oauth2/access_token endpoint with your client ID and secret. Here’s an example of how to do it with requests in Python:
import requests
import json
url = "https://your-open-edx-instance.com/oauth2/access_token"
headers = {
"Content-Type": "application/json"
}
/* brand.css - Agentic AI Brand Identity for Web Applications */
/* Root variables for scalability and theming */
:root {
/* Color Palette */
--primary-color: #1a73e8; /* Bright blue - conveys innovation and trust */
--secondary-color: #34c759; /* Vibrant green - suggests growth and AI dynamism */
--accent-color: #fbbc05; /* Warm yellow - highlights and calls-to-action */
--background-dark: #1f2a44; /* Dark navy - modern, tech-focused background */
--background-light: #f5f7fa; /* Light gray - clean and minimal */