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 asyncio | |
import logging | |
import os | |
import pathlib | |
import re | |
import shutil | |
from datetime import datetime, timedelta | |
from telethon import TelegramClient | |
from telethon.tl.functions.messages import GetDialogsRequest |
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
function SendUploadFile { | |
[CmdletBinding(SupportsShouldProcess)] | |
param ( | |
[string]$Path, | |
[switch]$Silent = $false | |
) | |
$SendHosts = ("https://send.portailpro.net","https://send.ephemeral.land") | |
$BaseDir = $env:UserProfile + "\Send" | |
$LogsDir = $env:Temp + "\send_logs" |
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
<?php | |
$client_id = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
$client_secret = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
if (empty($_GET['code'])) { | |
echo '<p><a href="https://hh.ru/oauth/authorize?response_type=code&client_id=' . $client_id . '">Обновить резюме</a></p>'; | |
} else { | |
if ($curl = curl_init()) { | |
curl_setopt($curl, CURLOPT_URL, 'https://hh.ru/oauth/token'); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
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
if __name__ == '__main__': | |
from pathlib import Path | |
def rmdir(directory, cond): | |
directory = Path(directory) | |
should_delete: bool = cond(directory) | |
try: | |
for item in directory.iterdir(): | |
if item.is_dir(): | |
rmdir(item, lambda d: should_delete or cond(d)) |
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
# ./ffmpeg_vp9_2pass.sh input.mp4 2M 96k 1920 60 | |
set -x | |
input="$1" | |
bitrate="${2:-2M}" | |
audio_bitrate="${3:-96k}" | |
scale="'min(${4:-1920},iw)':'ih*$4/iw'" | |
fps="${5:-60}" |
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 com.wavesplatform.account.Address; | |
import com.wavesplatform.account.KeyPair; | |
import com.wavesplatform.common.state.ByteStr; | |
import com.wavesplatform.state.DataEntry; | |
import com.wavesplatform.transaction.Asset; | |
import com.wavesplatform.transaction.DataTransaction; | |
import com.wavesplatform.transaction.Proofs; | |
import com.wavesplatform.transaction.smart.InvokeScriptTransaction; | |
import com.wavesplatform.transaction.smart.SetScriptTransaction; | |
import com.wavesplatform.transaction.transfer.TransferTransaction; |
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 com.wavesplatform.account.Address; | |
import com.wavesplatform.account.KeyPair; | |
import com.wavesplatform.common.state.ByteStr; | |
import com.wavesplatform.lang.script.Script; | |
import com.wavesplatform.lang.v1.FunctionHeader; | |
import com.wavesplatform.lang.v1.compiler.Terms; | |
import com.wavesplatform.lang.v1.estimator.ScriptEstimator; | |
import com.wavesplatform.state.DataEntry; | |
import com.wavesplatform.state.IntegerDataEntry; | |
import com.wavesplatform.state.StringDataEntry; |
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 im.mak.waves.transactions; | |
import im.mak.waves.crypto.account.PrivateKey; | |
import im.mak.waves.crypto.account.PublicKey; | |
import im.mak.waves.crypto.account.Seed; | |
import im.mak.waves.transactions.common.*; | |
import im.mak.waves.transactions.invocation.Function; | |
import im.mak.waves.transactions.invocation.StringArg; | |
import java.util.ArrayList; |
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
val file = "/Users/user/Downloads/waves.log" | |
val regex = s"${Regex.quote("http://.wvservices.com:6869")}(/.*)".r.unanchored | |
val result = Source | |
.fromFile(file) | |
.getLines() | |
.collect { case regex(url) ⇒ url } | |
.map(s => "\"" + s + "\"") | |
.toSet | |
.mkString(",\n") | |
println(result) |
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 scala.io.StdIn | |
import scala.language.{implicitConversions, postfixOps} | |
import scodec.bits.ByteVector | |
import Types.{ReqDHParams, ReqPQ, ResPQ} | |
import akka.actor.ActorSystem | |
import akka.stream.scaladsl.Tcp | |
import akka.stream.ActorMaterializer | |
import akka.util.ByteString | |
import scodec.{Codec, DecodeResult} |
NewerOlder