Skip to content

Instantly share code, notes, and snippets.

View notanaverageman's full-sized avatar

Yusuf Tarık Günaydın notanaverageman

View GitHub Profile
using System.Threading;
using System.Threading.Tasks;
namespace Namespace
{
// Inspired by https://stackoverflow.com/a/961904/3670437
public class FifoMutexAsync
{
private readonly SemaphoreSlim _semaphore;
private int _ticketsCount;
@notanaverageman
notanaverageman / CNTKModelPlotter.h
Last active May 14, 2018 07:07
Converts CNTK model to Graphviz dot file using Boost Graph.
#pragma once
#include <CNTK/CNTKLibrary.h>
#include <boost/graph/graphviz.hpp>
#include <stack>
#include <string>
#include <codecvt>
// Example:
// CNTK::FunctionPtr model; // Some CNTK model.
@notanaverageman
notanaverageman / AlmostEquals.h
Created July 25, 2017 18:38
Google Test Floating Point Equality
// Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
#include <iostream>
int main()
{
std::cout << "Hello World" << std::endl; // std::endl yeni satıra geçmemizi sağlıyor.
return 0;
}