Skip to content

Instantly share code, notes, and snippets.

View azyobuzin's full-sized avatar

Takuya Sakurai azyobuzin

View GitHub Profile
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
class TrainingData
{
/// <summary>識別用の名前</summary>
public string Tag { get; }
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
class TrainingData
{
/// <summary>識別用の名前</summary>
public string Tag { get; }
import itertools
a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
print("\n".join(map(lambda x: " ".join(map(lambda x: str(a[x]), filter(lambda x: x is not None, x))), itertools.chain.from_iterable(itertools.zip_longest(itertools.zip_longest(*[filter(lambda x: x % 4 < 2, range(len(a)))]*8), itertools.zip_longest(*[filter(lambda x: x % 4 >= 2, range(len(a)))]*8))))))
#pragma comment(lib, "d2d1.lib")
// C++ ライブラリ
#include <cassert>
#include <functional>
#include <sstream>
// Windows
#include <Windows.h>
#include <d2d1.h>
@azyobuzin
azyobuzin / MedianImpls.cs
Created June 10, 2017 17:40
中央値を求めるぞ
using System;
namespace MedianBenchmark
{
public static class MedianImpls
{
public static int ArraySort(int[] data)
{
var w = (int[])data.Clone();
Array.Sort(w);
using System;
using System.Threading.Tasks;
namespace Blockhash
{
public static class BlockHashImpl
{
public static byte[] ComputeHashQuick<TImage>(int bits, TImage image)
where TImage : IInputImage
{

Keybase proof

I hereby claim:

  • I am azyobuzin on github.
  • I am azyobuzin (https://keybase.io/azyobuzin) on keybase.
  • I have a public key ASBo5ptNo8kvr71jSHeH0L62FE0bGGDjpkq0EE64PpFT8Ao

To claim this, I am signing this object:

using System.IO;
namespace ResourceInDll
{
internal static class Extensions
{
public static byte[] ReadExact(this Stream stream, int size)
{
var bytesRead = 0;
var bs = new byte[size];
@azyobuzin
azyobuzin / Program.cs
Created March 7, 2017 18:45
IOperation で遊ぶぞ
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Semantics;
public static class Program
{
@azyobuzin
azyobuzin / Program.cs
Created February 20, 2017 18:24
Xamarin の base メソッドを呼ばなければいけない/呼んではいけない奴を抽出
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Rocks;