Tutorial: Run Swift on Windows 10 the Easy Way (Using Linux Subsystem)

Posted: Wednesday, 7 September 2016

Running Apple's Swift programming language on Windows 10 is as simple as 1, 2 and 3.
  1. Setup the Linux Subsystem for Windows 10 Anniversary Edition
  2. Run sudo apt-get install build-essential (and optionally sudo apt-get install clang)
  3. Download, and Run swift!
  4. Note: for each of these links you can click or scroll down for more
Alternatively, the video below demonstrates the steps in motion...
https://www.youtube.com/embed/Z0PZc7WqPtE


And that's it.

Just note that both technologies are unstable as of September 2016
  • Swift is a fairly immature programming language
    • Due to the absence tools like a beautifier - though third-party tools such as Haaakon's SwiftFormat https://github.com/haaakon/SwiftFormat does the trick
    • Due to missing tangible desires such as bug reports & support from fellow Windows users of Swift (of which there is none)
    • And with breaking changes each major version of Swift (which might be why the Swift 1.0 code you found won't work on Swift 2.2 or even Swift 3.0 beta).
  • And the Windows Subsystem for Linux (WSL) is still in beta, with normally trivial tasks, such as interacting with the subsystem programmatically, almost impossible: https://github.com/Microsoft/BashOnWindows/issues/


Setting up WSL

To set up the Windows subsystem for Linux, an official guide can be followed here: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide
Here's a summary:
  • Start Menu -> Search "Turn Windows features on or off"
  • Scroll Down to "Windows Subsystem for Linux (Beta)", and click the checkbox
  • Restart your computer, it should display a screen along the lines of "Configuring Windows", similar to a Windows Update
  • Once your computer has restarted, launch a normal Windows Command Prompt: Start Menu -> Search "Command Prompt" (or alternatively, cmd)
  • Type the command "bash", and press enter
  • Accept the T&C (or not, skipping this section and booting into Ubuntu is effectively the same)
  • Wait for the ~200MB Ubuntu Subsystem Image to Download, Extract and Install

And that's it! A mini non-Linux environment within Windows. Similar to how OS X does it, only 10 years behind.

Takes around 30 minutes.

Those Linux commands


With how administrative/root privileges work in WSL, you don't need "su/sudo" to run what are normally root commands (if you've skipped setting up the root user).
apt-get install build-essential should work on its own.
The build-essential package is required to run Swift. Without it, Swift would just fail in executing scripts. Unfortunately, this is quite a large package on Ubuntu, and even on Windows its no exception.
So run the command and wait it out, a tip to speed up the process of downloading packages is shown in the video.
Running apt-get install clang allows for Swift code compilation support in Windows via swiftc (swiftc with build-essentials alone does not work). Interestingly the resulting binary that swiftc compiles is a native Linux/Ubuntu ELF instead of a Windows exe.

Takes around 30 minutes.

Swift

Download Swift from here: https://swift.org/download/, note that you'd want the Ubuntu 14.04 version, if still offered.
Extract the archive just like you would on Ubuntu (or extract it using the Windows method, whichever you prefer), and run /usr/bin/swift through bash.

Takes around 10 minutes.


And that's it! Swift (the programming language) running on Windows 10 using the Windows Subsystem for Linux!

Although REPL doesn't really work, and you're not exactly working with native Windows goodness.




bchunk v1.2.1 - BinChunker for Windows

Posted: Monday, 8 August 2016

https://github.com/extramaster/bchunk
https://github.com/extramaster/bchunk/releases
https://github.com/extramaster/bchunk/releases/download/v1.2.1/bchunk.v1.2.1.zip
Edit: In case you're unsure of the VirusTotal results, cloning the repo and running "build.bat" (with MSVC - https://www.visualstudio.com/downloads/) should build the application
Otherwise, https://github.com/extramaster/bchunk/releases/download/v1.2.1_repub.1/bchunk.v1.2.1_repub.1.zip
VirusTotal: https://www.virustotal.com/en/file/22335fa68f60fc47378399d7039a778eebe268092c609d53066bf9478f994113/analysis/1476900472/

BinChunker is an application that converts .bin "Disc Image" files to .iso with the help of a .cue file.

