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
java -jar jenkins-cli.jar -s http://server create-job newmyjob < myjob.xml |
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
void Clip1Left(point &A, point &B, point Pmin, point Pmax) | |
{ | |
A.y = B.y - (B.x - Pmin.x) * (B.y - A.y) / (B.x - A.x); | |
A.x = Pmin.x; | |
} | |
void Clip1Top(point &A, point &B, point Pmin, point Pmax) | |
{ | |
A.x = B.x - (B.y - Pmax.y) * (B.x - A.x) / (B.y - A.y); | |
A.y = Pmax.y; |
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
// Cohen–Sutherland Algorithm | |
bool clip(point &A, point &B, point Pmin, point Pmax) { | |
while (true) { | |
unsigned int C1 = 0; | |
if (A.x < Pmin.x) C1 += 1; | |
if (A.x > Pmax.x) C1 += 2; | |
if (A.y < Pmin.y) C1 += 4; | |
if (A.y > Pmax.y) C1 += 8; | |
unsigned int C2 = 0; |
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 warnings | |
from skimage.measure import compare_ssim | |
from skimage.transform import resize | |
from scipy.stats import wasserstein_distance | |
from scipy.misc import imsave | |
from scipy.ndimage import imread | |
import numpy as np | |
import cv2 | |
## |
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
curl http://api.ofdx.ru/v1/items?fn=123&fpd=123&fd=123 |
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
global | |
tune.ssl.default-dh-param 1024 | |
defaults | |
timeout connect 10000ms | |
timeout client 60000ms | |
timeout server 60000ms | |
frontend fe_http | |
mode http |
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
bool clip(point &A, point &B, point Pmin, point Pmax) { | |
/* 1 */ | |
if (A.x > B.x) std::swap(A, B); | |
/* 2 */ | |
int C1 = 0; | |
if (A.x < Pmin.x) C1 += 1; | |
if (A.x > Pmax.x) C1 += 2; | |
if (A.y < Pmin.y) C1 += 4; | |
if (A.y > Pmax.y) C1 += 8; |
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
from PIL import Image | |
import zbarlight | |
file_path = '/Users/ivankumar/Downloads/sample3.jpg' | |
with open(file_path, 'rb') as image_file: | |
image = Image.open(image_file) | |
image.load() | |
codes = zbarlight.scan_codes('qrcode', image) | |
print('QR codes: %s' % codes) |
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
# SEED NODE | |
{ | |
"id": "/mycoolenv/cassandra-seed", | |
"cmd": "chown -R cassandra /var/lib/cassandra && start $SEED", | |
"cpus": 0.5, | |
"mem": 400, | |
"disk": 0, | |
"instances": 1, | |
"constraints": [ | |
[ |
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
def com(A, B): | |
result = [[[] for j in range(0, 4)] for i in range(0, 4)] | |
for i in range(0, 4): | |
T = [] | |
for j in range(0, 4): | |
for k in range(0, 4): | |
result[i][j].append(min(A[i][k], B[k][j])) | |
return result |
NewerOlder