Skip to content

Instantly share code, notes, and snippets.

@powerdude
powerdude / 01-02.py
Created September 29, 2016 19:46 — forked from dimi-tree/01-02.py
Udacity: Machine Learning for Trading
# Working with multiple stocks
"""
SPY is used for reference - it's the market
Normalize by the first day's price to plot on "equal footing"
"""
import os
import pandas as pd
import matplotlib.pyplot as plt
@powerdude
powerdude / TypeMemberLayout.xaml
Last active August 12, 2022 19:59 — forked from sliekens/TypeMemberLayout.xaml
StyleCop Type Member Layout for Resharper 9
<?xml version="1.0" encoding="utf-16"?>
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
<TypePattern DisplayName="COM interfaces" Priority="2000">
<TypePattern.Match>
<And>
<Kind Is="Interface" />
<Or>
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
<HasAttribute Name="System.Runtime.InteropServices.ComImport" />
</Or>
@powerdude
powerdude / Badge.cs
Created December 5, 2015 00:21 — forked from rudyryk/Badge.cs
C# — Xamarin.Forms custom simple badge view + rounded box view via custom renderer
//
// Badge.cs
// Created by Alexey Kinev on 19 Jan 2015.
//
// Licensed under The MIT License (MIT)
// http://opensource.org/licenses/MIT
//
// Copyright (c) 2015 Alexey Kinev <[email protected]>
//
using System;
<?xml version="1.0" encoding="utf-16"?>
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
<TypePattern DisplayName="COM interfaces" Priority="2000">
<TypePattern.Match>
<And>
<Kind Is="Interface" />
<Or>
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
<HasAttribute Name="System.Runtime.InteropServices.ComImport" />
</Or>
@powerdude
powerdude / GetCurrentLocationAndroid.cs
Created December 1, 2015 07:55 — forked from supreettare/GetCurrentLocationAndroid.cs
Get current location of the device using Xamarin Mobile component. This uses dependency service in Xamarin Forms. This version fixes the TaskCancelledException you generally get on Android.
public class GetCurrentLocationAndroid : IGetCurrentLocation
{
/// <summary>
/// Instance of the Geoloactor
/// </summary>
private Geolocator _locator;
/// <summary>
/// The get current location.
/// </summary>