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 bash | |
# AUTHOR: shaggy | |
# FILE: updatecalcurse | |
# ROLE: TODO (some explanation) | |
# CREATED: 2014-12-21 18:17:01 | |
# MODIFIED: 2015-08-21 15:59:32 | |
function check { | |
if (( $(pidof calcurse | wc -w) == 1 )); then | |
echo -e "Calcurse is already Running... Killing" |
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 bash | |
# AUTHOR: shaggy | |
# FILE: updatecalcurse | |
# ROLE: TODO (some explanation) | |
# CREATED: 2014-12-21 18:17:01 | |
# MODIFIED: 2015-08-21 15:59:32 | |
function check { | |
if (( $(pidof calcurse | wc -w) == 1 )); then | |
echo -e "Calcurse is already Running... Killing" |
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 subprocess import Popen, PIPE | |
def run_cmd(cmd): | |
p = Popen(cmd, shell=True, stdout=PIPE) | |
out = p.communicate() | |
return out | |
result = run_cmd('ls -l') | |
print(result) |
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 RPi.GPIO as GPIO | |
import time | |
import subprocess | |
from subprocess import call | |
import multiprocessing | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(40, GPIO.OUT) | |
GPIO.output(40, 1) | |
GPIO.setup(38, GPIO.OUT) |
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
[litecontrolcenter] | |
[toggled] | |
item |
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 RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
KEYS = [[1, 2, 3, 4], | |
[5, 6, 7, 8], | |
[9, 10, 11, 12], | |
[13, 14, 15, 16]] | |
COL = [15, 13, 11, 7] | |
ROW = [22, 16, 18, 12] |
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 | |
import gpio | |
import time | |
rows = [26, 24, 23, 22] | |
cols = [18, 16, 15, 13] | |
digits = ["1", "2", "3", "4", | |
"5", "6", "7", "8", | |
"9", "10", "11", "12", | |
"13", "14", "15", "16"] |
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
U5ER=something | |
PA55="" | |
MERU=127.0.0.1 | |
DataCache=.CurrentAPlist | |
DevList=.DevList | |
TIM3R=20m | |
function search() { | |
local s=0; | |
for str in "${$array[@]}"; do ##array=zone;search | |
if [ "$str" = "$1" ]; then |
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 | |
# -*- coding: utf-8 -*- | |
# vim:fenc=utf-8 | |
# | |
# Copyright © 2016 Johnathan "Shaggytwodope" Jenkins <[email protected]> | |
# | |
# Distributed under terms of the MIT license. | |
""" | |
Tool to check if online, returns exit status 0 if succesful or 1 if not. |
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
Окружно такмичење из програмирања за ученике основних школа (22. март 2015.) | |
I категорија (5. и 6. разред) | |
Напомена: Називи наредних задатака представљају називе градова из којих потичу такмичари (и њихови професори) који | |
су прошле године као чланови српске репрезентације освојили 6 медаља на Јуниорској Балканијади из информатике. | |
1. У околини Лознице налазе се прелепе шуме, ливаде и воћне плантаже. Мама коза обилази N ливада и прави | |
букет разноврсног лишћа тако што са прве ливаде одабере и узме 1 лист, са друге ливаде узме 2 листа, са треће | |
ливаде узме три листа, и тако даље наставља да са текуће ливаде узме 1 лист више него са претходне ливаде. На | |
N-тој ливади, мама коза ће узети N листова. Mама ће лишће поделити на једнаке делове својој деци. У питању су | |
7 јарића из истоимене бајке и сваки од њих ће добити непаран број листова. Напишите програм LOZNICA који | |
ће израчунати број листова које ће добити свако јаре, као и број листова који је остао мами кози имајући на уму |