Skip to content

Instantly share code, notes, and snippets.

View malkia's full-sized avatar

Dimiter 'malkia' Stanev malkia

View GitHub Profile
<omitted>/.cargo/bin/cargo.exe install --color=always --force grcov
Updating crates.io index
Downloading crates ...
Downloaded grcov v0.7.1
Installing grcov v0.7.1
Downloading crates ...
Downloaded cargo-binutils v0.3.3
Downloaded cargo_metadata v0.11.4
Downloaded fomat-macros v0.3.1
Downloaded slug v0.1.4
import 'dart:math';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter/src/scheduler/ticker.dart';
import 'package:flutter/widgets.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@malkia
malkia / tictactoe.dart
Created November 21, 2020 21:45
Super Tic Tac Toe in Flutter
import 'package:flutter/material.dart';
// https://github.com/malkia/tictactoc
// https://malkia.github.io/tictactoe
// https://codepen.io/malkia76/pen/YzWojXy
void main() {
runApp(myApp());
}
import 'dart:math';
import 'dart:io';
var random = Random();
List<int> makeRandom(int n) {
var x = List<int>(n);
for (int i = 0; i < n; i++) {
x[i] = random.nextInt(n * 10);
}
@malkia
malkia / md5sum.dart
Created April 28, 2020 23:19
md5sum implementation in dart, doing recursive scan and using isolates (set to be half the number of Logical CPUs)
import 'dart:isolate';
import 'dart:io';
import 'dart:math';
import 'package:crypto/crypto.dart';
class Stop {}
final _stop = Stop();
class Args {
// Try on DartPad.dev
import 'package:flutter/foundation.dart'
show debugDefaultTargetPlatformOverride;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'dart:math';
import 'dart:async';
var random = Random(0);
import 'package:flutter/foundation.dart'
show debugDefaultTargetPlatformOverride;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'dart:math';
var random = Random(0);
class GammonRules {
// The total number of points on the table.
@malkia
malkia / pcomp.md
Created October 24, 2019 06:15 — forked from reinsteam/pcomp.md
Links to materials about perceptual image comparison metric

Perceptual Image Differencing

  • [1983. Peter Burt and Edward Adelson. The Laplacian Pyramid as a Compact Image Code][1]
  • [1993. Scott Daly. The visible differences predictor: an algorithm for the assessment of image fidelity][2]
  • [1995. Andrew S. Glassner. In Principles of digital image synthesis, pages 59-66][3]
  • [1997. Gregory Ward-Larson, Holly Rushmeier, and Christine Piatko. A visibility matching tone reproduction operator for high dynamic range scenes][4]
  • [1999. Mahesh Ramasubramanian, Sumant N. Pattnaik, Donald P. Greenberg. A perceptually based physical error metric for realistic image synthesis][5]
  • [2004. Yangli Hector Yee, Anna Newman. A perceptual metric for production Testing][6]
  • [2004. HECTOR YEE, SUMANTA PATTANAIK and DONALD P. GREENBERG. Spatiotemporal Sensitivity and Visual Attention for Efficient Rendering of Dynamic Environments][7]
  • [2004. Hector Yee. *A Perceptual Metric for Production Testing (Submitted and Accepted in Journal of
@malkia
malkia / StringViewTest_WithAdHocStackAllocator
Created July 30, 2018 16:57
reddit_cpp_speeding_up_string_view_string_split
// https://www.reddit.com/r/cpp/comments/934r63/speeding_up_string_view_string_split/
// StringViewTestss.cpp : performance experiments for string_view
//
#include <string_view>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
@malkia
malkia / jsonnet-perf-tests-runner.sh
Created June 24, 2018 07:13
jsonnet - no dynamic casts when gc's heap
../jsonnet-perf-tests.sh 2>&1 | tee ../results.txt