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
const int LED = 13; //LED connected to | |
//Degital pin 13 | |
const int BUTTON = 7; | |
int val = 0; | |
int state = 0; | |
int max_state = 3; | |
void setup() { | |
// put your setup code here, to run once: |
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 numpy as np | |
import matplotlib.pyplot as plt | |
f = open("ファイル名") | |
i0,i1= [],[] | |
sig0, sig1 = [],[] | |
th0,th1 = [],[] | |
fig = plt.figure() | |
concentration = 0.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
<!DOCTYPE html> | |
<html lang=ja> | |
<head> | |
<meta charset="utf-8"> | |
<title>template</title> | |
</head> | |
<body> | |
<p onclick="alert('click');">test</p> | |
This Video has been deleated. | |
<script> |
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
<!DOCTYPE html> | |
<html lang=ja> | |
<head> | |
<meta charset="utf-8"> | |
<title>template</title> | |
</head> | |
<body> | |
<script> | |
</script> |
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 collections import Counter | |
def checkio(data): | |
counter = Counter(data) | |
for word, cnt in counter.most_common(): | |
if cnt < 2: | |
data.remove(word) | |
return data |
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
return [ i for i in data if data.count(i)!=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
class Friends: | |
def __init__(self, connections): | |
self.connections = list(connections) | |
def add(self, connection): | |
if connection in self.connections: | |
return False | |
else: | |
self.connections.append(connection) | |
return True |
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
def check_pangram(text): | |
import string as st | |
return all(a in text.upper() for a in st.ascii_uppercase) |
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
def days_diff(date1, date2): | |
import datetime | |
return abs(datetime.date(date1[0],date1[1],date1[2])-datetime.date(date2[0],date2[1],date2[2])).days |
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 datetime import datetime | |
| |
def days_diff(date1, date2): | |
return abs((datetime(*date1)-datetime(*date2)).days) |