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.db.models import OuterRef | |
weapons = Weapon.objects.filter(unit__player_id=OuterRef('id')) | |
units = Unit.objects.filter(player_id=OuterRef('id')) | |
qs = Player.objects.annotate(weapon_count=SubqueryCount(weapons), | |
rarity_sum=SubquerySum(units, 'rarity')) |
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
{"data":"Media\tYear\tMarket Share\n8-track\t1980-01\t14.30\n8-track\t1981-01\t7.90\n8-track\t1982-01\t1.00\n8-track\t1983-01\t0.00\n8-track\t1984-01\t0.00\n8-track\t1985-01\t0.00\n8-track\t1986-01\t0.00\n8-track\t1987-01\t0.00\n8-track\t1988-01\t0.00\n8-track\t1989-01\t0.00\n8-track\t1990-01\t0.00\n8-track\t1991-01\t0.00\n8-track\t1992-01\t0.00\n8-track\t1993-01\t0.00\n8-track\t1994-01\t0.00\n8-track\t1995-01\t0.00\n8-track\t1996-01\t0.00\n8-track\t1997-01\t0.00\n8-track\t1998-01\t0.00\n8-track\t1999-01\t0.00\n8-track\t2000-01\t0.00\n8-track\t2001-01\t0.00\n8-track\t2002-01\t0.00\n8-track\t2003-01\t0.00\n8-track\t2004-01\t0.00\n8-track\t2005-01\t0.00\n8-track\t2006-01\t0.00\n8-track\t2007-01\t0.00\n8-track\t2008-01\t0.00\n8-track\t2009-01\t0.00\n8-track\t2010-01\t0.00\nCassete\t1980-01\t19.10\nCassete\t1981-01\t26.70\nCassete\t1982-01\t38.20\nCassete\t1983-01\t47.80\nCassete\t1984-01\t55.00\nCassete\t1985-01\t55.30\nCassete\t1986-01\t53.90\nCassete\t1987-01\t53.20\nCassete\t1988-01\t54.10\nCassete\t1989-01 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 15 columns, instead of 3. in line 8.
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
Class Survival Name Gender Age group Age Siblings / Spouse aboard Parents / Children aboard Ticket number Fare Fare group Cabin Port of Embarkation Boat Destination | |
1 yes Allen, Miss. Elisabeth Walton female 20 - 29 29 0 0 24160 211.3375 210 B5 Southampton 2 St Louis, MO | |
1 yes Allison, Master. Hudson Trevor male 0 - 9 0.9167 1 2 113781 151.5500 150 C22 C26 Southampton 11 Montreal, PQ / Chesterville, ON | |
1 no Allison, Miss. Helen Loraine female 0 - 9 2 1 2 113781 151.5500 150 C22 C26 Southampton Montreal, PQ / Chesterville, ON | |
1 no Allison, Mr. Hudson Joshua Creighton male 30 - 39 30 1 2 113781 151.5500 150 C22 C26 Southampton Montreal, PQ / Chesterville, ON | |
1 no Allison, Mrs. Hudson J C (Bessie Waldo Daniels) female 20 - 29 25 1 2 113781 151.5500 150 C22 C26 Southampton Montreal, PQ / Chesterville, ON | |
1 yes Anderson, Mr. Harry male 40 - 49 48 0 0 19952 26.5500 30 E12 Southampton 3 New York, NY | |
1 yes Andrews, Miss. Kornelia Theodosia female 60 - 69 63 1 0 13502 77.9583 80 D7 Southampton 10 Hudson, NY | |
1 no An |
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
{ | |
"grid": { | |
"width": 10, | |
"height": 10, | |
"tileSize": 100, | |
"stategy": "random" | |
}, | |
"tileSet": [ | |
{ | |
"component": "SquareDots", |
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
{ | |
"grid": { | |
"width": 20, | |
"height": 20, | |
"tileSize": 100, | |
"stategy": "random" | |
}, | |
"tileSet": [ | |
{ | |
"component": "SimpleDots", |
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/pg_dump -Ft --no-acl --no-owner -h <HOST> -p 5432 -U <USER> <DB_DA_COPIARE> -f /tmp/dump.tar && \ | |
/usr/bin/pg_restore -n public -h <HOST> -p 5432 -U <USER> -d <DB_NUOVO> /tmp/tmp.tar |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div class="selected"></div> | |
<svg id="chart" width="600" height="300"></svg> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script type="text/javascript"> |
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
pg_dump --format=plain --clean --host=$HOST --username=$USER $DB > $OUT_PATH.sql | |
psql -U $USER -d $DB -f $OUT_PATH.sql |
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
mogrify -path getjar/ -resize 480x -gravity center -background black -extent 480x800 -format png amazon/*.png |
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
#museums{ | |
marker-fill: red; | |
} |
NewerOlder