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
/* 1. Import Libraries */ | |
import UIKit | |
import CoreML | |
import Vision | |
class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { | |
/* 2. Declare variables for our views */ | |
@IBOutlet weak var imageView: UIImageView! | |
@IBOutlet weak var textView: UILabel! | |
let imagePicker = UIImagePickerController() |
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" | |
"log" | |
"os" | |
) | |
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
irisCsv, err := os.Open("data/iris.csv") | |
if err != nil { | |
log.Fatal(err) | |
} |
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
head := df.Subset([]int{0, 3}) | |
fmt.Println(head) |
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
virginicaOnly := df.Filter(dataframe.F{ | |
Colname: "variety", | |
Comparator: "==", | |
Comparando: "Virginica", | |
}) | |
fmt.Println(virginicaOnly) |
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
gtFiltered := df.Filter(dataframe.F{ | |
Colname: "sepal.length", | |
Comparator: ">", | |
Comparando: 7, | |
}) | |
fmt.Println(gtFiltered) |
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
attrFiltered := df.Select([]string{"sepal.length", "sepal.width"}) | |
fmt.Println(attrFiltered) |
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 numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from matplotlib import rcParams | |
rcParams['axes.spines.top'] = False | |
rcParams['axes.spines.right'] = False | |
df = pd.read_csv('winequality-white.csv', sep=';') | |
df.head() |
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
df['quality'] = ['Good' if quality >= 7 else 'Bad' for quality in df['quality']] |
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
ax = df['quality'].value_counts().plot(kind='bar', figsize=(10, 6), fontsize=13, color='#087E8B') | |
ax.set_title('Counts of Bad and Good vines', size=20, pad=30) | |
ax.set_ylabel('Count', fontsize=14) | |
for i in ax.patches: | |
ax.text(i.get_x() + 0.19, i.get_height() + 100, str(round(i.get_height(), 2)), fontsize=15) |
OlderNewer