Artistic style can be called from a Python script, either as an executable or a shared library (DLL). There are three Python scripts in the download along with the test files. The scripts will run on either Python 2, Python 3, or Iron Python.
Example.Exe.py calls the Artistic Style executable. An Artistic Style executable must be in the same folder as the Python script. The source files are never read by the script. This is the easiest way to call the program.
The other scripts, ExampleByte.py and ExampleUnicode.py, use Artistic Style as a shared library. The source code is read into the program. A shared library must be in the same folder as the Python scripts. The two scripts have different ways of handling the Python 3 Unicode. The following example is ExampleUnicode.py which uses Unicode strings and a shared library.
To compile Artistic Style as a shared library for use with a Python script the compile option ASTYLE_LIB must be defined. Then it will accept the files and options as parameters from a function call instead of the command line. It is the responsibility of the calling program to read the source files and accept the options from the user via a graphical interface or other method. These are then passed via the function call described below. After the source files are formatted they will be returned to the calling program, which must then save the source file and take other appropriate action.
Python 3 and Iron Python use Unicode strings instead of byte strings like Python 2. This can be handled a couple of ways when processing disk files and sending them to Artistic Style.
One way is to declare the file as binary. This will read the file as a byte string instead of a Unicode string. In this case you don't need to be concerned with file encoding and the file can be saved or sent to Artistic Style without decoding. The disadvantage of doing this is there are byte strings that you have to keep track of and the strings not Unicode. The Python script ExampleByte.py uses this method. The names of byte strings contain the word "byte" so they can be easily identified.
Another way is to use the version 3 default and read the file as a Unicode string. The file is read using the default system encoding. If a file uses a different encoding, it can be decoded using the Python "codecs" class (e.g. codecs.open()). Unicode strings will have to be encoded to be sent to Artistic Style or to be saved. Files sent to Artistic Style can always be encoded with UTF-8. The advantage of this method is you can work with the file in Unicode. The disadvantage is the encoding and decoding that has to be done and the exceptions that should be handled. The file ExampleUnicode.py uses this method. This is the method used in the following example and that is described in the following discussion.
The function format_source_code is called to format the source code.
Calling the Artistic Style shared library or DLL requires using the Python ctypes foreign function library. It provides C compatible data types, and allows calling functions in a shared library or DLL. All of the text sent to Artistic Style must be in byte format, not Unicode. The entire function is shown so you can see the setup for calling Artistic Style.
def format_source_code(libc, text_in, options): """Format the text_in by calling the AStyle shared object (DLL). The variable text_in is expected to be a byte string. The return value is a byte string. If an error occurs, the return value is a NoneType object. """ astyle_main = libc.AStyleMain astyle_main.restype = c_char_p formatted_text = astyle_main(text_in, options, ERROR_HANDLER, MEMORY_ALLOCATION) return formatted_text
text_in
A byte string containing the source file to be formatted. For Python 3 it is encoded to UTF-8. This is a Unicode
byte format that can be processed by Artistic Style. Since UTF-8 is a Unicode encoding no errors should occur.
options
A byte string containing the formatting options. They should be in the same format as in the default options file.
The options may be set apart by new-lines, commas, tabs or spaces. The long options do not need the "--" prefix.
Comments may be used but they must be terminated by a new-line "\n" character.
If the file is not a C/C++ file the file mode option "mode=java" or "mode=cs" must be included. Otherwise the default mode of C/C++ is used. For Python 3 the options are explicitly declared as byte format with a "b" preceding the string.
ERROR_HANDLER
A pointer to the error handling function. This function is called if there are errors in the text_in or options.
This function and the callback declaration are described below.
MEMORY_ALLOCATION
A pointer to the memory allocation function. The memory must be allocated for the output source file. This function
will be called when the memory is needed. This function and the callback declaration are described below.
The return type is declared as c_char_p before the function call.
If the function succeeds, the return value is a byte string containing the formatted source code.
If the function fails, the return value is a "NoneType" object. Before the object is returned, an error message will be sent to the error handling function.
This function typically fails for one of the following reasons:
The calling program is responsible for freeing the memory allocated by the MEMORY_ALLOCATION function when it is no longer needed. In the example this will be done by the MEMORY_ALLOCATION function.
Two function pointers must be defined for the call to AStyleMain.
# global allocation variable -------------------------------------------------- # global memory allocation returned to artistic style # must be global for CPython # IronPython doesn't need global, but it doesn't hurt __allocated__ = c_char_p # ----------------------------------------------------------------------------- # AStyle Memory Allocation Callback def memory_allocation(size): """AStyle callback memory allocation. The size to allocate is always byte type. The allocated memory MUST BE FREED by the calling function. """ # ctypes are different for CPython and IronPython global __allocated__ # ctypes for IronPython do NOT seem to be mutable # using ctype variables in IronPython results in a # "System.AccessViolationException: Attempted to read or write protected memory" # IronPython must use create_string_buffer() if __is_iron_python__: __allocated__ = create_string_buffer(size) return __allocated__ # ctypes for CPython ARE mutable and can be used for input # using create_string_buffer() in CPython results in a # "TypeError: string or integer address expected instead of c_char_Array" # CPython must use c_char_Array object else: arr_type = c_char * size # create a c_char array __allocated__ = arr_type() # create an array object return addressof(__allocated__)
The parameter to this function is the amount of memory that should be allocated.
The memory allocation callback creates a buffer for accepting the formatted file from Artistic Style. The procedures are different for Python and Iron Python.
Global instructions following the function define the arguments for the callback function used by AStyleMain.
# AStyle Error Handler Callback def error_handler(num, err): """AStyle callback error handler. The return error string (err) is always byte type. It is converted to unicode for Python 3. """ print("Error in input {0}".format(num)) if __is_unicode__: err = err.decode() print(err) sys.exit(1)
The error handler callback displays the error message. For Python 3 and Iron Python the message is decoded to Unicode. Since the error messages are in ASCII an exception is not handled. It should display an error message and then either abort or continue the program depending on the error. The first parameter is a number identifying the error. The second parameter is a pointer to a standard error message.
Error messages numbered 100-199 are errors that prevent the file from being formatted. A NULL pointer is returned to the calling program. Error messages numbered 200-299 are errors that do NOT prevent the file from being formatted. A valid pointer and a formatted file are returned. This will occur if an invalid option is sent to AStyleMain. The calling program has the option of accepting or rejecting the formatted file.
Global instructions following the function define the arguments for the callback function used by AStyleMain.
This function is called to get the Artistic Style version number.
As with calling the format source function, this also requires using the Python ctypes foreign
function library. The entire function is shown so you can see the setup for calling Artistic Style. The actual
call to Artistic Style is:
version = astyle_version()
def get_astyle_version(libc): """Get the version number from the AStyle shared object (DLL). The AStyle return value is always byte type. It is converted to unicode for Python 3. Since the version is ascii the decoding will not cause an exception. """ astyle_version = libc.AStyleGetVersion astyle_version.restype = c_char_p version = astyle_version() if __is_unicode__: version = version.decode('utf-8') return version
The return type is declared as c_char_p before the function call.
The return value is the byte string containing the Artistic Style version number.
For Python 3 and Iron Python the formatted_text is decoded to Unicode. Since it is ASCII characters only, no exceptions should occur.
The following example will work with Python 2, Python 3, or Iron Python. For Python 3 and Iron Python it reads the source code disk files as Unicode and decodes and encodes them as needed. The script can be copied and pasted into an editor for execution. Or it can be downloaded with test data from the "Developer Information" page. The Artistic Style source code must be compiled as a shared library (DLL) using the option ASTYLE_LIB. The shared library must then be copied to the directory that contains the Python script. The directory of the source code files to be formatted is a relative path in the function process_files. This may need to be changed to reflect your directory structure.
#! /usr/bin/python """ExampleUnicode.py This program calls the Artistic Style DLL to format the AStyle source files. The Artistic Style DLL must be in the same directory as this script. The Artistic Style DLL must have the same bit size (32 or 64) as the Python executable. It will work with either Python version 2 or 3 (unicode). For Python 3 the files are converted to Unicode and encoded or decoded as needed. """ # to disable the print statement and use the print() function (version 3 format) from __future__ import print_function import os import platform import sys from ctypes import * # global variables ------------------------------------------------------------ # will be updated from the platform properties by initialize_platform() __is_iron_python__ = False __is_unicode__ = False # ----------------------------------------------------------------------------- def main(): """Main processing function. """ files = ["ASBeautifier.cpp", "ASFormatter.cpp", "astyle.h"] options = "-A2tOP" #initialization print("ExampleUnicode", platform.python_implementation(), platform.python_version(), platform.architecture()[0]) initialize_platform() libc = initialize_library() version = get_astyle_version(libc) print("Artistic Style Version " + version) # process the input files for file_path in files: file_path = get_project_directory(file_path) text_in = get_source_code(file_path) options_in = options # unicode must be encoded to utf-8 bytes # encoding to utf-8 will not cause an exception # IronPython must be explicitely converted to bytes??? if __is_iron_python__: text_in = bytes(text_in.encode('utf-8')) options_in = bytes(options_in.encode('utf-8')) elif __is_unicode__: text_in = text_in.encode('utf-8') options_in = options_in.encode('utf-8') formatted_text = format_source_code(libc, text_in, options_in) # if an error occurs, the return is a type(None) object if type(formatted_text) == type(None): print("Error in formatting", file_path) os._exit(1) # unicode must be decoded from utf-8 bytes # decoding from utf-8 will not cause an exception if __is_unicode__: formatted_text = formatted_text.decode('utf-8') save_source_code(formatted_text, file_path) # allocated memory is deleted here, not in the allocation function del formatted_text print("Formatted", file_path) # ----------------------------------------------------------------------------- def format_source_code(libc, text_in, options): """Format the text_in by calling the AStyle shared object (DLL). The variable text_in is expected to be a byte string. The return value is a byte string. If an error occurs, the return value is a NoneType object. """ astyle_main = libc.AStyleMain astyle_main.restype = c_char_p formatted_text = astyle_main(text_in, options, ERROR_HANDLER, MEMORY_ALLOCATION) return formatted_text # ----------------------------------------------------------------------------- def get_astyle_version(libc): """Get the version number from the AStyle shared object (DLL). The AStyle return value is always byte type. It is converted to unicode for Python 3. Since the version is ascii the decoding will not cause an exception. """ astyle_version = libc.AStyleGetVersion astyle_version.restype = c_char_p version = astyle_version() if __is_unicode__: version = version.decode('utf-8') return version # ----------------------------------------------------------------------------- def get_project_directory(file_name): """Find the directory path and prepend it to the file name. The source is expected to be in the "src-p" directory. This may need to be changed for your directory structure. """ file_path = sys.path[0] end = file_path.find("src-p") if end == -1: print("Cannot find source directory", file_path) os._exit(1) file_path = file_path[0:end] file_path = file_path + "test-data" + os.sep + file_name return file_path # ----------------------------------------------------------------------------- def get_source_code(file_path): """Get the source code (unicode in Version 3). Opening the file as non-binary will read it as a unicode string. An exception is handled in case the file cannot be decoded using the system default codec. The return value is a unicode string. """ # version 3 will read unicode since the file is not declared as binary # could also read the file as binary and use an explicit decode try: file_in = open(file_path, 'r') text_in = file_in.read() except IOError as err: # "No such file or directory: <file>" print(err) print("Cannot open", file_path) os._exit(1) except UnicodeError as err: # "'<codec>' codec can't decode byte 0x81 in position 40813: <message>" print(err) print("Cannot read", file_path) os._exit(1) file_in.close() return text_in # ----------------------------------------------------------------------------- def initialize_library(): """Set the file path and load the shared object (DLL). Return the handle to the shared object (DLL). """ # change directory to the path where this script is located pydir = sys.path[0] # remove the file name for Iron Python if pydir[-3:] == ".py": pydir = os.path.dirname(sys.path[0]) os.chdir(pydir) # return the handle to the shared object if os.name == "nt": libc = load_windows_dll() else: libc = load_linux_so() return libc # ----------------------------------------------------------------------------- def initialize_platform(): """Check the python_implementation and the python_version. Update the global variables __is_iron_python__ and __is_unicode__. """ global __is_iron_python__, __is_unicode__ if platform.python_implementation() == "CPython": if platform.python_version_tuple()[0] >= '3': __is_unicode__ = True elif platform.python_implementation() == "IronPython": __is_iron_python__ = True __is_unicode__ = True # ----------------------------------------------------------------------------- def load_linux_so(): """Load the shared object for Linux platforms. The shared object must be in the same folder as this python script. """ shared = os.path.join(sys.path[0], "libastyle-2.05.so") # os.name does not always work for mac if sys.platform == "darwin": shared = shared.replace(".so", ".dylib") try: libc = cdll.LoadLibrary(shared) except OSError as err: # "cannot open shared object file: No such file or directory" print(err) print("Cannot find ", shared) os._exit(1) return libc # ----------------------------------------------------------------------------- def load_windows_dll(): """Load the dll for Windows platforms. The shared object must be in the same folder as this python script. An exception is handled if the dll bits do not match the Python executable bits (32 vs 64). """ dll = "AStyle-2.05.dll" try: libc = windll.LoadLibrary(dll) # exception for CPython except WindowsError as err: # print(err) print("Cannot load library", dll) if err.winerror == 126: # "The specified module could not be found" print("Cannot find", dll) elif err.winerror == 193: # "%1 is not a valid Win32 application" print("You may be mixing 32 and 64 bit code") else: print(err.strerror) os._exit(1) # exception for IronPython except OSError as err: print("Cannot load library", dll) print("If the library is available you may be mixing 32 and 64 bit code") os._exit(1) # exception for IronPython # this sometimes occurs with IronPython during debug # rerunning will probably fix except TypeError as err: print("TypeError - rerunning will probably fix") os._exit(1) return libc # ----------------------------------------------------------------------------- def save_source_code(text_out, file_path): """Save the source code as bytes. The variable text_out is Unicode in Python 3. The text_out will be encoded to a byte string using the default codec. An exception is handled in case the file cannot be encoded. """ # remove old .orig, if any backup_path = file_path + ".orig" if os.path.isfile(backup_path): os.remove(backup_path) # rename original to backup os.rename(file_path, backup_path) # version 3 will encode the file from unicode using the default codec # could also use an explicit decode before wiiting the file file_out = open(file_path, 'w') try: file_out.write(text_out) except UnicodeError as err: # "'<codec>' codec can't encode characters in position 0-2: <message>" print(err) print("Cannot write", file_path) os._exit(1) file_out.close() # ----------------------------------------------------------------------------- # // astyle ASTYLE_LIB declarations # typedef void (STDCALL *fpError)(int, char*); // pointer to callback error handler # typedef char* (STDCALL *fpAlloc)(unsigned long); // pointer to callback memory allocation # extern "C" EXPORT char* STDCALL AStyleMain(const char*, const char*, fpError, fpAlloc); # extern "C" EXPORT const char* STDCALL AStyleGetVersion (void); # ----------------------------------------------------------------------------- # AStyle Error Handler Callback def error_handler(num, err): """AStyle callback error handler. The return error string (err) is always byte type. It is converted to unicode for Python 3. """ print("Error in input {0}".format(num)) if __is_unicode__: err = err.decode() print(err) os._exit(1) # ----------------------------------------------------------------------------- # global to create the error handler callback function if os.name == "nt": ERROR_HANDLER_CALLBACK = WINFUNCTYPE(None, c_int, c_char_p) else: ERROR_HANDLER_CALLBACK = CFUNCTYPE(None, c_int, c_char_p) ERROR_HANDLER = ERROR_HANDLER_CALLBACK(error_handler) # global allocation variable -------------------------------------------------- # global memory allocation returned to artistic style # must be global for CPython # IronPython doesn't need global, but it doesn't hurt __allocated__ = c_char_p # ----------------------------------------------------------------------------- # AStyle Memory Allocation Callback def memory_allocation(size): """AStyle callback memory allocation. The size to allocate is always byte type. The allocated memory MUST BE FREED by the calling function. """ # ctypes are different for CPython and IronPython global __allocated__ # ctypes for IronPython do NOT seem to be mutable # using ctype variables in IronPython results in a # "System.AccessViolationException: Attempted to read or write protected memory" # IronPython must use create_string_buffer() if __is_iron_python__: __allocated__ = create_string_buffer(size) return __allocated__ # ctypes for CPython ARE mutable and can be used for input # using create_string_buffer() in CPython results in a # "TypeError: string or integer address expected instead of c_char_Array" # CPython must use c_char_Array object else: arr_type = c_char * size # create a c_char array __allocated__ = arr_type() # create an array object return addressof(__allocated__) # ----------------------------------------------------------------------------- # global to create the memory allocation callback function if os.name == "nt": MEMORY_ALLOCATION_CALLBACK = WINFUNCTYPE(c_char_p, c_ulong) else: MEMORY_ALLOCATION_CALLBACK = CFUNCTYPE(c_char_p, c_ulong) MEMORY_ALLOCATION = MEMORY_ALLOCATION_CALLBACK(memory_allocation) # ----------------------------------------------------------------------------- # make the module executable if __name__ == "__main__": main() os._exit(0)


