Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script type="text/javascript">
var globalTestItemNo = 1;
var TESTITEMNUM;
var DIVIDEDIMGNUM;
function globalTestItemNo2testName(globalTestItemNo){
(defun my-open-new-memo ()
(interactive)
(let ((my-regexp "\\([0-9]+\\)[.]memo")
(my-max 1)
(my-matched-num 0)
(file-list (directory-files "~/.emacs.d/memo/")))
(dolist (i file-list)
(setq my-matched-num (string-to-number (replace-regexp-in-string my-regexp "\\1" i)))
(if (< my-max my-matched-num)
(setq my-max my-matched-num)))
from PySide.QtGui import QApplication, QMainWindow, QAction, QActionGroup, QWidget, QCursor, QPainter
from PySide.QtCore import QTimer
import PySide.QtCore as QtCore
class W(QWidget):
def __init__(self):
QWidget.__init__(self)
self.resize(400,400)
self.myIsMousePressing = False
self.p = QPainter(self)
from PySide.QtGui import *
from PySide.QtCore import QTimer
app = QApplication([])
widget = QWidget()
textbox = QLineEdit()
startbutton = QPushButton("start/stop")
resetbutton = QPushButton("reset")
timelabel = QLabel("00:00:00")
counttimer = QTimer()
hboxlayout = QHBoxLayout()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#This software is released under the MIT License, see below.
#----------------License----------------
#The MIT License (MIT)
#
#Copyright (c) <2015> <Kei Minagawa>
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
# -*- coding: utf-8 -*-
import editor
import console
def main():
text = editor.get_text().decode('utf-8')
s,e = editor.get_selection()
srow, scol = get_row_col(s,text)
erow, ecol = get_row_col(e,text)
if scol != ecol:
@keimina
keimina / a.py
Created November 11, 2013 03:56
a
import re
import os
from pprint import pprint
def __init__():
cudirlist = os.listdir('.')
pprint(cudirlist)
print(
'abcd'
@keimina
keimina / Delete_rect.py
Created November 13, 2013 14:07
Delete_rect
# -*- coding: utf-8 -*-
import editor
import console
def main():
text = editor.get_text().decode('utf-8')
s,e = editor.get_selection()
srow, scol = get_row_col(s,text)
erow, ecol = get_row_col(e,text)
if scol == ecol:
@keimina
keimina / Grep.py
Created November 17, 2013 11:50
Grep
# -*- coding: utf-8 -*-
import os
import sys
import re
import console
import editor
from datetime import datetime
INTERRUPT_TIME = 5
@keimina
keimina / Find.py
Created November 17, 2013 12:49
Find
# -*- coding: utf-8 -*-
import os
import re
import editor
import console
home_dir = os.path.dirname(__file__)
current_dir = os.path.dirname(editor.get_path())
current_dir = os.path.relpath(current_dir, home_dir)