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 | |
URL_BASE = { | |
'local': 'http://localhost:8000', | |
'staging': 'https://api.staging.internal.capsulerx.com' | |
} | |
CREDENTIALS = { | |
'local': ('jandrango@capsulecares.com', 'hellodear'), |
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
SELECT | |
"capsule_core_patientmedication"."id", "capsule_core_patientmedication"."should_process_refill", "capsule_core_patientmedication"."standard_fill_size", "capsule_core_patientmedication"."next_refill_date", "capsule_core_patientmedication"."medication_id", "capsule_core_medication"."primary_name", "capsule_core_medication"."secondary_name", "capsule_core_medication"."control_schedule", "capsule_core_medication"."mixing_type", "capsule_core_medication"."refrigeration_type", "capsule_core_medication"."strength", "capsule_core_medication"."unknown_status", "capsule_core_patientmedication"."last_delivered_fill_id", "capsule_core_prescriptionfulfillment"."price", "capsule_core_prescriptionfulfillment"."price_at_checkout", "capsule_core_prescriptionfulfillment"."should_waive_copay", "capsule_core_prescriptionfulfillment"."updated_at", "capsule_core_patientmedication"."upcoming_fill_id", T5."price", T5."price_at_checkout", T5."should_waive_copay", T5."updated_at", "capsule_core_patientmedication"."active_rx_i |
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
SELECT | |
"capsule_core_patientmedication"."id", "capsule_core_patientmedication"."deleted_at", "capsule_core_patientmedication"."created_at", "capsule_core_patientmedication"."updated_at", "capsule_core_patientmedication"."is_hidden", "capsule_core_patientmedication"."active_rx_id", "capsule_core_patientmedication"."last_delivered_fill_id", "capsule_core_patientmedication"."upcoming_fill_id", "capsule_core_patientmedication"."medication_id", "capsule_core_patientmedication"."next_refill_date", "capsule_core_patientmedication"."patient_id", "capsule_core_patientmedication"."retrieval_preference", "capsule_core_patientmedication"."should_process_refill", "capsule_core_patientmedication"."should_precheck_next_fill", "capsule_core_patientmedication"."standard_fill_size", "capsule_core_patientmedication"."status", "capsule_core_prescription"."id", "capsule_core_prescription"."deleted_at", "capsule_core_prescription"."created_at", "capsule_core_prescription"."updated_at", "capsule_core_prescription"."patient_medic |
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 bst(): | |
pass |
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
// Uses node v6 | |
var fs = require('fs'); | |
var filename = Buffer.from('file_with_invalid_character\u0008.txt').toString(); | |
fs.writeFile(filename, 'body', function(err) { | |
console.log('done', err); | |
}); |
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
require('./../lib/env'); | |
Product.get('prototype-movie-2151', function(err, product) { | |
if (err) throw err; | |
console.log(testUniqueness(product, 1000, 1000, 300) ? 'passed' : 'failed'); | |
}); | |
function populateProductWithFakeUniqueVariants(product, count) { | |
product.variants = {}; | |
for (var i = 0; i < count; i++) { |
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
// https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour | |
// Answer to prob#5 | |
function dfs(currentPath, currentValue, str) { | |
var strLen = str.length; | |
if (strLen < 2) { | |
if (strLen === 0 || str === '') { | |
if (currentValue === 100) console.log(currentPath); | |
} else { | |
var lastValue = parseInt(str, 10); |
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
//https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour?utm_content=bufferf0b7c&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer | |
function getLargestNumber(list) { | |
var i, str, strLen; | |
var listLen = list.length; | |
var largestNumDigits = 0; | |
var strList = []; | |
var sameLengthList = []; |