Instantly share code, notes, and snippets.

💭
retarded as always

# Clark Daniel P. AlmazanClarkAlmazan

💭
retarded as always
• Sort options
Last active Oct 18, 2017
I don't get what kind of parameters are to be used in the Coderbyte exercise, but I "think" I managed to solve the actual problem anyways. So here's a Scale Balancing function that accepts a list containing two lists. The first list contains the two weights of the scales, while the second list holds the available weights to use. Sample input for…
View coderbyte_scalebalancing.py
 def ScaleBalancing(strArr): # code goes here balance = int(strArr[0][0]) - int(strArr[0][1]) #if negative, right is heavier, else left is heavier weights = [] need = 1 for i in strArr[1]: #see if one weight can fix the imbalance if abs(balance)-int(i)==0: weights.append(i) return weights
Created Apr 27, 2017 — forked from ejcabarles/import.sql
Mock Data
View import.sql
 INSERT INTO user VALUES (1,'asmith0','\$2a\$10\$lwsdMs1oR3xqKtz0lVTIIOd7H/1t8TpZuVmYPwcjtS067HnZiIzxy','jhawkins0@tuttocitta.it','(577)399-7885','A',0); INSERT INTO user VALUES (2,'jramirez1','\$2a\$10\$TsvjLdfO.NnDul03QKy.8uppWDR.8L5hmfWFIbFbpPvJwEq304Os.','tjenkins1@amazon.co.uk','(160)503-6933','A',1); INSERT INTO user VALUES (3,'mwillis2','\$2a\$10\$jmoDlpASfAZzNddnK0u8T.wCHJACaeoC2WlzY6Cv.Yud6BWEadK3e','adean2@1688.com','(430)228-8448','A',0); INSERT INTO user VALUES (4,'ehawkins3','\$2a\$10\$p1LjciDnvKkzRQim2ZzLmOK5gqC3YgtIsyfs2iXssswenKDyf9GN2','alawson3@nih.gov','(560)849-2974','A',0); INSERT INTO user VALUES (5,'wfox4','\$2a\$10\$kOv6fuMZ3SjLLXh6QmP4Yu5qDlQ3E6BtMvRodXGvbUu.uKpa4VMg.','jmurphy4@vistaprint.com','(363)197-8873','A',1); INSERT INTO user VALUES (6,'rkelley5','\$2a\$10\$Axk3jgfsYL.zx1ejWS4AquwK6Q9yA6hBkrNPwfB32h.ONrSrnTDDy','jreyes5@cloudflare.com','(469)532-8744','A',1); INSERT INTO user VALUES (7,'acampbell6','\$2a\$10\$ns3v7Ta7UZNYVLWZt/17Ku1O431a3ibz6Qk62vDsOKKKmRcAn24T6','mharrison6@cargocollective.com','
Last active Apr 16, 2017 — forked from ejcabarles/import.sql
Mock data for us
View import.sql
 INSERT INTO user VALUES (1,'asmith0','\$2a\$10\$lwsdMs1oR3xqKtz0lVTIIOd7H/1t8TpZuVmYPwcjtS067HnZiIzxy','jhawkins0@tuttocitta.it','62-(577)399-7885','A',0); INSERT INTO user VALUES (2,'jramirez1','\$2a\$10\$TsvjLdfO.NnDul03QKy.8uppWDR.8L5hmfWFIbFbpPvJwEq304Os.','tjenkins1@amazon.co.uk','358-(160)503-6933','A',1); INSERT INTO user VALUES (3,'mwillis2','\$2a\$10\$jmoDlpASfAZzNddnK0u8T.wCHJACaeoC2WlzY6Cv.Yud6BWEadK3e','adean2@1688.com','48-(430)228-8448','A',0); INSERT INTO user VALUES (4,'ehawkins3','\$2a\$10\$p1LjciDnvKkzRQim2ZzLmOK5gqC3YgtIsyfs2iXssswenKDyf9GN2','alawson3@nih.gov','86-(560)849-2974','A',0); INSERT INTO user VALUES (5,'wfox4','\$2a\$10\$kOv6fuMZ3SjLLXh6QmP4Yu5qDlQ3E6BtMvRodXGvbUu.uKpa4VMg.','jmurphy4@vistaprint.com','62-(363)197-8873','A',1); INSERT INTO user VALUES (6,'rkelley5','\$2a\$10\$Axk3jgfsYL.zx1ejWS4AquwK6Q9yA6hBkrNPwfB32h.ONrSrnTDDy','jreyes5@cloudflare.com','63-(469)532-8744','A',1); INSERT INTO user VALUES (7,'acampbell6','\$2a\$10\$ns3v7Ta7UZNYVLWZt/17Ku1O431a3ibz6Qk62vDsOKKKmRcAn24T6','mharrison6@car
You can’t perform that action at this time.