Skip to content

Instantly share code, notes, and snippets.

@mys721tx
mys721tx / cat_kaomoji.txt
Last active January 19, 2016 21:46
Cat emojis generated by randomly combining ``eye'' and ``mouth'' components.
<(=O_O=)>
<(=O▽O=)>
<(=O□O=)>
<(=O﹏O=)>
<(=OДO=)>
<(=OبO=)>
<(=O╭╮O=)>
<(=O﹃O=)>
<(=O皿O=)>
<(=O益O=)>
@mys721tx
mys721tx / CatKaomoji.py
Last active January 20, 2016 01:18
A python script to generate [cat kaomoji](https://gist.github.com/mys721tx/5400031).
# -*- coding: utf-8 -*-
"""
CatKaomoji.py: Generate cat kaomoji.
"""
import itertools
import codecs
EYES = [
(u"O",), (u" ̄",), (u"ㄒ",), (u"▼",), (u"°",), (u"╯", u"╰"), (u"¬",),
@mys721tx
mys721tx / cockpit_squd.cfg
Last active December 27, 2015 22:59
Modify alternative cockpit interiors using ModuleManager.
@PART[Mark2Cockpit]
{
@INTERNAL
{
@name = SH_mk2CockpitInternal
}
}
@PART[mark3Cockpit]
{
@mys721tx
mys721tx / ModularFuelSystem_TAC.cfg
Last active December 30, 2015 23:09
This should allow you put food in the fuel tank. Tested on TAC, should work with ioncross.
@TANK_DEFINITION[Default]
{
TANK
{
name = Food
amount = 0.0
maxAmount = 0.0
utilization = 20.0
}
TANK
@mys721tx
mys721tx / test1.c
Last active August 29, 2015 14:02
clang-600.0.34.4 @ Mac OS X optimization for unused variables.
int main(int argc, char *argv[])
{
int i,j;
i = 0;
return 0;
}
@mys721tx
mys721tx / test1.c
Created June 5, 2014 11:36
gcc-4.9 @ Arch Linux optimization for unused variables.
int main(int argc, char *argv[])
{
int i,j;
i = 0;
return 0;
}
R Benchmark 2.5
===============
Number of times each test is run__________________________: 3
I. Matrix calculation
---------------------
Creation, transp., deformation of a 2500x2500 matrix (sec): 1.78966666666667
2400x2400 normal distributed random matrix ^1000____ (sec): 0.721
Sorting of 7,000,000 random values__________________ (sec): 1.104
2800x2800 cross-product matrix (b = a' * a)_________ (sec): 28.2113333333333
@mys721tx
mys721tx / R.rb
Last active June 12, 2017 05:33
R formula with Intel Parallel Studio
class RDownloadStrategy < SubversionDownloadStrategy
def stage
cp_r File.join(cached_location, "."), Dir.pwd
end
end
class R < Formula
desc "Software environment for statistical computing"
homepage "https://www.r-project.org/"
url "https://cran.rstudio.com/src/base/R-3/R-3.4.0.tar.gz"
@mys721tx
mys721tx / PKGBUILD
Created December 29, 2014 15:54
strongswan-5.2.1
# Contributor: nikicat <develniks at gmail dot com>
# Contributor: danilo <gezuru at gmail dot com>
# Contributor: Jason Begley <jayray at digitalgoat dot com>
# Contributor: Ray Kohler <ataraxia937 at gmail dot com>
# Contributor: Daniel Riedemann <daniel.riedemann [at] googlemail [dot] com>
# Contributor: 458italia <svenskaparadox [at] gmail dot com>
# Contributor: Thermi <noel [at] familie-kuntze dot com>
# Maintainer: dkorzhevin <dkorzhevin at gmail dot com>
pkgname=strongswan
@mys721tx
mys721tx / busy_beaver.py
Last active January 9, 2016 05:39
3-State 2-Symbol Busy Beaver
"""
binary_adder.py: A binary adder implemented using SimpleTuringMachine
"""
import SimpleTuringMachine
ALPHABET = [0, 1]
STATES = ["HALT", "A", "B", "C"]
INITIAL_STATE = "A"
STATE_TABLE = {