@@ -0,0 +1,2489 @@
+# coding=utf-8%0A# Copyright 2019 The TensorFlow Datasets Authors.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%22%22%22The rockyou dataset.%22%22%22%0A%0Afrom __future__ import absolute_import%0Afrom __future__ import division%0Afrom __future__ import print_function%0A%0Aimport os%0A%0Aimport tensorflow as tf%0Afrom tensorflow_datasets.core import api_utils%0Aimport tensorflow_datasets.public_api as tfds%0A%0A_CITATION = %22%22%22%5C%0A%22%22%22%0A%0A_DESCRIPTION = %22%22%22%5C%0AThis dataset contains passwords that were leaked or stolen from from various sites. The author of this dataset states that %22I'm hosting them because it seems like nobody else does (hopefully it isn't because hosting them is illegal :)). Naturally, I'm not the one who stole these; I simply found them online, removed any names/email addresses/etc.%22. This dataset is used to train Machine Learning models for password guessing and cracking. %0A%22%22%22%0A%0A_DOWNLOAD_URL = %22https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt%22%0A%0Aclass RockYou(tfds.core.GeneratorBasedBuilder):%0A  %22%22%22This dataset contains passwords that were leaked or stolen from from various sites.%22%22%22 %0A%0A  VERSION = tfds.core.Version('0.1.0')%0A%0A  def _info(self):%0A    return tfds.core.DatasetInfo(%0A        builder=self,%0A        description=_DESCRIPTION, %0A        features=tfds.features.FeaturesDict(%7B%0A            %22password%22: tfds.features.Text(encoder=tfds.features.text.ByteTextEncoder()), %0A        %7D),%0A        supervised_keys=None,%0A        urls=%5B%22https://wiki.skullsecurity.org/Passwords%22%5D,%0A        citation=_CITATION, %0A    )%0A%0A  def _split_generators(self, dl_manager):%0A    dl_path = dl_manager.download(_DOWNLOAD_URL)%0A    return %5B%0A        tfds.core.SplitGenerator(%0A            name=%22train%22,%0A            num_shards=10,%0A            gen_kwargs=%7B%0A                %22path%22: dl_path, %0A            %7D,%0A        )%0A    %5D %0A%0A  def _generate_examples(self, path):%0A    with tf.gfile.Open(path, %22rb%22) as f: %0A      for bline in f:%0A        yield%7B%0A            %22password%22: bline.strip(),   %0A        %7D%0A%0A%0A

add rock_you.py