Skip to content

Instantly share code, notes, and snippets.

@normark
normark / warping.py
Created August 24, 2023 19:48 — forked from sftekin/warping.py
Example of torch.grid_sample. Warping implementation
"""
https://discuss.pytorch.org/t/solved-torch-grid-sample/51662
I have used this code.
"""
from torchvision import transforms
from PIL import Image
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
@normark
normark / coefficent_plot_walkthrough.R
Created September 9, 2017 13:58 — forked from dsparks/coefficent_plot_walkthrough.R
A coefficient plot for multiple models
doInstall <- TRUE
toInstall <- c("ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv")
ANES <- ANES[ANES$year == 2008, -c(1, 11, 17)] # Limit to just 2008 respondents,
head(ANES) # remove some non-helpful variables
# Fit several models with the same DV:
var express = require('express');
var RedisStore = require('connect-redis')(express);
express.socketio = require('socket.io');
var app = express.createServer();
app.configure(function() {
app.use(express.cookieParser() );
app.sessionStore = new express.session.MemoryStore(); //Not recommended for production use
app.use(express.session({
#!/usr/bin/env
#
# Requirements:
# argparse==1.2.1
# pymongo==2.1
# redis==2.4.10
import redis
import pymongo
import argparse

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.

<?php
require_once __DIR__.'/../symfony/app/bootstrap.php.cache';
require_once __DIR__.'/../symfony/app/AppKernel.php';
use Symfony\Component\HttpFoundation\Request;
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$response = $kernel->handle(Request::createFromGlobals());