{
  "id": 265250,
  "title": "How to iterate over /index",
  "url": "/competitions/landmark-retrieval-2021/discussion/265250",
  "author_name": "",
  "post_date": "2021-08-15T07:26:46.123992800Z",
  "votes": 2,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I am a bit confused on how to iterate over <code>/index</code> folder since we are not provided with any .csv. Is there some easier way to do so in python other than <code>os.listdir()</code>? Any help would be appreciated </p>",
  "messages": [
    {
      "id": "1472870",
      "postDate": "08/15/2021 07:26:46",
      "content": "<p>I am a bit confused on how to iterate over <code>/index</code> folder since we are not provided with any .csv. Is there some easier way to do so in python other than <code>os.listdir()</code>? Any help would be appreciated </p>",
      "rawMarkdown": "I am a bit confused on how to iterate over `/index` folder since we are not provided with any .csv. Is there some easier way to do so in python other than `os.listdir()`? Any help would be appreciated",
      "votes": null
    },
    {
      "id": "1472966",
      "postDate": "08/15/2021 08:49:53",
      "content": "<p>I used this one liner to generate a text file with all the names:</p>\n<pre><code>find index -type f -name \"*.jpg\" &gt; index.txt\n</code></pre>\n<p>if you want to use python you can always do something like this:</p>\n<pre><code>import os\nfrom glob import glob\n\nfnames = glob(os.path.join('index', *['*'] * 3, '*.jpg'))\n</code></pre>",
      "rawMarkdown": "I used this one liner to generate a text file with all the names:\n```bash\nfind index -type f -name \"*.jpg\" > index.txt\n```\nif you want to use python you can always do something like this:\n```python\nimport os\nfrom glob import glob\n\nfnames = glob(os.path.join('index', *['*'] * 3, '*.jpg'))\n```",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1472966,
      "author_name": "ronigur",
      "author_url": "",
      "post_date": "08/15/2021 08:49:53",
      "content": "<p>I used this one liner to generate a text file with all the names:</p>\n<pre><code>find index -type f -name \"*.jpg\" &gt; index.txt\n</code></pre>\n<p>if you want to use python you can always do something like this:</p>\n<pre><code>import os\nfrom glob import glob\n\nfnames = glob(os.path.join('index', *['*'] * 3, '*.jpg'))\n</code></pre>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1472870": "I am a bit confused on how to iterate over `/index` folder since we are not provided with any .csv. Is there some easier way to do so in python other than `os.listdir()`? Any help would be appreciated",
    "1472966": "I used this one liner to generate a text file with all the names:\n```bash\nfind index -type f -name \"*.jpg\" > index.txt\n```\nif you want to use python you can always do something like this:\n```python\nimport os\nfrom glob import glob\n\nfnames = glob(os.path.join('index', *['*'] * 3, '*.jpg'))\n```"
  },
  "source": "meta"
}