Testing PI:ref and foootnotes
References used in this site
- The Model-View-Controller 2003 University of Oslo heim.ifi.uio.no/~trygver/2003/javazone-jaoo/MVC_pattern.pdf 11-12-2010
- Separation of Concerns Wikipedia en.wikipedia.org/wiki/Separation_of_concerns 11-12-2010
- The Alan Turing Home Page 2003 University of Oslo www.turing.org.uk/turing/ 11-12-2010
- Latin Quotes and Latin Phrases Yuni Words of Wisdom www.yuni.com/library/latin.html 11-12-2010
Content file for this page
content/ref_xml.html


UK: Several people stabbed near London Bridge, suspect shot dead by police
by Scroll StaffThe Metropolitan Police declared it a ‘terrorist incident’.
The police in London on Friday shot dead a man suspected of stabbing several people near London Bridge at 2 pm local time. The suspect had a “hoax explosive device” strapped on his body.
“As you would expect due to the nature of the incident, we responded as though this was terrorist related,” Assistant Commissioner of Police Neil Basu told reporters. “I am now in a position to confirm that it has been declared a terrorist incident.”
Prime Minister Boris Johnson called it an “appalling incident” and thanked the “emergency services and members of the public for their immense bravery” in responding to the attack.
According to reports, the suspect stabbed several people before being wrestled to the ground and disarmed by members of the public, according to a Press Association report cited by The Guardian. The newspaper reported that at least five people were injured in the attack. Underground services at the nearest station to London Bridge were halted by authorities.
In 2017, eight people were killed when three Islamist terrorists drove a van into crowds crossing London Bridge before attacking others with knives on the bridge and in neighbouring pubs and restaurants.
Read Comments


