One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
import discord | |
from discord.ext import commands | |
import sys, traceback | |
"""This is a multi file example showcasing many features of the command extension and the use of cogs. | |
These are examples only and are not intended to be used as a fully functioning bot. Rather they should give you a basic | |
understanding and platform for creating your own bot. | |
These examples make use of Python 3.6.2 and the rewrite version on the lib. |
from django.db.models import Count, Max | |
unique_fields = ['field_1', 'field_2'] | |
duplicates = ( | |
MyModel.objects.values(*unique_fields) | |
.order_by() | |
.annotate(max_id=Max('id'), count_id=Count('id')) | |
.filter(count_id__gt=1) | |
) |
<?php | |
// obligatoire | |
session_start(); | |
require('config/config.inc.php'); | |
require('vendor/autoload.php'); // load des fichiers Facebook | |
use Facebook\FacebookSession; | |
use Facebook\FacebookRedirectLoginHelper; |
Press minus + shift + s
and return
to chop/fold long lines!
BITS = ('0', '1') | |
ASCII_BITS = 8 | |
def bit_list_to_string(b): | |
"""converts list of {0, 1}* to string""" | |
return ''.join([BITS[e] for e in b]) | |
def seq_to_bits(seq): | |
return [0 if b == '0' else 1 for b in seq] |