Note: Tested on Fedora only
- Download the new release of GraalVM and unpack it anywhere in your filesystem:
$ tar -xvzf graalvm-ce-1.0.0-rc14-linux-amd64.tar.gz
""" | |
This little script can generate a valid .vcf (vCard). It will ask you to fill | |
in some details and write the vcf-file. | |
""" | |
def main(): | |
print('Please enter contact details:') | |
first_name = input(' - First name : ') | |
last_name = input(' - Last name : ') | |
email = input(' - E-mail address : ') |
Note: Tested on Fedora only
$ tar -xvzf graalvm-ce-1.0.0-rc14-linux-amd64.tar.gz
def config_color_logging(): | |
"""Configure and return a colored console logger. | |
see https://github.com/borntyping/python-colorlog#usage | |
see https://docs.python.org/3/library/logging.html#logrecord-attributes | |
:return: logger | |
""" | |
import colorlog |
www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).update: A minor variant of the viru
# Quick intro to accessing Stubhub API with Python | |
# Ozzie Liu (ozzie@ozzieliu.com) | |
# Related blog post: http://ozzieliu.com/2016/06/21/scraping-ticket-data-with-stubhub-api/ | |
# Updated 3/5/2017 for Python 3 and Stubhub's InventorySearchAPI - v2 | |
import requests | |
import base64 | |
import json | |
import pprint | |
import pandas as pd |
package org.hibernate.test; | |
import com.google.inject.AbstractModule; | |
import com.google.inject.Inject; | |
import com.google.inject.Singleton; | |
import com.google.inject.persist.PersistService; | |
import com.google.inject.persist.jpa.JpaPersistModule; | |
public class DatabaseTestModule extends AbstractModule { |
import akka.actor._ | |
import akka.stream.scaladsl.Flow | |
import org.apache.spark.streaming.dstream.ReceiverInputDStream | |
import org.apache.spark.streaming.receiver.ActorHelper | |
import akka.actor.{ ExtensionKey, Extension, ExtendedActorSystem } | |
import scala.reflect.ClassTag | |
object AkkaStreamSparkIntegration { |
Here are 10 one-liners which show the power of scala programming, impress your friends and woo women; ok, maybe not. However, these one liners are a good set of examples using functional programming and scala syntax you may not be familiar with. I feel there is no better way to learn than to see real examples.
Updated: June 17, 2011 - I'm amazed at the popularity of this post, glad everyone enjoyed it and to see it duplicated across so many languages. I've included some of the suggestions to shorten up some of my scala examples. Some I intentionally left longer as a way for explaining / understanding what the functions were doing, not necessarily to produce the shortest possible code; so I'll include both.
The map
function takes each element in the list and applies it to the corresponding function. In this example, we take each element and multiply it by 2. This will return a list of equivalent size, compare to o
This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages
branch using Travis CI.
This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.
Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.
To create a clean gh-pages
branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md
in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th