Discover gists
import mmap | |
import torch | |
import json | |
import os | |
from huggingface_hub import hf_hub_download | |
def load_file(filename, device): | |
with open(filename, mode="r", encoding="utf8") as file_obj: | |
with mmap.mmap(file_obj.fileno(), length=0, access=mmap.ACCESS_READ) as m: |
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis. | |
## Core Principles | |
1. EXPLORATION OVER CONCLUSION | |
- Never rush to conclusions | |
- Keep exploring until a solution emerges naturally from the evidence | |
- If uncertain, continue reasoning indefinitely | |
- Question every assumption and inference |
# ----------------------------------------------------------------------------- | |
# AI-powered Git Commit Function | |
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
# 1) gets the current staged changed diff | |
# 2) sends them to an LLM to write the git commit message | |
# 3) allows you to easily accept, edit, regenerate, cancel | |
# But - just read and edit the code however you like | |
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
gcm() { |
In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).
The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.
My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [redis.io documentation](https://redis.io/do
Name | Link | Description |
---|---|---|
128 Nops | https://128nops.com/ | A blog focusing on low-level programming, reverse engineering, and performance optimization. |
ACM Queue - Articles | https://queue.acm.org/ | A public |
import matplotlib.pyplot as plt | |
import numpy as np | |
# Parameters (You can adjust these as needed) | |
roller_diameter = 5 # mm | |
rollers_num = 12 | |
cycloid_outer_diameter = 60 # mm (will be ignored if lower then minimum) | |
input_shaft_diameter = 5 # mm | |
# Function to plot cycloidal points |
-
We have absolutely no idea what we're doing in tech. Please explain the utmost basic things to us.
-
We only do web design. Our whole reason of being in tech is to make things pretty. Consider us the doilies of the industry.
-
We're not laughing about your joke, so we clearly need you explain it to us. In great detail.
-
We're only in tech to find a husband, boyfriend or generally to get laid.
####Aqui a função | |
processa_ws_sp_chamada<- function(ano, | |
codOrgao = "Detalhado", #Consolidado/Detalhado/<Código> | |
CodFonte = "Detalhado", #Consolidado/Detalhado/<Código> | |
CodFuncao="Detalhado", #Consolidado/Detalhado/<Código> | |
CodGrupo="Todos", #Todos/<Código> | |
CodModalidade = "Todos")#Todos/<Código> | |
{ | |
# Carregar o pacote necessário |
Published May-13-2020