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
// Copyright 2024 Justine Alexandra Roberts Tunney | |
// | |
// Permission to use, copy, modify, and/or distribute this software for | |
// any purpose with or without fee is hereby granted, provided that the | |
// above copyright notice and this permission notice appear in all copies. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | |
// WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | |
// WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | |
// AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
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
// -*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;coding:utf-8 -*- | |
// vi: set et ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi | |
#define _GNU_SOURCE | |
#include <signal.h> | |
#include <stdio.h> | |
#include <ucontext.h> | |
#ifdef __x86_64__ | |
#define XED_ILD_HASMODRM_IGNORE_MOD 2 |
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/sh | |
# rename-pictures.sh | |
# Author: Justine Tunney <jtunney@gmail.com> | |
# License: Apache 2.0 | |
# | |
# This shell script can be used to ensure all the images in a folder | |
# have good descriptive filenames that are written in English. It's | |
# based on the Mistral 7b and LLaVA v1.5 models. | |
# | |
# For example, the following command: |
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
// -*- mode:c++;indent-tabs-mode:nil;c-basic-offset:4;coding:utf-8 -*- | |
// vi: set et ft=c++ ts=4 sts=4 sw=4 fenc=utf-8 :vi | |
// | |
// Copyright 2024 Mozilla Foundation | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-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
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ | |
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ | |
╞══════════════════════════════════════════════════════════════════════════════╡ | |
│ Copyright 2020 Justine Alexandra Roberts Tunney │ | |
│ │ | |
│ Permission to use, copy, modify, and/or distribute this software for │ | |
│ any purpose with or without fee is hereby granted, provided that the │ | |
│ above copyright notice and this permission notice appear in all copies. │ | |
│ │ | |
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │ |
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/echo ' -*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;coding:utf-8 -*-┤ | |
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ | |
╞══════════════════════════════════════════════════════════════════════════════╡ | |
│ To the extent possible under law, Justine Tunney has waived │ | |
│ all copyright and related or neighboring rights to this file, │ | |
│ as it is written in the following disclaimers: │ | |
│ • http://unlicense.org/ │ | |
│ • http://creativecommons.org/publicdomain/zero/1.0/ │ | |
╚────────────────────────────────────────────────────────────────────'>/dev/null | |
if ! [ "${0%.*}.exe" -nt "$0" ]; then |
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
# Copyright 2023 Justine Alexandra Roberts Tunney | |
# | |
# Permission to use, copy, modify, and/or distribute this software for | |
# any purpose with or without fee is hereby granted, provided that the | |
# above copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | |
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | |
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | |
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
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 | |
# jartps1.sh - Enhanced bash prompt | |
# Author: Justine Tunney <jart@google.com> | |
# Modified: 2023-11-28 | |
# | |
# LIST OF BASH PROMPT ENHANCEMENTS | |
# | |
# - No latency issues when holding down enter key | |
# - Doesn't look unfamiliar compared to bash defaults | |
# - Show current git branch |
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
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
re = require "re" | |
sqlite3 = require "lsqlite3" | |
reNumberPath = re.compile[[^/([0-9][0-9]*)$]] | |
function SetupSql() | |
if not db then | |
db = sqlite3.open('redbean.sqlite3') | |
db:busy_timeout(1000) | |
db:exec[[PRAGMA journal_mode=WAL]] |
NewerOlder