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
class Round(object): | |
def __init__(self, num, num_moves, deactivate_tile): | |
super(Round, self).__init__() | |
self.num = num | |
self.num_moves = num_moves | |
self.results = [] | |
self.starting_points = [] | |
self.deactivate_tile = deactivate_tile | |
def move(self, start, num_moves): |
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
.channels-wrap | |
{ max-width: 0px | |
; overflow: hidden | |
; transition: max-width 0s ease-in-out | |
} | |
.channels-wrap:hover, | |
.channels-wrap:focus | |
{ max-width: 50rem | |
; transition: max-width 0.3s ease-in-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
Write a simple parser to parse a formula and calculate the result. Given a string containing only integer numbers, brackets, plus and minus signs, calculate and print the numeric answer. Assume that the formula will always follow correct syntax | |
Example input: | |
(2+2)-(3-(6-5))-4 | |
Example output: | |
-2 |
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
modes <- array(); | |
function getWeather() | |
{ | |
local url = "https://api.forecast.io/forecast/91ee02469ebe1d745f3feed1cb9439d3/53.3331,-6.2489?units=si"; | |
local res = http.get(url, {}).sendsync(); | |
if (res.statuscode != 200) | |
{ | |
server.log("Forecast.io Error: " + res.statuscode + " => " + res.body); | |
} else |
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
modes <- array(); | |
function getWeather() | |
{ | |
local url = "https://api.forecast.io/forecast/XXXXXXXXXXXX/53.3331,-6.2489?units=si"; | |
local res = http.get(url, {}).sendsync(); | |
if (res.statuscode != 200) | |
{ | |
server.log("Forecast.io Error: " + res.statuscode + " => " + res.body); | |
} else |
[ Launch: Tributary inlet ] 8907566 by kgleeson
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
int LED = D7; | |
void setup() { | |
pinMode(LED, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(LED, HIGH); | |
delay(250); | |
digitalWrite(LED, LOW); |
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
class Test(): | |
def __init__(self): | |
self.a = '1' | |
c = Test() | |
print "{a}".format(**c) | |
print "{a}".format(**c.__dict__) |
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
float temp; | |
int tempPin = 0; | |
int ledAnalogOne[] = {3, 5, 6}; | |
const byte RED[] = {255,0,0}; //0 | |
const byte GREEN[] = {0,255,0}; //1 | |
const byte BLUE[] = {0,0,255}; //2 | |
const byte CYAN[] = {0,255,255}; //3 | |
const byte WHITE[] = {255,255,255}; //4 | |
const byte WARMWHITE[] = {253,245,230}; //5 |
NewerOlder