- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
| import numpy as np | |
| import math | |
| class Linear(): | |
| # DO NOT DELETE | |
| def __init__(self, in_feature, out_feature): | |
| self.in_feature = in_feature | |
| self.out_feature = out_feature |
| from layers import * | |
| class CNN_B(): | |
| def __init__(self): | |
| # Your initialization code goes here | |
| self.layers = [] | |
| def __call__(self, x): | |
| return self.forward(x) |
| public class Main { | |
| // https://stackoverflow.com/questions/53543089/new-year-chaos-hackerrank-code-optimization | |
| public static void minBribes(int[] q) { | |
| int bribe = 0; | |
| boolean chaotic = false; | |
| int n = q.length; |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| public class Main { | |
| // https://www.geeksforgeeks.org/minimum-number-swaps-required-sort-array/ | |
| // https://www.includehelp.com/java-programs/minimum-swaps-required-to-sort-an-array.aspx | |
| public static int minswaps(int[] a) { |
| import java.util.Arrays; | |
| public class Main { | |
| static long arrayManipulation(int n, int[][] queries) { | |
| int[] arr = new int[n]; | |
| // Arrays.fill(arr, 0); |
| import java.util.Arrays; | |
| public class Main { | |
| /** | |
| * | |
| * @param arr | |
| * | |
| * |
| var id = 3; | |
| var ids = [2, 4, 6, 3, 9, 3, 6, 1, 7]; | |
| var floats = [0.392, 0.328, 34.3, 45.2, 2.5, 1.54, 2.2, 4.0, 9.2]; | |
| function sum_magic_numbers(id, list_of_ids, list_of_floats) { | |
| // Start by finding indexes of ids in the list_of_ids for the given id | |
| // O(n) | |
| var list_of_indexes = [] | |
| for(var i = 0; i < list_of_ids.length; i++) { |
| [ | |
| { | |
| "name": "Om Jai Jagadish Hare", | |
| "imageUrl": "http://thecatapi.com/api/images/get?format=src&type=gif", | |
| "phrases": [ | |
| "", | |
| "", | |
| "" | |
| ] | |
| }, |
| {"0.5617042808945232":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMELMDg/I1uDRb8pHSEDM51WT1bbPhicHNt\r\n3v76qwXiMCo5C8cGVZrfebXcU2F5qiOG2wtDAAlPsSZiXAkXCIzycs3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWKnD9/8AAAACiwn/AAAACZDfnSwE+E0I\r\nUv8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAhosBALCXD28JqDSr\r\nqtQI33J4awXyJyIcRT5P6W9jWHVaQGySAP9BGw+xVhapOzrRnnMjhlMCJyVG6Uaw\r\nHldHdbLOcObp687/AAAAVgQAAAAAEggqhkjOPQMBBwIDBKgMLjNmmR0UZLMW9un3\r\n3C7GnACpJYb+wzbsGKTh7qHLblwk2J2jsI+ZL2Kjjq4RVbeqht6PTgFVKLHUGcBP\r\nYqYDAQgHwv8AAABtBBgTCAAf/wAAAAWCWKnD9/8AAAAJkN+dLAT4TQhS/wAAAAKb\r\nDAAAYNoA/3ea5N/O5YN2MYhz6xzz8eyHdEVdS0+L9xxNUMcaH6udAQC3bIeKopmq\r\n19MF5MDrGhDDt6r0cwTlzRXfghLgZdoA8w==\r\n=Yz+t\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n","0.13715565348445424":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMELMDg/I1uDRb8pHSEDM51WT1bbPhicHNt\r\n3v76qwXiMCo5C8cGVZrfebXcU2F5qiOG2wtDAAlPsSZiXAkXCIzycs3/AAAACDxn\r\naXRodWI+wv8AAACOB |