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 requests | |
import sys | |
import webbrowser | |
GITHUB_URL = "https://api.github.com/search/repositories?q={query_string}&sort=stars" | |
class CustomException(Exception): | |
pass | |
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
Nginx Redirection flow | |
www.host.com www.host.com | |
80 443 | |
\ / |
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 tweepy | |
import os | |
consumer_key = os.getenv("TWITTER_API_KEY") | |
consumer_secret = os.getenv("TWITTER_API_SECRET") | |
access_token = os.getenv("TWITTER_OAUTH_TOKEN") | |
access_token_secret = os.getenv("TWITTER_OAUTH_SECRET") | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) |
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 tweepy | |
import os | |
consumer_key = os.getenv("TWITTER_API_KEY") | |
consumer_secret = os.getenv("TWITTER_API_SECRET") | |
access_token = os.getenv("TWITTER_OAUTH_TOKEN") | |
access_token_secret = os.getenv("TWITTER_OAUTH_SECRET") | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) |
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
from kafka import KafkaConsumer | |
consumer1 = KafkaConsumer('payments', group_id="group1", bootstrap_servers='localhost:9092') | |
for msg in consumer1: | |
print(msg) |
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 os | |
import re | |
import logging | |
def rename_it(dirpath, path_suffix, is_dir): | |
pattern = r"([a-zA-Z0-9\s\+\&\']+)\s([a-z0-9]{32})" | |
match = re.match(pattern, path_suffix) | |
if match is not None: | |
if is_dir: |
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 csv | |
import argparse | |
def main(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--file") | |
parser.add_argument("--outfile") | |
args = parser.parse_args() | |
mapping = { |
OlderNewer