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 -*- | |
""" | |
File name: download_apk.py | |
Author: Dawand Sulaiman | |
Download APK files from Google Play Store with Python | |
This script scraps https://apkpure.com to get the apk download link | |
Make sure you have BeautifulSoup and urllib libraries | |
""" |
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 python3 | |
# encoding: utf-8 | |
import json | |
file_name = 'websocket.har' | |
f = open(file_name) | |
j = json.load(f) | |
entries = j['log']['entries'] | |
for e in entries: | |
if e['_resourceType'] == 'websocket' and '_webSocketMessages' in e.keys(): |
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
$tmpPath = "C:\tmp\" | |
# $searchPath = "H:\Desktop" | |
$searchPath = (Get-Location).Path | |
$files = Get-ChildItem $searchPath -Recurse -Include *.xlsx | |
foreach ($f in $files){ | |
$filename = $f.FullName | |
$guid = [guid]::NewGuid().Guid | |
$tempname = $tmpPath + $guid + ".zip" | |
$destinationUnarchivedPath = $tmpPath + $guid | |
$docProps = $destinationUnarchivedPath + "\docProps\custom.xml" |
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 python3.7 | |
# encoding: utf-8 | |
import time | |
import os | |
from io import StringIO | |
from smspdu.fields import SMSDeliver | |
import requests | |
asterisk_log = '/var/log/asterisk/messages' |
Всякая последовательность событий может характеризоваться двумя метриками - амплитудой (т.е., интенсивностью события) и временным интервал между двумя ближайшими событиями.
Как правило, наиболее распространен случай, когда «маленьких событий много, а больших событий мало». Построим линейный график зависимости интенсивности от временных интервалов между событиями.
(Fig 1)
Значимая информация в таком графике тяжела для человеческого восприятия, и поэтому для наглядности преобразуем шкалы из линейных в логарифмические.
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 python3 | |
# encoding: utf-8 | |
import vk | |
import markovify | |
service_token = '{PUT YOUR TOKEN HERE}' | |
vk_id = '{PUT VK ID HERE}' | |
session = vk.Session(access_token=service_token) | |
vk_api = vk.API(session) | |
posts_json = vk_api.wall.get(domain=vk_id, count=100) | |
text = '' |