-
Go to your
bucket dashboard
-
Click on the bucket where is stored the resource you want to download
-
Go to
Permissions
tab -
Add a new member
with the gmail account your are going to use in your Colab -
Give
to this member the requiredpermissions
(Admin, List, Create,...)5.b. Admin permissions will work!
-
In your
Colab Notebook
, execute the following commands:
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
# coding=utf-8 | |
# Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
# | |
# 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 |
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
<svg id="patternSVG" xmlns="http://www.w3.org/2000/svg"> | |
<defs> | |
<pattern id="sqrs" width="20" height="20" patternUnits="userSpaceOnUse" id="pulseBg" viewBox="0 0 20 20" > | |
<rect class="grid" x="0" y="0" width="20" height="20" fill="none"/> | |
</pattern> | |
</defs> | |
<rect id="grid" class="grid" fill="url(#sqrs)" width="100%" height="100%" /> | |
</svg> |
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
class NlpRawTextDataset(Dataset): | |
def __init__(self, tokenizer, file_path: str, block_size: int): | |
self.tokenizer = tokenizer | |
self.file_path = file_path | |
self.block_size = block_size | |
print("Loading Dataset...") | |
self.dataset = load_dataset("text", data_files=file_path)["train"] | |
print("Loaded Dataset!") |
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
function shallowEqual(obj1, obj2) { | |
const keys1 = Object.keys(obj1); | |
if (keys1.length == | |
Object.keys(obj2).length) return | |
false; | |
for (const k1 of keys1) { | |
if (!(k1 in obj2)) return false; | |
if (obj1[k1] !== obj2[k1]) return | |
false; | |
} |
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
(XJ Bs | |
wget -0 translation.py | |
Ig NGL | |
7 ; PE TE Da MAR a SERS | |
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
const compareObjects = (a, b) => { | |
if (a === b) return true; | |
if (typeof a != 'object' || typeof b != 'object' || a == null || b == null) return false; | |
let keysA = Object.keys(a), keysB = Object.keys(b); | |
if (keysA.length != keysB.length) return false; | |
for (let key of keysA) { |
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
class LazyTextDataset(Dataset): | |
def __init__(self, filename): | |
self._filename = filename | |
self._total_data = 0 | |
self._total_data = int(subprocess.check_output("wc -l " + filename, shell=True).split()[0]) | |
def __getitem__(self, idx): | |
line = linecache.getline(self._filename, idx + 1) | |
csv_line = csv.reader([line]) | |
return next(csv_line) |
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
"################################################################################\n", | |
"# INSTALL CONDA ON GOOGLE COLAB\n", | |
"################################################################################\n", | |
"! wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh\n", | |
"! chmod +x Miniconda3-py37_4.8.2-Linux-x86_64.sh\n", | |
"! bash ./Miniconda3-py37_4.8.2-Linux-x86_64.sh -b -f -p /usr/local\n", | |
"import sys\n", | |
"sys.path.append('/usr/local/lib/python3.7/site-packages/')" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder