diff --git a/.github/workflows/md-html-deploy.yml b/.github/workflows/md-html-deploy.yml index 4c4d795..7c3b05c 100644 --- a/.github/workflows/md-html-deploy.yml +++ b/.github/workflows/md-html-deploy.yml @@ -1,43 +1,62 @@ -name: Convert Markdown to HTML and Deploy +name: Workflow to convert Markdown files to HTML and deploy to GitHub Pages on: push: branches: - main # Trigger the workflow on push to the main branch - - dev - - feature/* + - dev # Trigger the workflow on push to the dev branch + - feature/* # Trigger the workflow on push to any feature branch jobs: build-and-deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest Ubuntu environment steps: + # Step 1: Checkout the repository - name: Checkout repository uses: actions/checkout@v2 + # Step 2: Set up Node.js environment - name: Set up Node.js uses: actions/setup-node@v2 with: - node-version: '14' + node-version: '14' # Specify the Node.js version + # Step 3: Install npm dependencies - name: Install dependencies run: npm install + # Step 4: Install pandoc for Markdown to HTML conversion - name: Install pandoc run: sudo apt-get install -y pandoc + # Step 5: Convert all Markdown files to HTML while preserving directory structure - name: Convert Markdown to HTML run: | - mkdir -p _site - for file in *.md; do + mkdir -p _site # Create the _site directory if it doesn't exist + # Find all Markdown files and convert them to HTML, preserving directory structure + find . -name "*.md" -type f | while read file; do + # Create the corresponding directory in _site + mkdir -p "_site/$(dirname "$file")" + # Convert the Markdown file to HTML and save it in the corresponding directory pandoc "$file" --standalone --toc -o "_site/${file%.md}.html" done + # Step 6: Deploy the generated HTML files to GitHub Pages - name: Deploy to GitHub Pages run: | + # Configure Git with a bot email and name git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Stash any unstaged changes + git stash + # Pull the latest changes from the remote branch with rebase git pull origin ${{ github.ref }} --rebase - git add -A # Add all changes, including untracked files + # Apply the stashed changes + git stash pop + # Add all changes, including untracked files + git add -A + # Commit the changes git commit -m 'Deploy static HTML files' + # Push the changes to the remote branch git push origin HEAD:${{ github.ref }} diff --git a/_site/0_GithubAImodels.html b/_site/0_GithubAImodels.html new file mode 100644 index 0000000..5330c31 --- /dev/null +++ b/_site/0_GithubAImodels.html @@ -0,0 +1,609 @@ + + +
+ + + +Costa Rica
+ +Last updated: 2025-01-13
+++GitHub provides a platform for developers to +
+prototype, experiment with, and integrate AI models into their projects
. +This process involves several key steps and tools that facilitate the +development and deployment of AI-powered applications.
Component | +Description | +
---|---|
Finding AI Models | +You can find various AI models on the GitHub Marketplace. Navigate
+to the Models section to explore available models and view
+their details. |
+
Experimenting with AI Models | +GitHub offers a playground where you can test different models by +adjusting parameters and submitting prompts. You can experiment with AI +models using the API provided by GitHub. | +
Saving and Sharing Experiments | +You can save your playground experiments and share them with others. +This is useful for collaboration and getting feedback on your +prototypes. | +
Integration with Visual Studio Code | +GitHub models can be integrated into Visual Studio Code, allowing +you to experiment with AI models directly within your development +environment. | +
Going to Production | +Once you are ready to move from prototyping to production, you can +switch to using a token from a paid Azure account. This provides more +robust and scalable options for deploying your AI models. | +
Rate Limits | +There are rate limits in place to ensure fair usage of the AI +models. These limits vary depending on the model and usage scenario. +Monitoring your usage and optimizing requests can help you stay within +these limits. The rate limits for the playground and free API usage are +intended to help you experiment with models and prototype your AI +application. For use beyond those limits, and to bring your application +to scale, you must provision resources from an Azure account, and +authenticate from there instead of your GitHub personal access +token. | +
Go to GitHub and sign in to your account.
Click on the + icon in the top right corner and +select New repository.
+Name your repository and choose its visibility (public or +private).
Click Create repository.
+Click on your profile picture in the top right corner and select +Settings.
+In the left sidebar, click Developer +settings.
+Click Personal access tokens and then +Generate new token.
+Select the scopes you need (e.g., repo
,
+workflow
, copilot
) and click Generate
+token.
Copy the token and store it securely.
++ + | ++ + | +
Go to the GitHub Marketplace.
Click on the Models section to explore available +AI models.
++ + | ++ + | +
Browse through the models and select one that fits your needs, +such as OpenAI GPT-4.
Review the model’s details, capabilities, and usage +instructions.
++ + | ++ + | +
Go to the playground section for the selected model.
You can find this in the model’s details page on GitHub +Marketplace.
+Adjust parameters such as prompt, temperature, and max +tokens.
Submit prompts to see how the model responds.
Example prompt:
+Explain the basics of machine learning
+ + | ++ + | +
You can compare the performance between models:
++ + | ++ + | +
Save your experiments by clicking on the Save
+button.
Share the saved experiments with collaborators for feedback.
+Open Visual Studio Code.
Go to the Extensions view by clicking on the Extensions icon in +the Activity Bar.
Search for and install the GitHub Copilot
+extension.
Open a terminal in Visual Studio Code.
Set your API key by running:
+export OPENAI_API_KEY="your-api-key"
Create a new file in your repository, e.g.,
+ai_model_test.py
.
Write a script to make API requests to the AI model. For +example:
+import openai
+
+= "your-api-key"
+ openai.api_key
+= openai.Completion.create(
+ response ="gpt-4",
+ model="Explain the basics of machine learning.",
+ prompt=100
+ max_tokens
+ )
+print(response.choices[0].text)
Step | +Description | +
---|---|
Integrate Responses | +- Use the responses from the AI model in your application. - +For example, display the generated text in a web app or use it to +automate a task. |
+
Optimize and Iterate | +- Continuously optimize your prompts and code based on the
+responses. - Iterate to improve the performance and relevance of +the AI model. |
+
Step | +Description | +
---|---|
Provision Azure Resources | +- Sign in to your Azure account. - Provision the necessary +resources, such as Azure Cognitive Services. |
+
Update Authentication | +- Switch from using your GitHub PAT to an Azure production key. +- Update your environment variable: + export OPENAI_API_KEY="your-azure-api-key" |
+
Monitor and Scale | +Monitor your usage and scale your application as needed using +Azure’s infrastructure | +
Costa Rica
+ +Last updated: 2025-01-13
+++GitHub Pages is a feature provided by GitHub that +allows you to +
+host static websites directly from a GitHub repository
. +It’s a great way to showcase your projects, create personal websites, or +host documentation for your repositories.
++What is GitHub Pages?
+
GitHub Pages is a +free service that turns your GitHub repositories into websites
. +You can host HTML, CSS, and JavaScript files, and it’s perfect for +static websites thatdon’t require server-side processing
. +GitHub Pages supports custom domains, making it easy to create a +professional-looking website.
username.github.io
, where username
is your
+GitHub username..github/workflows
+directory.md-html-deploy.yml
.md-html-deploy.yml
file to set up a workflow that converts
+Markdown to HTML and deploys it to the main
branch:
+pandoc
to convert Markdown files to HTML and places them in
+the _site
directory.main
branch and pushes the
+changes. This ensures that your GitHub Pages site is updated with the
+latest HTML files.name: Convert Markdown to HTML and Deploy
+
+on:
+ push:
+ branches:
+ - main # Trigger the workflow on push to the main branch
+
+jobs:
+ build-and-deploy:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v2
+ with:
+ node-version: '14'
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Convert Markdown to HTML
+ run: |
+
+ mkdir -p _site
+ for file in *.md; do
+ pandoc "$file" --standalone --toc -o "_site/${file%.md}.html"
+ done
+ - name: Deploy to GitHub Pages
+ run: |
+
+ git config --global user.name 'github-actions[bot]'
+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
+ git add _site
+ git commit -m 'Deploy static HTML files' git push origin main
Go to the repository settings on GitHub.
Under the GitHub Pages
section, select the
+main
branch as the source.
+Static HTML refers to web pages that are delivered to the user’s +browser exactly as stored, without any server-side processing. Static +sites are fast, secure, and easy to deploy, making them ideal for simple +websites, portfolios, blogs, and documentation.
+
Costa Rica
+Belinda Brown, belindabrownr04@gmail.com
+ -Last updated: 2024-12-13
+April, 2021
--Provides the essential knowledge required to work effectively within -Azure and embrace DevOps/Agile methodologies. Additionally, it offers -insights into fundamental cloud concepts.
-
Single/Multi Tenants | +Federated | +
---|---|
+ | + |
Component | +Definition | +URL | +
---|---|---|
Kubernetes | +Is an open source system to deploy, scale, and manage containerized +applications anywhere. | +What is +k8s | +
Container | +A container is a standalone object that holds everything an +application needs to execute, including libraries, resource files, and +configuration files. Containers are lightweight compared to virtual +machines and can run regardless of infrastructure or environment. This +makes them ideal for ease-of-management across devices and operating +systems. | +What +is k8s container? | +
Pod | +A container or group of containers running on a machine. | +What +is k8s pods? | +
Node | +A node is a physical or virtual machine that operates at least a +single container, though they can (and often) run multiple +containers. | +What is +ks8 node? | +
Cluster | +A cluster is a set of virtual or physical machines, each operating +as a nod to run containerized applications. Clusters are managed by +Kubernetes. | +What +is k8s cluster? | +
Deployment | +Deployment refers to the process of installing, executing, or +updating containers on a node. Efficient deployment takes advantage of +tools such as automation to simplify management and resource usage. | +Reference +here | +
Replicaset | +A tool used to ensure availability, Replicaset defines the quantity +of stable replica Pods that must be running at any one time, then +manages resources to fulfill this. Replicaset creates or deletes Pods to +meet and maintain the target. | +Reference +here | +
Orchestration | +Container orchestration operates one level above deployment and +refers to the overall management and operational logistics that oversee +containers. Orchestration is necessary to balance resources in an +extremely dynamic environment. | +Reference +here | +