This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* cos_table.h | |
* | |
* Table for more accurate computation of cosine function near zero argument | |
* See Common/fix.c:fix_sincos | |
* | |
* Created on: 20.06.2011 | |
* Author: Alex Ignatov | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local modname = ... | |
local M = {} | |
_G[modname] = M | |
local id = nil | |
local addr = nil | |
-- some flags from mode register, low byte is MODE1 and high is MODE2 | |
M.INVERT = 0x1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* well, let's see who you are... */ | |
int cmd_allowed(const char *s) | |
{ | |
const char **c; | |
/* god is powerful */ | |
if (godmode_active()) | |
return 1; | |
/* don't hide your thoughts in emptiness */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
iface='wlan0' | |
conf='/etc/wpa_supplicant/wpa_supplicant.conf' | |
fail() { | |
echo "Fuck you! $@" | |
exit 1 | |
} | |
declare -a a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Monad.State | |
import Text.Printf | |
initiallyRequired = 0.3 | |
maintenanceRequired = 0.15 | |
takerFee = 0.002 | |
type Amount = Double | |
type Price = Double |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file_log=`mktemp` | |
file_tim=`mktemp` | |
cleanup_tracing_files() { | |
rm -f $file_log $file_tim | |
unset file_log file_tim crt last | |
} | |
trap cleanup_tracing_files EXIT | |
exec 3>&2 2> >( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Term::ANSIColor; | |
my %nick_colors; | |
sub unescape($) { | |
my $x = shift; | |
$x =~ s/(^\{|\}$)//g; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Huita struct { | |
v string | |
cb chan HuitaCmd | |
stop chan bool | |
} | |
func NewHuita() *Huita { | |
h := &Huita{ | |
cb: make(chan HuitaCmd), | |
stop: make(chan bool), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import Control.Monad.Reader hiding ( asks) | |
import Control.Monad.State.Lazy | |
import Control.Monad.Loops | |
import Text.Printf | |
--import Formatting | |
import Data.Aeson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Storable; | |
use utf8; | |
use encoding utf8; | |
%data = %{ retrieve('dict')} if (-e 'dict'); | |
print "Dict loaded\n"; | |
while (<STDIN>) { | |
@words = split(/ /, clean_string($_)); | |
$w1 = $words[0]; | |
$w2 = $words[1]; |
OlderNewer