Skip to content

Instantly share code, notes, and snippets.

View mayankshah1607's full-sized avatar
๐Ÿ•
Focusing

Mayank Shah mayankshah1607

๐Ÿ•
Focusing
View GitHub Profile
from azure.cognitiveservices.search.imagesearch import ImageSearchAPI
from msrest.authentication import CognitiveServicesCredentials
subscription_key = "373c554ae1404f7dbbcb80b722b214c8"
def FetchImage(search_term):
client = ImageSearchAPI(CognitiveServicesCredentials(subscription_key))
image_results = client.images.search(query=search_term)
@mayankshah1607
mayankshah1607 / CONTRIBUTING.md
Last active July 7, 2020 08:30
This gist is a sample of CONTRIBUTING.md for Enigma 6 code repo.

Contributing Guidelines

This doc defines a set of rules and protocols that must be strictly followed while contributing to this repository.

1. Commit messages

  • Use the -m flag only for minor changes. The message following the -m flag must be of the below format :

    <Verb in present tense> <Action>

    โœ… Examples of valid messages:

  • Added routes/routes.js file

# Install docker
sudo apt-get update && \
sudo apt-get install docker.io -y
# Install kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
alias k=kubectl
absPath, err = filepath.Abs(destDir); err != nil {
feedback.Errorf("Cannot find absolute path: %v", err)
os.Exit(errorcodes.ErrGeneric)
}
configFileAbsPath := filepath.Join(absPath, defaultFileName)
msg := fmt.Sprintf("Config file written to: %s", configFileAbsPath)
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: web-svc
@mayankshah1607
mayankshah1607 / OSS_Contributions.md
Last active September 14, 2020 12:36
OSS Contributions made
from absl import logging
import collections
from tensorflow_privacy.privacy.analysis import privacy_ledger
from tensorflow_privacy.privacy.dp_query import gaussian_query
def make_optimizer_class(cls):
"""Constructs a DP optimizer class from an existing one."""
parent_code = tf.compat.v1.train.Optimizer.compute_gradients.__code__
child_code = cls.compute_gradients.__code__
{"level":"error","ts":1615978405.9387739,"logger":"gloo.v1.event_loop.setup.v1.event_loop.syncer.kubernetes_eds","caller":"kubernetes/eds.go:212","msg":"upstream gloo-system.mft-consumer-flagger-podinfo-primary-9898: port 9898 not found for service podinfo-primary","version":"1.6.15","stacktrace":"github.com/solo-io/gloo/projects/gloo/pkg/plugins/kubernetes.filterEndpoints\n\t/workspace/gloo/projects/gloo/pkg/plugins/kubernetes/eds.go:212\ngithub.com/solo-io/gloo/projects/gloo/pkg/plugins/kubernetes.(*edsWatcher).List\n\t/workspace/gloo/projects/gloo/pkg/plugins/kubernetes/eds.go:121\ngithub.com/solo-io/gloo/projects/gloo/pkg/plugins/kubernetes.(*edsWatcher).watch.func1\n\t/workspace/gloo/projects/gloo/pkg/plugins/kubernetes/eds.go:130\ngithub.com/solo-io/gloo/projects/gloo/pkg/plugins/kubernetes.(*edsWatcher).watch.func2\n\t/workspace/gloo/projects/gloo/pkg/plugins/kubernetes/eds.go:157"}
{"level":"error","ts":1615978405.9388125,"logger":"gloo.v1.event_loop.setup.v1.event_loop.syncer.kubernetes_eds","cal
#!/bin/sh
cp -r /go /shared
./tekton_dashboard_backend \
--port=9097
--logout-url=
--pipelines-namespace=tekton-pipelines
--triggers-namespace=tekton-pipelines
--read-only=false