Skip to content

Instantly share code, notes, and snippets.

View Archelunch's full-sized avatar
🏠
Working from home

Michel Pavlukhin Archelunch

🏠
Working from home
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 4 in line 1.
user_id;user_query
381;I'm looking for recommendations for dramas, comedies, or adventure films. I'm a big fan of Steven Spielberg and prefer movies made in 1995 or later. I enjoyed Hard Candy and Memento, but I'm not a fan of films like An American Haunting.
141;Can you suggest some comedy, adventure, or drama movies? I really like works by Quentin Tarantino and Pete Docter, and I prefer films made after 1994. Gattaca and The Grand Budapest Hotel are some of my favorites, but I didn't care for 300 or American Psycho.
255;I'm looking for war and action movies made after 1978. I'm a fan of comedies like Animal House and Ace Ventura, but I didn't enjoy Little Big Man. What do you recommend?
424;I'm in the mood for a drama, thriller, or crime film. I especially enjoy movies by Quentin Tarantino and Martin Scorsese from 1994 onwards. I liked American History X, but I'm not a fan of movies like Nutty Professor II: The Klumps.
403;I'd love some recommendations for dramas and thrillers, especially from Quentin Taran
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 2.
user_id;persona_prompt;user_query;liked_titles_holdout;disliked_titles_sample
381;"I enjoy Drama, Comedy, Adventure; Steven Spielberg; prefer years >= 1995.0. Some favorites: Hard Candy (2005), Memento (2000), Hook (1991); avoid films like American Haunting, An (2005), Wicker Man, The (2006). Recommend 5 movies I might love with one-line reasons.";Recommend 5 movies matching my taste. Prefer Drama, Comedy, Adventure, especially by Steven Spielberg, from >= 1995.0. One-line reasons.;"[""Fantasia (1940)"", ""Inside Man (2006)"", ""Monsters, Inc. (2001)"", ""Princess Mononoke (Mononoke-hime) (1997)"", ""Hotel Rwanda (2004)""]";"[""American Haunting, An (2005)"", ""Wicker Man, The (2006)"", ""Hitchhiker's Guide to the Galaxy, The (2005)""]"
141;"I enjoy Comedy, Adventure, Drama; Quentin Tarantino, Pete Docter; prefer years >= 1994.0. Some favorites: Gattaca (1997), Grand Budapest Hotel, The (2014), Lord of the Rings: The Fellowship of the Ring, The (2001); avoid films like 300 (2007), American Psycho (2000). Reco
shader_type spatial;
#define R(p,a,r)mix(a*dot(p,a),p,cos(r))+sin(r)*cross(p,a)
#define H(h)(cos((h)*6.3+vec3(0,23,21))*.5+.5)
uniform vec3 iResolution;
uniform float modifier: hint_range(0.0, 1.0) = 0.001;
void fragment()
{
vec4 O=vec4(0);
@Archelunch
Archelunch / val.py
Last active August 31, 2020 17:52
val.py
def validation_step(self, batch, batch_nb):
padded_mixture, mixture_lengths, padded_source = \
batch['audio_input'], batch['lengths'], batch['audio_targets']
estimate_source = self.forward(padded_mixture)
if not self.is_sampled:
self.flat_estimate = remove_pad(estimate_source, mixture_lengths)[:5]
self.mixture = remove_pad(padded_mixture, mixture_lengths)[:5]
self.is_sampled = True
from collections import namedtuple
import random
import torch
def get_grid_locations(image_height, image_width, device):
y_range = torch.linspace(0, image_height - 1, image_height, device=device)
x_range = torch.linspace(0, image_width - 1, image_width, device=device)
y_grid, x_grid = torch.meshgrid(y_range, x_range)
return torch.stack((y_grid, x_grid), -1)
import tensorflow as tf
from text import symbols
def create_hparams(hparams_string=None, verbose=False):
"""Create model hyperparameters. Parse nondefault from given string."""
hparams = tf.contrib.training.HParams(
################################
# Experiment Parameters #
import numpy as np
import librosa
import torch
def get_mask_from_lengths(lengths):
max_len = torch.max(lengths).item()
ids = torch.arange(0, max_len, out=torch.cuda.LongTensor(max_len))
mask = (ids < lengths.unsqueeze(1)).byte()
return mask
# *****************************************************************************
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.