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 struct | |
import imageio | |
import numpy as np | |
import sys | |
if len(sys.argv) < 2: | |
print ("Usage: image-extract.py [imgdata.image]") | |
exit(0) | |
f = open(sys.argv[1], "rb") |
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 imageio | |
import numpy as np | |
import cv2 | |
q = "20191230_221836_HDR.jpg" | |
r = "legs.png" | |
im = np.array(imageio.imread(r)) | |
im_orig = im | |
dims = im.shape |
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
from Crypto.Cipher import AES | |
from Crypto import Random | |
import base64 | |
import requests | |
import xml.etree.ElementTree as ET | |
block_size = AES.block_size | |
unpad = lambda s : s[0:-ord(s[-1])] |
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
#!/bin/bash | |
# copy to /usr/sbin | |
interface=org.chromium.PowerManager | |
member=SetPolicy | |
# Run once just to be sure | |
echo "Surface Go fix daemon start..." > /dev/kmsg | |
echo "on" > /sys/devices/pci0000:00/0000:00:15.1/i2c_designware.1/power/control |
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
DeviceInfo(softwareRevision, isOn, | |
SceneLightState(color, powerOnBehavior, deviceInfo | |
Light(id, | |
Capabilities(dimmable, customState | |
PowerOnBehavior(option | |
hueplay, huebloom, hueiris, huelightstrip, huego, plug, bollard, wallspot, groundspot, flexiblelamp, wallshade, walllantern | |
[ea:44:13:bd:db:59] Service [b8843add-0000-4aa1-8794-c3f462030bda] Unknown, ble_firmware_update? | |
[ea:44:13:bd:db:59] Characteristic [b8843add-0004-4aa1-8794-c3f462030bda] |
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
diff -r /home/maxamillion/workspace/qt5_compare/qt-everywhere-src-5.12.2/qtbase/src/android/jar/src/org/qtproject/qt5/android/QtNative.java ./qtbase/src/android/jar/src/org/qtproject/qt5/android/QtNative.java | |
491a492,495 | |
> float tiltRot = event.getAxisValue(MotionEvent.AXIS_TILT); | |
> float orientation = event.getAxisValue(MotionEvent.AXIS_ORIENTATION); | |
> float tiltX = (float) Math.toDegrees(-Math.sin(orientation) * tiltRot); | |
> float tiltY = (float) Math.toDegrees(Math.cos(orientation) * tiltRot); | |
493c497 | |
< event.getButtonState(), event.getX(), event.getY(), event.getPressure()); | |
--- | |
> event.getButtonState(), event.getX(), event.getY(), event.getPressure(), tiltX, tiltY, (float)Math.toDegrees(orientation)); |
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
Based somewhat on http://www.nicholasmelnick.com/2019/02/installing-chromeos-on-surface-go/ | |
EDIT April 11, 2020: Happy to report that a lot of this isn't necessary any more! https://github.com/sebanc/brunch seems to work | |
perfectly with the Surface Go using the dual boot option and rEFInd, no adjustments needed. Even fixes autorotation, which I hadn't | |
gotten working. | |
# Get chromefy stuff | |
git clone https://github.com/imperador/chromefy.git | |
cd chromefy |
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
#!/usr/bin/env python2 | |
import struct | |
import sys | |
import hashlib | |
from pyasn1_modules import rfc2437,rfc2459 | |
from pyasn1.codec.der import decoder | |
from pyasn1.codec.native import encoder |
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
#include <stdint.h> | |
#include <stdio.h> | |
struct pkx_header | |
{ | |
uint32_t magic1; | |
uint32_t magic2; | |
uint32_t magic3; | |
uint32_t type; | |
uint32_t comp_size; |
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
function <?:27,31> (25 instructions at 0x563b8aad94d0) | |
0 params, 17 slots, 1 upvalue, 0 locals, 7 constants, 0 functions | |
1 [-] GETTABUP 0 0 -1 ; - "sv_animcmd" | |
2 [-] GETTABLE 0 0 -2 ; "is_excute" | |
3 [-] CALL 0 1 2 | |
4 [-] TEST 0 0 | |
5 [-] JMP 0 19 ; to 25 | |
6 [-] GETTABUP 0 0 -1 ; - "sv_animcmd" | |
7 [-] GETTABLE 0 0 -3 ; "LANDING_EFFECT" | |
8 [-] LOADK 1 -4 ; 85833409598 |