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 torchtyping import TensorType as TT, patch_typeguard | |
import torch as t | |
from typeguard import typechecked | |
patch_typeguard() | |
# %% | |
def compute_times(size): |
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
#include "RSA.h" | |
int main() { | |
RSA RSAobj; | |
//RSAobj.set_n(); | |
//RSAobj.set_m(); | |
//RSAobj.set_e(); | |
//RSAobj.compute_d(); | |
RSAobj.prompt(); |
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
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/gocraft/health" | |
"github.com/gorilla/websocket" | |
) |
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
package main | |
import ( | |
"fmt" | |
"math" | |
"math/rand" | |
"os" | |
) | |
func main() { |
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
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
) | |
type request struct { | |
ID string | |
} |
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
package bench | |
import ( | |
"errors" | |
"os" | |
"testing" | |
) | |
func TestMain(m *testing.M) { | |
code := m.Run() |
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
#!/bin/bash | |
git show -q | head -n 1 | sed 's/commit //' | tr -d '\n' | xclip -i -selection clipboard |
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
// Inspired by http://stackoverflow.com/questions/29757584/handling-by-name-parameters-in-scala-macro | |
import scala.reflect.runtime.universe._ | |
class X { def x(i: => Int, second: String, other: Int*) = i * 2 } | |
val typeSignature = typeOf[X].member(TermName("x")).typeSignature | |
val paramTypes = typeSignature match { | |
case MethodType(params, _) => params map { _.typeSignature } | |
} |
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
$('img[alt="Pants on Fire!"]').remove(); |
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
#!/usr/bin/python3 | |
import sys | |
lines = sys.stdin.readlines() | |
for line in lines: | |
chars = list(line) | |
output = "" | |
for char in chars: | |
output += char |
NewerOlder