This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""coco2kitti.py: Converts MS COCO annotation files to | |
Kitti format bounding box label files | |
__author__ = "Jon Barker" | |
""" | |
import os | |
from pycocotools.coco import COCO | |
def coco2kitti(catNms, annFile): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set itermRunning to (application "iTerm" is running) | |
set scriptPath to quoted form of POSIX path of ((path to me as text) & "::" & "start.sh") | |
set user_shell to do shell script "dscl /Search -read /Users/$USER UserShell | awk '{print $2}'" | |
tell application "iTerm" | |
activate | |
if not (exists window 1) or (itermRunning = false) then | |
reopen | |
end if |
- Correlation is not causation (???)
- No causation without manipulation. (Holland)
- All models are wrong, some are useful. (Box)
- Statistics is the science of uncertainty. (arguably Tukey)
- Statistics is the science of learning from experience, especially experience that arrives a little bit at a time. (Efron)
It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time
class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime
steps in:
>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val inData=sc.textFile("tiny.csv") | |
// Read the first line and split by commas | |
import scala.collection.immutable.StringOps | |
val header= inData.first | |
val headerLine = header.split(",").map(_.trim.filter(_ != '"')) | |
// Count lines in the file | |
inData.count | |
// Remove the header from the data | |
val rowData = inData.filter(_ != header).cache | |
// Divide each row into columns by seperating by commas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
hash brew &> /dev/null | |
if [ $? -eq 1 ]; then | |
echo 'Installing Homebrew ...' | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
fi | |
# Ensure Homebrew formulae are updated | |
brew update |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
NewerOlder