See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
package com.company; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* Logic 1 | |
* |
import math | |
from math import pi | |
def points_on_circumference(center=(0, 0), r=50, n=100): | |
return [ | |
( | |
center[0]+(math.cos(2 * pi / n * x) * r), # x | |
center[1] + (math.sin(2 * pi / n * x) * r) # y |
using System; | |
using System.IO; | |
using System.Net; | |
using System.Text; | |
using System.Threading.Tasks; | |
using HttpMultipartParser; | |
namespace WebhookReceiver | |
{ | |
internal class HttpServer |
import requests | |
import json | |
import base64 | |
import os | |
config = { | |
"40.png": {"black", "white", "blue", "yellow"}, | |
"38.png": {"blue", "white"}, | |
"20.png": {"black","white", "yellow", "blue"}, | |
"30.png": {"yellow", "blue", "white"}, |
const RUNS = 100000; | |
// PRE-COMPILE REGEX | |
console.time('processRequest1') | |
const regex = RegExp(/^camera-([0-9]+)/) | |
function processRequest1(){ | |
let camId = regex.exec('camera-1') | |
return camId | |
} |
import requests | |
import json | |
API_TOKEN = '4805bee1222ce85e0bf####################' | |
regions = ['us-ca', ] | |
config = dict( | |
detection_mode='vehicle' | |
) |
import base64 | |
import requests | |
API_TOKEN = '3234232ad2################' | |
def upload_base64(image_path): | |
with open(image_path, 'rb') as image_file: | |
img_base64 = base64.b64encode(image_file.read()) | |
url = 'http://api.platerecognizer.com/v1/plate-reader' |
def run_rec(i): | |
print(f'run_rec({i})') | |
with open(i, 'rb') as fp: | |
response = requests.post( | |
'https://container-api.parkpow.com/api/v1/predict/', | |
data= dict( | |
# config=c, | |
), | |
files=dict(image=fp), |
danleyb2@ubuntu-ws:~$ | |
danleyb2@ubuntu-ws:~$ docker scan platerecognizer/alpr | |
Testing platerecognizer/alpr... | |
✗ Low severity vulnerability found in xdg-user-dirs | |
Description: Improper Access Control | |
Info: https://snyk.io/vuln/SNYK-UBUNTU1804-XDGUSERDIRS-347423 | |
Introduced through: xdg-user-dirs@0.17-1ubuntu1 | |
From: xdg-user-dirs@0.17-1ubuntu1 |