View .deps...github...OpenZeppelin...openzeppelin-contracts...contracts...math...SafeMath.sol
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.7.0; | |
/** | |
* @dev Wrappers over Solidity's arithmetic operations with added overflow | |
* checks. | |
* | |
* Arithmetic operations in Solidity wrap on overflow. This can easily result | |
* in bugs, because programmers usually assume that an overflow raises an |
View Slack_send_message.py
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 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) |
View categorized_single_vs_double_lps.py
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
class Point: | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
def onSegment(p, q, r): | |
if ( (q.x <= max(p.x, r.x)) and (q.x >= min(p.x, r.x)) and(q.y <= max(p.y, r.y)) and (q.y >= min(p.y, r.y))): | |
return True | |
return False |
View extract_frames.py
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 cv2 | |
import os | |
frames_path = "/home/kunal/Vehicle_detection_tflite/Data-dashboard-Frames" | |
videos_path = "/home/kunal/Vehicle_detection_tflite/Data-dashboard" | |
videos = os.listdir(videos_path) | |
idx = 0 | |
for video in videos: | |
path = os.path.join(videos_path, video) |
View Slow_fast_int8.py
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
# | |
# Copyright 1993-2019 NVIDIA Corporation. All rights reserved. | |
# | |
# NOTICE TO LICENSEE: | |
# | |
# This source code and/or documentation ("Licensed Deliverables") are | |
# subject to NVIDIA intellectual property rights under U.S. and | |
# international Copyright laws. | |
# | |
# These Licensed Deliverables contained herein is PROPRIETARY and |
View calibrator.py
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 pycuda.driver as cuda | |
import pycuda.autoinit | |
import numpy as np | |
from PIL import Image | |
import ctypes | |
import tensorrt as trt | |
from slowfast.config.defaults import get_cfg | |
from slowfast.datasets import loader |