Skip to content

Instantly share code, notes, and snippets.

View lclarkmichalek's full-sized avatar

Laurie Clark-Michalek lclarkmichalek

View GitHub Profile

Mobile computing is primarily defined by the use of mobile devices at the edge of the network. Whereas traditional computing would often involve the use of static devices connected to a secure network while protected by a layer of physical security, mobile computing involves using mobile devices such as smartphones which are connected to a potentially insecure network, with no physical security. In some cases, mobile computing also involves transferring responsibilities that were previously analogue or manual, and digitalising them in the process. For example, the process of recording a biological sample might require recording the name of the sample, along with taking a photo. In a non mobile computing system, the photo and name would be recorded on separate mediums, and collated together after the photo has been developed. In a mobile computing system, the photo could be taken digitally, and associated with the name of the sample (and any other records) immediately. While this might seem tangential to mobil

package main
import (
"flag"
"time"
"context"
etcd "github.com/coreos/etcd/clientv3"
"github.com/golang/glog"
@lclarkmichalek
lclarkmichalek / keybase.md
Created June 6, 2017 04:00
keybase proof

Keybase proof

I hereby claim:

  • I am lclarkmichalek on github.
  • I am laurie (https://keybase.io/laurie) on keybase.
  • I have a public key ASCShXi8EDq9NFDJ5UDMVlLRteY6zMRoqNnT9Ot2Acq-Zwo

To claim this, I am signing this object:

relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
regex: "true"
action: keep
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
regex: (https?)
target_label: __scheme__
action: replace
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
regex: (.+)
global:
scrape_interval: 15s
scrape_timeout: 10s
evaluation_interval: 1m
rule_files:
- /etc/prometheus/rules/*.rules
scrape_configs:
- job_name: cadvisor
params:
module:
url := fmt.Sprintf("%v/dist/v1/%v/artifact/%v/%v", baseURL, repoName, version, runtime.GOOS)
debug("GET", url)
resp, err := client.Get(url)
if err != nil {
return errors.Wrap(err, "could not request latest version download")
}
defer resp.Body.Close()
debug("GET", resp.StatusCode, url)
if !(200 <= resp.StatusCode && resp.StatusCode < 300) {
data, _ := ioutil.ReadAll(resp.Body)

Keybase proof

I hereby claim:

  • I am bluepeppers on github.
  • I am laurie (https://keybase.io/laurie) on keybase.
  • I have a public key whose fingerprint is 98BC 10D8 A9C5 33D6 0AB9 3258 CED0 3418 C4FE 580C

To claim this, I am signing this object:

import numpy as np
import timeit
def random_data(N):
return np.random.uniform(0., 10., N)
array1 = np.array([random_data(4) for _ in range(1000)])
array2 = np.array([random_data(4) for _ in range(2000)])
def func():
lst = []
for elem in array1:
# Define factors.
diff --git a/shader.go b/shader.go
index 9be9c52..aec8742 100644
--- a/shader.go
+++ b/shader.go
@@ -39,15 +39,15 @@ func (shader Shader) GetSource() string {
var length C.GLint
C.glGetShaderiv(C.GLuint(shader), C.GLenum(SHADER_SOURCE_LENGTH), &length)
- log := C.malloc(C.size_t(len + 1))
- C.gogl_glGetShaderSource(C.GLuint(shader), C.GLsizei(len), nil, (*C.GLchar)(log))
@lclarkmichalek
lclarkmichalek / gist:1657284
Created January 22, 2012 14:52
Flymake mode for golang
(require 'flymake)
(defvar go-compiler "8g")
(defun flymake-go-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))