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
# Chrome webdriver: https://sites.google.com/chromium.org/driver/ | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.chrome.options import Options | |
options = Options() | |
options.headless = False |
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 kafka import KafkaConsumer | |
host = '' | |
topic = '' | |
user = '' | |
password= '' | |
sasl_mechanism = 'SCRAM-SHA-512' | |
security_protocol = 'SASL_SSL' | |
consumer = KafkaConsumer( |
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
// sum_series( | |
// a={{0, 2}, {5, 1}}, | |
// b={{2, 4}, {3, 6}, {8, 7}} | |
// ) -> {{0, 2}, {2, 6}, {3, 8}, {5, 7}, {8, 8}} | |
#include <vector> | |
struct Point { | |
int time; | |
int value; |
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> | |
#include <vector> | |
#include <string> | |
#include <limits> // <----- did not have time to fix here | |
using namespace std; | |
string ltrim(const string &); | |
string rtrim(const string &); | |
vector<string> split(const string &); |
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 <typeinfo> | |
#if defined __GNUC__ | |
#include <cxxabi.h> // GCC / Clang only | |
#endif | |
#include <string> | |
std::string type_name_to_full_name(const char* name) { | |
char * n = abi::__cxa_demangle(name, 0, 0, 0); | |
std::string s{n}; | |
free(n); |
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> | |
#include <fstream> | |
#include <string> | |
void f() | |
{ | |
std::string line; | |
while(std::getline(std::cin, line)) //input from the file in.txt | |
{ | |
std::cout << line << "\n"; //output to the file out.txt |
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 | |
""" | |
LUFA Library | |
Copyright (C) Dean Camera, 2021. | |
dean [at] fourwalledcubicle [dot] com | |
www.lufa-lib.org | |
""" |
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
killall Xcode | |
xcrun -k | |
xcodebuild -alltargets clean | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
rm -rf /Applications/Xcode.app | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode | |
rm -rf ~/Library/Developer | |
rm -rf ~/Library/MobileDevice | |
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist |
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 pandas as pd | |
import numpy as np | |
from datetime import datetime | |
import json | |
import time | |
from dateutil import tz | |
import models | |
import db_utils | |
import telegram_client |
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 telethon.tl.functions.messages import GetDialogsRequest | |
from telethon.tl.types import InputPeerEmpty | |
from telethon import TelegramClient | |
from telethon.tl.functions.messages import AddChatUserRequest | |
from telethon.tl.functions.messages import ForwardMessagesRequest | |
from telethon.tl.functions.messages import GetChatsRequest | |
from telethon.tl.functions.contacts import GetContactsRequest | |
from telethon.tl.functions.contacts import SearchRequest | |
from telethon.tl.functions.channels import InviteToChannelRequest | |
from telethon.tl.functions.channels import GetMessagesRequest |
NewerOlder