| Items Archived | 3 |
| Bitstream Views | 41,420 |
| Item Views | 53,903 |
| Collection Views | 861 |
| Community Views | 530 |
| User Logins | 149 |
| Searches Performed | 1,306 |
| Licence Rejections | 0 |
| OAI Requests | 67 |
| Content Type | Number of items |
|---|---|
| All Items | 1 |
| Preprint | 0 |
| Thesis or Dissertation | 0 |
| Research Paper | 0 |
| Action | Number of times |
|---|---|
| Item Views | 53,903 |
| browse | 51,698 |
| Bitstream Views | 41,420 |
| browse_by_item | 39,610 |
| Community List Views | 16,679 |
| browse_by_value | 13,509 |
| Searches Performed | 1,306 |
| Item Updated | 1,296 |
| Collection Views | 861 |
| Workspace Item Views | 726 |
| Community Views | 530 |
| authenticate | 374 |
| browse_mini | 340 |
| Bitstream Updates | 276 |
| Workflow Item Updates | 244 |
| Bundles Added | 210 |
| Workflow Advanced One Stage | 159 |
| User Logins | 149 |
| Bitstreams Added | 125 |
| Bitstreams Created | 125 |
| Bundle Updates | 120 |
| Tasks Claimed | 108 |
| Bundles Created | 105 |
| Bitstreams Removed | 103 |
| Bitstreams Deleted | 103 |
| Reject Workspace Item from Workflow | 96 |
| Bundles Deleted | 88 |
| Bundles Removed | 88 |
| Workspace Items Deleted | 88 |
| User Login Failures | 76 |
| OAI Requests | 67 |
| Workflow Starts | 57 |
| submission_complete | 57 |
| Licences Accepted | 55 |
| Workflow Items Rejected to Workspace | 48 |
| Reason for Workspace Item Rejection Completed | 48 |
| Items Created | 44 |
| Workspace Items Created | 44 |
| Items Deleted | 33 |
| OAI Error | 30 |
| EPerson Record Updated | 14 |
| EPerson Group Updates | 10 |
| User Profile Views | 5 |
| Items Added | 3 |
| Items Archived | 3 |
| EPerson Accounts Created | 3 |
| Items Installed | 3 |
| Invalid search string | 2 |
| Community Updates | 2 |
| create_metadata_field | 2 |
| Items Removed | 2 |
| //localhost | 2 |
| Communities Created | 1 |
| Licence Rejections | 0 |
| User | Number of logins |
|---|---|
| Address 32 | 28 |
| Address 33 | 17 |
| Address 19 | 14 |
| Address 36 | 8 |
| Address 1 | 7 |
| Address 12 | 6 |
| Address 2 | 5 |
| Address 7 | 5 |
| Address 22 | 4 |
| Address 21 | 4 |
| Address 39 | 4 |
| Address 9 | 4 |
| Address 11 | 3 |
| Address 17 | 3 |
| Address 3 | 3 |
| Address 38 | 3 |
| Address 27 | 2 |
| Address 28 | 2 |
| Address 29 | 2 |
| Address 10 | 2 |
| Address 37 | 2 |
| Address 35 | 2 |
| Address 31 | 2 |
| Address 30 | 2 |
| Address 13 | 1 |
| Address 14 | 1 |
| Address 26 | 1 |
| Address 23 | 1 |
| Address 25 | 1 |
| Address 24 | 1 |
| Address 16 | 1 |
| Address 15 | 1 |
| Address 18 | 1 |
| Address 20 | 1 |
| Address 8 | 1 |
| Address 5 | 1 |
| Address 4 | 1 |
| Address 6 | 1 |
| Address 34 | 1 |
| Word | Number of searches |
|---|---|
| location: | 785 |
| empty_query_string | 317 |
| l2 | 286 |
| daumier | 218 |
| very | 216 |
| honore | 142 |
| l142 | 139 |
| haughty | 108 |
| brats | 108 |
| mighty | 108 |
| legitimist | 107 |
| m101 | 86 |
| friend | 76 |
| war | 46 |
| nobody | 44 |
| third | 37 |
| carriage | 37 |
| class | 37 |
| crimean | 36 |
| by | 35 |
| nobodies | 33 |
| de | 31 |
| l121 | 31 |
| m3 | 25 |
| le | 24 |
| l143 | 22 |
| les | 21 |
| l101 | 19 |
| wagon | 18 |
| l141 | 17 |
| insecurity | 16 |
| hunger | 16 |
| m81 | 16 |
| l81 | 16 |
| m123 | 16 |
| m121 | 16 |
| food | 16 |
| department | 16 |
| m82 | 15 |
| m124 | 15 |
| among | 13 |
| m41 | 13 |
| birthright | 13 |
| l144 | 12 |
| literature | 12 |
| m61 | 11 |
| arab | 11 |
| elderly | 11 |
| l82 | 11 |
| m122 | 11 |
| jews | 11 |
| english | 11 |
| learning | 10 |
| la | 10 |
| the | 9 |
| israeli | 9 |
| taglit | 8 |
| gens | 8 |
| legends | 8 |
| m125 | 8 |
| studies | 8 |
| justice | 8 |
| jew | 7 |
| 2011 | 7 |
| vie | 7 |
| moisieme | 7 |
| beaux | 7 |
| offenders | 7 |
| jours | 7 |
| near | 7 |
| spanish | 6 |
| alfred | 6 |
| proof | 6 |
| russel | 6 |
| dahlben | 6 |
| wallace | 6 |
| medicine | 6 |
| judeo | 6 |
| israel | 6 |
| brandeis | 6 |
| university | 6 |
| council | 5 |
| ancienne | 5 |
| fifty | 5 |
| death | 5 |
| yehoshua | 5 |
| philanthropy | 5 |
| russian | 5 |
| adults | 5 |
| iraqi | 5 |
| butcher | 5 |
| states | 5 |
| 1998 | 5 |
| young | 5 |
| stat | 5 |
| 2000 | 5 |
| judaic | 5 |
| eastern | 5 |
| sex | 5 |
| vous | 5 |
| histoire | 5 |
| pas | 5 |
| wellington | 5 |
| waltham | 5 |
| massachusetts | 5 |
| genetic | 5 |
| Average views per item | 53,903 |
| Level | Number of lines |
|---|---|
| Warnings | 2 |
| Operation | |
|---|---|
| Log Processing Time | 9 seconds |
| Output Processing Time | 0 seconds |
| Log File Lines Analysed | 225,050 lines |


Welcome to our simple javascript stack app. Our stack includes all of the following from @verekia's js-stack-from-scratch repo:
Yarn
React
Gulp
Redux
ESLint
Webpack
Mocha
Chai
Flow


The first online typography
PrintBox.io connects an unlimited number of printing equipment into a single network. Clients access the network through a common interface printbox.io , allowing them to print any order in 3 clicks and instantly receive it within walking distance. One of the foundations of the project is the concept of sharing economy, allowing anyone with a printer to join the network.


--- title: Pie Crust author: Tim Abraham slug: pie-crust categories: [] tags: - cooking - food ---
I don’t eat a lot of desserts, so when I get an urge to make a pie, I always make this crust from scratch. This is an incredibly flaky pie crust. It takes a little bit of patience and a lot of butter.
I used to use 1 stick of butter in my pie crusts, but I’ve found that they don’t rollout quite large enough. Plus it’s better to have it be bigger than you need and you can always trim off the leftover. So for this recipe, I start with 1.5 sticks of butter.
I use Challenge butter, which I buy and leave in the freezer just for pies. Precision normally isn’t necessary, but in baking it is. I use a digital kitchen scale to get my weights precise. You can get one for about $10 on amazon.
Weight your ingredients. Take the frozen butter and shred through the shredder attachment on the food processor. It should come out looking something like shredded mozzarella. By hand, combine the flour and shredded frozen butter. Put back in food processor and pulse a few times until the mixture looks like coarse crumbs. Add a pinch of salt. Pour in water and pulse until mixture slightly tightens up. Words only do so much, so check out a youtube video to get a better picture. I like this one.
Transfer mixture to a ziplock bag and start working it with your hands until it turns solid with very little crumbling. You’ll feel like it’s too dry, but keep going. It will come together. If you need to, add a bit of water. It’s better for it to come together than be too dry, but a key to a flaky crust is to keep the water to the minimum.
Get the dough shaped into a flat disc. That will make it easiest when you eventually roll it out.
Pop the dough (which should still be in the ziplock bag, otherwise wrapped in plastic) in the refrigerator for at least 2 hours. This allows the gluten to develop, which holds the crust together. I generally shoot for around 4 hours.
Take the dough out of the refrigerator. At this point it should be very stiff, and that’s not always easy to work with. Let it sit on the counter for about 20 minutes and come closer to room temp. At that point, flour your surface and roll it out with a rolling pin, flipping it as necessary. You’re goal is to get a big circle that will more than fit your pie pan. Again, youtube is your friend with regards to technique.
Once dough is rolled out, use your rolling pin to lift dough off your surface.  Take rolling pin with dough to your pie pan and unroll it. Press dough down along inner circumference. As for the overhanging dough, either fold it back in or trim it off, depending on the look and feel you’re ultimately going for.
Whether you’re going to blind bake or not, chilling the dough after you’ve rolled it out prevents shrinkage. Put it back in the refrigerator for 20 minutes.
Some pies, like my famous banana cream and blueberry pie, require a blind bake. A blind bake is when you bake the crust without any filling, and add the cooked filling right at the end.
To blind bake, poke holes with a fork in the bottom of your crust. Cut a piece of foil or parchment paper and lay it on the crust. Pour something heavy in - I use dried beans but pennies also work (or fancy pie weights, but that’s not necessary).
Bake at 425 for about 12 minutes. Remove pie weights and parchment/tin foil, lower the oven to 375 and continue baking another 10-15 minutes until crust turns golden brown. It will puff up a bit, but don’t worry. It will deflate as it cools.


Dataslinger is a library for transferring data between processes and over a network.
Untested automated builds of an example app that uses Dataslinger are archived below. See the code repo for more details.


/usr/bin/env is a variable that we can control, we have access to the variables in /usr/bin/env
$PATH is one such variable that we can typically control
set $PATH=/tmp:$PATH sets the /tmp folder as the first folder to look for executables in the PATH (run our own verion of 'ls' or 'man' for example instead of those in /bin/ or /usr/bin/)
printenv print all or part of environemnt
env print all exported environment or run a program in a modified environment
set print the name and value of each shell variable


Excited State and Pauli Operators
As you may have guessed, a qubit does more than just sit around in the
\(|0\rangle\) ground state. To put it into the \(|1\rangle\)
excited state, we need a quantum gate. In this section we will
introduce gates, and how to use them in the Composer.
Quantum gates, or operations, are typically represented as matrices. A
gate that acts on one qubit is represented by a
\(2 \times 2\)
unitary matrix.
Since quantum operations must be reversible and preserve probability
amplitudes, the matrices must be unitary. The result of the quantum
gate is found by multiplying the matrix representing the gate with the
vector representing the quantum state.
\(|\psi'\rangle=U|\psi\rangle\) where \(U^\dagger U = 1\)
(\(A^\dagger\) represents the complex conjugation and transpose of any
matrix \(A\)).
A common group of gates, known as the
Pauli
Operators, are
represented by the matrices
The Pauli \(X\) gate is known as an \(X_{\pi}\)-rotation. It takes
\(|0\rangle\rightarrow X|0\rangle=|1\rangle\); in other words,
it flips the zero to a one, or vice versa (this is why it is also
commonly referred to as a bit-flip). Try the Pauli \(X\) gate in the
Composer, using the score file below. Did you find that, unlike in the
example on the previous page, the qubit ended up in the excited
state \(|1\rangle\) with high probability? Like before, any
deviation from the excited state is likely due to decoherence and
imperfect measurements.
In the other examples below, explore what the Pauli Operators do. What
do you get when you try a \(Y\) or \(Z\) gate? Did you find that \(Y\)
gave you an excited state and \(Z\) did not do anything?
Open in composer
Open in composer
Open in composer


Post an ad
Title
Description
Post schedule
Start date
Expiry date
Basic info
Type of ad
For sale
For rent
Type of housing
Nhà riêng
Căn hộ chung cư
Address
Price
billions
millions
Surface area
Upload images
Contacts
Name
Email
Phone
Submit


@(user : Person, joineduser : Person,p : Project)
you have invited @joineduser.name to join @p.name project. However @joineduser.name has declined the invitation.


Khalid Blesses Fans With "Up All Night" Single
Khalid returns with a chilled-out new single.
by Alex ZidelUp All Night
Khalid
Editor Rating: VERY HOTTTTT
User Rating: very hottttt - 100% (1)
What a pleasant way to wake up. El Paso, Texas native Khalid is one of the most popular artists in the world, racking up millions of streams on a daily basis and continually dominating the Billboard Hot 100. This year, the superstar vocalist followed his strong presence in 2017 and 2018 with Free Spirit, an album that took the world by storm once again. With his insanely soothing voice and ability to craft melodies that will stick with you for the remainder of the day, it's no surprise that 21-year-old Khalid has managed to crank out another light banger in "Up All Night."
Much of Khalid's lyrical content is relationship-based but, this time, the young crooner focuses more on his personal life and anxiety, noting that he's got thoughts that keep him "up all night." Teasing the new single all week, the American Teen told fans that he's excited to be able to release this one. "'Up All Night' is a song that I wrote while on tour. It's really special to me and I'm so excited that I am able to share it with my fans so quickly," reportedly said the singer in a statement via Complex.
Listen to the brand new song below and let us know if you're messing with it. Expect even more new vibes from Khalid soon.
Quotable Lyrics:
Doesn't even matter anyway, no
Focused and I'm coping with the pain, yeah, we're
Only getting older by the day, yeah, we're
Only getting older


Just say nothing about myself. :+1:
print("Python dafa is awesome.") Hahaha
Read More →
(This article is part of the Chinese version 在Vultr的VPS上安装支持ZFS的FreeBSD及SMTP问题的解决)
Vultr VPS is good cause thier VPS can be installed FreeBSD. The better thing is it can be installed OS from custom ISO.
I had tried the official FreeBSD 10/x64 image, but there is not ZFS. It had been fail when I tried to resize partition to create a ZPOOL. Fortunately,however, we can also install a FreeBSD from custom ISO.
Read More →
This is my first English blog. Sorry for my Chinglish.
I will talk some technology about my programming work. perhaps others. I am too lazy to create a better blog, like use Jekyll or others. The README.md is good enough for me.
That is all.
Updated: 2014-10-17 I am sorry that the README.md seems not good enough. So I use Jekyll now, but Ruby is not good, I don’t like it.
Read More →


ORFK wrote:Sorry, your browser doesn't support this Web Audio Visualization. Use the newest Google Chrome.
ORFK wrote:i hate features which supports only one browser ;-) and yes i know... html5 is still not finished developed ^^


