Skip to content

Instantly share code, notes, and snippets.

View bitsnaps's full-sized avatar
🌍
Working @ CorpoSense

Ibrahim H. bitsnaps

🌍
Working @ CorpoSense
View GitHub Profile
@alanjones2
alanjones2 / app.py
Last active June 6, 2025 11:31
Web visualization using Flask and Plotly
from flask import Flask, render_template
import pandas as pd
import json
import plotly
import plotly.express as px
app = Flask(__name__)
@app.route('/')
def index():
@devamitranjan
devamitranjan / UCB.py
Last active July 30, 2022 14:07
Upper Confidence Bound Implementation
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import math
class UpperConfidenceBound:
def __init__(self,path, N, m):
self.__dataset = pd.read_csv(path)
self.__N = N
self.__m = m
@oofnikj
oofnikj / answerfile
Last active August 15, 2025 16:53
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>vue - chart.js example</title>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" />
<link rel="stylesheet" type="text/css"
href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Material+Icons" />
@eRQee
eRQee / ubuntu-20.04-lts-perfect-setup.sh
Last active March 19, 2022 20:03
Ubuntu 20.04 LTS Apps Server Installation Wizard
clear
##############
# Am I root? #
##############
if [ "x$(id -u)" != 'x0' ]; then
echo 'Error: this script can only be executed by root.'
echo 'Try re-run the script after switched to root account by type "sudo su"'
exit 1
fi
@mwufi
mwufi / install_docker_in_colab.sh
Last active June 11, 2025 04:48
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources
@youben11
youben11 / rlwe_he_scheme.py
Last active April 22, 2024 09:07
Implementation of an homomorphic encryption scheme with numpy based on the ring learning with error problem
"""A basic homomorphic encryption scheme inspired from BFV https://eprint.iacr.org/2012/144.pdf
You can read my blog post explaining the implementation details here: https://www.ayoub-benaissa.com/blog/build-he-scheme-from-scratch-python/
Disclaimer: This implementation doesn’t neither claim to be secure nor does it follow software engineering best practices,
it is designed as simple as possible for the reader to understand the concepts behind homomorphic encryption schemes.
"""
import numpy as np
from numpy.polynomial import polynomial as poly
@kacole2
kacole2 / harbor.sh
Last active June 3, 2025 17:00
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)
@sujit
sujit / bypass_ssl_insecurities.py
Last active February 7, 2025 21:04
Selenium Bypass SSL Bad/Revoked Certificates
import sys
from time import sleep
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.common.exceptions import WebDriverException
from eliot import start_action, to_file, log_call
# from selenium.webdriver.common.keys import Keys
# from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
# from selenium.webdriver.common.by import By
# from selenium.webdriver.support import expected_conditions as EC
@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active August 15, 2025 09:46
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.