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
# coding=utf-8 | |
import urllib3 as u | |
from bs4 import BeautifulSoup | |
from tabulate import tabulate | |
import pandas as pd | |
digikey_id_list = ['product-details', 'prod-att-table'] # Digi-Key tables | |
def get_soup(url): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 asyncio | |
async def FizzBuzz(i: int): | |
await asyncio.sleep(i) | |
print("Fizz"*(i%3==0)+"Buzz"*(i%5==0) or i) | |
async def SleepFizzBuzz(l,loop): | |
tasks = [loop.create_task(FizzBuzz(i)) for i in range(1,l+1)] | |
for t in tasks: | |
await t |
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 as rd | |
for _ in range(10000): seen, n_draws = set(), 0 | |
while len(seen)<52: | |
seen.add(rd.randint(1,52)) | |
n_draws +=1 | |
result.append(n_draws) | |
print (sum(result) / len(result)) |
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
/* | |
Search HN upvoted from your browser and Export to CSV or HTML. | |
1. Navigate your browser to https://news.ycombinator.com/user?id=YOUR_USER_ID | |
2. Copy code to the browser console and run. | |
4. Look for the popup window in the upper-left corner of your browser. | |
*/ | |
(function () { | |
const popup = createPopup('HN upvoted'); | |
const base = 'news.ycombinator.com'; |
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
time | valueA | valueB | valueC | |
---|---|---|---|---|
1 | 2 | 5 | 13 | |
2 | 3 | 4 | 14 | |
3 | 1 | 4 | 16 | |
4 | 7 | 4 | 12 | |
5 | 8 | 8 | 7 | |
6 | 8 | 13 | 9 | |
7 | 5 | 15 | 3 | |
8 | 4 | 17 | 2 | |
9 | 9 | 18 | 1 |
OlderNewer