Skip to content

Instantly share code, notes, and snippets.

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:
import numpy as np
import matplotlib.pyplot as plt
f = open("ファイル名")
i0,i1= [],[]
sig0, sig1 = [],[]
th0,th1 = [],[]
fig = plt.figure()
concentration = 0.2
<!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>
<!DOCTYPE html>
<html lang=ja>
<head>
<meta charset="utf-8">
<title>template</title>
</head>
<body>
<script>
</script>
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
return [ i for i in data if data.count(i)!=1 ]
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
def check_pangram(text):
import string as st
return all(a in text.upper() for a in st.ascii_uppercase)
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
from datetime import datetime
def days_diff(date1, date2):
return abs((datetime(*date1)-datetime(*date2)).days)