1.1.1: Enhancement: Details
- Baz
- Qux
from os.path import basename as get_base_name | |
from ctypes import wintypes, windll, create_unicode_buffer, byref | |
def getActiveWindowExe(): | |
# PROCESS_QUERY_INFORMATION, PROCESS_VM_READ, BUF_LEN = 0x0400, 0x0010, 260 | |
hwnd, pid = windll.user32.GetForegroundWindow(), wintypes.DWORD() | |
tid = windll.user32.GetWindowThreadProcessId(hwnd, byref(pid)) | |
handle = windll.kernel32.OpenProcess(0x0400 | 0x0010, False, pid) | |
buf = create_unicode_buffer(260) | |
windll.psapi.GetModuleFileNameExW(handle, 0, buf, 260) |
#=============================================================================== | |
# "Better Speed Up" for Pokemon Essentials v20.1 | |
# - Marin: original script | |
# - Phantombass: updating to 19.1 | |
# - ra101: Adding it in Options | |
#------------------------------------------------------------------------------- | |
# - Disable by setting `$game_temp.disable_speed_up` to true | |
# - Remap your `Q` button on the F1 screen to change your speedup switch | |
# - Default is now faster than original speed | |
# - Change line 34 to `@gamespeed = 0 if @gamespeed == nil` |
# Output in same dir as script | |
import os | |
import tkinter as tk | |
from tkinter import ttk | |
from tkinter import filedialog as fd | |
from tkinter.messagebox import showinfo, askokcancel | |
def concat(): |
""" | |
constant.py: A different implementation of constant for python | |
""" | |
class ConstantMeta(type): | |
""" | |
Meta Class for Constant, How Constant class would behave | |
""" | |
def __new__(cls, clsname, bases, clsdict): |
$brightness = (Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightness).CurrentBrightness | |
if ($args[0] -eq "desc") { | |
$brightness = (([int]($brightness / 10) * 10 - 10), 0 | Measure -Max).Maximum | |
} | |
else { | |
$brightness = (([int]($brightness / 10) * 10 + 10), 100 | Measure -Min).Minimum | |
} | |
(Get-WmiObject -Namespace root/WMI -Class WmiMonitorBrightnessMethods).WmiSetBrightness(1, $brightness) |
# Aliases | |
alias 'cd..'='cd ..' | |
alias ls='ls -CF' | |
alias ll='ls -alF' | |
alias la='ls -ACF' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
alias sag='sudo apt-get' |
#include<iostream> | |
#include<list> | |
#include<iterator> | |
using namespace std; | |
list<int>::iterator itr1; | |
list<int>::iterator itr2; | |
void merge(list<int>&,list<int>::iterator,list<int>::iterator,list<int>::iterator); | |
void mergeSort(list<int>&); |