--- layout: post esbma_id: 1601 title: SourceGear/Teamprise welcomes John O'Neill date: 2006-06-06 16:35:06 keywords: sourcegear ---
I tend to think of myself as a reasonably tactful guy. When I write, I try not to get people completely ticked off at me. It doesn't always work.
Recently when the Guardian published a heavily-edited version of my article about why software has bugs, I got lots of "feedback". Basically, it appears that I got email from everyone in the UK who has ever been frustrated at any software vendor about any bug. All these messages had three basic things in common:
All I could do was try to respond with some measure of empathy.
Actually, getting this sort of "hate mail" is kind of nice. Sort of.
Back at Gnomedex 2003 I had the incredible privilege of going to the speakers dinner. The table that evening included some really well-known writers like Tim O'Reilly and John Dvorak. The #1 thing I remember from that dinner was each of those guys telling stories about their hate mail. I remembering thinking that I must not be a "real writer" yet, because nobody had ever sent me a letter with a salutation of "Dear #+&@*#$ idiot".
(I never did figure out why anybody would send TimO that kind of mail when all his stuff seems so level-headed. But when I heard that Dvorak gets that sort of mail routinely, somehow the world made more sense.)
Anyway, most of my stuff just doesn't generate a lot of negative response.
Well, actually, there are two other examples where people get kind of upset at me:
Prior to the Guardian thing, these two articles were responsible for most of my so-called "hate mail". When I get messages like that, I usually do respond, and I usually try not to get into a big argument.
But the next time somebody emails me about one of these two issues, I will have new evidence to present in my defense! Several weeks ago, we hired a sales guy with a PhD!
I am very pleased to welcome John O'Neill to the management team of our company. John will be serving as CEO of our Teamprise division. For the time being, he will be focusing primarily on sales.
And yes, John has a PhD. He got his doctorate in chemical engineering.  :-)
John is also the Editor and Publisher of Black Gate, a scifi and fantasy magazine.
So obviously, with a PhD in engineering and a weirdo publishing business on the side, John's background is fairly typical for sales executives in the software field. Nothing to see here... :-)
For me, the far more interesting thing about John is that he spent the last 9 years working in the cellular phone division at Motorola. This means that I finally have somebody who can give me an answer to the following question which has been bothering me for years:
Why the &*$# doesn't my cell phone have an alarm clock built in?
I mean, it's not like this would be difficult. The device already has the ability to make loud noises. And it already has a clock. In fact, it would be better than the typical travel alarm clock, because it automatically keeps track of time zone.
In other words, my phone has all the basic capabilities necessary to be a really excellent travel alarm clock, but it's not, and I want to know why.
And before I give John a chance to answer, I would like to preemptively respond to three things he is likely to say:
:-)


I am a member of the Astronomy and Astrophysics group in University College London.
Short introduction
I am interested in the application of emerging technologies in science and in science for creating exciting new technologies. I am fascinated by the emerging computing platforms (GPU, FPGA) and frameworks (CUDA, OpenCL) and their application in accelerating scientific development. Conversely I have a keen interest in the development of novel algorithms and their applications in creating new technologies.
In UCL I work closely with Dr. Filipe Abdalla and Prof. Ofer Lahav on a variety of topics in Large Scale Structure surveys. I co-manage and support the High Performance Computing Cluster in the group. I am a member of the steering committee of the UCL Research Programming Hub. I manage the code-repository for the data analysis of the EUCLID satellite data.
I did my PhD in the Astrophysics Group, Cavendish Laboratory, University of Cambridge with Prof. Michael Hobson and Dr. Mark Ashdown. My thesis was on Bayesian Methods for Astrophysical Data Analysis. Prior to that I did my MSc. in Physics at UCL.
I have a significant interest in the numerical methods and their implementation. I actively participate in Eigen C++ community and the London High Performance Computing Meetup group.
My Research Interests:
- Bayesian inference
- Markov Chain Monte Carlo methods
- Large Scale Structure of the Universe
- Cosmic Microwave Background
- High Performance Computing
- Parallel computing technologies
- Software development in academia


No One is Spending Bitcoin For Fear of the Tax Man
by Christine VasilevaSpending Bitcoin (BTC) may be easy, but mainstream users are avoiding it. There may be one reason – the recent interest of the taxman in digital coins.
Bitcoin Income May Create Taxable Event
Not only US citizens, but also internationals, see the usage of BTC as creating a taxable event. Certainly, the IRS and other entities are not tracking the BTC transactions just yet. However, there are tools to see revenues recognized from crypto-related services.
But there are also doubts that even buying and selling with coins may become taxable, if value was exchanged or services rendered. For most countries, however, an incoming BTC transaction is not counted toward personal or corporate income.
Bitcoin is still not being used for one chief reason – betting on outlandish price appreciation, or even short-term price swings. There is limited options for spending bitcoin on certain luxury goods markets, and other than that, dark market usage is not counted toward the mainstream acceptance of the coin.
Spending BTC is also difficult in periods of increased volatility. In the past month alone, bitcoin price has moved up more than 42% in a day, only to erase the gains and return from $9,400 down to $7,400 in a couple of weeks. For both spenders and merchants, this may discourage usage, especially given the highly distant opportunity of seeing BTC rise to $100,000 or even $1 million and above.
Some countries are stricter than other – Japan, for instance, traces each transaction as a taxable event.
“In Japan as well as the US, tracking every single payment in cryptocurrencies (Bitcoin and others) is required for tax reporting,” Cryptact CEO Amin Azmoudeh said for Longhash.
Fintech Solutions Help Some BTC Deals
As the end of 2019 approaches, liquidating or moving bitcoin now would be listed as a taxable event, at least if fiat changed hands. However, not all gateways are obvious to the taxman, as many deals are performed through OTC platforms and fintech solutions. Because of varying global rules, it is uncertain which services are obliged to report on taxable income. But for instance, apps such as Advcash warn that it is up to the person to make right with tax authorities.
While PayPal has moved away from any involvement with crypto assets, solutions like Alipay and WhatsApp pay also generate turnovers related to crypto deals, and not all are traced.
The weak usage of bitcoin, as well as other coins and tokens promising fast and cheap payments, is also a warning for the eventual launch of Libra, Facebook’s proposed stablecoin. While Litecoin may reach 2.4 billion potential users, the real-use utility will have to compete with fintech apps.
What do you think about BTC spending? Share your thoughts in the comments section below!
Images via Shutterstock
The Rundown


