git init
or
from django.db.models import Func, F, Value | |
from images.models import Image | |
Image.objects.all().update(original_filename=Func(F('file'), Value('^.*\/(.*)$'), Value('\\1'), function='regexp_replace')) |
fn main() { | |
let g = vec![1, 5, 6, 9, 8]; | |
let r = 7; | |
let mut i = g.iter().enumerate().peekable(); | |
while let Some((index, lhs_val)) = i.next() { | |
let lookahead = i.peek(); | |
println!("{}, {} with lookahead {:?}", index, lhs_val, lookahead); | |
} |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
from flask import Flask, request, session, redirect, url_for | |
import urllib | |
import requests | |
app = Flask(__name__) | |
app.secret_key = 'iwonttellyou' | |
redirect_uri = 'http://localhost:5000/callback' | |
client_id = '' # get from https://code.google.com/apis/console | |
client_secret = '' |