Skip to content

Instantly share code, notes, and snippets.

<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kn1cht
kn1cht / circular.py
Last active March 19, 2024 05:39
Circular Statistics by Python
import cmath
import numpy as np
import scipy.stats as stats
def mean(angles, deg=True):
'''Circular mean of angle data(default to degree)
'''
a = np.deg2rad(angles) if deg else np.array(angles)
angles_complex = np.frompyfunc(cmath.exp, 1, 1)(a * 1j)
mean = cmath.phase(angles_complex.sum()) % (2 * np.pi)
@cyborgshead
cyborgshead / aragon_bare_setup.md
Last active November 25, 2021 13:28
Aragon DAO bare setup

Prepare ~/.aragon/rinkeby_key.json

{
  "rpc": "https://<network>.infura.io",
  "keys": ["put-your-priv-key-here"]
}

Bootstrap