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
static void ParseColorsTuple | |
( | |
PyObject * ColorTuple, | |
uint32_t * colors /* array of 4 elements */ | |
) | |
/* parses ColorTuple as a tuple of 4 elements, each in turn being a tuple of | |
4 integers (r, g, b, a) each in the range [0 .. 255]. Puts the result as | |
Cairo-format pixel values into colors. */ | |
{ | |
PyObject * TheColors[4] = {0, 0, 0, 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
int generate_indexed_something(size_t BufPixels, xxx ResultArray, xxx pixels, int_t pixlen) | |
{ | |
PyObject * BufString = 0; | |
PyObject * Result = 0; | |
/* extend ResultArray by a bunch of converted pixels at a time */ | |
if (BufPixels % 4 != 0) | |
{ | |
/* fill out unused part of byte with zeroes--actually shouldn't occur */ | |
PixBuf[BufPixels / 4] &= ~(0xff << BufPixels % 4 * 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
const FileDescriptorOwner cgroup_procs_fd(open_appendexisting_at(AT_FDCWD, (current + "/cgroup.procs").c_str())); | |
if (0 > cgroup_procs_fd.get()) { | |
procs_file_error: | |
const int error(errno); | |
std::fprintf(stderr, "%s: FATAL: %s%s: %s\n", prog, current.c_str(), "/cgroup.procs", std::strerror(error)); | |
throw EXIT_FAILURE; | |
} | |
if (0 > write(cgroup_procs_fd.get(), "0\n", 2)) goto procs_file_error; | |
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
#include <sys/types.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/wait.h> | |
int main() { | |
pid_t pid1; | |
pid_t pid2; | |
int status; |
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
#include <sys/types.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/wait.h> | |
int main() { | |
pid_t pid1; | |
pid_t pid2; | |
int status; |
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 | |
# Interweave two JSON log streams | |
import json | |
import os | |
import sys | |
import time | |
import urllib.request | |
from os import getenv | |
from subprocess import Popen, PIPE, STDOUT, check_output, check_call, call | |
from sys import stdout |
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 | |
cat >main.go <<REPRO | |
package main | |
import ( | |
"bytes" | |
"fmt" | |
"time" | |
) |
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
add_project(aws-cpp-sdk-text-to-speech | |
"High-level C++ SDK for Polly" | |
aws-cpp-sdk-polly | |
aws-cpp-sdk-core) | |
include(CheckIncludeFiles) | |
file( GLOB TEXT_TO_SPEECH_HEADERS "include/aws/text-to-speech/*.h" ) | |
set(PLATFORM_LIBS "") |
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
package utils | |
import ( | |
"context" | |
"github.com/aws/aws-sdk-go-v2/aws" | |
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" | |
"github.com/aws/smithy-go/middleware" | |
"reflect" | |
) |
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
-----BEGIN DSA PRIVATE KEY----- | |
MIIBugIBAAKBgQCYfXa+HV0Fl/CTNeOximEZt/xK960Tg3J8gKj0K2QqHoQgQbxk | |
R7UTVADl03IoOJbDPhV6I0RS1JoEX1NWyPmCNrXOGIqfaO/jbEdNU1lYyrFaw4zI | |
38dJuFJY3IPfJoHxCJYB1a/N+dca3KjdXxlCxImM50Dd4Jc+H8UqCsTarQIVAN3b | |
f7xVPqJoSwsBQUxGubHOyQeTAoGAfW/+RTlMo2z6P3WsUL0HQ0yrH5ns01CfwLqM | |
/ME76IOVV4eT+Li1G34FymdCFF1PWG5VHBT190R/XxICoEliflBYMbKJL9o3Z9sD | |
K3uG6+Z+5B5uCR5AY1ugT0EyuztCJpg0M2voxT0VQ4rLEYd5/rfnT7bejhxtqjzy | |
CrhmxyoCgYBzdvNGjMNNVOvgm/wBEWYFQKixGNhMskph1MpTgYQLmXKXK5rOpufy | |
P3cYzQheKxtG7Dk87hkAtuzv3kI7KsSqMErXowT67taEcgYMu57O/BFNMl4MLOsv | |
DRGCekm8CdMiGBpmjIqKZrifJs4/CA3m3YYvPWA7n4O8RDrnBpDrvwIUL8f0zQjg |
OlderNewer