Skip to content

Instantly share code, notes, and snippets.

View Arpan-206's full-sized avatar
🎯
Focusing on some things

Arpan Pandey Arpan-206

🎯
Focusing on some things
View GitHub Profile
@Arpan-206
Arpan-206 / index.html
Created January 7, 2022 13:12
Simple CSS Waves | Mobile & Full width
<!--Hey! This is the original version
of Simple CSS Waves-->
<div class="header">
<!--Content before waves-->
<div class="inner-header flex">
<!--Just the logo.. Don't mind this-->
<svg version="1.1" class="logo" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500" xml:space="preserve">
@Arpan-206
Arpan-206 / index.html
Created October 1, 2021 17:04
Netflix Clone
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Netflix</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js" integrity="sha384-3LK/3kTpDE/Pkp8gTNp2gR/2gOiwQ6QaO7Td0zV76UFJVhqLl4Vl3KL1We6q6wR9" crossorigin="anonymous"></script>
<script src="main.js"></script>
</head>
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.2.0/workbox-sw.js');
workbox.routing.registerRoute(
({request}) => request.destination === 'image',
new workbox.strategies.NetworkFirst()
)
import hashlib # Importing the hashlib library.
# Encoding the text into bytes and storing it in the variable 'meaasage'.
message = "Hi! This is something to encode.".encode()
# The MD5 hash.
print("MD5:", hashlib.md5(message).hexdigest())
# The SHA2 hashes.
print("SHA-256:", hashlib.sha256(message).hexdigest())
import psutil
import platform
from datetime import datetime
f = open("sysinfo.txt", "w")
def get_size(bytes, suffix="B"):
"""
Scale bytes to its proper format
e.g:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:philip.scott/elementary-tweaks
sudo apt-get install elementary-tweaks
sudo apt-add-repository ppa:tista/adapta
sudo apt install adapta-gtk-theme
sudo add-apt-repository ppa:papirus/papirus
sudo apt install papirus-icon-theme
sudo add-apt-repository -u ppa:snwh/ppa
sudo apt-get install paper-icon-theme
import cv2
import numpy as np
def binary_convert(data):
"""This function converts our data into binary data."""
if isinstance(data, str):
return ''.join([format(ord(i), "08b") for i in data])
elif isinstance(data, bytes) or isinstance(data, np.ndarray):
return [format(i, "08b") for i in data]