Skip to content

Instantly share code, notes, and snippets.

View kny5's full-sized avatar
:octocat:
Focusing

Antonio Anaya kny5

:octocat:
Focusing
View GitHub Profile
@kny5
kny5 / __init__.py
Last active December 17, 2022 00:50
Near_me plugin using cookiecutter plugin structure by Datasette. More info: https://docs.datasette.io/en/stable/writing_plugins.html
from datasette import hookimpl, database
from geopy import distance
Origin = (1.3733, 32.2903)
@hookimpl
def prepare_connection(conn):
conn.create_function(
"near_me", 2, lambda lat, lon: distance.distance(Origin, (lat,lon)).km
)
@kny5
kny5 / taxonomy_okw_machines.md
Last active January 9, 2023 14:24
Taxonomy of Machines OKW

Taxonomy

Introduction

Following up the OKW latest meetup a Taxonomy of machines and manufacturing processes is needed.

Miro board

Miro board Public access link:

@kny5
kny5 / documentation.md
Last active December 17, 2022 00:11
OKW schema design
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 46 columns, instead of 19 in line 1.
SubmissionDate,ENUMERATOR,agree_to_participate,name,COUNTRY,Latitude,Longitude,Altitude,-Accuracy,owner,contact,EMAIL,TYPE,affiliation,partner_funder,certifications,facility_status_1,Working_hours,working_days,date_founded,storage_capacity,size_floor_size,loading_dock,back_up_generator,uninterrupted_power_supply,access_type-access_type_1,access_type-wheelchair_access,access_type-road_access,human_capacity-headcount,human_capacity-maker,Please_specify_the_things_produced_by_the_facility,BATCH SIZE,The_equipment_available_for_us,Please_Specify_the_equipment_in_the_manufacturing_facility,Please_provide_the_model,How_many_are_there,Manufacturing_process_001,Materials_used,Plastic_s_type,Metal_s_type,Wood_type,Elastomer_s_type,Ceramics_type,Electronics_type,Others,maintenance_schedule
2021-12-12T07:56:21.590Z,ANN DRUSCILLAR,1,ASIIMWE AMON,UGANDA,0.3716101,32.734651,1162.0,5.0,ASIIMWE AMON,0778556366.0753165900,ASIIMWEAMON4@GMAIL.COM ,WORKSHOP,,UNSPECIFIED,MUKONO MUNICIPAL COUNCIL,ACTIVE,"7, 19",SUN MON TUE WED THU

Autor: Antonio de Jesus Anaya Hernandez, DevOps eng. for the IoPA Autor: The internet of Production Alliance, 2022 Data was collected by "Field Ready" The Open Know Where OKW Standard is part of the Internet of Production Alliance and its members. License: CC BY SA CC BY SA

OKW data review

<!-- Begin Mailchimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7_dtp.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own Mailchimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<style type="text/css">
#mc-embedded-subscribe-form input[type=checkbox]{display: inline; width: auto;margin-right: 10px;}
#mergeRow-gdpr {margin-top: 20px;}
import math
def hipotenusa(cateto_a, cateto_b):
return math.sqrt((cateto_a**2) + (cateto_b**2))
# cateto_a = float(input("Escribe el cateto a: "))
# cateto_b = float(input("Escribe el cateto b: "))
# resultado = hipotenusa(cateto_a, cateto_b)
# print("La hipotenusa es: ", resultado)
preguntas = ["¿Cómo te llamas?", "¿Cuál es tu nombre?", "¿Quién eres?", "¿Cómo te dicen?"]
niñxs = []
adultos = []
jovenes = []
def saludar(name):
if name == "Gerardo":
print("Hola", name, "estas aprendiendo Python.")
return True
@kny5
kny5 / MediawikionHeroku.md
Created November 11, 2018 09:49 — forked from caseywatts/MediawikionHeroku.md
Mediawiki on Heroku