所得税額 = (所得金額(A) - 所得控除額(B)) × 税率 - 税額控除額(C)
- 「所得金額(A)- 所得控除額(B)」は 課税所得金額 といい、1,000円未満の端数を切り捨てる。
import asyncio | |
import random | |
class Hub(): | |
def __init__(self): | |
self.subscriptions = set() | |
def publish(self, message): |
#!/usr/bin/env python | |
import requests, json, datetime | |
d = requests.get('https://ip-ranges.amazonaws.com/ip-ranges.json').text | |
l = json.loads(d) | |
print "# Amazon CloudFront IP Ranges" | |
print "# Generated at " + str(datetime.datetime.now()) | |
for ip_range in [x['ip_prefix'] for x in l['prefixes'] if x['service']=='CLOUDFRONT' ]: | |
print "set_real_ip_from " + ip_range + ";" |
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
ruby d:\dev\sh\sourcetree\sourcetree-open-on-github.rb %1 |
#!/usr/bin/env python | |
import requests, json | |
d = requests.get('https://ip-ranges.amazonaws.com/ip-ranges.json').text | |
l = json.loads(d) | |
for ip_range in [x['ip_prefix'] for x in l['prefixes'] if x['service']=='CLOUDFRONT' ]: | |
print ip_range |
socat Examples | |
=============== | |
* 注意 | |
- SYSTEM で : を使う時は必ずエスケープすること | |
* 相手に接続 | |
# telnet, netcat, socat それぞれの場合 | |
$ socat - TCP:127.0.0.1:8000 |
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
--- ext/openssl/ossl_pkey_ec.c | |
+++ ext/openssl/ossl_pkey_ec.c | |
@@ -757,8 +757,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) | |
method = EC_GFp_mont_method(); | |
} else if (id == s_GFp_nist) { | |
method = EC_GFp_nist_method(); | |
+#if !defined(OPENSSl_NO_EC2M) | |
} else if (id == s_GF2m_simple) { | |
method = EC_GF2m_simple_method(); | |
+#endif |