Solves the OpenAI CartPole-v0 environment using a tabular version of Q-Learning with discretized feature space and epsilon-decreasing exploration.
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 is an example of a C# application that uploads a CSV dataset to DataRobot, | |
// runs a classification project in autopilot mode and prints the leaderboard | |
// using the V2 REST API. Here you can also see an example of interacting with the | |
// asynchronous API routes (upload project, set target). | |
// Since the WebClient class has limited HTTP functionality, we use the newer | |
// Microsoft.Net.Http.HttpClient class. Its methods are async; as a result, | |
// the C# code uses asynchronous operations too. | |
// You may need to install the following packages for this code to work: |
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
""" | |
Converts subtitles in a video from any format to plain text using ffmpeg. | |
Reads all files that match a glob pattern. | |
Writes output to current directory unless specified otherwise. | |
Usage: convert-subtitles.py <input_pattern> [output_folder] | |
Example: convert-subtitles.py ~/Videos/*.mkv | |
""" | |
import glob |
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
#!/usr/bin/env bash | |
# Install or upgrade any JetBrains product on Linux, assuming it is distributed as a tarball | |
# and has the entry point at $INSTALL_DIR/bin/$PRODUCT.sh | |
# Tested on IDEA, PyCharm, CLion, DataGrip 2016-2018.* | |
# Usage: | |
# install-jetbrains-product.sh [ProductName] [DownloadURL] | |
# | |
# Example: |
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
#!/usr/bin/bash | |
# ---------------------- | |
# 00-common-vars.sh | |
# ---------------------- | |
# =========== CONFIG ============= | |
# Assuming we'll set the Dropbox folder to ~/Dropbox | |
DROPBOX_FOLDER=$HOME/Dropbox | |
# ================================ |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import pandas as pd | |
input_filename = 'https://raw.githubusercontent.com/devua/csv/master/salaries/2018_june_final.csv' | |
output_filename = '2018_june_final_eng.csv' | |
df = pd.read_csv(input_filename) |
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
#!/usr/bin/env python | |
""" | |
Update all Git repos in the current directory. Fast-forward only, no merge commits. | |
Copyright (c) 2018 Yuriy Guts | |
usage: git-update-all.py | |
""" | |
from __future__ import division, print_function |
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
#!/usr/bin/env bash | |
fetch() { | |
echo "Removing brew cache" | |
local cache=$(brew --cache) | |
rm -rf "$(brew --cache)" | |
mkdir "$cache" | |
mkdir "$cache/Casks" | |
echo "Running brew update" | |
brew update |
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
# Predict the survival of RMS Titanic passengers using logistic regression. | |
# Based on Kaggle Titanic dataset: https://www.kaggle.com/c/titanic/data | |
# | |
# You might need to install Amelia and ROCR packages. | |
cleanData <- function(rawData) { | |
# Uncomment these two lines to visualize the missing data. | |
# library(Amelia) | |
# missmap(trainingData, main="Missing vs. observed values") |
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
<# | |
.SYNOPSIS | |
Dumps the entire file tree of the specified folder(s) and saves the results to a ZIP archive. | |
.PARAMETER SourceFolderList | |
Path to the folder(s) to retrieve the file tree for. Multiple folders should be separated by the pipe character ("|"). | |
.PARAMETER BackupStorageList | |
Path to the folder(s) where the ZIP file will be stored. Multiple folders should be separated by the pipe character ("|"). |