Skip to content

Instantly share code, notes, and snippets.

View Anas-jaf's full-sized avatar
🎯
Focusing

Anas Mahmoud Anas-jaf

🎯
Focusing
View GitHub Profile
period_id,classes_id_3,v,inst_id = 1
def fill_official_marks_a3_two_face_doc2_offline_version(username, password ,students_data_lists, ods_file,inst_id ):
fill_official_marks_a3_two_face_doc2_offline_version_url_1=f'https://emis.moe.gov.jo/openemis-core/restful/Institution-Institutions.json?_limit=1&id={inst_id}&_contain=InstitutionLands.CustomFieldValues'
fill_official_marks_a3_two_face_doc2_offline_version_url_2='https://emis.moe.gov.jo/openemis-core/restful/Education.EducationGrades?_limit=0'
def assessments_periods_min_max_mark(auth , assessment_id , education_subject_id ):
'''
/*
JSN-SR04T-V3.0 Ultrasonic Sensor - Mode 0 Demo
srt04-mode0.ino
Uses JSN-SR04T-V3.0 Ultrasonic Sensor
Displays on Serial Monitor
Mode 0 is default mode with no jumpers or resistors (emulates HC-SR04)
DroneBot Workshop 2021
https://dronebotworkshop.com
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QLineEdit, QTableView, QHeaderView, QVBoxLayout, QLabel, QPushButton, QStackedWidget
from PyQt5.QtCore import Qt, QSortFilterProxyModel
from PyQt5.QtGui import QStandardItemModel, QStandardItem
class AppDemo(QWidget):
def __init__(self):
super().__init__()
self.resize(1600, 1200) # Increase the size of the second widget
mainLayout = QVBoxLayout()
import requests
proxies = {"http": "http://127.0.0.1:8080", "https": "http://127.0.0.1:8080"}
r = requests.get("https://www.google.com/", proxies=proxies, verify=False)
@Anas-jaf
Anas-jaf / all_word_pdf_excel_files_2Json.ps1
Last active August 24, 2023 00:04
all_word_pdf_excel_files_2Json.ps1
Get-ChildItem -Path C:\ -Recurse -Include *.docx, *.doc, *.dotx, *.dot, *.rtf, *.xlsx, *.xls, *.xlsm, *.xlsb, *.xlt, *.csv, *.pptx, *.ppt, *.pptm, *.potx, *.pot, *.pdf | ConvertTo-Json | Out-File -FilePath "office_files_and_pdfs.json"
import os
import win32com.client as win32
import xlwings as xw
def excelActiveSheet_to_pdf(excel_file_path, pdf_file_name, num_pages_to_export):
app = win32.DispatchEx("Excel.Application")
app.Interactive = False
app.Visible = False
workbook = app.Workbooks.Open(excel_file_path)
workbook.ActiveSheet.ExportAsFixedFormat(0 , pdf_file_name)
# Define the path to the Firefox executable
$firefoxPath = "C:\Program Files\Mozilla Firefox\firefox.exe"
# Get a list of all PDF files in the current directory
$pdfFiles = Get-ChildItem -Path . -Filter *.pdf
# Loop through the list and open each PDF file with Firefox
foreach ($pdfFile in $pdfFiles) {
$pdfFilePath = $pdfFile.FullName
$escapedFilePath = "`"$pdfFilePath`"" # Escape path with quotes for spaces
# Create a new Excel Application object
$excelApp = New-Object -ComObject Excel.Application
# Set visibility to true (to make Excel visible)
$excelApp.Visible = $true
# Get a list of all Excel files in the current folder
$excelFiles = Get-ChildItem -Path . -Filter *.xlsx
# Loop through the list and open each Excel file
@Anas-jaf
Anas-jaf / instructions.sh
Created July 11, 2023 10:53 — forked from miguelmota/instructions.sh
linux wireshark SSLKEYLOGFILE ssl decrypt curl
sudo wireshark
# go to:
# Edit -> Preferences -> Protocols -> TLS (you can type) -> under "(Pre)-Master-Secret log filename
" enter in input "/tmp/ssl-key.log"
# then start capture
# curl
SSLKEYLOGFILE=/tmp/ssl-key.log curl https://example.com
# firefox (don't forget to disable http2 in about:config and restart)