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 | |
class Bot: | |
BASE_URL = 'https://api.telegram.org' | |
def __init__(self, token: str) -> None: | |
self.token = token | |
self.base_url = f'{self.BASE_URL}/bot{token}' |
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
curators_dict = { | |
# andan | |
'a.fenin@letnyayashkola.org': {'workshop_slug': 'andan'}, | |
'a.zhukova@letnyayasnkola.org': {'workshop_slug': 'andan'}, | |
'm.servetnik@letnyayashkola.org': {'workshop_slug': 'andan'}, | |
'e.rybina@letnyayashkola.org': {'workshop_slug': 'andan'}, | |
'g.moroz@letnyayashkola.org': {'workshop_slug': 'andan'}, | |
'e.kozhanova@letnyayashkola.org': {'workshop_slug': 'andan'}, | |
# astrogeo | |
'k.vlasov@letnyayashkola.org': {'workshop_slug': 'astrogeo'}, |
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
to_parse = """ | |
If (feature 1 <= 0.0690282131661442) | |
Predict: 0.0 | |
Else (feature 1 > 0.0690282131661442) | |
Predict: 1.0 | |
""" | |
def parse_this_shit(shit): | |
lines = [line.strip() for line in shit.split('\n')] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <iostream> | |
using namespace std; | |
void printArray(const int* const b, const unsigned size) | |
{ | |
for (unsigned i = 0; i < size; i++) | |
cout<< b[i] << ' '; | |
cout << endl; | |
} |
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 copy | |
a = [1, 2, 3] | |
b = [] | |
c_d = [15, 18, 20] | |
d_d = [] | |
e_l = [4, 5, 6] | |
f_l = [] |
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
$ squeue -u andrey | awk '{print $1}' | grep -v 'JOBID' > /tmp/andrey_pending_jobs | |
for jid in ` squeue -u igomo | awk '{print $1}' | xargs grep -v 'JOBID' ` | |
do | |
scontrol update Dependency=after:`cat /tmp/andrey_pending_jobs | tr '\n' ':' | sed 's/.$//'` JobId=${jid} | |
done | |
# .bashrc aliases | |
go2workdir () | |
{ |
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
#!/usr/bin/python2 | |
# coding: utf-8 | |
import csv | |
import codecs | |
import sys | |
class UTF8Recoder(object): | |
""" |
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
==> Making package: modules 3.2.10-1 (Tue Feb 3 15:50:25 CET 2015) | |
==> Checking runtime dependencies... | |
==> Checking buildtime dependencies... | |
==> Retrieving sources... | |
-> Downloading modules-3.2.10.tar.bz2... | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 383 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
0 461 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 | |
0 375 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 |
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
#!/bin/bash | |
INITIAL_MOUNTPOINT=/media/0000-0001 | |
PATH_TO_FILE=/tmp/TAMD_2014_Abstract_book.pdf | |
INTERVAL=5 | |
DEVICE=/dev/sdc1 | |
NEW_LABEL=TAMD-2014 | |
while true; do |