Skip to content

Instantly share code, notes, and snippets.

View netskink's full-sized avatar

John F. Davis netskink

View GitHub Profile
@netskink
netskink / thecode.py
Created September 11, 2016 01:49
computing regression parameters gradient descent walkthru
# coding: utf-8
# # Computing Regression parameters (gradient descent example)
# The data
# Consider the following 5 point synthetic data set
# In[1]:
@netskink
netskink / computing-regression-parameters-walkthru.py
Created September 10, 2016 21:04
Notes on the computing regression parameters walkthru
# coding: utf-8
# # Computing Regression parameters (closed form example)
# The data
# Consider the following 5 point synthetic data set
# In[1]:
import XCTest
@testable import SimpleApp
class SimpleAppRandomPerfTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
;Program received signal SIGSEGV, Segmentation fault.
; 0xc289c031 in ?? ()
; Cannot access memory at address 0xc289c031
; This is buffer_overflow.c
; This is for buffer_overflow2.c
; This shell code is 44 bytes in length
;;;;;; Above this line is part of our model for how we get to our
;;;;;; function pointer to call based upon ascii variable decoded in read buffer.
; create a label so we know where to start looking when
; we write the patch file.
initialStart:
jmp theCall
func adjRed(inout pixel:Pixel, by:Int) {
let redDiff = Int(pixel.red) - avgRed
if (redDiff > 0) {
pixel.red = UInt8(max(0,min(255, avgRed + redDiff * by)))
}
}
func adjGreen(inout pixel:Pixel, by:Int) {
let greenDiff = Int(pixel.green) - avgGreen
if (greenDiff > 0) {
@netskink
netskink / printf_format_specifiers.txt
Created February 6, 2016 12:23
printf format specifiers
Escape sequences are used to display non-printing and hard-to-print characters. In general, these characters control how text is positioned on the screen, for example, newlines and tabs:
Character
Value
Escape Sequence
alert (beep)
0x07
\a
backslash
0x5C
@netskink
netskink / uboot yocto uEnv.txt
Created July 24, 2015 12:25
This is the uEnv.txt file I used to get yocto to boot.
##This will work with: Angstrom's 2013.06.20 u-boot.
loadaddr=0x82000000
fdtaddr=0x88000000
rdaddr=0x88080000
initrd_high=0xffffffff
fdt_high=0xffffffff
loadximage=load mmc 0:2 ${loadaddr} /boot/zImage-3.14.19-yocto-standard
<!DOCTYPE html>
<html>
<body onload="init()">
<canvas id="canvas" width="400" height="400" style="border:solid 2px black"></canvas>
<ul id="sliders"></ul>
<script id="jsbin-javascript">
var canvas;
var context;
<body onload="init();">
<canvas id="myCanvas" width="400" height="400">
Your browser does not support the canvas tag.
</canvas>
<script id="jsbin-javascript">
var canvas, ctx;
var x=100, y=100;
var angle=0;
var x = 100;