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
Array.apply(null, Array(1000)).map(Function.prototype.call.bind(Number)) |
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 ctypes | |
def getColorBrush(red=0, green=0, blue=0): | |
class _COLORREF(ctypes.Structure): | |
_fields_ = [ | |
('byRed', ctypes.c_byte), | |
('byGreen', ctypes.c_byte), | |
('byBlue', ctypes.c_byte), | |
] | |
return ctypes.windll.gdi32.CreateSolidBrush(_COLORREF(red, green, blue)) |
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 hashlib | |
def getChromeApplicationId(pathname): | |
if len(pathname) > 1 and pathname[0].islower() and pathname[1] == ":": | |
pathname = pathname[0].upper() + pathname[1:] | |
pathname = pathname.encode("utf-16le") | |
offset = ord("a") | |
applicationId = "".join([chr(int(digit, 16) + offset) for digit in hashlib.sha256(pathname).hexdigest()[:32]]) |
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
# coding: utf-8 | |
import re | |
from itertools import izip_longest | |
import win32com.client | |
from win32file import GetDriveType | |
from win32api import GetLogicalDriveStrings, GetVolumeInformation | |