This file contains hidden or 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, ImageGrab | |
import cv2, numpy | |
img = cv2.cvtColor(numpy.array(ImageGrab.grab()), cv2.COLOR_RGB2BGR) | |
template = cv2.cvtColor(numpy.array(Image.open('PS/3C.png')), cv2.COLOR_RGB2BGR) | |
d, w, h = template.shape[::-1] | |
res = cv2.matchTemplate(img, template, cv2.TM_CCOEFF_NORMED) | |
#all matches: |
This file contains hidden or 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
#!/bin/bash -i | |
sudo mount -o remount,rw /cdrom | |
mount -l|grep /dev/sd | |
setxkbmap hu | |
#sudo ifconfig wlan0 up | |
#sudo wpa_passphrase HDF $(head -c 63 wpa_key.txt) > /tmp/wpa.conf | |
#sudo iwconfig wlan0 essid HDF | |
#sudo wpa_supplicant -B -iwlan0 -c /tmp/wpa.conf -Dwext -W | |
#sudo dhclient wlan0 | |
read -t 10 |
This file contains hidden or 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 os, sys, re | |
dir = sys.argv[1] if len(sys.argv) > 1 else "files" | |
find = sys.argv[2] if len(sys.argv) > 2 else "<\?\n" | |
set_to = sys.argv[3] if len(sys.argv) > 3 else "<?PHP\n" | |
exts = sys.argv[4] if len(sys.argv) > 4 else "\.php|\.txt" | |
pattern = re.compile(find, re.I | re.M | re.S) | |
if not os.path.isdir(dir): |
This file contains hidden or 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 sys | |
if len(sys.argv) < 2: | |
print("""Usage: | |
pick.py data.txt [lines_to_skip = 0] [first_line = 0]""") | |
sys.exit(0) | |
file = sys.argv[1] | |
skip = int(sys.argv[2]) + 1 if len(sys.argv) > 2 else 1 | |
start = int(sys.argv[3]) if len(sys.argv) > 3 else 0 |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>vis.js Plot</title> | |
<style> | |
body {font: 10pt arial;} | |
#mygraph>div {border: 1px solid black;} | |
#mygraph,#controlls {display: inline-block; vertical-align: top;} | |
</style> |
This file contains hidden or 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
function bubbleSort(arr, cmp) { | |
var len = arr.length, tmp, n; | |
if (typeof cmp !== 'function') | |
cmp = function(a, b) { | |
return a > b; | |
}; | |
do { | |
n = 0; | |
for (var i = 1; i < len; i++) { | |
if (cmp(arr[i], arr[i-1])) continue; |
This file contains hidden or 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
Mi a programozás? | |
Megmondani a gépnek hogy mit csináljon. Nagyon szájbarágósan. (Angol tudás elengedhetetlen.) | |
Számomra a programozás olyan mint a legózás, csak olcsóbb, nem megy tönkre a kezed tőle és sose fogysz ki a darabokból. | |
Engem azért vonzott a programozás, mert olyan volt mint a varázslás. Mintha pár varázs szó beírásával életet lehelnél az élettelenbe. Viselkedést adhatsz egy tárgynak. És érdekelt, hogy a játékok, meg egyéb programok, amiket használtam hogyan működnek. Illetve az automatizáció is mindig vonzott, mert olyan mint a csalás. Ráveszed a világot, hogy dolgozzon helyetted. | |
Mihez van szükség hozzá? | |
Kell egy feladat. | |
A feladat határozza meg, hogy melyik a megfelelő eszköz (program nyelv) hozzá. | |
Számítógép internet eléréssel, Google, program nyelv dokumentáció/referencia, fejlesztői környezet: Visual Studio (Code) / Notepad++, idő, érdeklődés. |
This file contains hidden or 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
// Inspired by: | |
// https://interviewing.io/recordings/Go-Microsoft-1 | |
function NthClosest(points, match, n) { | |
if (n < 1 || n > points.length || points[0].length != match.length) | |
return false; | |
function distance(p1, p2) { // Works in any dimensions. | |
let out = 0, d = 0, len = p1.length; | |
for (let i3 = 0; i3 < len; i3++) { |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title>Google Drive Demo</title> | |
</head> | |
<body> | |
<div style="position: absolute; top: 40%; left: 50%; transform: translate(-50%, -40%); text-align: center;"> | |
<a href="https://drive.google.com/open?id=1v1-ApluL9dCGx4znKVSXGKnBf4dFVGuv">Letöltés</a><br><br> |
This file contains hidden or 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
function BigO(arr, arr3) { // Second array is optional | |
this.accumulator = 0; // Can be set here, or when calling ClosestMatch | |
/* function factorial(n, i) { | |
if (n > 171) // Overflow prevention | |
return Infinity; | |
if (typeof i == 'undefined') | |
i = 1; | |
if (n < i) | |
return 1; | |
if (n === i) |