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 | |
# -*- coding: utf-8 -*- | |
# xshell session to mobaxterm session file | |
# Support: TELNET, serial, SSH | |
# Usage: xshell2mobaxterm.py Xshell_Session_Direcotry | |
# Example: python3 xshell2mobaxterm.py C:\Users\USERNAME\Documents\NetSarang Computer\7\Xshell\Sessions > mobaxterm.mxtsessions | |
# Linux platform enviroment: LANG=zh_CN.utf8/en_US.utf8 | |
# Windows: python3.6 cmd run it. | |
import os, sys |
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 | |
set CALIBRE_LIBRARY_DIRECTORY=\\NAS\book\talebook\books\library | |
set CALIBRE_EXE=C:\"Program Files"\Calibre2\calibre.exe | |
IF EXIST %CALIBRE_LIBRARY_DIRECTORY% ( | |
SETX>nul CALIBRE_LIBRARY_DIRECTORY %CALIBRE_LIBRARY_DIRECTORY% | |
ECHO LIBRARY FILES: %CALIBRE_LIBRARY_DIRECTORY% | |
) |
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
blueprint: | |
name: Restore Samba Backup sensor on startup | |
description: Restore Samba Backup sensor on startup | |
domain: automation | |
input: | |
addon: | |
name: Samba Backup Addon | |
description: Select samba backup addon. | |
selector: | |
addon: |
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 | |
import subprocess | |
def main(): | |
for root, dirs, files in os.walk("mp3", topdown=False): | |
for name in files: | |
print(name) | |
try: | |
out_bytes = subprocess.check_output( |
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/python | |
import os | |
from os.path import join | |
from mutagen.mp3 import MP3 | |
def main(): | |
root = r'/path/to/mp3_files' | |
csv = open("result.csv", 'w') |
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) 1000 - 9999 Somebody Anonymous | |
// NO WARRANTY OR GUARANTEE | |
// | |
using System; | |
namespace Navi | |
{ | |
class EvilTransform |
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
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// A base class for creating editors that decorate Unity's built-in editor types. | |
/// </summary> | |
public abstract class DecoratorEditor : Editor |
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 -*- | |
import os | |
def main(): | |
for root, dirs, files in os.walk("."): | |
for f in files: | |
if ".meta" not in f: | |
print root.replace(".\\",""),f.split('.')[0] | |
if __name__ == '__main__': |
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 python | |
# -*- coding: utf-8 -*- | |
import os | |
import os.path | |
import shutil | |
#需要遍历的目录 | |
fromDir='.\\' | |
#文件汇总到的目录 |
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 -*- | |
import xlrd | |
resultFile = open("./info.txt", "w") | |
fname = "./info.save.xls" | |
data = xlrd.open_workbook(fname) | |
table = data.sheets()[0] | |
nrows = table.nrows | |
ncols = table.ncols | |
for i in range(nrows): |
NewerOlder