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
| gst-launch-1.0 v4l2src device=/dev/video0 ! xvimagesink |
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 torchvision import datasets, models, transforms | |
| from PIL import Image | |
| import torch | |
| import matplotlib.pyplot as plt | |
| from pathlib import Path | |
| images = list(Path('../foo').glob('**/*.*')) | |
| example = images.pop() | |
| img = Image.open(example).convert('RGB') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| import prodigy | |
| from prodigy.components.loaders import Images | |
| from prodigy.util import split_string | |
| def add_label_to_stream(stream, label): | |
| for eg in stream: | |
| # The 'label' you get from the command line is a list | |
| # so let's just assume it's always one and take the first | |
| eg["label"] = label[0] | |
| yield eg |
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
| import numpy as np | |
| import shutil | |
| from sklearn.model_selection import train_test_split | |
| cats = ['negative', 'positives'] | |
| for cat in cats: | |
| print(cat) | |
| if not os.path.exists(data_folder + "/train/" + cat): | |
| os.makedirs(data_folder + "/train/" + cat) |
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
| Suppose that we want to break | |
| {Hello}, {World} | |
| into | |
| {Hello}, | |
| {World} | |
| do | |
| = SUBSTITUTE(B2, "}, {", CONCATENATE("'} ", char(10), "{")) |
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
| # One can check contributions/edits at | |
| # https://en.wikipedia.org/w/index.php?limit=50&title=Special%3AContributions&contribs=user | |
| # profile pages are at | |
| # https://en.wikipedia.org/wiki/User:USERNAME | |
| SELECT contributor_username, COUNT(id) AS counts | |
| FROM [bigquery-public-data:samples.wikipedia] | |
| WHERE comment LIKE '%grammar%' | |
| GROUP BY contributor_username | |
| ORDER BY counts DESC LIMIT 10; |
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
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. In euismod nisl vel tortor dignissim porttitor. Cras vitae auctor diam, sed bibendum magna. Mauris ut ligula tempus, ullamcorper sapien rhoncus, venenatis nisi. Suspendisse scelerisque, dolor eget vestibulum iaculis, tellus turpis eleifend libero, eget scelerisque purus risus vel magna. Nunc sit amet leo luctus, placerat ligula sit amet, elementum ipsum. Mauris consequat nibh vitae erat posuere ultrices. Morbi quis sem ac nisi porta dapibus. Etiam scelerisque non orci non luctus. | |
| Duis in risus quis nibh laoreet ornare ut in urna. Vivamus at turpis egestas, tempor nibh viverra, tristique metus. Aliquam interdum tristique sapien eu interdum. Sed non est efficitur, placerat turpis ultrices, tincidunt nibh. Phasellus nibh arcu, feugiat in arcu quis, egestas blandit velit. Morbi convallis feugiat magna. Etiam iaculis dui faucibus nisl congue efficitur. Aliquam erat volutpat. Proin vitae leo suscipit, lacinia nisi elementum, gravida diam. Suspendisse ornare, |