Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 itertools import groupby | |
from functools import reduce as functools_reduce | |
from operator import itemgetter | |
class MapReduce(object): | |
""" | |
Class that emulates the behaviour of an actual map-reduce | |
infrastructure. | |
""" | |
def map(self, pairs: dict, map_function): |
This file contains 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 dht | |
import machine | |
from machine import Timer | |
d = dht.DHT11(machine.Pin(4)) | |
def display_dht11(t): | |
d.measure() | |
print('Temperature:', d.temperature(), 'Humidity:', d.humidity()) | |
tim = Timer(-1) |
This file contains 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 dht | |
import machine | |
d = dht.DHT11(machine.Pin(4)) | |
d.measure() | |
print(d.temperature(), d.humidity()) |
This file contains 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
(custom-set-variables | |
'(inhibit-startup-screen t)) | |
(custom-set-faces | |
) | |
(autoload 'julia-mode "julia-mode" | |
"Major mode for editing Julia source files" t) | |
(add-to-list 'auto-mode-alist '("\.jl\'" . julia-mode)) | |
(require 'package) ;; You might already have this line |