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 flask import Flask, request | |
from urllib.request import urlopen | |
app = Flask(__name__) | |
@app.route("/test") | |
def test(): | |
url = request.args.get("url", "") | |
with urlopen(url, timeout=1) as response: | |
return response.read() |
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 urllib import request | |
url = 'http://google.com' | |
req = request.Request(url) | |
print(req.__dict__) | |
# reqDict это собственно это req.__dict__ | |
reqDict = {'_full_url': 'http://google.com', 'fragment': None, 'type': 'http', 'host': 'google.com', 'selector': '', 'headers': {}, 'unredirected_hdrs': {}, '_data': None, '_tunnel_host': None, 'origin_req_host': 'google.com', 'unverifiable': False} |
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 Vue from 'vue'; | |
import VueI18n from 'vue-i18n'; | |
import { LOCALE_NAME_RU, LOCALE_NAME_EN } from '@/i18n/utils'; | |
Vue.use(VueI18n); | |
function loadLocaleMessages() { | |
const locales = require.context( | |
'./locales', | |
true, | |
/[A-Za-z0-9-_,\s]+\.json$/i |
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
const { shareDocumentWithStudents } = require("../sharer.js"); | |
const mockLiqpayApi = jest | |
.fn() | |
.mockImplementation((_, __, resolve) => resolve({ data: [] })); | |
jest.mock("../liqpay.js", () => | |
jest.fn().mockImplementation(function mockLiqPay() { | |
this.api = mockLiqpayApi; | |
}) |
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
//package.json | |
{ | |
"devDependencies": { | |
"@intlify/vue-i18n-loader": "^1.0.0", | |
"@vue/cli-plugin-babel": "~4.2.0", | |
"@vue/cli-plugin-eslint": "~4.2.0", | |
"@vue/cli-plugin-router": "~4.2.0", | |
"@vue/cli-plugin-vuex": "~4.2.0", | |
"@vue/cli-service": "~4.2.0", | |
"@vue/test-utils": "^1.0.5", |
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
//Файл api.js | |
const updateTickersWorker = new SharedWorker("../public/worker.js"); | |
updateTickersWorker.port.start(); | |
updateTickersWorker.port.onchange = function() { | |
console.log("onchange posted to worker"); | |
}; | |
updateTickersWorker.port.onmessage = function(e) { |
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
const API_KEY = | |
"ce3fd966e7a1d10d65f907b20bf000552158fd3ed1bd614110baa0ac6cb57a7e"; | |
//TODO: refactor to use URLSearchParams | |
fetch( | |
`https://min-api.cryptocompare.com/data/pricemulti?fsyms=${[ | |
...tickersHandlers.keys() | |
].join(",")}&tsyms=USD&api_key=${API_KEY}` | |
) |
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
<template> | |
<div class="process__stage"> | |
<!--<div class="process__stage-interval"> | |
<ProcessInterval | |
:start="stageInfo.start_date" | |
:end="stageInfo.end_date" | |
/>--> | |
<div class="process__stage-body"> | |
<div class="process__stage_date_label"> | |
<div class="process__stage-interval"> |
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
el@el-IdeaPad-5-15ARE05:~/.ssh$ ssh -i ./id_rsa -Tvv [email protected] | |
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020 | |
debug1: Reading configuration data /home/el/.ssh/config | |
debug1: Reading configuration data /etc/ssh/ssh_config | |
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files | |
debug1: /etc/ssh/ssh_config line 22: Applying options for * | |
debug2: resolving "gitlab.com" port 22 | |
debug2: ssh_connect_direct | |
debug1: Connecting to gitlab.com [2606:4700:90:0:f22e:fbec:5bed:a9b9] port 22. | |
debug1: Connection established. |
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
el@el-IdeaPad-5-15ARE05:~$ ssh -vvv git@gitlab | |
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020 | |
debug1: Reading configuration data /home/el/.ssh/config | |
debug1: /home/el/.ssh/config line 1: Applying options for gitlab | |
debug1: Reading configuration data /etc/ssh/ssh_config | |
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files | |
debug1: /etc/ssh/ssh_config line 22: Applying options for * | |
debug2: resolving "gitlab.com" port 22 | |
debug2: ssh_connect_direct | |
debug1: Connecting to gitlab.com [172.65.251.78] port 22. |
NewerOlder