For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
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 | |
projects_df.set_index('id').isna().groupby(level=0).sum()['ServiceAccount'].sum() |
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
pd_df['column'].str.lower().str.strip() |
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
#https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html | |
python -m venv .venv | |
source .venv/bin/activate | |
# AIRFLOW_VERSION=2.6.3 | |
export AIRFLOW_HOME=~/airflow | |
sudo pip3 install "apache-airflow[celery]==2.6.3" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.6.3/constraints-3.10.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
def read_file(filename): | |
with open(filename, 'r') as f: | |
content = f.read() | |
f.close() | |
return content | |
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
echo "Logfile started: $(date +'%D %T'$" > log.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
import logging | |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
logging.info(f'This is a logging message with an {fstring}') | |
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 yaml | |
yaml.load(open(<path_to_yaml_config>, 'r'), Loader=yaml.SafeLoader) | |
# convert json to yaml and back again. | |
import json | |
with open('config.json', 'r') as file: | |
configuration = json.load(file) |
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
library(plotly) | |
fig <- plot_ly( | |
type = 'scatter', | |
mode='markers', | |
y=rep(5, 40), | |
marker=list( | |
size=seq(0, 39), | |
color=seq(0, 39), | |
colorbar=list( |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Mar 15 16:36:30 2021 | |
@author: dsuser | |
""" | |
import os | |
print(os.getcwd()) | |
os.chdir("C:/Users/Public/Desktop/TraceData/hscni-analytics-data/R/risk_assess") |
NewerOlder