This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<ul> | |
<template v-for="(filter, index) in filters.children"> | |
<FilterExpression | |
:prop="filter" | |
:depth="1" | |
:index="index" | |
@add="addNewChild" | |
@change="mainChangeHandler" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"referral": {"count":1, "percent":0.25}, | |
"facebook": {"count":1, "percent":0.25}, | |
"email": {"count":1, "percent":0.25} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basic_age": [ | |
1, | |
5, | |
6, | |
2, | |
1, | |
3, | |
0, | |
0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"utm_medium": "example", | |
"users_signed_up": 24, | |
"email_in": 36, | |
"users_name_specified": 14, | |
"users_notifications": 31, | |
"users_validated": 26 | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- We're using Vue Functional components here --> | |
<template functional> | |
<div class="link-bookmark"> | |
<!-- The above parent div has been added so the parent scoped styles won't leak into this component --> | |
<a | |
:href="props.href" | |
target="_blank" | |
class="flex items-center border cursor-pointer rounded-md hover:bg-gray-100 py-2 px-4" | |
> | |
<div class="decorator"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import render | |
from .models import Habit, Category | |
from .serializers import HabitSerializer, NewHabitSerializer, SectionSerializer | |
from rest_framework import generics | |
from rest_framework.response import Response | |
from rest_framework.decorators import api_view | |
from rest_framework import status | |
from django.utils import dateparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-unused-vars */ | |
import Vue from "vue"; | |
import Vuex from "vuex"; | |
import habit from "@/store/modules/habit.js"; | |
import habitLogs from "@/store/modules/habitLogs.js"; | |
import habitSection from "@/store/modules/habitSection.js"; | |
import VuexORM from "@vuex-orm/core"; | |
import Habit from "@/models/Habit"; | |
import HabitLog from "@/models/HabitLog"; | |
import Category from "../models/Category"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-unused-vars */ | |
import HabitService from "@/services/HabitService.js"; | |
import Habit from "@/models/Habit"; | |
import Category from "../../models/Category"; | |
export default { | |
mutations: { | |
FETCH_HABITS(state, habitArray) { | |
// Test data | |
const data = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.ElementTree as ET | |
import base64 | |
image = open('demo.pdf', 'rb') # open binary file in read mode | |
image_read = image.read() | |
image_64_encode = base64.b64encode(image_read) | |
# Decode test | |
image_64_decode = base64.decodestring(image_64_encode) | |
image_result = open('demo_decoded.pdf', 'wb') # create a writable image and write the decoding result |