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
| #!/usr/bin/env python | |
| """ | |
| - ae(v): context-adaptive arithmetic entropy-coded syntax element. The parsing process for this descriptor is | |
| specified in clause 9.3. | |
| - b(8): byte having any pattern of bit string (8 bits). The parsing process | |
| for this descriptor is specified by the return value of the function | |
| read_bits( 8 ). | |
| - f(n): fixed-pattern bit string using n bits written (from left to right) |
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
| $HOME/.config/Code/User/settings.json { | |
| "workbench.iconTheme": "material-icon-theme", | |
| "workbench.colorTheme": "Solarized Dark", | |
| "ros.distro": "melodic", | |
| "git.autofetch": true, | |
| "window.titleBarStyle": "custom", | |
| "editor.fontFamily": "'Hack', 'monospace', monospace, 'Droid Sans Fallback'", | |
| "editor.renderLineHighlight": "all", | |
| "editor.renderWhitespace": "selection", | |
| "editor.cursorBlinking": "solid", |
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 urllib.parse | |
| import urllib.request | |
| import requests | |
| from bs4 import BeautifulSoup | |
| url = 'https://kias.rfbr.ru/person_projects.php' | |
| url_project_attributes = 'https://kias.rfbr.ru/get_project_form_attributes.php' | |
| url_project_info = 'https://kias.rfbr.ru/project.php' | |
| url_project_doc = 'https://kias.rfbr.ru/project_forms.php' | |
| values = { |
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 allImg=document.getElementsByTagName("img"), i=0, img; | |
| var r = ""; | |
| for (var i in allImg) { | |
| r += allImg[i].src + '\n'; | |
| } | |
| console.log(r); |
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
| // ==UserScript== | |
| // @name Aliexpress | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://trade.aliexpress.com/orderList.htm* | |
| // @grant unsafeWindow | |
| // @grant GM_xmlhttpRequest | |
| // @grant GM_setClipboard |
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
| #!/bin/bash | |
| PREFIX='http:\/\/galler.com' | |
| NAME='model-1' | |
| mkdir $NAME | |
| for model_page in $(cat "$1" | xargs curl -s | sed -ne 's/.*\.\.\(\S*\.html\)\" target.*/+\1/p') | |
| do | |
| for set in $(echo $model_page | sed -e 's/+/$prefix/') | |
| do | |
| SET_DIR=$(basename $set .html) | |
| mkdir -v $NAME/$SET_DIR |
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
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| import pandas as pd | |
| r = pd.read_csv('detector.csv', header=None) | |
| r = r.drop(columns=[0, 2]) | |
| r = r.rename(index=str, columns={1 : "log", 3 : "is_detected" }) | |
| d = r["log"].str.extract(r'frame(\d+)_angle(\d+)_turn(\d+)') | |
| r = r.assign(frame=d[0], angle=d[1], turn=d[2]) |
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
| #/!bin/bash | |
| cat -n "$1" | sed -Eu 's/([0-9]+)/\1.jpeg/' | xargs -n 2 curl -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
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| s = np.linspace(0, np.pi) | |
| R = 4 | |
| alpha=360/(2*R*np.pi) | |
| rad_degree = np.pi/180 | |
| x_0 = R | |
| y_0 = 0 | |
| angles = np.arange(alpha, 360, alpha) |
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
| /* right click on an entry in the network log, select Copy All as Har | |
| * type in console: x = paste_link_here | |
| * paste the following JS code into the console | |
| * copy the output, paste into a file | |
| * then wget -i [that file] | |
| */ | |
| (function(logObj, mime) { | |
| var results = []; | |
| logObj.log.entries.forEach(function (entry) { | |
| if (mime && entry.response.content.mimeType !== mime) return; |
NewerOlder