Skip to content

Instantly share code, notes, and snippets.

@amidvidy
amidvidy / polydiff.py
Last active April 10, 2020 05:43
polynomial evaluator
from typing import Mapping, List, Optional, Set
from collections import Counter
from functools import reduce
class Expr:
# evaluate this expression, with respect to the following variable substitutions
def eval(self, env: Mapping[str, float]) -> float:
raise NotImplementedError()
import markovify
import json
from collections import defaultdict
persontext = defaultdict(list)
transitions = []
rawm = []
0x6789292e1d760968c9503ae6ac5700b176a46ba3
➜ ~ ls -l ~/.ethereum
total 16
-rw------- 1 amidvidy staff 37 Jul 29 12:51 keys.info
-rw------- 1 amidvidy staff 32 Jul 29 12:51 keys.info.salt
case OperationMode::CreateWallet: {
KeyManager wallet(m_walletPath, m_secretsPath);
if (m_masterPassword.empty())
m_masterPassword = createPassword(
"Please enter a MASTER passphrase to protect your key store (make it "
"strong!): ");
try {
wallet.create(m_masterPassword);
} catch (Exception const& _e) {
cerr << "unable to create wallet" << endl << boost::diagnostic_information(_e);
goroutine 316 [running]:
github.com/docker/docker/pkg/signal.DumpStacks(0x18f6c6a, 0xf, 0x0, 0x0, 0x0, 0x0)
/root/rpmbuild/BUILD/docker-engine/.gopath/src/github.com/docker/docker/pkg/signal/trap.go:82 +0xfc
github.com/docker/docker/daemon.(*Daemon).setupDumpStackTrap.func1(0xc4214ac0c0, 0x18f6c6a, 0xf, 0xc42044e200)
/root/rpmbuild/BUILD/docker-engine/.gopath/src/github.com/docker/docker/daemon/debugtrap_unix.go:19 +0xcb
created by github.com/docker/docker/daemon.(*Daemon).setupDumpStackTrap
/root/rpmbuild/BUILD/docker-engine/.gopath/src/github.com/docker/docker/daemon/debugtrap_unix.go:32 +0x10a
goroutine 1 [chan receive, 8265 minutes]:
main.(*DaemonCli).start(0xc4204eee10, 0x0, 0x1908125, 0x17, 0xc4204f2400, 0xc420056d70, 0xc420080360, 0x0, 0x0)
#include <iostream>
class Base1 {
public:
void foo() {
std::cout << "Base1" << std::endl;
}
};
class Base2 {
#include <iostream>
#include <string>
#include <vector>
class Base1 {
public:
void foo() {
std::cout << "Base1" << std::endl;
}
};
#include <iostream>
#include <string>
#include <vector>
class Base1 {
public:
void foo() {
std::cout << "Base1" << std::endl;
}
};
@amidvidy
amidvidy / gist:6c0b803e2cf836cdd5b9
Created January 29, 2016 19:08
undefined behavior is cool
➜ scratch cat both.c
#include <stdio.h>
int main(void) {
int a;
if (!(a == 0)) puts("ha");
if (!(a != 0)) puts("ho");
return 0;
}
➜ scratch ~/Documents/svnroot/llvm/build/bin/clang -O1 both.c