View gist:760590
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using MathNet.Numerics.LinearAlgebra; | |
namespace MatrixMul | |
{ | |
class Program | |
{ |
View gist:763731
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
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/init.h> | |
#include <linux/fs.h> | |
#include <asm/uaccess.h> | |
MODULE_LICENSE("GPL"); | |
static int __init init_lkm (void) | |
{ |
View dynamic_auth.rb
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/ruby | |
# -*- coding: utf-8 -*- | |
require 'rexml/document' | |
require '../lab1/static_auth.rb' | |
# Used for inteprete tags from card and decrypt cert and static auth | |
class CardReader | |
attr_accessor :dynamic_tags, :card_dynamic_info, :dynamic_auth |
View static_auth.rb
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/ruby | |
# -*- coding: utf-8 -*- | |
require 'rexml/document' | |
# Calculate a modular exponentiation eg: b^p mod m | |
# http://en.wikipedia.org/wiki/Modular_exponentiation | |
class Integer | |
def mod_pow(power, mod) | |
base, result = self.to_i, 1 |
View ru_tracking.rb
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/ruby -wKU | |
# -*- coding: utf-8 -*- | |
require 'cgi' | |
require 'uri' | |
require 'net/http' | |
require 'nokogiri' | |
require 'pp' | |
# TODO: think about easily add new tracking system! |
View gist:939777
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 java.io.FileReader; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.util.Calendar; | |
import au.com.bytecode.opencsv.CSVReader; | |
import au.com.bytecode.opencsv.CSVWriter; | |
public class Main { |
View a.clj
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
(ns wf | |
(:require (clojure.java.io/writer)) | |
(:use [clojure.contrib.seq :only (indexed)]) | |
(:import java.util.concurrent.atomic.AtomicLong)) | |
(set! *warn-on-reflection* true) | |
;;; Big wins: | |
;;; * Use queue instead of pmap. | |
;;; * Overlap chunking with actual runtime |
View gist:949508
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
#include <iostream> // cout, endl | |
#include <fstream> // fstream | |
#include <vector> | |
#include <string> | |
#include <algorithm> // copy | |
#include <iterator> // ostream_operator | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
View gist:949510
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 java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; |
View gist:949761
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
struct number_rule { | |
char *before_mask; | |
char *after_mask; | |
char am_len; | |
char bm_len; | |
int amp_len; | |
int bmp_len; | |
}; | |
struct number_rules { |
OlderNewer