Skip to content

Instantly share code, notes, and snippets.

View darkdreamingdan's full-sized avatar

Dan Chowdhury darkdreamingdan

View GitHub Profile
@lucataco
lucataco / notes.txt
Last active April 29, 2024 18:30
L40S vs A40 Benchmarks
**Goal**: Run benchmarks of SDXL, SVD, and Llama 13B on an L40S test node
**TL;DR**:
- L40S has same inference speeds as A40 for SDXL
- L40S has 10% faster inference speeds than A40S for llama2
- L40S are ~9% faster at Video rendering than A40s
**Process**: Run non-docker/cog python code for fp16
@holgi
holgi / asyncio-mock-example.py
Created January 30, 2019 13:31
Example for mocking async context managers
import pytest
import aiohttp
import asyncio
from asynctest import CoroutineMock, MagicMock, patch
# Example Code
async def fetch(session, url):
@jamietre
jamietre / pc-rules.erb
Last active February 16, 2024 10:51
Karabiner Elements config to map home/end keys to PC-like behavior on MacOS X
{
"title": "MacOS -> PC Shortcuts",
"rules": [
{
"description": "Top/bottom of document (ctrl+home/ctrl+end)",
"manipulators": [
{
"type": "basic",
"from": <%= from("home", ["command"], ["any"]) %>,
"to": <%= to([["up_arrow", ["left_command"]]]) %>,
@IanCarrasco
IanCarrasco / hyperguide.md
Last active February 22, 2023 10:15
How to Create a Hyper Terminal at a Folder

How to open hyper at current directory.

1.Go to the forked cd_to github repository and download the latest release.(zipped) Download From Github.

2.Within cd_to, open the Hyper folder and drag the cd_to.app file into your Applications folder MacDown Screenshot.

3.Now open up Automator and create a new service. File>New>Service(gear icon).Be sure to save the service with an effective name like "Hyper Terminal at Folder" MacDown Screenshot

@darealshinji
darealshinji / wslpath.sh
Last active June 11, 2017 14:21
Like cygpath for "Bash on Windows"
moved to https://github.com/darealshinji/scripts/blob/master/wslpath
@rkuzsma
rkuzsma / docker-bash-completion.md
Last active November 18, 2023 09:11
How to configure Bash Completion on Mac for Docker and Docker-Compose

How to configure Bash Completion on Mac for Docker and Docker-Compose

Copied from the official Docker-for-mac documentation (thanks Brett for the updated doc pointer):

Install shell completion

Docker Desktop for Mac comes with scripts to enable completion for the docker, docker-machine, and docker-compose commands. The completion scripts may be found inside Docker.app, in the Contents/Resources/etc/ directory and can be installed both in Bash and Zsh.

Bash

Bash has built-in support for completion To activate completion for Docker commands, these files need to be copied or symlinked to your bash_completion.d/ directory. For example, if you installed bash via Homebrew:

@meSingh
meSingh / mongodb-setup.sh
Created June 13, 2016 20:35
MongoDB Setup on Ubuntu 14.04 with PHP7
#!/bin/bash
# MongoDB Setup on Ubuntu 14.04 with PHP7
# Source:
#1. Import the public key used by the package management system:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
#2. Create a list file for MongoDB.
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list