A minimal disassembler with an example on code instrumentation
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 fs from 'fs' | |
import sade from 'sade' | |
import { walk } from 'estree-walker' | |
import { rollup } from 'rollup' | |
const pkg = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf-8')) | |
const prog = sade('svelte-cli').version(pkg.version) | |
import { | |
compile, |
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 aptsources.sourceslist as sl | |
import lsb_release | |
codename = lsb_release.get_distro_information()['CODENAME'] | |
sources = sl.SourcesList() | |
for source in sources.list: | |
if source.comment.lower().find("因升級至") >= 0: |
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 sage | |
from sage.all_cmdline import * # import sage library | |
from sage.symbolic.operators import add_vararg, mul_vararg | |
def GF_simplify(_expr, p=2): | |
expr = expand(_expr) | |
if expr.operator() != add_vararg: | |
raise Exception('Can only simplify a sum over products.') | |
result = None |
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
patch: | |
# blocking: not using for Squirrel handling left/right keys incorrectly | |
# in horizontal mode (16.1) | |
# style/text_orientation: horizontal | |
# style/candidate_list_layout: linear | |
style/font_point: 14 | |
style/border_width: 8 | |
style/border_height: 4 | |
style/spacing: 8 |
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 math | |
from operator import itemgetter | |
HEADER = '''\ | |
# Rime dictionary | |
# encoding: utf-8 | |
# | |
# Data converted from McBopomofo | |
--- |
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
<?xml version="1.0"?> | |
<!-- This file was automatically generated from C sources - DO NOT EDIT! | |
To affect the contents of this file, edit the original C definitions, | |
and/or use gtk-doc annotations. --> | |
<repository version="1.2" | |
xmlns="http://www.gtk.org/introspection/core/1.0" | |
xmlns:c="http://www.gtk.org/introspection/c/1.0" | |
xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> | |
<include name="GLib" version="2.0"/> | |
<include name="GObject" version="2.0"/> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<selectfont> | |
<rejectfont> | |
<pattern> | |
<patelt name="family"> | |
<string>Symbola</string> | |
</patelt> | |
</pattern> |
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
-- open import Prelude | |
--- Products | |
record Σ (A : Set) (B : A → Set) : Set where | |
constructor _,_ | |
field | |
outl : A | |
outr : B outl |