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
|
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
UP=3 | |
LEFT=2 | |
DOWN=1 | |
RIGHT=0 | |
DIRS = [(0,1),(1,0),(0,-1),(-1,0)] | |
def spiral_copy(inputMatrix): |
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
class Solution: | |
# you need startIdx for this prob | |
def countVowelStrings(self, n: int) -> int: | |
vowels = ['a','e','i','o','u'] | |
result=[] | |
def cvs(curr,n,startIdx): | |
if n==1: | |
result.append(curr) | |
return 1 |
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
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
import functools | |
# | |
# Complete the 'passwordCracker' function below. |
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
|
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
#include <stdio.h> | |
/* random record description - could be anything */ | |
struct rec | |
{ | |
int x,y,z; | |
}; | |
/* writes and then reads 10 arbitrary records | |
from the file "junk". */ |
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
#include "EventDispatcher.h" | |
void EventDispatcher::addListener( Listener *l ) | |
{ | |
mListeners.push_back(l); | |
} | |
void EventDispatcher::removeListener( Listener *l ) | |
{ | |
mListeners.erase( std::remove( mListeners.begin(), mListeners.end(), l ), mListeners.end() ); |
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
#include <iostream> | |
#include <fstream> | |
#include <stdint.h> | |
#include <vector> | |
#include <algorithm> | |
#include <string> | |
#include <map> | |
using namespace std; | |
#pragma pack(push) |
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
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
""" | |
IPv4 addresses to a 32-bit integer value | |
Document: https://en.wikipedia.org/wiki/IPv4#Address_representations | |
IPv4 addresses may be in any notation expressing a 32-bit integer value, |
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
barriosj@ThinkPad-W530 [03:07:27 PM] [~/go_bazel_project] [master *] | |
-> % bazel coverage -s //src/... | |
INFO: Using default value for --instrumentation_filter: "//src". | |
INFO: Override the above default with --instrumentation_filter | |
INFO: Analysed 3 targets (21 packages loaded). | |
INFO: Found 2 targets and 1 test target... | |
SUBCOMMAND: # //src:go_default_test [action 'Creating runfiles tree bazel-out/k8-fastbuild/bin/src/linux_amd64_stripped/go_default_test.runfiles'] | |
(cd /home/barriosj/.cache/bazel/_bazel_barriosj/b790a967df273339965ace6e27b0005e/execroot/__main__ && \ | |
exec env - \ | |
_bin/build-runfiles bazel-out/k8-fastbuild/bin/src/linux_amd64_stripped/go_default_test.runfiles_manifest bazel-out/k8-fastbuild/bin/src/linux_amd64_stripped/go_default_test.runfiles) |