Peer-to-Peer Numeric Computing with JavaScript
Athan Reines / @kgryte
Hi! My name is Athan Reines.
I am here today because I believe that Node.js and, more generally, JavaScript are important new frontiers for numeric computing.
My goal is that, after this talk, when you encounter a compute intensive task, you won't instantly reach for Python or R or Julia or Java or C or Fortran, you will instead leverage a budding ecosystem of numeric computation libraries written in JavaScript, and your Node.js applications will be better because of it.
So without further ado, "Peer-to-Peer Numeric Computing in JavaScript"...this is probably a provocative title, as admittedly this talk will focus primarily on numeric computing given time constraints. Provided we have enough time, I will give a brief peer-to-peer demo, which will hopefully wet your appetite and highlight the immense potential of future Node.js and, more generally, JavaScript applications.
Quick show of hands...
How many people are familiar with numeric computing?
Scientific computing>
How many people know the difference between numeric and scientific computing? ;)
Performed data analysis?
Done anything with WebRTC?
P2P technologies?
Demo of Bloom Filters by Jason Davies.
A Bloom filter is a space-efficient probabilistic data structure that is used to test whether an element is a member of a set.
Demo of DBSCAN (Density-Based Spatial Clustering of Applications with Noise).
Fourier Series: decomposes periodic functions or periodic signals into the sum of a (possibly infinite) set of simple oscillating functions, namely sines and cosines (or complex exponentials).
Rendered using 3Dmol.js . Rendering molecules often requires complex linear algebra, especially when computing surfaces. The molecule on the left is porin , an integral membrane protein, and the molecule on the right is MDM2 , an oncoprotein..
Why JavaScript?
One of the first questions, if not THE first question, I am asked when I tell people that I do much of my data analysis work in JavaScript is: Why JavaScript? Why not X? Why is this environment/platform any more suitable than already established platforms built on Python, R, Julia, etc? Any inherent advantages?
JavaScript is everywhere. Almost everything either already runs or supports running a browser. Distribution is streamlined.
The JavaScript runtime environment is an environment which is under constant pressure to run faster. In other languages, you simply choose a different language if you want to go faster; just kind of accepted. With JavaScript, ain't going to go away anytime soon and don't have the luxury to use some other "faster" language. We see all sorts of optimizations from the compiler on up: code invariant loop motion, dead code elimination, cache inlining, etc. These may happen elsewhere, but I hypothesize with much less fervor.
In-browser analysis
The browser is a powerful IDE.
Easier to scale. Leveraging the client enables less server infrastructure (outsourcing computation).
Data Pipelines
source.pipe( transform ).pipe( transform ).pipe( destination );
$ cat ./data.csv | node ./bin/filter | node ./bin/stats > ./out.txt
Streams API: while nothing inherent to JavaScript itself, its prevalence as a programming pattern facilitates a different way of thinking about problems compared to the procedural paradigms found in MATLAB, etc.
Creating (general purpose) command-line utilities is easy and an accepted practice. Not the case with other environments; e.g., MATLAB, Python, R.
What can you use today ?
What can you use today to get started?
Data structures: arrays, matrices, ndarrays, data-frames.
var matrix = require( 'dstructs-matrix' );
var mat = matrix( [5,2], 'int16' );
/*
[ 0 0
0 0
0 0
0 0
0 0 ]
*/
mat.sset( '1:3,:', 5 );
/*
[ 0 0
5 5
5 5
0 0
0 0 ]
*/
var isUint32Array = require( 'validate.io-uint32array' );
var isPosIntArray = require( 'validate.io-positive-integer-array' );
function foo( x ) {
if ( !isUint32Array( x ) && !isPosIntArray( x ) ) {
throw new TypeError( 'invalid input argument. Value: `'+x+'`.' );
}
...
}
An example using validation modules.
var matrix = require( 'dstructs-matrix' );
var mean = require( 'compute-mean' );
var mat = matrix( [7,3,9,11], [2,2], 'float64' );
/*
[ 7 3
9 11 ]
*/
// Compute the mean across the columns:
var mu = mean( mat, {'dim': 2} );
/*
[ 5
10 ]
*/
Given a matrix, compute the mean...
Statistical distributions.
var randn = require( 'distributions-normal-random' );
// Seed the generator:
randn.seed = 52;
// Generate a matrix of random variates:
var mat = randn( [3,2], {'dtype': 'float64'} );
/*
[ -0.482 0.274
0.725 1.113
0.608 1.050 ]
*/
Seed the generator and generate a matrix of random variates...
Random data generation...
var randc = require( 'rand-color-hexadecimal' );
var hex = randc();
// returns '<color>'; e.g., '474747'
Generate a random hexadecimal color...
var splitStream = require( 'flow-split' );
var mapStream = require( 'flow-map' );
var joinStream = require( 'flow-join' );
function map( value, idx ) {
value = parseFloat( value );
return (value * idx).toString();
}
var sStream = splitStream( {'sep': '/\r?\n/'} );
var jStream = joinStream( {'sep': '\n'} );
var mStream = mapStream( map );
process.stdin
.pipe( sStream )
.pipe( mStream )
.pipe( jStream )
.pipe( process.stdout );
Simple map stream which scales each streamed value...
$ echo -n $'1\n2\n3\n4\n' | flow-map ./transform.js | <stdin>
Also available as CLI tool...
Charts! Built as web components using Polymer.
Canonical datasets like Edgar Anderson's Iris data
lexicons used for sentiment analysis
select census datasets
var toMatrix = require( 'dstructs-to-matrix' );
var iris = require( 'datasets-iris' );
var mat = toMatrix([
iris.setosa.sepal.len,
iris.setosa.sepal.width,
iris.setosa.petal.len,
iris.setosa.petal.width,
iris.versicolor.sepal.len,
iris.versicolor.sepal.width,
iris.versicolor.petal.len,
iris.versicolor.petal.width,
iris.virginica.sepal.len,
iris.virginica.sepal.width,
iris.virginica.petal.len,
iris.virginica.petal.width
]);
Datasets are available as NPM modules.
interactive
preloaded
...work in progress
Preloaded with all the aforementioned goodies. Ongoing...
> 1500 repos
> 1000 are public
>600 published modules
...a lot more to come
Future Work
workflow
modules
documentation
community
Future work...
make module creation as simple as possible
breadth
unified search interface
building a community
All right. So peer-to-peer...
Goal: implement RPC across a peer network to perform numeric computation.
wrtc: native module implementing WebRTC spec for peer connection and data channel apis
simple-peer: api for creating peer connections; provides a streaming interface; webtorrent.io, screencat, friends, and other node.js p2p apps
webrtc-connect: wraps wrtc and simple-peer to create a "createServer" interface, similar to HTTP
multiplex: module to multiplex binary streams
rpc-multistream: uses multiplex to implement a JSON-based RPC protocol
Simple
var server = rpc( methods );
var client = rpc();
client.pipe( server ).pipe( client );
client.on( 'methods', onMethods );
function onMethods( methods ) {
methods.matrix( [0,1,2,3,4,5,6,7,8,9], [5,2], 'int16', onMatrix );
}
function onMatrix( err, matrix ) {
if ( err ) {
throw err;
}
...
}
TCP
Server
var rpc = require( 'rpc-multistream' );
var net = require( 'net' );
var server = rpc( methods );
server.on( 'methods', runAnalysis );
net.createServer( onConnection ).listen( 4242 );
function onConnection( connection ) {
connection.pipe( server ).pipe( connection );
}
TCP
Client
var rpc = require( 'rpc-multistream' );
var net = require( 'net' );
var client = rpc( methods );
client.on( 'methods', runAnalysis );
var connection = net.connect( {'port':4242}, onConnect );
function onConnect() {
connection.pipe( client ).pipe( connection );
}
Peer 1
var rpc = require( 'rpc-multistream' );
var rtcc = require( 'webrtc-connect' );
var server = rpc( methods );
server.on( 'methods', runAnalysis );
rtcc.createServer( onPeer ).listen( 9999, '<IP_ADDRESS>' );
function onPeer( error, peer ) {
if ( error ) {
throw error;
}
peer.pipe( server ).pipe( peer );
}
Peer 2
var rpc = require( 'rpc-multistream' );
var rtcc = require( 'webrtc-connect' );
var client = rpc( methods );
client.on( 'methods', runAnalysis );
rtcc.connect( {'port':9999,'url':'http://<IP_ADDRESS>'}, onPeer );
function onPeer( error, peer ) {
if ( error ) {
throw error;
}
peer.pipe( client ).pipe( peer );
}
If you want to reach out, can find me on Github and Twitter. If you want updates on the project, feel free to send me an email and I will add you to the mailing list.
...and if you want to get involved, help is always appreciated. :)
Intentionally left blank.
Bio
Brief overview of my background...
Was a research scientist in Biological Physics at the University of Oxford and applied machine learning algorithms to biological time series.
Was a data scientist for a London-based company called Decoded, where I helped companies use web technologies to better understand their data.
Was a data scientist/full-stack developer for a San Francisco start-up called Nodeprime, where I applied analysis algorithms to better understand datacenter infrastructure.
Most recently, was a data scientist/full-stack developer at Vurb, another SF startup, where I focused on building data pipelines for user event data
Importantly, while I used various tools like Python, R, MATLAB, etc, for analytics in my previous roles, I also actively applied JavaScript and Node.js to various data problems. It was this experience both in academic research and in industry which has informed my thoughts on how to do numeric computing with JavaScript.
Context
A brief overview of numeric computing...
AWS initially launched in 2006.
open source
web technologies
decoupling computation and consumption
Visualization already happens in the browser. Every solution wants to display D3 and WebGL plots. But every solution which does so requires complex communication logic.
{
"type": "Matrix",
"dtype": "int8",
"shape": [5,2],
"offset": 0,
"strides": [2,1],
"raw": true,
"data": [4,2,13,1,1,8,21,9,9,11]
}
JSON is a first-class citizen. Often in other languages, considerable time is spent marshalling and unmarshalling data from JSON. While JSON is still marshalled/unmarshalled, support for JSON is built-in and 1:1 correspondence between file structure and program structure. Additionally, JSON facilitates different data access patterns. And lastly, JSON is a predominant transport format for the web and almost any API.
Web Technologies
"Natively" supported browser technologies; e.g., WebRTC, WebGL, audio, video, etc. Basically, built-in drivers. Hard to find in other environments.
Straightforward to take a browser app and make it a desktop application.
What could be better?
Seems great; so what is the catch?
Counting things, 64bit IDs which are not strings, money,...
Efficient serialization
GPGPU
Current support is for short SIMD, which is good for games and image processing, but less so for large vectors.
Lightweight threading model (similar to Go), rather than IPC
Allows for more compact syntax (MATLAB)
While most of the time, coding algos in JS should suffice, an compilation target for performance critical code will be awesome to have.


N2 Information
11 px
10
95%
Tree
Nodes
Matrix
Cells
Left-click on a node in the model hierarchy to navigate to that node.
Right-click on a node to collapse/expand it.
Alt-right-click on a node with variables to select which ones to hide.
Note: Right-click in Firefox displays a browser menu. To disable that,
visit about:config and set dom.event.contextmenu.enabled
to true.
Hover over any cell in the matrix to display its connections
as arrows. Click that cell to make those arrows persistent.
| ▲Variable Name▼ | Visible |
|---|


above |
Ch'ien The Creative, Heaven |
|
below |
Ch'ien The Creative, Heaven |
The Creative works sublime success,
Furthering through perseverance.
The movement of heaven is full of power.
Thus the superior man makes himself strong and untiring.
Nine at the beginning means:
Hidden dragon. Do not act.
Nine in the second place means:
Dragon appearing in the field.
It furthers one to see the great man.
Nine in the third place means:
All day long the superior man is creatively active.
At nightfall his mind is beset with cares.
Danger. No blame.
Nine in the fourth place means:
Wavering flight over the depths.
No blame.
Nine in the fifth place means:
Flying dragon in the heavens.
It furthers one to see the great man.
Nine at the top means:
Arrogant dragon will have cause to repent.
When all the lines are nines, it means:
There appears a flight of dragons without heads.
Good fortune.


Get the Party Started.
Celebrate Storm Digital's acquisition
BY ACCENTURE INTERACTIVE!
GO TO ARTICLE
PSSSST. CLICK ANYWHERE :)


Pathanamthitta Travel Guide
Zone: South
Headquarters: Pathanamthitta
Pathanamthitta is a district in the state of Kerala that is famous for its natural beauty, fairs and festivals. A Tour to Pathanamthitta gives you the wonderful chance to view nature at its very best. The vast stretches of forests, the meandering rivers and the rural topography combine to create an irresistible charm.
Best Places to Visit in Pathanamthitta
1. Gavi
One of the most beautiful places in India, Gavi is a small village tucked between tea estates and wide and dense forests. A unique project in itself, the place is a model of eco-tourism site bringing to the world its spellbinding abundance in flora and fauna. Gavi is situated some 14 km away from the famed Periyar Tiger Reserve and is heaven on Earth, quite literally.
2. Perunthenaruvi Waterfall
A natural waterfall with captivating surroundings is situated on the banks of the River Pamba. The fall is 60 to 100 ft deep which pours down on a rocky bed. The place is a favourite picnic spot among locals as well as tourists.
3. Aranmula
Aranmula is a place mainly known for its expert craftsmanship and snake boat race organized on the final day of Onam Festival. The most renowned art of metal mirror of Aranmula Kannadi has its roots originated from this place.


Mental Illness is a big problem and it can happen to anyone. It is time that we erase the stigma that surrounds mental illness and raise awareness for Mental Illness instead.
The organizations below will help allow to contribute and fix this problem:
NAMI, the National Alliance on Mental Illness, is an organization that strives to bring awareness to the seriousness of mental illness and mental health. It educates people and implements public policies for people with mental illnesses. To learn more, click on the image below!
The Mental Health in America organization was founded in 1909 and is one of the is the nation's leading community-based nonprofit dedicated to addressing the needs of those living with mental illness and to promoting the overall mental health of all Americans. Click the picture below to learn more!
The Bring Change 2 Mind organization strives to build more awareness of mental illness. It advocates for conversation about experiences and feelings to break barriers. Click the image to learn more!
 Active Minds empowers students to change the perception about mental health on college campuses. Click the picture below to learn more!


