I hereby claim:
- I am narsil on github.
- I am narsil (https://keybase.io/narsil) on keybase.
- I have a public key ASA0iSmgSGy3xxf0r7decSA-ORbe1JE3EzQDA-m_SAnGmAo
To claim this, I am signing this object:
| from transformers import pipeline | |
| import random | |
| from torch.utils.data import Dataset | |
| import tqdm | |
| pipe = pipeline("text-classification", device=0) | |
| class MyDataset(Dataset): |
| from transformers import pipeline | |
| from torch.utils.data import Dataset | |
| import tqdm | |
| pipe = pipeline("text-classification", device=0) | |
| class MyDataset(Dataset): | |
| def __len__(self): |
| from datasets import load_dataset, Dataset as hf_Dataset | |
| from transformers import pipeline | |
| from transformers.pipelines.zero_shot_classification import Scoring | |
| from tqdm import tqdm | |
| from random import shuffle | |
| from typing import List | |
| from pprint import pprint | |
| from collections import defaultdict | |
| import json |
| import os | |
| os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" | |
| import copy | |
| import re | |
| import importlib | |
| import os | |
| import tempfile | |
| from collections import OrderedDict |
| TEXT = """Mr. Phileas Fogg lived, in 1872, at No. 7, Saville Row, Burlington | |
| Gardens, the house in which Sheridan died in 1814. He was one of the | |
| most noticeable members of the Reform Club, though he seemed always to | |
| avoid attracting attention; an enigmatical personage, about whom little | |
| was known, except that he was a polished man of the world. People said | |
| that he resembled Byron--at least that his head was Byronic; but he was | |
| a bearded, tranquil Byron, who might live on a thousand years without | |
| growing old. | |
| Certainly an Englishman, it was more doubtful whether Phileas Fogg was |
| from transformers import pipeline | |
| import time | |
| n = 50 | |
| nlp_token_class_cpu = pipeline("ner") | |
| start = time.time() | |
| resp = nlp_token_class_cpu(["Hugging Face is a French company based in New-York."] * n) | |
| print("Device: CPU") | |
| print(f"No. examples: {n}") |
| # Scripts-9.0.0.txt | |
| # Date: 2016-06-01, 10:34:37 GMT | |
| # © 2016 Unicode®, Inc. | |
| # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. | |
| # For terms of use, see http://www.unicode.org/terms_of_use.html | |
| # | |
| # Unicode Character Database | |
| # For documentation, see http://www.unicode.org/reports/tr44/ | |
| # For more information, see: | |
| # UAX #24, Unicode Script Property: http://www.unicode.org/reports/tr24/ |
| #!/usr/bin/perl | |
| # Copyright 2016 Google Inc. | |
| # | |
| # 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 | |
| # |
| use rayon::prelude::*; | |
| use std::collections::HashMap; | |
| fn main() { | |
| let buf = std::fs::read_to_string("data/big.txt").unwrap(); | |
| let word_count = buf | |
| .par_lines() | |
| .map(|line| { | |
| let mut frequency: HashMap<&str, u32> = HashMap::new(); | |
| for word in line.split(' ') { |
I hereby claim:
To claim this, I am signing this object: