Skip to content

Instantly share code, notes, and snippets.

View Xevion's full-sized avatar
⚜️
Noblesse Oblige

Xevion Xevion

⚜️
Noblesse Oblige
View GitHub Profile
@Xevion
Xevion / unique.py
Created July 3, 2019 16:46
timing script for different methods of removing unique items from lists
import random, time, pprint
from itertools import filterfalse
print = pprint.PrettyPrinter().pprint
generate = lambda mag=10 : [random.randint(0, 1*mag) for _ in range(10*mag)]
def dict_base(array):
return list(dict.fromkeys(array))
def unique(it):
------------------
System Information
------------------
Time of this report: 7/7/2019, 16:49:17
Machine name: DESKTOP-6FU336V
Machine Id: {BFA9AF30-C252-46A4-AD5C-6F722FE541C0}
Operating System: Windows 10 Pro 64-bit (10.0, Build 17134) (17134.rs4_release.180410-1804)
Language: English (Regional Setting: English)
System Manufacturer: System manufacturer
System Model: System Product Name
This file has been truncated, but you can view the full file.
2018-05-07 14:50:02, Info DISM API: PID=6644 TID=6784 DismApi.dll: - DismInitializeInternal
2018-05-07 14:50:02, Info DISM API: PID=6644 TID=6784 DismApi.dll: <----- Starting DismApi.dll session -----> - DismInitializeInternal
2018-05-07 14:50:02, Info DISM API: PID=6644 TID=6784 DismApi.dll: - DismInitializeInternal
2018-05-07 14:50:02, Info DISM API: PID=6644 TID=6784 DismApi.dll: Version 10.0.17134.1 - DismInitializeInternal
2018-05-07 14:50:02, Info DISM API: PID=6644 TID=6784 DismApi.dll: Parent process command line: "C:\Windows\System32\cleanmgr.exe" /D C - DismInitializeInternal
2018-05-07 14:50:02, Info DISM API: PID=6644 TID=6784 Enter DismInitializeInternal - DismInitializeInternal
2018-05-07 14:50:02, Info DISM API: PID=6644 TID=6784 Input parameters: LogLevel: 2, LogFilePath: (null)
The graphics pipeline in Vulkan is set up by creating a VkPipeline object. It describes the configurable state of the graphics card, like the viewport size and depth buffer operation and the programmable state using VkShaderModule objects. The VkShaderModule objects are created from shader byte code. The driver also needs to know which render targets will be used in the pipeline, which we specify by referencing the render pass.
from tkinter import *
from functools import partial
import random
#Global Variables
class DiceWindow(Frame):
def __init__(self, parent):
from tkinter import *
from functools import partial
import random
class DiceWindow(Frame):
def __init__(self, parent):
self.parent = parent
self.parent.attributes("-fullscreen",True)
self.parent.title("Dice Roller by Ethan Carter")
from tkinter import *
from functools import partial
import random
class DiceWindow(Frame):
def __init__(self, parent):
self.parent = parent
self.parent.attributes("-fullscreen",True)
self.parent.title("Dice Roller by Ethan Carter")
:\Programming\Exercism\python\kindergarten-garden>pytest kindergarten_garden_test.py
==================================================================================================================== test session starts ====================================================================================================================
platform win32 -- Python 3.6.7, pytest-5.0.1, py-1.8.0, pluggy-0.12.0
rootdir: A:\Programming\Exercism\python\kindergarten-garden
collected 6 items
kindergarten_garden_test.py .F.... [100%]
=============================================
Ria
Etons
Eranitg
Dolishep Eranitg
Eioritd
Dolishep Eioritd
Endesita
Dolishep Endesita
Srasg
Tird
import os, sys, string, pprint, pyperclip
# Consntants and file opening/reading
print = pprint.PrettyPrinter().pprint
path = os.path.join(sys.path[0], 'minecraft_id_list.txt')
file = open(path, 'r').read()
file = list(map(lambda x : x.strip(), file.split('\n')))
strings = []
# String processing