Skip to content

Instantly share code, notes, and snippets.

View FurkanArslan's full-sized avatar

Furkan Arslan FurkanArslan

View GitHub Profile
@vojtad
vojtad / aws_s3_multipart_helper.js
Last active April 26, 2020 06:32
Helper to enable client-side signing for AWS S3 uploading for Uppy with AWS S3 Multipart. Set callbacks for AWS S3 Multipart plugin to methods from this heper (https://uppy.io/docs/aws-s3-multipart/#createMultipartUpload-file).
import AWS from 'aws-sdk';
export default class AwsS3MultipartHelper {
constructor(options) {
this.options = {
bucket: options.bucket,
acl: options.acl || 'public-read',
expires: options.expires || 5 * 60,
};
import numpy as np
def ptb_iterator(raw_data, batch_size, num_steps, steps_ahead=1):
"""Iterate on the raw PTB data.
This generates batch_size pointers into the raw PTB data, and allows
minibatch iteration along these pointers.
Args:
raw_data: one of the raw data outputs from ptb_raw_data.
batch_size: int, the batch size.
num_steps: int, the number of unrolls.
@evanwill
evanwill / gitBash_windows.md
Last active April 26, 2024 03:58
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so