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
| if grep -q 'source <(kubectl completion bash)' ~/.bashrc; then | |
| echo 'alias k=kubectl' >> ~/.bashrc | |
| echo 'complete -F __start_kubectl k' >> ~/.bashrc | |
| fi | |
| source ~/.bashrc |
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
| # pip install boto3 | |
| class S3Util: | |
| def __init__(self): | |
| self.s3 = boto3.resource(service_name='s3',region_name='us-east-2') | |
| def fetch_all_buckets(): | |
| for bucket in self.s3.buckets.all(): |
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
| # -*- coding: utf-8 -*- | |
| import torch as th | |
| import torchvision.transforms as T | |
| import requests | |
| from PIL import Image, ImageDraw, ImageFont | |
| import matplotlib.pyplot as plt | |
| class DETRModel(object): |
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 | |
| from datetime import datetime | |
| import numpy as np | |
| base_url= "http://165.22.250.235/api/assessment" | |
| def Get(url:str, headers:dict = None): | |
| if headers == None: headers = {} | |
| resp = requests.get(url, headers=headers) | |
| return resp |
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
| jt -t grade3 -fs 11 -f roboto -tfs 11 -nfs 115 -cellw 88% -T |
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 ipywidgets as widgets | |
| import matplotlib.pyplot as plt | |
| from IPython.display import display, Markdown, clear_output | |
| | |
| menu = widgets.Dropdown(options=['red', 'blue', 'green'], value="red", description='Color:') | |
| out = widgets.Output() | |
| | |
| def on_change(change): | |
| with out: | |
| if change['type'] == 'change' and change['name'] == 'value': |
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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| "sync" | |
| "os/exec" | |
| ) | |
| var wg sync.WaitGroup |
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
| kind: MasterConfiguration | |
| apiVersion: kubeadm.k8s.io/v1alpha1 | |
| controllerManagerExtraArgs: | |
| horizontal-pod-autoscaler-use-rest-clients: "true" | |
| horizontal-pod-autoscaler-sync-period: "10s" | |
| node-monitor-grace-period: "10s" | |
| apiServerExtraArgs: | |
| runtime-config: "api/all=true" | |
| kubernetesVersion: "stable-1.8" |
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
| empId | salary | |
|---|---|---|
| 1 | 100 | |
| 2 | 200 | |
| 3 | 300 | |
| 4 | 400 | |
| 5 | 500 | |
| 6 | 600 | |
| 7 | 700 | |
| 8 | 800 | |
| 9 | 900 |
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
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
NewerOlder