Skip to content

Instantly share code, notes, and snippets.

View phileas-condemine's full-sized avatar

Philéas Condemine phileas-condemine

View GitHub Profile
@sgoyal1012
sgoyal1012 / Best Links.md
Last active September 7, 2020 16:02
Scala Course
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.utils.data as data
from torch.autograd import Variable
from tqdm import tnrange, tqdm_notebook, tqdm
"""My attempt at Karpathy's char-rnn from the unreasonableness of RNNs post
@hadley
hadley / shiny-oauth.r
Last active May 20, 2024 05:11
Sketch of shiny + oauth
library(shiny)
library(httr)
# OAuth setup --------------------------------------------------------
# Most OAuth applications require that you redirect to a fixed and known
# set of URLs. Many only allow you to redirect to a single URL: if this
# is the case for, you'll need to create an app for testing with a localhost
# url, and an app for your deployed app.
@evanwill
evanwill / gitBash_windows.md
Last active May 29, 2024 11:03
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

@timelyportfolio
timelyportfolio / code.R
Created December 21, 2014 21:33
htmlwidgets dygraphs only show highlighted legend
library(dygraphs)
lungDeaths <- cbind(ldeaths, mdeaths, fdeaths)
dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)") %>%
dyHighlight(highlightSeriesOpts = list(strokeWidth = 3)) -> d1
#this is a hack to set css directly
# dyCSS designed to read a text css file
d1$x$css = "