Skip to content

Instantly share code, notes, and snippets.

Samat Galimov gsamat

Block or report user

Report or block gsamat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View задание.md

Вакансия: https://t.me/ctodaily/1063 Для связи: https://t.me/samatg или samat@pure.app

Если есть код — присылайте лучше код. Если код показать не можете/не хотите — вот задание:

Берём не джанго-фреймворк (eve/falcon/даже aiohttp), делаем один эндпоинт который принимает такой запрос:

POST /api/me
{
View translate_google.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# how to obtain google translation api key: https://cloud.google.com/translate/docs/quickstart-client-libraries-v3#client-libraries-install-python
import json
import glob
import os
import re
import requests
@gsamat
gsamat / gist:b11515c111f5938010b46e2ecb7d4033
Created Apr 17, 2019
new russian internet legislation
View gist:b11515c111f5938010b46e2ecb7d4033
1. ISPs should adhere to routing rules set by the gvmnt
2. ISPs should only use DNSses approved by the gvnmt
3. ISPs should only peer at the IXes approved by the gvmnt
4. ISPs should have usual censorship and surveillance devices from the gvmt
5. IXes should not allow unapproved ISPs to peer (what about foreign ISPs?)
6. the will be drills
7. roskomnadzor is the watchdog for all above
8. ISPs have 7 days to give info an all above is asked by RKN
9. roskomnadzor maintains a list of IXes
10. gvmnt may centralise control in case of security threats
View Brewfile
tap "ethereum/ethereum"
tap "heroku/brew"
tap "homebrew/boneyard"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "paritytech/paritytech"
cask "java"
brew "ansible"
View 1-Makefile
instal dependencies:
brew install pup
download data:
wget --recursive --level=1 'https://www.stihi.ru/avtor/stanislav35&s=0'
wget --recursive --level=1 'https://www.stihi.ru/avtor/stanislav35&s=50'
cd www.stihi.ru/
prepare data:
find 2016 2017 -type f -exec ./extract.sh {} \;
find 2016 2017 -type f -not -iname '*.extr' -delete
mv 201* data
View run.sh
#!/bin/sh
for i in `seq 1 10`; do
curl "https://book-audio.com/find/allcards?sort=downloads&order=desc&excludeRead=0&withAudio=0&duration=any&page=$i&search=&extendedList=find&CSRF=9da4d4ea80aa46609636bf087a2e5c8c5eeda71d" -H 'Cookie: lang=en; lang=en; PHPSESSID=g4av701f51k9miak24pgqs9mr5' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Accept-Language: en-GB,en-US;q=0.8,en;q=0.6' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3053.3 Safari/537.36 OPR/46.0.2567.0 (Edition developer)' -H 'Accept: */*' -H 'Referer: https://book-audio.com/find' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --compressed > $i.json
cat *.json | jq -s 'add' > total.json
done;
View -
curl "https://api.vk.com/method/likes.getList?type=sitepage&owner_id=4575679&page_url=https:%2F%2Fmeduza.io%2Fcards%2Fkak-spastis-ot-vygoraniya-na-rabote&count=1"
HTTP/1.1 200 OK
Server: Apache
Date: Wed, 19 Apr 2017 09:42:30 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 406
Connection: close
X-Powered-By: PHP/3.12542
Set-Cookie: remixlang=3; expires=Sat, 14 Apr 2018 16:43:45 GMT; path=/; domain=.vk.com
View -
curl "https://api.vk.com/method/likes.getList?type=sitepage&owner_id=4575679&page_url=https:%2F%2Fmeduza.io%2Fcards%2Fkak-spastis-ot-vygoraniya-na-rabote&count=1"
HTTP/1.1 200 OK
Server: Apache
Date: Wed, 19 Apr 2017 09:42:30 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 406
Connection: close
X-Powered-By: PHP/3.12542
Set-Cookie: remixlang=3; expires=Sat, 14 Apr 2018 16:43:45 GMT; path=/; domain=.vk.com
View -
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="ru">
<head>
<meta charset="utf-8" />
<title>DEV: проверочка 2: подзаголовок — Meduza</title>
<link rel="manifest" href="/manifest.json">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
<script>
View markdown-telegram.sh
#!/bin/sh
# CONFIGURATION
# 1. Go to @botfather and create a bot and use it's auth token as bot_token value
# 2. Create test channel, believe me, you need it
# 3. Set some url for your test channel
# 4. Add your bot to both channels, set their names in variables
# USAGE
# 1. Copy your markdown-formatted message into OS clipboard (Cmd+C)
You can’t perform that action at this time.