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
[ 652.587523] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen | |
[ 652.587531] ata1.00: failed command: SMART | |
[ 652.587537] ata1.00: cmd b0/d0:01:00:4f:c2/00:00:00:00:00/00 tag 10 pio 512 in | |
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout) | |
[ 652.587540] ata1.00: status: { DRDY } | |
[ 652.587545] ata1: hard resetting link | |
[ 657.923282] ata1: link is slow to respond, please be patient (ready=0) | |
[ 660.431130] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300) | |
[ 660.431533] ACPI Error: [DSSP] Namespace lookup failure, AE_NOT_FOUND (20150619/psargs-359) | |
[ 660.431539] ACPI Error: Method parse/execution failed [\_SB_.PCI0.SAT0.SPT0._GTF] (Node ffff8802160b3f00), AE_NOT_FOUND (20150619/psparse-536) |
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.Concurrent | |
import Control.Monad | |
import Control.Monad.Trans.Maybe | |
import Control.Monad.Trans.Class | |
type Fork = MVar Int | |
newFork :: Int -> IO Fork | |
newFork i = newMVar i |
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
SAMPLE 0 | |
Start package energy: 68014.492 J | |
End package energy: 117772.400 J | |
Aproximate duration: 336 s | |
SAMPLE 1 | |
Start package energy: 52383.802 J | |
End package energy: 81000.144 J | |
Aproximate duration: 194 s |
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
/** | |
* @file linux-rapl.c | |
* @author Vince Weaver | |
* | |
* @ingroup papi_components | |
* | |
* @brief rapl component | |
* | |
* This component enables RAPL (Running Average Power Level) | |
* energy measurements on Intel SandyBridge/IvyBridge/Haswell |
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 System.Environment | |
import Text.Printf | |
main = do | |
[d] <- map read `fmap` getArgs | |
printf "%f\n" (mean [1..d]) | |
mean :: [Double] -> Double | |
mean xs = {-# SCC "mean" #-} sum xs / fromIntegral (length xs) |
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
(defn is-ascii-alpha-num [c] | |
(let [n (Character/getNumericValue (char c))] | |
(or (and (>= n (char-val \a)) (<= n (char-val \z))) | |
(and (>= n (char-val \A)) (<= n (char-val \Z))) | |
(and (>= n (char-val \0)) (<= n (char-val \9))))) |
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 QtQuick 1.0 | |
Rectangle { | |
id: root | |
width: 1024 | |
height: 768 | |
Image { | |
source: "images/mtsis_tela_balanca_1024.png" | |
fillMode: Image.PreserveAspectFit |
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 System.Directory ( getDirectoryContents, doesFileExist, doesDirectoryExist ) | |
import System.Environment ( getArgs ) | |
import System.FilePath | |
import Control.Monad ( forM_, filterM ) | |
import Data.Char ( isAscii, isAlphaNum, toLower ) | |
import qualified Data.Map as Map | |
getDirectoryEntries :: FilePath -> IO ([FilePath], [FilePath]) | |
getDirectoryEntries path = do | |
entries <- getDirectoryContents path |
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 tsearch.lexer | |
(:require [clojure.string :as cjstr])) | |
(def a (Character/getNumericValue \a)) | |
(def z (Character/getNumericValue \z)) | |
(def A (Character/getNumericValue \A)) | |
(def Z (Character/getNumericValue \Z)) | |
(def zero (Character/getNumericValue \0)) | |
(def nine (Character/getNumericValue \9)) |
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 tsearch.core | |
(:require [clojure.java.io :as cjio]) | |
(:require [tsearch.scanner :as scanner]) | |
(:require [tsearch.lexer :as lexer]) | |
(:gen-class)) | |
(defn occurrences-of [file] | |
(with-open [rdr (cjio/reader file)] | |
(loop [lines (line-seq rdr) hmap (hash-map)] | |
(if (empty? lines) |
NewerOlder