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
echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu8/cpufreq/scaling_governor | |
echo "performance" > /sys/devices/system/cpu/cpu9/cpufreq/scaling_governor |
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 cx_Freeze import setup, Executable | |
# Dependencies are automatically detected, but it might need | |
# fine tuning. | |
buildOptions = { | |
'packages': [], | |
'excludes': [ | |
# remove unneeded parts of the standard lib | |
'unicodedata', | |
'pydoc', |
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 DragndropOrderedModelAdmin(OrderedModelAdmin): | |
def move_above_view(self, request, object_id, other_object_id): | |
obj = get_object_or_404(self.model, pk=unquote(object_id)) | |
other_obj = get_object_or_404(self.model, pk=unquote(other_object_id)) | |
obj.above(other_obj) | |
# go back 3 levels (to get from /pk/move-above/other-pk back to the changelist) | |
return HttpResponseRedirect('../../../') | |
def get_urls(self): | |
def wrap(view): |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals, absolute_import, division | |
import os | |
import sys | |
# based on https://gist.github.com/magopian/7543724 | |
# | |
# refactored for manual control over permissions created. | |
projectname = input("Enter project name (for settings import): ") |
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
496853 function calls (487202 primitive calls) in 153.636 seconds | |
Ordered by: standard name | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
1 0.016 0.016 0.081 0.081 <string>:1(<module>) | |
470 0.009 0.000 0.018 0.000 <string>:12(__new__) | |
1 0.000 0.000 0.000 0.000 <string>:5(ArgInfo) | |
1 0.000 0.000 0.000 0.000 <string>:5(ArgSpec) | |
1 0.000 0.000 0.000 0.000 <string>:5(Arguments) |