text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def undo ( self, * args ) : key = self. data [ key ] value = self. data [ value ] command = createcommand ( track = false ) command. do ( key, value ) | [
-0.4720742106437683,
0.014084204100072384,
0.5778677463531494,
-0.5166205763816833,
0.6182402968406677,
0.5022609233856201,
0.21102525293827057,
0.5452867150306702,
-1.4589450359344482,
-0.47529473900794983,
0.5056511759757996,
0.852634072303772,
-0.11456065624952316,
-0.6859491467475891,
... |
def get _ rels ( entry, tokens, ents, nums, players, teams, cities, filter _ none = false ) : rels = [ ] bs = entry [ " box _ score " ] ent _ strs = [ ent. s. split ( ) for ent in ents ] def is _ complete ( ent ) : ent _ str = ent. s. split ( ) for ent _ str _ in ent _ strs : if len ( ent _ str _ ) < = len ( ent _ str ... | [
-0.18636375665664673,
-0.2288748323917389,
0.798059344291687,
-0.4866645932197571,
0.16826319694519043,
-0.6942725777626038,
-0.643242359161377,
-0.13167177140712738,
0.19883225858211517,
0.6347134113311768,
-0.026184096932411194,
-0.2855720818042755,
0.04562421143054962,
-0.18210862576961... |
def load _ app _ data ( ) : global cache, healpixels cache = simplecache ( ) desi _ spectro _ redux = os. environ ['desi _ spectro _ redux'] specprod = os. environ ['specprod'] spectra = glob. glob ( os. path. join ( os. environ ['desi _ spectro _ redux'], os. environ ['specprod'],'spectra - 64 ','[ 0 - 9 ] [ 0 - 9 ] '... | [
-0.22464892268180847,
-0.3941352367401123,
0.8344324827194214,
-0.071066714823246,
-0.7254806756973267,
0.5566697716712952,
-0.48456138372421265,
-0.3359459340572357,
0.49691927433013916,
-0.10674914717674255,
0.4311084449291229,
0.2750915586948395,
0.9475904703140259,
0.7413301467895508,
... |
def verify _ eab ( self, request, pub _ key : " cryptography. hazmat. primitives. asymmetric. rsa. rsapublickey ", reg : acme. messages. registration, ) : if not reg. external _ account _ binding : raise acme. messages. error. with _ code ( " externalaccountrequired ", detail = f " visit { url _ for ( request,'eab') } ... | [
-0.04506891593337059,
0.3204854130744934,
0.7930952310562134,
0.3689277768135071,
-0.6007727384567261,
0.72271728515625,
0.8420428037643433,
-0.5560820698738098,
0.6215981245040894,
0.6926395297050476,
0.0012627264950424433,
0.65946364402771,
-0.6174643039703369,
0.6824572682380676,
0.02... |
def initables ( self ) : with self. con : self. cur. execute ( " select * from highscores ; " ) i = len ( self. cur. fetchall ( ) ) if ( i = = 0 ) : for j in range ( 0, 10 ) : self. cur. execute ( " insert into highscores values ( " " " + str ( j + 1 ) + ", " "'empty ', " " 0000 ) ; " ) | [
0.2122102826833725,
1.2276991605758667,
0.8356953859329224,
0.0764448270201683,
1.542707920074463,
0.30059781670570374,
0.43095946311950684,
-0.0671369656920433,
-0.8137355446815491,
-0.002715286798775196,
-1.1646946668624878,
-0.2833936810493469,
-0.45946401357650757,
0.6983113884925842,
... |
def normalize _ weights ( self, word _ count ) : for source in self. weights : for target in self. weights [ source ] : if not source in self. normalized _ weights : self. normalized _ weights [ source ] = { } self. normalized _ weights [ source ] [ target ] = self. weights [ source ] [ target ] / word _ count # comput... | [
0.158858060836792,
-0.2780477702617645,
0.3527381718158722,
-0.36462387442588806,
-0.3150157928466797,
-0.05275852605700493,
0.6199891567230225,
0.8454358577728271,
-0.8142064213752747,
0.8070908188819885,
0.11172731965780258,
-0.08477342873811722,
-1.1847773790359497,
1.1178834438323975,
... |
def _ _ init _ _ ( _ _ self _ _, *, location : str, entity : optional ['outputs. responsemessageenvelopeapientityresponse'] = none, id : optional [ str ] = none, kind : optional [ str ] = none, name : optional [ str ] = none, tags : optional [ mapping [ str, str ] ] = none, type : optional [ str ] = none ) : pulumi. se... | [
0.15406326949596405,
0.22865062952041626,
0.7501534223556519,
-0.6459569334983826,
0.8618173003196716,
0.2533872127532959,
-0.8828762173652649,
-0.13712698221206665,
0.3416667878627777,
0.44001519680023193,
-0.8162015080451965,
0.030962148681282997,
0.2814490497112274,
-0.7012175917625427,... |
def floating _ ip _ deallocate ( context, address ) : return impl. floating _ ip _ deallocate ( context, address ) | [
-0.2971469759941101,
0.7076082825660706,
0.542208731174469,
-0.26600101590156555,
-1.166520595550537,
-0.4608038067817688,
0.8078040480613708,
-0.2664387822151184,
1.2797178030014038,
-0.19427302479743958,
0.7868238091468811,
-0.1519353836774826,
0.3019028902053833,
-1.036263346672058,
-... |
def test _ generate _ set _ parameter _ values _ string ( self ) : # example acs - > cpe rpc call. copied from : # http : / / djuro82. blogspot. com / 2011 / 05 / tr - 069 - cpe - provisioning. html # following edits made : # - change header id value from'null0'to'null ', to match magma # default id expected _ acs _ st... | [
0.08394286781549454,
-0.17947714030742645,
0.6003307700157166,
-0.8767281174659729,
-0.22822552919387817,
0.3872232735157013,
-0.271119624376297,
-0.08007244765758514,
-0.08923977613449097,
0.2508741021156311,
0.11389249563217163,
0.3038126528263092,
-0.47249719500541687,
0.413480311632156... |
def detectblobs ( self, rgb _ image, hsv _ image ) : if self. viz : sat = cv2. gettrackbarpos ('sat ','bars') else : sat = 160 v, thresh = cv2. threshold ( hsv _ image [ :, :, 1 ], sat, 255, cv2. thresh _ tozero ) hsv _ image [ :, :, 1 ] = thresh hsv _ image [ 400 :, 200 : 520, : ] = 0 # rgb _ image [ 400 :, 200 : 520,... | [
0.06597212702035904,
-1.1848466396331787,
1.0374226570129395,
1.2008534669876099,
-0.04761584475636482,
0.4895448386669159,
-0.33884695172309875,
-0.34790849685668945,
-0.0953667163848877,
0.1054561585187912,
-0.4003871977329254,
0.24202793836593628,
-0.44118618965148926,
0.970353364944458... |
def atoi3 ( s ) : if s = = " " or s = = " " or s = = " + " or s = = " - " : return 0 s = s. strip ( ) result = [ ] sym, canary = 1, 0 for i in range ( len ( s ) - 1, - 1, - 1 ) : if s [ i ]. isdigit ( ) and canary = = 0 : result. insert ( 0, s [ i ] ) elif s [ i ] = = " - " or s [ i ] = = " + " : if canary = = 0 and s ... | [
-0.6409013867378235,
0.27381032705307007,
0.7528138160705566,
-0.012915600091218948,
-0.7035617232322693,
-0.5678304433822632,
0.44184473156929016,
0.36146780848503113,
0.6141964793205261,
0.4653567373752594,
-0.3694581985473633,
-0.07071828842163086,
0.43590620160102844,
-0.03522571176290... |
def show _ single ( post _ id ) : p = psblog. get _ post ( post _ id ) # todo : proper form handling for html module o = " " o + = " < form action = \ "? page = save \ " method = \ " post \ " > " o + = " < input type = \ " text \ " name = \ " heading \ " value = \ " " + p [ " meta " ] [ " heading " ] + " \ " > < br > "... | [
0.6587015390396118,
0.8301186561584473,
1.229782223701477,
-0.6816720366477966,
-0.4941282570362091,
-0.0967785194516182,
-0.2570127844810486,
0.2486378401517868,
-0.13464854657649994,
0.2993439733982086,
0.008551761507987976,
0.5341953635215759,
-0.1047695055603981,
0.8041506409645081,
... |
def to _ map ( value ) : result = jsonconverter. to _ nullable _ map ( value ) return result if result! = none else { } | [
-0.7579395771026611,
-0.7011657953262329,
0.6289379000663757,
-0.849532425403595,
-0.8789700269699097,
-1.1740695238113403,
-0.43701982498168945,
-0.8594964146614075,
1.1160011291503906,
0.4324454069137573,
-1.419162392616272,
-0.06298990547657013,
0.6706154346466064,
-0.12707704305648804,... |
def getdatacollections ( database _ name ) : conn = sqlite3. connect ( database _ name ) cursor = conn. execute ('select name, description from datacollections') return cursor. fetchall ( ) | [
-0.21287862956523895,
0.19374911487102509,
0.6236363053321838,
-0.57513827085495,
-0.21874557435512543,
0.30607524514198303,
-0.8098211288452148,
-0.4367251396179199,
-0.11341186612844467,
0.1381126493215561,
-0.9901436567306519,
-0.3773811459541321,
-0.1486372947692871,
0.3853957951068878... |
def parse _ line ( line ) : name, group, aptype, ipaddr, status, flags, switchaddr, \ standbyaddr, mac, sernum, * other = re. split ( r'{ 2, } ', line ) ap = { " invnum " : " ", " sernum " : sernum, " mac " : mac, " name " : name } return ap | [
-0.5283349752426147,
-0.7431822419166565,
0.4821087121963501,
-0.02745574712753296,
-1.0233922004699707,
-0.4338872730731964,
-0.24337369203567505,
0.0898580253124237,
0.21578679978847504,
0.061338916420936584,
-1.0955467224121094,
-0.6026756167411804,
-0.2581943869590759,
-0.4805985391139... |
def test _ qlibrary _ instantiate _ route _ mixed ( self ) : try : routemixed except exception : self. fail ( " routemixed failed " ) | [
-0.18610692024230957,
-0.43973514437675476,
0.49215492606163025,
-0.4297513961791992,
0.9635156393051147,
1.3629436492919922,
-0.41999998688697815,
0.1933211237192154,
0.6250393390655518,
-0.9520430564880371,
-0.6938297152519226,
-0.615112841129303,
-0.7068981528282166,
0.4871056079864502,... |
def pipe ( self, func : callable, * args, * * kwargs ) : return func ( self, * args, * * kwargs ) | [
-0.5849132537841797,
0.19690977036952972,
0.4878931939601898,
-0.683249294757843,
0.4171934127807617,
-0.05588357523083687,
-0.11578574776649475,
0.7689353823661804,
-0.6405052542686462,
-0.7788156867027283,
0.671665370464325,
0.7280532717704773,
0.24688246846199036,
-0.06275705993175507,
... |
def _ _ init _ _ ( self, x = 0, y = 0 ) : self. x = x self. y = y | [
-0.23852798342704773,
-0.9010034799575806,
0.680450439453125,
-0.17622075974941254,
0.12213452160358429,
0.4512573480606079,
-1.1587599515914917,
-0.06986258924007416,
-0.4006668031215668,
-0.3671349585056305,
-0.28481391072273254,
0.4588514268398285,
0.38117724657058716,
0.250955998897552... |
def hrf ( times ) : # gamma pdf for the peak peak _ values = gamma. pdf ( times, 6 ) # gamma pdf for the undershoot undershoot _ values = gamma. pdf ( times, 12 ) # combine them values = peak _ values - 0. 35 * undershoot _ values # scale max to 0. 6 return values / np. max ( values ) * 0. 6 | [
0.22475917637348175,
0.47879305481910706,
0.29547178745269775,
-0.2881825268268585,
0.7621364593505859,
-0.1765899360179901,
-0.8090094923973083,
-0.2945573031902313,
-0.5796195268630981,
0.2322278618812561,
-0.2702977657318115,
-0.04122883453965187,
0.204278364777565,
-0.02241356670856476... |
def textgrid ( ) : return pypar. alignment ( path ('test. textgrid') ) | [
0.953450620174408,
-0.5854387283325195,
0.3465971350669861,
-0.7676213979721069,
-0.3063409924507141,
-0.5879868268966675,
-0.028338927775621414,
0.5449403524398804,
-1.1373428106307983,
0.885545551776886,
1.220463514328003,
-0.24621744453907013,
-0.7950197458267212,
0.5081202983856201,
... |
def remove _ duplicates ( self ) - > none : self. _ collection = list ( set ( self. _ collection ) ) | [
-0.6910051703453064,
0.022703442722558975,
0.1682848036289215,
-0.36596888303756714,
0.8200891017913818,
0.5164612531661987,
0.8556243181228638,
0.12300664186477661,
-0.0781833752989769,
0.049671489745378494,
-1.4224923849105835,
0.5444051027297974,
-0.21483896672725677,
0.1593453586101532... |
def _ _ init _ _ ( self, character ) : self. name ='character move event'self. character = character | [
0.6339269280433655,
-1.4003232717514038,
0.5174853205680847,
-0.3850904703140259,
-0.6935219764709473,
-0.18824738264083862,
0.21046994626522064,
0.26225364208221436,
0.3418081998825073,
0.20347146689891815,
-1.5190978050231934,
0.19770261645317078,
0.4612440764904022,
0.26798227429389954,... |
def point _ on _ segment ( s, p ) : is _ on _ segment = ( p [ 0 ] > = s [ :, 0 ]. min ( ) ) & ( p [ 0 ] < = s [ :, 0 ]. max ( ) ) & ( p [ 1 ] > = s [ :, 1 ]. min ( ) ) & ( p [ 1 ] < = s [ :, 1 ]. max ( ) ) return is _ on _ segment | [
-0.21480271220207214,
-1.0578347444534302,
0.4811549186706543,
0.20469847321510315,
0.26096776127815247,
0.09406895935535431,
-1.0712116956710815,
0.12524203956127167,
0.16384373605251312,
1.0907620191574097,
-0.13604407012462616,
0.19252781569957733,
-0.3378446698188782,
-1.18298172950744... |
def test _ backward _ compatibility ( ) : predict _ path = join ( _ my _ dir,'backward _ compatibility ', ('v0. 9. 17 _ test _ summary _ test _ summary _'' logisticregression. predictions') ) model _ path = join ( _ my _ dir,'backward _ compatibility ', ('v0. 9. 17 _ test _ summary _ test _ summary _ logisticregression... | [
0.3630432188510895,
-0.5289442539215088,
0.7458494901657104,
-0.24884110689163208,
0.3009917140007019,
0.3775169551372528,
0.11375384032726288,
-0.042322225868701935,
-0.7256371974945068,
0.23662444949150085,
0.05398551747202873,
0.5406683087348938,
0.08991023898124695,
-0.2122767567634582... |
def logout ( ) : session _ id = request. cookies. get ( " session _ id " ) if session _ id : user = auth. get _ user _ from _ session _ id ( session _ id ) if user is not none : auth. destroy _ session ( user. id ) return redirect ('/') else : return abort ( 403 ) return abort ( 403 ) | [
-0.07295099645853043,
-0.4235438108444214,
0.8980640769004822,
1.2567795515060425,
0.05361131206154823,
-0.7874261736869812,
0.538782000541687,
-0.4237925410270691,
1.469138503074646,
0.4131351709365845,
1.4911633729934692,
0.34958311915397644,
0.6122269630432129,
-0.5040298104286194,
0.... |
def recalculatectrs ( ctrs, points ) : newctrs = [ 0 ] * len ( ctrs ) for ix in range ( len ( ctrs ) ) : weighted _ sum = np. zeros ( 2 ) total _ weight = 0 for point, weight in points : weighted _ sum + = point * weight [ ix ] total _ weight + = weight [ ix ] newctrs [ ix ] = weighted _ sum / total _ weight return new... | [
0.5579206943511963,
-0.9228276014328003,
0.319380521774292,
-0.11506309360265732,
0.5882171392440796,
-0.5365338921546936,
0.3362434506416321,
0.5999789237976074,
0.5545809864997864,
0.6791130304336548,
0.14359141886234283,
-0.5404450297355652,
0.6736534237861633,
-0.06854593753814697,
0... |
def match _ lists ( my _ lists, match = true ) : func _ table = { true : np. intersect1d, false : np. union1d } domain _ list = [ my _ list [ 0 ] for my _ list in my _ lists ] domain = ft. reduce ( func _ table [ match ], domain _ list ) image = np. empty ( shape = ( len ( my _ lists ), len ( domain ) ), dtype = my _ l... | [
-0.938926637172699,
0.3635571599006653,
0.5349974632263184,
0.5682427883148193,
-0.9111396670341492,
0.08361411839723587,
0.3430157005786896,
1.3607838153839111,
-0.1920309215784073,
0.09784194827079773,
-0.3394438922405243,
0.24971114099025726,
-0.5101518630981445,
1.2194194793701172,
-... |
def main ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ('- l ','- - local ', default = os. getcwd ( ), help ='local filesystem to compare') parser. add _ argument ('- r ','- - remote ', default = os. getcwd ( ), help ='remote filesystem to compare') parser. add _ argument ('- f ','- - filetype ', r... | [
0.8659497499465942,
-0.5042111277580261,
1.3242477178573608,
-0.0564136728644371,
0.7323096990585327,
0.7441295981407166,
0.1564776599407196,
0.5370244383811951,
-0.6065112948417664,
-0.10956775397062302,
-0.19283947348594666,
0.19501444697380066,
0.037738896906375885,
0.5963680148124695,
... |
def test _ spectral _ coord _ jupiter ( ) : obstime = time. time ('2018 - 12 - 13 9 : 00') obs = get _ greenwich _ earthlocation ( ). get _ gcrs ( obstime ) # always built - in, no download required # jupiter = get _ body ('jupiter ', obstime ) # not supported by astropy yet, # but this is the eventual goal, which shou... | [
0.2046060711145401,
0.15988817811012268,
0.6949852108955383,
0.26119714975357056,
-0.16175246238708496,
0.4514874815940857,
-0.1584276407957077,
-0.2223363071680069,
0.02065218985080719,
-0.7368818521499634,
-0.4510023891925812,
0.7302900552749634,
-0.0695151686668396,
0.4317179322242737,
... |
def get _ pd ( self ) : sheet = self. open ( ) data = sheet. get _ all _ values ( ) return pd. dataframe ( data, columns = ['id ','content'] ) | [
-0.13065068423748016,
-0.3228594660758972,
0.2890283465385437,
-0.13965103030204773,
0.11987072229385376,
0.2364686280488968,
-0.7796550393104553,
-0.19373074173927307,
-0.4353633224964142,
-1.643441081047058,
0.7730807662010193,
0.6639240384101868,
-0.3039066195487976,
-0.7803190350532532... |
def is _ string ( to _ check ) : if not to _ check or not isinstance ( to _ check, str ) : return false if sys. version _ info [ 0 ] < 3 : if not isinstance ( to _ check, unicode ) : return false return true | [
-1.1302467584609985,
0.5137778520584106,
0.5758205652236938,
1.0542508363723755,
-0.29726484417915344,
1.2414878606796265,
-0.3931187391281128,
-0.14631803333759308,
0.2313917875289917,
0.1071099266409874,
0.43185892701148987,
-0.05121057480573654,
-0.49880024790763855,
-0.6304606795310974... |
def _ fields _ arg _ check _ trigger _ function ( self, outer _ self, * args, * * kwargs ) : changed _ related _ field = kwargs. pop ('changed _ related _ field ', none ) if changed _ related _ field : changed _ related _ field = [ changed _ related _ field ] else : changed _ related _ field = [ ] changed _ fields = ch... | [
-0.3079207241535187,
-0.010232320055365562,
0.4854145646095276,
-0.6033399701118469,
0.4184996485710144,
0.18696463108062744,
0.2331780046224594,
0.4707608222961426,
-0.4195387065410614,
-0.1536983698606491,
-0.5792023539543152,
0.789430558681488,
-0.17162644863128662,
-0.22560594975948334... |
def main ( ) : ap = argparse. argumentparser ( ) ap. add _ argument ( " - - crop ", default = false, type = bool, help = " use bounding box crops for evaluation. " ) ap. add _ argument ( " - - decay ", default = 4, type = int, help = " number of epochs between learning rate decays. " ) ap. add _ argument ( " - - dir ",... | [
0.43759867548942566,
0.8454862236976624,
0.9522274136543274,
0.2328791320323944,
0.6380385160446167,
0.17466887831687927,
0.5979737639427185,
0.37175458669662476,
-1.274306058883667,
0.4034940302371979,
-0.14265570044517517,
1.0226478576660156,
-0.24071775376796722,
0.3108510375022888,
0... |
def save _ stream ( self, datastream : datastream, ingestinfluxdb : bool = false, overwrite = false ) - > bool : return self. rawdata. save _ stream ( datastream = datastream, ingestinfluxdb = ingestinfluxdb, overwrite = overwrite ) | [
-0.9192052483558655,
0.2775035500526428,
0.6158276796340942,
0.0858231633901596,
0.276593416929245,
-0.7062690258026123,
-0.278864324092865,
-0.22838585078716278,
0.48242223262786865,
-0.2049025148153305,
-0.9840789437294006,
-0.2723731994628906,
-0.7102922201156616,
0.734208345413208,
-... |
def set _ config ( self ) - > none : config _ path = os. path. join ( self. repo _ path, " intuitionistic _ bot / config. json " ) with open ( config _ path ) as config _ file : config = json. load ( config _ file ) self. consumer _ key = config [ " consumer _ key " ] self. consumer _ secret = config [ " consumer _ sec... | [
-0.23951108753681183,
-0.20725859701633453,
0.462573766708374,
-0.16056793928146362,
0.661794126033783,
-0.011835173703730106,
-1.122125506401062,
0.6198490858078003,
-1.6570684909820557,
1.5088995695114136,
-1.1499303579330444,
0.4019102156162262,
0.2962186932563782,
0.44756460189819336,
... |
def dataprep ( train _ file _ path, instance _ label, class _ label, test _ file _ path ) : train = pd. read _ csv ( train _ file _ path ) if instance _ label! ='none': train = train. drop ( instance _ label, axis = 1 ) trainx = train. drop ( class _ label, axis = 1 ). values trainy = train [ class _ label ]. values de... | [
-0.4882083237171173,
0.23063009977340698,
0.7773965001106262,
-0.7641791701316833,
-0.19297654926776886,
0.4395526051521301,
0.039520565420389175,
0.32575178146362305,
-0.7036173343658447,
0.7736296653747559,
0.1852806806564331,
0.3183225989341736,
0.4347650408744812,
-1.4824024438858032,
... |
def months ( self ) : return months _ fren | [
1.0607898235321045,
-0.3944232761859894,
0.3112640380859375,
0.3646652400493622,
0.6618818044662476,
0.5718450546264648,
0.3543257713317871,
-0.09967011958360672,
0.3833078145980835,
-2.229645252227783,
-0.011049232445657253,
0.016187060624361038,
-0.3672851622104645,
0.17528791725635529,
... |
def _ attributes _ extensible ( self, e = true, getter = none, setter = none, lister = none, caller = none, flow = _ down ) : d = self. _ attributes _ t _ init ( ) d ['extensible'] = e if getter : self. _ attributes _ set _ global _ getter ( getter, flow = flow ) if setter : self. _ attributes _ set _ global _ setter (... | [
-0.3342340290546417,
0.8978562355041504,
0.7329609394073486,
-0.12581287324428558,
-0.4058551490306854,
0.33939310908317566,
0.07257460057735443,
1.1514290571212769,
0.08689626306295395,
0.7780667543411255,
-0.9253341555595398,
0.22391867637634277,
0.19011692702770233,
0.8607581257820129,
... |
def splitcount ( self ) : return len ( self. tabwidgets ) | [
-0.6536636352539062,
0.252705454826355,
0.24430665373802185,
-0.93357914686203,
-0.18494395911693573,
0.8182046413421631,
0.45389342308044434,
0.7689752578735352,
-0.6403441429138184,
-0.751013994216919,
-1.2724745273590088,
-0.689041256904602,
-0.474692165851593,
-0.0844479352235794,
0.... |
def linear _ activation _ backward ( da, da _ prime, cache, j _ cache, lambd, gamma ) : # extract information from current layer cache ( avoids recomputing what was previously computed ) a _ prev, z, w, b, activation = cache # some dimensions that will be useful m = a _ prev. shape [ 1 ] # number of examples n = len ( ... | [
0.03131367638707161,
0.06454599648714066,
0.8497693538665771,
-0.9606649875640869,
-0.568742573261261,
-0.7757509350776672,
1.2862956523895264,
0.4650901257991791,
0.15977276861667633,
0.6185467839241028,
-0.030219297856092453,
0.24067704379558563,
0.11131857335567474,
0.17844006419181824,... |
def set _ default _ encoding ( encoding ) : # if using this with other decorators / fixtures that depend on the system # default encoding, this decorator must be on wrapped on top of them. @ function _ wrapper def _ set _ default _ encoding ( wrapped, instance, args, kwargs ) : # this technique of reloading the sys mod... | [
-0.7822834253311157,
0.08632095903158188,
0.37855541706085205,
0.4953780174255371,
0.20619133114814758,
-0.710793137550354,
0.3030790090560913,
-0.14111240208148956,
1.305590271949768,
0.3807617723941803,
-0.18175634741783142,
-0.3482411503791809,
0.014227776788175106,
0.3548334538936615,
... |
def isdir ( path, source = source _ any ) : if os. path. isabs ( path ) : return os. path. isdir ( path ) # not absolute, so process it. ensure _ paths ( ) if source & source _ profile : if os. path. isdir ( os. path. join ( profile _ path, path ) ) : return true if source & source _ pkg _ resources : if package and pr... | [
-0.5549653768539429,
0.0641496330499649,
0.5483702421188354,
0.9572192430496216,
-0.7038463950157166,
0.4565765857696533,
0.42926788330078125,
-0.13219919800758362,
1.050050139427185,
-1.0619828701019287,
-0.08968544006347656,
-0.06116161495447159,
0.2825039029121399,
0.7493888139724731,
... |
def randomize _ u ( ) : y _ value = normal ( 0. 15, 0. 15 * 0. 1 ) # thermal bridging, error of 10 % due to approximative nature of variable kay = normal ( kappa, kappa _ err ) elle = normal ( lamda, lamda _ err ) cv _ air = 0. 7172 * 1000 # constant length = uniform ( ( 12. 7 - 0. 1 ), ( 12. 7 + 0. 1 ) ) # length + / ... | [
-0.13628041744232178,
0.2963078022003174,
1.0312691926956177,
-0.5192746520042419,
-0.685680627822876,
0.22669917345046997,
1.3139499425888062,
0.22752417623996735,
0.33865857124328613,
-0.7449824810028076,
-0.043174874037504196,
1.0647709369659424,
-0.1915213018655777,
0.5693730115890503,... |
def _ _ call _ _ ( self, images ) : return f. add _ element _ wise ( images, self. value ) | [
-1.970906376838684,
0.04587145149707794,
0.3439960479736328,
-0.11147910356521606,
0.5634062886238098,
-0.5214435458183289,
0.05934023857116699,
-0.013411600142717361,
-0.2999807596206665,
-0.38716092705726624,
0.159493550658226,
-0.6303049921989441,
0.1542847454547882,
0.4835854172706604,... |
def update _ existing ( document _ id, data ) : document = collection. update _ one ( {'_ id': objectid ( document _ id ) }, { " $ set " : data } ) return document. acknowledged | [
-0.1821470856666565,
-0.9036871790885925,
0.4491593837738037,
-0.6239964365959167,
-0.45876240730285645,
0.7911351323127747,
-0.5674530863761902,
0.3820033371448517,
0.38693466782569885,
1.355017066001892,
-0.3342893123626709,
0.7762479782104492,
-1.0583769083023071,
-0.023317942395806313,... |
def tour _ of _ four _ stools ( model : toahmodel, delay _ btw _ moves : float = 0. 5, console _ animate : bool = false ) : n = model. number _ of _ cheeses ( ) list _ of _ moves = moves _ list ( n, 0, 1, 2, 3 ) if console _ animate : for move in list _ of _ moves : toahmodel. move ( model, move [ 0 ], move [ 1 ] ) pri... | [
-0.6811373829841614,
0.6437899470329285,
0.8481271862983704,
0.5656157732009888,
-0.12924432754516602,
-0.18684335052967072,
0.8279094696044922,
-0.45137837529182434,
-0.4003767669200897,
0.6914712190628052,
-0.9000377655029297,
-0.6669544577598572,
0.6359134316444397,
-0.00898116175085306... |
def test _ single _ survey _ package _ instance _ success ( self, client, all _ survey _ package _ instances ) : instance = client. single _ survey _ package _ instance ( " 115df660 - a00a - 4927 - 9e5f - a07d030d4a09 " ) assert instance = = self. test _ survey _ instance | [
-0.41910094022750854,
0.22475869953632355,
0.1987854689359665,
-0.3952254354953766,
-0.2519276738166809,
1.1561696529388428,
0.3914773166179657,
0.5680627226829529,
1.1541242599487305,
-0.3324551582336426,
0.06172933429479599,
-0.35800009965896606,
-0.21955819427967072,
-0.5137962102890015... |
def test _ gruneisen _ coeff ( ) : yield np. testing. assert _ allclose, tab. q ['gruneisen _ coef'] ( x, y ), tab. q ['gamma'] ( x, y ) | [
-0.03203966096043587,
-0.47554293274879456,
0.2985883057117462,
0.024000899866223335,
0.8836110830307007,
0.5143908262252808,
-0.1902320832014084,
-1.2419501543045044,
-0.8011000752449036,
-0.10823896527290344,
-0.3093954920768738,
0.47867897152900696,
0.19871433079242706,
-0.2569232881069... |
def _ get _ flight _ data ( state : statevector, flight _ connection : flightconnection ) \ - > airtrafficdatatype : from _ airport = flight _ connection. est _ departure _ airport or " unknown airport " to _ airport = flight _ connection. est _ arrival _ airport or " unknown airport " return {'icao24': state. icao24,'... | [
-0.14630438387393951,
-0.4398996829986572,
0.7441124320030212,
-0.5574682354927063,
0.21170857548713684,
0.2185516208410263,
-1.0254803895950317,
-0.43610236048698425,
-0.3547807037830353,
-0.6117231845855713,
-0.6523435711860657,
-0.11434951424598694,
0.7834981679916382,
0.037765156477689... |
def standardize ( x ) : mean _ x = np. mean ( x, axis = 0 ) x = x - mean _ x std _ x = np. std ( x, axis = 0 ) std _ x = np. where ( std _ x = = 0, 1, std _ x ) x = x / std _ x return x | [
0.13718420267105103,
0.02393939159810543,
0.5121287703514099,
-0.42196306586265564,
-0.22763873636722565,
0.4783776104450226,
0.19610722362995148,
0.5124682188034058,
0.9349836707115173,
0.5057061314582825,
-0.4582221210002899,
0.9653341770172119,
-0.06422551721334457,
0.34058234095573425,... |
def update _ analyze _ button ( disabled ) : if not disabled : style = { " width " : " 100 % ", " text - transform " : " uppercase ", " font - weight " : " 700 ", " background " : " green ", " outline " : " green " } else : style = { " width " : " 100 % ", " text - transform " : " uppercase ", " font - weight " : " 700... | [
-0.026314273476600647,
-0.020525949075818062,
0.5977604389190674,
-0.11682994663715363,
-0.7751766443252563,
-0.1552538126707077,
-0.5321780443191528,
0.46557891368865967,
0.756140947341919,
0.8185749053955078,
0.16747364401817322,
-0.36463767290115356,
-0.10993780940771103,
0.225285917520... |
def save _ pickle ( self, filename _ or _ file _ object ) : if hasattr ( filename _ or _ file _ object,'read') : fi = filename _ or _ file _ object else : fi = open ( filename _ or _ file _ object,'wb') pickle. dump ( self. model. chain, fi ) fi. close ( ) | [
-0.48018932342529297,
-0.9772564172744751,
0.5157240629196167,
0.226214200258255,
0.9568353295326233,
0.19132573902606964,
0.17413946986198425,
-0.06973997503519058,
-0.7741789817810059,
-0.27151498198509216,
-0.04197181388735771,
-0.5843779444694519,
-0.1409534066915512,
0.357563823461532... |
def tinymazesearch ( problem ) : from game import directions s = directions. south w = directions. west return [ s, s, w, s, w, w, s, w ] | [
-0.9905261993408203,
0.09146970510482788,
0.28795918822288513,
0.25314611196517944,
0.2685844898223877,
-0.3735058009624481,
0.5777710676193237,
-0.1670675277709961,
1.4717352390289307,
0.7043750286102295,
-0.9587705731391907,
-0.6472402215003967,
0.4975864291191101,
-0.17286936938762665,
... |
def updateldapuseringroupassignments ( auth, user _ settings _ manager, user _ id ) : user = auth. getuser ( user _ id ) group _ id _ list = auth. getgroupsforprincipal ( user ) log. debug ( " ldap > user : [ % s ] ", user _ id ) log. debug ( " ldap > user's groups from ldap : [ % s ] ", ", ". join ( group _ id _ list ... | [
-1.7134064435958862,
0.08008784055709839,
0.41033512353897095,
-0.2541033625602722,
-0.46845293045043945,
0.02172420732676983,
0.00825123768299818,
-0.17626968026161194,
-0.2213006615638733,
0.8222901225090027,
-0.03825341910123825,
0.742003858089447,
-0.35825249552726746,
0.75720262527465... |
def gf _ mul _ const ( f, a, p ) : if not a : return [ ] else : return [ ( a * b ) % p for b in f ] | [
0.18902388215065002,
0.34813058376312256,
0.41766834259033203,
0.665962815284729,
0.9118469953536987,
0.7946567535400391,
-0.880954384803772,
1.2320202589035034,
-0.15527404844760895,
0.9886234402656555,
0.33784037828445435,
-0.7160629034042358,
-0.43980664014816284,
0.06000130623579025,
... |
def service _ get _ all _ compute _ sorted ( context ) : return impl. service _ get _ all _ compute _ sorted ( context ) | [
-0.22389249503612518,
0.4273163378238678,
0.39712226390838623,
0.7097153067588806,
0.14884008467197418,
0.33035993576049805,
-0.3230414092540741,
-1.731995701789856,
-0.37270528078079224,
-0.9950166344642639,
0.43883758783340454,
1.2568809986114502,
0.042576827108860016,
0.6173973679542542... |
def view _ mt699 _ enabled ( self ) : try : if self. active _ sheet : for cell in self. active _ sheet. selection ( ). selectedcells ( ) : if cell. isheadercell ( ) : acm _ object = cell. rowobject ( ) typ _ of _ msg = fswiftmlutils. calculate _ mt _ type _ from _ acm _ object ( acm _ object ) typ _ of _ msg ='mt'+ str... | [
0.527857780456543,
-0.1536262482404709,
0.7004605531692505,
-0.29835233092308044,
-1.0720630884170532,
-0.290722131729126,
0.05372941121459007,
-0.3489813506603241,
-0.046227119863033295,
-0.22601962089538574,
0.29427585005760193,
0.21681268513202667,
-0.42092350125312805,
0.88782262802124... |
def analyze ( self, text : str ) - > doc : doc = doc ( language = self. language. iso _ 639 _ 3 _ code, raw = text ) for process in self. pipeline. processes : a _ process = self. _ get _ process _ object ( process ) doc = a _ process. run ( doc ) return doc | [
0.3481302261352539,
-0.08337496966123581,
0.453870952129364,
-0.12421882152557373,
-0.5859675407409668,
-0.622471809387207,
-0.14672178030014038,
0.2844194769859314,
-0.11547652631998062,
-0.3452003300189972,
0.1088898554444313,
0.20415322482585907,
0.04776349291205406,
-0.2417006343603134... |
def connector _ spec _ path _ fixture ( inputs, base _ path ) - > path : return path ( base _ path ) / getattr ( inputs, " spec _ path " ) | [
-0.07151412963867188,
-1.0995301008224487,
0.3608758747577667,
0.014309956692159176,
0.4268963634967804,
0.5173850655555725,
1.2440519332885742,
-0.4091208577156067,
0.07755716890096664,
-0.48144277930259705,
1.1905162334442139,
-0.6693525314331055,
0.5533431768417358,
-0.3901596665382385,... |
def rotate ( self, direction : int ) - > none : if len ( self. children ) = = 0 : # rotating a solid block does nothing. pass elif direction = = 1 : for child in self. children : child. rotate ( direction ) old = self. children new = [ old [ 1 ], old [ 2 ], old [ 3 ], old [ 0 ] ] self. children = new self. update _ blo... | [
-0.7473432421684265,
0.5348501801490784,
0.7341312766075134,
-0.15564055740833282,
0.40624919533729553,
0.021943632513284683,
0.7720780372619629,
-0.4368366301059723,
0.13583382964134216,
-0.373058557510376,
-0.7620317935943604,
-0.1717737466096878,
-1.0480669736862183,
0.2241060584783554,... |
def resize _ image ( image, height, width ) : return scipy. misc. imresize ( image, ( height, width ),'bilinear') | [
0.3550020158290863,
0.3900236189365387,
0.35932856798171997,
0.2776326537132263,
0.8044630885124207,
-0.8807525634765625,
-1.0890051126480103,
-0.3908360004425049,
-0.5103987455368042,
-0.014142889529466629,
0.7892787456512451,
0.15172624588012695,
-0.2975466847419739,
-0.3445206582546234,... |
def vpnvserver _ appcontroller _ bindings ( self ) : try : return self. _ vpnvserver _ appcontroller _ binding except exception as e : raise e | [
0.1759623885154724,
-0.5121721029281616,
0.41295769810676575,
1.7787175178527832,
-0.6781045794487,
1.0270214080810547,
-0.12278644740581512,
-0.25748366117477417,
0.8832457661628723,
0.09258786588907242,
-0.5066494345664978,
-0.07320408523082733,
-0.15711873769760132,
0.7707735300064087,
... |
def generate _ ngram ( string, n ) : ans ='' for i in range ( len ( string ) - n + 1 ) : ans + = string [ i : i + n ] ans + ='' return ans | [
-0.5863295793533325,
0.9754396677017212,
0.1581992208957672,
0.04321775212883949,
-0.41891366243362427,
-0.20038065314292908,
-0.3546333909034729,
-0.4297824501991272,
0.04476054757833481,
0.0942472517490387,
-0.7013846635818481,
0.6821634769439697,
-0.7863770127296448,
-0.3155751526355743... |
def tapformat ( number ) : number = number - 16 if number = = - 16 : number = 0 return number | [
-0.018322685733437538,
-0.1548852175474167,
0.6630756258964539,
-0.21700118482112885,
0.053633011877536774,
0.4304715692996979,
-0.08434534072875977,
-0.21049989759922028,
0.8925773501396179,
-0.42433327436447144,
0.936186671257019,
-1.1335082054138184,
0.8622995018959045,
0.31119465827941... |
def advanceptcls ( self, xd, yd, zd, vxd, vyd, vzd, qd, md, dampingcoefficient, dt ) : prec = xd. dtype if prec = = numpy. float32 : self. axialdampingadvf. advance _ ptcls _ axial _ damping ( self. queue, ( xd. size, ), none, xd. data, yd. data, zd. data, vxd. data, vyd. data, vzd. data, qd. data, md. data, numpy. flo... | [
-0.14163143932819366,
0.32265201210975647,
0.7553460597991943,
-0.8533185124397278,
-0.15062874555587769,
0.6291965246200562,
0.008344386704266071,
-0.7635092735290527,
-0.046828195452690125,
-0.0939820408821106,
0.8606305122375488,
0.5689634680747986,
0.47897982597351074,
0.41448014974594... |
def arr _ to _ one _ hot ( x ) : oh = np. zeros ( ( x. size, x. max ( ) + 1 ) ) oh [ np. arange ( x. size ), x ] = 1 return oh | [
-0.45995160937309265,
-0.017689554020762444,
0.44050347805023193,
0.7926889061927795,
0.04426781088113785,
0.361605167388916,
0.05796319618821144,
0.24139396846294403,
1.4126102924346924,
0.3208005726337433,
-0.1894698292016983,
0.5849049091339111,
0.2927236557006836,
-0.1516002118587494,
... |
def plot ( self ) : ci _ min, ci _ max = self. getconfidenceintervals ( ) sns. distplot ( 1 / self. bootstrapped _ lams, color ='teal ', bins = 30 ) plt. axvline ( 1 / self. estimated _ lam, color ='teal ', linestyle =': ', lw = 8 ) plt. xlabel ( " calculated days ( 1 / lambda ) " ) plt. title ( " estimated lambda : { ... | [
0.8624317646026611,
0.8316787481307983,
0.5942798256874084,
-1.0659880638122559,
-0.23012837767601013,
0.8303590416908264,
-0.06458113342523575,
-0.013007670640945435,
-0.3113316595554352,
-0.6109327673912048,
0.0846116691827774,
1.496620535850525,
0.08583725988864899,
0.5684154033660889,
... |
def hue _ inc ( id, value ) : return put _ state ( id, { " hue _ inc " : value } ) | [
-0.6102361083030701,
0.7869945764541626,
0.3663375973701477,
0.2857769727706909,
-0.43357887864112854,
0.6216423511505127,
0.05602547898888588,
0.49121078848838806,
0.6483843326568604,
0.019227098673582077,
-0.9983575344085693,
0.03437168523669243,
0.2353224754333496,
-0.217555433511734,
... |
def is _ url ( url ) : try : return parse _ url ( url ). scheme in _ valid _ urls except exception : return false | [
-0.6578540802001953,
0.5976987481117249,
0.43407151103019714,
0.80177903175354,
-0.2683545649051666,
0.4899238049983978,
-0.5208025574684143,
0.4247918128967285,
0.8123396635055542,
-0.2570466697216034,
-0.15845966339111328,
-0.0947515144944191,
-0.5013075470924377,
0.005009879358112812,
... |
def test _ addbothfailureexctraargs ( self ) : failure = synchronousfailure ( runtimeerror ( ) ) sd = synchronousdeferred ( failure ) l = [ ] def eb ( r, extra, more = none ) : l. append ( ( r, extra, more ) ) sd. addboth ( eb, 1, more = " heyo " ) self. assertequals ( l, [ ( failure, 1, " heyo " ) ] ) | [
-0.13781699538230896,
0.1822260618209839,
0.6738494038581848,
-0.056564971804618835,
0.261589914560318,
0.7498367428779602,
-0.6495349407196045,
0.2566712498664856,
0.2239294797182083,
-0.5425788760185242,
-0.8620580434799194,
0.16528308391571045,
-0.2291390299797058,
1.1264150142669678,
... |
def inspectremaining2group ( self, cell ) : # if the cell needs 2 more active sides if cell. remainingreqs ( ) = = 2 : unsetsidelinks = cell. getunsetsidelinks ( simple = false ) links1 = [ ] # links with size 1 links2 = [ ] # links with size 2 otherlinks = [ ] # links with size > 2 for sidelink in unsetsidelinks : if ... | [
-0.6594777703285217,
0.12473815679550171,
0.8451204299926758,
-0.2773207128047943,
-0.16063784062862396,
-0.5069422125816345,
0.4813145101070404,
-0.44402870535850525,
-0.6145707368850708,
-0.3631170094013214,
0.33069542050361633,
0.3402641713619232,
-0.40387624502182007,
0.539253413677215... |
def initialize _ data ( cls, host _ override, directory _ override, depth _ override ) : cls. host = test. select _ host ( config. host, host _ override ) cls. data = test. select _ directory ( config. data, directory _ override ) cls. depth = test. select _ depth ( config. depth, depth _ override ) cls. base _ url = t... | [
-0.7239744067192078,
-0.013219968415796757,
0.484332412481308,
-0.2815544307231903,
1.0922755002975464,
0.0058055599220097065,
0.23065610229969025,
-0.3587300181388855,
-0.906051754951477,
-0.9663630127906799,
-0.8031092286109924,
0.6870177984237671,
-0.03765913471579552,
0.523511528968811... |
def hamming _ distance ( str1, str2 ) : diffs = 0 for ch1, ch2 in zip ( str1, str2 ) : if ch1! = ch2 : diffs + = 1 return diffs | [
-0.058023300021886826,
-0.5282175540924072,
0.5000235438346863,
-0.1627863645553589,
-0.14262692630290985,
0.32590317726135254,
-0.2786494791507721,
0.04187237471342087,
-0.3009895086288452,
0.6782561540603638,
-0.9637919068336487,
1.1836049556732178,
-0.5987547039985657,
0.097579993307590... |
def get _ datacenters ( self, uuid = none, market ='market ', * * kwargs ) : return self. get _ entities ('datacenter ', uuid = uuid, market = market, * * kwargs ) | [
-0.9926150441169739,
0.6890829801559448,
0.182254359126091,
-0.1991063505411148,
1.0759419202804565,
-1.0716526508331299,
-0.8238517642021179,
-0.0850619450211525,
-0.0607607364654541,
0.20683728158473969,
0.0006808750331401825,
0.71392822265625,
-0.07983080297708511,
-0.6214326620101929,
... |
def get _ object ( source ) : # ensures minio bucket exists make _ bucket ( bucket _ name ) data = minio _ client. get _ object ( bucket _ name = bucket _ name, object _ name = source, ) buffer = bytesio ( ) for d in data. stream ( 32 * 1024 ) : buffer. write ( d ) buffer. seek ( 0, seek _ set ) return buffer. read ( ) | [
0.006267429795116186,
0.1737712174654007,
0.47514694929122925,
-0.5629959106445312,
-0.8206872940063477,
-0.3290667235851288,
-0.22381089627742767,
-0.8505492210388184,
0.4121306240558624,
-0.4734375774860382,
-1.3432459831237793,
0.9226202964782715,
0.09567980468273163,
-1.351890325546264... |
def test _ consecutive _ sudos _ should _ not _ have _ blank _ line ( self ) : env. password = none env. no _ agent = env. no _ keys = true env. key _ filename = client _ privkey with password _ response ( ( client _ privkey _ passphrase, passwords [ user ] ), silent = false ) : sudo ('oneliner') sudo ('twoliner') expe... | [
-0.04878012835979462,
-0.06939979642629623,
0.6066659092903137,
0.07534664869308472,
0.15633919835090637,
-0.005203159060329199,
-0.048981472849845886,
0.2935848832130432,
0.1405092179775238,
-0.5703573822975159,
-0.5223110914230347,
0.39050403237342834,
0.24101795256137848,
0.131738826632... |
def test _ deeptracy _ exception _ holds _ an _ api _ status _ code ( self ) : status _ code = 201 with self. assertraises ( apierror ) as exc : raise apierror ('custom message ', status _ code = status _ code ) self. assertequal ( exc. exception. status _ code, status _ code ) | [
0.22375795245170593,
0.1550069898366928,
0.1794329583644867,
-0.09906361997127533,
0.7999873161315918,
-0.2843378186225891,
-0.23287807404994965,
1.217664361000061,
0.1716689169406891,
-0.2740415334701538,
-0.6249456405639648,
0.18589256703853607,
0.04270759969949722,
-0.3058019280433655,
... |
def _ _ ne _ _ ( self, other ) : return not self. _ _ eq _ _ ( other ) | [
-1.3539173603057861,
-0.5553365349769592,
0.6989317536354065,
0.03152375668287277,
0.13180290162563324,
0.5538831949234009,
-0.5455554723739624,
-0.6480177044868469,
-0.026479646563529968,
-0.2379682958126068,
-0.47095200419425964,
-0.4805677831172943,
-0.2736729383468628,
0.25605517625808... |
def update ( cls, data ) : with session. begin ( ) : cls. query. delete ( ) cls. _ load _ data ( data ) cls. after _ load _ into _ table ( ) | [
-1.1492838859558105,
-0.6026476621627808,
0.4343757629394531,
0.1539096087217331,
-1.0117958784103394,
0.16729556024074554,
-0.06201079487800598,
-0.12685248255729675,
0.5124541521072388,
0.14739638566970825,
-0.25619667768478394,
-0.29711756110191345,
-0.5113633275032043,
-0.4410466849803... |
def is _ an _ adj ( word ) : # it is a noun verb pronoun or determinant so we have to return false if word in resourcepool ( ). special _ nouns + resourcepool ( ). special _ verbs + resourcepool ( ). pronouns + resourcepool ( ). determinants : return false # for the regular adjectives for k in resourcepool ( ). adjecti... | [
-0.41138359904289246,
-0.15129324793815613,
0.4030284881591797,
-0.632699191570282,
-1.0950944423675537,
0.9740049839019775,
-0.0402965322136879,
-0.25742214918136597,
-0.26668989658355713,
-0.24373504519462585,
0.59408038854599,
0.597189724445343,
-0.8579456806182861,
1.0413720607757568,
... |
def filteracceptsrow ( self, row _ num, parent ) : model = self. sourcemodel ( ) last _ change = str ( model. data ( model. index ( row _ num, 9 ) ) ) # this is last if last _ change = ='- 1': return false if self. filterstring! ='' : filters _ = [ x. strip ( ) for x in self. filterstring. split ( " ; " ) ] found = [ f... | [
-0.4005511999130249,
0.16360333561897278,
0.782770037651062,
0.07173024863004684,
-0.9326165318489075,
-0.21054993569850922,
0.08693268150091171,
-0.14408382773399353,
-0.0663144439458847,
0.027475187554955482,
0.5363327264785767,
0.16074791550636292,
0.1347343623638153,
0.5275511741638184... |
def composite _ perm ( perm1, perm2, * other _ perms ) : perm = perm2 [ perm1 ] for other _ perm in other _ perms : perm = other _ perm [ perm ] return perm. copy ( ) | [
-0.37070590257644653,
-1.0300956964492798,
0.8229273557662964,
0.6273615956306458,
-0.20359668135643005,
0.5033165812492371,
-0.19622737169265747,
0.2946319580078125,
-0.5135230422019958,
1.363411545753479,
0.2392812818288803,
0.3016245365142822,
-1.8346539735794067,
-0.9428154230117798,
... |
def get _ auth _ args ( self, request ) - > dict : raise notimplemented | [
-2.173980712890625,
-0.0008549243211746216,
0.6957433223724365,
0.6957033276557922,
-0.45175623893737793,
-0.06581994146108627,
-0.12512032687664032,
-0.33428868651390076,
0.001559436321258545,
0.2821134328842163,
-0.6464083790779114,
0.1149836853146553,
0.4994145333766937,
0.4171023666858... |
def tuple _ set ( tset, name = none ) : res = build _ cpo _ tupleset ( tset ) if name : res. set _ name ( name ) return res | [
-1.0236775875091553,
0.7348068952560425,
0.3501380681991577,
-1.0909494161605835,
-1.1484613418579102,
-0.9827690124511719,
0.20001079142093658,
-0.0422055721282959,
-0.09398114681243896,
1.0903884172439575,
-0.7163447141647339,
-0.7805196046829224,
0.2498990297317505,
-1.2352405786514282,... |
def toccode ( self ) : return " int main ( ) \ n { \ n " | [
0.7716819047927856,
-0.8947402238845825,
0.4715765118598938,
-0.5036945343017578,
-0.23127737641334534,
0.004904812667518854,
-0.27037590742111206,
-0.5462111234664917,
-0.15917448699474335,
0.21450884640216827,
0.5068942904472351,
-0.02277044579386711,
-0.27485769987106323,
0.257481455802... |
def set _ doors ( self, doornum ) : possible _ doors = list ( ) list _ and _ dir = [ ( self. get _ top _ wall ( ),'n'), ( self. get _ bottom _ wall ( ),'s'), ( self. get _ left _ wall ( ),'w'), ( self. get _ right _ wall ( ),'e') ] for tiles, dirr in list _ and _ dir : for tile in tiles : direction = cons. four _ direc... | [
-0.9160017967224121,
0.24688588082790375,
0.6215803623199463,
0.4100557565689087,
0.7209802865982056,
-0.3520841896533966,
0.4718182682991028,
-0.26661160588264465,
0.43020403385162354,
-0.167059987783432,
-0.9601784348487854,
0.22157129645347595,
-1.2503260374069214,
1.6871161460876465,
... |
def test _ 0 _ 100 _ 10 ( self ) : self. spawn ( ". / digits " ). stdin ( " 0 " ). stdin ( " 100 " ). stdin ( " 10 " ). stdout ( " digits : 6 \ n ", " digits : 6 \ n " ). exit ( 0 ) | [
-0.26774999499320984,
0.40424489974975586,
0.7171865105628967,
0.18014061450958252,
0.9866339564323425,
0.37465906143188477,
0.007628006860613823,
-0.3117372691631317,
-0.47752586007118225,
-0.12597639858722687,
-0.06226417049765587,
0.4246920049190521,
0.5555521845817566,
0.46027672290802... |
def num ( n = 0, s = " " ) : return { " at " : n, " txt " : s, " n " : 0, " hi " : - math. inf, " lo " : math. inf, " ok " : true, " has " : [ ], " w " : - 1 if " - " in s else 1 } | [
-0.2637811303138733,
0.09827630966901779,
0.3304491639137268,
-0.530121386051178,
-1.1315865516662598,
-0.7088439464569092,
-0.04635346680879593,
-0.06189015507698059,
-0.6428930163383484,
-0.4261128902435303,
-1.5737162828445435,
-0.2773287892341614,
0.6337578892707825,
0.1572932451963424... |
def create _ grid ( self ) : self. node _ list = [ ] for i in range ( self. num _ rectangles ) : self. node _ list. append ( [ x for x in range ( self. num _ rectangles ) ] ) self. canvas = canvas ( self. gui, height = self. length, width = self. length, bg = " black " ) self. canvas. bind ( " < 1 > ", self. clicked ) ... | [
-0.8579375147819519,
0.2662695646286011,
0.8429998159408569,
-0.4527135491371155,
0.3152102530002594,
-0.651902437210083,
1.13523268699646,
-0.5332733392715454,
-0.25920072197914124,
-0.170867457985878,
-0.07568257302045822,
-0.11500050872564316,
0.009743563830852509,
0.604877769947052,
... |
def parse ( self, infile ) : raise notimplementederror ( ) | [
-0.25867220759391785,
-0.6680930852890015,
0.36966824531555176,
0.2831524908542633,
-0.5418785810470581,
1.2227205038070679,
0.30089831352233887,
0.5552040934562683,
-0.5947098135948181,
-0.8006333708763123,
-0.39497971534729004,
-0.37314504384994507,
-0.7976254224777222,
-0.13340313732624... |
def is _ prime ( number ) : if number < = 1 : return false for element in range ( 2, number ) : if number % element = = 0 : return false return true | [
-1.2070863246917725,
0.8451294302940369,
0.4446859359741211,
1.1612935066223145,
0.302467405796051,
0.27981892228126526,
-0.6268869638442993,
0.3449159562587738,
1.2977582216262817,
-0.4190661907196045,
-0.2563081383705139,
-0.8641062378883362,
-1.0200330018997192,
0.7444742321968079,
-0... |
def _ color _ selected ( string, selected ) : col = " \ u001b [ 32 ; 1m " if selected else " \ u001b [ 91 ; 2m " return col + string + " \ u001b [ 0m " | [
0.2184942662715912,
-0.47530999779701233,
0.6227860450744629,
-0.2704114019870758,
0.06908945739269257,
-0.15020479261875153,
-0.4492240250110626,
-0.056994255632162094,
0.018688339740037918,
0.2234574407339096,
0.39385250210762024,
1.2061824798583984,
-0.07822122424840927,
-0.779603004455... |
def next _ time ( self, event ) : self. time _ update ( self. stime. val + self. time _ step ) | [
-0.2355370670557022,
0.3630269169807434,
0.3939644992351532,
0.6618006229400635,
-0.7396289706230164,
0.47861573100090027,
-0.8030292391777039,
-0.21610110998153687,
-0.25132137537002563,
1.1761727333068848,
-0.8462353348731995,
-0.3594263792037964,
0.2370433509349823,
0.851471483707428,
... |
def _ printinorder ( self, node = none, traversal = [ ] ) : if node : traversal = self. _ printinorder ( node. left, traversal ) traversal. append ( str ( node. data ) ) traversal = self. _ printinorder ( node. right, traversal ) return traversal | [
-0.5521823763847351,
0.2114313691854477,
0.633104681968689,
-0.17747089266777039,
-0.4236465394496918,
-0.0167135801166296,
-1.2819918394088745,
-0.5148992538452148,
-0.03862420469522476,
0.48062509298324585,
-0.13406383991241455,
0.38859835267066956,
-0.49183517694473267,
0.93011540174484... |
def quota _ class _ destroy ( context, class _ name, resource ) : return impl. quota _ class _ destroy ( context, class _ name, resource ) | [
-1.4096134901046753,
-1.0440399646759033,
0.4224005341529846,
0.2951264977455139,
-0.7728497982025146,
0.0920870378613472,
0.1232994869351387,
-0.3911268711090088,
0.30257657170295715,
1.1973490715026855,
0.23792003095149994,
-0.4803304672241211,
1.1270642280578613,
-0.7784123420715332,
... |
def authenticate ( username, password ) : user = usermodel. find _ by _ username ( username ) if user and safe _ str _ cmp ( user. password, password ) : return user # we don't have to include return none ( if username / pass don't match ) # in the above function as it is the default in python | [
0.6063034534454346,
-1.2803459167480469,
0.587203323841095,
0.5942679643630981,
-0.536998987197876,
0.22935356199741364,
-0.46347561478614807,
-0.49326595664024353,
0.30206727981567383,
0.09666291624307632,
0.46474650502204895,
-0.08336250483989716,
-1.0517216920852661,
-0.5817159414291382... |
def _ _ getitem _ _ ( self, name ) : node = self. _ findbyid ( self. _ tree, name ) if node : return meld ( node, self. _ readonly ) raise keyerror, " no element named % r " % name | [
0.3850480914115906,
0.03880593925714493,
0.4771362543106079,
0.016874663531780243,
-0.9741889834403992,
0.18458208441734314,
-0.6177565455436707,
-1.0163028240203857,
0.27719300985336304,
-0.3171238601207733,
-0.15287497639656067,
0.46442267298698425,
0.017995255067944527,
-0.3559325635433... |
def _ launch _ separate _ process ( cls ) : if cls. _ os _ proc is none : cls. _ do _ launch _ separate _ process ( ) return cls. _ port | [
0.9369915127754211,
-0.39218246936798096,
0.7516223788261414,
0.2649994194507599,
-0.18784569203853607,
0.47777485847473145,
1.2679755687713623,
-0.5251273512840271,
0.5218998193740845,
-0.8524569272994995,
0.3236556351184845,
0.42313891649246216,
-0.5284104943275452,
0.23128119111061096,
... |
def iab _ content _ rating ( ) : ratings = { 1 : " all audiences ", 2 : " everyone over 12 ", 3 : " mature audiences ", 4 : " unknown / undisclosed " } | [
-0.6333375573158264,
0.19286209344863892,
0.4790959358215332,
-0.6189951300621033,
0.0028726153541356325,
0.8412627577781677,
-0.3681105077266693,
-0.06236566603183746,
-0.5363590121269226,
1.064225435256958,
-0.6422115564346313,
-0.2817182242870331,
-0.9773428440093994,
-0.567854583263397... |
def conv3x3 ( in _ planes, out _ planes, stride = 1, groups = 1, dilation = 1 ) : return nn. conv2d ( in _ planes, out _ planes, kernel _ size = 3, stride = stride, padding = dilation, groups = groups, bias = false, dilation = dilation ) | [
0.751173198223114,
0.3234400451183319,
0.3745567500591278,
0.22451305389404297,
-1.4694559574127197,
1.0457452535629272,
-1.1139520406723022,
-0.011763549409806728,
-0.16540075838565826,
0.5452169179916382,
0.19115522503852844,
-0.020335013046860695,
-0.13911305367946625,
-1.17195165157318... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.