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
def post_gist(func_name, git_token, gist_description=None, public=True): | |
"""Post input function source code to your Github gist.""" | |
from inspect import getsource | |
from github import Github, InputFileContent | |
if not gist_description: | |
gist_description = func_name.__doc__ | |
me = Github(git_token).get_user() | |
code = {func_name.__name__ + '.py': InputFileContent(getsource(func_name))} |
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
"""Top Repos with Github public API (No Auth)""" | |
from github import Github | |
from collections import namedtuple | |
Repo = namedtuple('Repo', 'name stars forks url') | |
username = 'llSourcell' | |
git_user = Github().get_user(username) |
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 | |
# Install and select the latest Java LTS on Amazon Linux 2 | |
# Install Maven | |
# Install latest Java LTS | |
sudo yum install java | |
echo "Select the latest Java LTS" | |
sudo alternatives --config java |
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 os | |
import json | |
def format_json_file(file_path): | |
# Open the JSON file | |
try: | |
with open(file_path, "r") as json_file: | |
# Load the JSON data from the file | |
json_data = json.load(json_file) |