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
https://www.bilibili.com/video/BV1Vb411k7NT | |
https://www.bilibili.com/video/BV1bt411b7Nv | |
https://www.bilibili.com/video/BV1at411W7fJ | |
https://www.bilibili.com/video/BV1Ct411W7Ln | |
https://www.bilibili.com/video/BV18t411B77z | |
https://www.bilibili.com/video/BV1kt411h7Ao | |
https://www.bilibili.com/video/BV1zt411h7UG | |
https://www.bilibili.com/video/BV1Jt411h7F5 | |
https://www.bilibili.com/video/BV1qt41187dR | |
https://www.bilibili.com/video/BV1gt411a7xu |
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
100 Grand,20th Century Fox,24-Hour Fitness Center,3 Musketeers,300,361°,365,3M,5,5 Second,5-Hour Energy,501,579,6YS,7 For all Mankind,7-Eleven,7Up,84 Lumber,85°C,8th Continent Soymilk,9,9-3,9-5,A&E,A1 Steak Sauce,A4,A6,AA Insurance,AAA,AAA 01 Center WS,AAdvantage,AB-inBev,ABB,ABB Grain Limited,ABC,ABC Learning,ABN Amro,ACE,ADInstruments,AFLAC,AGL Energy,AIG,AIS,AMG,AMI,AMP Limited,ANCA,ANT1 Group,ASB,ASM International,ASX,AT&T,AWB Limited,AXA,Aalberts Industries,Aamco,Aavin,Abbott Laboratories,AbeBooks,Abercrombie & Fitch,About Us,Abreva,Absolut,Accell Group,Accent,Accenture,Accord,Accu-Chek,Ace Hardware,Ace Radio,Acer,Acesita,Acindar SA,Acne,Aconquija Water,Acrobat,Acropolis Rally,Acsa Argentina,Actimel,Activia,Acura,Acuvue,Adam Internet,Adecco,Adidas,Adobe,Advair,Advanced Auto Parts,Advantech,Advil,Aegean Airlines,Aegon,Aerogard,Aerolineas Argentinas,Aeroplane Jelly,Aeropostale,Aerosoles,Aerosonde Ltd,Aetna,Affin Bank,Afrin,After Thoughts,Agip,Agrale,Agrichar,Agricultural Bank of China,Aguas Cordobesas,Ahol |
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 random | |
from collections import Counter | |
def rand_pick_door(num, distribution): | |
if num != len(distribution): | |
raise Exception() | |
acc = [distribution[0]] | |
for i, x in enumerate(distribution[1:]): | |
acc.append(x + acc[i]) | |
r = random.random() |
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 PIL import Image | |
f = open('assignment-1.txt', 'r') | |
data = [] | |
for line in f: | |
s = line.strip() | |
if not len(s): continue | |
d = [int(e) for e in s[1:-1].split(' , ')] | |
data.append(d) |
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 csv | |
import matplotlib.pyplot as plt | |
data = [] | |
with open('experiment-report.csv', newline='') as csvfile: | |
reader = csv.reader(csvfile, delimiter=',', quotechar='|') | |
for i, row in enumerate(reader): | |
if i == 0: continue | |
data.append([row[0]] + [float(e) for e in row[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
sender.py | |
def thread_sender_fn(): | |
lock acquire | |
if reached end of file: | |
send EOT packet | |
else: | |
start thread timer for 100ms to rerun thread_sender_fn | |
go through window and send data packet |
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 java.io.BufferedWriter; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.util.ArrayDeque; | |
import java.util.Collections; | |
import java.util.Deque; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; |
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
html, body { | |
margin: 0; | |
padding: 0; | |
} | |
.outside { | |
background-color: red; | |
height: 100vh; | |
width: 100vw; | |
} |
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
var initializeListItems = function () { | |
var dataBack = JSON.parse(localStorage['datakey']); | |
dataBack.listItem.item.forEach(function(item) { | |
UIController.addListItem(item); | |
listController.addItem(item.description); | |
}); | |
}; |
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
// 1. Storing a string | |
const testData = 'This is some test data'; | |
localStorage.setItem('someKey', testData); | |
// Getting it back: | |
console.log(localStorage['someKey']); | |
// 2. Storing an object | |
const testObj = { |
NewerOlder