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
#!/bin/bash | |
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do | |
( | |
syspath="${sysdevpath%/dev}" | |
devname="$(udevadm info -q name -p $syspath)" | |
[[ "$devname" == "bus/"* ]] && exit | |
eval "$(udevadm info -q property --export -p $syspath)" | |
[[ -z "$ID_SERIAL" ]] && exit | |
echo "/dev/$devname - $ID_SERIAL" |
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
def substring_check(length, sub_str): | |
for i in range(0, length-1): | |
if(sub_str[i] == sub_str[i+1]): | |
if(i == length-2): | |
return length | |
else: | |
continue | |
else: | |
return 1 | |
def solution(s): |
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 <Wire.h> | |
#define A1 3 | |
#define B1 4 | |
#define C1 5 | |
#define D1 6 | |
#define A2 7 | |
#define B2 8 | |
#define C2 9 | |
#define D2 10 | |
#define A3 11 |