Skip to content

Instantly share code, notes, and snippets.

View david-lemoine's full-sized avatar

David Lemoine david-lemoine

View GitHub Profile
torch.manual_seed(42)
x_tensor = torch.from_numpy(x).float()
y_tensor = torch.from_numpy(y).float()
# Builds dataset with ALL data
dataset = TensorDataset(x_tensor, y_tensor)
# Splits randomly into train and validation datasets
train_dataset, val_dataset = random_split(dataset, [80, 20])
@jaganjan
jaganjan / Facebook service for xamarin forms
Last active December 22, 2018 17:21
facebook android sdk implementaions of xamarin forms
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;