<commit_before>package main

import (
  "fmt"
  "os/exec"
  "io/ioutil"
  "encoding/json"
)

type Repo struct {
  RepoID       string
  RepoName     string
  RepoDesc     string
  SourceURL    string
  LocalPath    string
  Active       string
  ServerRoleID string
  Required     string
  IsRVStandard string
  StashProject string
}

var ending = `
     _____                     ____                  ____
    / ___/__  ______  _____   / __ \___  _______  __/ / /______
    \__ \/ / / / __ \/ ___/  / /_/ / _ \/ ___/ / / / / __/ ___/
   ___/ / /_/ / / / / /__   / _, _/  __(__  ) /_/ / / /_(__  )
  /____/\__, /_/ /_/\___/  /_/ |_|\___/____/\____/_/\__/____/
       /____/
`

func clone(repo Repo) {
  cmd := exec.Command("git", "clone", repo.SourceURL)
  cmd.Start()
  cmd.Wait()
  fmt.Print(cmd)
}

func main() {
  var repos []Repo
  r, _ := ioutil.ReadFile("./repos.json")
  err := json.Unmarshal(r, &repos)

  if err != nil {
    panic(err)
  }

  for key, _ := range repos {
    fmt.Print("\n")
    repo := repos[key]
    go func(repo Repo) {
      cmd := exec.Command("git", "clone", repo.SourceURL)
      cmd.Start()
      cmd.Wait()
      fmt.Print(cmd)
    }(&repo)
  }

  fmt.Print(ending)

  select{}
}<commit_msg>adding http get to repo subscription endpoint<commit_after>package main

import (
  "fmt"
	"encoding/json"
	"io/ioutil"
  "net/http"
	"os/exec"
)

type Repo struct {
	RepoID       string
	RepoName     string
	RepoDesc     string
	SourceURL    string
	LocalPath    string
	Active       string
	ServerRoleID string
	Required     string
	IsRVStandard string
	StashProject string
}

var ending = `
     _____                     ____                  ____
    / ___/__  ______  _____   / __ \___  _______  __/ / /______
    \__ \/ / / / __ \/ ___/  / /_/ / _ \/ ___/ / / / / __/ ___/
   ___/ / /_/ / / / / /__   / _, _/  __(__  ) /_/ / / /_(__  )
  /____/\__, /_/ /_/\___/  /_/ |_|\___/____/\____/_/\__/____/
       /____/
`

func main() {
	var repos []Repo
	var done = make(chan int)

  resp, _ := http.Get("http://intranet.redventures.net/admin/dev/repo_config/repo_ajax.php?action=get-user-repos&username=cworsley")
  body, _ := ioutil.ReadAll(resp.Body)
	err := json.Unmarshal(body, &repos)

	if err != nil {
		panic(err)
	}

	for key, _ := range repos {
		fmt.Print("\n")
		repo := repos[key]

		go func(repo Repo, done chan int) {
      fmt.Println("Cloning... %s", repo.RepoName)
			// cmd := exec.Command("git", "clone", repo.SourceURL)
      cmd := exec.Command("sleep", "5")
      cmd.Run()

			done <- 0
		}(repo, done)

		<-done
	}

	fmt.Print(ending)
}
{'fraction_non_alphanumeric': 0.16190108191653788, 'fraction_numerical': 0.0007727975270479134, 'mean_word_length': 1.8264192139737991, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1123988', 'n_tokens_mistral': 1032, 'n_tokens_neox': 985, 'n_words': 165}