Skip to content

Instantly share code, notes, and snippets.

@Fr6jDJF
Fr6jDJF / balloontip.py
Created June 4, 2018 18:50 — forked from wontoncc/balloontip.py
Balloon tip module, Python, using win32gui.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip:
@Fr6jDJF
Fr6jDJF / rename_images.py
Created June 4, 2018 18:50 — forked from loisaidasam/rename_images.py
Rename images for use by ImageMagick convert or ffmpeg convert
# Goes a little something like this:
import os
files = [ f for f in os.listdir('.') if os.path.isfile(os.path.join('.',f)) and f.endswith('.jpg') ]
for i, file in enumerate(sorted(files)):
os.rename(file, 'image%03d.jpg' % i)
# Now with them renamed you can do something like:
@Fr6jDJF
Fr6jDJF / balloontip.py
Created June 4, 2018 18:50 — forked from boppreh/balloontip.py
Balloon tip module, Python, using win32gui. Display a notification in the tray bar and quits after 10 seconds.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip:
@Fr6jDJF
Fr6jDJF / gifiterate.py
Created June 4, 2018 18:50 — forked from tdhsmith/gifiterate.py
Generator to iterate over frames in an animated GIF, correctly handling palettes and frame update modes
import os
from PIL import Image
'''
I searched high and low for solutions to the "extract animated GIF frames in Python"
problem, and after much trial and error came up with the following solution based
on several partial examples around the web (mostly Stack Overflow).
There are two pitfalls that aren't often mentioned when dealing with animated GIFs -
firstly that some files feature per-frame local palettes while some have one global
@Fr6jDJF
Fr6jDJF / PyQt5_OpenGl_TextureFromNumpy.py
Created June 4, 2018 18:49 — forked from pwuertz/PyQt5_OpenGl_TextureFromNumpy.py
PyQt5 Example: Create OpenGL texture from numpy array via mapped pixel buffer
from OpenGL import GL
from PyQt5 import QtWidgets, QtCore, QtGui, QtOpenGL
from OpenGL.GL.ARB.texture_rg import GL_R32F
import numpy as np
import ctypes
import time
w, h = 400, 400
class TestWidget(QtOpenGL.QGLWidget):
@Fr6jDJF
Fr6jDJF / pyqt5_scraper.py
Created June 4, 2018 18:48 — forked from brbsix/pyqt5_scraper.py
PyQt5 Scraper
"""Render HTML for scraping"""
# -*- coding: utf-8 -*-
import os
import sys
from contextlib import contextmanager
from multiprocessing import Pool
try:
TimeoutError
@Fr6jDJF
Fr6jDJF / introrx.md
Created January 21, 2018 13:30 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@Fr6jDJF
Fr6jDJF / ddc-ci.py
Created May 23, 2016 10:02 — forked from vdcrim/ddc-ci.py
Python script for adjusting the settings of my monitor, by using DDC/CI
#!/usr/bin/env python3
"""
Show and adjust display parameters on an Iiyama ProLite XB2483HSU-B1 monitor
Requirements:
- mentioned monitor (27' should also work) with DDC/CI setting on
- Windows Vista+
- Python 3