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 django.utils.http import urlencode | |
def reverse_querystring(view, urlconf=None, args=None, kwargs=None, current_app=None, query_kwargs=None): | |
'''Custom reverse to handle query strings. | |
Usage: | |
reverse_querystring('app.views.my_view', kwargs={'pk': 123}, query_kwargs={'search': 'Bob'}) | |
''' | |
base_url = reverse(view, urlconf=urlconf, args=args, kwargs=kwargs, current_app=current_app) | |
if query_kwargs: | |
return '{}?{}'.format(base_url, urlencode(query_kwargs)) |
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
{ | |
"clientId": "slack", | |
"surrogateAuthRequired": false, | |
"enabled": true, | |
"alwaysDisplayInConsole": false, | |
"clientAuthenticatorType": "client-secret", | |
"redirectUris": [ | |
"https://slack.com/", | |
"https://slack.com/*" | |
], |
Aerobase | Keycloak | WSO2 Identity Server | Gluu | CAS | OpenAM | Shibboleth IdP | |
---|---|---|---|---|---|---|---|
OpenID Connect/OAuth support | yes | yes | yes | yes | yes | yes | third-party |
Multi-factor authentication | yes | yes | yes | yes | yes | yes | yes |
Admin UI | yes | yes | yes | yes | yes | yes | no |
OpenJDK support | yes | yes | yes | yes | no | ||
Identity brokering | yes | yes | yes | ||||
Middleware | NGINX, Wildfly | Wildfly, JBOSS | WSO2 Carbon | Jetty, Apache HTTPD | any Java app server | any Java app server | Jetty, Tomc |
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
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |' | |
# noinspection PyPep8 | |
# noinspection PyPep8Naming | |
# noinspection PyTypeChecker | |
# noinspection PyAbstractClass | |
# noinspection PyArgumentEqualDefault | |
# noinspection PyArgumentList | |
# noinspection PyAssignmentToLoopOrWithParameter | |
# noinspection PyAttributeOutsideInit |
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
View.OnTouchListener detectClickAndHoldListener = new View.OnTouchListener() { | |
private Timer timer = new Timer(); | |
private long LONG_PRESS_TIMEOUT = 1337; // TODO: your timeout here | |
private boolean wasLong = false; | |
@Override | |
public boolean onTouch(View v, MotionEvent event) { | |
Log.d(getClass().getName(), "touch event: " + event.toString()); |
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
### JHW 2018 | |
import numpy as np | |
import umap | |
# This code from the excellent module at: | |
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module | |
import random |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans.xsd"> | |
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> | |
<property name="dataStorageConfiguration"> |
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
# -*- coding: utf-8 -*- | |
import os | |
import StringIO | |
import hashlib | |
try: | |
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
except ImportError: | |
raise ImproperlyConfigured, "Could not load Boto's S3 bindings." |
NewerOlder