Skip to content

Instantly share code, notes, and snippets.

View amireshoon's full-sized avatar
🎲

Amirhossein Meydani amireshoon

🎲
View GitHub Profile
@amireshoon
amireshoon / pnums.go
Last active August 14, 2020 11:43
Creating file and main content
package main
func main() {
}
@amireshoon
amireshoon / pnums.go
Created August 14, 2020 11:46
Reading input
package main
import "bufio"
func main() {
reader := bufio.NewReader(os.Stdin)
a, err := reader.ReadString('\n')
if err != nil {
panic("input error")
}
@amireshoon
amireshoon / pnums.go
Created August 14, 2020 11:49
Creating loop
package main
import "bufio"
func main() {
reader := bufio.NewReader(os.Stdin)
a, err := reader.ReadString('\n')
if err != nil {
panic("input error")
}
@amireshoon
amireshoon / pnums.go
Created August 14, 2020 11:51
Final figure
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
@amireshoon
amireshoon / app.go
Created September 3, 2020 12:42
Calculate BMI
package main
func main() {
}
@amireshoon
amireshoon / app.go
Created September 3, 2020 12:48
BMI
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
@amireshoon
amireshoon / app.go
Created September 3, 2020 12:51
BMI
f := i2 * i2
bmi := float64(i) / f
@amireshoon
amireshoon / app.go
Created September 3, 2020 12:52
BMI
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 {
@amireshoon
amireshoon / app.go
Created September 3, 2020 12:53
BMI
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
@amireshoon
amireshoon / similar.py
Created March 10, 2021 16:54
Get similar word from a given word
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 = []