Skip to content

Instantly share code, notes, and snippets.

View asehmi's full-sized avatar

Arvindra Sehmi asehmi

View GitHub Profile
@asehmi
asehmi / st_fixed_container.py
Created April 1, 2024 16:19 — forked from toolittlecakes/st_fixed_container.py
Sticky/fixed container for streamlit apps. Supports dynamic width change as well as dynamic color updates. Both top/bottom positions are available.
from typing import Literal
import streamlit as st
from streamlit.components.v1 import html
FIXED_CONTAINER_CSS = """
div[data-testid="stVerticalBlockBorderWrapper"]:has(div.fixed-container-{id}):not(:has(div.not-fixed-container)) {{
position: {mode};
width: inherit;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asehmi
asehmi / topic-models-v4.ipynb
Created January 23, 2024 07:45 — forked from pszemraj/topic-models-v4.ipynb
Topic Models - v4.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asehmi
asehmi / v-diffusion-art.ipynb
Created January 23, 2024 07:44 — forked from pszemraj/v-diffusion-art.ipynb
v-diffusion-art
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asehmi
asehmi / semantic-search-inference-ml4hc.ipynb
Created January 23, 2024 07:43 — forked from pszemraj/semantic-search-inference-ml4hc.ipynb
semantic search inference - ml4hc.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asehmi
asehmi / imdir2pdf.py
Created January 23, 2024 07:43 — forked from pszemraj/imdir2pdf.py
image to pdf processing for printing art
"""
a script in Python that given a directory path as input, converts all images in the directory to PDF files. Several other argswitches are available for convenience.
"""
import argparse
import logging
import os
import pprint as pp
import sys
@asehmi
asehmi / extract_article.py
Created January 23, 2024 07:43 — forked from pszemraj/extract_article.py
Given a URL to a website, extracts all the text article from the URL formatted as markdown.
"""
define fn for extracting articles
Example usage:
url = 'https://www.businessinsider.com/hundreds-google-workers-walk-out-zurich-protest-over-layoffs-2023-3'
markdown = extract_article(url)
print(markdown)
"""
@asehmi
asehmi / caption_image.py
Created January 23, 2024 07:42 — forked from pszemraj/caption_image.py
basic captioning example using the lavis llibrary
# -*- coding: utf-8 -*-
"""
caption_image.py - basic captioning example using lavis
usage: caption_image.py [-h] -i IMAGE_PATH [-m MODEL_TYPE] [-d DEVICE] [-v VERBOSE]
# lavis
https://github.com/salesforce/LAVIS
"""
@asehmi
asehmi / remind.md
Created January 23, 2024 07:42 — forked from pszemraj/remind.md
guess what it does

You:

I want you to act as a hypothetical python package generator and engineer. Create a python package called “remind”

ChatGPT:

As a text-based AI, I am unable to create actual Python packages or code files. However, I can help you design the structure of the package and provide you with code snippets that you can use to create the package yourself.

Package name: remind

Description: A Python package to create, manage, and schedule reminders for tasks and events.