This file contains hidden or 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
--Haskell using recursion | |
problem2_fp = fibblte_h 4000000 1 1 0 | |
where fibblte_h x y z s | |
| y + z >= x = ns | |
| otherwise = fibblte_h x z (y + z) ns | |
where ns | |
| even (y + z) = s + y + z | |
| otherwise = s |
This file contains hidden or 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
# Maintainer: Arch Haskell Team <[email protected]> | |
_hkgname=hxt-tagsoup | |
pkgname=haskell-hxt-tagsoup | |
pkgver=9.1.0 | |
pkgrel=1 | |
pkgdesc="TagSoup parser for HXT" | |
url="http://hackage.haskell.org/package/${_hkgname}" | |
license=('custom:OtherLicense') | |
arch=('i686' 'x86_64') | |
makedepends=() |
This file contains hidden or 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
# Maintainer: Arch Haskell Team <[email protected]> | |
_hkgname=hxt-xpath | |
pkgname=haskell-hxt-xpath | |
pkgver=9.1.1 | |
pkgrel=1 | |
pkgdesc="The XPath modules for HXT." | |
url="http://hackage.haskell.org/package/${_hkgname}" | |
license=('custom:OtherLicense') | |
arch=('i686' 'x86_64') | |
makedepends=() |
This file contains hidden or 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
“I’ve just got to say one thing: If this is it, if this is really the end—I get to use a rocket launcher.” | |
—Winston, Human Target (2010) S02E07 | |
~~ | |
“Behind the velvet lies / There is a truth as hard as steel.” | |
—“Holy Diver” by Dio | |
~~ |
This file contains hidden or 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
phi :: Int -> Int | |
phi n = length [ k | k <- [1..n], (gcd n k) == 1 ] | |
-- problem69_h :: Int -> Float -> Int -> Int | |
problem69_h cur_n max_phi max_n | |
| cur_n < 0 = max_n | |
| otherwise = | |
let cur_phi = (fromIntegral cur_n) / ( fromIntegral $ phi cur_n) in | |
if cur_phi > max_phi | |
then problem69_h (cur_n - 1) cur_phi cur_n |
This file contains hidden or 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
from sqlalchemy import create_engine, Column, Integer, String | |
engine = create_engine('sqlite:///data.db') | |
from sqlalchemy.orm import sessionmaker | |
Session = sessionmaker(bind=engine) | |
sess = Session() | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() |
This file contains hidden or 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
# Maintainer: Cedric Girard <[email protected]> | |
# Contributor: N30N <[email protected]> | |
pkgname=unarchiver | |
pkgver=3.1.0 | |
pkgrel=1 | |
pkgdesc="An Objective-C application for uncompressing archive files" | |
arch=('x86_64' 'i686') | |
url="http://wakaba.c3.cx/s/apps/unarchiver.html" | |
license=('LGPL2.1') |
This file contains hidden or 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
# Maintainer: Jedipottsy | |
# Contributer: Mark Harviston <[email protected]> | |
pkgname=razercfg-tool-git | |
pkgrel=1 | |
pkgver=20121107 | |
pkgdesc="The next generation Razer device configuration tool." | |
arch=(i686 x86_64) | |
url="http://dual.bues.ch/cms/hacking/razercfg.html" | |
license=('GPL') |
This file contains hidden or 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
_pkg=p7zip | |
_ver=9.20.1 | |
pkgname=lib7zip | |
pkgver=1.6.3 | |
pkgrel=2 | |
pkgdesc="A library using 7z.dll/7z.so(from 7-Zip) to handle different archive types." | |
arch=(i686 x86_64) | |
url="http://code.google.com/p/lib7zip/" | |
license=('MPL') | |
source=("http://lib7zip.googlecode.com/files/$pkgname-$pkgver.tar.gz" |
This file contains hidden or 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/env python2 | |
#-*- coding=utf-8 -*- | |
# © 2013 Mark Harviston, BSD License | |
from __future__ import absolute_import, unicode_literals, print_function | |
""" | |
Qt data models that bind to SQLAlchemy queries | |
""" | |
from PyQt4 import QtGui | |
from PyQt4.QtCore import QAbstractTableModel, QVariant, Qt | |
import logging # noqa |
OlderNewer