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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import asyncio | |
import contextlib | |
import pathlib | |
import aiohttp | |
@contextlib.asynccontextmanager |
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
# -*- coding: utf-8 -*- | |
from __future__ import annotations | |
import abc | |
import ctypes | |
import functools | |
import os | |
import typing | |
from PIL import Image |
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
# -*- coding: utf-8 -*- | |
""" | |
|-------------------------------------------------------------- idx file structure------------------------------------------------------------------------------------------| | |
| 结构 | 字段 | 偏移(字节) | 大小(字节) | 意义 | 值 | | |
|-----------------|------------------------|------------------------------------------------|--------------------------|----------------|-----------------------------------| | |
| Metadata | magic | 0 | 4 | PKG文件标志 | 0x64 | | |
| | n_files | 4 | 4 | 文件数目 | <N> | | |
| | m_offset | 8 | 4 | 文件表偏移 | <Metada |
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
version: "3.9" | |
services: | |
prestashop: | |
image: yobasystems/alpine-prestashop | |
environment: | |
MYSQL_DATABASE: prestadb | |
MYSQL_PASSWORD: prestapass | |
MYSQL_ROOT_PASSWORD: '' | |
MYSQL_USER: prestauser |
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 csv | |
import re | |
character = "../personajes/characters.csv" | |
comic = "../personajes/comics.csv" | |
relation = "../personajes/charactersToComics.csv" | |
def sanitize(input: str): |
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 fs = require("fs"); | |
const cheerio = require("cheerio"); | |
function readJSON(filename) { | |
return new Promise((resolve, reject) => { | |
fs.readFile(filename, "utf8", (err, data) => { | |
if (err) { | |
reject(err); | |
} else { | |
resolve(JSON.parse(data)); |
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
#include <stdio.h> | |
#include <stdbool.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#define NUM_FILOSOFOS 5 | |
typedef enum { | |
pensando = 0, esperando, comiendo | |
} estado; |
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
/* | |
Un sudoku es un pasatiempo matemático inventado a finales de la década de | |
1970. Su objetivo es asignar números del 1 al 9 a cada una de las 81 casillas de un | |
tablero de dimensiones 9x9, de forma que se cumplan una serie de restricciones: | |
• Que todas las casillas tengan asignado un y solamente un valor. | |
• Que no se repita ningún dígito en cada fila del tablero. | |
• Que no se repita ningún dígito en cada columna del tablero. | |
• Que no se repita ningún dígito en cada en cada una de los subtableros de 3x3 que pueden formarse dentro del tablero principal. | |
1. Escoger razonadamente una estructura de datos que permita almacenar un |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
typedef int *Sudoku; | |
int sudoku[9][9]; | |
/* | |
* Se pide hacer una función que compruebe si el sudoku leído está bien formado, | |
* de acuerdo con las restricciones especificadas anteriormente. |
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 random | |
class Jugador: | |
def __init__(self, nombre, apellidos, edad, mano): | |
self.nombre = nombre | |
self.apellidos = apellidos | |
self.edad = edad | |
self.mano = mano |
NewerOlder