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
set expandtab smarttab | |
set shiftwidth=2 | |
set tabstop=2 | |
set number ruler | |
set nowrap backspace=indent,eol,start | |
set laststatus=2 | |
set linespace=0 | |
set cursorline | |
set cursorcolumn |
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
var fs = require('fs'); | |
module.exports = { | |
body : [ 'body.cart' ], | |
cache: { | |
eabled: false | |
}, | |
transform : function(req, response, body, $) { | |
var partials = req.app.hbsPartials; | |
var global_data = req.app.bb && req.app.bb.data && req.app.bb.data.partials.length ? req.app.data.partials : {}; |
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
if (/categories/.test($('body').data('path')) && $('nav.link-bar h3').length === 1) { | |
$(window).on('SSReady', function(){ | |
//soysauce.widgets[0].button.click(); | |
//$('nav.link-bar').data('ss-state', 'open'); | |
//$('nav.link-bar .subcategories').data('ss-state', 'open'); | |
//$('nav.link-bar h3').data('ss-state', 'open'); | |
}); | |
} |
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
request.get({url : 'https://lasamobi.com.br/LatLong/json/lojas.json', rejectUnauthorized: false }, function (error, response, body) { | |
console.log('request'); | |
storeData = JSON.parse(body); | |
}); |
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 os | |
import gspread | |
import json | |
gpass = os.environ['GPASS'] | |
gc = gspread.login('[email protected]', gpass) | |
sh = gc.open('irobot_FE_Translation_Final') | |
worksheet = sh.get_worksheet(0) | |
thekeys = worksheet.col_values(1) |
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
Are You There %filltext:name=field 1:default=God%? It's Me, Tommy | |
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 math | |
# quick test cases | |
A = [-7, 1, 5, 2, -4, 3, 0] | |
B = [1, 2, 3, 4, 3, 2, 1] | |
C = [99, 0, 66, 32, 1] | |
D = [1, -1, 1, -1, 1, -1, 1] | |
E = [0,0,0] | |
F = [0,53,9] | |
G = [0,1,-1] |
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
A = [-7, 1, 5, 2, -4, 3, 0] | |
def equi(A): | |
s = [] # array of equilibrium indices | |
for a in range(len(A)-1): # loop with '0 index' hack | |
x = A[:a+1] # split 'left' of the current index | |
y = A[a+2:] # split 'right' of the current index | |
n1 = 0 # this will be the total of the 'left' numbers |
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 time | |
import sys | |
// This sleeps for 10 secs, then prints a bunch of stars | |
for i in range(10): | |
time.sleep(1) | |
print '*', | |
// Same here | |
In [16]: for i in range(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
a = input("enter first number: ") | |
b = input("enter second number: ") | |
while b != 0: | |
if a > b: | |
a -= b | |
else: | |
b -= a | |
print a |
NewerOlder