code --list-extensions --show-versions
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
//Your task is as follows (note that class/function names are CaSE-SenSItiVe) | |
#include <string> | |
// 1. Create a class called Vehicle. | |
class Vehicle | |
{ | |
public: | |
virtual const std::string GetType() const = 0; | |
virtual unsigned int GetMaxSpeed(bool isMPH) = 0; |
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
/// Requirement: print the area of the given shape | |
void print_area(const Shape &shape) | |
{ | |
std::cout << shape.get_area() << std::endl; | |
} | |
int main(){ | |
std::vector<std::unique_ptr<Shape>> shapes; | |
shapes.push_back(std::make_unique<Circle>(10)); | |
shapes.push_back(std::make_unique<Circle>(11.0)); |
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
<script src="https://fb.me/react-with-addons-15.1.0.js"></script> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://fb.me/react-15.1.0.js"></script> |
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 <string> | |
#include <cstdio> | |
#include <iostream> | |
#include <map> | |
#include <vector> | |
#include <boost/algorithm/string.hpp> | |
#include <array> | |
using namespace std; | |
using namespace boost; |
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 os | |
def get_filepaths(directory): | |
""" | |
This function will generate the file names in a directory | |
tree by walking the tree either top-down or bottom-up. For each | |
directory in the tree rooted at directory top (including top itself), | |
it yields a 3-tuple (dirpath, dirnames, filenames). | |
""" | |
file_paths = [] # List which will store all of the full filepaths. |
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
# Install the Python Requests library: | |
# `pip install requests` | |
import requests | |
def send_request(): | |
# My API | |
# GET https://api.invertironline.com/api/micuenta/estadocuenta |
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
/* | |
problema de la entrevista que mencioné en el último podcast: | |
https://soundcloud.com/sin-humo/entrevistas-de-trabajo-y-111mil | |
la idea es crear la función 'deferred', que permita un comportamiento | |
similar a lo que serían promises de javascript. | |
el deferred puede 'resolverse' con un valor cualquiera, o con otro 'deferred'. | |
en el segundo caso, el próximo `then` debería "esperar" también a este. |
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
#!python | |
def savitzky_golay(y, window_size, order, deriv=0, rate=1): | |
r"""Smooth (and optionally differentiate) data with a Savitzky-Golay filter. | |
The Savitzky-Golay filter removes high frequency noise from data. | |
It has the advantage of preserving the original shape and | |
features of the signal better than other types of filtering | |
approaches, such as moving averages techniques. | |
Parameters | |
---------- | |
y : array_like, shape (N,) |
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
window.onerror = (msg, file, line, column, error=null)=>{ | |
try{ | |
if(error){ // error param not supported everywhere | |
msg = error.stack; | |
} | |
ga('send','event','error', `${file}:{line}`, msg) | |
}catch(e){ | |
// no-op |