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/local/bin/python | |
# -*- coding: utf-8 -*- | |
import datetime | |
if __name__ == "__main__": | |
now = datetime.datetime.utcnow() | |
day = now.day |
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<stdio.h> | |
#include<time.h> | |
int main(int argc , char *argv[]) | |
{ | |
time_t now; | |
int year; | |
int month; | |
int day; | |
int foo; | |
struct tm *t_st; |
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/bash | |
a=1 | |
for i in RIMG*.JPG; do | |
s=$(printf "RIMG%04d.JPG" $a) | |
echo $s | |
mv -f $i $s | |
let a="${a}+10" | |
done |
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
w32tm /config /manualpeerlist:"jp.pool.ntp.org,0x8 time.nist.gov,0x8 ntp1.v6.mfeed.ad.jp,0x8 ntp2.v6.mfeed.ad.jp,0x8 ntp3.v6.mfeed.ad.jp,0x8 ntp.nict.go.jp,0x8 time.windows.com,0x8 time1.google.com,0x8 time2.google.com,0x8 time3.google.com,0x8 time4.google.com,0x8 ats1.e-timing.ne.jp,0x8 " /syncfromflags:MANUAL |
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 datetime | |
import random | |
def jdn1(): | |
return datetime.datetime(datetime.date.today().year,4,1).toordinal() | |
def jdn12(): | |
return datetime.datetime(datetime.date.today().year+1,3,31).toordinal() | |
x= [1]*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
#! /bin/env python | |
# -*- coding:utf-8 -*- | |
import os | |
files= os.listdir(os.getcwd()) | |
for i in range(len(files)): | |
if files[i].isdigit()== True: | |
print(files[i]) | |
tmp= files[i] | |
yr= tmp[:4] + '-' + tmp[4:] |
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
# copyright (C) 2018 @surgical21 | |
# this sorcecode provife under Mozilla Public License v1.1 / GNU GPL v2 | |
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
import math | |
income= int(input('給与所得控除後の金額 >')) | |
excempt= int(input('所得控除後の合計額 >')) | |
base= math.floor((income-excempt)/1000) | |
if base <= 1950: | |
tax= base * 0.05 |
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
--- | |
_nominatim_url: 'https://nominatim.openstreetmap.org/reverse?format=json&lat=35.6803200&lon=139.7436850&&zoom=18&addressdetails=1&accept-language=ja' | |
PH: # https://ja.wikipedia.org/w/index.php?title=%E5%9B%BD%E6%B0%91%E3%81%AE%E4%BC%91%E6%97%A5 | |
- {'name': '元日', 'fixed_date': [1, 1]} | |
- {'name': '成人の日', 'variable_date': firstJanuaryMonday, 'offset': +7} | |
- {'name': '建国記念の日', 'fixed_date': [2, 11]} | |
- {'name': '春分の日', 'variable_date': [3, 20], 'only_years': [2020, 2021, 2024, 2025, 2026]} | |
- {'name': '春分の日', 'variable_date': [3, 21]} | |
- {'name': '昭和の日', 'fixed_date': [4, 29]} |
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 python3 | |
import datetime | |
year = datetime.date.today().year | |
for year in range(year, 2100): | |
a = year % 19 | |
b = year % 4 | |
c = year % 7 |
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 python3 | |
import datetime | |
print("復活祭の日付を計算します。計算したい年を入力してください。") | |
y = input() | |
if y.isdigit() != True: | |
print("再入力。") | |
y = input() | |
else: | |
pass |
OlderNewer