Windows Service with Python 3.5 and pyinstaller
- Python 3.5.x
- Visual C++ Build Tools 2015
- PyInstaller 3.2
| #lsauer.com, 2013 | |
| #Note: -)for convenience the function uses the re-module, but can be rewritten to fit into a lambda expression | |
| # -)choose any other, more-expressive return type such as NumPy's `nan` over None if you like | |
| #demonstrative-version: | |
| def parseInt(sin): | |
| import re | |
| return int(''.join([c for c in re.split(r'[,.]',str(sin))[0] if c.isdigit()])) if re.match(r'\d+', str(sin), re.M) and not callable(sin) else None | |
| #via a simple regex: |
| // create file: | |
| sudo vim /usr/share/applications/intellij.desktop | |
| // add the following | |
| [Desktop Entry] | |
| Version=13.0 | |
| Type=Application | |
| Terminal=false | |
| Icon[en_US]=/home/rob/.intellij-13/bin/idea.png | |
| Name[en_US]=IntelliJ |
| function connectAndPrint() { | |
| // our promise chain | |
| connect().then(function() { | |
| return print(); | |
| }).then(function() { | |
| success(); // exceptions get thrown all the way up the stack | |
| }).catch(fail); // so one catch is often enough for all promises | |
| // NOTE: If a function returns a promise, you don't need to wrap it in a fuction call. | |
| // The following is perfectly valid: |
Windows Service with Python 3.5 and pyinstaller
| // from http://developer.gstsystem.co.in/apiportal/howToStart/download | |
| package org.gst.poc.util; | |
| import java.util.Scanner; | |
| public class GSTINValidator { | |
| public static final String GSTINFORMAT_REGEX = "[0-9]{2}[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[Z]{1}[0-9a-zA-Z]{1}"; | |
| public static final String GSTN_CODEPOINT_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
| public static void main(String args[]) { |