This file contains hidden or 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
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "lldb", | |
| "request": "launch", | |
| "name": "Sqllogictests", |
This file contains hidden or 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 pafy | |
| import vlc | |
| url = 'https://www.youtube.com/watch?v=x1UsJ2Znjk0' | |
| video = pafy.new(url) | |
| video_best = video.getbest() | |
| play_url = video_best.url | |
| # print(play_url) |
This file contains hidden or 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
| Codeforces 865D. Buy Low Sell High | |
| CSAcademy Firestarter |
This file contains hidden or 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
| // Compiled with: g++ -Wall -std=c++14 -pthread | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| void quick_sort(vector<int> &a, int l, int r) { | |
| int i = l; | |
| int j = r; | |
| int p = (l + r) / 2; // pivot |
This file contains hidden or 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
| TARGET = main | |
| CXXFLAGS = -g -std=c++17 -O2 | |
| OBJS = ${TARGET}.o | |
| main: ${OBJS} | |
| ${CXX} ${CXXFLAGS} $< -o $@ | |
| %.o : %.cpp | |
| ${CXX} -c ${CXXFLAGS} $< -o $@ |
This file contains hidden or 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
| Test |
This file contains hidden or 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
| find . -type f -print0 | xargs -0 dos2unix // dos2unix to entire directory |
This file contains hidden or 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 google_images_download import google_images_download | |
| response = google_images_download.googleimagesdownload() | |
| url = 'https://www.google.com.tw/search?q=crayon+illustration&hl=zh-TW&tbm=isch&tbs=rimg:CXGAdYHYQIovImAgIOC67N3khY71ydA4U4Z-tvzOVnhUynH8VJsno2NEhiL3RPSYEIMW2cV8Jdi7bg-epOoA8KS2RGi2dxrMhnkf6pDj1qseJAjyeqp6n3InQctHPfWsoQOGVLBMcDUKQZoqEgkgIOC67N3khREJWXFRcKR-YSoSCY71ydA4U4Z-EdcidLqKngNbKhIJtvzOVnhUynERDZv56iW5puIqEgn8VJsno2NEhhFsO_1TA8pqV0CoSCSL3RPSYEIMWERd2hA0Pps38KhIJ2cV8Jdi7bg8R6_10GgsZGLV4qEgmepOoA8KS2RBHEQKl0KumA8yoSCWi2dxrMhnkfERn-Lh_1wP2_1cKhIJ6pDj1qseJAgRoGxvUnBvLTEqEgnyeqp6n3InQRGtaA9t2ocSACoSCctHPfWsoQOGEfCm7bbEkQCuKhIJVLBMcDUKQZoRQbHclHJgl-0&tbo=u&sa=X&ved=2ahUKEwiH7fX03vDlAhW1LqYKHfr9DyIQrnZ6BAgBEBY&biw=1918&bih=928&dpr=1' | |
| absolute_image_paths = response.download( | |
| { | |
| "url": url, | |
| "limit": 1000, |
This file contains hidden or 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
| """ | |
| file format | |
| * abc | |
| * abcd | |
| * abcde | |
| * pef | |
| * zxc | |
| * zxcv | |
| """ | |
| with open('song.txt', 'r', encoding='utf-8-sig') as f: |
This file contains hidden or 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 a_idx = 0; | |
| jQuery(document).ready(function($) { | |
| $("body").click(function(e) { | |
| var a = new Array("傲慢", "貪婪 ", "色慾", "嫉妒", "暴食", "憤怒", "怠惰"); | |
| var $i = $("<span/>").text(a[a_idx]); | |
| a_idx = (a_idx + 1) % a.length; | |
| var x = e.pageX, | |
| y = e.pageY; | |
| $i.css({ | |
| "z-index": 999999999999999999999999999999999999999999999999999999999999999999999, |
NewerOlder