-
Install pandas to local directory with pip:
pip install -t . pandas
-
Remove pandas and numpy directories
rm -r pandas numpy
-
Download the Linux distribution for pandas (choose the Python version that you want to use): https://pypi.org/project/pandas/#files
-
Download the Linux distribution for numpy (must be the same as the pandas one): https://pypi.org/project/numpy/#files
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 inspect | |
from typing import Any, Callable, Dict, List, Optional, Union | |
import numpy as np | |
import torch | |
from transformers import CLIPTextModel, CLIPTokenizer, T5EncoderModel, T5TokenizerFast | |
from diffusers.image_processor import VaeImageProcessor | |
from diffusers.loaders import FluxLoraLoaderMixin | |
from diffusers.models.autoencoders import AutoencoderKL |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
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
-- Capped collection of JSON blobs: (Use json for postgres 9.4 and below and jsonb for 9.5 and above) | |
CREATE SEQUENCE circle_index START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 5 CACHE 1 CYCLE ; | |
CREATE TABLE circle ( i integer PRIMARY KEY default nextval('circle_index') NOT NULL, tim timestamp DEFAULT current_timestamp NOT NULL, dat jsonb ); | |
INSERT INTO circle(i, dat) SELECT nextval('circle_index') as idx, '{"a":12345,"b":1}' AS val ON CONFLICT (i) DO UPDATE SET i=EXCLUDED.i, tim=DEFAULT, dat=EXCLUDED.dat; | |
INSERT INTO circle(i, dat) SELECT nextval('circle_index') as idx, '{"a":12345,"b":2}' AS val ON CONFLICT (i) DO UPDATE SET i=EXCLUDED.i, tim=DEFAULT, dat=EXCLUDED.dat; | |
INSERT INTO circle(i, dat) SELECT nextval('circle_index') as idx, '{"a":12345,"b":3}' AS val ON CONFLICT (i) DO UPDATE SET i=EXCLUDED.i, tim=DEFAULT, dat=EXCLUDED.dat; | |
INSERT INTO circle(i, dat) SELECT nextval('circle_index') as idx, '{"a":12345,"b":4}' AS val ON CONFLICT (i) DO UPDATE SET i=EXCLUDED.i, tim=DEFAULT, dat=EXCLUDED.dat; | |
INSER |
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
### Keybase proof | |
I hereby claim: | |
* I am irr on github. | |
* I am irr (https://keybase.io/irr) on keybase. | |
* I have a public key ASCaFyNLZZ6VPZe1-paKfPfKRUO_4DQAbqDG_zQVJSLNmgo | |
To claim this, I am signing this object: |
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
local account = "[email protected]" -- use your own gmail account | |
local password = "password" -- if you enable 2-phase authentication, you need to | |
-- generate and use a application-specific password here... | |
local sender_name = "Jon Snow" | |
local recipient = "[email protected]" | |
local recipient_name = "Arya Stark" | |
-------------------------------------------------------- | |
local find = ngx.re.find |
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
local account = "[email protected]" -- use your own gmail account | |
local password = "password" -- if you enable 2-phase authentication, you need to | |
-- generate and use a application-specific password here... | |
local sender_name = "Jon Snow" | |
local recipient = "[email protected]" | |
local recipient_name = "Arya Stark" | |
local mail_title = "This is a test mail" | |
local mail_body = [[<html><body><p>Mail Body...</body></html>]] |
A quick guide to write a very very simple "ECHO" style module to redis and load it!
Step 1: open your favorite editor and write/paste the following code in a file called module.c
#include "redismodule.h"
/* ECHO <string> - Echo back a string sent from the client */
int EchoCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
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
lists:sort(fun({_, X}, {_, Y}) -> X > Y end, | |
dict:to_list(lists:foldl( | |
fun(Pid, Dict) -> | |
InitialCall = case erlang:process_info(Pid, initial_call) of | |
{initial_call,{proc_lib,init_p,A}} -> | |
case erlang:process_info(Pid, dictionary) of | |
{dictionary, D} -> proplists:get_value('$initial_call', D, undefined); | |
_ -> {proc_lib,init_p,A} | |
end; | |
{initial_call,IC} -> |
NewerOlder