This file contains 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
func convertStringToMap(in string) map[string]int32 { | |
rA := []rune(in) | |
strMap := map[string]int32{} | |
for _, v := range rA { | |
if count,ok := strMap[string(v)]; ok { | |
strMap[string(v)]=count+1 | |
}else{ | |
strMap[string(v)]=1 | |
} | |
} |
This file contains 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
func ascString(in string) string { | |
rA := []rune(in) | |
strArr := make([]string, len(rA)) | |
for k, v := range rA { | |
strArr[k] = string(v) | |
} | |
sort.Strings(strArr) | |
return strings.Join(strArr, "") | |
} |
This file contains 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 the changelog | |
DB::Query Tasks \value -> value.iscomplete != true | |
// Where tasks is my db store |
This file contains 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
// we use this to set an expiry on the token | |
var currTime = new Date().getTime(); | |
// If there is an expiry value and it's before current time then we've expired | |
if (pm.globals.get("tokenExpiry") !== '' && pm.globals.get("tokenExpiry") <= currTime){ | |
console.log('Token Expiry Exceeded. Clearing token'); | |
pm.globals.set("token",'') | |
} | |
// If we have a valid token then we don't need to request it we'll reuse it | |
if (pm.globals.get("token") !== ''){ | |
console.log("Auth Token. Set So Not logging in again"); |
This file contains 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" | |
"io/ioutil" | |
"log" | |
"os" | |
"strings" | |
) |
This file contains 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" | |
tf "github.com/tensorflow/tensorflow/tensorflow/go" | |
"github.com/tensorflow/tensorflow/tensorflow/go/op" | |
) | |
func main() { |
This file contains 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
<link rel="import" href="my-element.html"> |