Add a lightweight, opt-in API that lets CI pipelines (and developers) capture PNG screenshots of uiWindow
/ uiArea
contents on Windows, macOS, and Linux.
This enables visual regression tests, automated UI documentation, and faster debugging—without pulling in heavyweight graphics stacks like Cairo.
This file contains hidden or 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
require "../src/onnxruntime" | |
require "vips" | |
require "option_parser" | |
# YOLOv7 Object Detection Example | |
# This example demonstrates how to use ONNXRuntime.cr with YOLOv7 for object detection | |
# COCO dataset labels | |
LABELS = ["person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", | |
"truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", |
This file contains hidden or 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
require 'getoptlong' | |
require 'openai' | |
options = { | |
'output' => 'speech.mp3' | |
} | |
parameters = { | |
'model' => 'tts-1', | |
'input' => nil, | |
'voice' => 'alloy', |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <htslib/sam.h> | |
#include <htslib/hts.h> | |
int main(int argc, char *argv[]) { | |
if (argc < 2) { | |
fprintf(stderr, "Usage: %s <bam_file>\n", argv[0]); | |
return 1; | |
} |
This file contains hidden or 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
diff --git a/src/compiler/crystal/compiler.cr b/src/compiler/crystal/compiler.cr | |
index 38880ee9e..c51e2c7ef 100644 | |
--- a/src/compiler/crystal/compiler.cr | |
+++ b/src/compiler/crystal/compiler.cr | |
@@ -204,15 +204,28 @@ module Crystal | |
# Raises `InvalidByteSequenceError` if the source code is not | |
# valid UTF-8. | |
def compile(source : Source | Array(Source), output_filename : String) : Result | |
+ t1 = Time.monotonic | |
source = [source] unless source.is_a?(Array) |
git clone https://github.com/crystal-lang/crystal
git checkout b9ab9968b85ce2b99a875abd4360b1a432e27a98
cd crystal
grep -r class_getter
This file contains hidden or 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
require "digest/md5" | |
require "colorize" | |
# Get the filename from the command-line arguments | |
filename = ARGV[0] | |
# Change the directory to the location of the file | |
Dir.cd File.dirname(filename) | |
# Define a FileRecord structure to store the md5sum and file path |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
#include <zlib.h> | |
#include <time.h> | |
int main() | |
{ | |
char *filename = "test.gz"; | |
char *contents = "One\nTwo"; | |
int content_length = strlen(contents); |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
#include <zlib.h> | |
#include <time.h> | |
int main() | |
{ | |
char *filename = "test.gz"; | |
char *contents = "One\nTwo"; | |
int content_length = strlen(contents); |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <htslib/sam.h> | |
typedef struct { | |
samFile *fp; | |
bam_hdr_t *h; | |
} bam_file_handle; | |
static int process_reads(void *data, bam1_t *b) { |
NewerOlder