Skip to content

Instantly share code, notes, and snippets.

View ahmed-shariff's full-sized avatar
👓
Having fun working

Ahmed Shariff ahmed-shariff

👓
Having fun working
View GitHub Profile
@akashpal-21
akashpal-21 / org-roam-read+.el
Last active December 1, 2024 00:07
org-roam-read+.el
;; org-roam-node-read+.el
(require 'org-roam-node)
;; Add a new constructor function to the org-roam-node struct
;; This constructor function avoids using &keys, and only takes a
;; curated lists of slots to construe the node struct.
(cl-defstruct (org-roam-node (:constructor org-roam-node-create)
(:constructor +org-roam-node-create
(id &optional file-title file-mtime level point file title olp))
@ld100
ld100 / ArchLinuxWSL2.md
Last active February 13, 2026 17:03
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@dive
dive / org-agenda-bulk-custom-functions.el
Created September 29, 2019 20:08
org-mode: org-agenda-bulk-custom-functions
(defun dive/org-mark-as-reviewed ()
"Mark current selected items as REVIEWED."
(org-set-property "REVIEWED" (org-time-stamp '(16) nil)))
(add-to-list 'org-agenda-bulk-custom-functions
'(?R dive/org-mark-as-reviewed))
@wolterlw
wolterlw / tf_changes.diff
Created September 18, 2019 04:33
Changes made to the tensorflow source to enable custom operations
diff --git a/tensorflow/lite/kernels/internal/BUILD b/tensorflow/lite/kernels/internal/BUILD
index 4be3226938..6bc39a7194 100644
--- a/tensorflow/lite/kernels/internal/BUILD
+++ b/tensorflow/lite/kernels/internal/BUILD
@@ -37,6 +37,18 @@ NEON_FLAGS_IF_APPLICABLE = select({
],
})
+cc_library(
+ name = "common",
@stvhwrd
stvhwrd / protobuf-from-source.md
Last active November 12, 2019 17:15 — forked from diegopacheco/latest-protobuf-ubuntu-18-04.md
How to Install Latest Protobuf on Ubuntu 18.04

Building from Source

sudo apt install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
@mortenege
mortenege / GitHub SSH without agent
Created August 24, 2018 04:57
How to set up using GitHub SSH with keys without agent
1. This assumes an SSH keypair exists, usually in ~/.ssh (windows C:\Users\<username>\.ssh)
2. This assumes a git repository exists, otherwise create one as usual `git init`
3. Create a Repository on GitHub
4. Add SSH key to GitHub
5. Add the remote origin from gthub
@jwhendy
jwhendy / set_opencv_webcam.py
Last active October 7, 2025 09:54
An example of setting webcam settings via v4l2-ctl in a python script. Some of the CAP_* settings in opencv didn't seem to work.
import cv2
import subprocess
### for reference, the output of v4l2-ctl -d /dev/video1 -l (helpful for min/max/defaults)
# brightness (int) : min=0 max=255 step=1 default=128 value=128
# contrast (int) : min=0 max=255 step=1 default=128 value=128
# saturation (int) : min=0 max=255 step=1 default=128 value=128
# white_balance_temperature_auto (bool) : default=1 value=1
# gain (int) : min=0 max=255 step=1 default=0 value=0
# power_line_frequency (menu) : min=0 max=2 default=2 value=2
@dusty-nv
dusty-nv / pytorch_jetson_install.sh
Last active March 21, 2025 16:39
Install procedure for pyTorch on NVIDIA Jetson TX1/TX2 with JetPack <= 3.2.1. For JetPack 4.2 and Xavier/Nano/TX2, see https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano/
#!/bin/bash
#
# EDIT: this script is outdated, please see https://forums.developer.nvidia.com/t/pytorch-for-jetson-nano-version-1-6-0-now-available
#
sudo apt-get install python-pip
# upgrade pip
pip install -U pip
pip --version
# pip 9.0.1 from /home/ubuntu/.local/lib/python2.7/site-packages (python 2.7)
@dkarchmer
dkarchmer / cognito-developer-authenticated-client-example.py
Last active October 11, 2024 16:44
django-boto3-cognito: AWS' Cognito Developer Authenticated Identities Authflow using Django/Python/Boto3 (For building stand-alone clients)
__author__ = 'dkarchmer'
'''
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but
requires your Django server to have an API for your user to access Cognito based credentials
Because of Cognito, the client (this script) will only get temporary AWS credentials associated
to your user and only your user, and based on whatever you configure your AIM Policy to be.
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate
how to create a stand-alone Python script but operating similarly to these apps.
@ExpandOcean
ExpandOcean / kivy_cv.py
Created January 7, 2015 06:48
kivy and opencv work together demo
# coding:utf-8
from kivy.app import App
from kivy.uix.image import Image
from kivy.clock import Clock
from kivy.graphics.texture import Texture
import cv2
class KivyCamera(Image):
def __init__(self, capture, fps, **kwargs):