Skip to content

Instantly share code, notes, and snippets.

View arifsuhan's full-sized avatar

Arif Suhan arifsuhan

View GitHub Profile
@arifsuhan
arifsuhan / index.py
Last active June 15, 2024 13:54
netflix timeline inspiration from https://www.netflix.com/tudum/top10
from Timeline import *
start_date = '2021-06-27'
end_date = '2024-06-15'
timelines = Timeline(start_date,end_date).run()
print(timelines)
@arifsuhan
arifsuhan / common.py
Last active June 15, 2024 15:37
file IO common functions required (json, csv, request)
import csv
import json
class FileManager():
def __init__(self):
pass
def validate(self,filename,data):
@arifsuhan
arifsuhan / 1. guideline.md
Last active May 5, 2023 05:51
Upload files to onedrive
  1. Login to Azure Portal
  2. Goto App Register
  3. Click "New registration"
  4. Provide name, select "Accounts in any organizational directory (Any Azure AD directory - Multitenant)"
  5. Now go to app overview section
  6. clientId <- Copy Application (client) ID
  7. Go to Certificates & secrets and click on "New client secret"
  8. Add description and set expire time
  9. clientSecret <- Copy Value of new client secret. Don't use Secret ID
  10. tenantId <- Copy Directory (tenant) ID
@arifsuhan
arifsuhan / parse.py
Created March 11, 2023 18:20
Postman Json Parsing to create mock csv
import json
def read_json(filename):
file = open(filename)
return json.load(file)
def dump_json(filename, data):
base_path = "mock_json"
filename = base_path + "/" + filename
@arifsuhan
arifsuhan / 1. Springboot.md
Created January 22, 2023 06:04
Create Docker Image and run Kubernates

Step 1: Create project using spring.io

curl https://start.spring.io/starter.tgz -d type=gradle-project \
-d language=java \
-d bootVersion=2.6.5 \
-d baseDir=helloG \
-d groupId=com.example.hello \
-d artifactId=helloG \
-d description=Demo%20project%20for%20Spring%20Boot \
-d packageName=com.example.hello.helloG \
```
!pip install pyzbar
!apt-get install python-zbar
```
from pyzbar.pyzbar import decode
from PIL import Image
from IPython.display import Image as myImg
from IPython.display import display
@arifsuhan
arifsuhan / Desktop Launcher.md
Created January 22, 2023 06:02
Create Ubuntu Desktop Launcher
  1. Goto
cd ~/.local/share/applications/
  1. Create .desktop file. Ex: charles-proxy.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=[application name. Ex: Charles Proxy]
FROM khipu/openjdk17-alpine
VOLUME /tmp
EXPOSE 8080
ARG JAR_FILE=Bank-0.0.1-SNAPSHOT.jar
COPY ${JAR_FILE} Bank.jar
ENTRYPOINT ["java","-jar","Bank.jar"]
@arifsuhan
arifsuhan / Guidelines.md
Created January 6, 2023 17:41
View Img, Gif, Video in Colab
file1="https://wallpaperaccess.com/full/1371433.jpg"
file2="https://i.giphy.com/media/KztT2c4u8mYYUiMKdJ/giphy.gif"
file3="https://i.giphy.com/media/UVk5yzljef0kGiayL1/giphy.mp4"

VMedia(file1).img()
VMedia(file2).gif()
VMedia(file3).video()
@arifsuhan
arifsuhan / main.py
Created October 3, 2022 05:43
Create your own browser | Python | PyQt5 | QtWebEngine
import sys
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *
class CustomWindow(QMainWindow):
def __init__(self):
super(CustomWindow, self).__init__()
self.browser = QWebEngineView()