This list is 'current' as of the date of the original blog post: Dec 2018
Disclaimer: I do not mean to single out these companies. These companies were picked because they are usually great at managing security issues. The fact that they wont fix these open redirects shows the enourmous ignorance of the vulnerability class. There are many other companies that have open redirect issues.
Google AppEngine (appengine.google.com)
TLDR: Reflected open redirect in Google AppEngine results.
Status: WONTFIX
Steps to reproduce:
http://appengine.google.com/_ah/logout?continue=http://example.com
Instagram profile link (l.instagram.com/)
TLDR: Reflected open redirect in Instagram profile website link.
Status: WONTFIX
Steps to reproduce:
0. Create a profile.
1. Login using your computer's web browser.
2. Go to settings, and add your link to the website field.
3. Go to public profile and add description link: https://l.instagram.com/?u=http%3A%2F%2Fexample.com%2F&e=[token]
DuckDuckGo (duckduckgo.com)
TLDR: Reflected open redirect on duckduckgo.com.
Status: WONTFIX
Steps to reproduce:
https://duckduckgo.com/l/?kh=-1&uddg=http://example.com
Google search (google.com)
TLDR: Reflected open redirect in Google search results.
Status: WONTFIX
Steps to reproduce:
0. Setup a website
1. Make google index your website
2. Copy the search result link from Google
https://www.google.com/url?sa=t&rct=j&q=&ved=[token]&url=http%3A%2F%2Fexample.com%2F&usg=[token]
3. Change the website content (optional)
LinkedIn (linkedin.com)
TLDR: Reflected open redirect on linkedin.com.
Status: WONTFIX
Steps to reproduce:
0: Create a linkedin account
1: Post a link and copy https://www.linkedin.com/redir/redirect?url=http%3A%2F%2Fexample%2Ecom&urlhash=[token]


Rich Content
Hugo ships with several Built-in Shortcodes for rich content, along with a Privacy Config and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
YouTube Privacy Enhanced Shortcode
Twitter Simple Shortcode
“In addition to being more logical, asymmetry has the advantage that its complete appearance is far more optically effective than symmetry.”
— Graphic Design History (@DesignReviewed) January 17, 2019
— Jan Tschichold pic.twitter.com/gcv7SrhvJb


The Clipboard API enables copy and pasting to/from the clipboard. On iOS this API also allows copying images and URLs.
import { Plugins } from '@capacitor/core';
const { Clipboard } = Plugins;
Clipboard.write({
string: "Hello, Moto"
});
let str = await Clipboard.read({
type: "string"
});
console.log('Got string from clipboard:', str.value);


Why contribute to open source by making pull requests? For me it comes down to two things:
- I want this change made.
- I want to be the one to make this change.
The first one is easier to talk about: I want the software to be better than it is, for my own definition of 'better', and I think this change will make it so. The second motivation is baser and possibly less noble, but no less important. I get warm fuzzies and a sense of personal importance and fulfillment from seeing my name in a commit message. If I wanted a change made but wasn't especially interested in making that change myself, I might choose to do nothing and wait or complain on the issue tracker until someone else does something about it. This is irritating at best and actively harmful to a maintainer's mental health at worst. Your motivations may be completely different from mine, and I don't think it really matters, as long as the end result is better software.
So what does it mean to contribute? I've come up with a personal taxonomy of pull request types that I'd love to share with you.


Richmond hotel worker wins $1 million Lotto prize
Richmond News
by Alan CampbellWhen Marlon Coronado turned up at his wife’s north Richmond office unexpectedly on Thursday lunchtime and asked to speak to her privately outside, she feared the worst.
But Ronalyn Coronado’s concerns that something bad had happened to their 13-year-old daughter evaporated the second her husband pulled out a lottery ticket and scanned it against an app on his phone.
The message on the phone read, “You’ve won $1 million and a free play.”
“I couldn’t believe it,” said 38-year-old Ronalyn.
“I went back into the office and asked my manager if I could have a half day. I just said it was a family emergency. I almost cried, but it was too surreal.”
Marlon, who celebrated his 36th birthday on Tuesday, won BCLC’s Lotto 6/49 $1 million Guaranteed Prize Draw on Wednesday.
“Of course, I’m very happy,” he told the Richmond News on Thursday afternoon.
“But I have to keep my blood pressure down, as I’m diabetic.”
Marlon, who works as a night audit at a local hotel, said he only checked the ticket on the app around 1 p.m. today, while at home alone, with the family dog, Martial.
“I checked the barcode several times. I did cry a bit,” he added.
“I calmed myself down and went to the car to drive to my wife’s office nearby on Viking Way.”
The couple, originally from the Philippines, are going to stash their $1 million into a savings account for now, to give them time to process the win.
But a trip back home to see Ronalyn’s sick dad is high on the agenda, as well as buying a family home in Richmond.


{% import "macros.html" as macros -%}
{{ overall_record.rounds_won }} : {{ overall_record.rounds_lost }}
| Season | MMR | Percentile | Skill Group |
|---|---|---|---|
| {{ season_id }} | {{ season_player.mmr|int }} | {{ macros.percentile_estimate(season_player, 6) }} | {{ season_player.skill_group }} |
| Overall | {{ player.mmr|int }} | {{ macros.percentile_estimate(player, 6) }} | {{ player.skill_group }} |
| Season | MVP | KPR | DPR | ADR | KAS | Impact |
|---|---|---|---|---|---|---|
| {{ season_id }} | {{ season_rating.mvp_rating }} | {{ season_rating.kill_rating }} | {{ season_rating.death_rating }} | {{ season_rating.damage_rating }} | {{ season_rating.kas_rating }} | {{ season_rating.impact_rating }} |
| Overall | {{ overall_rating.mvp_rating }} | {{ overall_rating.kill_rating }} | {{ overall_rating.death_rating }} | {{ overall_rating.damage_rating }} | {{ overall_rating.kas_rating }} | {{ overall_rating.impact_rating }} |


The purpose of jQuery is to make it much easier to use JavaScript on your website.
jQuery is a lightweight, "write less, do more", JavaScript library.
jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code.
jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation.
The jQuery library contains the following features :
- HTML/DOM manipulation
- CSS manipulation
- HTML event methods
- Effects and animations
- AJAX
- Utilities
There are lots of other JavaScript frameworks out there, but jQuery seems to be the most popular, and also the most extendable.
Many of the biggest companies on the Web use jQuery, such as :
- Google
- Microsoft
- IBM
- Netflix
The jQuery syntax is tailor-made for selecting HTML elements and performing some action on the element(s).
Basic syntax is :
$(selector).action()
- A $ sign to define/access jQuery
- A (selector) to "query (or find)" HTML elements
- A jQery action() to be performed on the element(s)
Exemples :
$(this).hide() // hides the current element
jQuery selectors allow you to select and manipulate HTML element(s).
jQuery selectors are used to "find" (or select) HTML elements based on their name, id, classes, types, attributes, values of attributes and much more. It's based on the existing CSS Selectors, and in addition, it has some own custom selectors.
All selectors in jQuery start with the dollar sign and parentheses :
$()
When a user clicks on a button, all p elements will be hidden :
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});
All the different visitors' actions that a web page can respond to are called events.
An event represents the precise moment when something happens.
Examples :
- moving a mouse over an element
- selecting a radio button
- clicking on an element
Example
$("p").dblclick(function(){
$(this).hide();
});


Showing {{ pull.changed_files | pluralize:'changed file' }} with {{ pull.additions | pluralize:'addition' }} and {{ pull.deletions | pluralize:'deletion' }}


Sindh govt lifts ban on issuance of arm licenses | Pakistan - Geo.tv
by APPKARACHI: The ban on issuance of arm licenses in Sindh has been lifted by the provincial government, according to a notification.
The notification was issued in this regard by the Provincial Home Department.
As per the notification, the monthly quota of the approving authorities as prescribed under Rule-4.1 of the Sindh Arms Rules-2018 was restored.
It further added that only computerised arms licenses of Non-Prohibited Bore (NPB) would be issued as per the prescribed monthly quota and subject to the fulfillment of all requirements as laid down in the Sindh Arms Act-2013 and the Sindh Arms Rules-2018.


My first github pages website
I think that I should go to the bed and record my life today
good night rowan :)


A tool for reviewing data from Zooniverse transcription projects.
View the app directory to see the project in action.


Return Home
In 'Safer' and 'Safest' mode the video will be blocked, only the mp4 file needs to be allowed which is not a script. The video is deleted from the servers encrypted disk when it is fully buffered or if you close this page.


#include <joint3d.h>
Inheritance diagram for Joint3DNode:
Public Member Functions | |
| Int | GetClassID () |
| Returns Object3D class id. | |
Static Public Member Functions | |
| static ObjRef< Joint3DNode > | New () |
| Creates new Joint3DNode. | |
| static ObjRef< Joint3DNode > | New (Render3D *render_) |
| Creates new Joint3DNode. | |
Public Attributes | |
| vector< Joint > | joints |
| List of joints. | |
Protected Member Functions | |
| Joint3DNode () | |
| Default constructor. | |
| Joint3DNode (Render3D *render_) | |
| Constructor with given render pointer value. | |
| ~Joint3DNode () | |
| Destructor. |
These joints are used by linking another nodes to this.
|
|
Constructor with given render pointer value.
|
|
|
Returns Object3D class id.
Reimplemented from Object3D. |
|
|
Creates new Joint3DNode. Call this function instead constructor calling.
Reimplemented from Object3D. |
|
|
Creates new Joint3DNode. Call this function instead constructor calling.
Reimplemented from Object3D. |


