This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
from selenium.common.exceptions import TimeoutException, NoSuchElementException | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.support.ui import Select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import folium | |
from branca.element import Element | |
start_coords = (27.815318747058587, -26.607971936214536) | |
folium_map = folium.Map(location=start_coords, zoom_start=3) | |
map_id = 'map_' + folium_map._id | |
circlemove_js = """\nfunction circlemove(e) {{ | |
var clickedCircle = e.target; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Author: Jacob Rust | |
#Date: 7/8/2013 | |
#Description:This script organizes downloaded files into separate folders depending | |
#on the file type. This was made for windows systems. | |
#Download directory should be the first command line argument | |
#New file types can be added to the dictionary in the main method | |
import os | |
import sys | |
import hashlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtCore import * | |
from PyQt5.QtGui import QDrag | |
from PyQt5.QtWidgets import * | |
class TreeWidget(QTreeWidget): | |
customMimeType = "application/x-customTreeWidgetdata" | |
def mimeTypes(self): | |
mimetypes = QTreeWidget.mimeTypes(self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtWidgets import QApplication, QMainWindow, QToolTip | |
import sys | |
from PyQt5.QtChart import QChart, QChartView, QBarSet, QPercentBarSeries, QBarCategoryAxis | |
from PyQt5.QtGui import QPainter, QPixmap, QTransform | |
from PyQt5.QtCore import Qt, QPointF, QRect | |
from functools import partial | |
class Window(QMainWindow): | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from watchfiles import awatch | |
from pathlib import Path | |
from .helpers import Iterator, AsyncIter | |
async def produce(): | |
async for changes in awatch(watch_path): | |
for change_type, path in changes: | |
print(f" {change_type.name}: {path}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Requires: https://github.com/suchipi/webview-node and expressjs | |
var webview = require("webview"); | |
var express = require("express"); | |
const path = require('path') | |
const app = express(); | |
app.use('/static', express.static(path.join(__dirname, 'public'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://stackoverflow.com/a/68876046/1319998, which is itself inspired by https://stackoverflow.com/a/68814418/1319998 | |
from contextlib import contextmanager | |
from collections import namedtuple | |
from ctypes import cdll, byref, string_at, c_char_p, c_int, c_double, c_int64, c_void_p | |
from ctypes.util import find_library | |
from sys import platform | |
def query(db_file, sql, params=()): |