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
    
  
  
    
  | # Provide links to any relevant tickets, articles or other resources | |
| # SC-12: The ticket title | |
| # If applied, this commit will... | |
| # Why is this change needed? | |
| Prior to this change, | |
| #------------------------------------------------^---------------------^ | |
| # 50^ 72^ | 
  
    
      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
    
  
  
    
  | chat_history_raw_file = os.path.abspath(os.path.dirname( | |
| __file__)) + '/../resources/chat_history_raw.csv' | |
| chat_history_raw_df = pd.read_csv(chat_history_raw_file, parse_dates=['created_at']) | 
  
    
      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
    
  
  
    
  | ############################################################################ | |
| # # | |
| # ------- Useful Docker Aliases -------- # | |
| # # | |
| # # Installation : # | |
| # copy/paste these lines into your .bashrc or .zshrc file or just # | |
| # type the following in your current shell to try it out: # | |
| # wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash | |
| # # | |
| # # Usage: # | 
  
    
      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
    
  
  
    
  | alias kc='kubectl' | |
| alias kclf='kubectl logs --tail=200 -f' | |
| alias kcgs='kubectl get service -o wide' | |
| alias kcgd='kubectl get deployment -o wide' | |
| alias kcgp='kubectl get pod -o wide' | |
| alias kcgn='kubectl get node -o wide' | |
| alias kcdp='kubectl describe pod' | |
| alias kcds='kubectl describe service' | |
| alias kcdd='kubectl describe deployment' | |
| alias kcdf='kubectl delete -f' | 
  
    
      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 logging | |
| import os | |
| from logging.config import fileConfig | |
| def create_logger(name): | |
| if "PYTHON_LOGGING_CONFIG_FILE" in os.environ: | |
| logging_config_file_from_environ = os.environ["PYTHON_LOGGING_CONFIG_FILE"].strip("\"").strip("'") | |
| if logging_config_file_from_environ: | |
| fileConfig(logging_config_file_from_environ) | |
| elif os.path.exists(os.path.abspath(os.path.dirname( \ | 
  
    
      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
    
  
  
    
  | # foo.py | |
| from collections import defaultdict | |
| def bar(): | |
| return defaultdict() | 
  
    
      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
    
  
  
    
  | const { createLogger, format, transports } = require('winston'); | |
| const { combine, timestamp, label, printf } = format; | |
| export const getLogger = function(label) { | |
| const localFormat = printf(info => { | |
| return `${info.timestamp} [${info.label}] ${info.level}: ${info.message}`; | |
| }); | |
| return createLogger({ | |
| format: combine(label({ label }), timestamp(), localFormat), | 
  
    
      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
    
  
  
    
  | kubectl get job "your-job" -o json | jq 'del(.spec.selector)' | jq 'del(.spec.template.metadata.labels)' | kubectl replace --force -f - | 
  
    
      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
    
  
  
    
  | mongodump --host localhost:20719 --db flamingolife_go_live_small --archive | mongorestore --host localhost:27018 --archive | 
  
    
      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
    
  
  
    
  | #!/usr/bin/env bash | |
| DEPLOYMENT=$1 | |
| while : | |
| do | |
| for p in $(kubectl get pods | grep ^${DEPLOYMENT}- | cut -f 1 -d ' '); do | |
| echo --------------------------- | |
| echo $p | |
| echo --------------------------- | 
OlderNewer