text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ cancel _ paypal _ transaction ( self ) : pass | [
0.8891436457633972,
0.18979431688785553,
0.015022901818156242,
0.8113589882850647,
-0.12415634840726852,
1.0129445791244507,
0.36239761114120483,
0.0203732717782259,
0.2176818549633026,
-0.3267383277416229,
-0.5609829425811768,
-0.9942147135734558,
-0.6592432856559753,
-0.8692490458488464,... |
def insert ( self, data ) : if self. k is none : self. k = len ( data ) def _ step ( current, prev ) : if current is none : return prev elif data [ current. axis ] < current. value [ current. axis ] : return _ step ( current. left, current ) else : return _ step ( current. right, current ) parent = _ step ( self. root,... | [
0.13300618529319763,
0.6682955622673035,
0.7905975580215454,
-0.0253001619130373,
-0.8399990797042847,
0.6296069025993347,
0.7582383155822754,
0.07559944689273834,
-0.15313509106636047,
-0.24620532989501953,
-0.3892163038253784,
-0.5388994812965393,
-1.6723098754882812,
0.6028028726577759,... |
def test _ atomic _ boolean _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 5. xsd ", instance = " nistdata / atomic / bo... | [
-0.07058479636907578,
-0.480743408203125,
0.42361149191856384,
0.6989232301712036,
-0.21843524277210236,
0.12929421663284302,
0.4509424567222595,
-0.496743768453598,
-0.6278499960899353,
1.1060699224472046,
-0.6172934174537659,
0.04344595968723297,
-0.6365147829055786,
-0.16541282832622528... |
def clone ( self ) : clone = spectrum ( mz = self. peaks. mz, intensities = self. peaks. intensities, metadata = self. metadata ) clone. losses = self. losses return clone | [
0.6164360046386719,
-1.5686489343643188,
0.6832442879676819,
0.08962864428758621,
-0.5952836871147156,
0.9051035046577454,
-0.48783743381500244,
-0.28760889172554016,
0.809944212436676,
0.03988588973879814,
-0.03279763087630272,
0.8924024105072021,
-0.22608144581317902,
-0.8339655995368958... |
def exclude _ from _ data ( data, min _ f, max _ f, exclude _ below = none, exclude _ above = none, exclude _ min _ max = false, exclude _ around = none, min _ max _ eps = 0. 00001, data _ type ='standard') : if not exclude _ above : exclude _ above = max _ f # either from data value range, or from'range'attibute - > g... | [
-0.43095219135284424,
-0.24101795256137848,
0.8429970741271973,
0.30504265427589417,
-0.33812788128852844,
0.5307931900024414,
0.34255853295326233,
-0.247911736369133,
0.3552803695201874,
-0.17404285073280334,
0.13394683599472046,
0.6599429845809937,
0.5077024102210999,
0.3703359365463257,... |
def handlepost ( self ) : key _ urlsafe = self. request. get ('key'). strip ( ) triage _ result = self. request. get ('triage _ result') if not key _ urlsafe or triage _ result is none : return {'data': {'success': false } } # as the permission level is corp _ user, we could assume the current user # already logged in.... | [
-0.7231166362762451,
1.0182173252105713,
0.3526633679866791,
0.45790237188339233,
-0.7293784022331238,
-0.807235062122345,
0.7556208372116089,
0.3612847626209259,
-0.16759149730205536,
-0.09083980321884155,
-0.03925823047757149,
-0.06971621513366699,
-0.6521570682525635,
-0.258642911911010... |
def check _ states _ are _ close ( self, pop, exd, tol ) : return check _ states _ are _ close ( pop. size, self. num _ states, exd. p _ state, exd. p _ next, tol ) | [
-0.24734845757484436,
-0.29049795866012573,
0.43742844462394714,
0.2163117378950119,
-0.9654812216758728,
0.7743229866027832,
0.23312972486019135,
-0.2977658212184906,
0.3501715660095215,
0.7700598835945129,
0.6186441779136658,
-0.4663461744785309,
-0.2973824739456177,
-0.6746890544891357,... |
def test _ zero _ compaction ( ) - > none : dz _ 0 = np. full ( 100, 1. 0 ) phi _ 0 = np. full ( 100, 0. 5 ) phi _ 1 = compact ( dz _ 0, phi _ 0, porosity _ max = 0. 5, c = 0. 0 ) assert np. all ( phi _ 1 = = approx ( phi _ 0 ) ) | [
0.8636882901191711,
-0.23992937803268433,
0.35610726475715637,
0.3182649612426758,
0.3023766577243805,
0.7815033793449402,
0.8549747467041016,
0.4384235143661499,
-0.32057440280914307,
-0.24418459832668304,
-0.14581191539764404,
0.03769449517130852,
-0.6453922390937805,
1.1212464570999146,... |
def bbands _ strategy ( data, close _ column, period = 5, nbdevup _ = 2, nbdevdn _ = 2, matype _ = 0 ) : # calculate bbands upperband, middleband, lowerband = talib. bbands ( data [ close _ column ], timeperiod = period, nbdevup = nbdevup _, nbdevdn = nbdevdn _, matype = matype _ ) lowerband = pd. series ( lowerband ) ... | [
-0.5267353057861328,
0.4200926125049591,
0.8862572312355042,
0.025037596002221107,
0.05622259899973869,
1.3450429439544678,
0.5660581588745117,
-0.24874910712242126,
-0.0961742177605629,
0.6740976572036743,
0.598383367061615,
0.6522946953773499,
0.25218698382377625,
-0.05547923594713211,
... |
def trim _ to _ domain ( self, x1, x2 ) : try : a = next ( i for i in xrange ( len ( self. x ) ) if self. x [ i ] > = x1 ) except stopiteration : # failed to match a = b = 0 else : try : b = next ( i for i in xrange ( len ( self. x ) - 1, a, - 1 ) if self. x [ i ] < = x2 ) + 1 except stopiteration : # failed to match b... | [
-0.35174334049224854,
0.11229772120714188,
0.6472523212432861,
0.020549658685922623,
0.22322526574134827,
0.004835611674934626,
-0.20003457367420197,
-0.7639960050582886,
-0.5689980983734131,
0.06215089559555054,
-0.1550682634115219,
1.7639187574386597,
-0.04060579091310501,
-1.02171874046... |
def cache _ regional _ scalars ( parent _ dir : str, gbd _ round _ id : int ) - > none : scalars _ path = _ get _ regional _ scalars _ path ( parent _ dir ) scalars = get _ all _ regional _ scalars ( gbd _ round _ id ) data _ cols = [ columns. location _ id, columns. sex _ id, columns. year _ id ] cache _ hdf ( scalars... | [
0.16435526311397552,
0.2549186944961548,
0.35947656631469727,
-0.8240098357200623,
0.0006316848448477685,
0.30002036690711975,
0.13433900475502014,
-0.5426579713821411,
-0.8118151426315308,
0.20957708358764648,
-0.8074562549591064,
1.6375564336776733,
0.24153317511081696,
-0.15893511474132... |
def _ rewind _ file ( self ) : # type : ( ) - > none self. _ file. seek ( 0, os. seek _ set ) self. _ read _ eof = false self. _ uncompressed _ position = 0 | [
0.44272568821907043,
-0.3478735387325287,
0.28766772150993347,
-0.9735500812530518,
1.3728139400482178,
0.3050021827220917,
1.2456214427947998,
-0.03035006858408451,
-2.106571674346924,
-0.9907835721969604,
0.9537510275840759,
0.5430780649185181,
0.3551298975944519,
-0.5163163542747498,
... |
def make _ params ( self, entry, state ) : p = { } p. update ( state ) p. update ( entry ) if self. keys _ in ( p, ['starsystem ','body'] ) : p ['shortbody'] = self. short _ body ( p ['starsystem'], p ['body'] ) return p | [
-0.3226979374885559,
-0.259275883436203,
0.34869396686553955,
-1.0963575839996338,
-0.91162109375,
0.6561220288276672,
-1.1162595748901367,
-0.020614538341760635,
0.2481159269809723,
0.5740910172462463,
-0.3754171133041382,
0.5369147062301636,
0.5493535399436951,
0.4789797365665436,
-0.4... |
def configure _ database ( settings _ module = " calelib. database _ settings. settings " ) : os. environ. setdefault ( " django _ settings _ module ", settings _ module ) get _ wsgi _ application ( ) | [
-0.5028860569000244,
0.7639546990394592,
0.3813825845718384,
0.8238098621368408,
0.8579007983207703,
0.862564206123352,
-0.24498069286346436,
-0.33389872312545776,
-0.44511541724205017,
0.7612490653991699,
-0.8037527203559875,
0.4854585826396942,
-0.6492941379547119,
0.8625671863555908,
... |
def unwatch _ server ( self, address ) : channel _ server = self. _ channel ( self. server, address ) subscriber = yield from self. _ get _ subscriber ( ) yield from subscriber. unsubscribe ( [ channel _ server ] ) log. debug ( " unsubscribed from % s ", channel _ server ) | [
0.7178036570549011,
-0.19725550711154938,
0.4922805428504944,
-0.9144754409790039,
-0.6933324933052063,
-0.34266602993011475,
0.05815155804157257,
0.0657721608877182,
0.28077030181884766,
-0.009714484214782715,
-0.27558112144470215,
2.214975595474243,
-0.09593961387872696,
0.62433767318725... |
def build _ fields _ dict _ for _ column _ matching ( parent _ doctype ) : def get _ standard _ fields ( doctype ) : meta = frappe. get _ meta ( doctype ) if meta. istable : standard _ fields = [ { " label " : " parent ", " fieldname " : " parent " }, { " label " : " parent type ", " fieldname " : " parenttype " }, { "... | [
-0.633047878742218,
0.38215216994285583,
0.7829110622406006,
-0.23350343108177185,
-0.7079505920410156,
-0.41688084602355957,
0.20327849686145782,
-0.5801142454147339,
-0.8360536098480225,
0.40098679065704346,
-0.7436525225639343,
-0.8705511093139648,
0.36300843954086304,
-0.07689989358186... |
def get _ url ( self ) : return self. url | [
-0.159519225358963,
-0.48068538308143616,
0.12447135895490646,
0.2795894742012024,
0.743719220161438,
0.862874448299408,
0.30610936880111694,
0.674027144908905,
-0.009066364727914333,
-0.78783118724823,
0.08108331263065338,
0.6870018839836121,
-0.5648038983345032,
-0.21417951583862305,
-... |
def update ( self, instance, validated _ data ) : # if validated _ data. get ('profile ', [ ] ). _ _ len _ _ ( ) < 1 : # validated _ data = self. initial _ data profile _ data = none if " profile " in validated _ data : profile _ data = validated _ data. pop ( " profile " ) # update user data super ( userserializer, se... | [
-0.12203674763441086,
-0.9673953056335449,
0.3903132677078247,
0.40340879559516907,
-0.5563961863517761,
0.33402231335639954,
0.02124142274260521,
0.4134039282798767,
0.46423014998435974,
-0.14442254602909088,
-0.7996644377708435,
-0.4031008780002594,
-0.7691680788993835,
-0.31094169616699... |
def test _ toofast _ retries ( self ) : self. verify _ not _ root ( ) self. ep. retry _ cfg. on _ toofast _ error = true loader = threading. thread ( target = self. loader ) loader. start ( ) for i in range ( 100 ) : self. ep. get ( " system / state ", 1 ) loader. join ( ) time. sleep ( 1 ) # to free some bandwith for ... | [
0.43287932872772217,
0.53451007604599,
0.2618224620819092,
0.5277535319328308,
0.5649133324623108,
0.28958049416542053,
-0.07132453471422195,
-0.16710913181304932,
0.03340228274464607,
-0.4662071466445923,
-0.10924691706895828,
0.2000529021024704,
-0.09694020450115204,
0.7823627591133118,
... |
def cargar _ recursos _ flujo ( regiones, ejes _ relativos ) : filename ='csv /'+ conf. data ['env'] ['path'] +'/ artificio _ potencial. csv'recursos _ flujo = pd. read _ csv ( filename ) # se eliman algunas columnas de potencial que ya no son necesarias recursos _ flujo. drop ( ['sum. 1er termino ','term. ( x - ca / c... | [
-0.33125072717666626,
-0.3156260848045349,
0.5337135195732117,
0.0918976217508316,
-0.004119883291423321,
-0.5555750131607056,
0.6920872330665588,
0.04754053056240082,
-0.19682817161083221,
-0.21323050558567047,
0.09247146546840668,
0.4623396694660187,
0.6483433842658997,
-0.65242403745651... |
def _ set _ path _ editable ( self, os _ name ) : storage _ name = self. ui. storage _ select _ combo. currenttext ( ) if os _ name = = " linux " : edited _ linux _ path = self. _ linux _ path _ edit. get ( storage _ name, " " ) self. ui. linux _ path. hide ( ) self. ui. linux _ lock. hide ( ) self. ui. linux _ path _ ... | [
-0.47939687967300415,
-0.3584578335285187,
0.696426272392273,
0.8051771521568298,
-0.23186269402503967,
0.46471714973449707,
1.5179181098937988,
0.24026057124137878,
-0.40625840425491333,
0.4209182858467102,
-0.5079898834228516,
0.2044888287782669,
-0.10075356811285019,
0.09068359434604645... |
def largest _ rotated _ rect ( w, h, angle ) : quadrant = int ( math. floor ( angle / ( math. pi / 2 ) ) ) & 3 sign _ alpha = angle if ( ( quadrant & 1 ) = = 0 ) else math. pi - angle alpha = ( sign _ alpha % math. pi + math. pi ) % math. pi bb _ w = w * math. cos ( alpha ) + h * math. sin ( alpha ) bb _ h = w * math. ... | [
0.1702270805835724,
-0.331889808177948,
0.9316986799240112,
-1.5160434246063232,
-0.12664370238780975,
-0.32503819465637207,
-0.03957672789692879,
0.1265915185213089,
-0.3765825629234314,
-0.31704381108283997,
-0.015250747092068195,
-0.29626017808914185,
-0.21056368947029114,
0.34889596700... |
def update _ directory ( self ) : number _ images = len ( [ image for image in os. listdir ( self. image _ directory ) if os. path. isfile ( os. path. join ( self. image _ directory, image ) ) ] ) if number _ images > 100 : all _ images = ( os. path. join ( self. image _ directory, image ) for image in os. listdir ( se... | [
-0.7373277544975281,
0.25320038199424744,
0.9625838994979858,
-0.5792177319526672,
0.08228764683008194,
-0.6720102429389954,
1.2390515804290771,
0.36587944626808167,
0.3215499222278595,
0.4948718547821045,
-0.024446845054626465,
0.27245157957077026,
0.2297198474407196,
1.3101047277450562,
... |
def reviewend ( self, inputevent ) : context = self. getflatreviewcontext ( ) context. goend ( ) self. _ reviewcurrentline ( inputevent ) self. targetcursorcell = self. getbraillecursorcell ( ) return true | [
-0.3761281967163086,
-0.36463624238967896,
0.48967990279197693,
0.04225794970989227,
-0.041748929768800735,
1.0638039112091064,
-0.1741676926612854,
0.35320305824279785,
-0.43426513671875,
0.17547164857387543,
-0.4314715266227722,
0.2949698269367218,
-1.041752815246582,
0.2647024989128113,... |
def test _ itertools _ zip _ longest ( self ) : from itertools import zip _ longest a = ( 1, 2 ) b = [ 2, 4, 6 ] self. assertequal ( list ( zip _ longest ( a, b ) ), [ ( 1, 2 ), ( 2, 4 ), ( none, 6 ) ] ) | [
-0.1200883686542511,
-0.709486722946167,
0.4867468476295471,
0.39886659383773804,
0.7435449361801147,
-0.6216608881950378,
-0.5349878072738647,
0.1262001097202301,
0.2987729012966156,
0.003166895592585206,
-1.1390607357025146,
-0.022051909938454628,
0.17418651282787323,
-0.4621922075748443... |
def dt _ from _ utc _ country ( utc, tz _ str ) : try : tz = pytz. timezone ( pytz. country _ timezones ( tz _ str ) [ 0 ] ) except : tz = pytz. timezone ( tz _ str ) return datetime. datetime. fromtimestamp ( utc, tz ) | [
0.9494097828865051,
-0.9329166412353516,
0.14293606579303741,
0.41805681586265564,
-0.6821279525756836,
0.8393467664718628,
-0.2033708393573761,
0.4821426272392273,
0.6527198553085327,
-0.1374914050102234,
0.4326484203338623,
-0.3314245641231537,
-0.3639011085033417,
-1.1755311489105225,
... |
def get _ contact _ person ( self, response : response ) - > dict : user = create _ user ( ) user ['name'] = response. xpath ( " string ( / / * [ @ id ='contact - person'] ) " ). get ( ) user ['exp'] ['exp'] ['company'] = self. name self. log ('found contact person { } '. format ( user ['name'] ), level = logging. debu... | [
-0.26516395807266235,
-1.052577257156372,
0.4206407368183136,
-0.20356237888336182,
-0.6536363363265991,
0.32683783769607544,
-0.16614942252635956,
-0.7240557074546814,
0.29095491766929626,
0.04468651860952377,
-0.37557992339134216,
-1.1951870918273926,
-0.1699654757976532,
-0.573493838310... |
def build ( self ) : window. size = ( 1000, 800 ) self. title = " movie to watch 2. 0 by van phuong nguyen " self. root = builder. load _ file ('app. kv') # set category list self. category = ['title ','year ','category ','unwatch'] # default sorting option self. sort _ by = self. category [ 0 ] # set order list self. ... | [
0.13158385455608368,
-0.2854572534561157,
0.41869133710861206,
1.2307438850402832,
-0.7246116995811462,
0.13027963042259216,
-0.3069334030151367,
0.0701814815402031,
-0.5427536964416504,
-0.4277343153953552,
0.26393595337867737,
0.6151140928268433,
0.12912702560424805,
0.980392575263977,
... |
def start _ timestamp ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " start _ timestamp " ) | [
1.1412997245788574,
-0.09510252624750137,
0.39728865027427673,
0.20864729583263397,
0.6104345917701721,
0.4068514108657837,
0.32446518540382385,
0.28699004650115967,
0.8354135751724243,
0.33981558680534363,
-0.15072345733642578,
0.7606428265571594,
0.5885980129241943,
-1.1714855432510376,
... |
def join ( self, basepath, * paths ) : # type : ( str, * str ) - > str raise notimplementederror | [
-0.1376318782567978,
-0.31898945569992065,
0.4622834324836731,
0.9642293453216553,
0.2391156405210495,
1.369720697402954,
-0.28844141960144043,
0.16087773442268372,
-0.5861743092536926,
-0.5840996503829956,
0.41546911001205444,
-0.7375445365905762,
-0.9856447577476501,
-0.31561559438705444... |
def extract ( self ) : raise notimplementederror ( ) | [
-0.2246289700269699,
-0.534177303314209,
0.3695254921913147,
0.7546257972717285,
-0.5278265476226807,
0.34859979152679443,
0.5621461868286133,
-0.14925457537174225,
0.6581739187240601,
-0.4534320831298828,
-0.47002798318862915,
-0.02853347733616829,
0.1925622820854187,
0.3615649342536926,
... |
def merkle _ root ( datalist ) : hashlist = [ hash ( x ) for x in datalist ] while len ( hashlist ) > 1 : pairs = zip ( hashlist [ : : 2 ], hashlist [ 1 : : 2 ] ) hashlist = [ hash ( x [ 0 ] + x [ 1 ] ) for x in pairs ] return hashlist [ 0 ] | [
0.07188358157873154,
0.7375110983848572,
0.5832437872886658,
0.42660093307495117,
-0.7770328521728516,
0.35419121384620667,
-0.2772071659564972,
0.09111172705888748,
0.8490663766860962,
0.603632390499115,
-1.1445841789245605,
0.5985686182975769,
-0.8758687376976013,
0.30217891931533813,
... |
def _ _ init _ _ ( self, src, dilation _ width = 7, opening _ width = 5, normalize = true, handle _ borders = true ) : self. dw = dilation _ width self. ow = opening _ width self. normalize = normalize self. hb = handle _ borders self. instance = bmsl. bms ( bmsl. mat. from _ array ( src ), dilation _ width, opening _ ... | [
0.29858294129371643,
0.5525320768356323,
0.5183388590812683,
0.26347896456718445,
-0.8001160621643066,
0.08690827339887619,
0.6740290522575378,
0.1567130982875824,
1.7044172286987305,
-0.6857190132141113,
-0.07956039905548096,
0.08145367354154587,
-0.31030356884002686,
0.862450897693634,
... |
def clear ( self ) : self. screen. clear ( ) | [
-0.4609232246875763,
-0.12833842635154724,
0.14265213906764984,
-0.009672784246504307,
0.15928928554058075,
0.9006809592247009,
-0.08428217470645905,
-1.6060004234313965,
0.07625290006399155,
-0.1420488953590393,
0.6917257308959961,
1.2501691579818726,
0.5026358366012573,
1.193367838859558... |
def test _ atomic _ hex _ binary _ min _ length _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 2. xsd ", instance ... | [
-0.0810040831565857,
-0.598503053188324,
0.5062355399131775,
1.054846167564392,
-0.260520339012146,
0.2818816602230072,
-0.6413450241088867,
0.04539994150400162,
-0.160741925239563,
0.06595800817012787,
-0.48485779762268066,
0.03714289516210556,
0.10467511415481567,
0.6067423820495605,
-... |
def root _ info ( self ) : return self. _ root _ info | [
0.7918647527694702,
-0.7220460176467896,
0.12267018854618073,
0.17545396089553833,
0.23337513208389282,
0.7064720392227173,
0.6642467379570007,
-1.2101985216140747,
-0.18235734105110168,
-0.009411114268004894,
-0.8281316161155701,
1.154544711112976,
0.1390978991985321,
0.4343748092651367,
... |
def testpatchedsudsjurkoappender ( self ) : # create a fake query & statement order _ id = 1 values = [ {'key':'orderid ','value': {'xsi _ type':'numbervalue ','value': order _ id } }, {'key':'status ','value': {'xsi _ type':'textvalue ','value':'needs _ creatives'} } ] query ='where orderid = : orderid and status = : ... | [
0.2749694585800171,
0.10458040237426758,
0.6042706370353699,
-0.27021726965904236,
0.027491537854075432,
-0.044333282858133316,
-0.49213549494743347,
0.13681362569332123,
0.8169867396354675,
-0.12569503486156464,
-0.6533998250961304,
1.0232884883880615,
0.3933719992637634,
-0.2709819674491... |
def parse _ all ( self, response ) : spideronespider. page _ count + = 1 posts = response. xpath ('/ / div [ @ class = " post " ]') author _ names = response. xpath ('/ / td [ @ class = " poster _ info " ] / b / a / text ( )') subjects = response. xpath ('/ / div [ @ class = " subject " ] / a / text ( )') # time = resp... | [
0.2847209870815277,
0.16050736606121063,
0.689905047416687,
-0.01882224529981613,
0.8161439299583435,
0.7120401859283447,
-0.4739956557750702,
-0.2478456050157547,
-0.75951087474823,
-0.19645071029663086,
-0.43695947527885437,
-0.40471935272216797,
-0.14588680863380432,
1.0729219913482666,... |
def _ make _ callback ( self, name ) : # strip off whitespace and call the consumer callback _ function = getattr ( self. _ consumer, name ) # - - - pass back the information # if there is a finalizer, use that if self. _ finalizer is not none and name not in self. _ exempt _ tags : info _ to _ pass = self. _ finalizer... | [
-0.12579160928726196,
0.1263846606016159,
0.5498733520507812,
-0.33929336071014404,
-0.2914796471595764,
-0.6852993965148926,
-0.3374496102333069,
-0.022514909505844116,
-0.4525807797908783,
0.7482989430427551,
-0.1812874674797058,
-0.40579354763031006,
0.23890654742717743,
0.3491022288799... |
def send _ typing ( self, activityrequestobject ) : try : headers = self. get _ headers ('application / json') activityresponseobject = {'type':'typing ','from': {'id': activityrequestobject ['recipient'] ['id'], },'conversation': {'id': activityrequestobject ['conversation'] ['id'],'name':'convo1'},'recipient': {'id':... | [
-1.6310945749282837,
-0.44503024220466614,
0.9573423862457275,
-0.09230078756809235,
-0.0061901770532131195,
0.2008610963821411,
0.19993875920772552,
-1.3776377439498901,
0.6853013038635254,
0.9780673384666443,
-0.4152239263057709,
0.8094391226768494,
-0.9080899953842163,
-0.13256841897964... |
def get ( self, query : mapping [ str, any ], context : pipelinecontext = none ) - > t : result = self. _ source. get ( self. _ source _ type, deepcopy ( query ), context ) logger. info ( " got result \ " { result } \ " from query \ " { query } \ " of source \ " { source } \ " ". format ( result = result, query = query... | [
-1.2221969366073608,
0.6400441527366638,
0.57840496301651,
-1.0025434494018555,
-0.2531090974807739,
-1.1797746419906616,
-0.31141412258148193,
-0.9372735619544983,
0.7587078213691711,
-0.6896249651908875,
-0.34398019313812256,
1.0220407247543335,
-0.241329625248909,
-0.3131416141986847,
... |
def test _ atomic _ id _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 4. xsd ", instance = " nistdata / atomic / id / schem... | [
-0.46752989292144775,
-0.27540361881256104,
0.5409172773361206,
0.1865387111902237,
-0.3312239348888397,
0.16431400179862976,
0.020137712359428406,
-0.25441086292266846,
0.7243043780326843,
0.675164520740509,
-0.17488993704319,
-0.32865357398986816,
-0.04646942764520645,
-0.560380578041076... |
def _ getnameserversfromwinipconfig ( ) : servers = [ ] output = subprocess. popen ( ['ipconfig ','/ all'], stdout = subprocess. pipe ). stdout. read ( ) for line in output. split ('\ r \ n') : if'dns servers'in line : print " ipconfig : % s " % line servers. extend ( addr _ util. extractipsfromstring ( line ) ) return... | [
-0.812532901763916,
0.062119558453559875,
0.6816900372505188,
0.017040012404322624,
-0.7288153171539307,
-0.26527512073516846,
-0.5224272012710571,
-0.11295971274375916,
-0.11585713922977448,
0.9143306612968445,
-0.8305619955062866,
-0.3311576545238495,
0.03786608576774597,
0.2929624617099... |
def drop _ table ( ) : execute ('drop table ` 0 `') | [
0.25708451867103577,
0.7094332575798035,
0.32687562704086304,
1.2460652589797974,
1.086229681968689,
0.47814953327178955,
0.13073086738586426,
0.34087416529655457,
-1.3467124700546265,
0.12514851987361908,
0.2179548591375351,
0.5014742612838745,
-0.4352755844593048,
-0.22562523186206818,
... |
def _ _ init _ _ ( self ) : try : self. connection = sqlite3. connect ('recommendationdatabase. db') self. cursor = self. connection. cursor ( ) except : messagebox. showerror ( " error! ", " something went wrong " ) | [
0.21749502420425415,
0.3540891408920288,
0.5395984649658203,
0.035202257335186005,
0.378858745098114,
0.6094029545783997,
-0.0763387680053711,
0.7252196669578552,
-0.7643388509750366,
0.6393133401870728,
0.24353116750717163,
0.622651994228363,
-0.24709846079349518,
0.7406324744224548,
0.... |
def is _ good _ response ( resp ) : content _ type = resp. headers ['content - type']. lower ( ) return ( resp. status _ code = = 200 and content _ type is not none and content _ type. find ('html') > - 1 ) | [
-0.0029867850244045258,
-0.4312743842601776,
0.4701072573661804,
0.3268895149230957,
-0.3099961578845978,
-0.15238890051841736,
-0.49994534254074097,
-0.25336554646492004,
0.9083924293518066,
0.03385300189256668,
-0.2913185954093933,
0.11667104065418243,
0.04289648309350014,
0.110498212277... |
def test _ list _ insert _ with _ extra _ parameter ( self ) : key = ('test ','demo ', 1 ) policy = {'timeout': 1000 } with pytest. raises ( typeerror ) as typeerror : testlistinsert. client. list _ insert ( key, " age ", 3, 999, { }, policy, " " ) assert " list _ insert ( ) takes at most 6 arguments ( 7 given ) " in s... | [
-0.5084714293479919,
1.0395276546478271,
0.39226311445236206,
-0.09789007902145386,
0.4635026156902313,
0.6226196885108948,
-0.7998805642127991,
0.5233391523361206,
0.19804587960243225,
1.3393436670303345,
-1.6623870134353638,
-0.40254637598991394,
-0.7118503451347351,
1.1594358682632446,
... |
def print _ ans ( n, ar ) : ar = np. array ( ar ) ar _ idx = np. argsort ( ar ) for i in range ( n ) : for k in reversed ( range ( n ) ) : if i! = ar _ idx [ k ] : print ( ar [ ar _ idx [ k ] ] ) break | [
0.08658399432897568,
-0.8837457895278931,
0.645074188709259,
-0.25519829988479614,
-0.5692157745361328,
0.011739925481379032,
0.06312130391597748,
-1.2916420698165894,
0.015626579523086548,
0.637076735496521,
0.9668519496917725,
1.7654356956481934,
0.15977250039577484,
0.2796809673309326,
... |
def test _ accept _ global _ loop ( loop ) : yield from asyncio. sleep ( 0. 01, loop = loop ) global _ loop = asyncio. get _ event _ loop ( ) assert global _ loop is loop | [
0.6508156657218933,
1.2727091312408447,
0.4598500728607178,
0.7901628613471985,
-0.1426413357257843,
1.3728641271591187,
0.17979425191879272,
-0.16448652744293213,
-0.32640308141708374,
0.36781060695648193,
-0.17320239543914795,
0.8634874820709229,
-0.45572832226753235,
0.6125300526618958,... |
def forward ( self, inputl, control _ bias _ int = 0 ) : hid1 _ in = tr. cat ( inputl, - 1 ) hid1 _ act = self. hid1 _ layer ( hid1 _ in ). relu ( ) control _ bias = self. embed _ bias ( tr. tensor ( control _ bias _ int ) ) hid2 _ in = hid1 _ act + control _ bias if self. add _ noise : hid2 _ in = hid2 _ in + ( 0. 1 *... | [
0.49269524216651917,
0.05194810777902603,
0.8520243167877197,
0.35477516055107117,
-0.6139763593673706,
0.8440392017364502,
0.7066265344619751,
-0.5358166098594666,
0.037368349730968475,
-0.2646181583404541,
-0.7145262360572815,
0.14047972857952118,
-0.29378122091293335,
-0.244213774800300... |
def format _ attributes ( filename, line ) : mtch = re. search ( r " ( \ d { 2 } ) \ s + ( [ abcdefgh ] ) \ s + (. + ) ", line ) if mtch : specimen _ barcode = mtch. group ( 3 ) rack _ location = mtch. group ( 2 ) + mtch. group ( 1 ) rack _ barcode = get _ rack _ barcode ( filename ) return { " name " : " { } _ { } ". ... | [
0.8722792863845825,
-0.9814373850822449,
0.5213911533355713,
-0.5473455786705017,
0.28260231018066406,
-0.6988123059272766,
0.23142264783382416,
0.43548494577407837,
-1.367273211479187,
0.3917215168476105,
0.024603871628642082,
0.16942186653614044,
0.20506270229816437,
0.46966663002967834,... |
def insert ( self, index _ node, value ) : if index _ node = = 0 : self. add _ first ( value ) elif index _ node = = len ( self ) : self. add _ last ( value ) elif 0 < index _ node < len ( self ) : node = linkedlistnode ( value ) count = 0 current = self. head while current : if index _ node = = count + 1 : node. next ... | [
-0.40729740262031555,
0.9818264842033386,
0.6009951233863831,
-0.02964022383093834,
0.4586288630962372,
-0.23586106300354004,
0.4513050615787506,
0.4191948473453522,
0.07650047540664673,
-0.055188022553920746,
-0.3782285153865814,
-0.13147024810314178,
-1.2183560132980347,
0.30788397789001... |
def getweights ( self ) : return self. weights | [
0.04900584742426872,
-0.13005918264389038,
0.3832455575466156,
0.252303808927536,
0.6848406791687012,
0.18929888308048248,
-0.021095523610711098,
-0.3677193224430084,
-0.5264243483543396,
-0.6904330253601074,
-0.6235284805297852,
0.09420887380838394,
-1.089511513710022,
0.6772410273551941,... |
def set _ count ( self, num, total ) : self. ui. count _ lbl. settext ( " % s of % s " % ( num, total ) ) | [
0.3514631390571594,
-0.6567134857177734,
0.5694009065628052,
-0.5405605435371399,
0.6238585710525513,
0.7581063508987427,
0.06290268898010254,
-0.43204164505004883,
-0.29403629899024963,
0.4992385804653168,
-0.3566679060459137,
-0.277870237827301,
0.31277981400489807,
-0.8120783567428589,
... |
def verify _ signature ( request ) : expected _ signature = request. headers. get ( " x - spark - signature " ) if not expected _ signature : return false, " missing x - spark - signature header " computed _ signature = generate _ signature ( request ) if expected _ signature! = computed _ signature : return false, " i... | [
-0.33330559730529785,
0.2880125641822815,
0.5813876986503601,
1.2423510551452637,
0.5131546258926392,
-0.32309943437576294,
-0.5671975612640381,
0.16303151845932007,
-0.11291252821683884,
-0.17856349050998688,
-1.2651523351669312,
-0.9314444065093994,
0.2256723940372467,
0.0929605960845947... |
def registerarttest ( request ) : valid, response = initrequest ( request ) if not valid : return response pandaid = - 1 jeditaskid = - 1 testname ='' nightly _ release _ short = none platform = none project = none package = none nightly _ tag = none nightly _ tag _ display = none extra _ info = { } # log all the req p... | [
-0.9875892996788025,
-0.43511831760406494,
1.027890682220459,
0.1694646030664444,
-0.10580163449048996,
-0.03680330142378807,
-0.1330624371767044,
-0.617493212223053,
0.008174518123269081,
0.4341451823711395,
0.30603334307670593,
0.7354811429977417,
-0.5529435873031616,
0.3672278821468353,... |
def has _ xml _ header ( filepath ) : return true with open ( filepath, " r " ) as infile : first = infile. read ( 1 ) return first = ='< ' | [
0.3968051075935364,
-0.5606557130813599,
0.59577476978302,
0.32484912872314453,
-0.3348551094532013,
1.095658540725708,
-0.49344125390052795,
-0.07013813406229019,
-0.04185944423079491,
-0.24221983551979065,
-0.15710985660552979,
-0.6010873913764954,
-0.03294576331973076,
0.215517342090606... |
def gen _ count _ dot _ density _ map ( county, pts _ per _ person = 300, epsg = 2163, seed = 10, dot _ transparency = 0. 4, figsize = ( 12, 12 ), ax = none, legend = true ) : # read in fips to county name relationship file fips = pd. read _ csv ('https : / / www2. census. gov / geo / docs / reference / codes / files /... | [
0.5872092843055725,
-0.08966205269098282,
0.8353419899940491,
-0.6332041025161743,
-0.27831125259399414,
0.03252526745200157,
0.4590403139591217,
0.49678486585617065,
0.11629677563905716,
0.4808608293533325,
0.6461788415908813,
0.3139808773994446,
0.5928419828414917,
0.2832639813423157,
... |
def _ _ init _ _ ( self, jsondict = none, strict = true ) : self. highlimit = none " " " upper limit possible or expected. type ` quantity ` ( represented as ` dict ` in json ). " " " self. lowlimit = none " " " lower limit possible or expected. type ` quantity ` ( represented as ` dict ` in json ). " " " super ( subst... | [
-0.06541813910007477,
-0.502693235874176,
0.6561852693557739,
-0.6398627161979675,
0.37483054399490356,
-0.13491374254226685,
-0.5044814348220825,
0.014640606939792633,
-0.08399765193462372,
0.18664024770259857,
-0.3888532519340515,
0.4120354950428009,
0.5460816621780396,
0.284389048814773... |
def check _ states _ are _ close ( num _ nodes, num _ states, p _ state, p _ next, tol ) : for i _ s in range ( num _ states ) : for i in range ( num _ nodes ) : if abs ( p _ next [ i _ s, i ] - p _ state [ i _ s, i ] ) > = tol : return false return true | [
0.006755426991730928,
-0.0008049654425121844,
0.6046881675720215,
0.03751448169350624,
-0.6707870960235596,
0.7431349754333496,
0.22095274925231934,
0.11766039580106735,
-0.34003064036369324,
0.29574519395828247,
0.5845493078231812,
-0.5062369704246521,
-0.5626195073127747,
-1.220004081726... |
def test _ atomic _ hex _ binary _ max _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 5. xsd ", instance ... | [
0.14487434923648834,
-0.018603669479489326,
0.2906619608402252,
0.7420788407325745,
-0.4235604405403137,
0.2289186269044876,
-0.4452652335166931,
-0.23347516357898712,
-0.22562380135059357,
0.4842829704284668,
-0.8707708716392517,
-0.6603761315345764,
-0.4304666817188263,
0.586697041988372... |
def ibmq _ qrng ( num _ q, minimum, maximum ) : simulator = aer. get _ backend ('qasm _ simulator') q = quantumregister ( num _ q,'q') c = classicalregister ( num _ q,'c') circuit = quantumcircuit ( q, c ) circuit. h ( q ) # applies hadamard gate to all qubits circuit. measure ( q, c ) # measures all qubits job = execu... | [
-0.4791874289512634,
0.859745979309082,
0.6736221313476562,
-0.23438933491706848,
-0.8967079520225525,
-0.6788052320480347,
-0.8108955025672913,
-0.4877707362174988,
-0.12935324013233185,
-0.25469544529914856,
-0.6689222455024719,
0.22689132392406464,
-1.1189409494400024,
1.026133537292480... |
def assign ( self, steps ) : for step in steps : machine _ ready _ time, predecessor _ done _ time = none, none if len ( self. schedule [ step. machine ] ) = = 0 : # first step on machine machine _ ready _ time = 0 else : last _ step _ execution = max ( self. schedule [ step. machine ]. keys ( ) ) last _ step _ on _ ma... | [
-0.6202306747436523,
0.0996590182185173,
0.574509859085083,
0.08872269839048386,
0.11565013229846954,
0.1674175262451172,
-0.034947387874126434,
0.33672958612442017,
-1.261955976486206,
0.34920936822891235,
-0.34917739033699036,
-0.5270980000495911,
0.32818320393562317,
2.2605175971984863,... |
def test _ atomic _ boolean _ white _ space _ 4 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 5. xsd ", instance = " nistdat... | [
-0.3057323694229126,
0.1630556285381317,
0.41144177317619324,
0.2897309362888336,
-0.22009064257144928,
0.2861093282699585,
0.2626669704914093,
-0.8798651695251465,
0.06938613206148148,
0.9625841975212097,
-0.2638159692287445,
0.01845318078994751,
-0.5426493287086487,
0.3965510129928589,
... |
def softmax ( self, x ) : # recuperer le max max _ x = np. max ( x ) scal = 0 for i in range ( len ( x ) ) : scal = scal + math. exp ( x [ i ] - max _ x ) result = np. zeros ( shape = len ( x ) ) for i in range ( len ( result ) ) : result [ i ] = math. exp ( x [ i ] - max _ x ) / scal return result | [
0.28960803151130676,
0.2249862104654312,
0.5383751392364502,
0.7664441466331482,
-0.6800574064254761,
-0.41802769899368286,
-0.8709160685539246,
0.6421922445297241,
1.240770936012268,
0.4146032929420471,
-0.3880137503147125,
0.8246316313743591,
-0.006905707530677319,
0.25748637318611145,
... |
def encode _ to _ tfrecord ( data, output _ dir ) : def _ int64 _ feature ( value ) : " " " converts a list of int64 into tf feature. " " " return tf. train. feature ( int64 _ list = tf. train. int64list ( value = np. atleast _ 1d ( value ) ) ) def _ float _ feature ( value ) : " " " converts a list of fp32 into tf fea... | [
0.4016006588935852,
-0.14966434240341187,
0.4842468500137329,
-0.420208603143692,
-0.5589321851730347,
-0.36501774191856384,
0.013738137669861317,
-0.14515267312526703,
-0.26581093668937683,
0.3181585371494293,
-1.3150103092193604,
0.39164334535598755,
-0.15231548249721527,
0.0786248892545... |
def vs30 _ wald ( rebuild = false ) : import cst repo = cst. site. repo filename = os. path. join ( repo,'cvm _ vs30 _ wald. npy') if not rebuild and os. path. exists ( filename ) : data = np. load ( filename ) else : f1 = os. path. join ( repo,'western _ us. grd') if not os. path. exists ( f1 ) : url ='http : / / eart... | [
0.4857502579689026,
-0.46298646926879883,
0.9426853656768799,
-0.8421997427940369,
-0.09535226225852966,
0.5795405507087708,
-0.34249770641326904,
0.09918426722288132,
0.617957353591919,
0.6333945989608765,
-0.018428537994623184,
0.9923174977302551,
-0.7318099141120911,
-0.4885860681533813... |
def _ _ init _ _ ( self, env, k ) : ns, na = env. observation _ space. n, env. action _ space. n self. g = np. zeros ( ( ns, na ) ) self. n = np. zeros ( ( ns, na ) ) self. rho = np. ones ( ( ns, na ), dtype = float ) / na self. k = k | [
0.06403131037950516,
0.04001559689640999,
0.7209422588348389,
0.8406506776809692,
0.7915831208229065,
0.5341817736625671,
-0.18376225233078003,
-0.4206904172897339,
-0.6943268179893494,
0.8775129914283752,
-0.12402509897947311,
0.5777162909507751,
0.3849587142467499,
1.105266809463501,
0... |
def create ( self, org, sddc, sddc _ network, ) : return self. _ invoke ('create ', {'org': org,'sddc': sddc,'sddc _ network': sddc _ network, } ) | [
-0.6719344854354858,
0.6663489937782288,
0.4024674594402313,
0.21731184422969818,
0.7430882453918457,
0.16620807349681854,
-0.8362422585487366,
-0.2070123553276062,
0.3999738395214081,
-1.1034314632415771,
-0.29683202505111694,
0.017538247630000114,
-0.0040118275210261345,
-0.0654346942901... |
def gather ( data, dst = 0, group = none ) : if get _ world _ size ( ) = = 1 : return [ data ] if group is none : group = _ get _ global _ gloo _ group ( ) if dist. get _ world _ size ( group = group ) = = 1 : return [ data ] rank = dist. get _ rank ( group = group ) tensor = _ serialize _ to _ tensor ( data, group ) s... | [
0.1849210560321808,
0.94862300157547,
0.7933884859085083,
0.28754058480262756,
-0.6096804141998291,
0.479118674993515,
-0.08089044690132141,
-0.13156762719154358,
0.09269849210977554,
0.7184056043624878,
-0.5137450098991394,
0.6198762655258179,
0.3295353353023529,
0.4474197030067444,
0.0... |
def get _ routes ( manager, routing, solution ) : # get vehicle routes and store them in a two dimensional array whose # i, j entry is the jth location visited by vehicle i along its route. routes = [ ] for route _ nbr in range ( routing. vehicles ( ) ) : index = routing. start ( route _ nbr ) route = [ manager. indext... | [
-1.0233139991760254,
0.025537483394145966,
0.39560532569885254,
0.26686644554138184,
0.39856767654418945,
-0.9009454250335693,
0.04121396318078041,
0.06219828501343727,
-0.108523428440094,
0.6484233736991882,
-0.26594167947769165,
-0.2581716477870941,
0.1904582977294922,
0.1631220728158950... |
def add _ waveform ( experiment, waveform, * * prm ) : experiment. channel _ groups [ waveform. channel _ group ]. spikes. add ( time _ samples = waveform. s _ offset, time _ fractional = waveform. s _ frac _ part, recording = waveform. recording, waveforms _ raw = waveform. raw, waveforms _ filtered = waveform. fil, m... | [
0.06244060769677162,
0.05416487157344818,
0.4323164224624634,
-0.8132448196411133,
1.0009616613388062,
-0.13062146306037903,
-0.14767307043075562,
-0.13672079145908356,
0.5416951775550842,
-0.13224542140960693,
-0.7628415822982788,
0.9985140562057495,
-0.4273260831832886,
0.105128251016139... |
def find _ consensus _ values ( x, n _ expected = none, bandwidth _ auto = true, min _ bandwidth = 0. 02, # xxx this is gc - ms specific default _ bandwidth = 0. 1, # xxx this too show _ plot = false, out = sys. stdout, err = sys. stderr, ) : if isinstance ( x, list ) : x = np. array ( x ) x _ grid = np. linspace ( x. ... | [
0.7848016023635864,
0.708824098110199,
0.794264554977417,
0.7380975484848022,
0.3467647135257721,
-0.5328420400619507,
-0.3069879412651062,
0.40147435665130615,
0.19334712624549866,
0.5971847176551819,
0.5420041084289551,
0.47527751326560974,
0.046949196606874466,
1.0427849292755127,
0.5... |
def test _ atomic _ language _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 3. xsd ", instance = " nistdata / atomic ... | [
0.2038818895816803,
-0.10856024920940399,
0.5335297584533691,
0.4949284493923187,
-0.5275934934616089,
0.6637125611305237,
-0.18703541159629822,
0.15819357335567474,
0.059771619737148285,
1.1875685453414917,
-0.6024834513664246,
0.0032312378752976656,
-0.053978804498910904,
-0.404541939496... |
def is _ valid _ compression _ type ( cls, compression _ type ) : types = set ( [ compressiontypes. auto, compressiontypes. bzip2, compressiontypes. deflate, compressiontypes. gzip, compressiontypes. zstd, compressiontypes. lzma, compressiontypes. uncompressed ] ) return compression _ type in types | [
-0.37924543023109436,
-0.2279471904039383,
0.44584783911705017,
0.9853789806365967,
-0.33955901861190796,
0.4056558310985565,
0.2743329703807831,
-1.2079501152038574,
0.17796610295772552,
-0.3976660668849945,
-0.5338553190231323,
-0.5359443426132202,
-0.9339350461959839,
1.036176323890686,... |
def test _ atomic _ hex _ binary _ length _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 4. xsd ", instance = " nistdata / ... | [
0.3548557460308075,
-0.041796717792749405,
0.43218305706977844,
0.48740720748901367,
-0.1211201474070549,
0.5440354347229004,
-0.024355143308639526,
0.233998104929924,
-0.5130254030227661,
0.34873467683792114,
-1.0919153690338135,
-0.7660780549049377,
-0.25577476620674133,
0.26695084571838... |
def generate _ rows ( self, * * kwargs ) : raise notimplementederror | [
-0.793138325214386,
0.7024074792861938,
0.5284960269927979,
0.6500263810157776,
0.4282771050930023,
0.5448766946792603,
-0.08459769189357758,
0.17025305330753326,
0.04523232951760292,
-0.5017878413200378,
-0.2901531457901001,
-0.34673774242401123,
0.24608945846557617,
1.2500331401824951,
... |
def test _ atomic _ any _ uri _ min _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 1. xsd ", instance = " nistdata / a... | [
0.04485420510172844,
-0.6434168219566345,
0.4659915566444397,
0.9398462772369385,
-0.42458438873291016,
-0.1873638778924942,
-0.29798880219459534,
-0.2437167763710022,
0.12348497658967972,
-0.20059897005558014,
0.14732348918914795,
0.06740280985832214,
-0.367872416973114,
0.366379082202911... |
def _ get _ as _ table _ row ( self, items, col _ widths ) : row ='|'for item, col _ width in zip ( items, col _ widths ) : total _ pad _ len = col _ width - len ( item ) left _ pad _ len = total _ pad _ len / / 2 right _ pad _ len = total _ pad _ len - left _ pad _ len row + = ( left _ pad _ len *'' + item + right _ p... | [
-0.23934002220630646,
0.45263075828552246,
0.6916604042053223,
-0.11395050585269928,
0.026246849447488785,
-0.3903515934944153,
-0.744748592376709,
-0.606257975101471,
-0.1516692191362381,
0.31918272376060486,
0.5092025399208069,
-0.8866615891456604,
0.7744965553283691,
0.5288569331169128,... |
def build _ leaderboard _ for _ word _ list ( self ) : calculated _ scores = [ ] for word in self. valid _ words : if len ( word ) > = self. min _ word _ length : calculated _ scores. append ( ( self. score _ word ( word ), word ) ) self. build _ leaderboad ( calculated _ scores ) | [
0.09099677950143814,
0.37995579838752747,
0.227146178483963,
0.2001497596502304,
0.1873466968536377,
0.21751552820205688,
-0.34526050090789795,
0.2035156637430191,
0.3455020785331726,
0.5297508835792542,
-0.8440906405448914,
-0.02439071796834469,
-1.1438735723495483,
1.0931918621063232,
... |
def _ generate _ timing _ params ( data, start = none, end = none, custom _ resolution = none ) : # determine resolution of forecast if custom _ resolution is not none : resolution = custom _ resolution else : resolution = detect _ resolution ( data ) # set forecast start and end. default behaviour is 24 hours from end... | [
-0.9025249481201172,
0.5719435214996338,
0.8801212310791016,
-0.1711813509464264,
-0.9090883731842041,
-0.45244544744491577,
0.22265906631946564,
-0.013708014041185379,
-0.9419481754302979,
0.30717065930366516,
-0.32466405630111694,
-0.466403990983963,
0.45167776942253113,
0.16363196074962... |
def process _ source ( self, source ) : if source is none or source. handle in self. referenced [ " source " ] : return self. referenced [ " source " ]. add ( source. handle ) for repo _ ref in source. get _ reporef _ list ( ) : if repo _ ref : self. process _ notes ( repo _ ref ) handle = repo _ ref. get _ reference _... | [
-0.3689543604850769,
0.4653210937976837,
0.5407584309577942,
-0.8294248580932617,
0.8674381375312805,
-0.18342238664627075,
0.6857287883758545,
-0.5710708498954773,
0.564774215221405,
-0.00811984483152628,
-0.6261938214302063,
-0.13204997777938843,
-0.3401266038417816,
1.2174972295761108,
... |
def create _ checksum _ object _ from _ iterator ( itr, algorithm = d1 _ common. const. default _ checksum _ algorithm ) : checksum _ str = calculate _ checksum _ on _ iterator ( itr, algorithm ) checksum _ pyxb = d1 _ common. types. dataonetypes. checksum ( checksum _ str ) checksum _ pyxb. algorithm = algorithm retur... | [
0.21548132598400116,
-0.22817684710025787,
0.3123284876346588,
0.7085146307945251,
-0.4524085223674774,
0.6961474418640137,
0.006436048541218042,
-0.16225655376911163,
0.2242930382490158,
0.07703971862792969,
-0.11356691271066666,
-0.4824933111667633,
0.06925176829099655,
0.196359410881996... |
def export _ mask ( self, save _ to, cls ) : cv2. imwrite ( str ( path ( save _ to ) / " { }. png ". format ( cls ) ), self. masks [ cls ], ( cv2. imwrite _ pxm _ binary, 1 ) ) | [
-1.0574984550476074,
-0.49623194336891174,
0.3424474895000458,
0.6198654770851135,
1.0013569593429565,
0.2599055767059326,
0.5074885487556458,
-0.9134473204612732,
0.5341248512268066,
0.4479605257511139,
-0.8016613125801086,
0.5449737310409546,
0.6166045665740967,
0.3030148148536682,
-0.... |
def getnodes ( self, cursor, netid ) : cursor. execute ('''select nodeid, internalid from nodes where networkid =?'' ', ( netid, ) ) nodes = { } for row in cursor : nodes [ row [ 1 ] ] = row [ 0 ] return nodes | [
-0.5147284269332886,
0.06575202196836472,
0.1896461844444275,
-0.9834563136100769,
-0.1961127072572708,
-0.6174213886260986,
-0.606468915939331,
0.01669791154563427,
-0.5611609220504761,
1.009459376335144,
-0.38554343581199646,
-0.4629632234573364,
-0.5368103981018066,
0.634124755859375,
... |
def convert _ input _ to _ id ( table, line _ number ) : list _ of _ id = [ line [ id _ index ] for line in table ] for i, id in enumerate ( list _ of _ id, 1 ) : if i = = int ( line _ number ) : return list _ of _ id [ i - 1 ] | [
-0.25021806359291077,
-0.8884859681129456,
0.6973199248313904,
0.6384761929512024,
0.5380765199661255,
-0.07875078171491623,
0.20111475884914398,
0.14738735556602478,
-0.17508263885974884,
0.326229989528656,
-0.14340637624263763,
0.18023622035980225,
-0.5743383169174194,
-0.433355689048767... |
def _ _ init _ _ ( self, size, extract _ type = 0 ) : if extract _ type not in { 0, 1, 2, 3 } : raise valueerror ('extract _ type must be in { 0, 1, 2, 3, 4 }') self. size = size assert isinstance ( self. size, int ),'size must be int'self. extract _ type = extract _ type | [
-0.19663409888744354,
-0.06854628026485443,
0.7345699071884155,
0.4309971332550049,
-0.0868653655052185,
-0.543234646320343,
0.4598895311355591,
-0.463288277387619,
0.7114360928535461,
-0.23819980025291443,
-0.44233620166778564,
-0.6157295107841492,
-0.6454563736915588,
0.12609903514385223... |
def test _ fallback _ channel _ failure ( self, patch _ put, patch _ upload, _ ) : with self. create _ mock _ protocol ( ) as wire _ protocol : wire. hostpluginprotocol. is _ default _ channel = false wire _ protocol. client. update _ goal _ state ( ) # act self. assertraises ( wire. protocolerror, wire _ protocol. cli... | [
0.27941203117370605,
0.2933203876018524,
0.5751897096633911,
-0.3457353711128235,
1.3525385856628418,
0.21767130494117737,
0.40377968549728394,
-0.4771387279033661,
-0.8576186895370483,
0.1228044405579567,
-0.33974167704582214,
0.13837777078151703,
-0.9825126528739929,
0.06341109424829483,... |
def handle _ anchor _ links ( self, link ) : # if anchor tag, then get rid of anchor #... # and only add the webpage link if not link : return link _ empty # need to do this here also self. check _ add _ link ( url _ type _ anchor, link ) # no point in getting # anchor sort of links # since typically they point to anch... | [
-0.3580484688282013,
-0.0705149695277214,
0.8252391815185547,
-0.010803082026541233,
0.16725009679794312,
-0.0033461882267147303,
0.9704907536506653,
-0.35252121090888977,
0.7161818742752075,
-0.24600858986377716,
1.0183409452438354,
-0.09542088955640793,
-0.5681339502334595,
0.33242803812... |
def share _ capital ( self, share _ capital ) : self. _ share _ capital = share _ capital | [
0.026570027694106102,
-0.38617992401123047,
0.3715733587741852,
1.2237368822097778,
0.8432550430297852,
0.5028049945831299,
1.7836921215057373,
0.43073540925979614,
-0.5414065718650818,
0.20609353482723236,
-0.9376767873764038,
-0.15772096812725067,
-0.10841494053602219,
0.2494380027055740... |
def get ( url, * * kwargs ) : return sseclient ( url, session = http, * * kwargs ) | [
-0.12982186675071716,
-0.49618664383888245,
0.21105420589447021,
-0.0790380984544754,
-1.141352891921997,
-0.7613608241081238,
-0.9164415597915649,
-0.2396564483642578,
-0.04007910192012787,
-0.7186954021453857,
-0.9676411151885986,
1.3401837348937988,
-0.3557136058807373,
-1.1778724193572... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, cityinformation ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.6641868948936462,
-0.4172941744327545,
0.4389953315258026,
-0.7631476521492004,
-0.5730134844779968,
0.7561638355255127,
0.02290521003305912,
-0.34810885787010193,
0.46478354930877686,
-0.3598689138889313,
-1.1570106744766235,
-0.7141069769859314,
-0.035840753465890884,
0.12017526477575... |
def test _ access _ no _ auth ( self ) : self. logout _ user ( ) endpoint = reverse ( self. endpoint _ stock _ list ) resp = self. client. get ( endpoint ) self. assertequal ( resp. status _ code, status. http _ 401 _ unauthorized ) endpoint = reverse ( self. endpoint _ stock _ detail, kwargs = {'pk': 1 } ) resp = self... | [
-1.0977716445922852,
-0.20655660331249237,
0.39728519320487976,
-0.11390143632888794,
0.6761659979820251,
0.4106740951538086,
0.3051963150501251,
-0.6469318866729736,
0.5198652744293213,
-1.0888726711273193,
0.3824373483657837,
0.8665980696678162,
0.17450784146785736,
-0.006544563919305801... |
def get _ details ( cls : type [ spaczzattrs ], span : span ) - > optional [ int ] : if cls. _ all _ equal ( [ token. _. spaczz _ details for token in span ] ) : return span [ 0 ]. _. spaczz _ details else : return none | [
0.8608629703521729,
0.4416690170764923,
0.14644847810268402,
0.0334354043006897,
0.2033577859401703,
-0.3831276297569275,
0.4858606457710266,
-0.7755210399627686,
0.6976526975631714,
-0.24886944890022278,
-0.6717299222946167,
0.48038387298583984,
0.045893844217061996,
0.4933513104915619,
... |
def tsx _ id ( self ) : return stunmsg _ c. get _ tsx _ id ( self. _ buf ) | [
1.2173370122909546,
-0.08913528174161911,
0.3504379391670227,
-0.38526293635368347,
-0.3406737148761749,
0.04424966499209404,
0.7753679752349854,
-0.3104148805141449,
0.823544442653656,
-0.12839347124099731,
-0.9310593008995056,
0.23816734552383423,
-0.8695956468582153,
-0.755859911441803,... |
def get _ ell ( self, intermediate = 0 ) : # outputs, _, _, _ = self. feedforward ( ) outputs = self. y ll = self. get _ ll ( self. x, outputs ) ell = tf. reduce _ mean ( ll, 0 ) return ell | [
0.10927071422338486,
-0.04643341898918152,
0.41124066710472107,
-0.5976405739784241,
0.18374860286712646,
0.3114492893218994,
0.41585081815719604,
0.09819445759057999,
0.20802755653858185,
0.14778879284858704,
-0.28187432885169983,
0.6243099570274353,
0.7013334035873413,
-0.419834047555923... |
def check _ path _ contains _ in _ result ( path, result ) : flag = false for i in range ( len ( result ) ) : if set ( path ) < = set ( result [ i ] ) : flag = true break else : continue return flag | [
-0.17562608420848846,
-0.42388591170310974,
0.4778435230255127,
0.9402512311935425,
-0.449936181306839,
0.6166555881500244,
-0.08835938572883606,
-0.7144893407821655,
-0.7635867595672607,
-0.11092447489500046,
-0.15370213985443115,
-0.5895785689353943,
-1.433449387550354,
-0.44790863990783... |
def plot _ solution ( dict = case _ a, tf = 100, n = 1000, xy _ bool = true, t _ bool = true, dmap _ bool = true, fourier _ bool = true ) : # genrate a figure # integrate the solution z, t = gen _ sys ( dict = dict, tf = tf, n = n ) # unpack key variables x, v = z. t # plot if xy _ bool = = true : fig = plt. figure ( )... | [
0.1748855859041214,
0.6768169403076172,
0.95041823387146,
-0.5072720646858215,
0.24760231375694275,
0.10538779199123383,
1.0518206357955933,
-0.4352566599845886,
-0.254260390996933,
0.37900227308273315,
-0.755052924156189,
0.14528198540210724,
0.303987592458725,
0.03323326259851456,
-0.3... |
def renormalize _ node _ probabilities ( num _ nodes, p _ array ) : for i in range ( num _ nodes ) : p _ array _ i = p _ array [ :, i ] p _ sum = p _ array _ i. sum ( ) p _ array _ i / = p _ sum | [
0.33184874057769775,
-0.2945181131362915,
0.40598008036613464,
0.19677691161632538,
0.8099328279495239,
0.237391397356987,
0.00828054640442133,
0.9876285195350647,
-0.09802154451608658,
1.0324040651321411,
0.7651635408401489,
0.27012965083122253,
-0.5515128970146179,
-0.3767712116241455,
... |
def test _ split _ col _ not _ included _ in _ variables ( df ) : transformer = drophighpsifeatures ( split _ col = " var _ 3 ", variables = none ) transformer. fit ( df ) assert " var _ 3 " not in transformer. variables _ assert " var _ 3 " not in transformer. psi _ values _. keys ( ) transformer = drophighpsifeatures... | [
-0.2521201968193054,
0.11331196874380112,
0.44602400064468384,
0.09433617442846298,
0.19903291761875153,
0.0397629588842392,
0.12586677074432373,
0.7126015424728394,
-0.6379567980766296,
-0.43647870421409607,
-1.1757146120071411,
-0.059614457190036774,
-0.6932633519172668,
0.15378879010677... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.