This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute pathogen#infect() | |
syntax on | |
filetype indent plugin on | |
set nocompatible | |
set nu | |
set mouse=ar mousemodel=extend | |
set wildmode=longest,list,full | |
set wildmenu | |
set fileformat=unix | |
set fileformats=unix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import csv | |
""" | |
Example Input CSV | |
first_name address1 address2 city state zip email | |
John Doe 111 Middlefield Road Redwood City CA 94063 [email protected] | |
Jane Doe 111Middlefield Road Redwood City CA 94063 [email protected] | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import pandas as pd | |
import numpy as np | |
import time | |
import sqlalchemy as sa | |
import gc | |
from guppy import hpy | |
def obj_size_fmt(num): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from page_1 import * | |
from page_2 import * | |
server = app.server | |
if __name__ == '__main__': | |
app.run_server(debug=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==================================================================================================== FAILURES ===================================================================================================== | |
_________________________________________________________________________________________ test_custom_view_with_ordering __________________________________________________________________________________________ | |
token = <Token: 5502f6196a82da5016b0c5b58ee83cd02968c6d9> | |
examplefortesting = [<ExampleForTesting: ExampleForTesting object (150)>, <ExampleForTesting: ExampleForTesting object (151)>, <ExampleFor...bject (152)>, <ExampleForTesting: ExampleForTesting object (153)>, <ExampleForTesting: ExampleForTesting object (154)>] | |
@pytest.mark.django_db | |
def test_custom_view_with_ordering(token, examplefortesting): | |
"""Test ordering query returns csv with specified order""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(data_warehouse) | |
┌───=[ mikela :: debian -( 0 )-[ ~/pivot/data_warehouse ] | |
└──(python --version | |
Python 3.7.1 | |
(data_warehouse) | |
┌───=[ mikela :: debian -( 0 )-[ ~/pivot/data_warehouse ] | |
└──(ipython | |
Python 3.7.1 (default, Oct 23 2018, 19:19:42) | |
Type 'copyright', 'credits' or 'license' for more information | |
IPython 7.1.1 -- An enhanced Interactive Python. Type '?' for help. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Compile assets | |
shell: 'source /home/rails/.bashrc && env | grep RBENV' | |
args: | |
chdir: "/home/rails/lims" | |
executable: /bin/sh | |
become_user: rails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from django.apps import apps | |
from bulk_importer import models | |
BULKABLE_MODELS = [] | |
class BulkableAdmin(admin.ModelAdmin): | |
readonly_fields = ('created_at', 'updated_at', 'imported_from') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_form_from_model_name(full_model_name): | |
app_label, model_name = full_model_name.split(".") | |
form_model = apps.get_model(app_label, model_name) | |
fields = form_model._meta.fields | |
name_fields = [] | |
for field in fields: | |
if field.related_model and (issubclass( | |
field.related_model, | |
bi_models.NamedBulkable) or issubclass( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create user django with password 'password'; | |
create schema django authorization django; | |
create user rails with password 'password'; | |
create schema rails authorization rails; | |
create extension hstore; | |
create extension pg_trgm schema rails; | |
grant USAGE on SCHEMA rails to django; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA rails revoke all on tables from django; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA rails grant select on tables to django; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA rails revoke all on sequences from django; |
NewerOlder