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
## See https://github.com/FactoryBoy/factory_boy/issues/836 | |
import inspect | |
from typing import Literal, get_args, get_origin | |
import factory | |
import factory.fuzzy | |
from dataclasses import Field, MISSING, is_dataclass | |
from enum import Enum | |
from datetime import date, datetime | |
def get_auto_field(field: Field): |
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
from django.apps import apps | |
from django.db.migrations.autodetector import MigrationAutodetector | |
from django.db.migrations.loader import MigrationLoader, MIGRATIONS_MODULE_NAME | |
from django.db.migrations.questioner import NonInteractiveMigrationQuestioner | |
from django.db.migrations.state import ProjectState | |
from django.test import override_settings, TestCase | |
class CustomMigrationLoader(MigrationLoader): |
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
From 99f8aa54e10c1c712d67c775151581ee88c40688 Mon Sep 17 00:00:00 2001 | |
From: Eugene Morozov <[email protected]> | |
Date: Wed, 30 Nov 2022 18:14:13 +0300 | |
Subject: [PATCH] Adds xkb support. | |
--- | |
config.def.h | 13 ++++-- | |
dwm.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2 files changed, 126 insertions(+), 3 deletions(-) |
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 sys | |
import struct | |
data = open(sys.argv[1], 'rb').read() | |
start = 0 | |
client_id, action, transaction_id, infohash, peer_id, downloaded, left, uploaded, event, ip, key, num_want, port, extensions, s_len = ( | |
struct.unpack('!QII20s20sQQQIIIiHHB', data) | |
) |
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
default_language_version: | |
python: python3.10 | |
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.0.1 | |
hooks: | |
- id: check-merge-conflict | |
- id: end-of-file-fixer | |
- id: trailing-whitespace |
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
Render Time: | |
Photon Time: 0 hours 0 minutes 1 seconds (1.160 seconds) | |
using 15 thread(s) with 1.347 CPU-seconds total | |
Radiosity Time: No radiosity | |
Trace Time: 0 hours 1 minutes 55 seconds (115.168 seconds) | |
using 12 thread(s) with 1363.761 CPU-seconds total |
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
name: CI | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: |
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
""" | |
Originaly code was taken from: http://djangosnippets.org/snippets/290/ | |
But I was made some improvements like: | |
- print URL from what queries was | |
- don't show queries from static URLs (MEDIA_URL and STATIC_URL, also for /favicon.ico). | |
- If DEBUG is False tell to django to not use this middleware | |
- Remove guessing of terminal width (This breaks the rendered SQL) | |
""" | |
try: | |
import cProfile as profile |
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
# -*- coding: utf-8 -*- | |
# Based on https://gist.github.com/voldmar/1264102 | |
# and https://gist.github.com/runekaagaard/2eecf0a8367959dc634b7866694daf2c | |
import gc | |
import inspect | |
import weakref | |
from collections import defaultdict | |
from django.apps import apps |
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
for branch in (git branch | awk '{ print $1 }') | |
if git log develop | grep $branch > /dev/null 2>&1 | |
echo Merged $branch | |
end | |
end |