This file contains hidden or 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
| (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 ~~~~ |
This file contains hidden or 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 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] |
This file contains hidden or 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 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 |
This file contains hidden or 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
| 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, |
This file contains hidden or 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
| { | |
| "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": { |
This file contains hidden or 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
| 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 |
This file contains hidden or 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 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) |
This file contains hidden or 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 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 |
This file contains hidden or 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 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 |
This file contains hidden or 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
| 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); |
OlderNewer