All of the following information is based on go version go1.17.1 darwin/amd64.
| GOOS | Out of the Box |
|---|---|
aix |
✅ |
android |
✅ |
| from typing import Dict, Union | |
| from huggingface_hub import get_safetensors_metadata | |
| import argparse | |
| import sys | |
| # Example: | |
| # python get_gpu_memory.py Qwen/Qwen2.5-7B-Instruct | |
| # Dictionary mapping dtype strings to their byte sizes | |
| bytes_per_dtype: Dict[str, float] = { |
| from pyswip import Prolog | |
| Prolog.assertz("m1:parent(A,B) :- m1:father(A,B); m1:mother(A,B)") | |
| Prolog.assertz("m1:father(f,c)") | |
| Prolog.assertz("m1:mother(m,c)") | |
| for soln in Prolog.query("m1:parent(X,Y)"): | |
| print(f"{soln['X']} parent_of {soln['Y']}") |
| from pyswip import Prolog, Functor, Variable, Atom, Query | |
| from pyswip.easy import module, call | |
| _ = Prolog() | |
| assertz = Functor("assertz") | |
| if_ = Functor(":-", arity=2) | |
| or_ = Functor(";", arity=2) | |
| parent = Functor("parent", 2) |
| import time | |
| dv = { | |
| 1: 2, | |
| 2: 3, | |
| 3: 4, | |
| 4: 5, | |
| 5: 6, | |
| 6: 7, | |
| 7: 8, |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/hamba/avro" | |
| "log" | |
| "reflect" | |
| "github.com/hazelcast/hazelcast-go-client" | |
| "github.com/hazelcast/hazelcast-go-client/serialization" |
| /* This code snippet is a part of the blog at | |
| https://github.com/animeshtrivedi/blog/blob/master/post/2017-12-26-arrow.md | |
| */ | |
| import com.google.common.collect.ImmutableList; | |
| import org.apache.arrow.memory.RootAllocator; | |
| import org.apache.arrow.vector.*; | |
| import org.apache.arrow.vector.dictionary.DictionaryProvider; | |
| import org.apache.arrow.vector.types.FloatingPointPrecision; | |
| import org.apache.arrow.vector.types.pojo.ArrowType; |
| UUID=f236cd03-83ef-403c-8d81-1f3fc09419f0 /media/ext ext4 errors=remount-ro,defaults,noatime 0 1 | |
| /media/ext/var/lib/snapd /var/lib/snapd none bind 0 0 | |
| /media/ext/var/snap /var/snap none bind 0 0 |
| >>> from pyswip import Prolog | |
| >>> p = Prolog() | |
| >>> p.assertz("foo(bar)") | |
| >>> p.assertz("foo(bar)") | |
| >>> list(p.query("foo(X)")) | |
| [{'X': 'bar'}, {'X': 'bar'}] | |
| >>> p.retract("foo(bar)") | |
| >>> list(p.query("foo(X)")) | |
| [{'X': 'bar'}] | |
| >>> p.assertz("foo(bar)") |
| bindsym $mod+Shift+m move scratchpad | |
| bindsym $mod+Tab scratchpad show | |
| bindsym $mod+m exec i3-input -F 'mark %s' -P 'Mark: ' | |
| bindsym $mod+j exec i3-input -F '[con_mark="%s"] focus' -P 'Jump: ' |