Call the script like this:
./palette-generator.swift example-input.json
It will create a folder Colors
in the folder where this script is executed, containing output.
[package] | |
name = "min-char-rnn-rs" | |
version = "0.1.0" | |
authors = ["Suyash <[email protected]>"] | |
edition = "2018" | |
[dependencies] | |
rulinalg = "0.4.2" | |
rand = "0.6.4" | |
indicatif = "0.11.0" |
// | |
// TokenAcquisitionService.swift | |
// | |
// Created by Daniel Tartaglia on 16 Jan 2019. | |
// Copyright © 2024 Daniel Tartaglia. MIT License. | |
// | |
import Foundation | |
import RxSwift |
#!/usr/bin/swift sh | |
import Foundation | |
import PromiseKit // @mxcl ~> 6.5 | |
import Swifter // @mattdonnelly == b27a89 | |
let swifter = Swifter( | |
consumerKey: "FILL", | |
consumerSecret: "ME", | |
oauthToken: "IN", | |
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html" |
Call the script like this:
./palette-generator.swift example-input.json
It will create a folder Colors
in the folder where this script is executed, containing output.
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
#include <sys/syscall.h> |
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;
import UIKit | |
import Speech | |
class SiriViewController: UIViewController { | |
private static let locale = Locale(identifier: "es-ES") | |
private let speechRecognizer = SFSpeechRecognizer(locale: SiriViewController.locale)! | |
private var recognitionRequest: SFSpeechAudioBufferRecognitionRequest? | |
private var recognitionTask: SFSpeechRecognitionTask? | |
private let audioEngine = AVAudioEngine() |
#!/bin/bash | |
set -euo pipefail | |
function is-git-repository { | |
[[ -d "$1/.git" ]] || (cd "$1" && git rev-parse --git-dir > /dev/null 2>&1) | |
} | |
function echo-is-dirty { | |
cd "$1" | |
if [[ ! -z $(git status -s) ]] |
#include <Corrade/Utility/Assert.h> | |
#include <Corrade/PluginManager/Manager.h> | |
#include <Magnum/Magnum.h> | |
#include <Magnum/ImageView.h> | |
#include <Magnum/PixelFormat.h> | |
#include <Magnum/Math/Color.h> | |
#include <Magnum/Trade/AbstractImageConverter.h> | |
#include <MagnumExternal/Vulkan/flextVk.h> | |
#include <MagnumExternal/Vulkan/flextVkGlobal.h> |
public class Channel<Value> { | |
private class Subscription { | |
weak var object: AnyObject? | |
private let notifyBlock: (Value) -> Void | |
private let queue: DispatchQueue | |
var isValid: Bool { | |
return object != nil |