This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"github.com/kellydunn/golang-geo" | |
) | |
func main() { | |
pt := geo.NewPoint(28.6441636, 77.2060303) | |
geocoder := geo.GoogleGeocoder{} |
This file contains hidden or 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
package main | |
import ( | |
"time" | |
"log" | |
"errors" | |
"encoding/json" | |
) | |
var timeLayout = "15:04" |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
return new Promise(function(resolve, reject) { | |
${1:body} | |
}); | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>promise</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.js</scope> |
This file contains hidden or 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
# Color shortcuts | |
RED=$fg[red] | |
YELLOW=$fg[yellow] | |
GREEN=$fg[green] | |
WHITE=$fg[white] | |
BLUE=$fg[blue] | |
RED_BOLD=$fg_bold[red] | |
YELLOW_BOLD=$fg_bold[yellow] | |
GREEN_BOLD=$fg_bold[green] | |
WHITE_BOLD=$fg_bold[white] |
This file contains hidden or 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
cases = [ | |
(' mte st m', ' ', ['', '', 'mte', '', 'st', 'm']), | |
('mtestm', ' ', ['mtestm']), | |
('mtestm', 'm', ['', 'test', '']), | |
('mmadfmm', 'm', ['', '', 'adf', '', '']), | |
('sfd 423', ' ', ['sfd', '', '', '423']), | |
('hello', ' ', ['hello']), | |
] | |
for i, (S, sep, expected_op) in enumerate(cases): | |
op = split(S, sep) |
This file contains hidden or 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
from datetime import datetime | |
def check_overlap(input): | |
return True | |
case1 = [ | |
(datetime(2018, 3, 10, 11, 0), datetime(2018, 3, 10, 13, 0)), | |
(datetime(2018, 3, 10, 14, 0), datetime(2018, 3, 10, 15, 0)), | |
(datetime(2018, 3, 10, 12, 0), datetime(2018, 3, 10, 13, 30)) | |
] |