Skip to content

Instantly share code, notes, and snippets.

View alacret's full-sized avatar
😎
Conquering the World!

Angel Lacret alacret

😎
Conquering the World!
View GitHub Profile
(mintur)alacret@alacret-VIT-P2400:~/workspace/mintur$
(mintur)alacret@alacret-VIT-P2400:~/workspace/mintur$ ./scripts/remake_db.sh
~~~~ Deleting database ~~~~
~~~~ Recreate database ~~~~
~~~~ Deleting Documents ~~~~
~~~~ synchronizing database ~~~~
def verificar_existencia(codigo_referencia, monto_total):
"""
Función encarga de verifica si existe un pago con un código de referencia y un monto total
igual, registrado en la base de datos
:param codigo_referencia:
:param monto_total:
:return None => Si no existe, Pago<Object> => si es encontrado el registro en la base de datos:
"""
codigo_seguridad_ = codigo_referencia[-2:]
codigo_referencia_ = codigo_referencia[:-2]
import json
import requests
import binascii
import os
from rest_framework import mixins, viewsets, permissions, views, status
from accounts import models as accounts_models
from accounts import permissions as accounts_permissions
from accounts import serializers as accounts_serializers
WITH data3 AS(
WITH data2 AS (
WITH data1 as (
SELECT
p.id,
p.sku,
p.name,
p.ordering_multiplier,
p.minimum_desired_quantity,
qs.quantity as on_hand,
{
"response": {
"profile": {
"_id": "google-oauth2|113413420510860642071",
"nickname": "andersonav37",
"name": "Anderson",
"picture": "https://lh5.googleusercontent.com/-Ky_oFDkO4Pk/AAAAAAAAAAI/AAAAAAAAAk0/WaqQTHta_Xk/photo.jpg",
"email": "[email protected]",
"email_verified": false,
"awardWallet": {
const NUMBER_CODE = {type: 4, render: (str)=> `<span style="color: orange">${str}</span>` };
const CODES = {
'(' : {type: 0, render: (str)=> `${str}` },
')' : {type: 0, render: (str)=> `${str}` },
'F' : {type: 1, render: (str)=> `<span style="color: pink">${str}</span>` },
'L' : {type: 2, render: (str)=> `<span style="color: red">${str}</span>` },
'R' : {type: 3, render: (str)=> `<span style="color: green">${str}</span>` },
};
function highlight(code) {
// Implement your syntax highlighter here
def split_terms(equation):
split_terms = []
chr_buffer = []
for chr in equation:
if chr in ["+", "-"]:
if len(chr_buffer) > 0:
split_terms.append(''.join(chr_buffer))
chr_buffer = [chr]
else:
chr_buffer.append(chr)
def multiplication_table(rows,cols):
result = []
for row in range(rows):
result_row = []
for col in range(cols):
result_row.append((row + 1) * (col + 1))
result.append(result_row)
return result
def persistence(n):
i = 0
if len(str(n)) == 1:
return i
while len(str(n)) > 1:
i += 1
str_n = str(n)
list_n = list(str_n)
n = 1
function looseChange(cents){
var coins = {'Nickels': 0, 'Pennies':0, 'Dimes':0, 'Quarters':0};
if (cents <= 0) {
return coins;
}
cents = Math.floor(cents);
coins.Quarters = Math.floor(cents / 25);