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
| import requests | |
| # Set the Bitbucket username and password | |
| username = "YOUR_BITBUCKET_USERNAME" | |
| password = "YOUR_BITBUCKET_PASSWORD" | |
| # Set the repository name and branch name | |
| repository_name = "YOUR_REPOSITORY_NAME" | |
| branch_name = "YOUR_BRANCH_NAME" |
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
| // https://leetcode.com/problems/logger-rate-limiter/ | |
| const ( | |
| message_throttle_interval = 10 // seconds | |
| prime32 = uint32(16777619) | |
| ) | |
| // https://github.com/segmentio/fasthash | |
| func hash(s string) uint32 { | |
| h := uint32(2166136261) |
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
| // https://leetcode.com/problems/interval-list-intersections/ | |
| func intervalIntersection(firstList [][]int, secondList [][]int) [][]int { | |
| var result [][]int | |
| if len(firstList) == 0 || len(secondList) == 0 { | |
| return result | |
| } | |
| firstListPos := 0 | |
| secondListPos := 0 | |
| for ; firstListPos < len(firstList) && secondListPos < len(secondList) ; { |
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
| // https://leetcode.com/problems/multiply-strings | |
| func multiply(num1 string, num2 string) string { | |
| res := make([]rune, len(num1)+len(num2)) | |
| for i := range res { | |
| res[i] = 48 // preinitialize with 0s | |
| } | |
| for i:=len(num1)-1; i >=0; i-- { | |
| for j:=len(num2)-1; j>=0; j-- { | |
| mul := (rune(num1[i]) - 48) * (rune(num2[j]) - 48) | |
| res[i+j+1] += mul |
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
| --- refresh.js.orig 2017-03-08 21:36:04.000000000 +0000 | |
| +++ refresh.js 2018-10-30 10:01:13.043588200 +0000 | |
| @@ -53,18 +53,15 @@ | |
| // compatibility with Tab suspender extension | |
| if (tab.favIconUrl != undefined && tab.favIconUrl.match("data:image/png;base64") != null){ | |
| $("#f_"+tab.id).css({"background-image": "url("+tab.favIconUrl+")"}); | |
| - return; | |
| - } | |
| // change favicon | |
| - if (tab.url.match("opera://|browser://|chrome://|chrome-extension://") != null || !tab.favIconUrl){ |