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 FilterDateField(forms.DateField): | |
| def clean(self, value): | |
| from sheerlike.templates import get_date_obj | |
| if value: | |
| try: | |
| value = get_date_obj(value) | |
| except Exception as e: | |
| pass | |
| return value |
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
| 01 09:31 10:15 11:22 12:40 13:51 14:43 14:50 14:09 13:00 11:46 10:32 09:39 | |
| 02 09:31 10:17 11:24 12:43 13:53 14:44 14:49 14:07 12:58 11:43 10:29 09:38 | |
| 03 09:32 10:19 11:27 12:45 13:55 14:45 14:48 14:05 12:55 11:41 10:27 09:37 | |
| 04 09:33 10:21 11:29 12:48 13:57 14:46 14:48 14:03 12:53 11:38 10:25 09:36 | |
| 05 09:34 10:23 11:32 12:50 13:59 14:47 14:47 14:01 12:50 11:36 10:23 09:35 | |
| 06 09:34 10:25 11:34 12:52 14:01 14:47 14:46 13:59 12:48 11:33 10:21 09:34 | |
| 07 09:35 10:27 11:37 12:55 14:03 14:48 14:45 13:57 12:45 11:31 10:19 09:33 | |
| 08 09:36 10:30 11:39 12:57 14:05 14:49 14:44 13:55 12:43 11:28 10:17 09:32 | |
| 09 09:38 10:32 11:42 13:00 14:07 14:49 14:43 13:53 12:40 11:26 10:15 09:31 | |
| 10 |
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
| $ sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install g++-4.8 | |
| Reading package lists... | |
| Building dependency tree... | |
| Reading state information... | |
| E: Unable to locate package g++-4.8 | |
| E: Couldn't find any package by regex 'g++-4.8' |
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
| LOAD_OPTIONAL_APPS = True | |
| if LOAD_OPTIONAL_APPS: | |
| # <copypaste from="http://blog.jupo.org/post/586256417/optional-django-apps"> | |
| # Define any settings specific to each of the optional apps. | |
| # | |
| import sys | |
| USE_SOUTH = not (len(sys.argv) > 1 and sys.argv[1] == "test") | |
| DEBUG_TOOLBAR_CONFIG = {"INTERCEPT_REDIRECTS": True} |
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 json, codecs | |
| from glob import glob | |
| for fn in glob('*.json'): | |
| r = codecs.open(fn, encoding='utf8') | |
| dirty_json = json.load(r) | |
| r.close() | |
| w = codecs.open(fn, 'wb', encoding='utf-8') | |
| clean_json = json.dumps(dirty_json, indent=4, separators=(',', ': ')) |
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
| npm http 304 https://registry.npmjs.org/date-now | |
| Traceback (most recent call last): | |
| File "/usr/bin/gyp", line 15, in <module> | |
| import gyp | |
| ImportError: No module named gyp | |
| gyp ERR! configure error | |
| gyp ERR! stack Error: `gyp` failed with exit code: 1 | |
| gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:428:16) | |
| gyp ERR! stack at ChildProcess.emit (events.js:98:17) | |
| gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12) |
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
| [extras] | |
| name=CentOS-7 - Extras | |
| baseurl=http://mirror.centos.org/centos/7/extras/x86_64/ | |
| enabled=1 | |
| gpgcheck=1 | |
| gpgkey=http://mirror.centos.org/centos/7.1.1503/os/x86_64/RPM-GPG-KEY-CentOS-7 | |
| priority=1 | |
| includepkgs=docker* golang* |
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
| def conjunction(left_conjunct,right_conjunct): | |
| return bool(left_conjunct and right_conjunct) | |
| def disjunction(left_disjunct,right_disjunct): | |
| return bool(left_disjunct or right_disjunct) | |
| def negation(a): | |
| return not(a) | |
| def implication(antecedent, consequent): |
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
| if 'result' in result: | |
| cg, created = CachedGeodata.objects.get_or_create(key=key) | |
| cg.lat=result['result'][1] | |
| cg.lon=result['result'][2] | |
| cg.expires = int(time.time()) + getattr(settings, 'DJANGO_HUD_GEODATA_EXPIRATION_INTERVAL', 1728000) | |
| cg.save() | |
| data = result |
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
| "1.1 | |
| loadplugins '\.(js|penta)$' | |
| group user | |
| " Allow GMail shortcuts | |
| set passkeys+=mail.google.com:jksacrqG#~`<CR>,gi,gl,gp | |
| " Let Hint Message from X Links | |
| autocmd LocationChange mail.google.com set ht+=span.ata-asJ | |
| " Let Hint Expand Collapsed Conversations |