Skip to content

Instantly share code, notes, and snippets.

View gyasis's full-sized avatar
💭
Always Coding

Gyasi Sutton gyasis

💭
Always Coding
View GitHub Profile
@gyasis
gyasis / setup_airflow_w_dbt.sh
Created November 2, 2024 21:04
Setup Airflow with DBT and other airflow plugins
#!/bin/bash
# Define custom ports
WEB_SERVER_PORT=8081
FLOWER_PORT=5556
# Create necessary directories
mkdir -p ./dags ./logs ./plugins
# Set environment variable for Airflow user
@gyasis
gyasis / ollama_autogen.py
Created February 19, 2024 12:12
Example using Autogen's custom model class method
# %%
import autogen
from types import SimpleNamespace
import ollama
import os
class OllamaModelClient:
"""
A client to interact with the Ollama library for use with AutoGen.
@gyasis
gyasis / condaenv.txt
Created January 22, 2021 08:10 — forked from pratos/condaenv.txt
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@gyasis
gyasis / display.py
Created January 20, 2021 22:35 — forked from christopherlovell/display.py
display youtube video in jupyter notebook
from IPython.display import HTML
# Youtube
HTML('<iframe width="560" height="315" src="https://www.youtube.com/embed/S_f2qV2_U00?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>')
# Vimeo
HTML('<iframe src="https://player.vimeo.com/video/26763844?title=0&byline=0&portrait=0" width="700" height="394" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe><p><a href="https://vimeo.com/26763844">BAXTER DURY - CLAIRE (Dir Cut)</a> from <a href="https://vimeo.com/dannysangra">Danny Sangra</a> on <a href="https://vimeo.com">Vimeo</a>.</p>')
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py