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 -*- | |
# Modified. | |
# Original script source: | |
# http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html | |
# https://web.archive.org/web/20150312172727/http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html | |
# Usage: | |
# Run the script from a folder with file "all.mbox" |
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/ruby | |
require 'rubygems' | |
require 'digest/md5' | |
require 'json' | |
# Usage: | |
# 1. Locate a folder where you want to search dublicates in console. | |
# 2. Run the script without any arguments. | |
# 3. Watch the progress. |
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 ruby | |
# encoding: utf-8 | |
require 'rubygems' | |
gem 'seven_zip_ruby' | |
require 'seven_zip_ruby' | |
require 'webrick' | |
require 'fileutils' | |
gem 'nokogiri' | |
require 'nokogiri' |
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
# pip install exifread | |
import exifread | |
import array | |
import string | |
import glob | |
import json | |
KEYWORDS = 'Image XPKeywords' | |
OUTPUT = 'neuraltalk.json' |
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
trap ' | |
trap - INT # restore default INT handler | |
kill -s INT "$$" | |
' INT | |
INPUT=StockByte | |
OUTPUT=StockByte_simple_jpeg | |
# It scans subfolders recursively, but... |
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 dub | |
/+ dub.json: | |
{ | |
"name": "lalala", | |
"authors": [ | |
"Георгий Устинов" | |
], | |
"license": "Unlicense", | |
"dependencies": { | |
"dlib-webp": "~>0.0.6", |
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
/++ | |
+ Experiment 2017-02-28. | |
+ Author: Георгий Устинов | |
+ License: CC0. | |
+ | |
+ Executable size on Linux x86_64 | |
+ LDC2 0.17.1 (DMD v2.068.2, LLVM 3.8.0) | |
+ | |
+ ldc2 dzip.d ............... 26.6 KiB (27 232) | |
+ ldc2 -release dzip.d ...... 26.5 KiB (27 176) |
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
/// License: CC0 | |
import std.math; | |
real flog10(long n) { | |
real r = 0; | |
foreach (i; 1..(n+1)) { | |
r += log10(i); | |
} | |
return r; |
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
bool read = false; | |
int tries = 0; | |
while (!read && tries < 5) { | |
try { | |
if (wrongFoot) { | |
throw new GotUpOnTheWrongFoot(); | |
} | |
// Yes, I really doesn't care if something | |
// much deeper in it throws the exception. |
OlderNewer