Imagine walking into a crowded, noisy restaurant -
Well, these are still quarantine times, so this type of scenario is less common, but presumably, when life returns to normal, such a scenario could occur.
You sit across the table from your friend. It’s noisy, with many other conversations going on around you, making it difficult to hear what she is saying.
The Cocktail Party Effect is the “ability for people to focus their auditory attention on one source,”1 whether that be a friend at a party, or a waiter in a restaurant. Humans, in general, are able to listen to mixed audio from many sources, and hone their focus on individual audio sources.
However, this ability is not perfect: a listener may not necessarily pick up words and sounds only from the speaker of interest. The ability to “tune in” to a single voice is highly dependent on a number of features, including speaker pitch, location, rate of speech, and the listener’s hearing capability. If a person only has one functional ear, or is hard of hearing, focusing on a single voice can be very difficult: with only one ear, it is difficult to determine locality of the speaker, and when hard of hearing, all sounds come through with limited fidelity.
So what if there was a way that we could make a device that could ‘tune out’ conflicting voices, listening only to the speaker of interest? Such a device would not only have to separate voices from a mixture, but also do it in a semi-real time fashion in order for it to be useful for day-to-day usage.
Let’s start by looking into ways to accomplish voice separation.
The traditional way to separate voices from a mixture is Blind Source Separation (BSS). “Blind” refers to the fact that the process by which the voices were mixed is unknown. BSS algorithms assume properties of the signal sources and the mixing processes, and then they use those assumptions to try to reconstruct the original audio.
One such algorithm is Independent Component Analysis, which requires that there are at least as many microphones as there are voices in the mixture, and relies on the assumption that the signals are non-Gaussian and independent.
The necessity for multiple microphones makes this algorithm particularly tricky, as the location of the mics and the hardware they are connected to can introduce phase delays that prevent the final audio samples from aligning properly.
Let us try an example of ICA to demonstrate this.
Microphones 1 and 2:
Recovered Sources:
Evidently, not much unmixing was done.
Artificial Neural Networks, or also referred to as neural networks, have proven to be very useful in a wide variety of tasks, including source separation. Neural networks, using large amounts of training data, can capture complex relationships that can be used for inference. In the case of source separation, a neural network can characterize how much of each audio slice belongs to each speaker.
Neural networks are not limited in the same way that BSS methods like ICA are: so long as the training data are representative of the testing data, there are fewer limitations on the properties of the original sources or the mixture.
Aside: Spectrograms
A commonly used tool in the field of audio processing is the spectrogram, which is a 2D representation of an audio signal, generated using a Short Time Fourier Transform (STFT) with frequencies on one axis and time on the other. The color of each ‘pixel’ represents the intensity of a frequency at any given time. This transform allows us to see the individual frequency components of an sound clip. Conventional wisdom always said that spectrograms are vital tools for source separation, as intuitively, separating the frequencies should assist with the separation process.
However, in recent literature, it was found that neural networks could achieve very accurate results without performing the time-consuming STFT operation and its inverse.
We are using the Convolutional Time Domain Audio Separation Network (Conv-TasNet)2 architecture, which is a network that operates solely in the time domain (see the appendix for more details), but is still able to produce relatively accurate results. We chose this network because we found it to be a fast neural network archictecture that still produced good results: lower latency of this network makes it more amenable to real time separation, even if the network does not achieve state of the art results.
Let’s look at an example of a Conv-TasNet separating audio.
First, the raw audio:
Next, we mix the two audio sources together:
Finally, we can run the audio through the network and generate two mixtures:
The unmixed audio sounds very close to the original, save for some small artifacts in the left estimation when the speaker says the word “question” (headphones make it easier to hear this artifact). These high accuracy estimations show great promise for creating a source separation system using Conv-TasNet.
A large focus in using deep learning for audio source separation lies in achieving the highest accuracy reconstructions. Separation is performed on machines with very powerful graphics cards, and the audio reconstructions are computed very quickly. However, in the field, it is not reasonable to expect that such a computer would be readily available.
The trade-off then becomes one of latency and computational speed: a more powerful computer is faster, but is impractical for deployment; a less powerful computer is slower, but more faithful to what would be available in the field.
We chose to focus on deploying a source separation pipeline to the Nvidia Jetson Nano, a single board computer which offers a compromise between computational power and portability. The Jetson Nano is similar to other single board computers like the Raspberry Pi, except it comes with a more powerful on-board GPU that gives it an advantage when performing deep learning computations.
In many fields, real-time performance is a very difficult task, requiring each part of the input pipeline to be optimized to minimize latency. In the case of Conv-TasNet, the network relies on contextual data to perform separation, meaning it must operate on chunks of audio data. This means that even if the network performed inference instantaneously, there would still be a time delay of the chunk size at the output. Moreover, if the neural network cannot process the input audio faster than it is coming in, the latency will accumulate for every chunk and result in completely non-synced output. In essence, this becomes a producer-consumer problem.
Some options for alleviating these issues include:
As of now, we have implemented a multithreaded python program which is able to chunk the data and process it through the neural network. We leverage multiple cores to parallelize audio collection and separation.
however, the program has a reconstruction error that results in choppy sounding audio. The effects of this reconstruction error can be mitigated by increasing the chunk size, but that in turn increases latency.
On the one hand, we plan on investigating traditional reconstruction techniques to see if we can mitigate the choppiness. On the other, we also plan on training a neural network on data of the same length as our chosen chunk size, so that the training data is representative of our testing conditions.
In order to decrease latency, we are looking into the ONNX standard and TensorRT, which should better optimize the neural network for fast compuation.
Conv-TasNet has three stages: an encoder, a “separation module” which forms the masks, and a decoder. For starters, the encoder convolves the mixture waveform with a number of filters (512 in the original authors’ implementation).
Moving onto the separation module, we note that it is the \(T \times \text{enc_dim}\) encoding that is being masked, not the \(T \times 1\) signal, making it somewhat unconventional to call these masks “masks”. As for how the masks are created, depthwise separable convolutions are used to form one \(T \times \text{enc_dim}\) mask for each source, and the convolutions use exponentially increasing dilation factors to detect both short-term and long-term dependencies.
Lastly, the decoder performs a transposed convolution on each masked encoding, resulting in the separated sources, each with the same shape as the mixture waveform.
As for training, Conv-TasNet’s objective is to maximize the scale-invariant signal-to-distortion ratio for each training example.


KONSTPykTIVE D3S1GN - UNDER KOHCTPYKCiONE
Home
|
Photography
|
Bookmarks
|
Protocol
|
Contact
|
About
Photography
RARE EUROPEAN COAT OF ARMS


