This file contains 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 cms.models import CMSPlugin | |
from cms.utils.plugins import reorder_plugins | |
from django.db import connection, transaction | |
from django.db.models import Count, F | |
from treebeard.mp_tree import sql_length | |
def new_fix_tree(): | |
print("RUNNING PATCHED CMSPLUGIN FIX TREE") | |
vendor = CMSPlugin.get_database_vendor('write') |
This file contains 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 pathlib | |
import ast | |
import sys | |
import asttokens | |
import black | |
def walk(parent): | |
for path in parent.iterdir(): |
This file contains 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 pathlib | |
import ast | |
import inspect | |
import asttokens | |
import black | |
def ForeignKey( | |
to, |
This file contains 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
form django.shortcuts import redirect | |
def redirect_job_details(request): | |
full_path = request.get_full_path() | |
if full_path.startswith('/en'): | |
full_path = full_path[3:] | |
return redirect('/jobs' + full_path) | |
This file contains 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
$ cat /var/tmp/portage/media-libs/ftgl-2.1.3_rc5/temp/build.log | |
* Package: media-libs/ftgl-2.1.3_rc5 | |
* Repository: gentoo | |
* Maintainer: [email protected] | |
* USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU | |
* FEATURES: preserve-libs sandbox userpriv usersandbox | |
>>> Unpacking source... | |
>>> Unpacking ftgl-2.1.3-rc5.tar.bz2 to /var/tmp/portage/media-libs/ftgl-2.1.3_rc5/work | |
>>> Source unpacked in /var/tmp/portage/media-libs/ftgl-2.1.3_rc5/work |
This file contains 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
#!/usr/bin/env python | |
# copied from | |
# https://raw.githubusercontent.com/mitsuhiko/pipsi/ad72771136c885b9bdaa965df454f19a9415da26/get-pipsi.py | |
# Altered to use install from github instead of latest from pip. | |
# We can switch to using the stock get-pipsi.py when there is a new release: | |
# https://github.com/mitsuhiko/pipsi/issues/36 | |
import os | |
import sys |
This file contains 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 __future__ import print_function | |
import collections | |
import re | |
import random | |
############################################################################## | |
# Program parameters | |
# Path to the text file containing the ciphertext |
This file contains 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
RPython traceback: | |
File "rpython_jit_metainterp_7.c", line 33594, in MIFrame_run_one_step | |
File "rpython_jit_metainterp_9.c", line 35383, in handler_residual_call_ir_i_1 | |
File "rpython_jit_metainterp_11.c", line 29636, in MIFrame_do_residual_call | |
File "rpython_jit_metainterp_12.c", line 36220, in MetaInterp_vrefs_after_residual_call | |
File "rpython_jit_metainterp_14.c", line 3071, in MetaInterp_stop_tracking_virtualref | |
Fatal RPython error: AssertionError |
This file contains 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 OpenSSL import SSL as ssl | |
from zope.interface import implementer | |
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol | |
from twisted.internet import defer | |
from twisted.internet.ssl import CertificateOptions | |
from twisted.internet.interfaces import IOpenSSLServerConnectionCreator | |
from twisted.logger import Logger |
This file contains 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
reactor.listenSSL( | |
port=443, | |
factory=server_factory, | |
contextFactory=SNICallbackSSLFactory(RedisCertsStore()), | |
) |
NewerOlder