This file contains 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 unittest | |
from unittest.mock import Mock, patch | |
from user import User | |
class MockUpTest(unittest.TestCase): | |
def test_get_name(self): | |
mock_user = Mock(spec=User) | |
mock_obj = mock_user() |
This file contains 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 java.util.*; | |
// complexity = O(N) | |
public class IntegerSummary{ | |
public static void main(String [] args){ | |
Integer [] array = {3, 5, 8, 23, 88, 99}; | |
System.out.println(getSummary(array)); | |
} | |
public static String getSummary(Integer [] numbers){ |
This file contains 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
<?xml version="1.0"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> | |
<xsl:template match="/Book"> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My First XSLT exercise</title> | |
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></link> |
This file contains 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
require 'capybara' | |
require 'capybara/dsl' | |
require 'capybara/poltergeist' | |
require 'csv' | |
include Capybara::DSL | |
Capybara.register_driver :poltergeist do |app| | |
options = { | |
js_errors: false, |
This file contains 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
require 'capybara' | |
require 'capybara/dsl' | |
require 'capybara/poltergeist' | |
require 'csv' | |
require 'date' | |
include Capybara::DSL | |
Capybara.register_driver :poltergeist do |app| | |
options = { |