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 | |
from telethon import TelegramClient, events | |
from yandex_music import Client | |
import time | |
import datetime | |
yaclient = Client.from_credentials('fryday.kg@yandex.ru', 'xxxxx') | |
def get_current_track(): | |
try: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; //compatibility for firefox and chrome | |
var pc = new RTCPeerConnection({iceServers:[]}), noop = function(){}; | |
pc.createDataChannel(""); //create a bogus data channel |
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
# Echo client program | |
import socket | |
import math | |
import numexpr | |
x = ['+','-','/', '*'] | |
e = 0.00001 | |
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 requests | |
from itertools import product | |
import time | |
import re | |
import os | |
import subprocess | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) |
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
fryday@fryday-HP-ZBook-15:~/sorts$ time ./quick_sort_lamuto 5000000 1234 | |
OK | |
real 0m39.338s | |
user 0m39.365s | |
sys 0m0.000s | |
fryday@fryday-HP-ZBook-15:~/sorts$ time ./quick_sort_lamuto_modified 5000000 1234 | |
OK |
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
int Partition(int *a, int l, int r) { | |
int x = a[l], i = l - 1, j = r; | |
while (1) { | |
do j--; while (a[j] > x); | |
do i++; while (a[i] < x); | |
if (i < j) | |
swap(a[i],a[j]); | |
else | |
return j + 1; | |
} |
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
int Partition(int *a, int l, int r) { | |
r--; | |
int pivot = a[r]; | |
int i = l - 1; | |
for (int j = l; j < r; j++) | |
if (a[j] <= pivot) | |
if (++i != j) | |
swap(a[i], a[j]); | |
swap(a[++i], a[r]); | |
return 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
int Partition(int *a, int l, int r) { | |
r--; | |
int pivot = a[r]; | |
int i = l - 1; | |
for (int j = l; j < r; j++) | |
if (a[j] <= pivot) | |
swap(a[++i], a[j]); | |
swap(a[++i], a[r]); | |
return 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
#include "sort.h" | |
#include "utils.h" | |
int Partition(int *a, int l, int r); | |
void Sort(int *a, int l, int r) { | |
if (r - l > 1) { | |
int m = Partition(a, l, r); | |
Sort(a, l, m); | |
Sort(a, m + 1, r); |
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
$_data = array( | |
'subscriber_id' => $subscriber_id, | |
'list_id' => $list_id, | |
'activation_key' => md5(uniqid(rand())), | |
'unsubscribe_key' => md5(uniqid(rand())), | |
'email' => $subscriber['email'], | |
'timestamp' => TIME, | |
'lang_code' => $lang_code, | |
'confirmed' => ($_confirmed == NULL) ? (!empty($lists[$list_id]['register_autoresponder']) ? 0 : 1) : ($_confirmed ? 1 : 0), | |
'format' => intval($format) |
NewerOlder