Skip to content

Instantly share code, notes, and snippets.

View Anwarvic's full-sized avatar
🙄
Wasting Time!

✌️ Mohamed Anwar Anwarvic

🙄
Wasting Time!
View GitHub Profile
@Anwarvic
Anwarvic / anwar.om.json
Last active June 7, 2026 09:32
This is my theme for oh-my-posh on windows. It is a modified version of `mojada.omp.json`. To use it, add this line: "oh-my-posh init pwsh --config "C:\Users\mohamedanwar\anwar.om.json" | Invoke-Expression:" into your `Microsoft.PowerSehll_profile.ps1` file
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"background": "#fbfbfb",
"foreground": "#0077c2",
@Anwarvic
Anwarvic / install_cuda_on_GCP.md
Last active July 18, 2026 20:27
This file is a concrete summary of how to Install Cuda drivers on any GCP instance from scratch.

I created this GitHub Gist to show how to install Cuda on a newly-created VM instance on GCP. If you don't know which GPU model you should use, check out this stackoverflow question.

Before You Start

Simply put, Cuda is just an API for software to use GPU. So, before you install Cuda you have to make sure that it's compitable with your GPU model. In this link, you can find the following table which summarizes the minimum Cuda for each machine:

GPU type
@Anwarvic
Anwarvic / colab_mic.ipynb
Last active September 12, 2026 16:10
colab_mic.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@korakot
korakot / record.py
Last active April 17, 2026 21:26
Record audio in Colab using getUserMedia({ audio: true })
# all imports
from IPython.display import Javascript
from google.colab import output
from base64 import b64decode
from io import BytesIO
!pip -q install pydub
from pydub import AudioSegment
RECORD = """
const sleep = time => new Promise(resolve => setTimeout(resolve, time))
@parmentf
parmentf / GitCommitEmoji.md
Last active November 18, 2026 15:33
Git Commit message Emoji
@meziantou
meziantou / Index.html
Last active February 24, 2025 08:49
Javascript - Record audio
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<h1>Audio</h1>
@diogomoretti
diogomoretti / clone.sh
Last active December 25, 2019 09:59
Clone repository without history
git clone --depth 1 git://github.com/example-user/example-repo.git
@erans
erans / get_lat_lon_exif_pil.py
Created May 20, 2011 21:16
Get Latitude and Longitude from EXIF using PIL
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
def get_exif_data(image):
"""Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags"""
exif_data = {}
info = image._getexif()
if info:
for tag, value in info.items():
decoded = TAGS.get(tag, tag)