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 Push_Relabel(graph,s,t): | |
if s < 0 or t < 0 or s > len(graph) - 1 or t > len(graph) - 1: | |
return "Error input" | |
if len(graph) == 0: | |
return "No graph to process" | |
n = len(graph) | |
h = [0] * n |
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
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#define M_PI 3.14159265358979323846 | |
int max (int a, int b) { | |
return a>=b?a:b; | |
} |
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
using System; | |
using IronOcr; | |
namespace Iron_OCR_Test | |
{ | |
class Program | |
{ | |
private const string filepath = @"C:\Users\Wilfred Desert\Documents\OCR_Comparison\input\300_"; | |
private const string KEY = "IRONOCR-874700B964-135488-37C336-398EAFCF0B-F560892-UEx2102E38B2BA87D8-COMMUNITY.TRIAL.EXPIRES.27.DEC.2019"; |
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
using System; | |
using IronOcr; | |
namespace Iron_OCR_Test | |
{ | |
class Program | |
{ | |
private const string filepath = @"C:\Users\Wilfred Desert\Documents\OCR_Comparison\input\"; | |
private const string KEY = "IRONOCR-874700B964-135488-37C336-398EAFCF0B-F560892-UEx2102E38B2BA87D8-COMMUNITY.TRIAL.EXPIRES.27.DEC.2019"; |
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 numpy as np | |
from scipy.sparse import linalg as linalg | |
from scipy.sparse import lil_matrix as lil_matrix | |
OMEGA = 0 | |
DEL_OMEGA = 1 | |
OUTSIDE = 2 | |
def point_location(index, mask): | |
if in_omega(index,mask) == False: |
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
using System; | |
namespace CalculatorDelegate | |
{ | |
class Program | |
{ | |
private static double Item1 { get; set; } | |
private static double Item2 { get; set; } | |
private static string Action { get; set; } |
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
#include <iostream> | |
#include <math.h> | |
#include <algorithm> | |
#include <cmath> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <iostream> | |
using namespace std; |
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 unittest | |
from math import sqrt | |
from vector import Vector | |
class TestVector(unittest.TestCase): | |
def test_repr(self): | |
v = Vector([1, 2, 3]) | |
self.assertEqual(str(v), "Vector([1, 2, 3])") |
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 lru_cache import LRUCache | |
from pytest import raises | |
def test_init(): | |
lru = LRUCache(4) | |
assert lru.maxsize == 4 | |
assert lru.cache == {} | |
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 pytest | |
import random | |
@pytest.fixture | |
def make_rnd_gen(): | |
def _get_result(seed, mode): | |
# Hint: use pytest.fixture | |
if mode == 0: | |
return random.Random(seed).randint(-1000, 1000) |
OlderNewer