Skip to content

Instantly share code, notes, and snippets.

View Visgean's full-sized avatar

martin Visgean

View GitHub Profile
@Visgean
Visgean / gist:382df0e529a51784076a222a69c84899
Created June 9, 2020 12:41
fujifilm xt3 serial number
Camera summary:
Manufacturer: FUJIFILM
Model: X-T3
Version: 3.10
Serial Number: 59353437373418100895933011446F
Vendor Extension ID: 0x6 (1.0)
Vendor Extension Description: fujifilm.co.jp: 1.0;
from scipy.interpolate import interp1d
import numpy as np
import matplotlib.pyplot as plt
a = 0
b = 10
linear_gains = (b - a) / 16
li = lambda x: a + linear_gains * x
pi Customer.id, Customer.name ( Customer ⨝
(
pi id Customer - (
rho id←custid (
pi custid Account
) )
) )

Rewrite:

  • save all S registers to stack! restore at the end of every function!
  • make sure that this is correct with debugger
    • set up breaking points before you jump to function
    • take screenshot of registers before
    • take screenshot of resigters after and compare them

Debugging:

/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/bios_limit:2201000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq:2201000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:2201000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:800000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:10000
/sys/devices/system/cpu/cpufreq/policy0/freqdomain_cpus:0 1 2 3 4 5 6 7 8 9 10 11
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies:2201000 2200000 2100000 2000000 1900000 1800000 1700000 1600000 1500000 1400000 1300000 1200000 1100000 1000000 900000 800000
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:conservative ondemand userspace powersave performance schedutil
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:12:5-34:19 to override.

Keybase proof

I hereby claim:

  • I am visgean on github.
  • I am visgean (https://keybase.io/visgean) on keybase.
  • I have a public key ASBMVy3A47Q0FD-hr28E8xVKpnk9oVcnTRV4YYYhC3zlOAo

To claim this, I am signing this object:

@Visgean
Visgean / README.md
Created May 27, 2018 00:20
/usr/share/cinnamon/js/ui/windowManager.js

Use:

  [root@rewarch ui]# patch windowManager.js < windowManager.js.patch 
  patching file windowManager.js
>>> def ff():
... k=5
... p = [1 for k in range(k)]
... print(p)
...
>>> dis(ff)
2 0 LOAD_CONST 1 (5)
3 STORE_FAST 0 (k)
3 6 BUILD_LIST 0
@Visgean
Visgean / debug.py
Created November 22, 2017 02:03
selenium screenshot
try:
self.wait.until(EC.presence_of_element_located(
(By.TAG_NAME, 'iframe')
))
except ElementNotVisibleException as e:
import base64
with open("/home/visgean/imageToSave.png", "wb") as fh:
fh.write(base64.b64decode(e.screen.encode()))