Skip to content

Instantly share code, notes, and snippets.

View jrobichaud's full-sized avatar

Jules Robichaud-Gagnon jrobichaud

View GitHub Profile
@jrobichaud
jrobichaud / example.py
Created January 19, 2024 20:03 — forked from bblanchon/example.py
Django Subquery Aggregate (Count, Sum...)
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'))
@jrobichaud
jrobichaud / FixAssemblys
Created May 4, 2016 15:15 — forked from horsman/FixAssemblys
FixUnityAssemblys
using UnityEngine;
using System.Collections.Generic;
using UnityEditor;
using System.Text.RegularExpressions;
using System.IO;
using System.Text;
public class ReimportUnityEngineUI
{
[MenuItem( "Assets/Reimport UI Assemblies", false, 100 )]