Skip to content

Instantly share code, notes, and snippets.

@ircubic
ircubic / nScope_gpu.py
Last active April 26, 2016 19:38
nScope GPU dummy program
import nScopePy as ns
from ctypes import CDLL, Structure, POINTER, c_int, c_uint, c_float, c_double, c_bool, cast, byref
import os
import time
# Definitions for using lib_gpu via FFI
class overclock_setting(Structure):
_fields_ = [
('editable', c_bool),
Windows Registry Editor Version 5.00
; This appears to be the entirety of what K-Boost does.
; Here {4d36e968-e325-11ce-bfc1-08002be10318} is the Class GUID for my graphics card, which is found by
; going to Device manager, finding your graphics card under "Display Adapters", right clicking and selecting properties,
; navigating to the Details tab and finding "Class Guid" in the dropdown list. Replace mine with yours.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000]
"PerfLevelSrc"=dword:00002222
"PowerMizerEnable"=dword:00000001
"PowerMizerLevel"=dword:00000001
@ircubic
ircubic / gist:dd3f2ebd729182e22796
Created June 7, 2014 16:17
Odd array behavior
func doThing(var array:Array<Int>) -> Array<Int> {
array[0] = array[0]*2
array.append(array[1]*2)
return array
}
let originalArray = [1, 2, 4]
let otherArray = doThing(originalArray)
println(originalArray) // [4, 2, 4]
println(otherArray) // [4, 2, 4, 4]
def fetch_results(request, id):
"""Fetch the result for a testrun as JSON
"""
run = Testrun.objects.get(id=id)
test = {'results': [
{'path': x.test,
'result': x.result.all()[0].get_result_display() + 'ED'}
for x in run.tests.all()]}
return _json(test)
struct Coord
{
public Coord(GPSData data) : this() {
Latitude = data.Latitude;
Longitude = data.Longitude;
}
public double Latitude{get; private set;}
public double Longitude{get; private set;}
}
@ircubic
ircubic / cubic.el
Created April 29, 2010 01:25
starter-kit-js.el
(setq js2-auto-indent-p t
js2-use-font-lock-faces t
js2-bounce-indent-p t
js2-enter-indents-newline t
js2-indent-on-enter-key t)
@ircubic
ircubic / renrakudocs.md
Created February 8, 2010 22:19
Mock documentation plans for Renraku OS

Renraku doc plans

User-friendly/descriptive docs

Documents that describe the OS from a user's perspective. Easily understandable descriptions of the OS at a superficial level, "user manuals" and tutorials belong to this category.

Docs to be made in this category