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
/* | |
ここでは、Fujitsu SPARC64 Xにおいてハードウェア10進浮動小数点演算を | |
テストするためのコードを例示する。コンパイル環境は | |
Oracle® Developer Studio 12.5 | |
であり、コンパイルコマンドは | |
$ cc -m64 -xtarget=sparc64x SPARC64_X_Decimal.c | |
であり、参考文献は | |
https://docs.oracle.com/cd/E71939_01/html/E71949/gonog.html | |
にある。 | |
なお、そのままだと dpd_conf.h がSyntax Errorになるので、 |
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 minimalmodbus | |
from serial.tools import list_ports | |
for d in list_ports.comports(): | |
if d.description.startswith('USB Serial'): | |
device = d.device | |
class RM_PP03: |
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 bitstring | |
import collections | |
from crccheck.crc import Crc16Genibus | |
import re | |
f = open("../result_r_y_yg_nobori2-3.bin", "rb").read() | |
b = bitstring.BitArray(bytes=f) | |
r = re.compile('0x(7e.+7e)$') | |
def check(b): |
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 bitstring | |
import collections | |
f = open("result.bin", "rb").read() | |
b = bitstring.BitArray(bytes=f) | |
def check(b): | |
l = [] | |
for i in b.findall("0x7E"): | |
if str(b[i+72:i+80]) == '0x7e': |
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
from machine import Pin, PWM | |
from time import sleep | |
pwm = PWM(Pin(15)) | |
# 80kHz | |
pwm.freq(80000) | |
pwm.duty_u16(0) | |
line = "" | |
while True: |
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
#coding: utf-8 | |
# サンイン重工 OHC-PC01AコントローラからPythonへ繋ぎこむライブラリ | |
import pygame | |
import time | |
class OHC_PC01A: | |
def __init__(self): | |
pygame.init() |
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
#coding:utf-8 | |
import serial | |
import time | |
def send(s, value): | |
s.write(value.encode('ascii') + b'\n') | |
s.flush() | |
def init_dsair2(s): |
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
<feedback> | |
<report_metadata> | |
<org_name>受信者名</org_name> | |
<date_range> | |
<begin>開始UNIX TIME</begin> | |
<end>終了UNIX TIME</end> | |
</date_range> | |
</report_metadata> | |
<record> | |
<!-- recordは1つのXMLに複数含まれうる --> |
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
function retribeXMLs() | |
{ | |
var xmls = []; | |
var messages; | |
var zipblob; | |
var fileblob; | |
// 2日以内のすべてのスレッドを取得 | |
var threads = GmailApp.search('newer_than:2d'); | |
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
#coding:utf-8 | |
import serial | |
import time | |
import pygame | |
# シリアルポートのデバイスファイル名に差し替える | |
port = '/dev/sekkin' | |
pygame.mixer.init(44100, -16, 1, 256) |
NewerOlder