Skip to content

Instantly share code, notes, and snippets.

View simar7's full-sized avatar

simar7

  • Canada
View GitHub Profile
15:03:24 INFO - MultiFileLogger online at 20141220 15:03:24 in /home/simar/mozilla/mozharness
15:03:24 WARNING - When you use developer_config.py, we drop 'read-buildbot-config' from the list of actions.
15:03:24 INFO - Run as scripts/talos_script.py --suite chromez --branch-name Firefox-Non-PGO --system-bits 64 --cfg talos/linux_config.py --download-symbols ondemand --use-talos-json --blob-upload-branch Firefox-Non-PGO --cfg developer_config.py --installer-url http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-37.0a1.en-US.linux-x86_64.tar.bz2
15:03:24 INFO - Guessing talos json url...
15:03:24 INFO - Downloading http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-37.0a1.en-US.linux-x86_64.txt to /home/simar/mozilla/mozharness/build/firefox-37.0a1.en-US.linux-x86_64.txt
15:03:24 INFO - retry: Calling <bound method Talos._download_file of <mozharness.mozilla.testing.talos.Talos object at 0x7f6a6b4c8fd0>> with args: ('http://ftp.mozilla.org/
import java.util.StringTokenizer;
import java.util.Map;
import java.util.HashMap;
import java.io.BufferedReader;
import java.io.FileReader;
/** This is the parallel version of WordCount.java by way of
* WordCountParallelBad.java. The key change is that we use a
* concurrent hashmap to allow parallel accesses, rather than a
* synchronized HashMap. Notice the updateCount() function needs be
# -*- coding: utf-8 -*-
import numpy as np
import igraph as ig
class BasicNode: #should be interfaced to from a graph object
def __init__(self, content=None, labels=None):
self.content = content
self.incident_edges =set([])
self.incident_outward_edges=set([])
self.incident_inward_edges=set([])
// Sort the ArrayList of ArrayList in reverse order by degree.
for (List<Integer> vertex : sortedAdjList) {
Collections.sort(vertex);
}
Collections.sort(sortedAdjList, new Comparator<ArrayList<Integer>>() {
@Override
public int compare(ArrayList<Integer> x1, ArrayList<Integer> x2) {
return x2.size().compareTo(x1.size());
}
});
@simar7
simar7 / yosemite-sound-issues.md
Created December 1, 2015 23:45 — forked from mdwheele/yosemite-sound-issues.md
Fix Yosemite Bluetooth Sound Issues
  1. Run the following in your terminal.
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80
f5438862f45d6f35d1865748eeae3185
https://gist.github.com/5230750

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@simar7
simar7 / db.go
Created December 28, 2015 19:51 — forked from trkrameshkumar/db.go
Get get number of rows using sql in golang
package main
import (
"database/sql"
"fmt"
_ "github.com/lib/pq"
)
const (
DB_USER = "ramesh"

Keybase proof

I hereby claim:

  • I am simar7 on github.
  • I am simar (https://keybase.io/simar) on keybase.
  • I have a public key ASA2_olLsvxrgpubn-1UWSRkcoiSrdZtzD0j6RR6_w4I9Qo

To claim this, I am signing this object: