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<cmath> | |
| #include<iostream> | |
| #include<climits> | |
| using namespace std; | |
| int Maximum_Sum_Subarray(int arr[],int n) //Overall Time Complexity O(n) | |
| { | |
| int ans = A[0],sum = 0; | |
| for(int i = 1;i < n; ++i) //Check if all are negative | |
| ans = max(ans,arr[i]); |
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/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
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
| """ Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
| import numpy as np | |
| import cPickle as pickle | |
| import gym | |
| # hyperparameters | |
| H = 200 # number of hidden layer neurons | |
| batch_size = 10 # every how many episodes to do a param update? | |
| learning_rate = 1e-4 | |
| gamma = 0.99 # discount factor for reward |
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
| module Kmeans where | |
| import System.Random | |
| type Point = (Int, Int) | |
| type Mean = (Float, Float) | |
| type Cluster = [Point] | |
| i2f :: (Integral a, Num b) => a -> b | |
| i2f = fromIntegral |
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
| """ | |
| author: Timothy C. Arlen | |
| date: 28 Feb 2018 | |
| Calculate Mean Average Precision (mAP) for a set of bounding boxes corresponding to specific | |
| image Ids. Usage: | |
| > python calculate_mean_ap.py | |
| Will display a plot of precision vs recall curves at 10 distinct IoU thresholds as well as output |
OlderNewer