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
# Apache License 2.0 | |
# 使用法は gist のコメントを見てください | |
import argparse | |
from typing import List, Optional, Union, Iterator | |
import llama_cpp | |
from llama_cpp.llama_chat_format import _convert_completion_to_chat, register_chat_completion_handler | |
import llama_cpp.llama_types as llama_types | |
from llama_cpp.llama import LogitsProcessorList, LlamaGrammar | |
from llama_cpp import Llama, llama_chat_format |
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 imports | |
from IPython.display import Javascript | |
from google.colab import output | |
from base64 import b64decode | |
from io import BytesIO | |
!pip -q install pydub | |
from pydub import AudioSegment | |
RECORD = """ | |
const sleep = time => new Promise(resolve => setTimeout(resolve, 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
// Alamofire.swift | |
// | |
// Copyright (c) 2014 Alamofire (http://alamofire.org) | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
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
OUT = ir-state.png ir-learn.png ir-send.png packer.png wifi-morse-setup.png | |
all: $(OUT) | |
.SUFFIXES: .png .gv .msc | |
.gv.png: | |
dot -Tpng $< -o $@ |
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 <XCTest/XCTest.h> | |
#import <TKRGuard.h> | |
#import <OHHTTPStubs.h> | |
@interface AMEHTTPRequestTestCase : XCTestCase | |
@property (nonatomic, strong) NSURLRequest *lastRequest; | |
- (void)stubAllRequestWithResponseFileName:(NSString *)responseFileName statuCode:(NSInteger)statusCode; |
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
filter.Add(func(s) { | |
return strings.ToLower(s) | |
}, 10) |
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
Perl ワンライナーサンプル集 | |
■概要 | |
障害解析のためのログの調査、非互換対応でのソースコードの調査といった | |
テキスト処理で使った Perl ワンライナーのサンプル集です。 | |
Perl ワンライナーは以下の点が良いと思います。 | |
・Perl は Oracle Database (10g以降) に同梱されている。 | |
従って、Windows プラットフォームでも使える。 |
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
my (@price,@day); | |
<STDIN> =~ /(\d+) (\d+)/; | |
$price[$_] = <STDIN> for (0..($1-1)); | |
$day[$_] = <STDIN> for (0..($2-1)); | |
@price = sort {$a <=> $b} @price; | |
for my $setprice (@day){ | |
my @tmp = grep { $_ <= $setprice - $price[0] } @price; | |
my $check = 0; |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
NewerOlder