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
2kpeople.co.uk | |
3aaa.co.uk | |
24-7recruitment.net | |
199rec.co.uk | |
365rec.com | |
aatomrecruitment.com | |
abrs.com | |
agendarecruitment.co.uk | |
andiamo-group.com | |
applauseit.co.uk |
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
# Define a lambda function that takes a number and double it | |
d = lambda x: x * 2 | |
# Create a list containing: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
l1 = [x for x in xrange(10)] | |
# Method #1 using map(...) | |
# output: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18] | |
print map(d, l1) |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
server_name andreagrandi.it www.andreagrandi.it; | |
# Redirect all requests to HTTPS. | |
return 301 https://$host$request_uri; | |
} |
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 microbit as m | |
SENSITIVITY = 250 | |
while (True): | |
x = m.accelerometer.get_x() | |
if abs(x) < SENSITIVITY: | |
m.display.show(m.Image.HAPPY) | |
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
import microbit as m | |
SUN_IMAGE = m.Image( | |
"90909\n" | |
"09990\n" | |
"99999\n" | |
"09990\n" | |
"90909") | |
MOON_IMAGE = m.Image( | |
"99900\n" |
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
# DontShakeMe - Andrea Grandi (2016) | |
# License: MIT | |
from microbit import display, Image, accelerometer, sleep | |
# display an happy face by default | |
display.show(Image.HAPPY) | |
# if you shake the device, you make microbit sad | |
while True: |
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 microbit import display | |
# This text will scroll on the 5x5 matrix display | |
display.scroll('Hello PyCon Italy') |
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 microbit import * | |
while True: | |
if button_a.is_pressed(): | |
display.show(Image.HAPPY) | |
elif button_b.is_pressed(): | |
break | |
else: | |
display.show(Image.SAD) |
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 microbit import * | |
import random | |
names = [ | |
"Mary", "Yolanda", "Damien", "Alia", | |
"Kushal", "Mei Xiu", "Zoltan"] | |
display.scroll(random.choice(names)) |