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 boto3 | |
| import botocore | |
| from botocore.client import Config | |
| import matplotlib.pyplot as plt | |
| from metpy.io import Level2File | |
| from metpy.plots import add_timestamp, ctables | |
| from mpl_toolkits.axes_grid1 import make_axes_locatable | |
| import numpy as np | |
| s3 = boto3.resource('s3', config=Config(signature_version=botocore.UNSIGNED, |
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
| void Main() | |
| { | |
| var policy = Policy | |
| .Handle<TimeoutException>() | |
| .Or<SqlException>(ex => (new[] { 40613, 40501, 40197, 10929, 10928, 10060, 10054, 10053, 233, 64, 20 }).Contains(ex.Number)) | |
| .WaitAndRetry(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt) / 2), | |
| (ex, count) => | |
| { | |
| count.Dump(); | |
| //log |
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
| void Main() | |
| { | |
| var d = new Dictionary<BigInteger, BigInteger>(); | |
| var t = DateTime.Now; | |
| var howfar = 0; | |
| var r = 0; | |
| for (int x = 0; x < 100000; x++) | |
| { | |
| for (int i = 0; i < 10000000; 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
| Mirror Commands | |
| Create Mirror | |
| Configure Connections between the dbs using certificates/endpoints - https://technet.microsoft.com/en-us/library/ms191140.aspx | |
| -- Disable automatic backup jobs before starting -- | |
| 1. Backup database |
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
| void Main() | |
| { | |
| XunitHelpers.LaunchXunitGui(Assembly.GetExecutingAssembly()); | |
| } | |
| #region Public XUnit Tests Here | |
| public class TestThis | |
| { | |
| [Fact] |
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
| async void Main() | |
| { | |
| var client = new ApiClient("http://localhost/"); | |
| var products = await client.Get<dynamic>("products", MediaType.Json); | |
| } | |
| public class MediaFormatterTypes | |
| { | |
| public MediaTypeFormatter MediaTypeFormatter { get; set; } | |
| public string ContentTypeHeaderValue { get; set; } |
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
| public class Cafe | |
| { | |
| public string Id { get; set; } | |
| public string Name { get; set; } | |
| public double Latitude { get; set; } | |
| public double Longitude { get; set; } | |
| } | |
| [TestFixture] | |
| public class AddCafeTest | |
| { |