This file contains hidden or 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
# Save document to memory and download to the user's browser | |
document_data = io.BytesIO() | |
document.save(document_data) | |
document_data.seek(0) | |
response = HttpResponse( | |
document_data.getvalue(), | |
content_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document", | |
) | |
response["Content-Disposition"] = 'attachment; filename = "Carta de Presentación.docx"' |
This file contains hidden or 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
def coverletter_export(request): | |
document = Document() | |
# Get the user's fullname | |
if request.user.get_full_name(): | |
document_data_full_name = request.user.get_full_name() | |
else: | |
document_data_full_name = "[NOMBRE] [APELLIDOS]" | |
# Print the user's name |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains hidden or 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
Wed Apr 01 10:38:40 +0000 2020 ullsverds | |
Wed Apr 01 10:33:13 +0000 2020 cuacat | |
Wed Apr 01 10:31:46 +0000 2020 Eloierc | |
Wed Apr 01 10:29:06 +0000 2020 Azo0ka | |
Wed Apr 01 10:19:00 +0000 2020 Anna83_ | |
Wed Apr 01 10:02:30 +0000 2020 pedrobelio | |
Wed Apr 01 10:02:05 +0000 2020 arnau_vilar | |
Wed Apr 01 10:01:02 +0000 2020 Jcorominasvidal | |
Wed Apr 01 09:53:30 +0000 2020 eloi_gp | |
Wed Apr 01 09:53:15 +0000 2020 Kilauea22 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains hidden or 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
created_at user__name user__screen_name | |
Wed Apr 01 10:38:40 +0000 2020 pàjara a la parra ❤ ullsverds | |
Wed Apr 01 10:33:13 +0000 2020 David ||*|| DUI cuacat | |
Wed Apr 01 10:31:46 +0000 2020 Eloi Eloierc | |
Wed Apr 01 10:29:06 +0000 2020 ||*|| 🎗️ Andrea Sediciosa ⚧ 🏳️🌈 Azo0ka | |
Wed Apr 01 10:19:00 +0000 2020 Anna Candela Anna83_ | |
Wed Apr 01 10:02:30 +0000 2020 Pedro pedrobelio | |
Wed Apr 01 10:02:05 +0000 2020 Arnau González Vilar arnau_vilar | |
Wed Apr 01 10:01:02 +0000 2020 Joan Corominas Vidal Jcorominasvidal | |
Wed Apr 01 09:53:30 +0000 2020 eloi eloi_gp |
This file contains hidden or 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 python | |
"""Django's command-line utility for administrative tasks.""" | |
import os | |
import sys | |
def main(): | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tu_app.settings.local') | |
try: | |
from django.core.management import execute_from_command_line |
This file contains hidden or 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 heapq | |
import fileinput | |
class Node: | |
def __init__(self, state, parent=None, action=None, cost=0): | |
self.state = state | |
self.parent = parent | |
self.action = action |
This file contains hidden or 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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <stdio.h> | |
using namespace std; | |
struct lletra { | |
int x, y, cops; | |
char digit; |
This file contains hidden or 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
#include <string> | |
#include <fstream> | |
#include <sstream> | |
#include <iostream> | |
#include <gmp.h> | |
using namespace std; | |
void print_nums(unsigned int a1, unsigned int b1, int contador) |
This file contains hidden or 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
#include <algorithm> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
const unsigned MAX_NUM = 1000000; | |
const unsigned char NOT_KNOWN = 0; | |
const unsigned char KNOWN_GOOD = 1; | |
const unsigned char KNOWN_BAD = 2; |
NewerOlder