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
/* | |
* Copyright (c) 2016, Cloudera, Inc. All Rights Reserved. | |
* | |
* Cloudera, Inc. licenses this file to you under the Apache License, | |
* Version 2.0 (the "License"). You may not use this file except in | |
* compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import torch | |
from torch.autograd import Variable | |
def triangle(x,y,z,v0): | |
v=(y + y * y + y * y * y - 3. * (1. + x) * y * z + z * (1. + z + z * z)) / 3. | |
return (v-v0)*(v-v0) | |
W=15 | |
cnt=0 | |
def eval(): |
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 <string> | |
#include <iostream> | |
#include "opencv2/core/core.hpp" | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/calib3d/calib3d.hpp" | |
#include "opencv2/highgui/highgui.hpp" | |
using namespace cv; | |
using namespace std; | |
struct View { |
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
// aruco_detect.cpp : Defines the entry point for the console application. | |
// | |
#include "aruco.h" | |
#include <iostream> | |
#include <opencv2/highgui.hpp> | |
#include <opencv2/calib3d.hpp> | |
#include <opencv2/imgproc.hpp> | |
#include <string> | |
#include <stdexcept> |
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
pub fn sum(&self) -> i16 { | |
let mut r = 0i16; | |
for (_, v) in &self.0 { | |
r += *v as i16; | |
} | |
r | |
} |
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
extern crate rand; | |
use std::collections::HashMap; | |
use std::cell::RefCell; | |
use std::collections::*; | |
pub struct Aliases { | |
pub idx_to_name:HashMap< i16,String>, | |
pub name_to_idx:HashMap< String,i16> | |
} | |
pub struct Polynome { |
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
CMake Deprecation Warning at CMakeLists.txt:81 (cmake_policy): | |
The OLD behavior for policy CMP0020 will be removed from a future version | |
of CMake. | |
The cmake-policies(7) manual explains that the OLD behaviors of all | |
policies are deprecated and that a policy should be set to OLD only under | |
specific short-term circumstances. Projects should be ported to the NEW | |
behavior and not rely on setting a policy to OLD. | |
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
{ | |
"config": { | |
"chainId": 15, | |
"homesteadBlock": 0, | |
"eip155Block": 0, | |
"eip158Block": 0 | |
}, | |
"difficulty": "200000", | |
"gasLimit": "2100000", | |
"alloc": { |
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
var Web3 = require('web3'); | |
var web3 = new Web3(); | |
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545')); | |
var abi = [{ | |
"constant": false, | |
"inputs": [{"name": "jsn", "type": "string"}], | |
"name": "deposit", | |
"outputs": [{"name": "", "type": "int256"}], | |
"payable": false, | |
"type": "function" |
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
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |
NewerOlder