text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ checksingleitem ( self, checked _ item ) : self. _ clearitemchecks ( ) checked _ item. check ( true ) | [
-0.5320480465888977,
0.23870934545993805,
0.3043350577354431,
1.5190509557724,
1.2329171895980835,
1.1892008781433105,
0.5641733407974243,
0.8487118482589722,
0.17425958812236786,
-0.09294965863227844,
-0.0367983803153038,
0.07598527520895004,
-0.3988473415374756,
0.45302093029022217,
-0... |
def load _ keck _ deimoslris ( filename : str, instr : str ) : # open the file hdu = io. fits _ open ( filename ) # build the object data # - find the index of the object ids in the slit - object # mapping that match the object catalog mapid = hdu ['slitobjmap']. data ['objectid'] catid = hdu ['objectcat']. data ['obje... | [
-0.3797183036804199,
-0.7418026328086853,
0.7676516175270081,
-1.0947614908218384,
-0.844035804271698,
-0.2570362985134125,
-0.23891498148441315,
0.47287827730178833,
-0.5229997038841248,
-0.3440973460674286,
-0.11779337376356125,
0.653956413269043,
0.2578084170818329,
-0.292583703994751,
... |
def random _ normal ( * size ) : # return p. standardnormal ( ) ( size ) return tensor ( np. random. randn ( * size ). astype ( np. float32 ) ) # return p. normal ( ) ( size, 0, 1 ) # return parameter ( tensor ( np. random. randn ( * size ) ), name = " random _ " + uuid. uuid1 ( ). hex [ : 8 ] ) | [
-0.559901773929596,
-0.2817365527153015,
0.6196452975273132,
0.014398526400327682,
-1.0334316492080688,
1.0045698881149292,
0.10839834064245224,
0.0012960265157744288,
0.36753004789352417,
0.44164344668388367,
-0.3696068525314331,
0.09905947744846344,
-0.5641807317733765,
-0.97945410013198... |
def to _ python ( self, data ) : f = super ( imagefield, self ). to _ python ( data ) if f is none : return self. default # try to import pil in either of the two ways it can end up installed. try : from pil import image except importerror : import image # we need to get a file object for pil. we might have a path or w... | [
-0.5815100073814392,
-0.006414888892322779,
0.5023525953292847,
-0.2528119385242462,
0.17404377460479736,
-0.38089868426322937,
0.5859251618385315,
-0.9661473035812378,
0.5885863304138184,
-0.4192619323730469,
0.1705748587846756,
-0.3514499366283417,
0.17374005913734436,
0.1596492677927017... |
def precip ( ) : results = session. query ( measurement. tobs ). filter ( measurement. date > ='2016 - 08 - 23'). all ( ) # convert list of tuples into normal list results = list ( np. ravel ( results ) ) return jsonify ( results ) | [
-0.8788314461708069,
0.6719372868537903,
0.6696586012840271,
-0.4542103111743927,
-0.6141887307167053,
-0.2879440486431122,
-0.8412978053092957,
-0.5617899894714355,
-0.48541080951690674,
0.9502129554748535,
0.5094782114028931,
-0.7817443013191223,
0.896456778049469,
-0.09905680269002914,
... |
def default _ tags ( self ) : return self. _ default _ tags | [
0.28692010045051575,
0.6493268609046936,
0.06149866431951523,
1.1503074169158936,
1.7488216161727905,
0.5617474913597107,
-0.4716830551624298,
-0.8033681511878967,
-0.5052955150604248,
-0.49185091257095337,
-2.0135715007781982,
-0.4674924910068512,
-0.6653536558151245,
1.0770633220672607,
... |
def generate _ steps ( job : job, n _ steps : int ) - > list [ step ] : return [ step ( job, i, rand. randint ( 0, n _ machines - 1 ), rand. randint ( 1, max _ step _ duration ) ) for i in range ( n _ steps ) ] | [
-0.5932977199554443,
0.8082184791564941,
0.34170132875442505,
1.2686607837677002,
0.2140149176120758,
1.0173232555389404,
-1.293823480606079,
-0.16698859632015228,
-0.6517549157142639,
-0.11737003922462463,
-0.9053082466125488,
-0.9347220659255981,
0.0716925635933876,
1.5668485164642334,
... |
def _ _ init _ _ ( self, glyphxmlcontent, glyphs ) : self. glyphxmlcontent = glyphxmlcontent self. name = extractparam ( glyphxmlcontent, " glyph - name " ) unicode = extractparam ( glyphxmlcontent, " unicode " ) if unicode. startswith ( " & # x " ) : unicodes = unicode. split ( " ; " ) chars = [ ] for unicode in unico... | [
0.1557025909423828,
0.3057948648929596,
0.25698545575141907,
-0.4267423152923584,
-0.011319587007164955,
-0.1436128318309784,
0.11956236511468887,
-0.21670712530612946,
0.2942306697368622,
-0.024713486433029175,
-0.6099619269371033,
-0.05749061703681946,
-0.34488481283187866,
-0.1255287677... |
def begni ( self, * args ) : return _ snap. tngraph _ begni ( self, * args ) | [
1.0391807556152344,
0.7817428112030029,
0.2956850230693817,
1.405962586402893,
0.9041447639465332,
-0.9416038990020752,
0.21581678092479706,
-0.11665446311235428,
-1.049651861190796,
0.34923434257507324,
-0.69981449842453,
-0.7343635559082031,
-0.8645787239074707,
-0.40897881984710693,
0... |
def login ( request ) : if request. user. is _ authenticated : return redirect ( reverse ('home') ) if request. method = ='post': login _ form = userloginform ( request. post ) if login _ form. is _ valid ( ) : user = auth. authenticate ( username = request. post ['username'], password = request. post ['user _ password... | [
-0.00045500314445234835,
0.17728367447853088,
0.7720393538475037,
1.418954849243164,
-0.19058182835578918,
0.6775413751602173,
0.06594973802566528,
0.028572717681527138,
0.3665793538093567,
-1.080737829208374,
-0.1313035637140274,
-0.2882254123687744,
0.44432201981544495,
-0.30716517567634... |
def compute _ epipole ( f ) : # return null space of f ( fx = 0 ) u, s, v = np. linalg. svd ( f ) e = v [ - 1 ] return e / e [ 2 ] | [
0.1618315577507019,
0.9177516102790833,
0.3782866299152374,
0.07888171076774597,
-0.2928047180175781,
0.4838757812976837,
0.02956268936395645,
1.5448373556137085,
0.8052569031715393,
0.9474500417709351,
0.8289040923118591,
-1.2392828464508057,
0.22604291141033173,
-0.45086371898651123,
0... |
def test _ edit _ entry ( self ) : self. login ( ) edit _ url ='/ admin / edit / % s /'% self. text _ entry. id entry _ data = {'title': self. text _ entry. title,'slug': self. text _ entry. slug,'published':'true ','publish _ date _ year': datetime. now ( ). year,'publish _ date _ month': datetime. now ( ). month,'pub... | [
0.04753008484840393,
0.1621616631746292,
0.5637251138687134,
-0.29393860697746277,
1.0952966213226318,
0.3503451645374298,
-0.10301335901021957,
0.4388717710971832,
0.11280862987041473,
-0.27143821120262146,
0.058006007224321365,
0.2591612637042999,
-0.4468684494495392,
0.45145729184150696... |
def on _ button1 _ clicked ( self, widget ) : gestionclientes. gridwindow ( ). show _ all ( ) self. set _ visible ( false ) | [
0.8744327425956726,
0.5180217027664185,
0.5851185917854309,
0.3523854613304138,
-0.2541354298591614,
0.74774169921875,
0.39092469215393066,
0.8629735708236694,
-0.6994907259941101,
0.7864825129508972,
0.06752625852823257,
0.6373417973518372,
0.026786398142576218,
0.9706878662109375,
-0.3... |
def delstr ( self, * args ) : return _ snap. tstr _ delstr ( self, * args ) | [
-0.0761980190873146,
0.4102465510368347,
0.07415996491909027,
0.31069818139076233,
-0.07975321263074875,
0.9022217988967896,
0.2103632539510727,
0.48445889353752136,
-0.8854957818984985,
-0.5787891149520874,
0.312905877828598,
-0.23900987207889557,
-0.6162919402122498,
0.28796735405921936,... |
def get _ shop _ receipt ( self, user, receipt _ id ) : endpoint ='/ receipts / % s'% receipt _ id params = {'receipt _ id': receipt _ id } if user = ='_ _ self _ _': auth = {'oauth': self. full _ oauth } response = self. execute ( endpoint, params = params, * * auth ) return response | [
-1.1906349658966064,
0.031789716333150864,
0.4108707904815674,
0.7764573097229004,
0.030878597870469093,
-0.7411418557167053,
-0.5879145264625549,
-0.39800333976745605,
1.5177756547927856,
0.0011739811161532998,
-0.07507094740867615,
1.2912617921829224,
0.3491394817829132,
0.05968892574310... |
def isok ( self, throwexcept = true ) : return _ snap. tneanet _ isok ( self, throwexcept ) | [
-0.3469602167606354,
1.1710262298583984,
0.2219739854335785,
-0.4865768551826477,
-0.09024471044540405,
1.0026835203170776,
0.6179081201553345,
-0.5832914710044861,
0.019875213503837585,
1.2494150400161743,
0.053582578897476196,
-1.4605752229690552,
0.20008133351802826,
0.3514384925365448,... |
def get _ data ( date ) : cnt = 0 for id in market _ id : # get html doc from url date _ list = date. split ( ". " ) query = { " datestr " : date, " calendartype " : " tw ", " year " : date _ list [ 0 ], " month " : date _ list [ 1 ], " day " : date _ list [ 2 ], " mid " : id, " numbers " : " 999 ", " orderby " : " w "... | [
-0.11250840127468109,
0.2982734739780426,
1.157990574836731,
-0.2631208300590515,
-0.12353897094726562,
-0.5506020784378052,
-0.6736773252487183,
-0.7279106378555298,
-0.8092429041862488,
0.3746531307697296,
-0.7008410096168518,
-0.24947458505630493,
-0.10576286911964417,
0.655264973640441... |
def reverse _ words ( self ) : for i in range ( len ( self. _ input _ lines ) - 1, - 1, - 1 ) : words = self. _ input _ lines [ i ]. split ( ) output =''. join ( [ words [ j ] for j in range ( len ( words ) - 1, - 1, - 1 ) ] ) print ( output ) | [
-0.1261248141527176,
0.06528495252132416,
0.7743063569068909,
-0.5118945837020874,
0.4806922674179077,
-0.24361176788806915,
0.15231843292713165,
0.664583683013916,
-1.3126444816589355,
0.7408916354179382,
0.5277925729751587,
0.8636763095855713,
-1.2713135480880737,
0.19909098744392395,
... |
def _ _ ne _ _ ( self, * args ) : return _ snap. tflt _ _ _ ne _ _ ( self, * args ) | [
-0.5237412452697754,
0.4815041720867157,
0.22524912655353546,
-0.4501851499080658,
0.2260551005601883,
-0.1710633933544159,
0.052225369960069656,
0.021207295358181,
-1.3976809978485107,
0.19176018238067627,
-0.6532950401306152,
-1.6731241941452026,
0.10363975167274475,
0.46708011627197266,... |
def plot _ adjacency _ list ( s, a _ l, label = true ) : fig, ax = plt. subplots ( ) g = nx. graph ( ) set _ edge = set ( ) if type ( list ( a _ l. keys ( ) ) [ 0 ] ) = = int : for k, v in a _ l. items ( ) : for i in v : if ( k, i ) not in set _ edge and ( i, k ) not in set _ edge : if label : g. add _ edge ( s. node _... | [
-0.22034914791584015,
0.4921409785747528,
0.8703526854515076,
-0.5230058431625366,
-0.491311639547348,
0.25274568796157837,
0.03433932363986969,
0.33435824513435364,
0.47907930612564087,
0.7811766266822815,
0.16028085350990295,
0.09562241286039352,
0.5737999081611633,
-0.025300752371549606... |
async def dust _ threshold ( coin : coinnetwork ) - > int : # change < = dust threshold is added to the tx fee dust _ lim = 182 * 3 * await coin. relay _ fee # in msat # convert to sat, but round up : return ( dust _ lim / / 1000 ) + ( dust _ lim % 1000 > 0 ) | [
1.0103752613067627,
0.9417396187782288,
0.4019377529621124,
-0.5577873587608337,
-0.6665064096450806,
-0.20690609514713287,
-0.1437896341085434,
0.11788034439086914,
0.02911215089261532,
-0.16605329513549805,
-0.7103821039199829,
1.3669018745422363,
-0.2073383927345276,
-0.0811405032873153... |
def string _ spelled ( genome _ path ) : result = genome _ path [ 0 ] for i in range ( 1, len ( genome _ path ) ) : result = result + genome _ path [ i ] [ - 1 ] return result | [
-0.5248875021934509,
-0.5073527693748474,
0.4934092164039612,
-0.3494361639022827,
0.6655298471450806,
0.43565112352371216,
0.5930714011192322,
0.15641237795352936,
-0.4996126890182495,
0.7200523614883423,
0.8762695789337158,
0.8961572647094727,
-1.13357675075531,
-0.7732909917831421,
0.... |
def islnode ( self, * args ) : return _ snap. tbpgraph _ islnode ( self, * args ) | [
0.6703431010246277,
1.101822018623352,
0.2682839035987854,
0.06273359805345535,
0.33623331785202026,
-0.2646906077861786,
-0.43498432636260986,
0.08240391314029694,
-0.1849347949028015,
1.04084050655365,
-0.543018639087677,
0.43039560317993164,
-1.1535754203796387,
0.17328447103500366,
-... |
def getnurbscvs ( surface ) : numspansu = cmds. getattr ( surface + ". spansu " ) degreeu = cmds. getattr ( surface + ". degreeu " ) numspansv = cmds. getattr ( surface + ". spansv " ) degreev = cmds. getattr ( surface + ". degreev " ) formu = cmds. getattr ( surface + ". formu " ) formv = cmds. getattr ( surface + ". ... | [
-0.6672053337097168,
-0.1057295873761177,
0.7120538949966431,
0.3393241763114929,
-0.156520813703537,
-0.11927486211061478,
1.2456660270690918,
-0.6780030131340027,
0.3789282739162445,
-1.288741946220398,
-0.5085256099700928,
0.3970431387424469,
0.2699880301952362,
1.5796496868133545,
0.... |
def test _ list _ decimal _ pattern _ 4 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 5. xsd ", instance = " nistdata / list / decimal / sc... | [
-0.4297059178352356,
-0.5624532103538513,
0.5101717114448547,
0.4360315799713135,
-0.33858180046081543,
-0.38135889172554016,
0.1711924970149994,
-0.11410769075155258,
0.17050792276859283,
0.32221975922584534,
-1.3852311372756958,
-0.46896934509277344,
-0.18535928428173065,
0.6620618700981... |
def get _ dio ( self ) : return self. dio. read ( ). data [ 0 ] | [
-0.013092740438878536,
-0.2224346399307251,
0.3880729675292969,
0.35501933097839355,
-0.02392786182463169,
-0.7360104918479919,
0.4195238947868347,
-0.041545320302248,
-0.9578554034233093,
-0.5682921409606934,
0.0048161824233829975,
0.22004041075706482,
-0.10829715430736542,
-0.86409437656... |
def plot _ frontend _ histogram ( args, model, train _ loader, epoch ) : device = model. parameters ( ). _ _ next _ _ ( ). device nb _ bins = 100 cumulative _ hist = torch. zeros ( nb _ bins ). cpu ( ) try : model. frontend. no _ activation = true except : raise typeerror with torch. no _ grad ( ) : for _, ( images, _ ... | [
0.7688072323799133,
0.5443858504295349,
0.8322021961212158,
0.06037677079439163,
-0.2916431427001953,
-0.22095923125743866,
1.323332667350769,
0.5085753202438354,
-0.2873000204563141,
0.012410213239490986,
0.04519660770893097,
0.46912842988967896,
0.6851851940155029,
0.6385397911071777,
... |
def get _ filtered _ query ( self, query : basequery, * * kwargs ) - > basequery : if'q'in kwargs : return query. filter ( productgroup. slug. ilike ('% { } % '. format ( kwargs ['q'] ) ) ) return super ( ). get _ filtered _ query ( query, * * kwargs ) | [
-0.09296750277280807,
-0.06338078528642654,
0.31316959857940674,
0.0449170246720314,
-0.7851141095161438,
-0.6475250124931335,
-0.44328272342681885,
-1.2519116401672363,
0.13043293356895447,
0.4262126684188843,
0.8581644296646118,
0.6745364665985107,
-0.29843080043792725,
0.979755759239196... |
def createfromrawchromeevents ( events ) : assert isinstance ( events, list ) return _ tracedata ( { chrome _ trace _ part. raw _ field _ name : [ {'traceevents': events } ] } ) | [
0.43985939025878906,
0.10885857045650482,
0.40009742975234985,
-0.06237412989139557,
0.5049334764480591,
0.4719453752040863,
0.23883193731307983,
-0.25353023409843445,
1.1343735456466675,
0.5846728682518005,
-1.8792905807495117,
-0.4505865275859833,
-0.3556051552295685,
-0.9383978247642517... |
def stackdilatedcnn ( input _ layer, num _ channels, kernel _ sizes, num _ stacks = 1, dropout = tf. constant ( 0. 0, dtype = tf. float32 ), init = false, is _ training = false, normalization ='weight _ norm ', self _ atten = false, use _ highway = false, use _ gated = false, use _ multi _ scale = false, counters = { }... | [
0.8864696621894836,
0.5576042532920837,
0.8401634097099304,
1.006354808807373,
-0.3179187774658203,
-0.6870711445808411,
0.9029235243797302,
-0.15665997564792633,
-0.2535816729068756,
0.8118615746498108,
-0.16075187921524048,
-0.028253981843590736,
0.19433145225048065,
0.8949964046478271,
... |
def classify ( self, dataset, missing _ value _ action ='error') : _ raise _ error _ if _ not _ sframe ( dataset, " dataset " ) options = { } options. update ( {'model': self. _ _ proxy _ _,'model _ name': self. _ _ name _ _,'dataset': dataset,'missing _ value _ action': missing _ value _ action, } ) target = _ graphla... | [
-0.564038872718811,
0.31489992141723633,
0.38096827268600464,
0.3427633047103882,
-0.18441040813922882,
-0.1034974530339241,
0.0725419893860817,
-0.6169525384902954,
0.3379914462566376,
-0.5918894410133362,
-0.34817370772361755,
1.3059775829315186,
0.3704298734664917,
0.43243786692619324,
... |
def twitter _ callback ( text, link ) : # initialize these here to create separate httplib2 instances per thread. analysis = analysis ( logs _ to _ cloud = logs _ to _ cloud ) trading = trading ( logs _ to _ cloud = logs _ to _ cloud ) companies = analysis. find _ companies ( text ) logs. debug ( " using companies : % ... | [
0.45811760425567627,
0.38638755679130554,
0.26647379994392395,
-0.11165589839220047,
0.7794410586357117,
-0.5270187854766846,
0.6653373837471008,
0.11385203897953033,
-0.09484001994132996,
-0.25319910049438477,
-0.2289678007364273,
0.7317092418670654,
0.05463165044784546,
0.485362619161605... |
def gaussians _ mp ( self, n _ threads = 2 ) : logger. debug ( '.') procs = [ ] for i in range ( n _ threads ) : p = mp. process ( target = self. _ gaussians _ queue ) procs. append ( p ) p. start ( ) for p in procs : p. join ( ) for video in self. _ videos : video. load _ likelihood ( ) | [
-0.05539978668093681,
-0.7418311834335327,
0.6179097890853882,
-0.15077611804008484,
0.6620470285415649,
0.17182928323745728,
-0.44178202748298645,
-0.34886693954467773,
0.32150131464004517,
0.04357393458485603,
0.38983115553855896,
1.5911874771118164,
-1.1487796306610107,
1.21590375900268... |
def tngraph _ load ( * args ) : return _ snap. tngraph _ load ( * args ) | [
-0.7895380854606628,
0.9374764561653137,
0.3935762941837311,
-0.6028656959533691,
-0.45966899394989014,
0.19712263345718384,
0.4412405490875244,
-0.6388707160949707,
-0.7469961643218994,
1.6651872396469116,
-0.927776038646698,
-1.2426444292068481,
-0.7338432669639587,
-0.9680747985839844,
... |
def conv ( self, nx1, ny1, xc1, yc1, mask = none, interpolate = none, cor _ factor = 1, inc _ stat _ err = false, datatype = datatype. det, err _ thresh = 1e - 5 ) : ret = matrixwithcoords ( ) ret. datatype = datatype # correction factor is applied by dividing its value # should be called like this conv (...., cor _ fa... | [
0.2509549856185913,
-0.5254437923431396,
0.9589353203773499,
0.500300407409668,
-0.2920122444629669,
-0.2015969306230545,
0.4751400351524353,
-0.011090319603681564,
0.12316694110631943,
-0.6884979605674744,
0.43986284732818604,
0.634861946105957,
0.772031843662262,
0.34987181425094604,
0... |
def set _ field _ html _ name ( cls, new _ name ) : old _ render = cls. widget. render def _ widget _ render _ wrapper ( name, value, attrs = none ) : return old _ render ( new _ name, value, attrs ) cls. widget. render = _ widget _ render _ wrapper | [
-0.7731497883796692,
0.14532458782196045,
0.6828233003616333,
-0.6370161771774292,
-1.0530942678451538,
0.14226821064949036,
-0.6467782258987427,
0.6077758073806763,
-0.353882372379303,
0.47882017493247986,
-1.2807109355926514,
-0.3226507902145386,
0.7922595143318176,
0.3308149576187134,
... |
def greet ( self ) : # response = self. prompt ( ", 名 : " ) response = " " self. display ( " 文, { 0 }! ". format ( response ) ) return response | [
0.23170484602451324,
-0.006541162729263306,
0.6775784492492676,
0.2472599893808365,
-0.49958527088165283,
1.0019617080688477,
0.5856376886367798,
-0.19291463494300842,
0.7524122595787048,
0.11856735497713089,
-0.154666930437088,
0.5289015173912048,
-0.9349545836448669,
-0.2031572163105011,... |
def _ _ init _ _ ( self ) : if not ( agent. k and agent. l and agent. d ) : raise valueerror ( " set static agent parameters using agent. set _ params ( ) before creating any agent instances " ) # create vocabulary if agent. v is none : agent. v = v ( ) try : agent. v. load _ vocab ( ) except filenotfounderror : agent.... | [
-0.5071099400520325,
-0.8228291273117065,
0.48330000042915344,
0.739213764667511,
0.3187929391860962,
-0.4036574363708496,
0.27385565638542175,
0.45736727118492126,
0.23648808896541595,
0.11064860969781876,
-0.15216922760009766,
-0.35894837975502014,
0.4227954149246216,
0.5477834343910217,... |
async def _ calculate ( self ) - > none : self. _ records _ count = await self. _ get _ count _ rows ( ) self. _ pages _ count = await self. _ get _ count _ pages ( ) | [
-0.09408016502857208,
0.01430193055421114,
0.35047057271003723,
-0.4265829622745514,
0.8454763293266296,
-1.039232850074768,
0.16402675211429596,
0.9784047603607178,
-0.7436953186988831,
-0.23562881350517273,
-0.6399590373039246,
-0.23946581780910492,
0.8209709525108337,
0.7914862632751465... |
def get _ variable ( self, variable _ id ) : return self. _ request ('get ','/ variables / { } '. format ( variable _ id ) ) | [
-0.247995063662529,
-0.033278580754995346,
-0.06642445921897888,
-0.047376614063978195,
0.6915528774261475,
-1.1302704811096191,
-1.0479252338409424,
-0.9800670742988586,
0.3956654667854309,
-0.23436863720417023,
-0.2905930280685425,
1.7815279960632324,
-1.0879850387573242,
-0.034161966294... |
def post ( self ) : parser = reqparse. requestparser ( ) parser. add _ argument ('username ', type = str, required = true ) parser. add _ argument ('password ', type = str, required = true ) args = parser. parse _ args ( strict = true ) print ( args ) user = usermodel. new _ user ( args ['username'], args ['password'] ... | [
-0.9817020893096924,
-0.7245113849639893,
0.971393346786499,
0.3895386755466461,
0.13458788394927979,
0.5163261294364929,
-0.42186063528060913,
0.17659369111061096,
-1.1344401836395264,
-0.4478274881839752,
-1.110997200012207,
-0.3311925530433655,
-0.8998515605926514,
0.3684917986392975,
... |
def test _ list _ integer _ pattern _ nistxml _ sv _ iv _ list _ integer _ pattern _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 1. xsd ", instance = " nistdata / list / integer / schema... | [
-0.6631359457969666,
-0.2466149479150772,
0.47751715779304504,
0.48618045449256897,
-0.4359292685985565,
-0.05472908169031143,
0.5887288451194763,
0.5508774518966675,
1.1444027423858643,
0.9404726028442383,
-0.9683562517166138,
-0.2960893213748932,
-0.5621750950813293,
0.7099350690841675,
... |
def get _ lm _ f0tau ( mass, spin, l, m, nmodes ) : qnmfreq = lal. createcomplex16vector ( nmodes ) lalsim. simimreobgenerateqnmfreqv2fromfinal ( qnmfreq, mass, spin, l, m, nmodes ) f _ 0 = [ qnmfreq. data [ n ]. real / ( 2 * pi ) for n in range ( nmodes ) ] tau = [ 1. / qnmfreq. data [ n ]. imag for n in range ( nmode... | [
-0.07396207004785538,
-0.3964376747608185,
0.39043137431144714,
-0.803530752658844,
-0.4059430658817291,
-0.8079553842544556,
-0.5631068348884583,
0.5403914451599121,
-0.027788866311311722,
-0.5110454559326172,
-0.4523206353187561,
-0.042600054293870926,
0.2826409637928009,
0.5068433880805... |
def test _ enumerate _ quorums ( ) : def ex28 _ fbas ( nodes _ subset, node ) - > bool : return contains _ slice ( nodes _ subset, slices _ by _ node, node ) quorums = { frozenset ( quorum ) for quorum in enumerate _ quorums ( ( ex28 _ fbas, nodes ) ) } assert quorums = = { frozenset ( { 7 } ), frozenset ( { 4, 5, 6, 7... | [
-0.5135409832000732,
0.49272313714027405,
0.6269004940986633,
-0.12568628787994385,
0.38991445302963257,
-0.6487796902656555,
0.34225133061408997,
-1.0644159317016602,
-0.2649320662021637,
0.5165322422981262,
0.5122566819190979,
-0.4068962335586548,
0.07703155279159546,
-0.3893765211105346... |
def random _ image ( self ) : image = random. choice ( os. listdir ( self. image _ directory ) ) image = self. image _ directory + " \ \ " + image image = pil. image. open ( image ) self. frame _ image ( image ) | [
-1.1248855590820312,
0.011572555638849735,
0.33548620343208313,
0.18489865958690643,
0.5660148859024048,
-0.17669378221035004,
0.5825232267379761,
0.34640973806381226,
1.0804331302642822,
-0.3509555160999298,
0.28127366304397583,
0.6782668232917786,
0.1740574687719345,
1.0923711061477661,
... |
def test _ fetch _ all _ orders ( self ) : date = datetime. now ( ) order = order ( customer _ id = 1, date = date, shipped = true ) order. save ( ) order2 = order ( customer _ id = 2, date = date, shipped = false ) order2. save ( ) order. all ( ) self. assertequal ( len ( order. all ( ) ), 2 ) | [
0.4907182455062866,
0.1209963709115982,
0.6169447302818298,
1.0010850429534912,
0.6432096362113953,
0.5596992373466492,
-0.8115635514259338,
-0.04559006169438362,
-0.190469428896904,
-0.148362934589386,
-0.9733956456184387,
-0.36418014764785767,
0.919522762298584,
0.8088831305503845,
-0.... |
async def test _ config _ google _ home _ entity _ id _ to _ number _ altered ( hass : homeassistant, hass _ storage : dict [ str, any ] ) - > none : conf = config ( hass, { " type " : " google _ home " }, " 127. 0. 0. 1 " ) hass _ storage [ data _ key ] = { " version " : data _ version, " key " : data _ key, " data " ... | [
-0.15743672847747803,
-0.3541715145111084,
0.7114362120628357,
0.1156819611787796,
0.7387650012969971,
-0.18904203176498413,
0.4116867184638977,
0.32593441009521484,
-0.010181152261793613,
0.2194502055644989,
-1.3646785020828247,
0.6294062733650208,
0.980323314666748,
1.010166049003601,
... |
def weight _ variable ( shape, j _, init _ w = none ) : if not list ( init _ w ) : initial = tf. random. truncated _ normal ( shape, stddev = 0. 1 ) else : initial = tf. constant ( init _ w ) if self. config. iftl and j _ < self. config. nofixedlayer : return tf. variable ( initial, trainable = false ) else : return tf... | [
0.07573040574789047,
-0.04954192414879799,
0.5152140259742737,
-0.1253371387720108,
-0.9320711493492126,
0.17561978101730347,
0.4843445420265198,
-0.5690821409225464,
-0.7869823575019836,
0.4903852343559265,
-0.4073164463043213,
0.4585825502872467,
-0.23983101546764374,
0.08022575825452805... |
def _ create _ individual _ venue _ dict _ 2 ( self ) : temp _ dict = {'id': self. id,'name': self. name,'genres': self. genres,'address': self. address,'city': self. city,'state': self. state,'phone': self. phone,'website': self. website,'facebook _ link': self. facebook _ link,'seeking _ talent': self. seeking _ tale... | [
-0.9121799468994141,
-0.9009540677070618,
0.39061257243156433,
-0.8163254261016846,
-1.2755450010299683,
0.0223073847591877,
0.3087661564350128,
0.333665668964386,
0.06530357152223587,
-0.09316903352737427,
-1.0341110229492188,
0.6954973340034485,
-0.015277634374797344,
0.6285964846611023,... |
def subsequent _ mask ( max _ length : int ) - > torch. tensor : mask = torch. ones ( max _ length, max _ length ) # ignore typecheck because pytorch types are incomplete return mask. triu ( ). t ( ). unsqueeze ( 0 ). contiguous ( ) # type : ignore | [
0.45278534293174744,
0.14861951768398285,
0.4026777744293213,
0.471618115901947,
0.17876377701759338,
-0.18219703435897827,
0.6248016357421875,
0.23504525423049927,
0.3958718478679657,
-0.15778115391731262,
-0.7409577965736389,
0.017731336876749992,
0.32350948452949524,
-1.0663446187973022... |
def check _ for _ structure _ index _ files ( self ) : if os. path. exists ( " % s / structure _ index _ files " % self. recdir ) : shutil. move ( " % s / structure _ index _ files " % self. recdir, " % s / archive _ sif _ % s " % ( self. recdir, self. asctime ) ) self. logger. info ( " structure index file directory d... | [
0.1264319121837616,
-0.16334323585033417,
0.5774261951446533,
-0.14767950773239136,
0.5794979333877563,
-0.017132634297013283,
0.9487633109092712,
0.390654981136322,
-0.1951056271791458,
-0.06158828362822533,
0.045480795204639435,
0.36310380697250366,
-0.15666380524635315,
-0.3624965846538... |
def my _ input _ fn ( features, targets, batch _ size = 1, shuffle = true, num _ epochs = none ) : # convert pandas data into a dict of np arrays. features = { key : np. array ( value ) for key, value in dict ( features ). items ( ) } # construct a dataset, and configure batching / repeating. ds = dataset. from _ tenso... | [
-0.8325900435447693,
-0.09543280303478241,
0.5063049793243408,
0.1883019655942917,
-0.3157421350479126,
-0.8892500400543213,
-0.0651869997382164,
0.757674515247345,
-0.16133743524551392,
-0.9065620303153992,
0.1848543882369995,
0.7127810716629028,
0.951867938041687,
-1.04529869556427,
-0... |
def lm _ amps _ phases ( * * kwargs ) : l, m = kwargs ['l'], kwargs ['m'] amps, phis = { }, { } for n in range ( kwargs ['nmodes'] ) : try : amps ['% d % d % d'% ( l, m, n ) ] = kwargs ['amp % d % d % d'% ( l, m, n ) ] except keyerror : raise valueerror ('amp % d % d % d is required'% ( l, m, n ) ) try : phis ['% d % d... | [
-0.7979440689086914,
-0.29584333300590515,
0.5763310194015503,
-1.626636266708374,
-1.0829689502716064,
0.18978390097618103,
-0.678033173084259,
-0.26464468240737915,
-0.1563872992992401,
0.5921075940132141,
0.007924257777631283,
0.03131183981895447,
-0.6417282819747925,
1.4471687078475952... |
def _ _ init _ _ ( self, servicer, interceptor = none ) : self. desc = servicedesc ( [ x for x in filedescriptor. service if x. name = = " applicationmanager " ] [ 0 ], filedescriptor. package ) self. servicer = servicer self. interceptor = interceptor | [
1.3682934045791626,
-0.22086101770401,
0.4284287691116333,
-0.486874520778656,
-0.3852798342704773,
-0.34416380524635315,
-0.8870972990989685,
0.14754144847393036,
-0.5001075267791748,
-1.3848403692245483,
1.1270536184310913,
0.3621358871459961,
0.5018579959869385,
1.777574896812439,
0.0... |
def construct _ free _ params ( self ) : raise notimplementederror ( ) pass | [
-0.6434831023216248,
-0.18252210319042206,
0.4547888934612274,
-0.32039299607276917,
-0.6301459670066833,
0.583298921585083,
0.5117907524108887,
-1.0451195240020752,
-0.8351292014122009,
0.03596285358071327,
-0.6211245059967041,
-0.045213427394628525,
0.14138564467430115,
1.404858708381652... |
def in2s ( nms # list of indices ) : return list ( zip ( nms [ : : 2 ], nms [ 1 : : 2 ] ) ) | [
-1.8752583265304565,
-0.30072689056396484,
0.36387982964515686,
0.2888905704021454,
-0.4003278315067291,
-0.5709202289581299,
-0.9001779556274414,
-0.41295257210731506,
0.2885216474533081,
1.080188274383545,
-1.456291675567627,
0.06699386239051819,
0.015711596235632896,
0.03350977599620819... |
def process _ best ( self, samplers : list, sampler _ params : list ) : previous _ qubo = none for qubo, sampler, sampler _ params in zip ( self, samplers, sampler _ params ) : if previous _ qubo is none : # first qubo to process qubo. solve ( sampler, * * sampler _ params ) previous _ qubo = qubo continue next _ itera... | [
0.5107417106628418,
-0.6932737231254578,
0.6411279439926147,
0.6288830041885376,
0.9319416284561157,
-0.0800517350435257,
-0.3934628367424011,
-0.9791592359542847,
-0.11778610199689865,
0.03256462514400482,
-0.5472065806388855,
0.06977279484272003,
-0.1881192922592163,
0.6429585814476013,
... |
def settitle ( self, name ) : self. title = name | [
-0.4445677697658539,
-0.48672378063201904,
0.26513707637786865,
-0.37558844685554504,
-0.585227370262146,
0.1730780303478241,
-1.1946440935134888,
-0.39347171783447266,
0.012229991145431995,
0.8198175430297852,
-1.3796498775482178,
-0.4108964502811432,
-0.496759295463562,
0.223376438021659... |
async def async _ close _ cover ( self, * * kwargs ) : set _ req = self. gateway. const. setreq self. gateway. set _ child _ value ( self. node _ id, self. child _ id, set _ req. v _ down, 1, ack = 1 ) if self. gateway. optimistic : # optimistically assume that cover has changed state. if set _ req. v _ dimmer in self.... | [
-0.40113839507102966,
0.27164652943611145,
0.5874288082122803,
0.1961972415447235,
-0.35918450355529785,
0.49771633744239807,
0.47165971994400024,
-0.07309918850660324,
-0.0713903084397316,
-0.019854113459587097,
0.6479324102401733,
0.1768081784248352,
-0.1927122175693512,
1.00565075874328... |
def privileges _ unpack ( priv ) : output = { } for item in priv. split ('/') : pieces = item. split (':') if pieces [ 0 ]. find ( '.')! = - 1 : pieces [ 0 ] = pieces [ 0 ]. split ( '.') for idx, piece in enumerate ( pieces ) : if pieces [ 0 ] [ idx ]! = " * " : pieces [ 0 ] [ idx ] = " ` " + pieces [ 0 ] [ idx ] + " `... | [
-0.622736394405365,
-0.39474382996559143,
1.0957914590835571,
-0.5330466628074646,
-0.7440775632858276,
-1.2758691310882568,
0.5372889041900635,
0.7678464651107788,
0.2890869379043579,
0.6382152438163757,
-0.503725528717041,
0.16509100794792175,
-0.33692681789398193,
-0.6030124425888062,
... |
def handleselectminion ( self, event ) : try : if not self. attackchoice : for i in range ( 0, configuration. board _ size ) : if graphicsdevice. ismouseinside ( event, pygame. rect ( configuration. card _ index _ board _ top _ pos [ i ], configuration. card _ size ) ) : self. attackfromhero = configuration. top self. ... | [
0.1715586632490158,
-0.6249977946281433,
0.7785480618476868,
0.565584123134613,
0.41590794920921326,
-0.38447096943855286,
0.09276889264583588,
0.5017082691192627,
0.5190683603286743,
0.08375419676303864,
-0.5768157839775085,
0.9840108156204224,
-0.4464832842350006,
-0.1593356430530548,
... |
def _ _ init _ _ ( self, traj, ats, molno, cldict, clfunc = {'contact': conoptdistancecython,'optical': conoptdistancecython,'aligned': aligndistancescython }, compairs = np. array ( [ [ 0, 6 ], [ 1, 7 ], [ 2, 8 ], [ 3, 9 ], [ 4, 10 ], [ 5, 11 ] ] ), atype = u'ls ', ttotal = - 1, tstart = 0, tpr = none, outgro ='conf '... | [
0.26962709426879883,
-0.2859562933444977,
0.6661025285720825,
-0.30064964294433594,
-0.5131784081459045,
0.23124545812606812,
0.27591678500175476,
0.026722377166152,
0.25698792934417725,
0.4994882047176361,
0.06376508623361588,
-0.17716442048549652,
0.26182782649993896,
0.40147408843040466... |
def parse _ email ( self, data ) : return email. message _ from _ string ( data ) | [
0.16432787477970123,
-0.08107758313417435,
0.08344610035419464,
-0.9290036559104919,
-0.5379732847213745,
-0.03111293911933899,
-1.348618745803833,
-0.3338518440723419,
0.04034164547920227,
-0.7262732982635498,
0.09083240479230881,
0.8801255822181702,
-0.8110145330429077,
-1.38428258895874... |
def all _ users ( ) : cmd = subprocess. run ( [ " ipa ", " user - find ", " - - sizelimit = 0 " ], check = true, stdout = subprocess. pipe, ) usernames = [ ] for line in cmd. stdout. decode ( " utf - 8 " ). split ( " \ n " ) : if " user login : " in line : usernames. append ( line. split ( ) [ 2 ] ) return usernames | [
-0.269276887178421,
-0.4234841465950012,
0.675816535949707,
1.1521848440170288,
0.08446130156517029,
0.25145068764686584,
-0.20637598633766174,
0.296377956867218,
0.1411014199256897,
0.2185327708721161,
0.23771892488002777,
0.41565588116645813,
-0.4694004952907562,
0.18528763949871063,
0... |
def _ _ float _ _ ( self ) : return self. _ fp30bit | [
0.8127634525299072,
-0.09351977705955505,
0.4010060429573059,
-0.5371802449226379,
0.3779054284095764,
1.4609698057174683,
0.7845913767814636,
-1.4091706275939941,
0.0514289066195488,
-0.6349074244499207,
-0.13364751636981964,
0.3535813093185425,
-0.5976796746253967,
0.27195414900779724,
... |
def add _ output _ first ( self, output, n _ dim ) : self. subcomplexes [ n _ dim ] = [ it [ 0 ] for it in output ] self. zero _ diff [ n _ dim ] = [ it [ 1 ] for it in output ] self. hom [ 0 ] [ n _ dim ] = [ it [ 2 ] for it in output ] self. im [ 0 ] [ n _ dim ] = [ it [ 3 ] for it in output ] self. preim [ 0 ] [ n _... | [
0.6023182272911072,
0.03044849820435047,
1.0268718004226685,
0.06391394883394241,
0.12049461901187897,
-0.14179855585098267,
1.3429652452468872,
-0.263620525598526,
-0.5825108885765076,
-0.29871752858161926,
0.6604031324386597,
-0.3208560347557068,
-0.28120702505111694,
0.7931532859802246,... |
def get _ args ( cls, dist, header = none ) : # noqa : d205, d400 for type _ in'console ','gui': group = type _ +'_ scripts'for name, ep in dist. get _ entry _ map ( group ). items ( ) : # pylint : disable = e1101 args = cls. _ get _ script _ args ( type _, name, " #! / bin / bash \ n ", " " " exec python3 - m click _ ... | [
-0.8350919485092163,
0.9490141868591309,
0.5734672546386719,
0.14937227964401245,
-0.06205320730805397,
0.3796100914478302,
-0.694243311882019,
-0.6064014434814453,
-1.0422358512878418,
0.4224446415901184,
0.23370735347270966,
0.5173476934432983,
0.077679343521595,
1.1143803596496582,
-0... |
async def async _ added _ to _ hass ( self ) - > none : self. _ serial _ loop _ task = self. hass. loop. create _ task ( self. serial _ read ( self. _ port, self. _ baudrate, self. _ bytesize, self. _ parity, self. _ stopbits, self. _ xonxoff, self. _ rtscts, self. _ dsrdtr, ) ) | [
0.6232504844665527,
0.34736359119415283,
0.5269937515258789,
-0.2105080783367157,
0.4796333312988281,
0.15449559688568115,
-0.32514679431915283,
0.14630970358848572,
0.22076283395290375,
-0.4008842408657074,
-0.3088797628879547,
0.853104829788208,
0.579005241394043,
-0.10967133939266205,
... |
def apply _ next _ train _ move ( self, train : train ) : if train. idx in self. _ next _ train _ moves : next _ move = self. _ next _ train _ moves [ train. idx ] # if next line the same as previous : if next _ move ['line _ idx'] = = train. line _ idx : if train. speed > 0 and train. position = = self. map. line [ tr... | [
-0.28190162777900696,
-0.0456453338265419,
0.6564980745315552,
-0.37888994812965393,
-0.00801172200590372,
-0.16536656022071838,
-0.2747557461261749,
0.21668574213981628,
-0.08598857372999191,
-0.22065500915050507,
0.14815643429756165,
0.20665059983730316,
0.20772942900657654,
-0.135254248... |
def heun _ step ( m1, m2, k1, k2, b1, b2, u, fw, x, t, delta _ t ) : first _ step = delta _ t * dx ( m1, m2, k1, k2, b1, b2, u, fw, x, t ) next _ step = delta _ t * dx ( m1, m2, k1, k2, b1, b2, u, fw, x + first _ step, t + delta _ t ) new _ x = x + 1 / 2 * ( first _ step + next _ step ) new _ t = t + delta _ t return n... | [
-0.35059574246406555,
-0.12337427586317062,
0.6685479879379272,
0.36083969473838806,
-0.40670230984687805,
0.6956745982170105,
-0.462988942861557,
1.077018141746521,
-1.5823132991790771,
-0.14875225722789764,
-0.6847561001777649,
-0.4956395626068115,
0.2917488217353821,
0.24769096076488495... |
def add ( self, chb ) : if chb. collection is not none : self. error ( " can't add checkbox as it already belongs " " to another collection! " ) return chb. collection = self self. _ items. append ( chb ) | [
-0.17145293951034546,
-0.517311155796051,
0.41063714027404785,
0.649388313293457,
1.543548345565796,
1.9000355005264282,
-0.08064577728509903,
-0.5067940354347229,
0.3440297245979309,
-0.4021092355251312,
-1.1911131143569946,
-0.052358876913785934,
-1.1474658250808716,
0.5531719923019409,
... |
def split _ ext ( filename ) : s = filename name = s [ : s. find ( ". " ) ] ext = s [ s. find ( ". " ) : ] return name, ext | [
-0.39613208174705505,
-0.7729969024658203,
0.6857020854949951,
0.06416203826665878,
-0.8732691407203674,
-0.15059210360050201,
0.009784738533198833,
0.6493489146232605,
0.3008374869823456,
1.208711862564087,
-1.0202513933181763,
0.4322359561920166,
-0.210624560713768,
-0.38494089245796204,... |
def detect ( df ) - > pd. dataframe : groups = [ ] # the config problem of grouping by districts is that a few districts # do not have enough amount of properties. for name, group in df. groupby ( ['property _ type ','shared _ occupancy'] ) : features = ['latitude ','longitude ','num _ bedrooms ','num _ recepts'] df _ ... | [
0.041463982313871384,
0.5734072327613831,
0.8105072975158691,
0.21862275898456573,
0.5129839181900024,
-0.2627348303794861,
-0.3369077444076538,
0.09298081696033478,
-0.19391711056232452,
0.09986578673124313,
0.9743675589561462,
0.36848556995391846,
0.2124689668416977,
0.16548754274845123,... |
def begeaflti ( self, * args ) : return _ snap. tneanet _ begeaflti ( self, * args ) | [
0.3529868721961975,
-0.006050996482372284,
0.1533292531967163,
-0.2740009129047394,
0.9795302152633667,
0.13087478280067444,
0.5453031659126282,
-0.661715030670166,
-1.1019879579544067,
0.806770384311676,
0.028485678136348724,
-0.5024977922439575,
-0.27667397260665894,
1.0038096904754639,
... |
def sub _ cartoon ( ax1, ax2, coord, zfrb, halos = false, host _ dm = 50., ymax = none, igm _ only = true, m31 = false, fg _ halos = none, dsmx = 0. 05, frb _ dm = none, yscl = 0. 97 ) : if halos : embed ( ) gcoord = coord. transform _ to ('galactic') l, b = gcoord. l. value, gcoord. b. value ds = [ ] # kpc dm _ cumul ... | [
0.4258696436882019,
0.5155389308929443,
0.8518797755241394,
-0.039409734308719635,
-0.646578311920166,
-0.11080649495124817,
-0.24886541068553925,
-0.370042622089386,
-0.6385453343391418,
-0.006801039911806583,
0.051182158291339874,
0.40987008810043335,
0.2947733700275421,
0.13592796027660... |
def _ already _ processed ( self, event : str ) - > bool : low _ period = self. comm. project. min _ period high _ period = self. comm. project. max _ period processed _ filename = ( " preprocessed _ " + str ( int ( low _ period ) ) + " s _ to _ " + str ( int ( high _ period ) ) + " s. h5 " ) processed _ data _ folder ... | [
-0.19948971271514893,
0.0038817368913441896,
0.7074220776557922,
-0.6263235807418823,
0.5917798280715942,
0.6638439297676086,
0.49257805943489075,
0.20126020908355713,
-0.42120882868766785,
0.012116569094359875,
-0.4364367127418518,
0.7189826965332031,
0.6471189260482788,
0.154218077659606... |
def bic ( self ) : return ( 2 * self. marginal _ likelihood ( ) ) - ( len ( self. kernel. cov _ args ) * np. log ( len ( self. x ) ) ) | [
1.2420268058776855,
-0.5783947110176086,
0.4378716051578522,
0.2323504388332367,
0.6031168103218079,
0.17383413016796112,
0.3090665340423584,
0.4708501100540161,
-0.6250205039978027,
-0.038622837513685226,
0.3037865459918976,
1.4398934841156006,
-0.5868513584136963,
-0.2749826908111572,
... |
def which ( executable ) : if'path'in os. environ : envpath = os. environ ['path'] else : envpath = os. defpath path = envpath. split ( os. pathsep ) locations = path + ['/ usr / local / bin ','/ bin ','/ usr / bin ','/ usr / local / sbin ','/ usr / sbin ','/ sbin ', ] for location in locations : executable _ path = os... | [
0.29674777388572693,
-0.7641781568527222,
0.9612904191017151,
0.9436959624290466,
-0.08673524111509323,
0.3618977963924408,
1.6651790142059326,
-0.24442295730113983,
-0.361176997423172,
0.18268367648124695,
0.36693084239959717,
-0.11631844192743301,
-0.4223594069480896,
-0.3271765112876892... |
def test _ atomic _ base64 _ binary _ length _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 3. xsd ", instance = "... | [
0.37350305914878845,
-0.37495777010917664,
0.38012078404426575,
0.8002576231956482,
0.12632820010185242,
0.24556949734687805,
-0.2936672568321228,
0.08377008140087128,
-0.036952100694179535,
0.685015857219696,
-0.5478926301002502,
0.2722834348678589,
-0.20033888518810272,
0.105331987142562... |
def testgetdisk ( self, mock _ get _ operation, mock _ list _ disks ) : mock _ get _ operation. return _ value = mock _ gce _ operation _ instances _ get mock _ list _ disks. return _ value = mock _ list _ disks # normal disk disk = fake _ instance. getdisk ( fake _ disk. name ) self. assertisinstance ( disk, compute. ... | [
-0.38380539417266846,
1.1924301385879517,
0.5381175875663757,
0.4695524573326111,
0.9092188477516174,
-0.19182080030441284,
0.7153247594833374,
-0.3931962549686432,
-0.3278711438179016,
-0.8477832078933716,
-0.028337998315691948,
0.3726845383644104,
0.25838467478752136,
0.9483500123023987,... |
def _ _ exit _ _ ( self, exc _ type, exc _ value, traceback ) : print ( f " \ ncleaning up after { self. root } " ) | [
0.7187269926071167,
-0.4868932366371155,
0.4362335205078125,
0.1685713231563568,
-0.632254958152771,
0.2664039731025696,
0.6299916505813599,
0.2805820107460022,
0.014237409457564354,
-0.12580657005310059,
0.42402297258377075,
0.4048258662223816,
-0.03714916110038757,
0.7667406797409058,
... |
def cozmobehavior ( robot : cozmo. robot. robot ) : global grid, stopevent global found _ cubes found _ cubes = [ ] goal _ degrees = [ ] grid. addgoal ( ( grid. width / 2, grid. height / 2 ) ) found _ goal = false astar ( grid, heuristic ) path = grid. getpath ( ) path _ index = 0 grid _ init _ start _ pose = grid. get... | [
-0.3742903769016266,
-0.04507587105035782,
0.9096623063087463,
0.5501195788383484,
-0.3301681876182556,
0.007682798430323601,
0.875326931476593,
-0.04542251303792,
-0.3463122248649597,
0.9000649452209473,
-0.10346994549036026,
0.04950295388698578,
-0.36273595690727234,
0.25650444626808167,... |
def getmonthlystatistics ( datadf ) : # resample and aggregate into monthly values monthlydata = datadf. resample ('ms') monthly = monthlydata. mean ( ) # new df column names colnames = ['discharge'] # new monthly df modatadf = pd. dataframe ( index = monthly. index, columns = colnames ) modatadf ['discharge'] = monthl... | [
0.4489063024520874,
0.42583832144737244,
0.5647229552268982,
-0.5087779760360718,
-0.1489500254392624,
0.020592855289578438,
-0.035223860293626785,
0.054433487355709076,
0.4341028034687042,
-0.2427588403224945,
1.0588743686676025,
0.8419586420059204,
0.41658714413642883,
0.9532173275947571... |
def user _ agent ( self ) : return self. _ user _ agent. value | [
-0.09492821246385574,
-0.23956671357154846,
0.41767260432243347,
0.2455771416425705,
0.33752724528312683,
0.21767385303974152,
0.8336138129234314,
-0.2935636639595032,
0.8522070646286011,
-0.9768928289413452,
-0.1848960965871811,
0.748199999332428,
0.39361268281936646,
-1.1966185569763184,... |
def test _ sla _ patch _ exclusion _ period ( self ) : pass | [
0.7651523947715759,
0.33899202942848206,
0.26980894804000854,
0.0072876401245594025,
-1.0239225625991821,
2.363323211669922,
1.056997537612915,
0.8242782354354858,
1.7999606132507324,
-0.1579277217388153,
-0.3489997982978821,
0.35909998416900635,
-1.3694086074829102,
-0.01029495894908905,
... |
def tint _ abs ( * args ) : return _ snap. tint _ abs ( * args ) | [
-1.3058786392211914,
-0.6905391812324524,
0.4829932153224945,
0.6469859480857849,
-0.28899481892585754,
0.6808890700340271,
-0.05963631346821785,
-0.6276013255119324,
-1.03729248046875,
0.7477739453315735,
-0.24568688869476318,
0.5264300107955933,
-0.1860380917787552,
0.5474191308021545,
... |
def b _ have _ childs ( d, mask ) : for k, v in d. items ( ) : if k. startswith ( mask ) : return true return false | [
0.25956812500953674,
0.3571069538593292,
0.5489099025726318,
1.1375540494918823,
-0.45844388008117676,
0.006737090647220612,
-0.2783571779727936,
0.010638248175382614,
-0.4273541271686554,
0.4751788079738617,
-0.538949191570282,
-0.30936533212661743,
0.2645009458065033,
-0.1866713911294937... |
def tchain _ new ( * args ) : return _ snap. tchain _ new ( * args ) | [
-0.7404855489730835,
-0.2696073651313782,
0.1761828511953354,
-0.48862558603286743,
0.21093454957008362,
0.25840604305267334,
0.29796960949897766,
-0.04034881293773651,
-1.7006301879882812,
-0.47382089495658875,
-1.3114676475524902,
-0.9927942752838135,
1.0568480491638184,
0.63507783412933... |
def on _ trigger ( self, connection, commander, replyto, groups ) : connection. privmsg ( replyto, " \ " % s \ " matches trigger for % s " % ( groups [ 0 ], type ( self ). _ _ name _ _ ) ) | [
-0.07745040208101273,
0.050285015255212784,
0.2384847104549408,
-0.38320326805114746,
0.8721823692321777,
-0.9460877180099487,
-0.2544410526752472,
-0.36084938049316406,
-0.9094651341438293,
-0.3345101475715637,
-0.3843880593776703,
0.7642900943756104,
-0.790151059627533,
-0.35607451200485... |
def test _ atomic _ boolean _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 2. xsd ", instance = " nistdata / atomic / bo... | [
-0.34203627705574036,
-0.7031555771827698,
0.635368287563324,
1.3642255067825317,
-0.14799019694328308,
0.46562668681144714,
0.1508706957101822,
0.24877460300922394,
-0.6130330562591553,
0.8887112140655518,
-0.2597680389881134,
0.6106309294700623,
0.3848908543586731,
-0.2839939296245575,
... |
def get _ game _ history ( self, request ) : game = get _ by _ urlsafe ( request. urlsafe _ game _ key, game ) if not game : raise endpoints. notfoundexception ('game not found!') return stringmessage ( message = str ( game. history ) ) | [
-0.14910030364990234,
0.6805078983306885,
0.5064067244529724,
-0.07434411346912384,
0.26123061776161194,
-0.14848819375038147,
-0.6845083236694336,
-1.2284479141235352,
-0.47280916571617126,
0.9806106686592102,
0.8960514664649963,
1.1274815797805786,
0.05871003121137619,
-0.134565487504005... |
def tbool _ getstr ( * args ) : return _ snap. tbool _ getstr ( * args ) | [
0.2317599207162857,
0.5264825224876404,
-0.21330785751342773,
0.8610329031944275,
1.1663638353347778,
0.34738701581954956,
1.0061109066009521,
-1.0889599323272705,
-1.219588041305542,
-0.5563039183616638,
-0.2956588864326477,
-0.1141897514462471,
-0.6190990805625916,
-0.6334003806114197,
... |
def my ( self ) : return socialrestfollowingmanager ( self. context, resourcepath ( " my ", self. resource _ path ) ) | [
0.4592636823654175,
-0.6452618837356567,
0.2848818898200989,
0.5696452856063843,
-0.9543386697769165,
0.31611573696136475,
-0.019132567569613457,
-0.8295242786407471,
0.44288942217826843,
-1.779564619064331,
0.028610147535800934,
0.4004190266132355,
-0.7878956198692322,
0.02968538552522659... |
def combine _ stats ( a, b ) : m, mean _ m, var _ m = a n, mean _ n, var _ n = b t _ m = mean _ m * m t _ n = mean _ n * n total = m + n mean = float ( t _ m + t _ n ) / ( total ) s _ m = var _ m * m s _ n = var _ n * n s _ mn = s _ m + s _ n + ( float ( m ) / ( n * ( total ) ) ) * ( ( float ( n ) / m ) * t _ m - t _ n... | [
1.123193383216858,
0.10478712618350983,
0.7711436748504639,
-0.2482617348432541,
0.43669402599334717,
-0.4872193932533264,
0.7065494656562805,
-0.3465164005756378,
-0.16417358815670013,
0.8741557598114014,
-0.053998835384845734,
0.373623788356781,
0.24749647080898285,
-0.2356216162443161,
... |
def isedge ( self, * args ) : return _ snap. tnegraph _ isedge ( self, * args ) | [
-0.46818289160728455,
1.4101780652999878,
0.32600662112236023,
0.9189792275428772,
1.2590758800506592,
-0.374620258808136,
0.6208247542381287,
0.374950110912323,
-0.09252005815505981,
0.8177574872970581,
-0.18487222492694855,
-1.4566751718521118,
-1.5721067190170288,
0.3144223093986511,
... |
def gen _ fake _ atbat _ data ( ) : at _ bat = atbat ( inning = 1, inning _ half ='t ', n _ pitches = 3, n _ balls = 1, n _ strikes = 1, n _ outs = 1, batter _ id = 116380, pitcher _ id = 116380, batter _ stance ='r ', des ='mike trout homers to left center ', event ='home run') return at _ bat | [
-0.04772976413369179,
-0.13094907999038696,
0.4955195188522339,
-0.5992310047149658,
-0.2506508231163025,
0.6091625690460205,
-0.6294091939926147,
-0.6924028396606445,
-0.29980984330177307,
0.07857891172170639,
-1.2153749465942383,
0.8397474884986877,
0.07739783078432083,
0.109687551856040... |
def image _ id ( self, image _ id ) : self. _ image _ id = image _ id | [
0.338870644569397,
-0.6530783176422119,
-0.3337932527065277,
0.4890995919704437,
0.5816924571990967,
0.9697147607803345,
-0.8661861419677734,
1.490541934967041,
0.07997030764818192,
0.6019718647003174,
0.140543594956398,
0.6026046276092529,
0.04258474335074425,
1.780907392501831,
0.27532... |
def test _ atomic _ language _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 5. xsd ", instance = " nistdata / atomic ... | [
0.12842051684856415,
-0.37672391533851624,
0.3221098780632019,
0.43450918793678284,
-0.5251661539077759,
-0.023717263713479042,
0.30482637882232666,
-0.38777217268943787,
-0.24172209203243256,
0.9419015049934387,
-0.5787960290908813,
-0.25041332840919495,
-0.5686082243919373,
0.01387598179... |
def test _ platform _ validation ( self, mock _ validator, mock _ api ) : mock _ app = magicmock ( sevenbridges. app ) mock _ app. raw = self. tool mock _ api _ instance = mock _ api. return _ value mock _ api _ instance. apps. get. return _ value = mock _ app main ( ['- - input ','a / b / c'] ) mock _ validator. asser... | [
0.24430786073207855,
0.36957845091819763,
0.4582202136516571,
0.7999444603919983,
-0.3179878890514374,
1.3666870594024658,
0.6908283829689026,
-0.18625783920288086,
-0.29031550884246826,
-0.6611036062240601,
-0.16093766689300537,
-0.7479081153869629,
0.014141945168375969,
0.818570137023925... |
def get _ type _ logs ( type2p, base = 2, alpha = 1, force _ zero = false ) : type2log = dict ( ) for t, p in type2p. items ( ) : try : type2log [ t ] = log ( p, base ) except valueerror : if force _ zero : type2log [ t ] = 0 else : raise return type2log | [
-1.2682678699493408,
-0.34473133087158203,
0.6578029990196228,
0.1299906224012375,
0.029711280018091202,
0.2471102625131607,
-0.7652525901794434,
-0.8249930739402771,
-1.0637062788009644,
1.1417450904846191,
-0.7791569232940674,
0.37394842505455017,
-0.04679861292243004,
0.3216434121131897... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.