Skip to content

Instantly share code, notes, and snippets.


Dale McDiarmid gingerwizard

View GitHub Profile
View customer_contacts.csv
id first_name last_name email gender skills department job_title company
1 Larine Schulz Female WiFi Human Resources Analog Circuit Design manager Rhybox
2 Clo Matussov Female VDM Marketing Structural Engineer Feedfish
3 Dwight Turnock Male Jerseys Support Administrative Officer Youspan
4 Allene Bantick Female NS2 Research and Development Clinical Specialist Wordtune
5 Olivette Revey Female HDPE Marketing GIS Technical Architect Dabshots
6 Ashbey Lock Male Feature Films Product Management Product Engineer Linklinks
7 Berkie Managh Male SAP PM Module Accounting Associate Professor Gigabox
8 Radcliffe Ayling Male HCV Product Management Junior Executive Flashspan
9 Wendye L'Hommee Female EBPP Product Management Nurse Practicioner Divavu
import json
import re
from itertools import islice, chain
from elastic_workplace_search import Client
import os
import requests
#converts camel case fields from trello to workplace search's prefered snake case
pattern = re.compile(r'(?<!^)(?=[A-Z])')
gingerwizard / download
Created Jan 21, 2020
Code for image search
View download
import argparse
import glob
import gzip
import imghdr
import urllib.request
import os
import ast
import multiprocessing
View sha256.painless
int[] HS() {
return new int[] {
(int) 0x6a09e667L,
(int) 0xbb67ae85L,
(int) 0x3c6ef372L,
(int) 0xa54ff53aL,
(int) 0x510e527fL,
(int) 0x9b05688cL,
(int) 0x1f83d9abL,
(int) 0x5be0cd19L
View Produce pipelines
import argparse
import json
import yaml
import os
import sys
parser = argparse.ArgumentParser()
#es details
parser.add_argument('--ecs_migration_file', dest='ecs_migration_file', required=False, default='./ecs-migration.yml')
View example user declaration
"password": "secret/eden/sec19/es_users/kibana_user",
"roles": [
"full_name": "AMA App",
"email": ""
View ES Response
This file has been truncated, but you can view the full file.
"took" : 7,
"timed_out" : false,
"_shards" : {
"total" : 15,
"successful" : 15,
"skipped" : 0,
"failed" : 0
View SQL Queries
1. Spotfire makes the following in order to identify column values for drill down
SELECT DISTINCT m1.applicant_ethnicity_name AS APPLICANTETHNICITYNAME FROM morgages_large m1 WHERE (m1.applicant_ethnicity_name IS NOT NULL) ORDER BY APPLICANTETHNICITYNAME
"error": {
"root_cause": [
"type": "planning_exception",
"reason": "Fail to plan items {UnplannedExec[Distinct[]]@1:8}"
gingerwizard / demo template
Created Aug 10, 2017
Template for main index on ecommerce demo
View demo template
"cyclops": {
"aliases": {},
"mappings": {
"product": {
"properties": {
"attributes": {
"properties": {
"color": {
"type": "text",
View product
"primary_image": {
"id": 56871
"on_offer": false,
"discount_amount": 0,
"default_price": 20.99,
"rating": 4,
"description": """upper_material_clothing:95% polyester, 5% spandex;productmodel_length:24.5 " (Size 8);pattern:plain;model_height:Our model is 71.5 " tall and is wearing size 8;washing_instructions:do not tumble dry;washing_instructions:machine wash at 30°C;washing_instructions:Machine wash on gentle cycle;sleeve_length_option:sleeveless;correct_fit:regular;shirt_collar_type:Mandarin collar;clothing_length:standard""",
"discount_percentage": 0,
You can’t perform that action at this time.