- https://www.w3.org/2001/sw/sweo/public/UseCases/FAO/
- presentation on event in 2010
- Yummly food processor
- FOODpedia, linked data for food products
- Semantic web and GS1 (presentation)
- Example of how to use a semantic web of food
- OpenFoodFacts food product ontology notes, you can download a full products RDF dump
- Linked open data for halal food products - nice usage example
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
#!/usr/bin/env python | |
import logging | |
import os | |
import threading | |
import time | |
from multiprocessing import Process | |
from queue import Queue | |
from confluent_kafka import Consumer |
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 torch | |
import io | |
import pandas as pd | |
import gc | |
import numpy as np | |
import transformers | |
''' | |
Original Code Author [@dlibenzi](https://github.com/dlibenzi) |
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 PIL import Image | |
import numpy as np | |
import hashlib | |
import os | |
import sys | |
import torch | |
import torch_xla.utils.tf_record_reader as tfrr | |
a = """ | |
image/class/label tensor([82]) |
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 random | |
from itertools import chain, cycle, islice | |
import torch.utils.data as data | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Rectangle | |
import time | |
import torch | |
import numpy as np |
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 nltk | |
# interactive download | |
# nltk.download() | |
nltk.download('punkt') | |
extra_abbreviations = [ | |
"ps", | |
"inc", | |
"corp", |
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 PIL import Image | |
import numpy as np | |
import sys | |
import torch | |
import torch_xla.utils.tf_record_reader as tfrr | |
a = """ | |
image/class/label tensor([82]) | |
image/class/synset n01796340 | |
image/channels tensor([3]) |
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 pandas as pd | |
def which(series): | |
# Error handling omitted | |
if not isinstance(series, pd.Series): | |
series = pd.Series(series) | |
return series[series.astype(bool) == True].index.tolist() | |
# Way to extend a Series | |
# See: https://pandas.pydata.org/pandas-docs/stable/development/extending.html#registering-custom-accessors |
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 os | |
import requests | |
import json | |
SLACK_WEBHOOK= os.environ.get("SLACK_WEBHOOK") | |
def send_message(messages, channel="abhishek", username="beast"): | |
""" | |
:param messages: list of texts |
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
# coding=utf-8 | |
# Copyright 2018 The HuggingFace Inc. team. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |