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 boto3 | |
import os | |
from zipfile import ZipFile | |
# When running on SageMaker, need execution role | |
from sagemaker import get_execution_role | |
role = get_execution_role() | |
# Declare bucket name, remote file, and destination | |
my_bucket = "" |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
int getRandomNumber(); | |
int main(){ | |
int guess = 0; | |
char playAgain = 'y'; | |
bool wrongGuess; |
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
# Setup the package source | |
wget https://packages.microsoft.com/config/ubuntu/20.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | |
sudo dpkg -i packages-microsoft-prod.deb | |
# Install the SDK | |
sudo apt-get update; \ | |
sudo apt-get install -y apt-transport-https && \ | |
sudo apt-get update && \ | |
sudo apt-get install -y dotnet-sdk-5.0 |
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
# This script helps to open a VS solution in VS2019, can be modified for other VS versions. | |
# Usage: | |
# 'vs2019here' --> Opens a VS solution in the current working directory, if any | |
# 'vs2019here .' --> Opens VS in the current working directory (folder view mode) | |
# 'vs2019here path' --> Opens a VS solution in the specified path(folder view mode if path is not a isn't a ".sln" file) | |
# 'vs2019here -p path' --> Opens a VS solution in the specified path(folder view mode if path isn't a ".sln" file) | |
$vs19 = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe" | |
$vs19WorkDir = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE" | |
$filesInCwd = Get-ChildItem(Get-Location) |
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
using Xamarin.Forms; | |
namespace YourApp.Shared.DependencyServices | |
{ | |
public interface IThumbnailGenerator | |
{ | |
ImageSource GenerateThumbnailImageSource(string url, long usecond); | |
string GenerateThumbnailAsPath(string url, long usecond, string appCachePath); | |
} | |
} |
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" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
x:Class="StatusSaver.Views.VideosPage"> | |
<ContentPage.ToolbarItems> | |
<ToolbarItem Text="Save" Command="{Binding Save}"/> |
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
public int LengthOfLongestSubstring(string s) | |
{ | |
// Dictionary to keep track of valid substrings and their length | |
var substringDict = new Dictionary<string, int>(); | |
for(int i = 0; i < s.Length; i++) | |
{ | |
// Dictionary to detect if any character is being repeated | |
// This should have been an HashSet😒 as the value in each pair is a dummy | |
var reptDetector = new Dictionary<char, int>(); | |
string x = s.Substring(i); |