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
# Determine wireless device model (manufacturer 14e4 for Broadcom): | |
lspci -vvnn | grep 14e4 | |
# Install Broadcom STA driver for BCM43227: | |
sudo apt-get update | |
sudo apt-get install --reinstall linux-headers-generic build-essential dkms bcmwl-kernel-source | |
sudo modprobe -r b43 ssb wl brcmfmac brcmsmac bcma | |
sudo modprobe wl | |
# Connect (press Fn+F3 to enable wifi if necessary first): |
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
<?php | |
const BASE = ''; | |
const COUNT = 1; | |
$pages = []; | |
for ($i = 1; $i <= COUNT; $i++) { | |
$suffix = $i > 1 ? '/page' . $i : ''; | |
$pages[] = $page = 'page' . $i . '.pdf'; | |
$url = BASE . $suffix; |
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
<?php | |
use Amp\Emitter; | |
use Amp\Iterator; | |
use Amp\Promise; | |
class CsvReader implements Iterator { | |
/** @var EventEmitter */ | |
private $eventEmitter; | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
name: 'Eric Venarusso' | |
age: '21' | |
sex: 'male' | |
sports: | |
- name: 'soccer' | |
team: | |
name: 'corinthians' | |
- name: 'basketball' |
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
# This script was adapted from merge.py from the KoboldAI discord server. | |
# I believe the original author is concedo | |
import os | |
import gc | |
import json | |
import shutil | |
import resource | |
import torch |
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
""" | |
The code below combines approaches published by both @eugene-yh and @jinyongyoo on Github. | |
Thanks for the contributions guys! | |
""" | |
import torch | |
import peft |
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
class AudioSessionManager: NSObject, ObservableObject { | |
@Published var microphones: [AVCaptureDevice] = [] | |
var captureSession: AVCaptureSession = .init() | |
var audioOutput: AVCaptureAudioDataOutput? | |
var configured: Bool = false | |
private var audioInput: AVCaptureDeviceInput? | |
let dataOutputQueue = DispatchQueue(label: "audio_queue", | |
qos: .userInteractive, |
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
{"task_id": "HumanEval/0", "prompt": "from typing import List\n\n\ndef has_close_elements(numbers: List[float], threshold: float) -> bool:\n \"\"\" Check if in given list of numbers, are any two numbers closer to each other than\n given threshold.\n >>> has_close_elements([1.0, 2.0, 3.0], 0.5)\n False\n >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n True\n \"\"\"\n", "canonical_solution": " for idx, elem in enumerate(numbers):\n for idx2, elem2 in enumerate(numbers):\n if idx != idx2:\n distance = abs(elem - elem2)\n if distance < threshold:\n return True\n\n return False\n", "test": "\n\nMETADATA = {\n 'author': 'jt',\n 'dataset': 'test'\n}\n\n\ndef check(candidate):\n assert candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.3) == True\n assert candidate([1.0, 2.0, 3.9, 4.0, 5.0, 2.2], 0.05) == False\n assert candidate([1.0, 2.0, 5.9, 4.0, 5.0], 0.95) == True\n assert candidate([1.0, 2.0, |
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
import copy | |
import os | |
import safetensors.torch | |
import glob | |
import json | |
def transform_st(path: str, out_dir: str): | |
data = safetensors.torch.load_file(path) | |
old_keys = list(data.keys()) |
OlderNewer