This file contains hidden or 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
result = ((arr) => { | |
let biggest = 0 | |
let second_biggest = 0 | |
for(let i = 0; i < arr.length; i++) { | |
if (arr[i] > biggest) { | |
second_biggest = biggest | |
biggest = arr[i] | |
} else if (arr[i] > second_biggest && arr[i] < biggest) { |
This file contains hidden or 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
wait = WebDriverWait(session.browser, 3) | |
element_present = EC.presence_of_element_located( | |
(By.XPATH, "//p[@id='slfErrorAlert']") | |
) | |
wrong_credentials = wait.until(element_present) |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
from flask import Flask | |
from flask import request | |
import subprocess | |
import shlex | |
app = Flask(__name__) | |
@app.route('/get_account_status', methods=['GET']) |
This file contains hidden or 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
""" Quickstart script for InstaPy usage """ | |
# imports | |
from instapy import InstaPy | |
from instapy.util import smart_run | |
from random import sample | |
from random import randint | |
from time import sleep | |
# login credentials | |
insta_username = '' |
This file contains hidden or 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 React, { Component } from 'react' | |
import socket from 'socket.io-client' | |
import PropTypes from 'prop-types'; | |
import { withStyles } from '@material-ui/core/styles'; | |
import Avatar from '@material-ui/core/Avatar'; | |
import AccountBox from '@material-ui/icons/AccountBoxRounded'; | |
import Card from '@material-ui/core/Card'; | |
import CardContent from '@material-ui/core/CardContent'; | |
import Typography from '@material-ui/core/Typography'; |
This file contains hidden or 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
try: | |
WebDriverWait(self.driver, 10).until( | |
EC.presence_of_element_located((By.ID, "emailFrame")) | |
) | |
self.driver.switch_to_frame( | |
self.driver.find_element_by_id("emailFrame")) | |
# click first image | |
''' | |
WebDriverWait(self.driver, 180).until( |
This file contains hidden or 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
// next step: every time there is a new log, call socket.emit('newLogData') | |
io.on('connection', function (socket) { | |
console.log('connected <-') | |
// @todo: windows version | |
var tail = spawn("tail", ["-f", filename]); | |
tail.stdout.on("data", function (data) { | |
console.log(data.toString('utf-8')) | |
socket.emit('newLogData', { newLog: data.toString('utf-8') } ) | |
}); | |
}) |
This file contains hidden or 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
usernames = """tag_1 | |
tag_2 | |
tag_3""" | |
final = [] | |
users = usernames.split('\n') | |
for user in users: | |
final.append("{}".format(user.replace('\n', ' ,'))) | |
print(final) |
This file contains hidden or 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
converge@instapotenza:~$ cat /etc/apt/sources.list | |
# deb http://debian.pop-sc.rnp.br/debian/ stretch main | |
# deb http://debian.pop-sc.rnp.br/debian/ stretch-updates main | |
deb http://security.debian.org/ stretch/updates main | |
deb http://deb.debian.org/debian/ stretch main contrib non-free | |
deb-src http://deb.debian.org/debian/ stretch main contrib non-free | |
--- |
This file contains hidden or 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
call plug#begin() | |
Plug 'morhetz/gruvbox' | |
Plug 'sheerun/vim-polyglot' | |
Plug 'w0rp/ale' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'NLKNguyen/papercolor-theme' | |
Plug 'sonph/onehalf' | |
Plug 'kristijanhusak/vim-hybrid-material' | |
Plug 'mhartington/oceanic-next' | |
Plug 'Chiel92/vim-autoformat' |