Skip to content

Instantly share code, notes, and snippets.

@zrecore
zrecore / jquery.tableSort.js
Created October 13, 2010 17:29
Converts tables into sortable tables that connects to JSON data.
View jquery.tableSort.js
/**
* @copyright Copyrights 2010 ZRECommerce.
* @licence GPL v3 or higher. See http://www.gnu.org/licenses/gpl.html
*/
(function($){
$.fn.tableSort = function(settings) {
var config = {
'pageIndex' : 1, // What page to request
'rowCount' : 30, // How may results per page
'sort' : null, // Sort by this column
View como_pensar.md

Como Pensar

Ler e entender um pouco desse artigo. https://wiki.c2.com/?FeynmanAlgorithm

  • Reconhecer como você pensa
  • Descrever métodos que você usa para pensar
  • Entender métodos diferentes de pensar
  • Fazer perguntas sobre tudo(incluindo sobre perguntas)

Perguntas

@gigq
gigq / jarvis.py
Created December 4, 2022 06:10
OpenAI's ChatGPT + Whisper speech recognition + MacOS say
View jarvis.py
import speech_recognition as sr
"""Make some requests to OpenAI's chatbot"""
import time
import os
from playwright.sync_api import sync_playwright
PLAY = sync_playwright().start()
BROWSER = PLAY.chromium.launch_persistent_context(
@mecid
mecid / AnimatableVector.swift
Last active February 6, 2023 23:42
High-performance Animatable Vector for SwiftUI
View AnimatableVector.swift
import SwiftUI
import enum Accelerate.vDSP
struct AnimatableVector: VectorArithmetic {
static var zero = AnimatableVector(values: [0.0])
static func + (lhs: AnimatableVector, rhs: AnimatableVector) -> AnimatableVector {
let count = min(lhs.values.count, rhs.values.count)
return AnimatableVector(values: vDSP.add(lhs.values[0..<count], rhs.values[0..<count]))
}
@leandrofilipe
leandrofilipe / Raspberry Pi RAID NAS Server Setup.md
Last active February 6, 2023 23:42
Raspberry Pi RAID NAS Server Setup
View Raspberry Pi RAID NAS Server Setup.md

※ Raspberry Pi RAID NAS Server Setup ※

Hardware:

  • Raspberry Pi 4 (4GB RAM)
  • Micro SD card 32GB
  • 2x Integral USB 3.1 flash drives 128GB

OS:

  • Raspbian Buster
@Ryanb58
Ryanb58 / install.md
Last active February 6, 2023 23:42
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
View install.md
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@zchee
zchee / actionlist.vim
Last active February 6, 2023 23:41
IdeaVim actionlist
View actionlist.vim
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@shobotch
shobotch / key.md
Last active February 6, 2023 23:39
Twitter (un)official Consumer Key
View key.md

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@chetstone
chetstone / EncryptedHomeFolder.md
Last active February 6, 2023 23:38
Encrypted APFS Home Folder on Mac OSX
View EncryptedHomeFolder.md

Encrypted APFS Home Folder on Mac OSX

Note: This is an update of Will Haley's excellent post to use APFS instead of CoreStorage.

UPDATE: Doesn't work on Catalina

The script can't read the file containing the password on the USB thumb drive. When formatted as FAT32 as described below, the user/group of the file is unknown/unknown. But I also tried formatting the USB thumb drive in HFS+, unchecking "Ignore permissions on this volume" and changing the file owner to root:wheel. The file is still not readable to the boot process. Probably something to do with new security restrictions in Catalina. A script running as root reading data from a thumb drive? Makes sense.

Back to previous program

View machine_learning_design_patterns.md

Machine Learning Design Patterns

This book is all about patterns for doing ML. It's broken up into several key parts, building and serving. Both of these are intertwined so it makes sense to read through the whole thing, there are very many good pieces of advice from seasoned professionals. The parts you can safely ignore relate to anything where they specifically use GCP. The other issue with the book it it's very heavily focused on deep learning cases. Not all modeling problems require these. Regardless, let's dive in. I've included the stuff that was relevant to me in the notes.

Most Interesting Bullets:

  • Machine learning models are not deterministic, so there are a number of ways we deal with them when building software, including setting random seeds in models during training and allowing for stateless functions, freezing layers, checkpointing, and generally making sure that flows are as reproducible as possib