ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Add PATH to ~/.bash_profile
and ~/.zshrc
export PATH=/usr/local/bin:$PATH
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
#!/usr/bin/env sh | |
# checks to see if running | |
launchctl list | grep elasticsearch | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist | |
launchctl remove homebrew.mxcl.elasticsearch | |
pkill -f elasticsearch |
#!/usr/bin/python -tt | |
# Copyright 2010 Google Inc. | |
# Licensed under the Apache License, Version 2.0 | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# Google's Python Class | |
# http://code.google.com/edu/languages/google-python-class/ | |
# Basic list exercises | |
# Fill in the code for the functions below. main() is already set up |
# F. front_back | |
# Consider dividing a string into two halves. | |
# If the length is even, the front and back halves are the same length. | |
# If the length is odd, we'll say that the extra char goes in the front half. | |
# e.g. 'abcde', the front half is 'abc', the back half 'de'. | |
# Given 2 strings, a and b, return a string of the form | |
# a-front + b-front + a-back + b-back | |
def front_back(a, b): | |
af = len(a)//2 |
#!/usr/bin/python -tt | |
# Copyright 2010 Google Inc. | |
# Licensed under the Apache License, Version 2.0 | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# Google's Python Class | |
# http://code.google.com/edu/languages/google-python-class/ | |
# Basic string exercises | |
# Fill in the code for the functions below. main() is already set up |
#!/bin/python3 | |
import sys | |
if __name__ == '__main__': | |
n = int(input()) | |
m = 1 | |
i=0 | |
dic = {} | |
for i in range (n): |
if __name__ == '__main__': | |
N = int(input()) | |
i=0 | |
while i < N: | |
S = str(input()) | |
strlen = len(S) | |
j = 0 | |
even = "" | |
odd = "" |
/* | |
* Input | |
* The first line contains an integer, N, denoting the number of elements in the array. | |
* The second line contains N space-separated integers describing the array's elements. | |
* The should print mean, median and mode | |
*/ | |
function processData(input) { | |
let lines = input.split("\n"); | |
const n = parseInt(lines[0]); | |
let a = lines[1].split(" "); |