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 string | |
import random | |
def random_string(length): | |
return ''.join(random.sample(string.printable, length)) |
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
random_string = (length) -> | |
id = "" | |
id += Math.random().toString(36).substr(2) while id.length < length | |
id.substr 0, length |
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
quicksort = (array) -> | |
_quicksort = (array, left, right) -> | |
[i, j] = [left, right] | |
if left > right | |
return | |
pivot = array[left] | |
until i is j | |
while array[j] >= pivot and i < j | |
j-- |
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
#!/usr/bin/python | |
import requests | |
import sys | |
from bs4 import BeautifulSoup | |
import functools | |
import re | |
from threading import Thread | |
RESET_COLOR = "\033[0m" |
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 new_counter(): | |
i = 0 | |
def nested(): | |
nonlocal i | |
i += 1 | |
return i | |
return nested | |
c = new_counter() | |
print(c()) |
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
<section></section> |
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="en"> | |
<head> | |
<meta charset="utf8"> | |
<title>CSS特指度计算</title> | |
<link rel=stylesheet href="style.css" /> | |
<style type="text/css"> | |
em {color: blue;} | |
</style> | |
</head> |
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="en"> | |
<head> | |
<meta charset="utf8"> | |
<title>CSS特指度计算</title> | |
<link rel=stylesheet href="style.css" /> | |
<style type="text/css"> | |
em {color: blue !important;} | |
</style> | |
</head> |
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
<section id="one">1 | |
</section> | |
<section id="two">2 | |
</section> | |
<section id="three">3 | |
</section> | |
<section id="four">4 | |
</section> |
OlderNewer