Search is not available for this dataset
id
int64
0
10.8M
vector
listlengths
1.54k
1.54k
ast_depth
int64
3
164
ast_data
stringlengths
297
510k
full_path
stringlengths
0
319
code
stringlengths
60
56.5k
10,301
[ 0.011194105260074139, -0.013762393034994602, 0.026642749086022377, -0.0489271879196167, -0.0202090572565794, 0.025254834443330765, -0.027291305363178253, -0.008528533391654491, 0.055983494967222214, 0.05095069110393524, 0.03185715153813362, -0.019443757832050323, -0.035981979221105576, 0.0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_circfuncs_small(self): x = np.array([20,21,22,18,19,20.5,19.2]) M1 = x.mean() M2 = stats.circmean(x, high=360) assert_allclose(M2, M1, rtol=1e-5) V1 = x.var() V2 = stats.circvar(x, high=360) assert_allclose(V2, V1, rtol=1e-4) S1 = x.std() ...
10,302
[ 0.04022455960512161, -0.01306878961622715, 0.03622366487979889, -0.027862515300512314, -0.004650739952921867, 0.02484387718141079, -0.028844770044088364, -0.027646897360682487, 0.048609666526317596, 0.04987941309809685, 0.018255578354001045, -0.01621919497847557, -0.023418407887220383, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_circmean_axis(self): x = np.array([[355,5,2,359,10,350], [351,7,4,352,9,349], [357,9,8,358,4,356]]) M1 = stats.circmean(x, high=360) M2 = stats.circmean(x.ravel(), high=360) assert_allclose(M1, M2, rtol=1e-14) M1 = stats.circm...
10,303
[ -0.0036146726924926043, -0.0174590852111578, 0.015409433282911777, -0.038869306445121765, -0.02629975415766239, 0.018027061596512794, -0.06598398089408875, -0.044549066573381424, 0.04163510352373123, 0.045018263161182404, 0.04012873396277428, -0.02126205526292324, -0.0029540921095758677, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_circvar_axis(self): x = np.array([[355,5,2,359,10,350], [351,7,4,352,9,349], [357,9,8,358,4,356]]) V1 = stats.circvar(x, high=360) V2 = stats.circvar(x.ravel(), high=360) assert_allclose(V1, V2, rtol=1e-11) V1 = stats.circvar(x, ...
10,304
[ 0.02817082405090332, -0.03177927806973457, 0.043525416404008865, -0.017619207501411438, 0.003163618501275778, 0.01825379766523838, -0.05459963530302048, -0.027050958946347237, 0.03060964122414589, 0.03618407994508743, 0.026603013277053833, -0.02966397814452648, -0.015777653083205223, 0.056...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_circstd_axis(self): x = np.array([[355,5,2,359,10,350], [351,7,4,352,9,349], [357,9,8,358,4,356]]) S1 = stats.circstd(x, high=360) S2 = stats.circstd(x.ravel(), high=360) assert_allclose(S1, S2, rtol=1e-11) S1 = stats.circstd...
10,305
[ -0.015588155947625637, -0.0005647584912367165, 0.01238114945590496, 0.0025366898626089096, -0.03546108305454254, 0.006841176189482212, -0.03475133702158928, -0.005937562789767981, 0.014825834892690182, 0.05583346262574196, 0.033174119889736176, -0.0006074747652746737, 0.030019685626029968, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"c...
def test_accuracy_wilcoxon(): freq = [1, 4, 16, 15, 8, 4, 5, 1, 2] nums = range(-4, 5) x = np.concatenate([[u] * v for u, v in zip(nums, freq)]) y = np.zeros(x.size) T, p = stats.wilcoxon(x, y, "pratt") assert_allclose(T, 423) assert_allclose(p, 0.00197547303533107) T, p = stats.wilcox...
10,306
[ -0.037859320640563965, -0.018122736364603043, 0.00044397395686246455, 0.011878990568220615, -0.03783286735415459, -0.01645597442984581, -0.004150371067225933, -0.013704492710530758, 0.015701962634921074, 0.01580778881907463, 0.0040710014291107655, 0.005701386369764805, 0.008604993112385273, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def test_wilcoxon_tie(): # Regression test for gh-2391. # Corresponding R code is: # > result = wilcox.test(rep(0.1, 10), exact=FALSE, correct=FALSE) # > result$p.value # [1] 0.001565402 # > result = wilcox.test(rep(0.1, 10), exact=FALSE, correct=TRUE) # > result$p.value # [1...
10,307
[ -0.002709844848141074, -0.018200073391199112, 0.056516021490097046, -0.0171035323292017, 0.007014086935669184, 0.0035101943649351597, 0.0009515966521576047, -0.022334162145853043, -0.0027917702682316303, 0.02856050431728363, 0.013927342370152473, -0.046130381524562836, 0.011633426882326603, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class TestMedianTest(TestCase): def test_bad_n_samples(self): # median_test requires at least two samples. assert_raises(ValueError, stats.median_test, [1, 2, 3]) def test_empty_sample(self): # Each sample must contain at least one value. assert_raises(ValueError, stats.median_...
10,308
[ 0.008231192827224731, 0.0030985234770923853, 0.05212457850575447, -0.02601183019578457, -0.031738974153995514, -0.004263820592314005, 0.03469084948301315, -0.0036015408113598824, -0.011429058387875557, -0.013497893698513508, 0.034388091415166855, -0.018821362406015396, 0.0317642018198967, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_ties_options(self): # Test the contingency table calculation. x = [1, 2, 3, 4] y = [5, 6] z = [7, 8, 9] # grand median is 5. # Default 'ties' option is "below". stat, p, m, tbl = stats.median_test(x, y, z) assert_equal(m, 5) assert_equal(...
10,309
[ 0.017574666067957878, -0.05338849127292633, 0.004428036976605654, -0.013083618134260178, 0.017563210800290108, 0.005072479601949453, 0.022249024361371994, -0.012293101288378239, 0.042596228420734406, 0.009125308133661747, 0.025731878355145454, -0.023738402873277664, 0.040075741708278656, 0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_simple(self): x = [1, 2, 3] y = [1, 2, 3] stat, p, med, tbl = stats.median_test(x, y) # The median is floating point, but this equality test should be safe. assert_equal(med, 2.0) assert_array_equal(tbl, [[1, 1], [2, 2]]) # The expected values of the c...
10,310
[ 0.06531311571598053, 0.03942080959677696, -0.08112623542547226, 0.011535067111253738, 0.018881672993302345, 0.07301809638738632, -0.01665305346250534, 0.01761617511510849, 0.05814569443464279, 0.03433642163872719, 0.03910723701119423, 0.0042920527048408985, 0.004726017825305462, 0.00685944...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "comment", "annotation": null, "type_comment": null}}], "kwarg"...
def perform_delete(request, comment): flag, created = comments.models.CommentFlag.objects.get_or_create( comment = comment, user = request.user, flag = comments.models.CommentFlag.MODERATOR_DELETION ) comment.is_removed = True comment.save() signals.comment_was_flagged....
10,311
[ 0.014291654340922832, -0.03525860235095024, 0.0369148813188076, -0.012886329554021358, 0.01018860749900341, -0.0006485512712970376, 0.026475321501493454, 0.029687494039535522, -0.0050692083314061165, 0.01591028831899166, 0.024367334321141243, -0.0189091507345438, 0.0023181592114269733, 0.0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_basic(self): # median_test calls chi2_contingency to compute the test statistic # and p-value. Make sure it hasn't screwed up the call... x = [1, 2, 3, 4, 5] y = [2, 4, 6, 8] stat, p, m, tbl = stats.median_test(x, y) assert_equal(m, 4) assert_equal(tbl...
10,312
[ 0.008441201411187649, -0.012643440626561642, -0.019526509568095207, -0.015130158513784409, -0.016200391575694084, 0.0146999666467309, 0.05384741723537445, 0.0065578012727200985, 0.005185909103602171, 0.023985814303159714, -0.009763254784047604, -0.10047600418329239, -0.04465600103139877, -...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "timeout", "annotation"...
class DownloadTimeoutMiddleware(object): def __init__(self, timeout=180): self._timeout = timeout @classmethod def from_crawler(cls, crawler): o = cls(crawler.settings.getfloat('DOWNLOAD_TIMEOUT')) crawler.signals.connect(o.spider_opened, signal=signals.spider_opened) retur...
10,313
[ 0.0409325510263443, 0.03823758661746979, -0.0820860043168068, 0.02319437637925148, 0.014656636863946915, 0.041241809725761414, -0.02321646548807621, 0.008145644329488277, 0.04987895488739014, 0.04022567719221115, 0.07227809727191925, -0.0035757997538894415, -0.007654144428670406, 0.0376411...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "comment", "annotation": null, "type_comment": null}}], "kwarg"...
def perform_approve(request, comment): flag, created = comments.models.CommentFlag.objects.get_or_create( comment = comment, user = request.user, flag = comments.models.CommentFlag.MODERATOR_APPROVAL, ) comment.is_removed = False comment.is_public = True comment.save()...
10,314
[ 0.05561693757772446, -0.027481310069561005, 0.02315814606845379, -0.003864559344947338, -0.03549669310450554, -0.024022778496146202, 0.05786031112074852, -0.035333115607500076, 0.028322575613856316, -0.014149603433907032, 0.03895522654056549, -0.042834389954805374, -0.021054983139038086, 0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "spi", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def __init__(self, spi, cs): self.spi = spi self.cs = cs self.cmdbuf = bytearray(6) self.dummybuf = bytearray(512) for i in range(512): self.dummybuf[i] = 0xff self.dummybuf_memoryview = memoryview(self.dummybuf) # initialise the card self.in...
10,315
[ 0.04317857325077057, -0.04445561766624451, 0.03575725480914116, -0.02616737224161625, 0.001841775723733008, -0.005767785012722015, 0.047322943806648254, -0.008614028804004192, 0.0276371780782938, -0.03142012283205986, 0.05725016072392464, -0.02850460447371006, -0.06023796275258064, 0.01840...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 100}}], "func": {"_type": "Name", "_fields": {"id": "const", "ctx": {"_type": "Load", "_fields": {}...
class SDCard: CMD_TIMEOUT = const(100) R1_IDLE_STATE = const(1 << 0) #R1_ERASE_RESET = const(1 << 1) R1_ILLEGAL_COMMAND = const(1 << 2) #R1_COM_CRC_ERROR = const(1 << 3) #R1_ERASE_SEQUENCE_ERROR = const(1 << 4) #R1_ADDRESS_ERROR = const(1 << 5) #R1_PARAMETER_ERROR = const(1 << 6) d...
10,316
[ 0.028076661750674248, -0.054130226373672485, 0.04976329579949379, -0.031333357095718384, -0.016900276765227318, -0.009831766597926617, 0.05299531668424606, -0.009850270114839077, 0.04596381634473801, -0.013569564558565617, 0.05477169528603554, -0.020662745460867882, -0.06799585372209549, 0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def init_card(self): # init CS pin self.cs.high() self.cs.init(self.cs.OUT_PP) # init SPI bus; use low data rate for initialisation self.spi.init(self.spi.MASTER, baudrate=100000, phase=0, polarity=0) # clock card at least 100 cycles with cs high for i in range(...
10,317
[ 0.04157738387584686, -0.06353136152029037, 0.03689293563365936, -0.014810778200626373, -0.021045055240392685, -0.005677853245288134, 0.04015573859214783, 0.033257246017456055, 0.015346809290349483, 0.0011376099428161979, 0.03805822134017944, -0.003731826553121209, -0.06385764479637146, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def init_card_v1(self): for i in range(CMD_TIMEOUT): self.cmd(55, 0, 0) if self.cmd(41, 0, 0) == 0: self.cdv = 512 #print("[SDCard] v1 card") return raise OSError("timeout waiting for v1 card")
10,318
[ 0.045953478664159775, -0.060055606067180634, 0.028568962588906288, -0.024472050368785858, -0.022137906402349472, 0.020727694034576416, 0.04845782369375229, 0.04228206351399422, 0.0293470099568367, 0.017931582406163216, 0.040969107300043106, -0.029103869572281837, -0.055435944348573685, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def init_card_v2(self): for i in range(CMD_TIMEOUT): pyb.delay(50) self.cmd(58, 0, 0, 4) self.cmd(55, 0, 0) if self.cmd(41, 0x40000000, 0) == 0: self.cmd(58, 0, 0, 4) self.cdv = 1 #print("[SDCard] v2 card") ...
10,319
[ 0.04316654056310654, -0.0003507281362544745, 0.05930003523826599, 0.01318602915853262, -0.0019913939759135246, 0.005655491258949041, 0.0019205737626180053, 0.012855535373091698, 0.011391920037567616, 0.07144062221050262, 0.046511948108673096, -0.029137413948774338, -0.005240687634795904, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cmd", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def cmd(self, cmd, arg, crc, final=0, release=True): self.cs.low() # create and send the command buf = self.cmdbuf buf[0] = 0x40 | cmd buf[1] = arg >> 24 buf[2] = arg >> 16 buf[3] = arg >> 8 buf[4] = arg buf[5] = crc self.spi.send(buf) ...
10,320
[ 0.04939025267958641, -0.01241725217550993, 0.026025546714663506, -0.012087814509868622, 0.0076087345369160175, 0.0014420801308006048, 0.007862147875130177, -0.01303811464458704, 0.018575195223093033, 0.03241156041622162, 0.037429146468639374, 0.029066506773233414, -0.07004343718290329, 0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "buf", "annotation": null, "type_comment": null}}], "kwarg": null,...
def write(self, buf): self.cs.low() # send: start of block, data, checksum self.spi.send(0xfe) self.spi.send(buf) self.spi.send(0xff) self.spi.send(0xff) # check the response if (self.spi.send_recv(0xff)[0] & 0x1f) != 0x05: self.cs.high() ...
10,321
[ 0.04561438411474228, 0.01797548308968544, -0.00021971363457851112, -0.0013800326269119978, 0.015693489462137222, 0.005325715057551861, 0.011161372996866703, 0.02290917932987213, 0.02067817933857441, 0.009797275997698307, 0.034650612622499466, 0.009548678994178772, -0.04770514741539955, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "buf", "annotation": null, "type_comment": null}}], "kwarg": null,...
def readinto(self, buf): self.cs.low() # read until start byte (0xff) while self.spi.send_recv(0xff)[0] != 0xfe: pass # read data mv = self.dummybuf_memoryview[:len(buf)] self.spi.send_recv(mv, recv=buf) # read checksum self.spi.send(0xff) ...
10,322
[ 0.05790804326534271, 0.0011244280030950904, -0.0051887668669223785, 0.013071475550532341, 0.014804968610405922, -0.0047817472368478775, -0.0052736843936145306, -0.010260405950248241, -0.010225267149508, 0.004386440385133028, 0.033334605395793915, 0.01156638190150261, -0.010857758112251759, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "block_num", "annotation": null, "type_comment": null}}, {"_type":...
def readblocks(self, block_num, buf): # TODO support multiple block reads assert len(buf) == 512 # CMD17: set read address for single block if self.cmd(17, block_num * self.cdv, 0) != 0: return 1 # receive the data self.readinto(buf) return 0
10,323
[ 0.07939942181110382, -0.02356957085430622, 0.026709146797657013, 0.004709363915026188, 0.0062393383122980595, -0.03419407829642296, 0.03303379938006401, -0.02203390747308731, -0.005164375063031912, 0.009606420062482357, 0.04359005391597748, 0.04536459594964981, -0.035786617547273636, 0.012...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "block_num", "annotation": null, "type_comment": null}}, {"_type":...
def writeblocks(self, block_num, buf): # TODO support multiple block writes assert len(buf) == 512 # CMD24: set write address for single block if self.cmd(24, block_num * self.cdv, 0) != 0: return 1 # send the data self.write(buf) return 0
10,324
[ 0.02603394165635109, 0.013252134434878826, 0.04540031775832176, 0.01396454032510519, 0.014497115276753902, -0.01301005482673645, 0.01850872114300728, -0.01155757624655962, -0.026697931811213493, -0.007947131060063839, -0.0013807188952341676, -0.014192786999046803, -0.020625190809369087, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": {"_type": "arg", "_fields": {"arg": "xin", "annotation": null, "type_comment": null}}, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "...
def get(*xin): # OeQ autogenerated correlation for 'NULL' TOTAL_LIVING_AREA= oeq.correlation( const= 16.9612111141, a= 37.3699270344, b= -25.066880729, c= 6.04869046956, d= -0.472322343882, mode= "log") return dict(TOTAL_LIVING_AREA=TOTAL_LIVING_AREA.lookup(*xin))
10,325
[ -0.023516861721873283, 0.020102761685848236, 0.06985428929328918, -0.03773479163646698, 0.013151024468243122, 0.02486453391611576, -0.016183285042643547, -0.018070023506879807, -0.004152511712163687, -0.03712834045290947, 0.00009142404451267794, 0.01480192132294178, 0.03286071494221687, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "vcpus"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "at...
class BaseUsageTable(tables.DataTable): vcpus = tables.Column('vcpus', verbose_name=_("VCPUs")) disk = tables.Column('local_gb', verbose_name=_("Disk")) memory = tables.Column('memory_mb', verbose_name=_("RAM"), filters=(sizeformat.mbformat,), ...
10,326
[ -0.007079701870679855, 0.02800239622592926, 0.07733994722366333, -0.010458521544933319, -0.020148616284132004, 0.0007352323736995459, -0.02614912949502468, -0.012498244643211365, -0.01637428253889084, -0.04416196793317795, 0.0022459549363702536, -0.008882115595042706, 0.01901857554912567, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "project_name"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {...
class GlobalUsageTable(BaseUsageTable): project = tables.Column('project_name', verbose_name=_("Project Name")) disk_hours = tables.Column('disk_gb_hours', verbose_name=_("Disk GB Hours"), filters=(lambda v: floatformat(v, 2),)) def get_object_i...
10,327
[ -0.01767497882246971, 0.004227237775921822, 0.07110545784235, -0.034809231758117676, -0.016694912686944008, 0.01901552826166153, -0.023014647886157036, -0.01706666126847267, -0.02521134726703167, -0.03273645043373108, 0.018677575513720512, -0.024062303826212883, 0.036228638142347336, -0.01...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "name"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "att...
class ProjectUsageTable(BaseUsageTable): instance = tables.Column('name', verbose_name=_("Instance Name"), link=get_instance_link) uptime = tables.Column('uptime_at', verbose_name=_("Uptime"), filters...
10,328
[ 0.013216185383498669, 0.04134920984506607, 0.01659526117146015, -0.018229221925139427, -0.028699908405542374, 0.044528208673000336, 0.040504440665245056, 0.011504417285323143, -0.011871224269270897, 0.021419335156679153, -0.0030344983097165823, -0.022208526730537415, 0.01252703182399273, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "parsed", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": ...
def _start_server(parsed): try: thread = threading.Thread(target=_cron_loop) thread.start() run_simple( etc.host, etc.port, application, processes=1, # ensure db integrety, avoid race conditions ssl_context=_ssl_context(parsed) ) ...
10,329
[ -0.0023949111346155405, 0.00711484020575881, 0.012963044457137585, -0.04119418188929558, 0.002125323051586747, 0.026222778484225273, 0.006589928176254034, -0.010224373079836369, -0.005157831124961376, 0.0529932901263237, 0.04000742360949516, -0.053038936108350754, -0.00236780964769423, -0....
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "serve", "annotation": null, "type_comment": null}}], "kwarg": nul...
def main(args, serve=True): # show version if "--version" in args: print(__version__) return __version__ # parse args and initialize parsed = cli.parse(args) lib.initialize(parsed) if serve: return _start_server(parsed)
10,330
[ 0.024753693491220474, 0.03916584327816963, 0.04782963544130325, -0.051652707159519196, -0.023791048675775528, 0.01934913732111454, 0.01167549192905426, -0.023117199540138245, -0.03680048882961273, 0.03311493992805481, 0.018867814913392067, -0.022594621405005455, 0.01632368564605713, 0.0178...
8
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class testRule(nct): def setUpRule(self): ruleManager.AddFileStartRule(RunRule) def test1(self): self.Analyze("thisfile.c",""" // license // copyright """) assert not CheckErrorContent(__name__) def test2(self): self.Analyze("thisfile.c", """ /** #if 0 #endif license coryrigh...
10,331
[ 0.030400266870856285, 0.08735765516757965, -0.0213097482919693, -0.06656525284051895, -0.006442195735871792, 0.007347552105784416, 0.0009561671759001911, -0.002568255877122283, -0.0021787062287330627, 0.049000103026628494, 0.021937955170869827, -0.021211206912994385, 0.023403771221637726, ...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "lexer", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "filename", "annotation": null, "type_comment": null}}, {"_type":...
def RunRule(lexer, filename, dirname) : t = lexer.GetNextTokenSkipWhiteSpace() if t == None : return if t.type == "COMMENT" : if t.value.lower().find("copyright") == -1 : nsiqcppstyle_reporter.Error(DummyToken(lexer.filename, "", 1, 0), __name__, "Please provide file info comment in fro...
10,332
[ 0.004018837586045265, -0.025084836408495903, 0.08134856075048447, -0.007587200962007046, -0.007779538631439209, 0.03739442303776741, 0.05648643523454666, 0.014263330958783627, -0.013686318881809711, -0.018261922523379326, 0.003105235518887639, 0.002545938827097416, -0.016156334429979324, -...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}...
def update_connections_time_zone(**kwargs): if kwargs['setting'] == 'TIME_ZONE': # Reset process time zone if hasattr(time, 'tzset'): if kwargs['value']: os.environ['TZ'] = kwargs['value'] else: os.environ.pop('TZ', None) time.tzset...
10,333
[ 0.04073745757341385, -0.007417786866426468, 0.027025314047932625, -0.02931416966021061, 0.01909830793738365, 0.04308931156992912, 0.04273233190178871, 0.0185733400285244, 0.006079120561480522, 0.03870058432221413, -0.012231736443936825, 0.008992688730359077, 0.028453223407268524, -0.016357...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}, {"_type": "arg...
def __init__(self, path=None, fp=None, do_load=True): # We don't use ``super`` here, because ``ConfigParser`` still uses # old-style classes. ConfigParser.__init__(self, {'working_dir': '/mnt/pyami', 'debug': '0'}) if do_load: if path:...
10,334
[ 0.00867222249507904, 0.03435554355382919, -0.016042308881878853, 0.0040235985070466995, -0.005458551924675703, 0.04583516716957092, -0.004463720601052046, -0.027501100674271584, 0.013302615843713284, -0.025542689487338066, 0.034147199243307114, -0.018136143684387207, 0.016240233555436134, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "section", "annotation": null, "type_comment": null}}, {"_type": "...
def getbool(self, section, name, default=False): if self.has_option(section, name): val = self.get(section, name) if val.lower() == 'true': val = True else: val = False else: val = default return val
10,335
[ 0.008175614289939404, 0.03898265212774277, -0.0006204015808179975, -0.038920674473047256, 0.058546282351017, -0.016175631433725357, 0.016640448942780495, -0.01013301033526659, -0.024025874212384224, 0.059124719351530075, 0.016092997044324875, 0.011847668327391148, 0.07486652582883835, 0.00...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": null...
def load_from_path(self, path): file = open(path) for line in file.readlines(): match = re.match("^#import[\s\t]*([^\s^\t]*)[\s\t]*$", line) if match: extended_file = match.group(1) (dir, file) = os.path.split(path) self.load_from_p...
10,336
[ 0.0500795803964138, -0.011338110081851482, 0.035851363092660904, -0.04401854798197746, 0.0061955926939845085, 0.019072363153100014, 0.004656932782381773, 0.024384543299674988, 0.05447909235954285, -0.03180287405848503, 0.02658429928123951, -0.007781056221574545, -0.012531595304608345, -0.0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fp", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def dump_safe(self, fp=None): if not fp: fp = StringIO() for section in self.sections(): fp.write('[%s]\n' % section) for option in self.options(section): if option == 'aws_secret_access_key': fp.write('%s = xxxxxxxxxxxxxxxxxx\n' % ...
10,337
[ 0.011568776331841946, 0.012974629178643227, 0.007351216860115528, -0.024318039417266846, -0.008977069519460201, 0.022193163633346558, 0.023051699623465538, -0.012491703033447266, 0.02365267463028431, -0.028524868190288544, -0.003780242521315813, -0.015668287873268127, -0.0017747554229572415,...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": nu...
class MicrosecAdapter(Adapter): def _decode(self, obj, context): return datetime.fromtimestamp(obj[0] + (obj[1] / 1000000.0)) def _encode(self, obj, context): offset = time.mktime(*obj.timetuple()) sec = int(offset) usec = (offset - sec) * 1000000 return (sec, usec)
10,338
[ 0.034068770706653595, 0.028751978650689125, 0.07371243089437485, -0.018131297081708908, 0.02537091076374054, 0.0214865542948246, 0.008710765279829502, -0.01669885963201523, -0.036262594163417816, 0.04671551287174225, 0.01951211504638195, 0.0031020003370940685, -0.017357006669044495, 0.0215...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "lines", "annotation": null, "type_comment": null}}], "kwarg": nul...
def pushlines(self, lines): # Crack into lines, but preserve the newlines on the end of each parts = NLCRE_crack.split(data) # The *ahem* interesting behaviour of re.split when supplied grouping # parentheses is that the last element of the resulting list is the # data after the ...
10,339
[ 0.052128806710243225, 0.04196110740303993, 0.03589661791920662, 0.005538685712963343, 0.044773999601602554, 0.04629657417535782, -0.009309637360274792, 0.02094184421002865, -0.03814176842570305, 0.048980433493852615, 0.017974115908145905, -0.03341921046376228, -0.04224497824907303, 0.02385...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def readline(self): if not self._lines: if self._closed: return '' return NeedMoreData # Pop the line off the stack and see if it matches the current # false-EOF predicate. line = self._lines.pop() # RFC 2046, section 5.1.2 requires us to r...
10,340
[ 0.02646126225590706, 0.01566535234451294, -0.004625970032066107, 0.03895553946495056, 0.010041739791631699, 0.016841143369674683, -0.00785049144178629, 0.023278309032320976, 0.0115975858643651, -0.004311237949877977, -0.017197445034980774, -0.003111692378297448, -0.008824379183351994, 0.01...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _new_message(self): msg = self._factory() if self._cur and self._cur.get_content_type() == 'multipart/digest': msg.set_default_type('message/rfc822') if self._msgstack: self._msgstack[-1].attach(msg) self._msgstack.append(msg) self._cur = msg s...
10,341
[ 0.03391633927822113, 0.0229361392557621, 0.059483278542757034, -0.0040110452100634575, 0.036065444350242615, 0.01452498696744442, -0.0005723999347537756, -0.0006839465349912643, 0.008621122688055038, 0.015735402703285217, 0.01761278137564659, -0.013919779099524021, -0.018415607511997223, 0...
17
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _parsegen(self): # Create a new message and start by parsing headers. self._new_message() headers = [] # Collect the headers, searching for a line that doesn't match the RFC # 2822 header or continuation pattern (including an empty line). for line in self._input: ...
10,342
[ 0.010238997638225555, -0.014110887423157692, 0.024688316509127617, -0.023082200437784195, -0.026592712849378586, 0.015028668567538261, 0.036435917019844055, 0.0011486606672406197, -0.02858888730406761, 0.035793472081422806, 0.006533455569297075, -0.006470358464866877, -0.014535361900925636, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class BulkSaveTests(PostgreSQLTestCase): def test_bulk_update(self): test_data = [ (IntegerArrayModel, "field", [], [1, 2, 3]), (NullableIntegerArrayModel, "field", [1, 2, 3], None), (NestedIntegerArrayModel, "field", [], [[1, 2, 3]]), (HStoreModel, "field", {...
10,343
[ 0.011639154516160488, 0.04246038571000099, 0.06273088604211807, -0.028697039932012558, 0.0467204675078392, -0.010170361958444118, -0.017847873270511627, -0.0316697359085083, -0.009444743394851685, 0.03368274122476578, 0.01251106709241867, -0.0024006853345781565, -0.023828374221920967, 0.02...
15
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "lines", "annotation": null, "type_comment": null}}], "kwarg": nul...
def _parse_headers(self, lines): # Passed a list of lines that make up the headers for the current msg lastheader = '' lastvalue = [] for lineno, line in enumerate(lines): # Check for continuation if line[0] in ' \t': if not lastheader: ...
10,344
[ 0.021593915298581123, -0.010000950656831264, 0.00594909954816103, -0.030858710408210754, -0.014878734014928341, 0.018673229962587357, 0.04529455304145813, 0.003776540979743004, -0.015130104497075081, 0.038950443267822266, 0.01175455842167139, -0.00039912533247843385, -0.015369504690170288, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_bulk_update(self): test_data = [ (IntegerArrayModel, "field", [], [1, 2, 3]), (NullableIntegerArrayModel, "field", [1, 2, 3], None), (NestedIntegerArrayModel, "field", [], [[1, 2, 3]]), (HStoreModel, "field", {}, {1: 2}), (RangesModel, "ints",...
10,345
[ 0.013567566871643066, -0.01613249070942402, 0.00038612066418863833, -0.015805242583155632, 0.018945064395666122, 0.0008966180612333119, 0.00435152743011713, 0.02503012679517269, -0.01896275393664837, -0.006363666616380215, 0.02276591770350933, 0.05543775111436844, 0.0007401797920465469, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _get_size_from_underlying_file(self): if hasattr(self.file, 'size'): return self.file.size if hasattr(self.file, 'name'): try: return os.path.getsize(self.file.name) except (OSError, TypeError): pass if hasattr(self.file, 't...
10,346
[ 0.08154097199440002, 0.01268345583230257, -0.02551281824707985, -0.014194631949067116, 0.01868647150695324, -0.035767972469329834, 0.033933717757463455, -0.036289066076278687, -0.02347012609243393, -0.0017209167126566172, 0.02336590737104416, 0.0060186488553881645, 0.01963486522436142, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "content", "annotation": null, "type_comment": null}}, {"_type": "...
def __init__(self, content, name=None): if six.PY3: stream_class = StringIO if isinstance(content, six.text_type) else BytesIO else: stream_class = BytesIO content = force_bytes(content) super(ContentFile, self).__init__(stream_class(content), name=name) ...
10,347
[ 0.01595962420105934, 0.042636506259441376, 0.018644222989678383, -0.009702606126666069, 0.01381405908614397, 0.0018852966604754329, 0.059822168201208115, 0.04570160061120987, -0.012936808168888092, 0.044052790850400925, 0.012133541516959667, 0.01323274802416563, -0.007768426090478897, 0.01...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def __iter__(self): # Iterate over this file-like object by newlines buffer_ = None for chunk in self.chunks(): for line in chunk.splitlines(True): if buffer_: if endswith_cr(buffer_) and not equals_lf(line): # Line split af...
10,348
[ -0.04488736018538475, -0.008488070219755173, -0.028446504846215248, -0.02961265854537487, 0.02905825711786747, 0.03322582319378853, -0.026553895324468613, 0.04049038887023926, 0.008062710985541344, 0.018352583050727844, 0.05234309658408165, -0.05306955426931381, 0.00461204256862402, -0.011...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "url", "annotation": nu...
class FrappeOAuth2Client(FrappeClient): def __init__(self, url, access_token, verify=True): self.access_token = access_token self.headers = { "Authorization": "Bearer " + access_token, "content-type": "application/x-www-form-urlencoded" } self.verify = verify self.session = OAuth2Session(self.headers) ...
10,349
[ -0.05079760029911995, 0.01642455719411373, -0.029510987922549248, -0.020972153171896935, 0.046927306801080704, -0.015348131768405437, -0.01994410529732704, 0.02088749036192894, 0.0410492978990078, -0.005503073334693909, 0.02454007975757122, -0.05800602212548256, -0.0038219147827476263, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "response", "annotation": null, "type_comment": null}}], "kwarg": ...
def post_process(self, response): try: rjson = response.json() except ValueError: print(response.text) raise if rjson and ("exc" in rjson) and rjson["exc"]: raise FrappeException(rjson["exc"]) if 'message' in rjson: return rjson['message'] elif 'data' in rjson: return rjson['data'] else: ...
10,350
[ -0.01719066873192787, -0.02831994742155075, -0.019318178296089172, -0.0467650443315506, 0.03909798711538315, 0.005920896306633949, -0.004137100651860237, 0.04118535295128822, 0.011841792613267899, -0.004132083151489496, 0.04833056777715683, -0.06097519397735596, -0.03133057430386543, 0.011...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "headers", "annotation"...
class OAuth2Session(): def __init__(self, headers): self.headers = headers def get(self, url, params, verify): res = requests.get(url, params=params, headers=self.headers, verify=verify) return res def post(self, url, data, verify): res = requests.post(url, data=data, headers=self.headers, verify=verify) r...
10,351
[ 0.02518807165324688, 0.009072938933968544, 0.0675322487950325, -0.011638390831649303, -0.04598472639918327, -0.010244742035865784, 0.025825168937444687, -0.011183321475982666, 0.007997838780283928, 0.015608868561685085, 0.01581364870071411, 0.002199974376708269, 0.00450802780687809, 0.0120...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}, {"_type": "arg...
def process_options(self, args, opts): try: self.settings.setdict(arglist_to_dict(opts.set), priority='cmdline') except ValueError: raise UsageError("Invalid -s value, use -s NAME=VALUE", print_help=False) if opts.logfile: se...
10,352
[ 0.006832676474004984, 0.005026035010814667, 0.0877271518111229, -0.017005538567900658, 0.008980689570307732, -0.008676080964505672, 0.010818841867148876, 0.015240912325680256, 0.007946072146296501, 0.0032167674507945776, 0.004243507049977779, -0.049115441739559174, 0.00153354462236166, 0.0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "expressions", "annotation": null, "type_comment": null}}, {"_type...
def collapse_group_by(self, expressions, having): # If the DB can group by primary key, then group by the primary key of # query's main model. Note that for PostgreSQL the GROUP BY clause must # include the primary key of every table, but for MySQL it is enough to # have the main table's...
10,353
[ 0.041111722588539124, -0.01776270940899849, 0.02537841536104679, -0.031139293685555458, -0.018701033666729927, -0.0016229747561737895, -0.008755880407989025, -0.0008585400064475834, -0.05804521590471268, -0.00914321281015873, -0.005842708982527256, -0.060052793473005295, 0.018177317455410957...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "order_by", "annotation": null, "type_comment": null}}, {"_type": ...
def get_extra_select(self, order_by, select): extra_select = [] select_sql = [t[1] for t in select] if self.query.distinct and not self.query.distinct_fields: for expr, (sql, params, is_ref) in order_by: without_ordering = self.ordering_parts.search(sql).group(1) ...
10,354
[ -0.00016974601021502167, -0.017055857926607132, 0.009144937619566917, -0.015414177440106869, 0.0034348603803664446, -0.01173416618257761, 0.0303876344114542, 0.04239724949002266, 0.03384728729724884, 0.012824947945773602, 0.02765517123043537, -0.028646791353821754, 0.03880538418889046, -0....
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "expressions", "annotation": null, "type_comment": null}}], "kwarg...
def get_converters(self, expressions): converters = {} for i, expression in enumerate(expressions): if expression: backend_converters = self.connection.ops.get_db_converters(expression) field_converters = expression.get_db_converters(self.connection) ...
10,355
[ -0.012770761735737324, -0.01198024395853281, 0.05598203092813492, -0.04636221006512642, 0.015142315998673439, -0.028636790812015533, -0.009324771352112293, -0.02596461772918701, -0.024339046329259872, -0.0075600240379571915, 0.024049559608101845, -0.009864773601293564, 0.00558372912928462, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "node", "annotation": null, "type_comment": null}}, {"_type": "arg...
def compile(self, node, select_format=False): vendor_impl = getattr(node, 'as_' + self.connection.vendor, None) if vendor_impl: sql, params = vendor_impl(self, self.connection) else: sql, params = node.as_sql(self, self.connection) if select_format and not self.su...
10,356
[ -0.014371179975569248, -0.018033791333436966, -0.011771908961236477, -0.02738902159035206, -0.002180380979552865, -0.05361803621053696, -0.015434518456459045, -0.013178952038288116, 0.027346057817339897, 0.011245609261095524, -0.0018742682877928019, -0.018646014854311943, 0.05177062004804611...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "row", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def apply_converters(self, row, converters): row = list(row) for pos, (convs, expression) in converters.items(): value = row[pos] for converter in convs: value = converter(value, expression, self.connection, self.query.context) row[pos] = value ...
10,357
[ -0.012507451698184013, 0.016557684168219566, 0.021804098039865494, -0.01729218102991581, 0.04201328381896019, 0.00572383776307106, -0.030450187623500824, -0.04096400365233421, -0.021992968395352364, -0.018624771386384964, -0.00784863531589508, -0.0482250414788723, 0.07273628562688828, 0.04...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "alias", "annotation": null, "type_comment": null}}, {"_type": "ar...
def as_subquery_condition(self, alias, columns, compiler): qn = compiler.quote_name_unless_alias qn2 = self.connection.ops.quote_name if len(columns) == 1: sql, params = self.as_sql() return '%s.%s IN (%s)' % (qn(alias), qn2(columns[0]), sql), params for index, s...
10,358
[ 0.05401424691081047, 0.021266577765345573, 0.02022469975054264, -0.03724204748868942, 0.014555655419826508, -0.006624099798500538, -0.009535230696201324, -0.005995908286422491, -0.03795706108212471, -0.046087801456451416, 0.0043641431257128716, -0.005071496590971947, 0.05274765193462372, -...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def as_sql(self): # We don't need quote_name_unless_alias() here, since these are all # going to be column names (so we can avoid the extra overhead). qn = self.connection.ops.quote_name opts = self.query.get_meta() result = ['INSERT INTO %s' % qn(opts.db_table)] has_fie...
10,359
[ 0.03404002636671066, 0.020291095599532127, 0.0007911606226116419, -0.052129629999399185, 0.00871250219643116, 0.008156937547028065, 0.0038500120863318443, 0.03140239045023918, -0.018224602565169334, -0.0023196127731353045, 0.04303290694952011, -0.06554625928401947, 0.06060329079627991, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "return_id", "annotation": null, "type_comment": null}}], "kwarg":...
def execute_sql(self, return_id=False): assert not (return_id and len(self.query.objs) != 1) self.return_id = return_id with self.connection.cursor() as cursor: for sql, params in self.as_sql(): cursor.execute(sql, params) if not (return_id and cursor): ...
10,360
[ -0.017193276435136795, -0.030495505779981613, 0.039801206439733505, -0.010407382622361183, 0.029581343755126, 0.018095718696713448, -0.017169836908578873, 0.005455671809613705, 0.013431149534881115, 0.03077678754925728, 0.0013565929839387536, 0.04266089200973511, -0.0016539886128157377, 0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "use_gpu", "annotation"...
class Conv3DTest(test.TestCase): def _DtypesToTest(self, use_gpu): if use_gpu: if not test_util.CudaSupportsHalfMatMulAndConv(): return [dtypes.float32] else: # It is important that float32 comes before float16 here, # as we will be using its gradients as reference for fp16 gr...
10,361
[ 0.017406895756721497, 0.04861700162291527, -0.005749517120420933, -0.022157208994030952, -0.04160619154572487, -0.029026051983237267, -0.015179161913692951, 0.007414856925606728, -0.005940621718764305, 0.04665135219693184, 0.013617564924061298, -0.036932323127985, 0.001020361902192235, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ms", "annotation": null, "type_comment": null}}], "kwarg": null, ...
def get_for_models(self, ms): qs = Q() for m in ms: ctype = ContentType.objects.get_for_model(m) if isinstance(m, models.Model): qs |= Q(content_type=ctype, object_id=m.pk) else: qs |= Q(content_type=ctype) return self.filter(qs...
10,362
[ -0.016466880217194557, -0.06662704050540924, 0.03721662610769272, -0.04033910855650902, 0.03772297501564026, -0.04658407345414162, 0.016730602830648422, -0.00789059977978468, 0.008966590277850628, 0.04907362163066864, -0.01798592507839203, 0.0774291455745697, -0.007046685088425875, 0.00673...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "tensor_in_sizes", "annotation": null, "type_comment": null}}, {"_...
def _SetupValuesForDevice(self, tensor_in_sizes, filter_in_sizes, stride, padding, data_format, dtype, use_gpu): total_size_1 = 1 total_size_2 = 1 for s in tensor_in_sizes: total_size_1 *= s for s in filter_in_sizes: total_size_2 *= s # Initializes the input ...
10,363
[ -0.01940176635980606, -0.028984783217310905, 0.08207572251558304, -0.0210723876953125, 0.009752129204571247, -0.0669068843126297, -0.03566727042198181, 0.013621208257973194, 0.019996220245957375, 0.02050868049263954, -0.03808608651161194, 0.01170460507273674, 0.022999240085482597, 0.006538...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "use_gpu", "annotation": null, "type_comment": null}}], "kwarg": n...
def _DtypesToTest(self, use_gpu): if use_gpu: if not test_util.CudaSupportsHalfMatMulAndConv(): return [dtypes.float32] else: # It is important that float32 comes before float16 here, # as we will be using its gradients as reference for fp16 gradients. return [dtypes.floa...
10,364
[ -0.010550210252404213, -0.04038985073566437, -0.021660398691892624, -0.02964305318892002, -0.005894654430449009, -0.01678740419447422, -0.0063563380390405655, -0.0017052500043064356, 0.015035985969007015, 0.062097907066345215, 0.026092559099197388, 0.02071915939450264, -0.010693183168768883,...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testConv3D1x1x1Filter(self): expected_output = [ 0.18518519, 0.22222222, 0.25925926, 0.40740741, 0.5, 0.59259259, 0.62962963, 0.77777778, 0.92592593, 0.85185185, 1.05555556, 1.25925926, 1.07407407, 1.33333333, 1.59259259, 1.2962963, 1.61111111, 1.92592593 ] # These are equivalen...
10,365
[ 0.019934583455324173, -0.002860106760635972, 0.025349050760269165, -0.04364928603172302, -0.0028823427855968475, -0.05283275991678238, 0.02303650602698326, -0.023258866742253304, 0.007137759122997522, 0.06870926916599274, 0.016265641897916794, 0.043538108468055725, -0.03764556348323822, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "tensor_in_sizes", "annotation": null, "type_comment": null}}, {"_...
def _VerifyValues(self, tensor_in_sizes, filter_in_sizes, stride, padding, expected): results = [] for data_format, use_gpu in GetTestConfigs(): for dtype in self._DtypesToTest(use_gpu): result = self._SetupValuesForDevice( tensor_in_sizes, filter_in_siz...
10,366
[ 0.010843826457858086, -0.011499881744384766, -0.0032581945415586233, -0.049935854971408844, 0.00901444349437952, -0.01261012814939022, 0.015757927671074867, -0.013890695758163929, 0.012692134827375412, 0.07741445302963257, 0.016363516449928284, 0.0279327891767025, -0.02611602284014225, 0.0...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testKernelSmallerThanStride(self): expected_output = [ 0.03703704, 0.11111111, 0.25925926, 0.33333333, 0.7037037, 0.77777778, 0.92592593, 1. ] self._VerifyValues( tensor_in_sizes=[1, 3, 3, 3, 1], filter_in_sizes=[1, 1, 1, 1, 1], stride=2, padding="SAME", ...
10,367
[ 0.002000110689550638, -0.016539007425308228, 0.02201906405389309, -0.052406467497348785, 0.02615930698812008, -0.01220108661800623, 0.006100543309003115, 0.01028471440076828, -0.0067100487649440765, 0.03689977526664734, -0.011651983484625816, 0.02923428826034069, -0.009510478004813194, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "batch", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _ConstructAndTestGradientForConfig( self, batch, input_shape, filter_shape, in_depth, out_depth, stride, padding, test_input, data_format, use_gpu): input_planes, input_rows, input_cols = input_shape filter_planes, filter_rows, filter_cols = filter_shape input_shape = [batch, input_planes,...
10,368
[ -0.000782971503213048, -0.01893186755478382, -0.02276957407593727, -0.02803725376725197, -0.009105385281145573, -0.006306548602879047, -0.027548374608159065, -0.02637506276369095, -0.0038315949495881796, -0.010859241709113121, 0.04898574948310852, -0.07499415427446365, -0.0047115786001086235...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "sale.order"}}, "targets": [{"_type": "Name", "_fields": {"id": "_inherit", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": n...
class sale_order(osv.Model): _inherit = "sale.order" def _cart_find_product_line(self, cr, uid, ids, product_id=None, line_id=None, context=None, **kwargs): line_ids = super(sale_order, self)._cart_find_product_line(cr, uid, ids, product_id, line_id, context=context) if line_id: ret...
10,369
[ -0.010458980686962605, -0.019988274201750755, -0.026363270357251167, -0.00895930640399456, -0.006518877577036619, -0.01255077589303255, 0.012595047242939472, 0.011942052282392979, -0.0046927062794566154, 0.020187491551041603, 0.050026021897792816, -0.08495569229125977, 0.014963535591959953, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def _cart_find_product_line(self, cr, uid, ids, product_id=None, line_id=None, context=None, **kwargs): line_ids = super(sale_order, self)._cart_find_product_line(cr, uid, ids, product_id, line_id, context=context) if line_id: return line_ids for so in self.browse(cr, uid, ids, conte...
10,370
[ 0.015473953448235989, -0.05504913255572319, -0.01291219238191843, -0.009414182975888252, -0.023710645735263824, -0.024813465774059296, 0.01885134167969227, 0.008133302442729473, -0.011774908751249313, -0.007093664258718491, 0.06313648819923401, -0.05550864338874817, -0.02593926154077053, 0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def _website_product_id_change(self, cr, uid, ids, order_id, product_id, qty=0, line_id=None, context=None): values = super(sale_order,self)._website_product_id_change(cr, uid, ids, order_id, product_id, qty=qty, line_id=line_id, context=None) event_ticket_id = None if context.get("event_ticket...
10,371
[ -0.003469934454187751, -0.014784054830670357, -0.06726490706205368, -0.035014331340789795, -0.013686681166291237, -0.02584923431277275, -0.043285273015499115, 0.036660391837358475, -0.007534279488027096, 0.007473314180970192, -0.009068569168448448, -0.06311927735805511, 0.01928531751036644, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "artist_name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "song_title", "annotation": null, "type_comment": null}}], ...
def find(artist_name, song_title): params = { 'art': artist_name, 'mus': song_title } response = requests.get(API_LYRIC_SEARCH_URL, params=params) response.raise_for_status() return SearchResult(response.json())
10,372
[ 0.037870924919843674, -0.03968377783894539, -0.03568223863840103, -0.04726680368185043, 0.03486424311995506, -0.006168119143694639, 0.009655648842453957, -0.03698660805821419, 0.014016442932188511, 0.007770945783704519, -0.010915801860392094, -0.06862308830022812, 0.003376989858224988, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "song", "annotation": n...
class Song(object): def __init__(self, song): self.id = song['id'] self.name = song.get('name', None) self.language = song['lang'] self.url = song['url'] self.lyric = song['text'] self.is_translation = False if not self.name: self.is_translation =...
10,373
[ 0.02941480092704296, -0.03778468817472458, -0.02934923954308033, -0.03050747513771057, 0.02919626608490944, -0.015537832863628864, 0.04084417596459389, -0.02239982970058918, -0.003324462566524744, 0.032124634832143784, 0.011932007037103176, -0.030791569501161575, -0.009014565497636795, 0.0...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "song", "annotation": null, "type_comment": null}}], "kwarg": null...
def __init__(self, song): self.id = song['id'] self.name = song.get('name', None) self.language = song['lang'] self.url = song['url'] self.lyric = song['text'] self.is_translation = False if not self.name: self.is_translation = True # For...
10,374
[ 0.03344234451651573, 0.007595180068165064, -0.08593954145908356, 0.003473764518275857, -0.0052159992046654224, -0.004819915164262056, -0.005834211595356464, 0.007948444224894047, -0.016539186239242554, 0.01375589333474636, -0.04108569398522377, -0.07502046972513199, -0.014355371706187725, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "result", "annotation":...
class SearchResult(object): def __init__(self, result): self.status = result['type'] if self.is_not_found(): return song = result['mus'][0] artist = result['art'] translations = song.get('translate', []) self.artist = Artist(artist) self.song = ...
10,375
[ 0.03278927132487297, -0.007842455059289932, -0.06089435890316963, -0.01289332751184702, 0.008776925504207611, -0.007499421946704388, 0.023290790617465973, -0.015519307926297188, -0.015105302445590496, 0.007333819288760424, -0.040596239268779755, -0.046889130026102066, -0.03118056058883667, ...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "result", "annotation": null, "type_comment": null}}], "kwarg": nu...
def __init__(self, result): self.status = result['type'] if self.is_not_found(): return song = result['mus'][0] artist = result['art'] translations = song.get('translate', []) self.artist = Artist(artist) self.song = Song(song) self.translat...
10,376
[ 0.010628397576510906, 0.03324427455663681, 0.06433405727148056, 0.0047348663210868835, 0.035223398357629776, -0.03928185626864433, -0.009526100009679794, 0.018125269562005997, -0.00019063161744270474, -0.014091864228248596, 0.014217125251889229, -0.01696034148335457, 0.002278184751048684, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": nul...
class pos_sales_user_today(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): super(pos_sales_user_today, self).__init__(cr, uid, name, context=context) self.total = 0.0 self.localcontext.update({ 'time': time, 'get_data':self._get_data, }) ...
10,377
[ -0.0074482448399066925, -0.0008697887533344328, 0.04934074357151985, 0.03229846805334091, 0.022834667935967445, -0.0363667830824852, 0.02587350271642208, 0.0013566224370151758, -0.0013054583687335253, -0.002649677451699972, 0.033067476004362106, 0.01356932520866394, -0.02877589873969555, -...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg",...
def __init__(self, cr, uid, name, context): super(pos_sales_user_today, self).__init__(cr, uid, name, context=context) self.total = 0.0 self.localcontext.update({ 'time': time, 'get_data':self._get_data, })
10,378
[ 0.002051813527941704, 0.018249213695526123, 0.048607490956783295, -0.05518797039985657, -0.01670806109905243, -0.01413947157561779, 0.024022424593567848, 0.008739318698644638, -0.018065743148326874, 0.02879266068339348, 0.03150802478194237, -0.03485942259430885, 0.036620743572711945, -0.01...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "config_dict", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "testdir", "annotation": null, "type_comment": null}}, {"_t...
def prepare(config_dict, testdir, server_match, client_match): libs, libs2 = collect_testlibs(config_dict, server_match, client_match) libs.extend(libs2) def prepares(): for lib in libs: pre = lib.get('prepare') if pre: yield pre, lib['workdir'] def files(): for lib in libs: ...
10,379
[ 0.01460174098610878, 0.01220410130918026, 0.025908147916197777, 0.005016862880438566, 0.0610886849462986, -0.050043631345033646, -0.004698692820966244, 0.03958946838974953, -0.026408130303025246, -0.029953455552458763, 0.015181265771389008, -0.03140794858336449, 0.04563470184803009, 0.0049...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "form", "annotation": null, "type_comment": null}}], "kwarg": null...
def _get_data(self, form): data={} ids = form['user_id'] self.cr.execute("select po.name as pos,po.date_order,ru.name as user,po.state,rc.name " \ "from pos_order as po,res_users as ru,res_company as rc " \ "where to_char(date_trunc('day',po.date_...
10,380
[ 0.038805440068244934, 0.047767702490091324, -0.008228988386690617, 0.0010875475127249956, -0.007309482898563147, 0.03321857377886772, 0.034149717539548874, 0.011132994666695595, -0.01563158631324768, 0.004041748587042093, 0.041738543659448624, -0.012558809481561184, -0.008746936917304993, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def getregentry(): return codecs.CodecInfo( name='cp775', encode=Codec().encode, decode=Codec().decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamreader=StreamReader, streamwriter=StreamWriter, )
10,381
[ -0.0070490166544914246, 0.02073107846081257, 0.03905627503991127, -0.058595653623342514, -0.0073975324630737305, -0.003799948375672102, -0.03415456414222717, -0.03249068185687065, 0.014210457913577557, 0.011984452605247498, 0.028983037918806076, -0.03352498635649681, 0.03251316770911217, -...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"va...
def files(): for lib in libs: workdir = os.path.join(testdir, lib['workdir']) for c in lib['command']: if not c.startswith('-'): p = os.path.join(workdir, c) if not os.path.exists(p): yield os.path.split(p)
10,382
[ -0.006649699527770281, 0.019859841093420982, -0.04873470962047577, 0.00769847771152854, -0.00638750521466136, 0.01768418401479721, -0.04757435992360115, -0.00850179698318243, 0.04110317677259445, 0.01342212874442339, 0.032891467213630676, -0.02030612900853157, 0.04175029322504997, 0.026464...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare",...
def test_op_to_state(): assert operators_to_state(XOp) == XKet() assert operators_to_state(PxOp) == PxKet() assert operators_to_state(Operator) == Ket() assert state_to_operators(operators_to_state(XOp("Q"))) == XOp("Q") assert state_to_operators(operators_to_state(XOp())) == XOp() raises(NotI...
10,383
[ -0.010433445684611797, 0.017172254621982574, -0.044829994440078735, -0.018512211740016937, -0.02621370740234852, 0.0322890430688858, -0.028958667069673538, -0.021816570311784744, 0.04680740460753441, 0.010394417680799961, 0.04110933840274811, -0.024795696139335632, 0.05724085122346878, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare",...
def test_spin(): assert operators_to_state({J2Op, JxOp}) == JxKet() assert operators_to_state({J2Op, JyOp}) == JyKet() assert operators_to_state({J2Op, JzOp}) == JzKet() assert operators_to_state({J2Op(), JxOp()}) == JxKet() assert operators_to_state({J2Op(), JyOp()}) == JyKet() assert operators...
10,384
[ 0.0030470655765384436, 0.014464668929576874, -0.042611490935087204, 0.002331242198124528, -0.022301673889160156, 0.02300119400024414, -0.03317388892173767, -0.012164548970758915, 0.04747257009148598, 0.005759190768003464, 0.03836693987250328, -0.030280953273177147, 0.053448136895895004, 0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare",...
def test_state_to_op(): assert state_to_operators(XKet) == XOp() assert state_to_operators(PxKet) == PxOp() assert state_to_operators(XBra) == XOp() assert state_to_operators(PxBra) == PxOp() assert state_to_operators(Ket) == Operator() assert state_to_operators(Bra) == Operator() assert op...
10,385
[ 0.04317130520939827, -0.028977999463677406, 0.012367716990411282, 0.02130281552672386, -0.023038409650325775, 0.017021682113409042, 0.019271526485681534, 0.0001946517440956086, -0.007475912570953369, -0.004184711258858442, 0.022099902853369713, -0.030880725011229515, -0.01496468111872673, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def setUp(self): self.lion = Animal.objects.create( common_name="Lion", latin_name="Panthera leo") self.platypus = Animal.objects.create( common_name="Platypus", latin_name="Ornithorhynchus anatinus") Vegetable.objects.create(name="Eggplant", is_yucky=True) self.b...
10,386
[ 0.052013106644153595, -0.007973594591021538, -0.04049966484308243, 0.00636457372456789, -0.021858854219317436, 0.0026087004225701094, 0.0028440942987799644, 0.0240995641797781, 0.014469274319708347, -0.01374223455786705, 0.032442640513181686, -0.043693870306015015, -0.0042370897717773914, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_query_content_object(self): qs = TaggedItem.objects.filter( animal__isnull=False).order_by('animal__common_name', 'tag') self.assertQuerysetEqual( qs, ["<TaggedItem: hairy>", "<TaggedItem: yellow>"] ) mpk = ManualPK.objects.create(id=1) mpk.tags....
10,387
[ 0.022481294348835945, -0.009503456763923168, -0.04348086938261986, -0.0009252777090296149, -0.028484823182225227, 0.02771841548383236, 0.0444771982729435, -0.014114676974713802, 0.0194539837539196, -0.018943045288324356, 0.02134445682168007, -0.006460179109126329, -0.024065203964710236, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_add_bulk(self): bacon = Vegetable.objects.create(name="Bacon", is_yucky=False) t1 = TaggedItem.objects.create(content_object=self.quartz, tag="shiny") t2 = TaggedItem.objects.create(content_object=self.quartz, tag="clearish") # One update() query. with self.assertNumQuer...
10,388
[ 0.00781656987965107, -0.03943995386362076, -0.031477898359298706, 0.0005707848467864096, -0.04412195831537247, 0.04084191098809242, 0.031319186091423035, -0.032059840857982635, 0.038037996739149094, -0.008715938776731491, 0.030922403559088707, -0.04549746587872505, -0.006335257552564144, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_set(self): bacon = Vegetable.objects.create(name="Bacon", is_yucky=False) fatty = bacon.tags.create(tag="fatty") salty = bacon.tags.create(tag="salty") bacon.tags.set([fatty, salty]) self.assertQuerysetEqual(bacon.tags.all(), [ "<TaggedItem: fatty>", ...
10,389
[ 0.01619618572294712, -0.0039478205144405365, -0.04678608104586601, -0.00414374191313982, -0.031242964789271355, 0.030616017058491707, 0.032888706773519516, -0.01823377050459385, 0.03309769183397293, -0.014863919466733932, 0.03092949092388153, -0.01899133436381817, -0.010214046575129032, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_add_bulk_false(self): bacon = Vegetable.objects.create(name="Bacon", is_yucky=False) t1 = TaggedItem.objects.create(content_object=self.quartz, tag="shiny") t2 = TaggedItem.objects.create(content_object=self.quartz, tag="clearish") # One save() for each object. with self...
10,390
[ 0.0001264941820409149, -0.0008339632768183947, 0.02845168486237526, -0.004997094627469778, 0.012053192593157291, 0.01536230556666851, -0.0020907577127218246, 0.008088942617177963, 0.01010115072131157, -0.005612121429294348, 0.02912019193172455, -0.06781341135501862, -0.026392681524157524, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_assign_with_queryset(self): # Ensure that querysets used in reverse GFK assignments are pre-evaluated # so their value isn't affected by the clearing operation in # ManyRelatedObjectsDescriptor.__set__. Refs #19816. bacon = Vegetable.objects.create(name="Bacon", is_yucky=False) ...
10,391
[ 0.011374813504517078, -0.015285705216228962, -0.030009059235453606, 0.00807739607989788, -0.029753444716334343, 0.01186687033623457, 0.02722286805510521, -0.033332038670778275, 0.028424253687262535, -0.023554811254143715, 0.02499902807176113, -0.0310826376080513, -0.0025832969695329666, -0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_assign(self): bacon = Vegetable.objects.create(name="Bacon", is_yucky=False) fatty = bacon.tags.create(tag="fatty") salty = bacon.tags.create(tag="salty") bacon.tags = [fatty, salty] self.assertQuerysetEqual(bacon.tags.all(), [ "<TaggedItem: fatty>", ...
10,392
[ 0.027953537181019783, -0.013927941210567951, 0.059276144951581955, -0.003848188789561391, -0.006725938059389591, 0.03317803889513016, 0.0047331806272268295, 0.002145342295989394, -0.011590342037379742, 0.0379386842250824, 0.02512156218290329, -0.06337762624025345, -0.011504894122481346, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_multiple_gfk(self): # Simple tests for multiple GenericForeignKeys # only uses one model, since the above tests should be sufficient. tiger = Animal.objects.create(common_name="tiger") cheetah = Animal.objects.create(common_name="cheetah") bear = Animal.objects.create(co...
10,393
[ 0.05071714147925377, -0.01880725845694542, -0.019889891147613525, 0.027912471443414688, -0.012068569660186768, 0.020472846925258636, 0.013407980091869831, -0.01403951458632946, 0.018710099160671234, -0.01636439748108387, 0.005340290255844593, -0.0332007110118866, 0.022471552714705467, -0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_generic_inline_formsets(self): GenericFormSet = generic_inlineformset_factory(TaggedItem, extra=1) formset = GenericFormSet() self.assertHTMLEqual(''.join(form.as_p() for form in formset.forms), """<p><label for="id_generic_relations-taggeditem-content_type-object_id-0-tag">Tag:</label>...
10,394
[ 0.01986355148255825, 0.02784484438598156, -0.0118486313149333, -0.0017655245028436184, 0.014651050791144371, -0.005349819548428059, 0.069365493953228, 0.015637502074241638, -0.0006372001953423023, -0.02162347175180912, -0.023607585579156876, -0.0142026636749506, -0.02068185806274414, -0.00...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_update_or_create_defaults(self): # update_or_create should work with virtual fields (content_object) quartz = Mineral.objects.create(name="Quartz", hardness=7) diamond = Mineral.objects.create(name="Diamond", hardness=7) tag, created = TaggedItem.objects.update_or_create(tag="sh...
10,395
[ 0.01978820003569126, 0.023105232045054436, -0.040625084191560745, 0.007654249202460051, 0.012390422634780407, -0.02204515039920807, 0.04529856517910957, 0.015205910429358482, 0.002811212558299303, -0.04504779353737831, 0.002419381169602275, 0.01005938183516264, -0.00819568894803524, -0.012...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_get_or_create(self): # get_or_create should work with virtual fields (content_object) quartz = Mineral.objects.create(name="Quartz", hardness=7) tag, created = TaggedItem.objects.get_or_create(tag="shiny", defaults={'content_object': quartz}) self.assertTrue(created)...
10,396
[ 0.029301540926098824, -0.02075125463306904, 0.003812802955508232, 0.006298630498349667, -0.004848564509302378, 0.006055451929569244, 0.05759434029459953, 0.013509931974112988, 0.03336052596569061, -0.0156595129519701, -0.022504543885588646, -0.04373615235090256, 0.04145447537302971, -0.033...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_save_new_for_proxy(self): Formset = generic_inlineformset_factory(ForProxyModelModel, fields='__all__', for_concrete_model=False) instance = ProxyRelatedModel.objects.create() data = { 'form-TOTAL_FORMS': '1', 'form-INITIAL_FORMS': '0', ...
10,397
[ 0.03451608493924141, -0.01738527975976467, -0.00034628863795660436, -0.0012311681639403105, -0.005216741003096104, 0.020508384332060814, 0.0693560466170311, 0.016853196546435356, 0.038772761821746826, -0.024938566610217094, -0.021503150463104248, -0.05288456380367279, 0.04203467071056366, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_save_new_for_concrete(self): Formset = generic_inlineformset_factory(ForProxyModelModel, fields='__all__', for_concrete_model=True) instance = ProxyRelatedModel.objects.create() data = { 'form-TOTAL_FORMS': '1', 'form-INITIAL_FORMS': '0', ...
10,398
[ 0.01237546931952238, -0.03703388199210167, 0.04300186410546303, -0.019083667546510696, -0.019500039517879486, 0.020113028585910797, 0.04203033074736595, -0.017533842474222183, 0.0009845438180491328, -0.029516072943806648, -0.029238492250442505, -0.06231684982776642, 0.006361222360283136, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_generic_relation_set(self): base = ForProxyModelModel() base.obj = ConcreteRelatedModel.objects.create() base.save() newrel = ConcreteRelatedModel.objects.create() newrel.bases = [base] newrel = ConcreteRelatedModel.objects.get(pk=newrel.pk) self.assertE...
10,399
[ 0.003396389540284872, -0.01517451275140047, 0.03706803172826767, -0.014822673052549362, -0.012405192479491234, 0.0033907147590070963, 0.012984026223421097, -0.010674367658793926, -0.008058267645537853, -0.029327554628252983, -0.024742286652326584, -0.05611278489232063, 0.004151142667979002, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def test_generic_relation(self): base = ForProxyModelModel() base.obj = ProxyRelatedModel.objects.create() base.save() base = ForProxyModelModel.objects.get(pk=base.pk) rel = ProxyRelatedModel.objects.get(pk=base.obj.pk) self.assertEqual(base, rel.bases.get())
10,400
[ 0.010214361362159252, 0.010997690260410309, 0.03491409122943878, -0.09051802009344101, -0.017444612458348274, -0.035486046224832535, 0.02126178704202175, -0.02088877372443676, 0.030089780688285828, 0.0051009636372327805, 0.06684407591819763, 0.023077121004462242, -0.010450603440403938, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "test", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def run(test): test.create_makefile(makefile) test.write_file("source1", "1") test.write_file("source2", "2") test.write_file("source3", "3") test.write_file("source4", "4") test.start() test.build() hash_source1 = test.get_hash_of("source1") hash_source2 = test.get_hash_of("source2") hash_source3...