Skip to content

Instantly share code, notes, and snippets.

View erika-dike's full-sized avatar

Chukwuerika Dike erika-dike

View GitHub Profile
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-07 12:13
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
def load_testfunnels_from_fixture(apps, schema_editor):
from django.core.management import call_command

Keybase proof

I hereby claim:

  • I am andela-cdike on github.
  • I am erika_dike (https://keybase.io/erika_dike) on keybase.
  • I have a public key whose fingerprint is 2D8D 1348 4B92 5058 7FFD 1235 A30E 2E8F 2515 5417

To claim this, I am signing this object:

[
{
"feature_group": "Low Down Payment",
"feature_name": "Low Down Payment",
"order": 1,
"carriers": ["Metropolitan Insurance Service Consultants, Inc.", "The General Automobile Insurance Services, Inc."],
"icon": "IconFeaturesLowDownPayment"
},
{
"feature_group": "Buy Online",
[
{
"group_id": 1,
"name": "Low Down Payment",
"icon": "IconFeaturesLowDownPayment"
},
{
"group_id": 2,
"name": "Buy Online",
"icon": "IconFeaturesBuyOnline"
@erika-dike
erika-dike / carrier_feature_group.json
Created April 30, 2017 20:51
Just incase I am asked to update this. I don't want to repeat this task.
[
{
"feature_group": "Low Down Payment",
"feature_name": "Low Down Payment",
"order": 1,
"carriers": ["Metropolitan Insurance Service Consultants, Inc.", "The General Automobile Insurance Services, Inc."],
"icon": "IconFeaturesLowDownPayment"
},
{
"feature_group": "Buy Online",
{
"_id": {
"$oid": "..."
},
"short_name": "",
"name": "",
"logo": "",
"offices": [
{
"address": "",
@erika-dike
erika-dike / init_web_driver.py
Created June 28, 2017 08:34
Auto download pics for site
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
def init_driver():
driver = webdriver.Firefox()
driver.wait = WebDriverWait(driver, 5)
return driver
@erika-dike
erika-dike / save_image_to_file.py
Last active June 28, 2017 09:24
Auto download images from site
import shutil
def save_image_to_file(image, dirname, suffix):
with open('{dirname}/img_{suffix}.jpg'.format(dirname=dirname, suffix=suffix), 'wb') as out_file:
shutil.copyfileobj(image.raw, out_file)
@erika-dike
erika-dike / tie_it.py
Created June 28, 2017 09:29
Auto download images from site
import os
def make_dir(dirname):
current_path = os.getcwd()
path = os.path.join(current_path, dirname)
if not os.path.exists(path):
os.makedirs(path)