Skip to content

Instantly share code, notes, and snippets.

View daniel-dona's full-sized avatar
🎯
Focusing

Daniel Doña daniel-dona

🎯
Focusing
View GitHub Profile
@daniel-dona
daniel-dona / cambiar.c
Created November 25, 2016 09:34
cambiar.c
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(int argc, char *argv[]){
@daniel-dona
daniel-dona / rna.py
Last active July 26, 2018 12:40
Lectura de un fichero en formato FASTA, conversión de bases a codones y de codones a aminoácidos
#!/usr/bin/env python3
'''
Descargado de https://www.ncbi.nlm.nih.gov/nuccore/NM_001143854.1?report=fasta
'''
file = open('sample_rna.txt', 'r')
stringfile = file.read()
<?php
//Data from Johns Hopkins CSSE
$q = '[{"statisticType":"sum","onStatisticField":"Confirmed","outStatisticFieldName":"confirmed"}, {"statisticType":"sum","onStatisticField":"Deaths","outStatisticFieldName":"dead"}, {"statisticType":"sum","onStatisticField":"Recovered","outStatisticFieldName":"recovered"}]';
$endpoint = "https://services1.arcgis.com/0MSEUqKaxRlEPj5g/arcgis/rest/services/".
"ncov_cases/FeatureServer/1/query?f=json&where=1%3D1&returnGeometry=false".
"&spatialRel=esriSpatialRelIntersects&outFields=*&outStatistics=";
undefined4 FUN_004013f0(char *param_1)
{
int iVar1;
char *__s1;
uint local_254;
undefined4 local_250 [3];
char local_244;
undefined auStack579 [51];
undefined4 local_210;
from rdflib import Graph, URIRef, Namespace, Literal
from pprint import pprint
data = '''
@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix : <http://mapping.example.com/>.
@daniel-dona
daniel-dona / game_of_life.c
Created June 26, 2021 21:38
Game of Life
#include <stdio.h>
#include <stdlib.h>
#include <linux/fb.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <string.h>
#include <unistd.h>
@daniel-dona
daniel-dona / fix_framerate.sh
Created November 19, 2022 20:58
Recodificar con 30 FPS la salida errónea de VDH
#!/bin/bash
# Uso ./fix_framerate.sh [video.mp4]
echo "Processing \"$1\""
ffmpeg -i "$1" -c copy -f h264 temp.h264
ffmpeg -r 30 -i temp.h264 -c copy temp.mp4
ffmpeg -i "$1" -vn -acodec copy temp.aac
ffmpeg -i temp.mp4 -i temp.aac -c:v copy -c:a copy "$1.fixed.mp4"
@daniel-dona
daniel-dona / main.cpp
Created December 29, 2023 18:49
DS test project
#include <Arduino.h>
#define LT_UART_DEFAULT_PORT 1
void setup() {
Serial.println("Boot");
for(int i = 5; i > 0; i--){
Serial.print("Deep sleep in ");
@daniel-dona
daniel-dona / config_esphome.yaml
Created February 5, 2024 18:56
Xiaomi Mi Air Purifier 3C
esphome:
name: purificador
name_add_mac_suffix: true
includes:
- mipurifier.h
esp32:
board: esp32dev
framework:
type: esp-idf