Skip to content

Instantly share code, notes, and snippets.

View zeroows's full-sized avatar
🥰
Rust

Abdulrhman Alkhodiry zeroows

🥰
Rust
View GitHub Profile
@zeroows
zeroows / unsubmodule.md
Created September 3, 2023 09:08 — forked from ryaninvents/unsubmodule.md
Convert git submodule to regular directory

From Stack Overflow.

# Fetch the submodule commits into the main repository
git remote add submodule_origin git://url/to/submodule/origin
git fetch submodule_origin

# Start a fake merge (won't change any files, won't commit anything)
git merge -s ours --no-commit submodule_origin/master
@zeroows
zeroows / Dockerfile
Created June 12, 2023 14:58
Dockerfile for firebase admin tools
FROM ubuntu:latest
WORKDIR /app
COPY gcloud_configs/config_firebase_adminsdk_file.json .
RUN apt update 2>/dev/null && apt install curl -y
RUN curl -o firebase -L --progress-bar https://firebase.tools/bin/linux/latest
RUN chmod +rx firebase
from flask import Flask, jsonify, request
from waitress import serve
import logging
logger = logging.getLogger('waitress')
logger.setLevel(logging.INFO)
app = Flask(__name__)
@zeroows
zeroows / iban.py
Created October 31, 2021 12:07
IBAN Generator from Account number for Saudi Arabia Banks
import string
CHARS = {c: str(ord(c) % 55) for c in string.ascii_uppercase}
BANK = {
'Al Bilad Bank': '15',
'Al Inma Bank': '05',
'Al Jazira Bank': '60',
'Al Rajhi Bank': '80',
'Alawwal Bank': '50',
@zeroows
zeroows / firestore.rules
Last active March 30, 2020 20:57
Firestore Rules Example in Google Console
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /shoppinglist/{lists} {
function isSignedIn() {
return request.auth != null;
}
function isEmailVerified() {
return request.auth.token.email_verified != false;
}
@zeroows
zeroows / pytorch_losses_functions.ipynb
Created February 6, 2020 08:01
Some Pytorch losses examples
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zeroows
zeroows / pytorch-losses-in-plain-python.ipynb
Created February 6, 2020 07:58 — forked from yang-zhang/pytorch-losses-in-plain-python.ipynb
git/yang-zhang.github.io/ds_code/pytorch-losses-in-plain-python.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am zeroows on github.
  • I am zeroows (https://keybase.io/zeroows) on keybase.
  • I have a public key ASBPKNsPnNjBOWkQbpcjRbrt-3CgfYCrZ_E6A0xaP7y3xgo

To claim this, I am signing this object:

@zeroows
zeroows / conv_autoencoder_keras.ipynb
Created September 6, 2018 11:35 — forked from naotokui/conv_autoencoder_keras.ipynb
Convolutional Autoencoder in Keras
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zeroows
zeroows / cmake_cmmd.sh
Last active August 19, 2018 16:57
I found a great post by Adrian Rosebrock for how to install OpenCV on Ubuntu 18.04 and for the cmake command I was able to build it using Anaconda
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH='~/Downloads/opencv/opencv_contrib-3.4.2/modules/' \
-D PYTHON3_INCLUDE_DIR='~/anaconda3/envs/tf/include/python3.6m' \
-D PYTHON_EXECUTABLE='~/anaconda3/envs/tf/bin/python' \
-D PYTHON3_LIBRARY='~/anaconda3/envs/tf/lib/libpython3.6m.so' \
-D PYTHON3_PACKAGES_PATH='~/anaconda3/envs/tf/lib/python3.6/site-packages' \
-D PYTHON3_NUMPY_INCLUDE_DIRS='~/anaconda3/envs/tf/lib/python3.6/site-packages/numpy/core/include' \