Skip to content

Instantly share code, notes, and snippets.

from math import *
import itertools
def count(seq):
c = 0
for _ in seq:
c += 1
return c
34544741147 the
22207270966 of
16408827728 and
14160959594 to
11473810826 in
10771913403 a
6246095589 is
5780158482 that
4688540653 for
3937510884 was

Quine-McCluskey example in C++

A straightforward attempt to implement Quine-McCluskey algorithm in C++. This repo is not meant to be a useful piece of software on its own, but serve as an example and demo for my course's students.

{# Please read README.md and STYLEGUIDE.md before making edits. #}
# Unlocking Xiaomi bootloader
All Xiaomi smartphones, officially supported by Lineage~OS,
come with factory locked, but unlockable bootloaders.
Unfortunately, you have to request a *permission* from Xiaomi
to perform the unlock, thus making bootloader unlock a major hassle.
The procedure includes creating an account at Mi Cloud
#include <iostream>
#include <vector>
const int N = 10000000;
int main() {
// Let the seive be an array (really, std::vector<bool> is not exactly
// an array, but that's not important now) of size N with all elements
// initially set to 'true' istead of 'false'.
std::vector<bool> sieve(N, true);
module invertor(input wire x,
output wire y);
assign y = ~x;
endmodule
module test_invertor();
reg x;
wire y, z;
invertor inv(x, y);
invertor inv1(y, z);
class RandomSampleDict(object):
def __init__(self):
self.data = {}
self.cache_ik = {}
self.cache_ki = {}
self.track = []
def lookup(self, key):
# AUTOGENERATED, DO NOT EDIT!
def expand_function_autogen(f, argspec):
if argspec == "x_x":
def result(x, y, z):
x = f(x)
return x, y, z
return result
struct rfdtd_error_info
function(T arg1, T arg2) {
struct rfdtd_error_info error = RFDTD_NO_ERROR;
CHECK(function(arg1, &arg2));
CHECK(another_function());
CHECK(one_more_of_them());
CHECK(rfdtd_new(&ptr));
ON_ERROR(function)