Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

err edison7500

I may be slow to respond.
View GitHub Profile
edison7500 /
Created Sep 11, 2019
python 计算 BMI
# how to calculate BMI
def BMI(height, weight):
bmi = weight/(height**2)
return bmi
# Driver code
height = 1.79832
weight = 70
# calling the BMI function
edison7500 / plugin.js
Created Aug 21, 2019
View plugin.js
import $ from "jquery";
* Generate a jQuery plugin
* @param pluginName [string] Plugin name
* @param className [object] Class of the plugin
* @param shortHand [bool] Generate a shorthand as $.pluginName
* @example
* import plugin from 'plugin';
edison7500 / jquery.scrollToTop.js
Last active Aug 21, 2019
View jquery.scrollToTop.js
import $ from "jquery";
import plugin from "./plugin";
class ScrollToTop {
constructor(element, options) {
const $element = $(element);
$(window).scroll(function () {
if ($(this).scrollTop() > options.offset) {
edison7500 /
Last active Jul 16, 2019
django command model2csv
Prints CSV of all fields of a model.
import csv
import logging
import sys
from import BaseCommand
You can’t perform that action at this time.