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 concurrent.futures | |
from functools import wraps | |
from flask import Flask | |
data = None | |
def long_running_initialization(): | |
# Long running initialization code goes here |
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.apps import AppConfig | |
class KombuApp(AppConfig): | |
name = 'kombu.transport.django' | |
label = 'django_kombu' | |
INSTALLED_APPS = ( | |
'myproj.settings.KombuApp', | |
) |
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 csv | |
with open('input.csv', 'rb') as input, open('output.csv', 'wb') as output: | |
reader = csv.reader(input, delimiter=';') | |
writer = csv.writer(output, delimiter=';') | |
for input_row in reader: | |
firstname, name, accno, bsc, amount = input_row | |
output_row = [name, '%s %s' % (firstname, name), accno, bsc, amount] | |
writer.writerow(output_row) |