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
wrap :: Int -> String -> [String] | |
wrap maxWidth text = reverse (lastLine : accLines) | |
where (accLines, lastLine) = foldl handleWord ([], "") (words text) | |
handleWord (acc, line) word | |
-- 'word' fits fine; append to 'line' and continue. | |
| length line + length word <= maxWidth = (acc, word `append` line) | |
-- 'word' doesn't fit anyway; split awkwardly. | |
| length word > maxWidth = | |
let (line', extra) = splitAt maxWidth (word `append` line) | |
in (line' : acc, extra) |
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
commit 8f01086581bc1abc29b9e8c4d2cc41915f858f7a | |
Author: Ansgar Jazdzewski <ajaz@spreadshirt.net> | |
Date: Tue May 9 12:57:42 2017 +0200 | |
Disk I/O limits allow us to control the amount of I/O that a guest can perform. This is useful for example if we have several VMs in the same host and we want to reduce the impact they have on each other if the disk usage is very high. | |
diff --git a/lib/hypervisor/hv_kvm/__init__.py b/lib/hypervisor/hv_kvm/__init__.py | |
index a2da25b..5a802db 100644 | |
--- a/lib/hypervisor/hv_kvm/__init__.py | |
+++ b/lib/hypervisor/hv_kvm/__init__.py |
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
{ | |
"cluster_name": "ok0.dev.okeanos.grnet.gr", | |
"cluster_tags": [], | |
"enabled_hypervisors": [ | |
"kvm" | |
], | |
"instances": { | |
"snf-89": { | |
"admin_state": "down", | |
"disk_space_total": 20608, |
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
from netfilterqueue import NetfilterQueue | |
import struct | |
def print_and_accept(pkt): | |
print(pkt) | |
print("Addr: %x:%x:%x:%x:%x:%x(:%x:%x)" % | |
struct.unpack("BBBBBBBB", pkt.get_hw())) | |
pkt.accept() |
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
define {i64, i64, i64} @zip.get_cd_loop.5(i64 %hp_in, i64 %p_in, i64 %v19, i64 %v20, i64 %v21, i64 %v22, i64 %v23) nounwind noredzone { | |
Entry: | |
%exception_sync = alloca double | |
%hp_reg_var = alloca i64 | |
store i64 %hp_in, i64* %hp_reg_var | |
%p_reg_var = alloca i64 | |
store i64 %p_in, i64* %p_reg_var | |
%vr23 = alloca i64 | |
%vr22 = alloca i64 | |
%vr21 = alloca i64 |
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
-module(stats). | |
-compile(export_all). | |
%%================================================================ | |
%% Statistics data structures | |
%%================================================================ | |
-record(range, {min, max}). |
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
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h | |
index 3ffaddd..69c8d30 100644 | |
--- a/include/llvm-c/Core.h | |
+++ b/include/llvm-c/Core.h | |
@@ -949,7 +949,11 @@ LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef, LLVMTypeRef Ty, | |
LLVMValueRef LLVMBuildFree(LLVMBuilderRef, LLVMValueRef PointerVal); | |
LLVMValueRef LLVMBuildLoad(LLVMBuilderRef, LLVMValueRef PointerVal, | |
const char *Name); | |
+LLVMValueRef LLVMBuildVolatileLoad(LLVMBuilderRef, LLVMValueRef PointerVal, | |
+ const char *Name, LLVMBool isVolatile); |
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
module Ant | |
where | |
import Prelude hiding (log) | |
import Control.Monad ((>=>)) | |
import Data.List ((\\)) | |
-- | A Simple logging Monad that logs items of type e |