Skip to content

Instantly share code, notes, and snippets.

@YashasSamaga
YashasSamaga / A0_NOTICE.md
Last active August 15, 2023 02:05
GSoC 2019 | OpenCV | Adding a CUDA backend to the DNN module

DISCLAIMER

This gist documents the Google Summer of Code project. It is not updated and hence does not indicate current status of the CUDA backend.

For updated details, please see this gist.

int main () {
auto dp = [](double x) {
if (x <= -37)
return std::exp(x);
else if (x <= 18)
return std::log1p(std::exp(x));
else if (x <= 33.3)
return x + std::exp(-x);
else
return x;
#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <chrono>
#include <opencv2/dnn.hpp>
#include <opencv2/highgui.hpp>
#include "benchmark.hpp"
#include "main.h"
#include <dlib/dnn.h>
#include <sampml/svm_classifier.hpp>
#include "tools/fixed_thread_pool.hpp"
#include "iscript.hpp"
#include "classifier.hpp"
#include "transform.hpp"
#include "dnn.hpp"
raw positive vectors: 2900, transformed positive vectors: 174
training samples: 139
raw negative vectors: 4153, transformed negative vectors: 170
training samples: 136
Aggregate parameter(s) statistics:
positive field 0:
average: 0.098596, stddev: 0.0324172
min: 0.0362827, max: 0.239384
@YashasSamaga
YashasSamaga / main.py
Last active December 18, 2023 23:49
GSoC 2018 List of selected students
import requests
import json
fetch_url = "https://summerofcode.withgoogle.com/api/program/current/project/?page={}&page_size=100"
fetch_params = [pageno for pageno in range(1,14)]
searchList = []
with open("nameList.txt", "r") as inFile:
for line in inFile:
searchList += [line.lower().split()]
#include <iostream>
#include <queue>
#include <functional>
#define DEBUG
using GraphData = typename std::vector<int>;
using Graph = typename std::vector<std::vector<int>>;
void BFS(const GraphData& gdata, const Graph& graph) {
#!/bin/bash
echo 1000000 15
for((i = 0; i < 200000; i++))
do
echo "A $RANDOM"$(($RANDOM/100))
echo 'H'
done
for((i = 0; i < 600000; i++))
do
/*
** PAWN Library Extension (PLE)
**
** Chrono
** Time library
**
** This file is part of PAWN Library Extension.
**
** This library is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
#include <iostream>
#include <iomanip>
#include <vector>
#include <functional>
#include <cmath>
typedef long double Type;
constexpr Type eps = 1E-12;
using analysisFunction = std::function<const Type(const Type, const Type)>;