git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
insert the code in .vimrc
or add more plugins from https://vimawesome.com/
Launch vim and run :source % and :PluginInstall
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
import z3 | |
import sys | |
def solve(msg, lvar, xvar, s): | |
global status | |
s.set("timeout", 60000) | |
res = s.check() | |
if(z3.unknown == res): |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;popcnt expl ;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(declare-const V (_ BitVec 64)) | |
(declare-const I1 (_ BitVec 64)) | |
(declare-const I2 (_ BitVec 64)) | |
(assert | |
(not | |
(= |
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
//===-- max_stack_height.cpp - Static analysis for stack height approximation --------------------------------------==// | |
// | |
// The LLVM Compiler Infrastructure | |
// | |
// This file is distributed under the University of Illinois Open Source | |
// License. See LICENSE.TXT for details. | |
// | |
//===----------------------------------------------------------------------===// | |
// | |
// This implements a function pass to approximate the max stack height of each function. |
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
//===-- stack_deconstructor.cpp - Deconstruct the global stack into local stack | |
// frame ---===// | |
// | |
// The LLVM Compiler Infrastructure | |
// | |
// This file is distributed under the University of Illinois Open Source | |
// License. See LICENSE.TXT for details. | |
// | |
//===----------------------------------------------------------------------===// | |
// |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
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/python | |
############################################################################################################## | |
# Extract information about a number. # | |
# # | |
# Example Usage: python infonum.py --bit 4 0xf # | |
# Output: # | |
# Base 10: -1 # | |
# Base 16: f # | |
# 2's Compliment binary: 1111 # |
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
/* clock example: frequency of primes */ | |
#include <chrono> | |
#include <cstdint> | |
#include <math.h> /* sqrt */ | |
#include <stdio.h> /* printf */ | |
#include <sys/time.h> | |
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */ | |
using namespace std::chrono; |
NewerOlder