Skip to content

Instantly share code, notes, and snippets.

View sfoucher's full-sized avatar

Samuel Foucher sfoucher

  • University of Sherbrooke
  • Sherbrooke
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active July 8, 2024 03:50
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@peterw
peterw / embed.py
Created April 17, 2023 16:30
embedding the pdf
import openai
import streamlit as st
from streamlit_chat import message
from dotenv import load_dotenv
import os
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma
import openai
from langchain.document_loaders import UnstructuredMarkdownLoader
from langchain.chains.question_answering import load_qa_chain
import openai
import streamlit as st
from streamlit_chat import message
from dotenv import load_dotenv
import os
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma
import openai
from langchain.document_loaders import UnstructuredMarkdownLoader
from langchain.chains.question_answering import load_qa_chain
@mortcanty
mortcanty / semantic_segmentation.ipynb
Last active July 2, 2024 14:50
Semantic_Segmentation.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kepano
kepano / obsidian-web-clipper.js
Last active July 5, 2024 20:12
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@bennewton999
bennewton999 / dailyNoteTemplate.txt
Last active June 27, 2024 03:44
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
---
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
---
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>
@system123
system123 / download_orbit.py
Last active October 8, 2021 11:42
Download Sentinel 1 POE and RES orbit files from aux.sentinel1.eo.esa.int
"""Get Sentinel-1 orbit file(s) from ESA archive website"""
import argparse
import logging
import os
import re
import sys
from datetime import datetime
from pyroSAR.examine import ExamineSnap
@mlelarge
mlelarge / mnist_download.ipynb
Created March 3, 2021 16:07
MNIST_download.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@divyajyotiuk
divyajyotiuk / get_twitter_bookmarks.py
Last active February 10, 2024 05:40
Python code to get text and link of the bookmarked tweets and save in markdown
import json
import glob
all_bookmarks = []
md_file = open("bookmarks.md", "w+") # saving in markdown file, if no file exists using '+' creates one
files = [file for file in glob.glob("JSONBookmarks/*")] # using glob to read all files from the folder
for file_name in files:
print(file_name)
with open(file_name) as bk:
@farr
farr / latexbuild.yml
Created October 2, 2020 18:32
GitHub Action for auto-building your LaTeX paper
name: latex-build
on: [push]
jobs:
build-latex:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install TeXlive
run: sudo apt-get install texlive texlive-publishers texlive-science latexmk