The application is unfortunately Unix-only (which includes Mac OS X and Linux) due to the use of a number of non-standard C headers - in fact, the code will fail to compile on a Windows "cross-native" Linux layer like MingW64

$ gcc bchunk.c -o bchunk
bchunk.c:61:24: fatal error: netinet/in.h: No such file or directory
 #include <netinet/in.h>
                        ^
compilation terminated.

Fortunately, a fix has been published by mzex for use of BinChunker on Windows, however it does not come with the source code (only a binary encoded in base64 format).

In the spirit of the GPL, here's a copy of the source code on Github: https://github.com/extramaster/bchunk. Feel free to Fork (or even spin off as a separate repo).
And here's the Windows Binary Download of BinChunker, the GitHub releases system is used: https://github.com/extramaster/bchunk/releases.



Oh, and one more thing, the changes made do not break Linux/Unix builds. So you can compile this version with Linux as usual.





Better Python Standard Library Autocompletion for Notepad++

Posted: Thursday, 7 July 2016

Download: http://static.extramaster.net/python.xml.zip (476kb download - 3,367kb extracted)
Note that there's 13,563 definitions included, so any application that attempts to parse XML structure will have a bad time.

Before:


After:




Using the Notepad++ "python.xml" generator at: https://sourceforge.net/projects/npp-python/, in conjunction with a script that imports all Python modules: http://stackoverflow.com/questions/1206832/importing-the-entire-python-standard-library, on a computer with a fresh Python install, nabs a "python.xml" file with definitions and autocomplete entries for all Python Standard Library modules.


Download: http://static.extramaster.net/python.xml.zip
Or if github gists are your thing: https://gist.github.com/extramaster/9d0b7eba99a9708eb3f71ae95bcd42b5

The "python.xml" file should be placed in "C:\Program Files (x86)\Notepad++\plugins\APIs" or "C:\Program Files\Notepad++\plugins\APIs", overwriting the pre-installed copy.

In case you want to revert back to the pre-installed "python.xml" file, here's a copy: http://static.extramaster.net/python_original.xml.zip

Here's a list of all of the Python Standard Libraries used in the creation of the autocomplete file:
import _bsddb
import _ctypes
import _ctypes_test
import _elementtree
import _hashlib
import _msi
import _multiprocessing
import _socket
import _sqlite3
import _ssl
import _testcapi
import _tkinter
import bz2
import pyexpat
import select
import unicodedata
import winsound
import BaseHTTPServer
import Bastion
import CGIHTTPServer
import ConfigParser
import Cookie
import DocXMLRPCServer
import HTMLParser
import MimeWriter
import Queue
import SimpleHTTPServer
import SimpleXMLRPCServer
import SocketServer
import StringIO
import UserDict
import UserList
import UserString
import __future__
import _abcoll
import _osx_support
import _pyio
import _strptime
import _threading_local
import _weakrefset
import abc
import aifc
import antigravity
import anydbm
import argparse
import ast
import asynchat
import asyncore
import atexit
import audiodev
import base64
import bdb
import binhex
import bisect
import bsddb
import cProfile
import calendar
import cgi
import cgitb
import chunk
import cmd
import code
import codecs
import codeop
import collections
import colorsys
import commands
import compileall
import compiler
import contextlib
import cookielib
import copy
import copy_reg
import csv
import ctypes
import dbhash
import decimal
import difflib
import dircache
import dis
import distutils
import doctest
import dumbdbm
import dummy_thread
import dummy_threading
import email
import encodings
import filecmp
import fileinput
import fnmatch
import formatter
import fpformat
import fractions
import ftplib
import functools
import genericpath
import getopt
import getpass
import gettext
import glob
import gzip
import hashlib
import heapq
import hmac
import hotshot
import htmlentitydefs
import htmllib
import httplib
import idlelib
import ihooks
import imaplib
import imghdr
import importlib
import imputil
import inspect
import io
import json
import keyword
import lib2to3
import linecache
import locale
import logging
import macpath
import macurl2path
import mailbox
import mailcap
import markupbase
import md5
import mhlib
import mimetools
import mimetypes
import mimify
import modulefinder
import msilib
import multifile
import multiprocessing
import mutex
import netrc
import new
import nntplib
import ntpath
import nturl2path
import numbers
import opcode
import optparse
import os
import os2emxpath
import pdb
import pickle
import pickletools
import pipes
import pkgutil
import platform
import plistlib
import popen2
import poplib
import posixfile
import posixpath
import pprint
import profile
import pstats
import py_compile
import pyclbr
import pydoc
import pydoc_data
import quopri
import random
import re
import repr
import rexec
import rfc822
import rlcompleter
import robotparser
import runpy
import sched
import sets
import sgmllib
import sha
import shelve
import shlex
import shutil
import site
import smtpd
import smtplib
import sndhdr
import socket
import sqlite3
import sre
import sre_compile
import sre_constants
import sre_parse
import ssl
import stat
import statvfs
import string
import stringold
import stringprep
import struct
import subprocess
import sunau
import sunaudio
import symbol
import symtable
import sysconfig
import tabnanny
import tarfile
import telnetlib
import tempfile
import test
import textwrap
import this
import threading
import timeit
import toaiff
import token
import tokenize
import trace
import traceback
import types
import unittest
import urllib
import urllib2
import urlparse
import user
import uu
import uuid
import warnings
import wave
import weakref
import webbrowser
import whichdb
import wsgiref
import xdrlib
import xml
import xmllib
import xmlrpclib
import zipfile
import Canvas
import Dialog
import FileDialog
import FixTk
import ScrolledText
import SimpleDialog
import Tix
import Tkconstants
import Tkdnd
import Tkinter
import tkColorChooser
import tkCommonDialog
import tkFileDialog
import tkFont
import tkMessageBox
import tkSimpleDialog
import ttk
import turtle

