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
m = [ | |
[1,2,1,1,1,0,2,1,1], | |
[2,2,1,1,2,3,6,2,1], | |
[1,2,1,1,1,0,1,1,1], | |
[2,2,1,1,2,3,1,2,1] | |
] | |
for i in range(0, len(m), 2): | |
total = 0 | |
for k,j in enumerate(m[i]): |
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 rapidfuzz import fuzz | |
import operator | |
""" | |
this function return similar value for given string with given dataset | |
first returned value will be similar word | |
seccond value is accuracy | |
""" | |
def find_similar(search_for, dataset): | |
res = [] |
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
import pafy | |
import vlc | |
url = "https://www.youtube.com/watch?v=5qap5aO4i9A" | |
video = pafy.new(url) | |
best = video.getbest() | |
playurl = best.url | |
Instance = vlc.Instance() | |
player = Instance.media_player_new() |
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 ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"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
if bmi < 18.5 { | |
fmt.Println(bmi) | |
fmt.Println("Underweight") | |
} else if bmi < 25 { | |
fmt.Println(bmi) | |
fmt.Println("Normal") | |
} else if bmi < 30 { | |
fmt.Println(bmi) | |
fmt.Println("Overweight") | |
} else if 30 < bmi { |
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
f := i2 * i2 | |
bmi := float64(i) / f |
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 ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"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 | |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"strconv" | |
"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 "bufio" | |
func main() { | |
reader := bufio.NewReader(os.Stdin) | |
a, err := reader.ReadString('\n') | |
if err != nil { | |
panic("input error") | |
} |
NewerOlder