Skip to content

Instantly share code, notes, and snippets.

@salihkaragoz
salihkaragoz / coco_getcat.py
Last active May 23, 2019 12:52
COCO categories
import json
data = json.load(open('instances_train2017.json'))
print data.keys()
#OUTPUT :
# [u'info', u'licenses', u'images', u'annotations', u'categories']
print data['categories']
'''

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@salihkaragoz
salihkaragoz / Udp Sender
Created July 10, 2017 09:11
UDPClient Close time for Unreachable Ip with Pyhton
import socket
import time
import datetime
IPADDR = '192.168.1.141'
PORTNUM = 5600
PACKETDATA = "f1a525da11f6".encode()
while(True):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)