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/env python | |
''' | |
mikrotik basic login script | |
''' | |
import re | |
import requests | |
from md5 import md5 | |
USER = 'i am groot' |
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
CFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib" UWSGI_PROFILE_OVERRIDE=ssl=true pip install uwsgi -Iv --no-cache-dir |
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
{ | |
// .vscode/tasks.json | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "build current file", | |
"type": "shell", | |
"command": "g++", | |
"args": [ | |
"-std=c++11", "-Wall", "${file}", "-o ${fileBasenameNoExtension}" |
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
"""Helper module to handle time related stuff""" | |
from random import gauss | |
from time import sleep as original_sleep | |
# Amount of variance to be introduced | |
# i.e. random time will be in the range: TIME +/- STDEV % | |
STDEV = 0.5 | |
sleep_percentage = 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
#include <bits/stdc++.h> | |
using namespace std; | |
int main(){ | |
int n; | |
while(scanf("%d", &n) == 1) { | |
for(int i = 0; i*i < pow(10, n); i++){ | |
if(pow(i*i % (int) pow(10, n / 2) + i*i / (int) pow(10, n / 2), 2) == i*i){ | |
printf("%0*d\n", n, i*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
import { Injectable } from '@angular/core'; | |
import * as XLSX from 'xlsx'; | |
const EXCEL_EXTENSION = '.xlsx'; | |
@Injectable() | |
export class ExcelService { | |
constructor() { } |
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 sys | |
TOO_BIG = 'TOO_BIG' | |
CORRECT = 'CORRECT' | |
TOO_SMALL = 'TOO_SMALL' | |
WRONG_ANSWER = 'WRONG_ANSWER' | |
def main(): | |
tc = int(input()) |
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
# docker run -it --rm multiarch/ubuntu-core:armhf-xenial /bin/bash | |
apt update | |
apt upgrade -y | |
apt install wget scons build-essential python-pymongo python-dev libssl-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev -y | |
mkdir builder | |
cd /builder | |
wget https://fastdl.mongodb.org/src/mongodb-src-r3.2.20.tar.gz | |
tar xvf mongodb-src-r3.2.20.tar.gz | |
cd mongodb-src-r3.2.20 | |
cd src/third_party/mozjs-38/ |
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
sudo apt update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ |
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
// From | |
ActionChains(browser).move_to_element(element).click().perform() | |
// To | |
browser.execute("arguments[0].scrollIntoView()", element) | |
ActionChains(browser).move_to_element(element).click().perform() |
OlderNewer