Zbar 64bit for Python 2.7

Posted: Saturday, 25 June 2016

http://static.extramaster.net/zbar-0.10.win-amd64-py2.7.msi (build of: https://github.com/NaturalHistoryMuseum/ZBarWin64)

If your pip install of ZBar goes something along the lines of

Collecting zbar
  Using cached zbar-0.10.tar.bz2
Building wheels for collected packages: zbar
  Running setup.py bdist_wheel for zbar ... error
  Complete output from command "c:\program files (x86)\python27\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\andytr~1\\appdata\\local\\temp\\pip-build-dtzlas\\zbar\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\andytr~1\appdata\local\temp\tmpq_wfxtpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_ext
  building 'zbar' extension
  creating build
  creating build\temp.win-amd64-2.7
  creating build\temp.win-amd64-2.7\Release
  C:\Users\Andy Tran\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-Ic:\program files (x86)\python27\include" "-Ic:\program files (x86)\python27\PC" /Tczbarmodule.c /Fobuild\temp.win-amd64-2.7\Release\zbarmodule.obj
  zbarmodule.c
  zbarmodule.c(65) : error C2143: syntax error : missing ';' before 'type'
  zbarmodule.c(66) : error C2065: 'major' : undeclared identifier
  zbarmodule.c(66) : error C2065: 'minor' : undeclared identifier
  zbarmodule.c(68) : error C2065: 'major' : undeclared identifier
  zbarmodule.c(68) : error C2065: 'minor' : undeclared identifier
  zbarmodule.c(133) : error C2275: 'zbar_error_t' : illegal use of this type as an expression
          c:\program files (x86)\python27\include\zbar.h(156) : see declaration of 'zbar_error_t'
  zbarmodule.c(133) : error C2146: syntax error : missing ';' before identifier 'ei'
  zbarmodule.c(133) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(135) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(135) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(136) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(146) : error C2275: 'PyObject' : illegal use of this type as an expression
          c:\program files (x86)\python27\include\object.h(108) : see declaration of 'PyObject'
  zbarmodule.c(146) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(147) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(151) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(151) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(151) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(152) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(152) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(152) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(153) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(153) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(153) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(154) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(154) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(154) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(155) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(155) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(155) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(156) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(156) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(156) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(157) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(157) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(157) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(158) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(158) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(158) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(159) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(159) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(159) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(160) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(160) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(160) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(163) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(164) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(164) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(164) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
  zbarmodule.c(164) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(164) : error C2065: 'ei' : undeclared identifier
  zbarmodule.c(167) : error C2275: 'PyObject' : illegal use of this type as an expression
          c:\program files (x86)\python27\include\object.h(108) : see declaration of 'PyObject'
  zbarmodule.c(167) : error C2065: 'dict' : undeclared identifier
  zbarmodule.c(167) : error C2065: 'mod' : undeclared identifier
  zbarmodule.c(167) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(167) : warning C4024: 'PyModule_GetDict' : different types for formal and actual parameter 1
  zbarmodule.c(169) : error C2065: 'dict' : undeclared identifier
  zbarmodule.c(169) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(169) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(171) : error C2065: 'dict' : undeclared identifier
  zbarmodule.c(171) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(171) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(183) : error C2275: 'PyObject' : illegal use of this type as an expression
          c:\program files (x86)\python27\include\object.h(108) : see declaration of 'PyObject'
  zbarmodule.c(183) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(185) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(185) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(185) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(186) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(186) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(186) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(187) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(187) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(187) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(188) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(188) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(188) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(189) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(189) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(189) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(190) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(190) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(190) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(191) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(191) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(191) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(192) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(192) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(192) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(193) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(193) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(193) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(194) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(194) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(194) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(195) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(195) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(195) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(196) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(196) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(196) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  zbarmodule.c(197) : error C2065: 'tp_dict' : undeclared identifier
  zbarmodule.c(197) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
  zbarmodule.c(197) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
  error: command 'C:\\Users\\Andy Tran\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

  ----------------------------------------
  Failed building wheel for zbar
  Running setup.py clean for zbar
