Skip to content

Instantly share code, notes, and snippets.

View stanlee321's full-sized avatar

Stanley Salvatierra stanlee321

View GitHub Profile
@jrknox1977
jrknox1977 / ollama_dspy.py
Created February 9, 2024 18:06
ollama+DSPy using OpenAI APIs.
# install DSPy: pip install dspy
import dspy
# Ollam is now compatible with OpenAI APIs
#
# To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call.
# If you do not include this you will get an error.
#
# I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete.
# At least with mistral.
@tanmay-bhat
tanmay-bhat / .gitlab-ci.yml
Last active April 3, 2024 20:34
Using Kaniko to build and push images through Gitlab-CI to ECR
#base image in which all stages are executed
image: alpine
# Ordered stages of the CI pipeline
stages:
- build_and_push
build and push docker image:
stage: build_and_push
only:
variables:
@svpino
svpino / twitter-unfollow.ipynb
Created August 11, 2020 18:58
twitter-unfollow.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@apgapg
apgapg / deploy.yml
Last active October 7, 2023 16:23
Github Workflow for Building, Releasing Flutter web app to Github Pages and Firebase Hosting
# This is a basic workflow to help you get started with Actions
name: Build, Release app to Github Pages and Firebase Hosting
# name: Test, Build and Release apk
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
@s4yed
s4yed / SpringerBooks.py
Last active June 16, 2020 18:18
Springer Machine Learning and Data Science Books.
'''
*-------------------------------------------------------------
* Copyright (c) Ahmed Sayed. All rights reserved.
* Licensed under the MIT License.
* Title: SpringerBooks.py
* Date: 2020-05-01 11:33:21
*-------------------------------------------------------------
Excute the following commands to install the dependencies before running the script:
@andreyryabtsev
andreyryabtsev / backmatting.ipynb
Last active January 16, 2024 11:59
BackMatting.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import React from 'react'
import PropTypes from 'prop-types'
import axios from 'axios'
class H5PVideoState {
constructor(h5pVideoClass) {
this.h5pVideoClass = h5pVideoClass
this.lastState = null
this.lastCurrentTime = null
@pierreabreup
pierreabreup / h5p.xapi.tracking.send-to-lrs.js
Last active January 21, 2021 02:29
Tracking H5P xapi events and send it to LRS
import React from 'react'
import PropTypes from 'prop-types'
import axios from 'axios'
const H5pContent = ({ iframeSrc }) => {
const handleContentRef = dom => {
if (dom) {
dom.onload = () => {
dom.contentWindow.H5P.externalDispatcher.on('xAPI', function(event) {
console.log('INITIAL STATEMENT ON externalDispatcher')
@akashpalrecha
akashpalrecha / an-inquiry-into-matplotlib-figures.ipynb
Last active January 13, 2023 16:32
An Inquiry into Matplotlib's Figures, Axes, subplots and the very amazing GridSpec!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Docker machine
curl -L https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine &&
chmod +x /tmp/docker-machine &&
sudo cp /tmp/docker-machine /usr/local/bin/docker-machine