API Name | Memory | vCPUs | Physical Processor | Network Performance | Linux On Demand cost | Linux Reserved cost |
---|---|---|---|---|---|---|
a1.2xlarge | 16.0 GiB | 8 vCPUs | AWS Graviton Processor | Up to 10 Gigabit | $148.92 monthly | $93.80 monthly |
a1.4xlarge | 32.0 GiB | 16 vCPUs | AWS Graviton Processor | Up to 10 Gigabit | $297.84 monthly | $187.61 monthly |
a1.large | 4.0 GiB | 2 vCPUs | AWS Graviton Processor | Up to 10 Gigabit | $37.23 monthly | $23.43 monthly |
a1.medium | 2.0 GiB | 1 vCPUs | AWS Graviton Processor | Up to 10 Gigabit | $18.61 monthly | $11.75 monthly |
a1.metal | 32.0 GiB | 16 vCPUs | AWS Graviton Processor | Up to 10 Gigabit | $297.84 monthly | $187.61 monthly |
a1.xlarge | 8.0 GiB | 4 vCPUs | AWS Graviton Processor | Up to 10 Gigabit | $74.46 monthly | $46.93 monthly |
c1.medium | 1.7 GiB | 2 vCPUs | Intel Xeon Family | Moderate | $94.90 monthly | $66.43 monthly |
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
Map(98) { | |
'unspecified' => 6519, | |
'unknown' => 230, | |
'cc-by-4.0' => 131, | |
'cc-by-sa-4.0' => 76, | |
'mit' => 73, | |
'apache-2.0' => 41, | |
'cc0-1.0' => 40, | |
'cc-by-nc-sa-4.0' => 36, | |
'cc-by-nc-4.0' => 21, |
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 os | |
import subprocess | |
from huggingface_hub.hf_api import HfApi | |
from huggingface_hub.repository import Repository | |
os.makedirs("./Helsinki-NLP/", exist_ok=True) | |
os.environ["GIT_LFS_SKIP_SMUDGE"] = "1" | |
# Important, to not download the large files |
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
export class ModelInfo { | |
/** | |
* Key to config.json file. | |
*/ | |
key: string; | |
etag: string; | |
lastModified: Date; | |
size: number; | |
modelId: ModelId; | |
author?: AuthorId; |
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 logging | |
from transformers.modeling_bart import BartForSequenceClassification | |
from transformers.pipelines import TextClassificationPipeline | |
from transformers.tokenization_bart import BartTokenizer | |
logging.basicConfig(level=logging.INFO) | |
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
To get it to work please follow the steps: | |
1) Create test user by toggling the Authorize test users for this app and grant permissions "manage_pages" and "page_messaging". | |
2) Use the Edit Button and get an access token for this user (using v2.6). Please save this for later. | |
3) Use edit button to login as the test user | |
4) After login, create page as the test user | |
5) Use the user access token for the test user to get the page access token for this user. You can do this with the following call: | |
~~~ | |
https://graph.facebook.com/v2.6/me/accounts?access_token=<TEST_USER_ACCESS_TOKEN> | |
~~~ |
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 spacy | |
nlp = spacy.load('en') | |
doc = nlp(text) | |
# At this point entity annotations are in `doc.ents` | |
for token in doc: | |
print tok.ent_iob_ + '-' + mapping[tok.ent_type_] # `I-PER`, etc. |
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
func handleSentence(s: [Token]) { | |
let text = s.map { $0.text }.joined(separator: " ") | |
tagger.string = text | |
var charIdx = 0 | |
var prevDescr = "O" | |
for tok in s { | |
let iosTag = tagger.tag(at: charIdx, unit: .word, scheme: .nameType, tokenRange: nil) | |
let iosDescr = iosTag?.canonical ?? "O" | |
let outputLine = "\(tok.text) \(tok.goldTag) \(iob(iosDescr, prevDescr))" | |
output.append(outputLine) |
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
let tagger = NSLinguisticTagger(tagSchemes: [.nameType], options: 0) | |
let dataset: Dataset = .test | |
let url = Bundle.main.url(forResource: dataset.rawValue, withExtension: "txt")! | |
let content = try! String(contentsOf: url, encoding: .utf8).components(separatedBy: ["\n"]) | |
var output: [String] = [] | |
/// Map ios nlp tags to canonical tags. | |
extension NSLinguisticTag { | |
var canonical: String { | |
switch self { |
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
Index: web/javascript/transmission.js | |
=================================================================== | |
--- web/javascript/transmission.js (revision 14528) | |
+++ web/javascript/transmission.js (working copy) | |
@@ -519,43 +519,43 @@ | |
}, | |
dragenter: function(ev) { | |
- if (ev.dataTransfer && ev.dataTransfer.types) { | |
- var types = ["text/uri-list", "text/plain"]; |
NewerOlder