This file contains 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
❗️❗️❗️❗️❗️❗️ |
This file contains 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 IOBluetooth | |
class A: NSObject, CBCentralManagerDelegate { | |
var c: CBCentralManager! | |
init() { | |
super.init() | |
c = CBCentralManager(delegate:self, queue:nil) | |
} |
This file contains 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
framework 'IOBluetooth' | |
class A | |
def initialize | |
@c = CBCentralManager.alloc.initWithDelegate(self, queue:nil) | |
end | |
def centralManagerDidUpdateState(central) | |
if central.state == CBCentralManagerStatePoweredOn | |
@c.scanForPeripheralsWithServices(nil, options:nil) |
This file contains 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 'aws-sdk-core' | |
require 'aws-sdk-resources' | |
require 'yaml' | |
config = YAML.load_file('config.yml')[:tag] | |
Aws.config.update( | |
region: 'ap-northeast-1', | |
credentials: Aws::Credentials.new(config[:access_key_id], config[:secret_access_key]) | |
) |
This file contains 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
package main | |
import "fmt" | |
import "math/cmplx" | |
func dot(bits uint8) string { | |
bits = bits & 7 | (bits & 112) >> 1 | (bits & 8) << 3 | bits & 128 | |
return string(0x2800 + uint32(bits)) | |
} |
This file contains 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
# OK | |
class A | |
def a=(a) | |
@a = a | |
end | |
end | |
# OK | |
class B | |
def a=(a);@a = a;end |
This file contains 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
IMAGE_WIDTH = 256 | |
IMAGE_HEIGHT = 256 | |
NSUBSAMPLES = 2 | |
NAO_SAMPLES = 8 | |
class Vec | |
def initialize(x, y, z) | |
@x = x | |
@y = y | |
@z = z |
This file contains 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 ruby | |
# -*- coding: UTF-8 -*-; | |
require 'open3' | |
require 'shellwords' | |
EDITOR = ENV['EDITOR'] || 'vim -b' | |
EXCLUDE_EXTENTSONS = %w(psd gif jpg png DS_Store tmp JPG PNG swp swf o bundle dylib so) |
This file contains 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 astropy.coordinates | |
import astropy.units as u | |
from astropy.coordinates import EarthLocation, AltAz | |
from astropy.time import Time | |
from datetime import datetime | |
from scipy import optimize | |
tt = EarthLocation(lat=35.6585 * u.deg, lon=139.7455 * u.deg, height=250 * u.m) | |
def alt(timestamp): |
This file contains 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/sh | |
vim -T builtin_dumb --not-a-term -c "$1" -c 'qa!' --cmd 'set nomore t_cl= t_cm=.' | sed -e 's/\.//g' |