Skip to content

Instantly share code, notes, and snippets.

@nettok
nettok / gist:56cd90248943b891c43eb9d1d3f3287e
Created April 11, 2019 03:49
Steam system information
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
CPU Family: 0x6
/// Exponenciación modular ((b^e) % m)
fn pow_mod(b: usize, mut e: usize, m: usize) -> usize {
// if e == 0 { return 1; }
// if e % 2 == 0 {
// pow_mod(b, e / 2, m).pow(2) % m
// } else {
// (b * pow_mod(b, e - 1, m)) % m
// }
@nettok
nettok / ws.py
Created May 15, 2012 03:38
WebServices module
import json
from functools import wraps
from collections import namedtuple
from pyramid.request import Request
from pyramid.httpexceptions import (
HTTPException,
HTTPNotFound,
compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/librustc.so
../src/rustc/middle/infer.rs:297:21: 297:39 error: attempted access of field bounds_to_str on type middle::infer::infer_ctxt, but no field or method with that name was found
../src/rustc/middle/infer.rs:297 a_id, self.bounds_to_str(a_bounds),
^~~~~~~~~~~~~~~~~~
note: in expansion of #fmt
<core-macros>:5:45: 5:58 note: expansion site
<core-macros>:5:10: 5:60 note: in expansion of #debug
../src/rustc/middle/infer.rs:296:8: 298:51 note: expansion site
../src/rustc/middle/infer.rs:297:21: 297:49 error: the type of this value must be known in this context
../src/rustc/middle/infer.rs:297 a_id, self.bounds_to_str(a_bounds),
@nettok
nettok / expr.erl
Created December 13, 2011 17:57
Recursive descent parser for mathematic expressions with AST generation by shunting-yard algorithm
-module(expr).
-export([parse/1, eval/1]).
% Recursive descent parser for mathematic expressions with AST generation by shunting-yard algorithm ----------------
% TODO: more error checking
% grammar
% ~~~~~~~
%