For maximum Python 2.x -> Python 3 compatibility:
from future import absolute_import, division, print_function, unicode_literals
clearMessages = function (guild_id, authToken, deleted = new Set(), interval = 1000) { | |
/* | |
* Discord: Don't copy stuff into this box | |
* Me: dOn'T COpy sTuFf iNtO tHIs bOx | |
*/ | |
const searchURL = `https://discordapp.com/api/v6/guilds/${guild_id}/messages/search?include_nsfw=true` | |
const headers = { Authorization: authToken } | |
let clock = 0 | |
function delay(duration) { | |
return new Promise((resolve, reject) => { |
#!/bin/sh | |
set -e | |
NS_DIR=$(pwd) | |
APP_DIR=$1 | |
grunt default --test-app-only=true --runtslint=false | |
rsync -XPav bin/dist/apps/tests/ $1/app/ |
import {Directive, ElementRef, Input} from "angular2/core"; | |
import {View} from "ui/core/view"; | |
@Directive({ | |
selector: '[dump]' | |
}) | |
export class DumpDirective { | |
@Input('dump') name: any; | |
constructor(private element: ElementRef) { |
import * as hookMod from 'angular2/src/router/lifecycle_annotations'; | |
import * as routerMod from 'angular2/src/router/router'; | |
import {isBlank, isPresent} from 'angular2/src/facade/lang'; | |
import {StringMapWrapper} from 'angular2/src/facade/collection'; | |
import {Promise, PromiseWrapper} from 'angular2/src/facade/async'; | |
import {BaseException} from 'angular2/src/facade/exceptions'; | |
import { | |
ElementRef, DynamicComponentLoader, Directive, Injector, provide, ComponentRef, Attribute | |
} from 'angular2/core'; | |
import { |
dist | |
cabal-dev | |
*.o | |
*.hi | |
*.chi | |
*.chs.h | |
.virtualenv | |
.hpc | |
.hsenv | |
.cabal-sandbox/ |
ninja_required_version = 1.6 | |
tsflags = --module commonjs --noEmitOnError --noImplicitAny --emitDecoratorMetadata --experimentalDecorators --target es5 | |
rule tsc | |
command = ./node_modules/.bin/tsc $tsflags "$in" && node build/getrefs.js "$in" "$out" "$in.dep" | |
description = TypeScript compile: $in | |
depfile = "$in.dep" | |
deps = gcc | |
rule dts | |
command = touch "$out" | |
description = TypeScript declarations: $in |
For maximum Python 2.x -> Python 3 compatibility:
from future import absolute_import, division, print_function, unicode_literals
import inspect | |
from functools import wraps | |
def set_attributes(constructor): | |
@wraps(constructor) | |
def wrapped(self, *args, **kwargs): | |
names = inspect.getargspec(constructor).args | |
for (key, value) in dict(zip(names[1:], args)).items(): | |
setattr(self, key, value) | |
for (key, value) in kwargs.items(): |