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
cmake_minimum_required(VERSION 3.0 FATAL_ERROR) | |
project(cpp_shim) | |
set(CMAKE_PREFIX_PATH ../libtorch) | |
find_package(Torch REQUIRED) | |
find_package(OpenCV REQUIRED) | |
add_executable(testing main.cpp) | |
message(STATUS "OpenCV library status:") | |
message(STATUS " config: ${OpenCV_DIR}") |
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 System.Net; | |
using System.IO; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
// C# from http://stackoverflow.com/questions/25306570/convert-curl-to-c-sharp |
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
# A very simple PHP example that sends a HTTP POST to a algorithmia and summarizes text. | |
# | |
#available input content types: | |
# application/json for json | |
# text/plain for simple string | |
# application/octet-stream for binary | |
<?php | |
$ch = curl_init(); | |
$data ='Your big document of text to get summarized, you could import this as a file as well.'; |
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 | |
def insert_bit(array, index): | |
inner = (index % 64) | |
index //= 64 | |
array[index] |= (1 << inner) | |
def is_set(array, index): | |
inner = (index % 64) | |
index //= 64 |