This file contains hidden or 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 win32crypt | |
| import base64 | |
| def getkvprops(f, nextlen): | |
| line = f.readline().strip() | |
| keyname = line[0:nextlen] | |
| line = f.readline().strip() | |
| if line[0] == 'V': | |
| nextlen = int(line.split(" ")[1]) |
This file contains hidden or 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 clojure.lang.Compiler; | |
| import clojure.lang.RT; | |
| import clojure.lang.Symbol; | |
| import clojure.lang.Var; | |
| public class ClojureUtil { | |
| public static void main() { | |
| Var call = RT.var("clojure.main", "main"); | |
| call.invoke(); |
This file contains hidden or 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
| (defun me-insert-delete-char-at-beginning (begin-pos end-pos c) | |
| "insert or delete c at beginning of every line" | |
| (save-excursion | |
| (goto-char begin-pos) | |
| (move-beginning-of-line nil) | |
| (let ((line-num-begin (line-number-at-pos begin-pos)) | |
| (line-num-end (line-number-at-pos end-pos)) | |
| (delete (eq c (char-after (point))))) | |
| (while (<= line-num-begin line-num-end) | |
| ;; set delete for insert flag base on first line |
This file contains hidden or 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
| #python3 | |
| import sys | |
| import os | |
| import re | |
| #all src dirs | |
| dirs = [".", "base", "render"] | |
| temp_dir = "temp" |
This file contains hidden or 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_clip = clip.subclip(t[0], t[1]) | |
| sub_clip = sub_clip.speedx(factor=2) |
This file contains hidden or 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 random | |
| from moviepy.editor import VideoFileClip, concatenate_videoclips | |
| i_files = [("GH010024.MP4", (39, 41), ("00:17:15","00:17:17")), | |
| ("GH020024.MP4", ("00:00:29","00:00:32"),("00:05:21","00:05:23")), | |
| ("GH030024.MP4", ("00:07:02","00:07:05"))] | |
| o_file = "final.mp4" |
This file contains hidden or 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
| 解决 emacs 选中不高亮的问题 | |
| 原来需要使用transient-mark-mode | |
| 使用的主题solarize把transient-mark-mode禁用了 | |
| 需要手动打开一下 | |
| 所以使用了一个hook, transient-mark-mode-off-hook,发现关了就手动打开 |
This file contains hidden or 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
| (ns ssrvclj.testclient | |
| (:import [java.net Socket] | |
| [java.nio ByteBuffer])) | |
| (def buf (ByteBuffer/allocate 4)); | |
| (.putInt buf 100) | |
| (def byte-buf (.array buf)) | |
| (def sock (Socket. "127.0.0.1" 8888)) |
This file contains hidden or 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
| (ns srvclj.core | |
| (:import [java.nio.channels ServerSocketChannel Selector SelectionKey] | |
| [java.nio ByteBuffer] | |
| [java.net InetSocketAddress]) | |
| (:gen-class)) | |
| (def buf (ByteBuffer/allocate 1024)); | |
| (def selector (Selector/open)) | |
| (def serverChannel (ServerSocketChannel/open)) |
This file contains hidden or 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
| cmake_minimum_required (VERSION 3.5) | |
| project(dummyplayer) | |
| aux_source_directory(swf DIR_SWF) | |
| aux_source_directory(base DIR_BASE) | |
| aux_source_directory(render DIR_RENDER) | |
| set(DUMMYSRC src/main.cpp ${DIR_SWF} ${DIR_BASE} ${DIR_RENDER}) | |
| SET(TOP ${PROJECT_SOURCE_DIR}) |
NewerOlder