Skip to content

Instantly share code, notes, and snippets.

View aferust's full-sized avatar
💭
I may be slow to respond.

Ferhat Kurtulmuş aferust

💭
I may be slow to respond.
  • Bursa
View GitHub Profile
// https://forums.developer.nvidia.com/t/eliminate-upload-download-for-opencv-cuda-gpumat-using-shared-memory/83090/3
// SimpleTest.cpp
// Loads an image, calls a GPU enabled function that uses opencv GPUMat upload/download
//
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
#include <stdio.h>
#!/usr/bin/env dub
/+ dub.sdl:
dependency "arsd-official:simpledisplay" version="~>9.1.2"
+/
// ported from https://www.geeksforgeeks.org/fractals-in-cc/
import arsd.simpledisplay;
enum MAXCOUNT = 30;
import std.stdio, std.string;
alias std.string.toStringz CSTR;
import core.sys.windows.windows;
extern(Windows)
{
DWORD GetLogicalDrives();
UINT GetDriveTypeA(LPCSTR lpRootPathName);
# -*- coding: utf-8 -*-
"""
@author: Ferhat Kurtulmuş
"""
from PyQt5.QtWidgets import (QWidget, QPushButton, QLineEdit, QFileDialog,
QInputDialog, QApplication, QMessageBox, QLabel,
QHBoxLayout, QVBoxLayout, QSpinBox, QDoubleSpinBox )
import sys, os
ldc-build-runtime --ninja "--dFlags=-mtriple=wasm32-wasi" --ldcSrcDir=../ CMAKE_TOOLCHAIN_FILE="%WASI_SDK_PREFIX%/share/cmake/wasi-sdk.cmake" WASI_SDK_PREFIX=%WASI_SDK_PREFIX% BUILD_SHARED_LIBS=OFF
.: Creating build directory: ldc-build-runtime.tmp
.: Invoking: cmake -DLDC_EXE_FULL=C:\dlang\ldc2-1.24.0-windows-multilib\bin\ldc2.exe -DD_VERSION=2 -DDMDFE_MINOR_VERSION=0 -DDMDFE_PATCH_VERSION=94 -DD_EXTRA_FLAGS=-mtriple=wasm32-wasi -DCMAKE_TOOLCHAIN_FILE=C:/Users/user/Desktop/wdene/wasi-sdk-11.0/share/cmake/wasi-sdk.cmake -DBUILD_SHARED_LIBS=OFF -DWASI_SDK_PREFIX=C:/Users/user/Desktop/wdene/wasi-sdk-11.0 -G Ninja C:\Users\user\Desktop\wdene\ldc\runtime\../runtime
-- The C compiler identification is unknown
System is unknown to cmake, create:
Platform/Wasm to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/Wasm to use this system, please post your config file on discourse.cmake.org so it
@aferust
aferust / main.d
Last active October 22, 2020 20:54
addressing general tree
/+
0
/ | \
1 2 3
/ \ / | \
4 5 6 7 8
address(0) = [] // root
address(1) = [0] // root.children[0]
address(2) = [1] // etc
@aferust
aferust / sample2.d
Last active October 20, 2020 20:25
module app;
import std.stdio;
import std.experimental.logger: trace;
import std.conv;
import gio.Application : GApplication = Application;
import gtk.Main;
import gtk.Application;
@aferust
aferust / sample.txt
Created October 8, 2020 19:54
GtkD threads
apd.d :
module app;
import std.stdio;
import std.experimental.logger: trace;
import gio.Application : GApplication = Application;
import gtk.Main;
import gtk.Application;
@aferust
aferust / main.d
Last active September 27, 2020 14:03
delayed ctrl 2
import std.stdio;
import std.concurrency;
import core.thread;
void main() {
int k;
while(true){
auto childTid = spawn(&spawnedFunc, thisTid);
Thread.sleep(10.msecs);
send(childTid, k);
@aferust
aferust / main.d
Created September 27, 2020 10:39
delayed control signal
import core.thread;
import std.stdio;
import std.concurrency;
import std.container.dlist;
import std.datetime;
import std.datetime.systime;
__gshared DList!Entry queue;
__gshared bool shouldRun = true;