Skip to content

Instantly share code, notes, and snippets.

<template>
<div id="app" class="tinder-app">
<MatchModal
v-if="showMatchModal"
:gender="latestMatchGender"
:name="latestMatchName"
v-on:click.native="showMatchModal = false"
/>
<ConnectAccountsModal
v-if="showConnectModal"
@jsutterfield
jsutterfield / settings.py
Created June 12, 2020 09:14 — forked from ipmb/settings.py
Django logging example
import logging.config
import os
from django.utils.log import DEFAULT_LOGGING
# Disable Django's logging setup
LOGGING_CONFIG = None
LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper()
logging.config.dictConfig({
#! /usr/bin/python
import csv
class GetPostCreator(object):
THEME_IDS = [1, 2, 3]
def __init__(self, id, row):
self.id = self.wrap_in_quotes(str(id))
describe('Lightbox', function () {
'use strict';
var windowMock = {},
historyApi = modules['wikia.history'](windowMock),
lightbox = window.Lightbox;
it('lightbox is defined', function () {
expect(lightbox).toBeDefined();
});
Videos By Provider
=================
youtube: 748344
ign: 100159
screenplay: 60724
anyclip: 60414
ooyala: 18273
dailymotion: 9021
vimeo: 4233
metacafe: 3069
<?php
class reportTotalVideosOnWikia {
const LOG_FILE = '/tmp/reportTotalVideosOnWikiaAll.csv';
public static function run ( $db, $test = false, $verbose = false, $params ) {
$dbname = $params['dbname'];
#!/bin/python
import operator
def main():
fp = open("reportTotalVideosOnWikiaAll.csv", "r")
vids_by_provider = {}
vids_by_wiki = {}
# Lines are in the csv form provider,count,wiki
for line in fp.readlines():
from django.db import models
from django.contrib.localflavor.us.models import USStateField, PhoneNumberField
def save_area(instance, file_name):
return "photos/%s/%s/%s" % (instance.area.state, instance.area.name, file_name)
def save_problem(instance, file_name):
return "photos/%s/%s/%s/%s" % (instance.problem.parent.state, instance.problem.parent.name, instance.problem.name, file_name)
class Area(models.Model):