Failed to build zbar
Installing collected packages: zbar
  Running setup.py install for zbar ... error
    Complete output from command "c:\program files (x86)\python27\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\andytr~1\\appdata\\local\\temp\\pip-build-dtzlas\\zbar\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\andytr~1\appdata\local\temp\pip-6cbwmc-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'zbar' extension
    creating build
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    C:\Users\Andy Tran\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-Ic:\program files (x86)\python27\include" "-Ic:\program files (x86)\python27\PC" /Tczbarmodule.c /Fobuild\temp.win-amd64-2.7\Release\zbarmodule.obj
    zbarmodule.c
    zbarmodule.c(65) : error C2143: syntax error : missing ';' before 'type'
    zbarmodule.c(66) : error C2065: 'major' : undeclared identifier
    zbarmodule.c(66) : error C2065: 'minor' : undeclared identifier
    zbarmodule.c(68) : error C2065: 'major' : undeclared identifier
    zbarmodule.c(68) : error C2065: 'minor' : undeclared identifier
    zbarmodule.c(133) : error C2275: 'zbar_error_t' : illegal use of this type as an expression
            c:\program files (x86)\python27\include\zbar.h(156) : see declaration of 'zbar_error_t'
    zbarmodule.c(133) : error C2146: syntax error : missing ';' before identifier 'ei'
    zbarmodule.c(133) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(134) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(135) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(135) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(136) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(146) : error C2275: 'PyObject' : illegal use of this type as an expression
            c:\program files (x86)\python27\include\object.h(108) : see declaration of 'PyObject'
    zbarmodule.c(146) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(147) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(151) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(151) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(151) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(152) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(152) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(152) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(153) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(153) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(153) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(154) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(154) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(154) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(155) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(155) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(155) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(156) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(156) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(156) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(157) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(157) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(157) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(158) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(158) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(158) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(159) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(159) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(159) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(160) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(160) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(160) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(162) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(163) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(164) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(164) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(164) : warning C4024: 'PyModule_AddObject' : different types for formal and actual parameter 1
    zbarmodule.c(164) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(164) : error C2065: 'ei' : undeclared identifier
    zbarmodule.c(167) : error C2275: 'PyObject' : illegal use of this type as an expression
            c:\program files (x86)\python27\include\object.h(108) : see declaration of 'PyObject'
    zbarmodule.c(167) : error C2065: 'dict' : undeclared identifier
    zbarmodule.c(167) : error C2065: 'mod' : undeclared identifier
    zbarmodule.c(167) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(167) : warning C4024: 'PyModule_GetDict' : different types for formal and actual parameter 1
    zbarmodule.c(169) : error C2065: 'dict' : undeclared identifier
    zbarmodule.c(169) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(169) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(171) : error C2065: 'dict' : undeclared identifier
    zbarmodule.c(171) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(171) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(183) : error C2275: 'PyObject' : illegal use of this type as an expression
            c:\program files (x86)\python27\include\object.h(108) : see declaration of 'PyObject'
    zbarmodule.c(183) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(185) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(185) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(185) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(186) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(186) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(186) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(187) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(187) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(187) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(188) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(188) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(188) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(189) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(189) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(189) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(190) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(190) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(190) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(191) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(191) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(191) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(192) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(192) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(192) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(193) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(193) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(193) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(194) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(194) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(194) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(195) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(195) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(195) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(196) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(196) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(196) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    zbarmodule.c(197) : error C2065: 'tp_dict' : undeclared identifier
    zbarmodule.c(197) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
    zbarmodule.c(197) : warning C4024: 'zbarEnumItem_New' : different types for formal and actual parameter 1
    error: command 'C:\\Users\\Andy Tran\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command ""c:\program files (x86)\python27\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\andytr~1\\appdata\\local\\temp\\pip-build-dtzlas\\zbar\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\andytr~1\appdata\local\temp\pip-6cbwmc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\andytr~1\appdata\local\temp\pip-build-dtzlas\zbar\

