Enter this in the search box along with your search terms:
Get all gists for the user.
user:username
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
from uuid import UUID | |
def is_valid_uuid4(uuid_to_test): | |
""" | |
Check if uuid_to_test is a valid UUID, version 4. | |
Args: | |
uuid_to_test : str |
Enter this in the search box along with your search terms:
Get all gists for the user.
user:username
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
""" | |
Consider the case of reusing the setUp() of a some base class that derives from | |
unittest.TestCase. | |
class BaseTest(unittest.TestCase): | |
def setUp(self): | |
super().setUp() | |
print('BaseTest setUp') | |
def testCommon(self): |
#lang racket | |
; lecture 1B | |
(define (square x) (* x x)) | |
;1.45 | |
(define (sos x y) | |
(+ (square x) (square y))) | |
;~14.10 Iterative model (even though it'd done recursively) |
pinentry
is a secure PinEntry dialog.
Install pinentry for Mac
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
$ brew install pinentry
[alias] | |
ch = checkout | |
br = branch | |
st = status | |
############# | |
brm = branch --merged | |
brnm = branch --no-merged | |
############# | |
lsf = "!git ls-files | grep -i" |
Python styles guide, and examples of common python idioms and patterns:
""" | |
For complete problem definition, see: https://www.hackerrank.com/challenges/merge-two-sorted-linked-lists | |
Merge two linked lists | |
head could be None as well for empty list | |
Node is defined as | |
class Node(object): | |
def __init__(self, data=None, next_node=None): |
/* | |
Iterative solution to : https://www.hackerrank.com/challenges/merge-two-sorted-linked-lists/ | |
Merge two sorted lists A and B as one linked list | |
Node is defined as | |
struct Node | |
{ | |
int data; | |
struct Node *next; | |
} |
/* | |
For problem description, see : http://www.geeksforgeeks.org/search-an-element-in-a-sorted-and-pivoted-array/ | |
This solution handles duplicate entries. | |
161223 | |
In a rotated array with increasing elements, one-half is always in order. | |
In a rotated array with non-decreasing elements: | |
- both sides cannot be out of order. | |
- one or both sides must be in order. | |