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
#!/bin/bash | |
# Define revsets and their descriptions | |
revsets=( | |
"all()" "All commits of the repository" | |
"::@" "Show all ancestors" | |
"remote_bookmarks().." "Show all commits that are not in remote bookmarks" | |
"mine()" "Commits authored by the current user" | |
) |
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
def _jar_index_impl(ctx): | |
java_info = ctx.attr.src[JavaInfo] | |
java_runtime = ctx.attr._java_runtime[java_common.JavaRuntimeInfo] | |
java_home = java_runtime.java_home | |
jar_bin = "%s/bin/jar" % java_home | |
runtime_jars = " " | |
for jar in java_info.transitive_runtime_jars.to_list(): | |
runtime_jars += jar.path + " " |
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
load("@bazel_skylib//rules:write_file.bzl", "write_file") | |
genrule( | |
name = "example", | |
outs = ["example.jar"], | |
cmd = """ | |
OLD_CWD=$$(pwd) && cd $(RULEDIR) && \\ | |
$$OLD_CWD/$(JAVABASE)/bin/jar cmfv $(rootpath :manifest) \\ | |
$$OLD_CWD/$@ $(rootpath :main_class) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Santa Cruz Surf Watch</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
margin: 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
# First we declare out source which is a single table. | |
# You can join other sources together and Malloy will take care of doing the | |
# correct join conditions. | |
# To see the github events you can look at: | |
# https://docs.github.com/en/webhooks/webhook-events-and-payloads | |
source: github_events is duckdb.table('./github_events.parquet') extend { | |
dimension: | |
is_pull_request is metadata.event = 'pull_request' | |
measure: | |
counts is count() |
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 pandas as pd | |
from plotnine import ggplot, aes, geom_line, theme, labs, scale_x_datetime, element_text, geom_point | |
import json | |
from datetime import datetime | |
# $ gh run list --workflow buildAndTestBazel.yml --repo openxla/stablehlo --json startedAt,updatedAt --status completed --branch main --limit 100 > json_data.json | |
# Assuming `json_data` is your JSON data loaded into a variable | |
# If your JSON is in a file, you can load it with: | |
with open('json_data.json', 'r') as f: | |
json_data = json.load(f) |
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 ctypes | |
import mmap | |
import struct | |
# Simplified ELF Header Structure | |
class Elf32_Ehdr(ctypes.Structure): | |
_fields_ = [ | |
("e_ident", ctypes.c_char * 16), | |
("e_type", ctypes.c_uint16), | |
("e_machine", ctypes.c_uint16), |
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
all: exe | |
# This library depends libx2.so soname and calls h() from it | |
y/liby.so: x/libx2.so | |
@mkdir -p $(dir $@) | |
echo 'extern int foo(); int g() { return foo(); }' | $(CC) -o $@ -shared -x c - -Lx -l:libx2.so '-Wl,--no-as-needed,--enable-new-dtags,-rpath,$$ORIGIN/../x' | |
# This library has both file and soname libx.so | |
x/libx.so: | |
@mkdir -p $(dir $@) |
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
example: example.c liba.so libb.so | |
gcc -o example -lb -la -laltf -lf -x c -L. example.c | |
libf.so: f.c | |
gcc -shared -o libf.so -x c f.c | |
libaltf.so: alternative-f.c | |
gcc -shared -o libaltf.so -x c alternative-f.c | |
liba.so: a.c libf.so |
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 plotnine import * | |
import pandas as pd | |
import numpy as np | |
# Initialize list of lists | |
raw = [['PHP', 9, 70], ['Java', 8, np.nan], ['JavaScript', 10, 683], ['.NET', 3, np.nan], ['Python', 6, 19], ['Ruby', 9, 68]] | |
data = { | |
'Language': [], | |
'Type': [], | |
'Value': [] |
NewerOlder