And if building "ZBarWin64" got you nowhere:

>python setup.py build
running build
running build_ext
building 'zbar' extension
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tczbarmodule.c /Fobuild\temp.win-amd64-2.7\Release\zbarmodule.obj
zbarmodule.c
zbarmodule.c(121): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcenum.c /Fobuild\temp.win-amd64-2.7\Release\enum.obj
enum.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcexception.c /Fobuild\temp.win-amd64-2.7\Release\exception.obj
exception.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcsymbol.c /Fobuild\temp.win-amd64-2.7\Release\symbol.obj
symbol.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcsymbolset.c /Fobuild\temp.win-amd64-2.7\Release\symbolset.obj
symbolset.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcsymboliter.c /Fobuild\temp.win-amd64-2.7\Release\symboliter.obj
symboliter.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcimage.c /Fobuild\temp.win-amd64-2.7\Release\image.obj
image.c
image.c(254): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'unsigned int', possible loss of data
image.c(329): warning C4244: 'function': conversion from 'Py_ssize_t' to 'unsigned long', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcprocessor.c /Fobuild\temp.win-amd64-2.7\Release\processor.obj
processor.c
processor.c(249): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcimagescanner.c /Fobuild\temp.win-amd64-2.7\Release\imagescanner.obj
imagescanner.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcdecoder.c /Fobuild\temp.win-amd64-2.7\Release\decoder.obj
decoder.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files (x86)\Python27\include" "-IC:\Program Files (x86)\Python27\PC" /Tcscanner.c /Fobuild\temp.win-amd64-2.7\Release\scanner.obj
scanner.c
creating build\lib.win-amd64-2.7
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.exe /DLL /nologo /INCREMENTAL:NO "/LIBPATH:C:\Program Files (x86)\Python27\libs" "/LIBPATH:C:\Program Files (x86)\Python27\PCbuild\amd64" zbar.lib /EXPORT:initzbar build\temp.win-amd64-2.7\Release\zbarmodule.obj build\temp.win-amd64-2.7\Release\enum.obj build\temp.win-amd64-2.7\Release\exception.obj build\temp.win-amd64-2.7\Release\symbol.obj build\temp.win-amd64-2.7\Release\symbolset.obj build\temp.win-amd64-2.7\Release\symboliter.obj build\temp.win-amd64-2.7\Release\image.obj build\temp.win-amd64-2.7\Release\processor.obj build\temp.win-amd64-2.7\Release\imagescanner.obj build\temp.win-amd64-2.7\Release\decoder.obj build\temp.win-amd64-2.7\Release\scanner.obj /OUT:build\lib.win-amd64-2.7\zbar.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\zbar.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\zbar.pyd.manifest
LINK : fatal error LNK1181: cannot open input file 'zbar.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64\\link.exe' failed with exit status 1181

Then you can build this awesome fork instead: https://github.com/NaturalHistoryMuseum/ZBarWin64

Or you can get a pre-built Windows installer here: http://static.extramaster.net/zbar-0.10.win-amd64-py2.7.msi


TwoKinds Upscaled 4x with Waifu2x

Posted: Monday, 29 February 2016

