Skip to content

Instantly share code, notes, and snippets.

View corona10's full-sized avatar

Donghee Na corona10

View GitHub Profile
@corona10
corona10 / getpi.go
Created June 11, 2017 06:13
gopy: getpi
package calculatePi
import (
"math"
"math/rand"
"runtime"
"sync"
"time"
)
@corona10
corona10 / Availability.h
Created January 20, 2020 10:31
Availability.h
/*
* Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
@corona10
corona10 / cdefs.h
Created January 21, 2020 03:17
cdefs.h
/*
* Copyright (c) 2000-2018 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
@corona10
corona10 / json_problem.py
Last active June 7, 2020 11:48
json_problem.py
def serialize(o):
if isinstance(o, int):
return str(o)
else:
return '[' + ','.join(serialize(e) for e in o) + ']'
def deserialize(s):
idx = 0
def parse_list(s):