| Title | Description
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
tasks.withType<Jar> { | |
manifest { | |
attributes["Main-Class"] = "com.example.MainKt" | |
} | |
} |
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 boto3 | |
import base64 | |
if __name__ == '__main__': | |
session = boto3.session.Session() | |
kms = session.client('kms') | |
encrypted_password = 'AQECAHjgTiiE7TYRGp5Irf8jQ3HzlaQaHGYgsUJDaavnHcFm0gAAAGswaQYJKoZIhvcNAQcGoFwwWgIBADBVBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDDwxVQuG0oVwpkU7nQIBEIAoVGk1/wpserb+GVUOzE7PiL/Nr9fTDFKZfpKpF0ip2ct4B2q0Wn6ZZw==' | |
binary_data = base64.b64decode(encrypted_password) |
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 feedparser | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from matplotlib.ticker import FuncFormatter | |
# Local file so none of you see my actual search | |
from rss_feed_url import url | |
def get_houses(url): | |
""" |
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 java.io.{ByteArrayOutputStream, ByteArrayInputStream} | |
import java.util.zip.{GZIPOutputStream, GZIPInputStream} | |
import scala.util.Try | |
object Gzip { | |
def compress(input: Array[Byte]): Array[Byte] = { | |
val bos = new ByteArrayOutputStream(input.length) | |
val gzip = new GZIPOutputStream(bos) |
Here is the raw output from examining the Python LambdaContext context object in a AWS Lambda function when called from a CloudFormation stack. More information on the context object can be found here : http://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html
<__main__.LambdaContext object at 0x7fd706780710>
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
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
#!/bin/sh | |
# create mount point | |
if [ ! -d /ram ] | |
then | |
mkdir /ram | |
fi | |
# create ramfs | |
mount -t ramfs -o size=512M ramfs /ram/ |
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
<?php | |
namespace Acme\DemoBundle\EventSubscriber; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\Form\FormEvents; | |
use Symfony\Component\Form\FormEvent; | |
/** | |
* Changes Form->submit() behavior so that it treats not set values as if they |
I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:
- the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
- set the service for
oauth_user_provider
in thesecurity.yml
with your custom created service
Here are the steps:
- Routing. In
routing.yml
I have added all the routes for both bundles. - Configuration. I have set the
config.yml
mostly as it is presented in the HWIOAuthBundle. - Security. I have set the
security.yml
mostly as it is presented in the HWIOAuthBundle (though my routes are using/login
pattern, not/connect
). Also, theoauth_user_provider
is set for my custom service.
NewerOlder