Skip to content

Instantly share code, notes, and snippets.

@PaleNeutron
PaleNeutron / xfocus.py
Last active November 3, 2021 11:55 — forked from qur2/xfocus.py
Python + AppleScript to bring a window in foreground.
# Using applescript, sets the focus + foreground on a window by its title
# That works on OSX 12.0.1.
# @author Aurelien Scoubeau <aurelien.scoubeau@gmail.com>
# @edit John Lyu <paleneutron@outlook.com>
import argparse
import subprocess
# find the app or window back and activate it
def xfocus(title):
@PaleNeutron
PaleNeutron / labelme2yolo.py
Created December 20, 2020 11:17
Convert Labelme json to YOLO format
# -*- coding: utf-8 -*-
'''
LabelMe JSON format -> YOLO txt format
save dataset in dataset/
output will be saved in result/
'''
import json
import os
@PaleNeutron
PaleNeutron / OOP_F2003_Part_2.md
Created December 14, 2017 05:50 — forked from n-s-k/OOP_F2003_Part_2.md
Object-Oriented Programming in Fortran 2003 Part 2: Data Polymorphism

Object-Oriented Programming in Fortran 2003 Part 2: Data Polymorphism

Original article by Mark Leair, PGI Compiler Engineer

Note: This article was revised in March 2015 and again in January 2016 to bring it up-to-date with the production software release and to correct errors in the examples.

This is Part 2 of a series of articles:

@PaleNeutron
PaleNeutron / OOP_F2003_Part_1.md
Last active December 14, 2017 05:40 — forked from n-s-k/OOP_F2003_Part_1.md
Object-Oriented Programming in Fortran 2003 Part 1: Code Reusability
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
// ==UserScript==
// @name WIPS
// @namespace pn
// @description expand result
// @include http://www.wipsglobal.com/servicecn/toc/basicResult.wips
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js
// @require https://raw.githubusercontent.com/placemarker/jQuery-MD5/master/jquery.md5.js
// @version 0.3.0
// ==/UserScript==