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" | |
func PrefixSum(my_array,my_output []int ,parent chan int) { | |
if len(my_array)<2{ | |
parent<-my_array[0] | |
my_output[0] = my_array[0] + <-parent | |
}else if len(my_array)<1{ | |
parent<-0 |
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" | |
"os" | |
"sort" | |
) | |
func getMedian(array1 []uint32, array2 []uint32) uint32 { | |
// O(n/2) solution with optimization for edge cases |
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 ffmpeg | |
import ( | |
"fmt" | |
"os" | |
"regexp" | |
"strings" | |
"github.com/gofrs/uuid" | |
) |
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 itertools import product | |
from typing import List, Tuple | |
def __find_neighbours(x: int, y: int, size: int) -> List[Tuple]: | |
""" | |
Finds neighbours for a cell. Those which fall out of the field are skipped | |
:param x: current cell's X coord | |
:param y: current cell's Y coord | |
:param size: field single dimension size (because field is square) |
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 com.nuvoair.web.rest | |
import com.nuvoair.common.security.* | |
import com.nuvoair.security.jwt.MagicTokenProvider | |
import com.nuvoair.service.NuvoairUserService | |
import com.nuvoair.service.OnboardService | |
import com.nuvoair.utils.UrlBuilder | |
import com.nuvoair.web.rest.viewmodel.OnboardCompleteRequest | |
import com.nuvoair.web.rest.viewmodel.ValidateTokenRequest | |
import com.nuvoair.web.rest.viewmodel.ValidateTokenResponse |
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
git diff HEAD^ HEAD | awk ' | |
/^@@/ { | |
gsub(/@@|\+|\-|@@/, "", $0); | |
split($1, old, ",") | |
split($2, new, ",") | |
old_line = old[1] | |
new_line = new[1] | |
next | |
} | |
{ |
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
#!/bin/bash | |
while [[ "$#" -gt 0 ]]; do | |
case $1 in | |
-n|--namespace) | |
NAMESPACE="$2" | |
shift | |
;; | |
-s|--secret) | |
SECRET_NAME="$2" |
OlderNewer