Twokinds is an english webcomic that chronicles the tales of a once-corrupt-Grand-Templar and a Fiesty Tiger.
The story is set in an immense, yet fictional world - a world that reflects (in an exaggerated manner) issues that plague modern society.
Themes of corruption, conflict and subtle racial-warring play an integral role into the plot of Twokinds, which allows the comic to maintain a tension of interest.




Download/View Links

779 Files overall (001 --- 779). ~5GB to download. Each image is around 8MB.

Google Photos Upload - https://photos.google.com/share/AF1QipPs0mW6A2vR3FjcRwE1Gw_EXrgigpF_1lIl_5Jfx_bHz8rPqEpKuJWdp6zOYfVzFQ?key=VHh6ODE3QkxmOHZGTHo1YmNnbXZ3QWdaQnJLam9n

Google Drive upload split into 2 parts due to a 500 image - per shared folder limit

Google Drive Folder Part 1 (495 Images, ~3GB) - https://drive.google.com/folderview?id=0B1JvZsBu8DnkRWVBdUwxVjY2Nlk&usp=sharing

Google Drive Folder Part 2 (284 Images, ~2GB) - https://drive.google.com/folderview?id=0B1JvZsBu8DnkOGpXeFZkcldKd2M&usp=sharing



Raspberry Pi - Raspbian Apt Mirrors

Posted: Friday, 20 November 2015

Jump to the list of sources/mirrors (in apt sources.list format)

Raspberry Pi's entire website down?






Can't access the Raspberry Pi mirror redirector?


Well, here's a bunch of sources that you can add to /etc/apt/sources.list to get yourself back on your feet - in case of another shutdown of the Raspberry Pi foundation's websites.

Last updated: November 2015. List based on a cache of: http://www.raspbian.org/RaspbianRepository

Jump to the list of sources/mirrors (in apt sources.list format)


Regions & Countries:
  • Europe
    • United Kingdom
    • France
    • Ireland
    • Germany
    • Italy
    • The Netherlands
    • Belgium
    • Switzerland
    • Sweden
    • Portugal
    • Slovenia
    • Austria
    • Hungary
    • Denmark
    • Slovakia
    • Czech Republic
    • Russia
    • Poland
    • Moldova
    • Latvia
    • Lithuania
  • North America
    • United States
    • Canada
  • South America
    • Brazil
    • Colombia
    • Ecuador
  • Oceania
    • Australia
    • New Caledonia
    • Vanuatu
  • Asia
    • Singapore
    • China
    • South Korea
    • Japan
    • Indonesia
    • Israel
    • India
    • Taiwan
    • Bangladesh
    • Philippenes
  • Africa
    • South Africa


It is recommended that you only choose the mirrors that are hosted in the country/region closest to you.

Also, have a copy of the mirror list, but instead of it being the latest debian release, point it to an older version.
i.e.
Have both "deb http://mirror.aarnet.edu.au/pub/raspbian/raspbian jessie main contrib non-free rpi"
and "deb http://mirror.aarnet.edu.au/pub/raspbian/raspbian wheezy main contrib non-free rpi"
in the same file.

Don't forget to "apt-get update" after you have modified "/etc/apt/sources.list"!


Caps/Scroll/Num Lock Toggler for Windows

Skip to download section

If you have a keyboard that does not have built-in Scroll Lock/Num Lock capabilities (such as the Microsoft Wireless Arc Keyboard - pictured below),

Then here’s a program that will toggle Scroll Lock/Caps Lock and Num Lock via software.

Download

http://static.extramaster.net/KeyboardLockTool.exe (413KB)

MD5: A7D6EF9C0A528C28198CEE4C907A8671
SHA-256: F90F46A618D70C1436DD9ABA38EA9F68B2CCCC354274E63FAF3B82B1344C8DA7

VirusTotal Scan:
https://www.virustotal.com/en/file/f90f46a618d70c1436dd9aba38ea9f68b2cccc354274e63faf3b82b1344c8da7/analysis/1447947391/
Works with Windows 10. A wired keyboard with Num lock/Scroll lock/Caps lock LEDs light up, indicating that this program is not hardware-dependent.

Demo

Tags:
windows force scroll lock
microsoft wireless keyboard scroll lock
microsoft arc keyboard scroll lock
trigger scroll lock without keyboard
trigger scroll lock