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 potPin = A5; // select the input pin for the potentiometer | |
int ledPin = 13; // select the pin for the LED | |
int val = 0; // variable to store the value coming from the sensor | |
// from https://bildr.org/2012/08/rotary-encoder-arduino/ | |
int orange = 4; | |
int green = 2; | |
volatile int lastEncoded = 0; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
free -m | awk '{if (NR==2) {print $3" / "$2" = "$3/$2}}' | |
# 61 / 483 = 0.126294 |
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 PyPDF2 import PdfFileWriter, PdfFileReader | |
# https://stackoverflow.com/questions/490195/split-a-multi-page-pdf-file-into-multiple-pdf-files-with-python#490203 | |
def pdf_split(fname, start, end=None): | |
print('pdf_split', fname, start, end) | |
# pdf_split ~/Downloads/4-27-files/Invoice Email-0.pdf 1 4 | |
#inputpdf = PdfFileReader(open("document.pdf", "rb")) | |
inputpdf = PdfFileReader(open(fname, "rb")) |
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 java.util.*; | |
class Scratch { | |
public static void main(String[] args) { | |
// https://www.hackerrank.com/challenges/icecream-parlor/problem | |
// solved! | |
// Given a list of prices for the flavors of ice cream, | |
// select the two that will cost all of the money they have. | |
int m; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href=""> |
OlderNewer