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 requests | |
from bs4 import BeautifulSoup | |
import tqdm | |
import hashlib | |
from os import listdir | |
from os.path import isfile, join | |
root = 'http://download.geofabrik.de/' | |
import shutil | |
import sys |
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
def naloga5(): | |
maxIter = 10 | |
planes = np.load('letala.npy') | |
step = 20 | |
fig, pltarr = rv.plt.subplots(2,2) | |
errors = [] | |
for unalignedPlane in planes[1:5]: | |
reg = pc.rigid_registration(planes[0][::step,:], unalignedPlane[::step,:], maxIterations=maxIter) |
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
def addHomCoord3D(iPts): | |
if iPts.shape[-1] == 4: | |
return iPts | |
else: | |
return np.hstack((iPts, np.ones((iPts.shape[0], 1)))) | |
def transAffine3D(iScale=(1, 1, 1), iTrans=(0, 0, 0), iRot=(0, 0, 0), iShear=(0, 0, 0, 0, 0, 0)): |
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
def naloga2(): | |
planes = np.load('letala.npy') | |
first = np.matrix(planes[0]) | |
fig, pltarr = rv.plt.subplots(1) | |
ogCenter = (np.sum(first[:, 0]) / len(first), np.sum(first[:, 1] / len(first))) | |
matrix = rv.transAffine2D() | |
for i in range(int(360 / 5)): | |
matrix = rv.transAffine2D(iRot=5) |
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
def cnn_detect_object(path): | |
args = { "prototxt": "cnn/bvlc_googlenet.prototxt", | |
"model": "cnn/bvlc_googlenet.caffemodel", | |
"labels": "cnn/synset_words.txt"} | |
# load the input image from disk | |
image = cv2.imread(path) | |
# load the class labels from disk | |
rows = open(args["labels"]).read().strip().split("\n") |
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
/** | |
* Created by tines on 19/04/2016. | |
*/ | |
'use strict'; | |
var express = require('express'); | |
var path = require('path'); | |
var router = express.Router(); | |
var middleware = require('../handlers/middleware'); |
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
'use strict'; | |
var assert = require('assert'); | |
var request = require('supertest'); | |
var server = require('../server.js'); | |
var userToken = "testuser"; | |
var testGroupId = 0; | |
// test if NODE_ENV is set to "test" |
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
#define DEBUG_1 0 | |
//Because DEBUG_1 is set to zero, the else | |
//clause will be removed from code before compilation. | |
#if DEBUG_1 == 0 | |
processNoDebug(); | |
#else | |
processWithDebug() | |
#endif |
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
.helloworld ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>++.>+.+++++++..+++.<<++.>+++++++++++++++.>.+++.------.--------.<<+.<. | |
.square numbers from 0...1000 ++++[>+++++<-]>[<+++++>-]+<+[>[>+>+<<-]++>>[<<+>>-]>>>[-]++>[-]+>>>+[[-]++++++>>>]<<<[[<++++++++<++>>-]+<.<[>----<-]<]<<[>>>>>[>>>[-]+++++++++<[>-<-]+++++++++>[-[<->-]+[<<<]]<[>+<-]>]<<-]<<-] | |
.powers of two: >++++++++++>>+<+[[+++++[>++++++++<-]>.<++++++[>--------<-]+<<]>.>[->[<++>-[<++>-[<++>-[<++>-[<-------->>[-]++<-[<++>-]]]]]]<[>+<-]+>>]<<] | |
.cat tool, stdin to stdout: ,[.,] | |
.sierpinski: >++++[<++++++++>-]>++++++++[>++++<-]>>++>>>+>>>+<<<<<<<<<<[-[->+<]>[-<+>>>.<<]>>>[[->++++++++[>++++<-]>.<<[->+<]+>[->++++++++++<<+>]>.[-]>]]+<<<[-[->+<]+>[-<+>>>-[->+<]++>[-<->]<<<]<<<<]++++++++++.+++.[-]<]+++++ | |
.display ascii characters: .+[.+] | |
.***** PROGRAM MAIN START ***** | |
bf START 0 |
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
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
#include<math.h> | |
#include<time.h> | |
#include<sys/time.h> | |
#include <limits.h> | |
#include <mpi.h> | |
#define PI 3.14159265358979323846 |
NewerOlder