Skip to content

Instantly share code, notes, and snippets.

View peace899's full-sized avatar

Peace L peace899

  • Johannesburg, ZA
View GitHub Profile
@peace899
peace899 / both.json
Created May 11, 2020 14:54 — forked from cglacet/both.json
Comparing concave from Turf and Concaveman
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@peace899
peace899 / organize.py
Created November 9, 2020 14:34 — forked from sqordfish/organize.py
Python script for organizing files in windows into multiple folders by file type. I made this primarily to organize my downloads folder.
#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
@peace899
peace899 / 47091216.py
Created November 25, 2020 09:38 — forked from eyllanesc/47091216.py
47091216
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)
@peace899
peace899 / sqlite.py
Created January 30, 2024 12:54 — forked from michalc/sqlite.py
Use libsqlite3 directly from Python with ctypes: without using the built-in sqlite3 Python package, and without compiling anything
# 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=()):