text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ mul _ _ ( self, other ) : if self. source! = other. dest : raise valueerror ( " destination frame of first rotation { } is not the same as source frame of second rotation { }. ". format ( other. dest, self. source ) ) if isinstance ( other, constantrotation ) : if self. av is not none : other _ inverse = other.... | [
-0.734170138835907,
0.8019367456436157,
1.1138004064559937,
0.020320946350693703,
-0.39613717794418335,
-0.0569082610309124,
0.3837076723575592,
-0.6328209638595581,
0.8928549289703369,
0.5221760272979736,
-0.4479813873767853,
-0.45483341813087463,
-0.22867760062217712,
-0.4833028316497803... |
def _ darwindmgpath ( self ) : return os. path. join ( self. sscratchpath,'dmgmountpoint') ; | [
-0.3946298360824585,
0.2067602574825287,
0.43513619899749756,
-0.28076285123825073,
-0.471783310174942,
0.6976720094680786,
-0.29454419016838074,
-0.318154513835907,
-0.362589955329895,
0.07889991998672485,
0.8808486461639404,
0.21611380577087402,
0.3226543366909027,
0.8283916711807251,
... |
def query _ recursive ( self, p, q ) : if q < = p : return self. e ( ) return self. _ query _ recursive ( p, q, 0, 0, self. n ) | [
-0.16052328050136566,
1.064386010169983,
0.27795639634132385,
0.3077153265476227,
-0.743757426738739,
-0.06385470181703568,
-0.48839154839515686,
-0.7471320033073425,
0.29196229577064514,
-0.7468011975288391,
0.9027487635612488,
0.012497116811573505,
-0.7554871439933777,
0.3707256317138672... |
def gp _ ex _ output _ scale ( ) : start, end = 0. 0, 1. 0 x = infpy. gp _ 1d _ x _ range ( start, end, 0. 04 ) noise _ level = 0. 1 small _ y = infpy. gp _ zero _ mean ( numpy. asarray ( [ x [ 0 ] * * 2 + noise _ level * scipy. stats. norm ( ). rvs ( ) [ 0 ] for x in x ] ) ) # big _ y = small _ y * 100. 0 ln = infpy. ... | [
0.057147540152072906,
-0.4940705895423889,
0.9139298796653748,
-0.21823154389858246,
-0.5365370512008667,
-0.36657485365867615,
-0.6167342662811279,
0.025572815909981728,
-0.36027565598487854,
0.6343501806259155,
0.5089542865753174,
0.4845936596393585,
0.1669083684682846,
0.082388512790203... |
def token _ matches ( grid, token, first, second, third ) : return grid [ first ] = = token and grid [ second ] = = token and grid [ third ] = = token | [
0.5955964922904968,
-0.28168073296546936,
0.5087442398071289,
-0.1833885759115219,
0.26747626066207886,
-0.40135106444358826,
-1.3898919820785522,
0.10995139181613922,
-1.2432448863983154,
0.14589515328407288,
-0.8910086750984192,
-0.0612228624522686,
-0.7147485613822937,
-0.70860731601715... |
def import _ azure _ monitor ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " import _ azure _ monitor " ) | [
0.40464067459106445,
0.5420907735824585,
0.5503618121147156,
0.6005620956420898,
0.285952627658844,
1.7980095148086548,
-0.1589767038822174,
-0.22010226547718048,
0.676906168460846,
0.38708627223968506,
-0.5099283456802368,
0.41666024923324585,
-0.6812790036201477,
-0.3714592158794403,
-... |
def totaltime ( self, newtotaltime ) : h, m, s = self. mstohms ( newtotaltime ) self. totallabel. settext ('% 02d : % 02d : % 02d'% ( h, m, s ) ) | [
-0.17479611933231354,
-0.8447377681732178,
0.8533334136009216,
-0.5485828518867493,
-0.040888331830501556,
0.6776010990142822,
0.05994575470685959,
-0.32728177309036255,
0.05237609148025513,
1.548182487487793,
-0.8939791321754456,
0.20094192028045654,
0.11694997549057007,
-0.35248059034347... |
def plot _ labelled _ elements ( elements, spec, background = " white ", figsize = ( 30, 5 ) ) : unique _ elements = np. unique ( elements [ elements! = 0 ]. astype ( int ) ) pal = np. random. permutation ( sns. color _ palette ( " rainbow ", n _ colors = len ( unique _ elements ) ) ) new _ spec = np. zeros ( list ( np... | [
-0.15648002922534943,
-0.4722398817539215,
0.8767533302307129,
-0.873940110206604,
-0.5658275485038757,
0.10213135182857513,
0.7972700595855713,
0.32531338930130005,
1.3454324007034302,
0.10169050842523575,
0.5067026019096375,
0.7784331440925598,
0.03387124463915825,
0.021313894540071487,
... |
def item _ from _ reddit ( submission ) : item = get _ or _ create ( db. session, item, track _ id = submission. video _ id, source ='reddit') item. subreddit = submission. subreddit _ name _ prefixed item. url = submission. url item. domain = submission. domain item. raw _ title = submission. title item. r _ created _... | [
0.4617806673049927,
-0.15657168626785278,
0.4659953713417053,
0.5918529033660889,
-0.16666126251220703,
0.8393079042434692,
-1.5035228729248047,
-0.2932378053665161,
0.1972178965806961,
0.11898215860128403,
-0.23096616566181183,
0.2858605980873108,
-0.03393285721540451,
0.04263858497142792... |
def read _ contents ( self, nodeid = none, include _ images = false, collapse _ after _ read = false ) : if nodeid is none and self. root _ item is not none : return self. read _ contents ( nodeid = self. get _ nodeid ( self. root _ item ), include _ images = include _ images, collapse _ after _ read = collapse _ after... | [
-0.7366511225700378,
-0.7578141093254089,
0.7926336526870728,
0.41996487975120544,
-0.8928555846214294,
-0.820595920085907,
0.2628461718559265,
0.3800167739391327,
0.36458516120910645,
0.14573843777179718,
0.4219982326030731,
-0.6618834137916565,
-0.08626388013362885,
0.6910765767097473,
... |
def entity _ extensions ( e ) : ext = e. find ( ". / { % s } extensions " % ns ['md'] ) if ext is none : ext = etree. element ( " { % s } extensions " % ns ['md'] ) e. insert ( 0, ext ) return ext | [
0.5723162889480591,
1.1769392490386963,
0.7645044922828674,
-0.16741862893104553,
-0.37826406955718994,
-0.042657520622015,
-0.31594258546829224,
-0.09558288007974625,
1.5778988599777222,
0.5232412219047546,
0.78640216588974,
-0.42966577410697937,
-0.09074635058641434,
0.48214292526245117,... |
def text ( self ) : return self. _ text | [
-0.22686828672885895,
-0.7165743112564087,
0.19116416573524475,
-0.12156074494123459,
-0.6038084626197815,
0.49574968218803406,
0.15553657710552216,
-0.33838072419166565,
0.7951498627662659,
-0.43946999311447144,
-0.2611689269542694,
0.14825750887393951,
-0.4859853684902191,
-1.10498988628... |
def findfieldbyname ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.14079467952251434,
-0.020322712138295174,
0.42687007784843445,
-0.040968526154756546,
0.166349396109581,
0.13462474942207336,
0.4722013771533966,
-1.0857120752334595,
-0.7988331913948059,
-0.24496205151081085,
-1.2732077836990356,
-0.8553249835968018,
-1.2432018518447876,
0.108767308294... |
def markpolygons ( self, polygons ) : if polygons = = none : return self. _ image for polygon in polygons : self. _ marksinglepolygon ( polygon ) return self. _ image | [
-0.6709175109863281,
-0.24076403677463531,
0.5046650767326355,
-0.036149073392152786,
0.6257386207580566,
0.460785835981369,
0.28826531767845154,
-0.3368692994117737,
1.7740495204925537,
0.26206454634666443,
-0.8102020621299744,
0.38767966628074646,
-0.06116706505417824,
-0.123598515987396... |
def require _ attribute _ value ( self, attribute : str, value : union [ int, str, float, bool, none ] ) - > none : found = false for key _ node, value _ node in self. yaml _ node. value : if ( key _ node. tag = ='tag : yaml. org, 2002 : str'and key _ node. value = = attribute ) : found = true node = node ( value _ nod... | [
0.19709885120391846,
-0.5789772868156433,
0.6290785074234009,
-0.5887354016304016,
-0.25461772084236145,
0.21047191321849823,
0.21709197759628296,
0.1760721504688263,
-0.548475980758667,
0.3831917941570282,
0.674419641494751,
0.953734278678894,
0.8211390972137451,
1.1471270322799683,
0.4... |
def test _ gf _ write _ feature _ header _ background _ with _ steps ( disabled _ colors, capsys, mocker ) : # given feature = mocker. magicmock ( spec = feature ) feature. keyword = " feature " feature. short _ description = " my feature " feature. description = [ ] feature. tags = [ ] feature. background = mocker. ma... | [
0.3466107249259949,
-0.4189927875995636,
0.6374034285545349,
0.8741857409477234,
0.5881321430206299,
0.20478323101997375,
-0.28256621956825256,
-0.3132022023200989,
-0.8366025686264038,
-0.42039573192596436,
-0.8517012596130371,
-0.19214731454849243,
-0.31234997510910034,
1.012296080589294... |
def _ _ init _ _ ( self ) : pass | [
0.384575754404068,
-1.1162716150283813,
0.2936498522758484,
0.8026404976844788,
0.5190465450286865,
0.6533650755882263,
0.5970242023468018,
0.30950239300727844,
0.15195979177951813,
-1.2418946027755737,
-0.8523526787757874,
-0.016424469649791718,
-0.05249137803912163,
0.6643484234809875,
... |
def _ get _ dispatcher ( self, event : union [ str, callable ], payload : dict = { }, is _ async : bool = false ) - > tuple : # this function determines the proper dispatching method for this event. # if event is a string, we use self. _ dispatch # if event is a class we call that classes. dispatch method method = none... | [
-0.6244086623191833,
-0.08595423400402069,
0.8423840403556824,
0.35747408866882324,
-0.23023109138011932,
-0.46272003650665283,
-0.49808555841445923,
-0.35302215814590454,
-0.15801173448562622,
0.3676912188529968,
0.3782350718975067,
-0.1918785274028778,
1.0329004526138306,
1.0536748170852... |
def _ _ set _ auto _ update ( self, value ) : self. ipr. setautoupdate ( value ) | [
-0.8437160849571228,
-0.47771644592285156,
0.5230540037155151,
-0.5174067616462708,
-0.2570924162864685,
-0.13214924931526184,
0.32190415263175964,
0.3611275255680084,
-0.22613252699375153,
-0.18425489962100983,
-0.34886154532432556,
-0.09916368126869202,
-0.557024359703064,
-0.73225289583... |
def sample _ all _ hops ( hops, nodes = none ) : n = hops [ 1 ]. shape [ 0 ] if nodes is none : nodes = np. arange ( n ) return np. vstack ( ( nodes, np. array ( [ [ - 1 if len ( x ) = = 0 else np. random. choice ( x ) for x in hops [ h ]. rows [ nodes ] ] for h in hops. keys ( ) if h! = - 1 ] ), sample _ last _ hop ( ... | [
-1.1526798009872437,
0.14642807841300964,
0.6441736221313477,
1.0398802757263184,
-0.25949370861053467,
0.0849422961473465,
0.4611697196960449,
-0.15838077664375305,
0.7039809823036194,
1.0833652019500732,
0.5352881550788879,
-0.488931268453598,
-0.053802087903022766,
0.5644098520278931,
... |
def setnumberkinetics ( number ) : return none | [
0.3399498164653778,
0.6471110582351685,
0.38934579491615295,
0.6330633759498596,
-0.3383021950721741,
-0.06612758338451385,
0.5904598236083984,
-0.21877187490463257,
0.7539364099502563,
-0.6158124208450317,
-0.7423977255821228,
-0.4778299927711487,
-0.41463178396224976,
-0.2474935203790664... |
def _ get _ afip ( ) : # afip init wsaa = wsaa ( ) wsfev1 = wsfev1 ( ) # get access ticket ( token y sign ) certificate = settings. afip ['auth _ cert _ path'] private _ key = settings. afip ['auth _ key _ path'] if not os. path. exists ( certificate ) : raise valueerror ( " auth certificate can not be found ( got {! r... | [
-0.028224479407072067,
-0.5975059866905212,
0.5791130065917969,
0.17298468947410583,
-0.07289055734872818,
-0.4592541456222534,
0.41869014501571655,
-0.022245921194553375,
0.0008948771865107119,
-0.04939794912934303,
0.8173380494117737,
0.46961238980293274,
-0.047378137707710266,
-0.163260... |
def get _ serializer _ context ( self ) : return { " channel _ api " : self. request. channel _ api, " current _ user " : self. request. user, " request " : self. request, " view " : self, } | [
-0.7782152891159058,
-1.054175615310669,
0.4512211084365845,
-0.5740639567375183,
-0.4482526481151581,
-0.3424035608768463,
-0.15534676611423492,
-0.19767926633358002,
0.296874076128006,
-0.34642139077186584,
-0.20682919025421143,
0.44572505354881287,
-0.6108901500701904,
-0.31515660881996... |
def icon ( file, x, y, icon _ size = 50 ) : path _ to _ file = tools _ parseknownimagefile ( file ) iconimg = image. open ( path _ to _ file ). convert ( " l " ). resize ( ( icon _ size, icon _ size ) ) return deepcopy ( pssm. pillowimgtoscreenobject ( iconimg, x, y ) ) | [
-0.21516498923301697,
0.012258268892765045,
0.392953097820282,
-0.3396126329898834,
-0.9047437310218811,
-0.0362410731613636,
-0.016380973160266876,
-0.13711313903331757,
-0.34242337942123413,
0.5821231603622437,
-0.7338885068893433,
-0.1962357610464096,
0.7955661416053772,
-1.058382391929... |
def gethsspeed ( channel, typ, index ) : andor _ solis. gethsspeed. restype = ctypes. c _ uint speed = ctypes. c _ float ( ) result = andor _ solis. gethsspeed ( ctypes. c _ int ( channel ), ctypes. c _ int ( typ ), ctypes. c _ int ( index ), ctypes. byref ( speed ), ) check _ status ( result ) return float ( speed. va... | [
0.37623685598373413,
0.4695588946342468,
0.42658767104148865,
0.3285382091999054,
0.9974982738494873,
-0.20030590891838074,
0.08111928403377533,
-1.0367777347564697,
0.2959510087966919,
-0.09683755040168762,
-0.2577935755252838,
0.821100652217865,
-1.6375353336334229,
0.022493261843919754,... |
def test _ calculate _ noslopes ( ) : arr = np. zeros ( ( 5, 3, 2 ) ) slopes = mob. _ calculate _ temporal _ linear _ slope ( arr ) assert np. all ( slopes = = 0. 0 ) | [
0.88774573802948,
-0.081358902156353,
0.4136928915977478,
0.7087885141372681,
0.36166852712631226,
0.8685420751571655,
0.2636438310146332,
0.028030816465616226,
0.020622162148356438,
-0.40729138255119324,
-0.1747029721736908,
-0.9792687296867371,
-0.46167874336242676,
1.1783407926559448,
... |
def _ _ getitem _ _ ( self, i ) : # todo : override method to return the ith item in dataset data = copy. copy ( self. all _ data [ i ] ) num _ masked = int ( len ( data ) * 0. 15 ) masked _ ind = random. sample ( list ( range ( len ( data ) ) ), num _ masked ) label = list ( ) for ind in masked _ ind : label. append (... | [
-0.5190067291259766,
-0.09894178807735443,
0.5409619212150574,
-1.0861250162124634,
-0.9134015440940857,
0.2525475025177002,
0.3054555654525757,
-0.43104517459869385,
0.2421610802412033,
0.36782053112983704,
-0.6713430881500244,
0.11152423173189163,
-0.29777777194976807,
-1.272661566734314... |
def _ _ init _ _ ( self, * args, * * kwargs ) : self. encoding = str ( ) self. errors = str ( ) self. newlines = none self. buffer = bufferediobase ( ) | [
0.5707328915596008,
-0.6000491976737976,
0.4091901481151581,
0.3224741518497467,
-0.2391943633556366,
0.18090951442718506,
-0.37795644998550415,
-0.669024646282196,
-0.3542177081108093,
-1.2864365577697754,
-0.8115726709365845,
0.6252701878547668,
-0.46268513798713684,
1.0579715967178345,
... |
def readfasta ( infile, pattern _ identifier = " \ s + " ) : mali = { } id = none fragments = [ ] identifiers = [ ] for line in infile : if line [ 0 ] = = " # " : continue if line [ 0 ] = = " > " : if id : mali [ id ] = re. sub ( " \ s ", " ", string. join ( fragments, " " ) ) id = re. search ( " ^ ( % s ) " % pattern ... | [
-0.2904570400714874,
-0.7738083004951477,
0.8919897079467773,
-0.5748387575149536,
-1.2367494106292725,
-0.12094984948635101,
0.34551769495010376,
1.4886865615844727,
0.1999601274728775,
0.4351142644882202,
-0.19569769501686096,
-0.24405215680599213,
-0.09179696440696716,
0.193742111325263... |
def write _ tokens ( new _ refresh _ token, new _ access _ token, user _ id ) : user = find _ user ( user _ id ) with open ('user _ ids. json ','r') as f : user _ data = json. load ( f ) for item in user _ data : if item = = user : item ['access _ token'] = new _ access _ token item ['refresh _ token'] = new _ refresh ... | [
-0.2364775836467743,
-1.444102168083191,
0.38649022579193115,
-0.21584409475326538,
0.08889416605234146,
0.3199269771575928,
-0.3102090656757355,
-0.2532207667827606,
-0.409309059381485,
0.53143310546875,
-0.7835657596588135,
1.2689950466156006,
0.6721279621124268,
0.328741192817688,
0.3... |
async def async _ set _ value ( self, value : float ) - > none : await self. _ client. number _ command ( self. _ static _ info. key, value ) | [
-0.6441744565963745,
1.3100991249084473,
0.39189308881759644,
0.5625608563423157,
0.9465265274047852,
0.03593369573354721,
0.19148387014865875,
-0.8702641129493713,
-0.9796093702316284,
0.46443265676498413,
-0.7289214134216309,
0.3903185725212097,
0.08078525215387344,
0.3474174439907074,
... |
def create _ psf _ grid ( self, psf _ coeff _ interp, imshape, xgrid, ygrid, skip, nmax, psfshape, basis, beta, cen, totpsfimage, plot ) : # if plot : # plnum = n. zeros ( 2 ) # for i in range ( 2 ) : # dum = pl. figure ( none ) # plnum [ i ] = dum. number # pl. clf ( ) # if i = = 0 : pl. suptitle ('gridded psfs') # if... | [
-0.03818226233124733,
-0.040038224309682846,
0.9100927114486694,
0.33085450530052185,
0.2858787775039673,
-0.2481001317501068,
0.6292914748191833,
0.28211501240730286,
-0.12379349023103714,
-0.5953583121299744,
-0.06110136955976486,
-0.2333800345659256,
-0.5780696868896484,
-0.318551063537... |
def get _ layer ( self ) : return self. _ layer | [
-0.874653160572052,
-0.12286119163036346,
0.2438807189464569,
0.5890160202980042,
0.5883283019065857,
0.9594870209693909,
0.8025630712509155,
-0.6852955222129822,
0.05258458852767944,
-1.6190516948699951,
0.039798758924007416,
1.119215488433838,
-0.7534247636795044,
-0.13398006558418274,
... |
def parse _ bs4urls ( urls, key ='href ', pattern = ". ", groupnum = 0 ) : goodurls = [ ] for url in urls : match = re. search ( pattern, url [ key ] ) if match : goodurls. append ( match. group ( groupnum ) ) return goodurls | [
-1.3101625442504883,
0.2586205005645752,
0.5072920322418213,
-0.010890106670558453,
0.17729762196540833,
-0.12860241532325745,
0.23509974777698517,
0.32777267694473267,
0.1054946556687355,
-0.006587306968867779,
0.2341417521238327,
-0.21312960982322693,
0.3396170735359192,
-0.0244084298610... |
def status ( ) : ret = { " spm " : { }, " rpi " : { }, } # spm status res = _ _ salt _ _ [ " spm. query " ] ( " status " ) ret [ " spm " ]. update ( { k : v for k, v in res. iteritems ( ) if not k. startswith ( " _ " ) } ) # spm sleep interval res = _ _ salt _ _ [ " spm. query " ] ( " sleep _ interval " ) ret [ " spm "... | [
-0.2947877049446106,
-0.8594620823860168,
0.7091447114944458,
-0.19524404406547546,
-0.3981092870235443,
-0.41114890575408936,
-1.0894726514816284,
0.07472638040781021,
-0.2710798978805542,
0.27375149726867676,
-1.162681221961975,
-0.009398202411830425,
0.12056206166744232,
0.0885313600301... |
def _ mgui _ set _ step ( self, value : float ) : super ( ). _ mgui _ set _ step ( value ) self. _ readout _ widget. setsinglestep ( value ) | [
0.1534823328256607,
0.7868160605430603,
0.245859295129776,
0.42602306604385376,
0.06312596797943115,
0.5710400938987732,
0.44799119234085083,
0.40224331617355347,
-0.9844873547554016,
-0.5910647511482239,
-0.0476650595664978,
-0.5622157454490662,
-0.0017879351507872343,
1.6144930124282837,... |
def handle _ args ( sys _ args ) : if sys _ args. verbose is not false : sys _ args. verbose = true if sys _ args. cmd : cmd = command ( sys _ args. cmd, true ) time _ exceeded = false while cmd. is _ running ( ) : print _ str ( sys _ args, " command still running... " ) # determine if we've exceeded the timeout ( - t ... | [
0.46693509817123413,
-0.6126120686531067,
0.8038723468780518,
0.32117611169815063,
0.4054681360721588,
-0.12108103185892105,
-0.20636320114135742,
-0.012455197982490063,
0.08884935826063156,
0.17224451899528503,
0.43829718232154846,
0.28585758805274963,
-0.6158027648925781,
0.3623310029506... |
def _ handle _ errback ( self, result ) : log. info ( " action error : % s ", str ( result ) ) if isinstance ( result. value, node. connecterror ) : log. warning ( " failed to connect to host % s for run % s ", self. node. hostname, self. id ) self. fail ( none ) elif isinstance ( result. value, node. resulterror ) : l... | [
-0.4550325870513916,
-0.0819365605711937,
0.6226742267608643,
0.33673515915870667,
0.9300931096076965,
-0.08306174725294113,
-0.001342237344942987,
-0.6794230937957764,
-0.6493841409683228,
-0.4644761383533478,
0.07748639583587646,
0.04012329503893852,
-0.24675913155078888,
0.0877123102545... |
def is _ console _ app ( ) : args = commandline. cli _ arguments ( ) if " - - console " in args : return true return false | [
0.15523719787597656,
-0.2028941512107849,
0.666484534740448,
0.9949849843978882,
0.4566400349140167,
0.2669955790042877,
-0.22780641913414001,
-0.7280181050300598,
-0.33057430386543274,
0.4323103427886963,
0.3092743754386902,
0.3283340334892273,
-0.5271406173706055,
0.3708023428916931,
-... |
def read _ spa ( spa _ file ) : with open ( spa _ file,'rb') as f : f. seek ( 30 ) readchar = read _ binary ( f,'uint8 ', 255 ) title =''. join ( [ chr ( i ) for i in filter ( lambda x : x > 0, readchar ) ] ) f. seek ( 564 ) spectrumpts = read _ binary ( f,'int32') f. seek ( 576 ) maxwavenum = read _ binary ( f,'float'... | [
0.3624362647533417,
-0.805171549320221,
1.0147136449813843,
-1.071709156036377,
0.006752408109605312,
0.47906604409217834,
0.15617488324642181,
0.3382776081562042,
0.13175426423549652,
-0.014717797748744488,
-0.3793456256389618,
0.9181456565856934,
-0.2845154404640198,
0.21342013776302338,... |
def _ _ init _ _ ( self, function ='cogsourceinfo /') : self. function = function | [
0.1220121830701828,
0.666905403137207,
0.2294997125864029,
-0.3744364380836487,
0.3519279658794403,
-0.4228987991809845,
0.013219437561929226,
0.2800308167934418,
-0.6224417090415955,
-0.32875534892082214,
-0.7318049073219299,
-0.41131868958473206,
0.7285645604133606,
0.2306755781173706,
... |
def findpolygon ( self, vertices = 3, epsilon _ const = epsilon _ const ) : polygons = [ ] for gray in cv2. split ( self. _ image ) : # pronadje linije canny = cv2. canny ( gray, self. polygon _ th _ l, self. polygon _ th _ h ) # konture pronadje contours, _ = cv2. findcontours ( canny, cv2. retr _ list, cv2. chain _ a... | [
0.056943826377391815,
-0.4253360629081726,
0.5805844068527222,
0.3899507522583008,
-0.3096880614757538,
0.051985953003168106,
-0.09881401807069778,
-0.24769994616508484,
0.4248105585575104,
0.8435975313186646,
-1.0963594913482666,
-0.3812095820903778,
0.48838862776756287,
0.208602234721183... |
def photoheatingrate ( self, absorber ) : if self. pf ['isothermal'] : return 0. 0 if self. esec. method < 2 : heatingrate = self. psin [ absorber ]. copy ( ) heatingrate - = self. e _ th [ absorber ] * erg _ per _ ev \ * self. phin [ absorber ] if self. pf ['photon _ conserving'] : heatingrate - = self. psindn [ absor... | [
-0.2921121418476105,
0.36844098567962646,
0.6573092341423035,
-0.11391568183898926,
0.01831183210015297,
-0.2841101288795471,
-0.6173322200775146,
0.4672383964061737,
0.18938526511192322,
-0.09900382161140442,
0.7966592311859131,
-0.34197676181793213,
-0.6266289353370667,
1.353961825370788... |
def execute _ request ( self, selection : int, options : str, payload : str ) : if selection = = 1 : self. selecton _ key _ manipulation ( options, payload ) # selecton _ key _ manipulation ( options ) elif selection = = 2 : self. selection _ data _ exchange ( options, payload ) # selection _ data _ exchange ( options ... | [
-1.4927890300750732,
0.1487349420785904,
0.5983731150627136,
1.178956389427185,
0.3298814296722412,
-0.45104482769966125,
-0.12282003462314606,
-1.5409482717514038,
0.714420735836029,
0.4002443850040436,
0.5245150327682495,
0.05330794304609299,
-0.6868571043014526,
-0.302669882774353,
1.... |
def set _ current _ item ( self, item ) : self. _ widget. setcurrentitem ( item ) | [
-0.6673780679702759,
-1.0213898420333862,
0.13184043765068054,
0.3509446680545807,
0.38699913024902344,
1.2936556339263916,
0.5178824067115784,
0.3735490143299103,
-0.16371983289718628,
0.3938130736351013,
-0.6909757852554321,
0.5075398087501526,
-0.5190080404281616,
-0.06546811014413834,
... |
def get _ hydra _ portable _ subnets ( vlanid ) : filter = utils. nesteddict ( { } ) filter ['subnets'] ['note'] ['operation'] = " hydra only " filter ['subnets'] ['subnettype'] ['operation'] = " secondary _ on _ vlan " filter ['subnets'] ['networkvlanid'] ['operation'] = vlanid return networkman. list _ subnets ( filt... | [
0.22061298787593842,
0.6443886756896973,
0.717978835105896,
0.4370458424091339,
-0.10791980475187302,
-0.6414636373519897,
-0.7468055486679077,
0.07080433517694473,
0.17479859292507172,
0.2534751296043396,
-0.5767965912818909,
0.45250776410102844,
0.05441511049866676,
0.13144747912883759,
... |
def _ _ init _ _ ( self, quat, source, dest ) : self. source = source self. dest = dest self. quat = np. asarray ( quat ) | [
-0.31935325264930725,
-0.779775857925415,
0.40680354833602905,
-0.9815009832382202,
-0.5322815775871277,
0.06232853978872299,
-1.3766924142837524,
0.00991999264806509,
0.3092621862888336,
0.02493464946746826,
-0.6922129988670349,
0.3188037574291229,
0.9903596639633179,
-0.23552709817886353... |
def inference ( self, x ) : # n _ vocab = len ( self. vocab ) # embeddings = self. variable ( name ='embeddings ', # shape = [ n _ vocab, self. embedding _ dim ], # initializer = tf. random _ uniform _ initializer ( - 1. 0, 1. 0 ), # l2 _ regularization = self. l2 _ regularization ) pre _ trained _ embeddings = np. loa... | [
0.08916793763637543,
0.6718334555625916,
0.8626301884651184,
0.34320807456970215,
-0.5104178786277771,
-0.3558262288570404,
0.6625640392303467,
0.5453210473060608,
-0.1334560066461563,
0.4993375539779663,
-0.6293332576751709,
0.09468483924865723,
0.4875512719154358,
0.936550498008728,
-0... |
def delete _ item ( self ) : for item in self. db _ key _ db : if item = = self. key _ attr : main _ obj = self. db _ key _ db [ item ] # print ( main _ obj ) # test print break del main _ obj [ self. index ] self. db _ key _ db [ item ] = main _ obj # print ( self. db _ key _ db. _ _ dict _ _ [ item ] ) # test print s... | [
-0.6040467023849487,
-0.34575873613357544,
0.4928986430168152,
-0.13761760294437408,
-0.29480206966400146,
0.645442545413971,
0.9477793574333191,
0.7244954109191895,
0.24715328216552734,
0.5761115550994873,
-0.2966674566268921,
-0.16455601155757904,
-1.169426441192627,
0.285906046628952,
... |
def get _ output _ response ( api _ response ) : if api _ response is not none : try : output _ response = parsestring ( " ". join ( api _ response. text ) ) except : try : json. loads ( api _ response. text ) except : output _ response = api _ response. text. encode ('ascii ','ignore') pnote ( " api _ response text : ... | [
0.04949177801609039,
-1.2718003988265991,
0.4883478283882141,
-0.527651846408844,
-0.5741910934448242,
-1.0021553039550781,
-0.11539428681135178,
-0.7662120461463928,
0.5568145513534546,
-0.08290347456932068,
0.45072558522224426,
-0.59654700756073,
-0.5859982967376709,
-0.7172463536262512,... |
def load _ icon _ set ( * args ) : if q. qapplication. instance ( ) is none : return none icon = q. qicon ( ) modes = ( " normal ", " disabled ", " active ", " selected " ) states = ( " on ", " off " ) def _ str2mode ( _ mode ) : _ map = { " normal " : q. qicon. normal, " disabled " : q. qicon. disabled, " active " : q... | [
-0.8856762647628784,
-0.09086085110902786,
0.9012211561203003,
-0.47727301716804504,
-0.3462269902229309,
-0.2926647663116455,
-0.326789915561676,
-0.6284360289573669,
0.10169241577386856,
0.08879067003726959,
-0.8377106785774231,
-0.6244089007377625,
0.17269128561019897,
0.183808818459510... |
def load ( self, groups = ( none, none ), sites = ( none, none ), datasets = ( none, none ) ) : self. loaded = false self. groups. clear ( ) self. groups [ none ] = df. group. null _ group self. sites. clear ( ) self. datasets. clear ( ) self. partitions. clear ( ) log. info ('setting up partitions.') self. _ load _ pa... | [
-0.31480851769447327,
0.9160292744636536,
0.35562294721603394,
-0.5055321455001831,
-0.15323883295059204,
-0.29144275188446045,
0.770817756652832,
-0.2574531137943268,
-0.19561918079853058,
-0.548529326915741,
-0.30159321427345276,
0.47881922125816345,
-0.3937419056892395,
-0.5543265938758... |
def _ _ init _ _ ( self, sprite, scaling, name ) : super ( ). _ _ init _ _ ( sprite, scaling ) self. name = name | [
0.02649821899831295,
-0.16648036241531372,
0.5712082982063293,
0.0347784124314785,
-1.1180331707000732,
0.0819949358701706,
-0.9889863133430481,
0.3579806685447693,
-0.2846100628376007,
1.519930362701416,
-1.4748636484146118,
-0.049735549837350845,
0.2851661145687103,
0.3060629963874817,
... |
def test _ create _ alumno _ admin ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) data = [ { " dni " : 6, " nombre " : " danilo ", " apellido " : " reitano ", " email " : " danilo @ danilo. com. ar ", " legajo " : 1, " fecha _ nacimiento " : " 08 / 02 / 1998 ", " direccion " : " calle ", " ... | [
0.17226044833660126,
0.13683278858661652,
0.49734994769096375,
-0.07428152114152908,
0.9078860878944397,
1.3825061321258545,
-0.7308494448661804,
-0.5129016637802124,
-0.104153573513031,
-0.37480711936950684,
-0.8229444026947021,
1.0953954458236694,
0.7925028204917908,
-0.09265679866075516... |
def status ( self, id : union [ status, idtype ] ) - > status : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('get ', f'/ api / v1 / statuses / { id }') | [
-0.9713883996009827,
-0.39276692271232605,
-0.07191798835992813,
0.4379487633705139,
0.2204614281654358,
-0.5070390105247498,
-1.3191118240356445,
-0.3733973503112793,
1.011017918586731,
-0.7465010285377502,
-0.7200499176979065,
1.0974514484405518,
-0.2991059124469757,
-0.1504650115966797,... |
def teardown ( self ) : self. _ stopanddeletestream ( self. full _ stream _ name ) self. _ deleteconnectionprofile ( self. full _ source _ connection _ name ) self. _ deleteconnectionprofile ( self. full _ dest _ connection _ name ) | [
0.37563931941986084,
-0.7413248419761658,
0.44591090083122253,
-0.5251176357269287,
0.22973360121250153,
0.2417546957731247,
0.848697304725647,
-0.14648161828517914,
-0.022299116477370262,
0.0957711786031723,
-0.34327489137649536,
-0.1690378040075302,
-0.46813157200813293,
0.25842189788818... |
def randomize _ per _ line ( df, rand _ num, exclude _ outer, cell _ lines = ['' ], plate _ dims = [ 16, 24 ] ) : if len ( cell _ lines ) > 1 : exclude _ outer = 2 avail _ wells _ per _ line = wells _ per _ cell _ line ( cell _ lines, exclude _ outer ) tr _ wells = define _ treatment _ wells ( exclude _ outer, plate _ ... | [
-0.5432039499282837,
0.5676140189170837,
0.7099844217300415,
0.12181265652179718,
0.43510061502456665,
-0.5264430642127991,
0.6104591488838196,
-0.11321517080068588,
0.27041807770729065,
-0.854445219039917,
0.28110018372535706,
-0.17915427684783936,
0.27669647336006165,
0.23213444650173187... |
def _ update _ changed _ fields ( self, nic, nic _ obj ) : for field in objects. nic. fields : try : patch _ val = getattr ( nic, field ) except attributeerror : continue if patch _ val = = wtypes. unset : patch _ val = none if nic _ obj [ field ]! = patch _ val : nic _ obj [ field ] = patch _ val | [
-0.09629841893911362,
-0.8864968419075012,
0.45776909589767456,
-1.362830400466919,
0.13479532301425934,
0.11615362018346786,
0.0732462927699089,
-0.7210603356361389,
-0.028783980756998062,
0.29089996218681335,
-0.9470698833465576,
-0.2215486317873001,
-0.4052201509475708,
0.10512475669384... |
def opennormalfvfile ( fv _ file, type _ str ) : # read in the 1st line of the file and check for errors. # # import pdb ; pdb. set _ trace ( ) type _ str ='normalized frequency vector file :'fp = openfile ( fv _ file, type _ str ) line = ensure _ string ( fp. readline ( ) ) field = line. split (':') num _ vect = field... | [
0.3550857603549957,
-0.7572458982467651,
0.7431483864784241,
0.2258991152048111,
-0.415207177400589,
0.34035593271255493,
1.3290977478027344,
-0.031600695103406906,
-0.381570965051651,
-0.40294545888900757,
0.8063061833381653,
0.4365847408771515,
-0.3094199597835541,
-0.4948475956916809,
... |
def _ _ change _ time ( self ) : current _ frame = int ( self. current _ frame ) end _ frame = self. _ _ seq _ end _ spin _ box. value ( ) step = self. _ _ seq _ step _ spin _ box. value ( ) rebuild = self. _ _ seq _ rebuild _ checkbox. is _ checked ( ) if step > 1 and current _ frame < end _ frame - step + 1 : next _ ... | [
-0.7361536026000977,
-0.18043692409992218,
1.0093034505844116,
0.34190815687179565,
-0.23322844505310059,
-0.3770992159843445,
0.3332749307155609,
0.9189170002937317,
-0.32171833515167236,
0.5275514721870422,
-0.39027896523475647,
0.4735122621059418,
-1.137556791305542,
1.0996592044830322,... |
def write _ xlsx ( self, filepath = module _ path +'/ result /') : workbook = workbook ( filepath + self. name + ". xlsx " ) self. write _ company _ xlsx ( workbook ) workbook. close ( ) | [
-0.4752729535102844,
-0.22948555648326874,
0.257994145154953,
0.9456675052642822,
0.6319466829299927,
1.2707489728927612,
0.4041295647621155,
0.44422999024391174,
0.1571204513311386,
-0.06727985292673111,
-0.5684299468994141,
0.2539520859718323,
-0.3537207841873169,
0.000605898501817137,
... |
def _ _ addtasks ( self, tasks, transactional, fill _ request, multiple, rpc = none ) : def resulthook ( rpc ) : " " " processes the taskqueuebulkaddresponse. " " " try : rpc. check _ success ( ) except apiproxy _ errors. applicationerror as e : raise _ translateerror ( e. application _ error, e. error _ detail ) asser... | [
-0.7134395241737366,
0.762952983379364,
1.011496901512146,
0.05896608158946037,
0.5673374533653259,
-0.14673012495040894,
-0.19361796975135803,
-1.042241096496582,
0.07449263334274292,
-0.06247337907552719,
-0.3212926983833313,
-0.1351328194141388,
-0.3665773570537567,
0.601962149143219,
... |
def _ _ enter _ _ ( self ) : class _ fakewebdriver ( webdriver. webdriver ) : " " " a fake web driver. applitools currently requires selenium to work, so we need a web driver to trick it into working. attributes : _ mobile : anything. it must exist, though. _ switch _ to : anything. capabilities : a dictionary of capab... | [
-0.3453434407711029,
0.33153674006462097,
0.8292418122291565,
0.8459623456001282,
0.17160247266292572,
-0.7750774621963501,
0.46881577372550964,
-0.760181188583374,
0.8671396970748901,
-0.5916277766227722,
0.06976300477981567,
0.12278984487056732,
0.2548571228981018,
1.0865925550460815,
... |
def select ( self, timeout = none ) : if self. _ selector is none : return [ ] return self. _ selector. select ( timeout ) | [
-0.9469175338745117,
-0.4459829330444336,
0.3905480206012726,
0.7354143261909485,
0.6199111938476562,
-0.7414556741714478,
-0.8574053049087524,
-0.4064710736274719,
0.7646693587303162,
0.5969092845916748,
-0.3210197389125824,
0.37318283319473267,
-0.463267058134079,
-0.2803992033004761,
... |
def kadane _ solution ( seq ) : max _ so _ far = - maxsize max _ ending _ here = 0 for val in seq : max _ ending _ here = max _ so _ far + val if max _ ending _ here < 0 : max _ ending _ here = 0 elif max _ so _ far < max _ ending _ here : max _ so _ far = max _ ending _ here return max _ so _ far | [
-0.2786494195461273,
-0.7799969911575317,
0.5059122443199158,
0.8008826375007629,
-0.5830172896385193,
0.0919024720788002,
-0.26760587096214294,
0.7195304036140442,
-0.24392817914485931,
0.8676204085350037,
-0.24242615699768066,
-0.8729341626167297,
-0.44741755723953247,
0.9830528497695923... |
def transform ( input ) : state _ json = json. loads ( input ) players, first _ player _ color = create _ players ( state _ json ['players'] ) board = create _ board ( state _ json ['board'] ) return players, first _ player _ color, board | [
-0.9594210982322693,
0.07444175332784653,
0.6603830456733704,
-1.0411196947097778,
0.6131463646888733,
-0.2922690510749817,
-0.004278324078768492,
-0.08639819920063019,
0.20282766222953796,
0.49179747700691223,
-0.988820493221283,
0.08312772959470749,
0.3424247205257416,
0.2350985705852508... |
def load _ test _ data ( ) : test _ data = pd. read _ csv ( test _ label _ dir ) test _ data [ " galaxyid " ] = test _ data [ " galaxyid " ]. apply ( append _ ext ) generator = tf. keras. preprocessing. image. imagedatagenerator ( rescale = 1. / 255. ) test _ generator = generator. flow _ from _ dataframe ( dataframe =... | [
-0.593863844871521,
0.034184958785772324,
0.4109787344932556,
-0.4996773600578308,
-0.0017259148880839348,
0.4709831178188324,
-0.11236394941806793,
0.14170870184898376,
0.2895597219467163,
-0.39583858847618103,
0.3724105656147003,
0.589993417263031,
-0.0015700041549280286,
0.1140046641230... |
def all _ moffat ( dataframe ) : dataframe ['gal _ fwhm'] = [ gal. fwhm for gal in dataframe ['original _ gal'] ] dataframe ['moffat _ psf _ fwhm'] = [ psf. fwhm for psf in dataframe ['true _ psf'] ] dataframe ['gal _ psf _ ratio'] = dataframe ['gal _ fwhm'] / dataframe ['moffat _ psf _ fwhm'] # print ( dataframe ['rec... | [
-0.17596980929374695,
0.4614250659942627,
0.3805879056453705,
-0.6196086406707764,
0.07647108286619186,
0.3824674189090729,
0.6040683388710022,
0.5850328207015991,
-0.2617226839065552,
-0.2981136739253998,
0.44990235567092896,
0.5349522829055786,
0.357662558555603,
1.0112053155899048,
1.... |
def update ( self, state, action, nextstate, reward ) : " * * * your code here * * * " s2 = self. getvalue ( nextstate ) sample = self. discount * s2 + reward s1 = self. getqvalue ( state, action ) self. qvalues [ ( state, action ) ] = ( 1 - self. alpha ) * s1 + self. alpha * sample # self. qvalues [ ( state, action ) ... | [
0.09976766258478165,
-0.5419356822967529,
0.4368782341480255,
0.2795102596282959,
-0.8959720134735107,
0.32179054617881775,
0.047188401222229004,
-0.06169627979397774,
0.7452757358551025,
-0.1299338936805725,
-0.33225616812705994,
0.6938967108726501,
0.21302594244480133,
-0.320722341537475... |
def precess ( ra, decl, inequinox, outequinox, \ input = " sexigesimal ", output = " sexigesimal " ) : warnings. warn ( " results not exactly correct... " ) # convert equatorial coords to radians if input = = " sexigesimal " : ra = protractor. convert ( ra, " hmsstr ", " rad " ) decl = protractor. convert ( decl, " dms... | [
0.008299174718558788,
-0.4603346586227417,
0.9558101892471313,
-0.8402367234230042,
-0.10236994177103043,
-0.30873551964759827,
0.049814388155937195,
-0.06981639564037323,
-0.2012762576341629,
-0.4042852520942688,
-0.15041324496269226,
0.6423754692077637,
0.10540441423654556,
-0.0801241248... |
def sectohms ( n ) : # get the hours portion hours = int ( n / 3600 ) n - = hours * 3600 # if less then 10 add a 0 ; for purely aesthetic purposes if hours < 10 : hours = " 0 " + str ( hours ) # get seconds portion seconds = int ( n / 60 ) n - = seconds * 60 # if less then 10 add a 0 ; for purely aesthetic purposes if ... | [
-0.15295739471912384,
0.23013940453529358,
0.6111879348754883,
-1.3348129987716675,
0.40554648637771606,
-0.4124429225921631,
-0.8225299715995789,
-1.0418399572372437,
-0.6053506731987,
0.5344175100326538,
-0.7608766555786133,
-0.879062831401825,
0.16459615528583527,
0.3205399811267853,
... |
def check _ width ( check _ bbox ) : wide = check _ bbox [ 1 ] - check _ bbox [ 0 ] if wide > 4 : failure ('this file is too many degrees wide for utm') return true | [
-0.21603265404701233,
1.1875808238983154,
0.6507691740989685,
0.35991042852401733,
0.7120500206947327,
-0.05351923033595085,
-0.05878724157810211,
0.3349248468875885,
-0.30787360668182373,
-1.0253300666809082,
0.9997192621231079,
-1.142106294631958,
-0.9531808495521545,
-0.0385622419416904... |
def human _ size ( bytes, width = 0, decimals = 2 ) : size = float ( bytes ) for unit in ['b ','kb ','mb ','gb ','tb ','pb ','eb'] : if size < 1000. 0 or unit = ='eb': break size / = 1000. 0 return " { 0 : { 1 }. { 2 } f } { 3 } ". format ( size, width, decimals, unit ) | [
0.16406939923763275,
-0.255916953086853,
0.6924765706062317,
-0.5573529601097107,
-0.3458351194858551,
0.07268298417329788,
-0.024923011660575867,
0.03631625697016716,
0.3040672242641449,
0.2747573256492615,
0.168582946062088,
-0.4938321113586426,
-0.13517285883426666,
-0.5842224359512329,... |
def wait _ cursor ( value, * * kwargs ) : if value : q. qapplication. setoverridecursor ( q. qcursor ( q. qt. waitcursor ) ) else : if q. qapplication. overridecursor ( ) is not none : q. qapplication. restoreoverridecursor ( ) if kwargs. get ( " force ", false ) : while q. qapplication. overridecursor ( ) is not none ... | [
0.2540588676929474,
-0.08709971606731415,
0.6566628813743591,
-0.23249776661396027,
-0.030009618028998375,
0.3001975417137146,
0.04564140737056732,
-0.237754225730896,
0.4088989794254303,
0.10575735569000244,
-0.46900346875190735,
0.6796831488609314,
-0.6302016377449036,
0.4972822964191437... |
def generate _ pdf ( self, fepdf, filepath ) : fepdf. crearfactura ( * * self. header ) # completo campos extra del header : fepdf. establecerparametro ( " localidad _ cliente ", self. header. get ( " localidad ", " " ) ) fepdf. establecerparametro ( " provincia _ cliente ", self. header. get ( " provincia ", " " ) ) #... | [
0.5978975296020508,
-0.3092854917049408,
0.4968767762184143,
-0.0038329334929585457,
1.0218366384506226,
0.3174103796482086,
0.15096819400787354,
0.38743969798088074,
-0.5149381160736084,
-0.4863635003566742,
0.10446545481681824,
0.04644553363323212,
0.1677245944738388,
-0.0225551500916481... |
def generate _ property _ schema ( prop, context, type _ weights ) : schema = translate ( prop. contract. spec, context ) if prop. has _ default : schema ['default'] = prop. default schema. update ( generate _ ui _ hints ( prop, context, type _ weights ) ) return schema | [
0.16256016492843628,
0.16669289767742157,
0.24104440212249756,
0.756938099861145,
0.8044066429138184,
-0.11513426899909973,
-0.5705185532569885,
0.40820178389549255,
0.13057224452495575,
0.383873850107193,
0.16139812767505646,
-0.9344055652618408,
-0.1011996641755104,
-1.5499604940414429,
... |
def decodingblock ( self, x, filter _ size, block, num = 1 ) : type ='decoding'if block > 1 : x = self. deconvolution ( x,'{ } _ block { } _ deconv { } '. format ( type, block, num ), type ='depool2d') #'unpool2d or depool2d'x = zeropadding2d ( padding = ( self. pad, self. pad ), name ='{ } _ block { } _ zpad { } '. fo... | [
-0.3494183123111725,
0.2493068128824234,
0.9281109571456909,
0.7050188183784485,
-1.281499981880188,
-0.06670699268579483,
0.06185883283615112,
-0.12535972893238068,
0.1046963483095169,
-0.6305747032165527,
-0.4513513743877411,
0.7624937891960144,
-0.18211516737937927,
0.20083320140838623,... |
def acceleration _ calc ( positions, mass, boxsize, r _ c ) : n _ particles = len ( positions ) a = np. zeros _ like ( positions ) for i in range ( n _ particles ) : for j in range ( i + 1, n _ particles ) : r = positions [ i, : ] - positions [ j, : ] # if any r > boxsize / 2, then there will be a closer particle. # th... | [
0.287462443113327,
-0.8282718062400818,
0.8155223727226257,
-0.37580832839012146,
-0.5429485440254211,
0.18335039913654327,
0.000682392215821892,
0.04100737348198891,
-0.602071225643158,
0.13894867897033691,
0.36693891882896423,
0.5118025541305542,
-0.6406853795051575,
0.8136907815933228,
... |
def _ test _ decision _ tree _ classification ( ) : folder _ name = ". " from os import listdir files = sorted ( [ file for file in listdir ( folder _ name ) if " csv " in file ] ) for file in files : print file, test _ decision _ tree _ classification ( file ) | [
0.2762284278869629,
-0.3293542265892029,
0.6643831729888916,
0.6688480377197266,
0.34899693727493286,
0.41666296124458313,
0.3088284432888031,
0.5921749472618103,
-0.3190993070602417,
0.2581634819507599,
0.062149833887815475,
0.9853233695030212,
0.46659210324287415,
1.3615187406539917,
-... |
def chain ( self, * attributes ) : for name in attributes : value = getattr ( self, name ) if isinstance ( value, iterable ) : yield from value else : yield value | [
-0.44117066264152527,
0.01523544080555439,
0.535371720790863,
0.7689957618713379,
0.3047191798686981,
0.6211949586868286,
-0.5140923261642456,
-0.5705389380455017,
-0.8054040670394897,
-0.37111935019493103,
0.2999873161315918,
0.6121892929077148,
-0.5898022651672363,
0.9723191261291504,
... |
def update _ profile ( model, payoff, attack _ profile, defense _ profile, attack _ policy, defense _ policy ) : n _ action = payoff. shape [ 0 ] # a new row and column will be added to the payoff matrix new _ payoff _ col = np. array ( [ ] ) new _ payoff _ row = np. array ( [ ] ) # first get the new column for i in ra... | [
0.14019201695919037,
-0.5089659690856934,
0.7655137777328491,
-0.23171541094779968,
0.5546582341194153,
0.1354237049818039,
-0.2027016580104828,
-0.6481422185897827,
0.0775250568985939,
0.9600116014480591,
-0.09578187763690948,
-0.1593242585659027,
0.20226459205150604,
-0.37594157457351685... |
def get _ download _ cache _ dir ( ) - > str : if cache _ dir : return cache _ dir return join ( config _ dir,'cache') | [
-0.2895926535129547,
-0.004304226953536272,
0.7690159678459167,
0.5782449245452881,
0.25806528329849243,
0.5171768665313721,
0.36652517318725586,
0.1769506186246872,
0.2838129699230194,
-0.4051379859447479,
0.6957023739814758,
0.899423360824585,
0.4379420876502991,
0.5474480390548706,
0.... |
def eval _ data ( self ) : return self. _ convert _ to _ list ( self. _ eval _ data ) | [
-1.0231400728225708,
-0.49831369519233704,
0.42120176553726196,
-0.5184697508811951,
0.4363117814064026,
0.7767783403396606,
-1.420220136642456,
0.9041799902915955,
0.3837724030017853,
0.1656797230243683,
-1.0883140563964844,
0.8170031905174255,
0.2665793001651764,
0.23750260472297668,
-... |
def twalke ( self ) : return self. twalk. output [ :, 1 ] | [
-1.428051233291626,
0.06184723228216171,
0.42048102617263794,
-0.0990113839507103,
1.0679442882537842,
-0.14193706214427948,
1.57453191280365,
-0.34659838676452637,
-0.5063950419425964,
-0.10991774499416351,
0.09000890702009201,
-1.372823715209961,
-0.17806604504585266,
0.33052200078964233... |
def _ installvboxonsolaris ( self ) : spkg = self. _ findfile ('^ virtualbox -. * \ \. pkg $ ', fmandatory = false ) ; if spkg is none : star = self. _ findfile ('^ virtualbox -. * - sunos -. * \ \. tar. gz $ ', fmandatory = false ) ; if star is not none : if self. _ maybeunpackarchive ( star ) is not true : return fal... | [
-0.10183684527873993,
-0.30654075741767883,
0.8437107801437378,
0.5311658382415771,
0.18339000642299652,
0.014886245131492615,
-0.29141107201576233,
0.23472455143928528,
0.5978968739509583,
0.22707754373550415,
-0.17029230296611786,
-0.12026204913854599,
-0.5094848871231079,
0.400012165307... |
def trunc ( scores, method ) : try : cut _ method = getattr ( np, method ) except notimplementederror : raise notimplementederror ( " module'numpy'has no function named'{ }'". format ( method ) ) scores = cut _ method ( scores ) return scores | [
0.03821568191051483,
-0.14000481367111206,
0.6512556672096252,
0.053089167922735214,
0.30417174100875854,
-0.2925904393196106,
0.8881071209907532,
-1.3917078971862793,
0.23518149554729462,
1.385942816734314,
0.599875271320343,
0.6173374056816101,
0.10043226927518845,
-0.45519834756851196,
... |
def get _ data ( symbols, dates ) : df = pd. dataframe ( index = dates ) if'spy'not in symbols : # add spy for reference, if absent symbols. insert ( 0,'spy') for symbol in symbols : df _ temp = pd. read _ csv ( symbol _ to _ path ( symbol ), index _ col ='date ', parse _ dates = true, usecols = ['date ','adj close'], ... | [
-0.5951104760169983,
1.1535693407058716,
0.6330165863037109,
-0.28375717997550964,
0.0963875949382782,
0.5123204588890076,
0.18702632188796997,
-0.14285223186016083,
0.1157289445400238,
-0.0588928759098053,
0.985567569732666,
0.984080970287323,
0.17178629338741302,
0.2963402271270752,
0.... |
def zip _ indexes ( self, mv _ dir : str, to _ dir : str, partial _ filename : str ='', recursive : bool = false, mkdir : bool = false ) - > int : t _ 0 = time ( ) mv _ dir, to _ dir = p. abspath ( mv _ dir ), p. abspath ( to _ dir ) if not p. isdir ( to _ dir ) and mkdir : os. mkdir ( to _ dir ) # gather all moving fi... | [
-1.0911719799041748,
0.19603684544563293,
0.8425555229187012,
0.35813501477241516,
-0.4439704418182373,
-0.17961682379245758,
1.0214482545852661,
0.6049585938453674,
-0.09691870957612991,
0.43756499886512756,
0.39485013484954834,
0.21592994034290314,
0.062118589878082275,
0.256289005279541... |
def test _ closure ( a ) : def x1 ( b ) : def x4 ( c ) : return c * b return x4 x2 = x1 ( a ) x3 = x2 ( 1. 0 ) return x3 | [
0.0036843311972916126,
-0.1267944723367691,
0.3959559500217438,
-0.08562517166137695,
-0.39827948808670044,
-0.27814364433288574,
1.2959017753601074,
-0.7156623601913452,
0.9296824932098389,
-0.5352597236633301,
0.3798142969608307,
-0.4415605068206787,
-0.5800422430038452,
-0.4499007463455... |
def allow ( ) : # print ('{ rabbitmqctl } set _ permissions - p { host } { user } ". * " ". * " ". * "'#. format ( * * rabbit _ env ) ) rabbit _ env [ " host " ] = get _ host ( ) rabbit _ env [ " user " ] = get _ user ( ) local ('{ rabbitmqctl } set _ permissions - p { host } { user } ". * " ". * " ". * " '. format ( *... | [
0.41819900274276733,
-0.09931111335754395,
0.7646476030349731,
0.34284475445747375,
0.09732478857040405,
0.5694725513458252,
0.0461956225335598,
0.8131872415542603,
-1.196341633796692,
0.17112202942371368,
0.07899510860443115,
2.041743278503418,
-1.0807632207870483,
0.36259064078330994,
... |
def unders _ to _ dashes _ in _ keys ( self ) - > none : for key _ node, _ in self. yaml _ node. value : key _ node. value = key _ node. value. replace ('_ ','-') | [
-1.0551390647888184,
-0.2498064488172531,
0.7192656397819519,
-0.9060893654823303,
0.08696037530899048,
-0.25111329555511475,
-0.8121061325073242,
0.8536052107810974,
-1.0778449773788452,
-0.24215711653232574,
-0.8767256736755371,
1.0442146062850952,
1.5865164995193481,
1.3531498908996582,... |
def test _ change _ artifact _ dep _ setting ( self ) : pass | [
-0.17181065678596497,
0.7216477394104004,
0.1604633331298828,
0.17582345008850098,
-0.022561371326446533,
-0.16598542034626007,
2.0682597160339355,
-0.4489307105541229,
0.061739131808280945,
0.2354942262172699,
-1.0908453464508057,
0.13535557687282562,
0.4887925386428833,
-0.17570649087429... |
def retrieve _ input ( ) : input = " " for line in sys. stdin : input + = line return input | [
0.1474798619747162,
-0.5034915804862976,
0.40696918964385986,
0.3264826238155365,
0.5514559149742126,
0.5115853548049927,
-0.023134056478738785,
-0.40140146017074585,
0.19520729780197144,
-1.6241868734359741,
0.28831666707992554,
0.49573948979377747,
-0.5401198863983154,
-0.109015218913555... |
def display _ legends ( self, * legends ) : for legend in legends : leg = self. _ legends. get ( legend ) if not self. legend _ is _ displayed ( leg ) : self. browser. click ( leg ) | [
0.12208231538534164,
0.06442418694496155,
0.23272763192653656,
0.26558712124824524,
0.48013174533843994,
0.5675560832023621,
-0.13864542543888092,
-0.2079809159040451,
0.200460746884346,
0.3361072838306427,
0.39754414558410645,
-0.12580646574497223,
-0.017213089391589165,
0.793808996677398... |
def load _ faces ( ) : try : global known _ face _ encodings global known _ face _ names known _ face _ encodings = [ ] dirpath = f'{ os. getcwd ( ) } / faces /'if len ( f'{ os. getcwd ( ) } / faces') = = 0 : no _ image = label ( root, text = " no image to load " ) no _ image. grid ( column = 1, row = 0 ) for image in ... | [
-0.6035358309745789,
0.116508848965168,
0.7637510895729065,
0.5088661909103394,
-0.299256831407547,
-0.09757531434297562,
0.5720166563987732,
-0.13389632105827332,
-0.293333500623703,
-0.027632875367999077,
-0.613031804561615,
-0.34399649500846863,
0.19434687495231628,
1.5175384283065796,
... |
def is _ empty ( self ) : return self. _ size = = 0 | [
-0.856982946395874,
-0.5038521885871887,
0.34046828746795654,
0.0652323067188263,
1.3708069324493408,
0.445568323135376,
-0.34574034810066223,
-0.3255392909049988,
0.03523397445678711,
-0.12923982739448547,
-0.6769431829452515,
0.2857980728149414,
-0.5192720293998718,
0.15108685195446014,
... |
def waitforacquisitiontimeout ( timeout _ ms ) : return none | [
0.5997378826141357,
-0.8158797025680542,
0.08675111830234528,
-0.06905955821275711,
0.31622961163520813,
-0.022242166101932526,
-0.08812740445137024,
0.8484930992126465,
0.19975076615810394,
-0.21517710387706757,
0.8989256620407104,
-0.21434544026851654,
0.5914939045906067,
-0.746580541133... |
def addpaint ( self, pigment ) : self. painted _ colors. append ( pigment ) | [
-0.05171480029821396,
-0.5937065482139587,
0.4036162197589874,
-0.9181573987007141,
0.7520179748535156,
1.3022618293762207,
-0.9652549028396606,
0.402399480342865,
0.704351544380188,
-1.4635403156280518,
-0.5457597970962524,
1.0773344039916992,
-1.5222872495651245,
0.3681962192058563,
-0... |
def _ _ init _ _ ( self, address, username, password, loop = none ) : self. address = address self. username = username self. password = password self. logged _ in = false self. loop = loop or asyncio. get _ event _ loop ( ) self. actions = none self. _ private _ key = none self. _ cookie = none self. _ auth _ token = ... | [
-0.605827808380127,
0.22807419300079346,
0.592490553855896,
0.5883066058158875,
-0.6523354053497314,
-0.5809451937675476,
0.13683320581912994,
0.13075050711631775,
0.5886832475662231,
0.45754241943359375,
-0.5337855219841003,
0.9785816073417664,
0.10193666070699692,
-0.0621660016477108,
... |
def sector ( self, sector ) : self. _ sector = sector | [
-0.26932045817375183,
-1.0268903970718384,
0.06368514150381088,
0.08364249765872955,
-0.009618976153433323,
1.1135032176971436,
0.6369113922119141,
-0.09240113943815231,
0.1176811084151268,
-0.5513238310813904,
-1.0170150995254517,
-0.39515599608421326,
0.21360556781291962,
0.2308086603879... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.