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
#ifndef AVERAGER_H | |
#define AVERAGER_H | |
#include <stdint.h> | |
template <class T, uint8_t n> class Averager { | |
private: | |
uint8_t samples; | |
uint8_t idx; | |
const uint8_t maxSamples; |
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 logging | |
import os | |
from io import BytesIO | |
from pathlib import PurePath | |
import azure.functions as func | |
from azure.identity import DefaultAzureCredential | |
from azure.storage.blob import BlobServiceClient, ContentSettings | |
from PIL import Image, UnidentifiedImageError |
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 "golang.org/x/tour/tree" | |
import ( | |
"fmt" | |
) | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int) { |
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
# -*- coding: utf-8 -*- | |
""" | |
iframe directive for reStructuredText. | |
basic use in reST document: | |
.. iframe:: https://google.com/ | |
:width: 640 | |
:height: 480 |
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
Show hidden characters
{ | |
"extends": [ | |
"standard", | |
"plugin:react/recommended" | |
], | |
"env": { | |
"browser": true, | |
"jest": true | |
}, | |
"parser": "babel-eslint", |
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
Line # Mem usage Increment Line Contents | |
================================================ | |
6 14.6 MiB 0.0 MiB @profile | |
7 def find_largest_prime_smaller_than(maximum): | |
8 14.6 MiB 0.0 MiB x1 = time.clock() | |
9 14.6 MiB 0.0 MiB latest_prime = None | |
10 14.6 MiB 0.0 MiB x = (maximum // 2) * 2 + 1 | |
11 14.6 MiB 0.0 MiB while x > 2 and not latest_prime: | |
12 14.6 MiB 0.0 MiB for i in xrange(3, x, 2): | |
13 14.6 MiB 0.0 MiB q = x / i |
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
Line # Mem usage Increment Line Contents | |
================================================ | |
6 132.4 MiB 0.0 MiB @profile | |
7 def find_largest_prime_smaller_than(maximum): | |
8 132.4 MiB 0.0 MiB x1 = time.clock() | |
9 132.4 MiB 0.0 MiB latest_prime = None | |
10 132.4 MiB 0.0 MiB x = (maximum // 2) * 2 + 1 | |
11 1190.9 MiB 1058.5 MiB while x > 2 and not latest_prime: | |
12 1572.3 MiB 381.5 MiB for i in range(3, x, 2): | |
13 1572.3 MiB 0.0 MiB q = x / i |
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
Starting jobs without monkey patching | |
http://www.google.com got <Response [200]> took 1.13251829249 seconds | |
http://www.python.org got <Response [200]> took 2.01172115155 seconds | |
http://sadrok.com got <Response [200]> took 0.416737742826 seconds | |
https://en.wikipedia.org/wiki/Python_(programming_language) got <Response [200]> took 1.56067030207 seconds | |
Real time 5.12775028815 seconds. Sum of individuals 5.12164748893 seconds | |
Starting jobs with monkey patching | |
http://www.google.com got <Response [200]> took 1.47563088431 seconds | |
http://www.python.org got <Response [200]> took 1.74336271832 seconds |
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
#include <TimerOne.h> | |
#define CLK 8 //UNO:PORT_B0 | |
#define FQ 9 //UNO:PORT_B1 | |
#define DATA 10 //UNO:PORT_B2 | |
#define RST 11 //UNO:PORT_B3 | |
// PORT B on MEGA2560 | |
//#define CLK 53 | |
//#define FQ 52 |
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
// -- POPULATE THE TEXTAREA BITMAP | |
for (l = 0; l < LINES; l++) | |
{ | |
for(y = 0; y < 11; y++) | |
{ | |
for(c = 0; c < COLS; c++) | |
{ | |
unsigned char ch = lines[l][c] - ' '; | |
unsigned char font_char_y = pgm_read_byte_near(font + y + (ch * 11)); //font[ch][y]; | |
unsigned char mask = 0x80; |
NewerOlder