I hereby claim:
- I am hwmrocker on github.
- I am hwmrocker (https://keybase.io/hwmrocker) on keybase.
- I have a public key whose fingerprint is 3D54 D870 C32B 4778 2FF5 71B3 94DB A9BC 6517 8870
To claim this, I am signing this object:
########## | |
# Win10 Initial Setup Script | |
# Author: Disassembler <disassembler@dasm.cz> | |
# Version: 1.7, 2016-08-15 | |
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/ | |
# THIS IS A PERSONALIZED VERSION | |
# This script leaves more MS defaults on, including MS security features. | |
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1 |
#/usr/bin/env python | |
import re | |
import subprocess | |
def get_networks_in_range_fast(lines=None): | |
if lines is None: | |
lines = subprocess.check_output(['nmcli', 'dev', 'wifi', 'list']).splitlines() | |
re_key = re.compile(r'[A-Z]+\s*') | |
first_line = lines[0] | |
keylist = [] |
I hereby claim:
To claim this, I am signing this object:
class UniqueMeta(type): | |
def __new__(cls, *foo, **kw): | |
tmp = type.__new__(cls, *foo, **kw) | |
tmp._COUNTER = 0 | |
return tmp | |
class UniquePizza(metaclass=UniqueMeta): |
# Copyright (c) 2014 | |
# David Allouche | |
# Jp Calderone & Itamar Shtull-Trauring | |
# Johan Dahlin | |
# Olaf Gladis | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
# used the skeleton from https://gist.github.com/igor47/7228586 | |
def water(levels): | |
lefties = [(levels[0],0)] | |
volume = 0 | |
for level in levels[1:]: | |
lefties = [(lelft_level, distance+1) for lelft_level, distance in lefties] | |
mini = lefties[-1][0] | |
maxi = lefties[0][0] | |
if level < mini: |
for user_id in d.getUsers(): | |
filen = "out/%s.png" % user_id | |
if os.path.exists(filen): | |
continue | |
i += 1 | |
if i > 20: | |
exit(0) # we are not done yet | |
# ... build the figure | |
fig.savefig(filen, dpi=300) | |
print "done..." |
# found this from Armin R. on Twitter, what a beautiful gem ;) | |
import ctypes | |
from types import DictProxyType, MethodType | |
# figure out side of _Py_ssize_t | |
if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'): | |
_Py_ssize_t = ctypes.c_int64 | |
else: | |
_Py_ssize_t = ctypes.c_int |
# comparison function, checking also the contents of elements if we are comparing 2 arrays. | |
# very useful for sorting. | |
cmp = (a,b) -> | |
typemap = | |
'null': 0 | |
'undefined': 0 | |
'number': 1 | |
'string': 1 | |
'object': 2 |