Skip to content

Instantly share code, notes, and snippets.

View kunalgoyal9's full-sized avatar
:bowtie:

Kunal Goyal kunalgoyal9

:bowtie:
  • India, Delhi
View GitHub Profile
@kunalgoyal9
kunalgoyal9 / Slack_send_message.py
Created December 23, 2021 07:13
This gist takes any parameters as message and sends to the channel
import requests
import sys
import getopt
def send_slack_message(message):
payload = '{"text": "%s"}' % message
response = requests.post("https://hooks.slack.com/services/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",
data = payload)
print(response.text)
@YashasSamaga
YashasSamaga / yolov4.py
Last active February 18, 2024 04:03
YOLOv4 on OpenCV DNN
import cv2
import time
CONFIDENCE_THRESHOLD = 0.2
NMS_THRESHOLD = 0.4
COLORS = [(0, 255, 255), (255, 255, 0), (0, 255, 0), (255, 0, 0)]
class_names = []
with open("classes.txt", "r") as f:
class_names = [cname.strip() for cname in f.readlines()]
@sathyarr
sathyarr / gather_tree_py_custom.cc
Last active July 30, 2021 12:50
Custom operation to replace py_func in google/seq2seq(beam_search.py#L90). Using this Custom operation helps to successfully export the model for Tensorflow Serving.
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/shape_inference.h"
#include "tensorflow/core/framework/op_kernel.h"
using namespace tensorflow;
REGISTER_OP("GatherTreePyCustom")
.Input("values: int32")
.Input("parents: int32")
.Output("res: int32");
@ssaadh
ssaadh / wget
Created March 18, 2017 15:53 — forked from bueckl/wget
Wget examples
#Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html example.com