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
package main | |
import ( | |
"fmt" | |
"math" | |
"math/rand" | |
"net/http" | |
"time" | |
"github.com/prometheus/client_golang/prometheus" |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/prometheus/client_golang/prometheus" | |
"github.com/prometheus/client_golang/prometheus/promhttp" | |
"github.com/sony/gobreaker" |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/sony/gobreaker" | |
) |
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
--- | |
- name: Redis Installation | |
hosts: redis | |
become: true | |
tasks: | |
- name: Update package repositories | |
yum: | |
update_cache: yes |
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_playbook: requirements.yml #you can find the file content in my gist | |
- name: Provision a GCP VM | |
hosts: localhost | |
gather_facts: false | |
vars: | |
gcp_cred_file: <your json service account> | |
gcp_project: <project-id> | |
machine_type: "e2-medium" |
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
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: false | |
vars: | |
pip_package_requirements: | |
- "requests" | |
- "google-auth" | |
- "google-auth-httplib2" |
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
--- | |
- name: Redis Installation | |
hosts: redis | |
become: true | |
tasks: | |
- name: Update package repositories | |
yum: | |
update_cache: yes |
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_playbook: requirements.yml | |
- name: Provision a GCP VM | |
hosts: localhost | |
gather_facts: false | |
vars: | |
gcp_cred_file: <path/to/serviceaccount/json/file> | |
gcp_project: <project-id> | |
machine_type: "e2-medium" |
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
{ | |
"Log info": { | |
"prefix": ["loginfo", "logger"], | |
"body": ["getLogger().info(${1:info})"], | |
"description": "Log info" | |
}, | |
"Log error": { | |
"prefix": ["logerror"], | |
"body": ["getLogger().error(${1:error})"], | |
"description": "Log error" |
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 tensorflow as tf | |
def get_frozen_graph(graph_file): | |
"""Read Frozen Graph file from disk.""" | |
with tf.gfile.FastGFile(graph_file, "rb") as f: | |
graph_def = tf.GraphDef() | |
graph_def.ParseFromString(f.read()) | |
return graph_def | |
# The TensorRT inference graph file downloaded from Colab or your local machine. |
NewerOlder