Skip to content

Instantly share code, notes, and snippets.

View MikeFE's full-sized avatar

Mike G MikeFE

View GitHub Profile
@MikeFE
MikeFE / env_link_issue.py
Last active August 23, 2023 01:19
Demonstrating to_json() for entries returned by contentful_management aren't converting 'environment' Links to json.
@MikeFE
MikeFE / exercise-web-crawler.go
Created January 22, 2019 03:50
Final exercise in tour of Go
package main
import (
"fmt"
"sync"
)
var cache = make(map[string] bool)
var (
mux sync.Mutex
#!/usr/bin/env python3
import csv
import sys
def usage():
print('Usage: {} <authorityrecfile>'.format(sys.argv[0]))
def parse_row(original_row):
r = {}
""" Dump a set of user-friendly text files outlining all our ElasticSearch type mappings """
import json
type_props = []
def add_prop_and_remove_non_en_i18n(prop):
""" Do some extra logic to remove superfluous i18n fields that aren't 'en' """
if 'i18n' in prop and 'i18n.en' not in prop:
return