code: def main():
      start_date = pd.Timestamp("2014")
      end_date = pd.Timestamp("2015")
      symbols = "AAPL", "MSFT", "BRK_A", "ZEN"
      names = (
          "Apple Inc.",
          "Microsoft Corporation",
          "Berkshire Hathaway Inc. Class A",
          "Zendesk Inc",
      )
      print("Downloading equity data")
      for sym in symbols:
          url = format_wiki_url(
              api_key=None,
              symbol=sym,
              start_date=start_date,
              end_date=end_date,
          )
          print("Fetching from %s" % url)
          response = requests.get(url)
          response.raise_for_status()
  
          path = zipfile_path(sym)
          print("Writing compressed data to %s" % path)
          write_compressed(path, response.content)
  
      print("Writing mock metadata")
      cols = b"dataset_code,name,oldest_available_date,newest_available_date\n"
      metadata = cols + b"\n".join(
          b",".join(
              map(
                  methodcaller("encode", "ascii"),
                  (
                      symbol,
                      name,
                      str(start_date.date()),
                      str(end_date.date()),
                  ),
              )
          )
          for symbol, name in zip(symbols, names)
      )
      path = zipfile_path("metadata-1")
      print("Writing compressed data to %s" % path)
      write_compressed(path, metadata)
      path = zipfile_path("metadata-2")
      print("Writing compressed data to %s" % path)
      write_compressed(path, cols)
  
file_path: catalyst/tests/resources/quandl_samples/rebuild_samples.py
imports: from __future__ import print_function
  from operator import methodcaller
  import pandas
  import requests
  from catalyst.data.quandl import format_wiki_url
  from catalyst.testing import test_resource_path, write_compressed
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types