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
#define global _while(%1) repeat : if (%1) == 0 : break | |
#define global _for(%1,%2=0,%3=0,%4=1) %1=(%2) %c repeat %c if cnt {%1+=(%4)} %c if (%1) == (%3) {break} | |
mes "break/continueを使えるwhileのサンプル" | |
i = 0 | |
_while i < 4 | |
mes i | |
i++ | |
loop |
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
# usage: | |
# python main.py --loglevel <level> | |
# | |
# level: | |
# CRITICAL | |
# ERROR | |
# WARNING | |
# INFO | |
# DEBUG |
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
{ | |
"version": 1, | |
"disable_existing_loggers": false, | |
"formatters": { | |
"default": { | |
"format": "%(levelname)s:%(name)s:%(message)s" | |
} | |
}, | |
"handlers": { | |
"console": { |
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
Sub IterateThroughTableContainingMergedCells() | |
Dim t As Table | |
Dim i As Long | |
Dim j As Long | |
For i = 1 To ActiveDocument.Tables.Count | |
Set t = ActiveDocument.Tables(i) | |
Debug.Print "Table(" & i & "): rows=" & t.Rows.Count & ", columns=" & t.Columns.Count |
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
@echo off | |
if "%~1" == "addpath" goto ADDPATH | |
if "%~1" == "help" goto HELP | |
if "%~1" == "-h" goto HELP | |
if "%~1" == "--help" goto HELP | |
if "%~1" == "/?" goto HELP | |
if "%~1" == "-?" goto HELP | |
goto :EOF |
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
@explorer shell:RecycleBinFolder |
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
Sub 指定したシートにジャンプ() | |
Dim SheetPattern As String | |
Dim s As Variant | |
SheetPattern = LCase(InputBox("シート名を入力", "指定したシートにジャンプ", "")) | |
If SheetPattern = "" Then | |
Exit Sub | |
End If | |
For Each s In ActiveWorkbook.Sheets |
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 freestanding import homespun | |
from nightlong import toad as cartel | |
import sprung as venom | |
import inscrutable as scrip | |
from thermoelectric import infamy | |
import priming as dandle | |
from propylene import smashing | |
import accretion | |
from furring import crappy |
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 | |
r""" | |
Sample output: | |
C:\Users\USERNAME\repos\python3-exception-with-values>python traceback_with_values.py | |
Traceback (most recent call last): | |
File "traceback_with_values.py", line 45, in <module> | |
print(float(x) + y) |
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 os | |
from ctypes import windll, create_unicode_buffer | |
dll = windll.LoadLibrary('kernel32.dll') | |
for longname in os.listdir('.'): | |
shortname = create_unicode_buffer(16) | |
dll.GetShortPathNameW(longname, shortname, 16) | |
if shortname.value.lower().endswith('2.csv'): | |
print('from:', longname) |