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.
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 math import * | |
import itertools | |
def count(seq): | |
c = 0 | |
for _ in seq: | |
c += 1 | |
return c |
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
34544741147 the | |
22207270966 of | |
16408827728 and | |
14160959594 to | |
11473810826 in | |
10771913403 a | |
6246095589 is | |
5780158482 that | |
4688540653 for | |
3937510884 was |
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
{# 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 |
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 <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); |
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
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); |
_
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
class RandomSampleDict(object): | |
def __init__(self): | |
self.data = {} | |
self.cache_ik = {} | |
self.cache_ki = {} | |
self.track = [] | |
def lookup(self, key): |
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
# 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 |
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
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) |
NewerOlder