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 python3 | |
import simplekml | |
import urllib.request | |
try: | |
import simplejson as json | |
except ImportError: | |
import json | |
fr24_flight_code = "" |
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
library(shiny) | |
library(datasets) | |
Logged = FALSE; | |
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad") | |
# Define server logic required to summarize and view the selected dataset | |
shinyServer(function(input, output) { | |
source("www/Login.R", local = TRUE) | |
observe({ | |
if (USER$Logged == TRUE) { |
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 | |
class Moesia_Projects_HUI extends WP_Widget { | |
// constructor | |
function moesia_projects_hui() { | |
$widget_ops = array('classname' => 'moesia_projects_hui_widget', 'description' => __( 'Show your most intresting projects.', 'moesia') ); | |
parent::WP_Widget(false, $name = __('Moesia FP: Projects', 'moesia'), $widget_ops); | |
$this->alt_option_name = 'moesia_projects_hui_widget'; | |
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 | |
if ps -ef | grep -v grep | grep tweetHarvest.py ; then | |
exit 0 | |
else | |
python /PATH/TO/YOUR/tweetHarvest.py & | |
#Write note to Logfile | |
echo "[`date`]: twitter.py was not running... Restarted" >> /var/log/twitterHarvest.log | |
exit 0 | |
fi |
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/python | |
# Load twython library | |
import json # Teach python JSON | |
from twython import Twython, TwythonError, TwythonStreamer # Load libraries for twitter API | |
import pymongo # Teach python to talk to MongoDB | |
# Setup Authentificaion Settings | |
APP_KEY = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' # Consumer key | |
APP_SECRET = '123456789ABCdfgHIJ987654321' # Consumer secret |
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
# SOME DESCRIPTIVE TITLE. | |
# Copyright (C) YEAR ORGANIZATION | |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
# | |
msgid "" | |
msgstr "" | |
"Project-Id-Version: PACKAGE VERSION\n" # Versionnumber of your file | |
"POT-Creation-Date: 2013-09-28 12:40+CEST\n" # Creation date | |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" # Revision date | |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" # Contact informations |
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
YOURFILE.py | |
import gettext # module for the string replacement | |
t = gettext.translation('APPNAME', "./locales") # where does gettext find the language files | |
_ = t.ugettext # definition of strings to be translated | |
name = "Dominik" | |
print _("Hello world") | |
print _("My name is: %s") % name |