What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-21 20:19:13
Onject ssd detection code
import cv2thres = 0.45 # Threshold to detect objectcap = cv2.VideoCapture(1)cap.set(3,1280)cap.set(4,720)cap.set(10,70)classNames= []classFile = 'coco.names'with open(classFile,'rt') as f: classNames = f.read().rstrip('\n').split('\n')configPath = 'ssd... Add solution -
Javascript 2021-10-20 03:05:03
load_jsonl
# https://medium.com/@galea/how-to-love-jsonl-using-json-line-format-in-your-workflow-b6884f65175b import json def dump_jsonl(data, output_path, append=False): """ Write list of objects to a JSON lines file. """ ... Add solution -
Python 2021-10-19 09:38:10
trim string python
string =' abc ' # After removing leading whitespace print(string.lstrip()); # Output: 'abc ' # After removing trailing whitespace print(string.rstrip()); # Output: ' abc' # After removing all whitespace print(string.strip()); # Output: 'abc' Add solution -
Python 2021-10-18 03:38:08
rstrip python
#!/usr/bin/python str = " this is string example....wow!!! "; print str.rstrip() str = "88888888this is string example....wow!!!8888888"; print str.rstrip('8') #the answer #this is string example....wow!!! #88888888this is s... Add solution -
Javascript 2021-10-14 03:39:03
load_jsonl love jsonl
# https://medium.com/@galea/how-to-love-jsonl-using-json-line-format-in-your-workflow-b6884f65175b import json def dump_jsonl(data, output_path, append=False): """ Write list of objects to a JSON lines file. """ ... Add solution -
Python 2021-10-13 22:02:03
how to save a nonetype as a function in python
import sys, math, Image import os def Distance(p1,p2): dx = p2[0] - p1[0] dy = p2[1] - p1[1] return math.sqrt(dx*dx+dy*dy) def ScaleRotateTranslate(image, angle, center = None, new_center = None, scale = None, resample=Image.BICUBIC): if (scale ... Add solution -
Python 2021-10-12 01:24:07
what is r strip function in python
#!/usr/bin/python str = " this is string example....wow!!! "; print str.rstrip() str = "88888888this is string example....wow!!!8888888"; print str.rstrip('8') #the answer #this is string example....wow!!! #88888888this is s... Add solution -
Python 2021-10-08 19:17:07
python code for internet radio stream
import requests import time import datetime print(datetime.datetime.now()) import re url = 'http://prem1.rockradio.com:80/bluesrock?9555ae7caa92404c73cade1d' encoding = 'latin1' info = '' radio_session = requests.Session() while True: radio = rad... Add solution