Skip to content

Instantly share code, notes, and snippets.

View gootik's full-sized avatar

Sasan Hezarkhani gootik

View GitHub Profile
View build.log
uid=0(root) gid=0(wheel) groups=0(wheel),1(daemon),2(kmem),3(sys),4(tty),5(operator),8(procview),9(procmod),12(everyone),20(staff),29(certusers),61(localaccounts),80(admin),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(,398(,399(,701(
rm -f ../String.o ../StringImpl.o ../StringBuilder.o ../StringView.o ../LogStream.o ../JsonArray.o ../JsonObject.o ../JsonValue.o ../JsonParser.o ../FileSystemPath.o ../URL.o ../Utf8View.o
rm -f TestString TestQueue TestVector TestHashMap TestJSON TestWeakPtr TestNonnullRefPtr TestRefPtr TestFixedArray TestFileSystemPath TestURL TestStringView TestUtf8
rm -f ../String.o ../StringImpl.o ../StringBuilder.o ../StringView.o ../LogStream.o ../JsonArray.o ../JsonObject.o ../JsonValue.o ../JsonParser.o ../FileSystemPath.o ../URL.o ../Utf8View.o
rm -f TestString TestQueue TestVector TestHashMap TestJSON TestWeakPtr TestNonnullRefPtr TestRefPtr Test
# getMissingNo takes list as argument
def getMissingNo(A):
n = len(A)
total = (n+1)*(n+2)/2
sum_of_A = sum(A)
return total - sum_of_A
# Driver program to test above function
A = [1, 2, 4, 5, 6]
miss = getMissingNo(A)
gootik / test.erl
Last active October 6, 2017 14:27
Testing map timing
View test.erl
map_time() ->
Map = #{a => true,
b => true,
c => true,
p => true,
e => true,
View gist:3013ea2bbccc93b59d21202aeb9c33fb
Courtesy of Mike Duffy, owner and head trainer at Mike Duffy's Personal Training Studio.
Round One:
> Burpees
> Mountain Climbers
> Jumping Jacks
Three circuits: 10 reps first round, 15 reps second round and 20 reps third round. Non-stop no rests.
> Jump rope 3 minutes
View index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<!-- saved from url=(0013) -->
<html xmlns="" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
View gist:2c2c6babbeff94da7082
import random
import requests
import shutil
# Get the number of the latest xkcd
current_xkcd_num = int(requests.get('').json()['num'])
# Generate a random number using (expecting a natural number)
# Mod it by current_xkcd_num to give us the number of a valid xkcd comic
## Get the URL of the image of the random comic