Skip to content

Instantly share code, notes, and snippets.

[2024-07-05 16:12:01Z INFO HostContext] No proxy settings were found based on environmental variables (http_proxy/https_proxy/HTTP_PROXY/HTTPS_PROXY)
[2024-07-05 16:12:01Z INFO HostContext] Well known directory 'Bin': '/home/fatimaapi/backend/bin.2.317.0'
[2024-07-05 16:12:01Z INFO HostContext] Well known directory 'Root': '/home/fatimaapi/backend'
[2024-07-05 16:12:01Z INFO HostContext] Well known config file 'Credentials': '/home/fatimaapi/backend/.credentials'
[2024-07-05 16:12:01Z INFO HostContext] Well known directory 'Bin': '/home/fatimaapi/backend/bin.2.317.0'
[2024-07-05 16:12:01Z INFO HostContext] Well known directory 'Root': '/home/fatimaapi/backend'
[2024-07-05 16:12:01Z INFO HostContext] Well known config file 'Runner': '/home/fatimaapi/backend/.runner'
[2024-07-05 16:12:01Z INFO Listener] Runner is built for Linux (X64) - linux-x64.
[2024-07-05 16:12:01Z INFO Listener] RuntimeInformation: Linux 5.15.0-1055-aws #60~20.04.1-Ubuntu SMP Thu Feb 22 15:49:52 UTC 2024.
[2024-07-05 16:12:01Z INFO Listene
@matbee-eth
matbee-eth / log.txt
Last active May 1, 2024 20:16
Parser for the CSV dataset at google-research-datasets/screen_annotation
(base) ➜ screen_annotation git:(main) ✗ python parse_dataset_entry.py
[('TOOLBAR', 0, 999, 31, 109, [('Inbox', 40, 158, 54, 85)]), ('CHATROOMS', 0, 333, 108, 171), ('NAVIGATION_BAR', 0, 998, 109, 171, [('DIRECT', 331, 664, 109, 171), ('CONTACTS', 672, 998, 110, 173)]), ('Inbox', 193, 409, 194, 222), ('Message', 273, 539, 226, 252), ('now', 904, 965, 202, 222), ('check', 903, 962, 228, 254), ('Friends', 391, 605, 346, 371)]
[('LIST_ITEM', 30, 482, 16, 232, [('Memoirs', 123, 398, 165, 220)]), ('LIST_ITEM', 500, 966, 16, 221, [('Comics', 660, 812, 165, 197)]), ('LIST_ITEM', 26, 487, 252, 556, [('gallery', 65, 452, 265, 488), ('Investing', 77, 450, 505, 536)]), ('LIST_ITEM', 512, 966, 254, 556, [('Spanish', 576, 897, 503, 536)]), ('LIST_ITEM', 19, 488, 591, 863, [('stop', 63, 454, 601, 827)]), ('LIST_ITEM', 509, 976, 589, 861, [('heart', 537, 939, 602, 823), ('TEXT', 539, 915, 843, 859)]), ('SKIP', 0, 167, 858, 935), ('PAGER_INDICATOR', 444, 547, 880, 910), ('NAVIGATION_BAR', 0, 998, 936, 999, [])]
[('TOOLBAR'
@matbee-eth
matbee-eth / idefics-8b-deepspeed.py
Last active September 14, 2024 14:54
Working version for a Deepspeed 3 fine-tune of Idefics-8b.
import torch
import safetensors
import random
import sys
import os
from transformers import HfArgumentParser, TrainingArguments, AutoProcessor, BitsAndBytesConfig, Idefics2ForConditionalGeneration, TrainingArguments, Trainer
from peft import prepare_model_for_kbit_training, LoraConfig, get_peft_model
from datasets import load_dataset, disable_caching
from dataclasses import dataclass, field
from typing import Optional
@matbee-eth
matbee-eth / machine.js
Last active November 6, 2019 15:28
Generated by XState Viz: https://xstate.js.org/viz
const initialState = {
id: 'toggle',
initial: 'idle',
context: {
msg: ''
},
states: {
idle: {
on: {
DONE_AVAILABLE: "granted",
@matbee-eth
matbee-eth / machine.js
Created November 5, 2019 20:23
Generated by XState Viz: https://xstate.js.org/viz
const grantedState = {
id: 'granted',
type: 'final'
}
const deniedState = {
id: 'denied',
type: 'final'
}
In file included from ../../webrtc/base/iosfilesystem.mm:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSPathUtilities.h:5:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:19:21: error: expected a type
- (id)copyWithZone:(nullable NSZone *)zone;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:25:28: error: expected a type
- (id)mutableCopyWithZone:(nullable NSZone *)zone;
^
/Applications/Xcode.app/Contents/Dev
Verifying that +matbee is my blockchain ID. https://onename.com/matbee
/*! Socket.IO.js build:0.9.16, development. Copyright(c) 2011 LearnBoost <[email protected]> MIT Licensed */
var io = ('undefined' === typeof module ? {} : module.exports);
(function() {
/**
* socket.io
* Copyright(c) 2011 LearnBoost <[email protected]>
* MIT Licensed
*/
<html>
<head>
</head>
<body>
<script>
require('nw.gui').Window.get().evalNWBin(null, 'test.bin');
</script>
</body>
</html>
function ab2str(buf) {
return String.fromCharCode.apply(null, new Uint8Array(buf));
}
function str2ab(str) {
var buf = new ArrayBuffer(str.length*2); // 2 bytes for each char
var bufView = new Uint8Array(buf);
for (var i=0, strLen=str.length; i<strLen; i++) {
bufView[i] = str.charCodeAt(i);
}