h - Move left
j - Move down
k - Move up
l - Move right
$ - Move to end of line
0 - Move to beginning of line (including whitespace)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.0 FATAL_ERROR) | |
project(cpp_shim) | |
set(CMAKE_PREFIX_PATH ../libtorch) | |
find_package(Torch REQUIRED) | |
find_package(OpenCV REQUIRED) | |
add_executable(testing main.cpp) | |
message(STATUS "OpenCV library status:") | |
message(STATUS " config: ${OpenCV_DIR}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from awsglue.transforms import * | |
from awsglue.utils import getResolvedOptions | |
from pyspark.context import SparkContext | |
from awsglue.context import GlueContext | |
from awsglue.dynamicframe import DynamicFrame | |
from awsglue.job import Job | |
args = getResolvedOptions(sys.argv, ['JOB_NAME']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Hive/Pig/Cascading/Scalding-style inner join which will perform a map-side/replicated/broadcast | |
* join if the "small" relation has fewer than maxNumRows, and a reduce-side join otherwise. | |
* @param big the large relation | |
* @param small the small relation | |
* @maxNumRows the maximum number of rows that the small relation can have to be a | |
* candidate for a map-side/replicated/broadcast join | |
* @return a joined RDD with a common key and a tuple of values from the two | |
* relations (the big relation value first, followed by the small one) | |
*/ | |
private def optimizedInnerJoin[A : ClassTag, B : ClassTag, C : ClassTag] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@asyncio.coroutine | |
def do_select(pool, i): | |
with (yield from pool) as conn: | |
cur = yield from conn.cursor() | |
yield from cur.execute("SELECT 10") | |
yield from cur.close() | |
@asyncio.coroutine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import injections | |
import aiopg.sa | |
from aiohttp import web | |
@injections.has | |
class SiteHandler: | |
# this is only place holder, actual connection |
- Update HISTORY.rst
- Update version number in
my_project/__init__.py
- Update version number in
setup.py
- Install the package again for local development, but with the new version number:
python setup.py develop
- Run the tests:
python setup.py test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
exp ::= term | exp + term | exp - term | |
term ::= factor | factor * term | factor / term | |
factor ::= number | ( exp ) | |
""" | |
class Calculator(): | |
def __init__(self, tokens): | |
self._tokens = tokens | |
self._current = tokens[0] |
MergeSort is a recursive sorting algorithm that uses O(n log n)
comparisons in the worst case. To sort an array of n elements, we perform the following three steps in sequence:
- Divide the unsorted list into two sublists of about half the size
- Sort each of the two sublists
- Merge the two sorted sublists back into one sorted list.
There are two merge sort implementations: top-down (uses recursion) and bottom-up. Last one is more efficient and popular.
NewerOlder