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 pandas as pd | |
from diskcache import FanoutCache | |
from diskcache.core import ENOVAL, args_to_key, ft, full_name | |
class cconnect(object): | |
def __init__(self): | |
self.begin = self.__enter__ |
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
# sudo apt-get install xclip | |
for file in *; do if [ -f "$file" ]; then echo "=============$file============="; cat "$file"; echo; fi; done | xclip -selection clipboard |
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
#!/bin/bash | |
# Update and Upgrade the System | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# Determine the installed Python version (major.minor) | |
PYTHON_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")') | |
# Install the corresponding version of python3.x-dev along with other necessary packages |
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
aws sts get-session-token --duration-seconds 900 --output text | awk '{print "export AWS_ACCESS_KEY_ID="$2"\nexport AWS_SECRET_ACCESS_KEY="$4"\nexport AWS_SESSION_TOKEN="$5}' |
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 ast | |
import re | |
import json | |
from graphviz import Digraph | |
from collections import defaultdict | |
# Define your repository root | |
REPO_DIR = '/home/daniel/PycharmProjects/api' | |
PARENT_DIR = os.path.dirname(REPO_DIR) # This will be '/home/daniel/PycharmProjects' |