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
# frozen_string_literal: true | |
require 'parallel' | |
FILE = 'input.txt' | |
# FILE = 'sample.txt' | |
raw_input = File.read(FILE) | |
lines = raw_input.split("\n") | |
seed_num_pairs = [] | |
seed_nums = [] |
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
version: '3' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:latest | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 |
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
#include <LCD.h> | |
#include <stdio.h> | |
sbit IR1=P1^0; | |
sbit IR2=P1^1; | |
sbit IR3=P1^2; | |
sbit IR4=P1^3; | |
sbit IR5=P1^4; | |
// intuitive code |
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
#include <LCD.h> | |
sbit IR=P1^0; | |
// intuitive code | |
void main() | |
{ | |
LCD_INIT(); | |
while(1) { | |
if(IR == 0) { |
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
#include <LCD.h> | |
/* | |
#define display_port P2 //Data pins connected to port 2 on microcontroller | |
sbit rs = P3^2; //RS pin connected to pin 2 of port 3 | |
sbit rw = P3^3; // RW pin connected to pin 3 of port 3 | |
sbit e = P3^4; //E pin connected to pin 4 of port 3 | |
void msdelay(unsigned int time) // Function for creating delay in milliseconds. | |
{ |
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
#include <LCD.h> | |
sbit l1 = P3^0; | |
sbit l2 = P3^1; | |
sbit s1 = P3^2; | |
sbit s2 = P3^3; | |
sbit s4 = P3^5; | |
void counter_3(){ |
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
#include <p89v51rx2.h> | |
sbit l1 = P3^0; | |
sbit l2 = P3^1; | |
sbit l3 = P3^6; | |
sbit l4 = P3^7; | |
sbit s1 = P3^2; | |
sbit s2 = P3^3; | |
sbit s3 = P3^4; |
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
#include <p89v51rx2.h> | |
sbit buzzer = P0^3; | |
sbit l1 = P3^0; | |
sbit l2 = P3^1; | |
sbit l3 = P3^6; | |
sbit l4 = P3^7; | |
sbit s1 = P3^2; |
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
#include <p89v51rx2.h> | |
void delay(unsigned int dela) | |
{ | |
unsigned int i,j; | |
for(i=0;i<=1000;i++) | |
for(j=0;j<=dela;j++); | |
} |
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
Verifying my Blockstack ID is secured with the address 1FXLzWj12rY4uuvwrLzFJPmbkjii72Q27k https://explorer.blockstack.org/address/1FXLzWj12rY4uuvwrLzFJPmbkjii72Q27k |
NewerOlder