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
while inotifywait -e close_write src ; do NODE_ENV=development node build.js; done |
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
ffmpeg -skip_frame nokey -i video.mp4 -vsync 0 -r 30 -f image2 thumbnails-%03d.jpg |
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
package main | |
import ( | |
"fmt" | |
"github.com/tebeka/selenium" | |
"github.com/tebeka/selenium/firefox" | |
"log" | |
"os" | |
) |
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
var GeoJSONFilterControl = L.Control.extend({ | |
initialize: function (geoJsonLayer, data, fields, options = {}) { | |
this.layer = geoJsonLayer; | |
this.data = data; | |
this.fields = fields; | |
this.filteredOut = {}; | |
L.Util.setOptions(this, options); | |
}, | |
options: { | |
position: 'bottomright' |
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 https://sashat.me/2017/01/11/list-of-20-simple-distinct-colors/ | |
var categoricalColors = [ | |
'#e6194B', | |
'#3cb44b', | |
'#ffe119', | |
'#4363d8', | |
'#f58231', | |
'#911eb4', | |
'#42d4f4', |
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 csv | |
from sqlalchemy.engine.result import ResultProxy | |
class _Echo: | |
def write(self, value): | |
return value | |
def stream_csv(res: ResultProxy): | |
w = _Echo() |
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
period | start of period | new | returned | went inactive | |
---|---|---|---|---|---|
Four Weeks Ago | 100 | 20 | 30 | 40 | |
Three Weeks Ago | 110 | 30 | 20 | 30 | |
Two Weeks Ago | 130 | 40 | 25 | 40 | |
One Week Ago | 155 | 30 | 55 | 50 | |
Current Week | 190 | 0 | 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
class PlaceAdmin(MPTTModelAdmin): | |
def get_model_info(self): | |
app_label = self.model._meta.app_label | |
return app_label, self.model._meta.model_name | |
def get_move_form_class(self): | |
class MoveSelectTargetForm(forms.Form): | |
target = forms.ModelChoiceField(self.model.objects.all()) | |
position = TreeNodePositionField() |
OlderNewer