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 calendar | |
import datetime | |
today = datetime.date.today() | |
calendar.setfirstweekday(calendar.SUNDAY) | |
print calendar.month(today.year,today.month) |
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 os | |
import urllib.request | |
import time | |
from bs4 import BeautifulSoup | |
# すぱこーの掲載ページのurl抜き出し | |
def scan_url(url,crtdir): | |
pages = [url] | |
req = urllib.request.urlopen(url) |
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 urllib2 | |
import re | |
import datetime | |
import sys | |
def check_web(id,isapp): | |
try: | |
html = get_html(id,isapp) | |
name,time,price = parse_html(html) |
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 | |
from PIL import Image,ImageDraw | |
from sys import argv,stdout,version_info | |
from random import randint | |
def main(): | |
if(len(argv) == 2): | |
make_pic(argv[1]) | |
else: | |
print(u"パラメータが不適切です") |
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 Twitter #自作twitterAPIライブラリ | |
import Dither #画像2値化自作ライブラリ | |
from PIL import Image,ImageDraw,ImageFont | |
from urllib import urlretrieve | |
from os import mkdir,path,linesep | |
from qrcode import QRCode | |
from urllib2 import urlopen | |
from sys import stdout | |
from printer import ThermalPrinter |
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 numpy | |
from PIL import Image | |
class Dither: | |
def __init__(self,image_path): | |
self.imgdata = Image.open(image_path).resize((128,128)).convert("L") | |
#self.imgarray = numpy.asarray(self.imgdata) | |
def error_diffusion(self): |
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
using UnityEngine; | |
using System.Collections; | |
using System.Security.Cryptography; | |
using System; | |
using System.Text; | |
using UnityEngine.UI; | |
public class Identicon : MonoBehaviour { | |
[SerializeField]GameObject rect_plane;//描画につかうPlane |
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
#include <M5StickC.h> | |
#include <driver/i2s.h> | |
#include "arduinoFFT.h" | |
#include <WiFi.h> | |
#include <WiFiClient.h> | |
#define PIN_CLK 0 | |
#define PIN_DATA 34 | |
#define READ_LEN (2 * 1024) | |
#define GAIN_FACTOR 10 |
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
; Based https://github.com/cncjs/CNCjs-Macros/blob/master/3_Axis_Probe_with_Hole | |
; エンドミルを穴に入れて、エンドミルの先はプレート表面より下にします | |
; 制御基板のプランナーキューが空になるまで待ちます | |
%wait | |
; 以下はユーザーが定義する変数です | |
%Z_PROBE_THICKNESS = 5.06 ;プレートのZ方向の厚さ | |
%PROBE_DISTANCE = 20 ;プローブを当てにいくときの最大移動量 | |
%PROBE_FEEDRATE_A = 70 ;プローブ時の送り速度 1回目 |
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
; Based on https://github.com/cncjs/CNCjs-Macros/blob/master/C3D_3axis_probe | |
; エンドミルを穴に入れて、エンドミルの先はプレート表面より下にします | |
; 制御基板のプランナーキューが空になるまで待ちます | |
%wait | |
; 以下はユーザーが定義する変数です | |
%ENDMILL_DIAMETER = 3.175 ;エンドミルの直径 | |
%PROBE_BLOCK_Z = 5.06 ;Z方向のプレートの厚さ |