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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func printWorker(name string, days int) { | |
weeks := days / 7 | |
restDays := days % 7 |
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 | |
# based on: https://arstechnica.com/information-technology/2016/02/comcast-customer-made-bot-that-tweets-at-comcast-when-internet-is-slow/ | |
# twitter access usint this tutorial: https://projects.raspberrypi.org/en/projects/getting-started-with-the-twitter-api/5 | |
import os | |
import sys | |
import csv | |
import datetime | |
import time | |
import twitter |
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
<!-- | |
extracted from: https://www.fastcompany.com/3021596/take-the-quiz-what-kind-of-productive-person-are-you | |
based on lecture of: https://www.fastcompany.com/3021510/most-productive-people-the-art-of-doing-everything | |
--> | |
<div> | |
<div id="fc-quiz"> | |
<p> | |
Read these nine statements. Type in the number for how much you agree or disagree. When you’re done | |
(you have to answer them all), click “Which type am I” and share your type with friends.</p> | |
<p> |
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
// Copyright (c) Ulisses 2019 | |
// License: MIT | |
// Modified by @juusechec | |
const Meta = imports.gi.Meta; | |
const Lang = imports.lang; | |
const Main = imports.ui.main; | |
function init(em) { | |
return new HoppingWindow(em); |
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/env python3 | |
import os | |
import urllib.request | |
def create_path(dir): | |
if not os.path.isdir(dir): | |
os.mkdir(dir) | |
def file_exists(file): | |
return os.path.isfile(file) |
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
# Python Console env | |
# Get current Layer https://github.com/wfpinedar/typeCapa/blob/master/tipedata.py | |
layer = iface.activeLayer() | |
# Name of current layer | |
layer_name = iface.activeLayer().name() | |
# Uri of resource layer | |
iface.activeLayer().dataProvider().dataSourceUri() | |
# Display Expression of Layer | |
iface.activeLayer().displayExpression() |
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
from qgis.utils import iface | |
#iface.activeLayer().id() | |
# https://gis.stackexchange.com/questions/91011/how-to-select-and-zoom-in-features-from-a-qgis-python-plugin | |
layer = iface.mapCanvas().layers()[0] | |
#layer = QgsProject.instance().mapLayer('waterways20171005162048981') | |
filter='"osm_id"=' + str([%osm_id%]) | |
r = QgsFeatureRequest().setFilterExpression(filter) | |
features = layer.getFeatures(r) |
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
package co.edu.udistrital.glud.services; | |
import javax.crypto.spec.SecretKeySpec; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.Cipher; | |
import java.util.Base64; | |
import java.util.Random; |
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
#!/bin/bash -eux | |
curl -H "Content-Type: application/json" \ | |
-H "X-Gogs-Delivery: 4340a65c-9526-4473-8f07-064dab3ca021" \ | |
-H "X-Gogs-Event: push" -X POST \ | |
-d '{"secret":"ABCD123","ref":"refs/heads/master","before":"bbbbbbb","after":"aaaaaaaaaaaaa","compare_url":"https://gogs.example.com/organization/repository/compare/aaaaaaaaaa...bbbbbbbb","commits":[{"id":"aaaaaa","message":"hi","url":"https://gogs.udistritaloas.edu.co/core/udistrital_core_db/commit/aaaaaaaa","author":{"name":"juusechec","email":"hi","username":""},"committer":{"name":"j","email":"hi@hid","username":""},"timestamp":"2017-05-31T16:52:27Z"},{"id":"aaaaa","message":"COMMITn","url":"https://gogs.domain.net/hola/hi/commit/aaaa","author":{"name":"aaaa","email":"[email protected]","username":"aaaa"},"committer":{"name":"aaa","email":"[email protected]","username":"aaa"},"timestamp":"2017-05-30T21:02:31Z"}],"repository":{"id":1,"name":"repo","url":"https://gogs.example.com/org/repo","ssh_url":"ssh://[email protected]:22/org/repo.git","clone_url": |
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 int ledPin = 13; | |
const int botonPin = 7; | |
const int boton2Pin = 8; | |
int milisegundos = 500; | |
int val = 0; | |
long randNumber; | |
long randNumber2; | |
void setup() { | |
Serial.begin(9600); |