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
class FeedManager(models.Manager): | |
def to_json(self): | |
l = [] | |
for feed in self.get_query_set(): | |
l.append(feed.dump()) | |
return dumps(l) | |
class Feed(models.Model): | |
owners = models.ManyToManyField(User, related_name='owned_feeds') |
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
%!PS-Adobe-3.0 | |
%%Creator: groff version 1.19.2 | |
%%CreationDate: Sat Mar 24 03:12:37 2012 | |
%%DocumentNeededResources: font Times-Bold | |
%%+ font Courier-Bold | |
%%+ font Times-Roman | |
%%+ font Courier-Oblique | |
%%+ font Symbol | |
%%+ font Courier | |
%%DocumentSuppliedResources: procset grops 1.19 2 |
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
<table><tbody> | |
<tr class="first"> | |
<td colspan='7'>Crop</td> | |
</tr> | |
<tr class="second"> | |
<td></td> | |
<td>Barley Feed</td> | |
<td>Barley Feed</td> | |
<td>Barley Feed</td> | |
<td>Barley Feed</td> |
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
# /feeds/ | |
[ | |
{ | |
"pk": 2, | |
"model": "feeds.feed", | |
"fields": { | |
"school": null, | |
"code": "5551609730", | |
"description": "this is the english lit feed", | |
"title": "English Literature", |
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
BEGIN; | |
CREATE TABLE "feeds_feed_owners" ( | |
"id" integer NOT NULL PRIMARY KEY, | |
"feed_id" integer NOT NULL, | |
"user_id" integer NOT NULL REFERENCES "auth_user" ("id"), | |
UNIQUE ("feed_id", "user_id") | |
) | |
; | |
CREATE TABLE "feeds_feed" ( | |
"id" integer NOT NULL PRIMARY KEY |
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
def karma_cost(self): | |
n = self.karma_transactions.filter( | |
created_ts>=datetime.utcnow() - timedelta(days=3) | |
).count() | |
return pow((n * 5), 1.5) + 25 |
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
public class AircraftID { | |
public String registration; | |
public Pilot pilot; | |
public class Pilot { | |
public String name; | |
public int weight; |
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
class Battery(ampsC: Int, mahC: Int) { | |
val amps: Float = ampsC | |
val mah: Float = mahC | |
def cRating() { | |
val result = amps * 1000 / mah | |
result | |
} |
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
/usr/include/libkern/OSAtomic.h:258: error: declaration for parameter ‘OSAtomicOr32OrigBarrier’ but no such parameter | |
/usr/include/libkern/OSAtomic.h:245: error: declaration for parameter ‘OSAtomicOr32Orig’ but no such parameter | |
/usr/include/libkern/OSAtomic.h:235: error: declaration for parameter ‘OSAtomicOr32Barrier’ but no such parameter | |
/usr/include/libkern/OSAtomic.h:222: error: declaration for parameter ‘OSAtomicOr32’ but no such parameter | |
/usr/include/libkern/OSAtomic.h:160: error: declaration for parameter ‘OSAtomicAdd64Barrier’ but no such parameter | |
/usr/include/libkern/OSAtomic.h:147: error: declaration for parameter ‘OSAtomicAdd64’ but no such parameter | |
/usr/include/libkern/OSAtomic.h:103: error: declaration for parameter ‘OSAtomicAdd32Barrier’ but no such parameter | |
/usr/include/libkern/OSAtomic.h:90: error: declaration for parameter ‘OSAtomicAdd32’ but no such parameter | |
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:391: error |
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
width = 1920 | |
second = 1 | |
int_a,int_b,int_c,int_d,int_e,int_f = 384,320,240,192,160,128 | |
a,b,c,d,e,f = int_a,int_b,int_c,int_d,int_e,int_f | |
status = 'fail' | |
while status == 'fail': | |
if a%1920==0 and b%1920==0 and c%1920==0 and d%1920==0 and e%1920==0 and f%1920==0 and f>=3840: |