Skip to content

Instantly share code, notes, and snippets.

View eduardogpg's full-sized avatar
🏠
Working from home

Eduardo Ismael García Pérez eduardogpg

🏠
Working from home
View GitHub Profile
@eduardogpg
eduardogpg / main.py
Created February 4, 2024 02:20
Reto del día lunes
print("Hello World")
@eduardogpg
eduardogpg / public_sentences.sql
Last active February 5, 2024 10:12
public_sentences.sql
-- SCHEMA
DROP TABLE IF EXISTS project_employees;
DROP TABLE IF EXISTS projects;
DROP TABLE IF EXISTS employees;
CREATE TABLE IF NOT EXISTS employees (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(100) NOT NULL,
describe EasyBrokerAPI do
describe '#retrieve_properties' do
context 'when API returns an error' do
it 'returns nil' do
api = EasyBrokerAPI.new('000000000000', page: 1, limit: 20)
expect(api.retrieve_properties).to be_nil
end
end
end
require 'uri'
require 'net/http'
require 'json'
class EasyBrokerAPI
BASE_URL = "https://api.stagingeb.com/v1/properties"
def initialize(access_token, page: 1, limit: 20)
@page = page
@limit = limit
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>file_1704067827986</title>
<style type="text/css"> * {margin:0; padding:0; text-indent:0; }
.p, p { color: black; font-family:Arial, sans-serif; font-style: normal; font-weight: normal; text-decoration: none; font-size: 8pt; margin:0pt; }
.s1 { color: black; font-family:"Lucida Sans Unicode", sans-serif; font-style: normal; font-weight: normal; text-decoration: none; font-size: 8pt; }
a { color: black; font-family:Arial, sans-serif; font-style: normal; font-weight: normal; text-decoration: none; font-size: 8pt; }
.s2 { color: black; font-family:"Lucida Sans Unicode", sans-serif; font-style: normal; font-weight: normal; text-decoration: none; font-size: 8pt; }
{
"name": "wayne",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/vue-fontawesome": "^3.0.1",
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"production": "mix --production"
},
from fabric.api import task
from fabric.api import local
from fabric.api import cd
from fabric.api import env
from fabric.api import prefix
from fabric.api import sudo
from fabric.api import run
from fabric.api import get
from fabric.api import put # scp
- Suma de listas: Escribe una función que tome dos listas como entrada y devuelva una nueva lista que contenga la suma de los elementos correspondientes de ambas listas.
- Número máximo y mínimo: Escribe una función que tome una lista de números como entrada y devuelva el número máximo y mínimo de la lista.
- Eliminar duplicados: Escribe una función que tome una lista como entrada y devuelva una nueva lista sin elementos duplicados.
- Palabras más largas: Escribe una función que tome una lista de palabras como entrada y devuelva una tupla, de un solo elemento, con las palabras más largas de la lista.
- Invertir lista: Escribe una función que tome una lista como entrada y devuelva una nueva lista con los elementos en orden inverso.
from pathlib import Path # > 3.6
from setuptools import setup
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
VERSION = '0.0.2'
DESCRIPTION =
PACKAGE_NAME =
AUTHOR = 'Eduardo Ismael García Pérez'