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 mlx.core as mx | |
import numpy as np | |
import faiss | |
import time | |
class MLXVecSearch(): | |
def __init__(self, stream=mx.gpu): | |
self._stream = stream |
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 io | |
import picamera | |
import sys | |
from time import sleep | |
from tensorflow.contrib import predictor | |
from picamera import PiCamera | |
import signal | |
import slacker |
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
#!/bin/bash | |
if [ -n "$SESSION_NAME" ];then | |
session=$SESSION_NAME | |
else | |
session=multi-ssh-`date +%s` | |
fi | |
window=multi-ssh | |
### tmuxのセッションを作成 |
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
require 'benchmark' | |
require 'inline' | |
class Test | |
include Math | |
inline do |builder| | |
builder.include('<math.h>') | |
builder.c <<-EOF | |
double | |
log_c(int i) |
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
def function_f(tuple, m) | |
c = [-1, -1, 0] | |
if tuple.all? {|digit| digit == 0} | |
return c[0].abs | |
elsif tuple[0] == 1 and tuple[1..-1].all? {|digit| digit == 0} | |
return 0 | |
else | |
sum = 0 | |
tuple.each_index{|i| sum += c[i] * tuple[i] } | |
return sum % m |
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
on run {input, parameters} | |
set output to do shell script "echo " & quoted form of (input as Unicode text) & " | ruby -Ku" | |
if output is "" then | |
display dialog "No output" | |
end if | |
return output | |
end run |
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
#!/usr/bin/env perl | |
use warnings; | |
use strict; | |
use Text::MeCab; | |
my $mecab = Text::MeCab->new; | |
while(<>){ | |
chomp; |
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
use warnings; | |
use strict; | |
use Text::MeCab; | |
use Perl6::Say; | |
my $mecab = Text::MeCab->new; | |
while(<>){ | |
chomp; | |
my (undef,undef, @elms) = split ' ', $_; |
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
use strict; | |
use warnings; | |
use AnyEvent; | |
use AnyEvent::HTTPD; | |
use AnyEvent::Util qw(run_cmd); | |
use Cwd; | |
my $httpd = AnyEvent::HTTPD->new (port => 9090); | |
my $last_pid = undef; |
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
http://maps.google.co.jp/maps?q=%E4%BA%AC%E9%83%BD%E5%BA%9C%E4%BA%AC%E9%83%BD%E5%B8%82%E5%B7%A6%E4%BA%AC%E5%8C%BA%E5%90%89%E7%94%B0%E7%A5%9E%E6%A5%BD%E5%B2%A1%E7%94%BA4&oe=utf-8&hl=ja&client=firefox-a&ie=UTF8&hq=&hnear=%E4%BA%AC%E9%83%BD%E5%BA%9C%E4%BA%AC%E9%83%BD%E5%B8%82%E5%B7%A6%E4%BA%AC%E5%8C%BA%E5%90%89%E7%94%B0%E7%A5%9E%E6%A5%BD%E5%B2%A1%E7%94%BA%EF%BC%94&gl=jp&brcurrent=3,0x600108fee5e22dff:0xc7efeeb4261205e,0&layer=c&cbll=35.024289,135.788347&panoid=taZtJIfdd0Nvj5DvsQEIaQ&cbp=12,264.31,,0,-10.83&ll=35.02429,135.78835&spn=0.001524,0.002653&z=19 |
NewerOlder