|
Select file to run: Or write QML to textbox and |
Application control: Performance (draw 1000 frames): Synchronic: Asynchronic: General statistics (trust or don't): average N fps, N frames, last frame: N ms/N fps Debugging and development: Rendering Backend: |


7. The Language Specification - Arithmetic¶
This is the first glimpse in the specification you are getting of multi-use functions. They will be organized as subsections under each section. Each subsection will be labelled by the type of arguments it receives. Here are the possible types of arguments:
Integer: An integer
Number: An integer or floating point decimal
String: A string of characters
List: A list of arbitrary elements
Set: A Python Set
Sequence: A list, tuple, or string
Any: Anything
The arguments will be abbreviated .
7.1. “+” - Addition¶
Arity: 2
7.1.1. Num a, Num b: Addition¶
This simply returns the sum of the two numbers.
Ex:
==================================================
+2 2
==================================================
Pprint("\n",plus(2,(2)))
==================================================
4
7.1.2. Seq a, Any b: Concatenation¶
If the b is also a sequence of the same type as a, it returns the concatenation of the two sequences.
Ex:
==================================================
+"Hello"" World!
==================================================
Pprint("\n",plus("Hello"," World!"))
==================================================
Hello World!
But if b is not a sequence of the same type as a, a one-element sequence of the same type as a containing only b will be concatenated to a.
Ex:
==================================================
+[1 2 3)4
==================================================
Pprint("\n",plus(Plist(1,(2),(3)),4))
==================================================
[1, 2, 3, 4]
7.2. “*” - Multiplication¶
Arity: 2
7.2.1. Num a, Num b: Multiplication¶
This returns the product of the two numbers.
Ex:
==================================================
*2T
==================================================
Pprint("\n",times(2,T))
==================================================
20
7.2.2. Seq a, Int b: Repetition¶
This function repeats sequence a, b times. This is the same as repetition in Python.
Ex:
==================================================
*"abc"5
==================================================
Pprint("\n",times("abc",5))
==================================================
abcabcabcabcabc
7.2.3. Seq a, Seq b: Cartesian Product¶
Calculates the Cartesian Product of the two sequences. They have to be of the same type. This means that it generates all the possible ways that you can select one value from both sequences.
Ex:
==================================================
*"abc" "123"
==================================================
Pprint("\n",times("abc",("123")))
==================================================
[('a', '1'), ('a', '2'), ('a', '3'), ('b', '1'), ('b', '2'), ('b', '3'), ('c', '1'), ('c', '2'), ('c', '3')]
7.3. “-” - Subtraction¶
Arity: 2
7.3.1. Num a, Num b: Subtraction¶
Computes the difference of a from b.
Ex:
==================================================
-T4
==================================================
Pprint("\n",minus(T,4))
==================================================
6
7.3.2. Set a, Set b: Setwise Difference¶
Computes the setwise difference of a from b. This means it returns a set with the elements in set a that are not in set b. It preserves the order of set a.
Ex:
==================================================
-{[1 2 3){2
==================================================
Pprint("\n",minus(Pset(Plist(1,(2),(3))),Pset(2)))
==================================================
{1, 3}
7.4. “/” - Division¶
Arity: 2
7.4.1. Num a, Num b: Division¶
Returns a divided by b. Uses integer division which means it truncates the fractional part of the answer.
Ex:
==================================================
/T4
==================================================
Pprint("\n",div(T,4))
==================================================
2
7.4.2. Seq a, any b: Count Occurrences¶
Returns the number of times element b appeared in sequence a.
Ex:
==================================================
/[1 2 3 2 5)2
==================================================
Pprint("\n",div(Plist(1,(2),(3),(2),(5)),2))
==================================================
2
7.5. “%” - Modulus¶
Arity: 2
7.5.1. Num a, Num b: Modulus¶
Returns the remainder when a is integer divided by b.
Ex:
==================================================
%T3
==================================================
Pprint("\n",mod(T,3))
==================================================
1
7.5.2. String a, Any b: String Formatting¶
This applies Python’s string formatting that normally occurs with %. Requires %s or any of th other within the string,, just like in Python.
Ex:
==================================================
%"a: %d"2
==================================================
Pprint("\n",mod("a: %d",2))
==================================================
a: 2
7.5.3. Int a, Seq b: Extended Slicing¶
Pyth’s slicing operator does not support extended slicing, so this operator has the effect of doing b[::a]. This means that it will pick every a elements of b.
Ex:
==================================================
%2"Hello
==================================================
Pprint("\n",mod(2,"Hello"))
==================================================
Hlo
7.6. “^” - Exponentiation¶
Arity: 2
7.6.1. Num a, Num b: Exponentiation¶
This raises the a to the power of b. Like Python, it allows rational exponents.
Ex:
==================================================
^4 2
==================================================
Pprint("\n",Ppow(4,(2)))
==================================================
16
7.6.2. Seq a, Int b: Cartesian Product With Repeats¶
Finds the Cartesian Product of b copies of sequence a. This means that it finds all possible sequences with length b that contain only elements from sequence a.
Ex:
==================================================
^"abc"3
==================================================
Pprint("\n",Ppow("abc",3))
==================================================
['aaa', 'aab', 'aac', 'aba', 'abb', 'abc', 'aca', 'acb', 'acc', 'baa', 'bab', 'bac', 'bba', 'bbb', 'bbc', 'bca', 'bcb', 'bcc', 'caa', 'cab', 'cac', 'cba', 'cbb', 'cbc', 'cca', 'ccb', 'ccc']
7.7. “_” - Unary Negation¶
Arity: 1
7.7.1. Num a: Negation¶
Returns the additive inverse of a or -a. There are no negative number literals in Pyth, this is how you define negatives in Pyth.
Ex:
==================================================
_25
==================================================
Pprint("\n",neg(25))
==================================================
-25
7.7.2. Seq a: Reversal¶
Returns a in reversed order. This is equivalent to the alien smiley face, [::-1] in Python.
Ex:
==================================================
_"abc"
==================================================
Pprint("\n",neg("abc"))
==================================================
cba
7.8. “~” - Addition Augmented Assignment¶
Arity: 2
This is the only augmented assignment operator Pyth has. It applies the + operator to the two elements and then sets the first one to the the result. This is analogous to += in Python.
Ex:
==================================================
~Y]5Y
==================================================
Y+=[5]
Pprint("\n",Y)
==================================================
[5]
7.9. “& - Logical And¶
Arity: 2
This the logical and operator. It returns a truthy value of the type if both of the values are truthy and a falsey otherwise otherwise. The specifics of which value is returned is the same as Python.
Ex:
==================================================
&Z1&1T
==================================================
Pprint("\n",(Z and 1))
Pprint("\n",(1 and T))
==================================================
0
10
7.10. “|” - Logical Or¶
Arity: 2
This is the logical or operator. It returns a truthy value of the type if either or them are truthy and a falsey value if both are falsey. Like the & operator, the specifics of the returned values are the same as in Python.
Ex:
==================================================
|Z1|ZZ
==================================================
Pprint("\n",(Z or 1))
Pprint("\n",(Z or Z))
==================================================
1
0
7.11. “P” - Prime Factorization¶
Arity: 1
7.11.1. Int a: Prime Factorization¶
Returns the prime factorization of a. Returns it as a list and multiplicities are just repeated.
Ex:
==================================================
P12
==================================================
Pprint("\n",primes_upper(12))
==================================================
[2, 2, 3]
7.11.2. Seq a: All But Last¶
Returns all but the last element of a. This is equivalent to the Python [:-1]
Ex:
==================================================
P"abc"
==================================================
Pprint("\n",primes_upper("abc"))
==================================================
ab


Bullets, Bold and Italics¶
Bold text can be show with Bold Text, Italics with Italic text. Bullets like so:
Bullet 1
Bullet 2
Numbered Bullet 1
Numbered Bullet 2
Notes¶
A note can be used to describe something not in the normal flow of the paragraph. This is an example of a note.
Note
Using git commit after adding your files saves a “Snapshot” of them, so it’s very hard to lose your work if you commit often.
Code Blocks¶
This paragraph describes how to do Console Commands. When showing VPP commands it is recommended that the command be executed from the linux console as shown. The Highlighting in the final documents shows up nicely this way.
$ sudo bash
# vppctl show interface
Name Idx State Counter Count
TenGigabitEthernet86/0/0 1 up rx packets 6569213
rx bytes<PHONE_NUMBER>
tx packets 50384
tx bytes 3329279
TenGigabitEthernet86/0/1 2 down
VirtualEthernet0/0/0 3 up rx packets 50384
rx bytes 3329279
tx packets 6569213
tx bytes<PHONE_NUMBER>
drops 1498
local0 0 down
#
The code-block construct is also used for code samples. The following shows how to include a block of “C” code.
#include <vlib/unix/unix.h>
abf_policy_t *
abf_policy_get (u32 index)
{
return (pool_elt_at_index (abf_policy_pool, index));
}
Diffs are generated in the final docs nicely with “::” at the end of the description like so:
diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c
index 6e136e19..69189c93 100644
--- a/src/vpp/vnet/main.c
+++ b/src/vpp/vnet/main.c
@@ -18,6 +18,8 @@
#include <vlib/unix/unix.h>
#include <vnet/plugin/plugin.h>
#include <vnet/ethernet/ethernet.h>
+#include <vnet/ip/ip4_packet.h>
+#include <vnet/ip/format.h>
#include <vpp/app/version.h>
#include <vpp/api/vpe_msg_enum.h>
#include <limits.h>
@@ -400,6 +402,63 @@ VLIB_CLI_COMMAND (test_crash_command, static) = {
#endif


@import url('https://fonts.googleapis.com/css2?family=Jomhuria&display=swap');
Course Code |
Course Name |
Quiz Assigned |
|---|---|---|
| CS348 | Advanced Computer Network | |
| CS304 | Compiler Design | |
| CS352 | Data Mining | |
| CS345 | Web Tchnology | |
| IB323 | Security Intelligence | |
| IB321 | DBMS | |
| CS341 | Operating System | |


Community Initiatives
Sub-categories: Licensing,
Metadata & Ontologies
Started: 2017
Founded by: Jisc, The
University of Glasgow, and CREATe
Current URL:
https://datasetlicencing.wordpress.com/
Goals: Provide licensing
support and guidance for data creators and users (Jisc, CREATe,
& The University of Glasgow, 2017). Use insights gained from
the Datasets Licensing Project to inform future efforts for the Jisc
Research Data Shared Service (Jisc, 2018).
Status:
Sub-categories: Informational
Resource, Licensing, Metadata & Ontologies
Started: 2014
Founded by: Digital Curation
Centre
Current URL:
http://www.dcc.ac.uk/resources/how-guides/license-research-data
Goals: Develop a guide for
licensing research data, including information on why to license
research data, licensing concepts, prepared licenses, bespoke licenses,
standard licenses, multiple licensing, mechanisms for licensing data,
and licensing-related information (Ball, 2014).
Status:
Sub-categories: Informational
Resource, Metadata & Ontologies
Started: 2009
Founded by: University of
Oxford and the Oxford e-Research Centre
Current URL:
https://fairsharing.org/
Goals: Provide a comprehensive information resource to guide
researchers toward increasing data sharing and supporting reproducible
research through providing recommendations, collections, and
educational resources about data sharing policies, standards, and
databases.
Status:
Sub-categories: Rights,
Licensing, Metadata & Ontologies
Started: 2013
Founded by: European
Commission, the US National Science Foundation (NSF), and the
Australian Government’s Department of Innovation (The Research Data
Alliance, 2017).
Current URL:
https://www.rd-alliance.org/
Goals: Facilitate data re-use
through the development of interest groups and working groups that
collaborate to develop outputs such as policies, recommendations,
standards, codes, and best practices (Research Data Alliance, 2017c).
Status:
Sub-categories: Informational
Resource, licensing
Started: 2017
Founded by: The Federal
Demonstration Partnership
Current URL:
http://thefdp.org/default/committees/research-compliance/data-stewardship
Goals: The broad goal of the Federal Demonstration Partnership
(FDP), a cooperative effort among 10 United States federal agencies and
154 institutional federal funding recipients, is to mitigate
administrative loads related to research grants and contracts (The
Federal Demonstration Partnership, 2018). As it relates to data
stewardship, the FDP has conducted a Data Transfer and Use Agreement
pilot towards the creation of data transfer and use agreement templates
(The Federal Demonstration Partnership, 2018). These templates were
developed to reduce the complex and time-consuming process of crafting
individualized data transfer and use agreements for each research
collaboration.
Status:
Sub-categories: Informational
Resource, Licensing
Started: 2017
Founded by: National Center
for Advancing Translational Sciences (NCATS) Biomedical Data Translator
and the Monarch Initiative (The Reusable Data Project, 2017).
Current URL: http://reusabledata.org/
Goals: To facilitate legal
interoperability through conversation about accessibility,
comprehension, clarify, and licensing decisions that affect data
sharing within the scientific community. (The Reusable Data Project,
2017). Evaluate biological and biomedical data sources for their data
reusability and redistribution potential.
Status:


| TestBasic | ||
| open | chrome://selenium-ide/content/tests/functional/startRecording.html | |
| open | chrome://selenium-ide/content/tests/functional/aut/search.html | |
| clickAndWait | //img[contains(@src,'chrome://selenium-ide/content/selenium/selenium-logo.png')] | |
| pause | 500 | |
| clickAndWait | //img[@alt='Selenium logo'] | |
| clickAndWait | //img[@title='Selenium logo (title)'] | |
| clickAndWait | link=link with onclick attribute | |
| click | tab1 | |
| click | tab2 | |
| type | q | hello |
| type | comment | hello next line another line |
| select | num | label=20 |
| clickAndWait | search | |
| open | chrome://selenium-ide/content/tests/functional/verifyCommands.html#TestBasic.html | |
| waitForText | result | regexp:.+ |
| assertText | result | Success |


Police investigate 'suspicious situation' on board plane at Amsterdam Airport Schiphol
by Theresa Seiger, Cox Media Group National Content DeskAMSTERDAM -
Authorities in the Netherlands responded to reports Wednesday of a "suspicious situation" on board a plane at Amsterdam Airport Schiphol, according to airport officials.
Police said in a post on Twitter that passengers and crew members on the plane involved in the incident were safe.
According to BBC News, the incident was classified a GRIP-3 situation, meaning it was "an incident or serious event with major consequences to a local population."
Additional details were not immediately available.
Check back for updates to this developing story.


Sea Otter
enhydra lutris
This is the information about sea otters. They are endagered and need savings. This is the third sentence.
Donate now →
0
of
0
animals encountered


Altos de Chavon is a re-creation of a Mediterranean style European village located atop the Chavon River in La Romana, Dominican Republic. It is the most popular attraction in the city and hosts a cultural center, an archeological museum, and an amphitheater. The project was conceived by the Italian architect Roberto Copa, and the industrialist Charles Bluhdorn.
Casa de Campo is the biggest resort in the Carribean. For more information visit www.casadecampo.com.do.


---
layout: post
title: 9/17 progress
date: '2013-09-17T22:03:00.002-06:00'
author: Jacob .
tags:
- progress-reports
modified_time: '2013-09-17T22:03:59.546-06:00'
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-2842635110885553574
blogger_orig_url: http://www.svlark.com/2013/09/917-progress.html
---
OK, OK, back to the routine. I always seem to lose the rhythm when we have guests. Anyway, I can't put down TSOS. It's a page turner. I've learned lots about anchors and windvanes and steering with the rig, and cooking fuel and heads and stuff like that. Great stuff!
With all the canyons being closed due to floods, as well as Audrey's homeschool supplemental program down in Boulder, and our sitter for the Tuesday and Thursday sessions having been traumatized by having had to evacuate her house, remote first aid is not happening this week. We'll have to sign up for the next session.


Some short related text goes here. From booking tools to travel management to back-office support, we have a bouquet of world-class standards-compliant travel technology tools
Some short related text goes here. From booking tools to travel management to back-office support, we have a bouquet of world-class standards-compliant travel technology tools
Some short related text goes here. From booking tools to travel management to back-office support, we have a bouquet of world-class standards-compliant travel technology tools
Some short related text goes here. From booking tools to travel management to back-office support, we have a bouquet of world-class standards-compliant travel technology tools