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
import v4 | |
import strformat | |
import strutils | |
import httpcore | |
import times | |
import httpclient | |
proc main = | |
let | |
region = "ap-southeast-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
proc readElementInto( | |
dest: var DescribeAvailabilityZonesResult, | |
parser: var XmlParser, | |
elementName: string): int = | |
result = 0 | |
if parser.elementName != elementName: | |
return 0 | |
var readCount = 0 | |
while readCount < 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
import strutils | |
import tables | |
import algorithm | |
import httpcore | |
import unicode | |
import strformat | |
import times | |
import nimcrypto | |
import httpclient | |
import utils |
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
int main() | |
{ | |
printf("\nvoid pointer: %d", sizeof(void*)); | |
return 0; | |
} |
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
{ | |
"check.on_save.list.move_cursor": false, | |
"check.on_save.list.show_errors": false, | |
"check.on_save.list.show_warnings": false, | |
"check.on_save.output.send": true, | |
"check.on_save.output.show": true, | |
"check.on_save.output.name": "Nim Check - Current File", | |
"check.on_save.output.method": "console", | |
"check.on_save.output.clear": false, |
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
main.nim(33, 28) Hint: 219042 [Processing] | |
main.nim(34, 28) Hint: 219042 [Processing] | |
main.nim(35, 1) Hint: 219042 [Processing] | |
main.nim(37, 1) Hint: 219062 [Processing] | |
main.nim(44, 1) Hint: 219109 [Processing] | |
main.nim(71, 87) Warning: cannot prove that field 'event.key' is accessible [ProveField] | |
main.nim(90, 30) template/generic instantiation from here | |
lib/pure/collections/sequtils.nim(109, 18) template/generic instantiation from here | |
lib/system.nim(2399, 14) template/generic instantiation from here | |
lib/system.nim(2393, 9) Warning: 'result' might not have been initialized [Uninit] |
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
proc condense_whitespace(input: string): string = | |
result = "" | |
# Calculate start position | |
var startPosition = 0 | |
while startPosition < len(input): | |
if input[startPosition] != ' ': | |
break | |
inc(startPosition) |
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
#[ | |
# AWS SignatureV4 Authorization Library | |
Implements functions to handle the AWS Signature v4 request signing | |
http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html | |
]# | |
import os, times | |
import strutils except toLower | |
import sequtils, algorithm, tables, nimSHA2 | |
import securehash, hmac, base64, re, unicode |
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
{ | |
"version":"2.0", | |
"metadata":{ | |
"apiVersion":"2015-10-01", | |
"endpointPrefix":"gamelift", | |
"jsonVersion":"1.1", | |
"protocol":"json", | |
"serviceFullName":"Amazon GameLift", | |
"signatureVersion":"v4", | |
"targetPrefix":"GameLift", |
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
# testing async dispatch in pursuit of an efficient async s3 interface | |
import os, times, math, httpclient, asyncdispatch, asyncfile | |
let t0 = epochTime() | |
proc dt() : float = | |
round(epochTime() - t0,6) | |
const aws_url = "http://localhost:1234/" |