text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def unregister ( cls, actor _ ref ) : with cls. _ actor _ refs _ lock : if actor _ ref in cls. _ actor _ refs : cls. _ actor _ refs. remove ( actor _ ref ) | [
-0.7379873394966125,
-0.5170876383781433,
0.21142379939556122,
-0.803589403629303,
-0.17977367341518402,
-0.38706254959106445,
1.047143578529358,
0.23324143886566162,
0.3734046220779419,
0.3214273154735565,
-0.3165224492549896,
1.366371989250183,
-0.49361279606819153,
0.8014194369316101,
... |
def modifyquery ( query, rem = none, add = none, set = none, delim ='&') : rem = list ( rem or [ ] ) add = list ( add or [ ] ) set = list ( set or [ ] ) # parse query string query _ dict = ( isinstance ( query, dict ) and [ query. copy ( ) ] or [ parsequery ( query ) ] ) [ 0 ] # append set list to rem and add rem. exte... | [
-0.47060415148735046,
-0.23072491586208344,
0.7202714085578918,
-0.469146728515625,
-1.0888506174087524,
-0.07855221629142761,
-1.4195367097854614,
0.2831331789493561,
0.6373335719108582,
0.3992772400379181,
0.8277907967567444,
0.49150699377059937,
-0.10999829322099686,
-0.3960335552692413... |
def num _ classes ( self ) : if self. _ classes is not none and self. _ num _ classes is not none : if len ( self. _ classes )! = self. _ num _ classes : raise exception ('the number of classes passed in must be the same as the number of classes'' in the data.') return self. _ num _ classes | [
-0.7117784023284912,
0.9603150486946106,
0.4225945472717285,
0.003498039674013853,
0.6593642234802246,
0.3347757160663605,
0.09049060195684433,
-0.23459267616271973,
0.7187240123748779,
-1.053820252418518,
-0.05186431482434273,
-0.23602557182312012,
-0.21221931278705597,
0.1931766271591186... |
def testencryption ( self ) : key, data = symmetric _ encrypt ( [ 1, 2, 3 + 2j ] ) base64. decodestring ( key ) base64. decodestring ( data ) self. failunlessequal ( symmetric _ decrypt ( key, data ), [ 1, 2, 3 + 2j ] ) | [
-0.48337340354919434,
1.1757954359054565,
0.25922343134880066,
0.5196607708930969,
0.7888870239257812,
-1.1440250873565674,
0.39927905797958374,
-0.13399070501327515,
0.09914128482341766,
0.33090609312057495,
-1.2043427228927612,
-0.0764375850558281,
-0.6280355453491211,
-0.550164997577667... |
def process _ args ( args _ cmd, info ) : usage = " % prog ( - ffile or - ddir or - llist _ file ) [ options ] " arg _ parser = optionparser ( usage = usage, description = description ) arg _ parser. add _ option ( " - d ", " - - dir ", dest = " dir ", help = " recurse from directory < dir > and create pdfs for all xml... | [
0.13315878808498383,
-0.4658912718296051,
1.113659143447876,
-0.34056591987609863,
0.41228601336479187,
0.2322985827922821,
0.4385286271572113,
0.3287394046783447,
-0.04961884394288063,
-0.02760106511414051,
0.6013988852500916,
0.11549984663724899,
0.5331900715827942,
0.6641595363616943,
... |
def formatter ( self, text, filler = " ", centered = true, indented = false ) : output = " " if indented : input _ text = " " + text. strip ( ) + " " else : input _ text = " " + text. strip ( ) + " " if len ( input _ text. strip ( ) ) < = 0 : input _ text = " " if len ( input _ text ) > self. max _ cols : input ( f " f... | [
0.25521159172058105,
-0.016916144639253616,
0.6449440717697144,
0.06227416917681694,
-1.2538760900497437,
-0.454345703125,
-0.997765839099884,
0.6242567896842957,
0.07450324296951294,
-0.3746517598628998,
0.3227042853832245,
0.005164260044693947,
-0.4470464885234833,
0.9448370933532715,
... |
def sequence _ to _ valued _ intervals ( note _ sequence, min _ midi _ pitch = 21, max _ midi _ pitch = 108, restrict _ to _ pitch = none ) : intervals = [ ] pitches = [ ] velocities = [ ] for note in note _ sequence. notes : if restrict _ to _ pitch and restrict _ to _ pitch! = note. pitch : continue if note. pitch < ... | [
-0.2604028284549713,
-0.02061816304922104,
0.4022064208984375,
0.3705253005027771,
0.13917289674282074,
-0.3372963070869446,
0.48332348465919495,
-0.24355211853981018,
-0.4748777449131012,
0.6520317196846008,
-0.6827188730239868,
0.6212961673736572,
-0.29056939482688904,
-0.824190199375152... |
def is _ on _ curve ( self, point ) : x, y = point. x, point. y return ( pow ( y, 2, self. p ) - pow ( x, 3, self. p ) - self. a * x - self. b ) % self. p = = 0 | [
0.15832984447479248,
-0.6905616521835327,
0.5706303715705872,
0.7085358500480652,
-0.0717117190361023,
0.9567513465881348,
-0.8712104558944702,
0.13700850307941437,
1.1159566640853882,
0.4485284686088562,
-0.4514632821083069,
0.30198997259140015,
-0.6096395254135132,
-0.23166821897029877,
... |
def add _ pending _ job ( job _ id, job _ key, job _ type, api _ key, data = none, metadata = none, result _ url = none ) : if not data : data = { } data = json. dumps ( data ) # turn strings into unicode to stop sqlalchemy # " unicode type received non - unicode bind param value " warnings. if job _ id : job _ id = un... | [
-1.05367910861969,
0.13141970336437225,
0.8270098567008972,
-0.24413561820983887,
-0.02408183366060257,
-0.18359380960464478,
-0.9284613132476807,
0.3759152293205261,
-1.0145968198776245,
0.21275632083415985,
-0.1158447191119194,
0.09738907217979431,
-0.212311789393425,
0.5286242365837097,... |
def get _ new _ target ( self, line0, target _ session, target ) : last _ target = list ( ) if len ( target _ session ) > 0 : last _ target = target _ session [ - 1 ] else : last _ target = target line0 = str. lower ( line0 ) datl = len ( self. da _ types ) prefix = target [ 0 : datl ] last _ target = last _ target [ d... | [
-0.23537065088748932,
-0.9535291790962219,
0.824984073638916,
-0.8330421447753906,
-0.17635035514831543,
-0.8902808427810669,
0.034878674894571304,
0.4594772160053253,
-0.10065452754497528,
0.3514805734157562,
0.18672692775726318,
0.7657439708709717,
0.45562130212783813,
0.3391108214855194... |
def _ _ closebuttonclicked ( self ) : self. vm. closeeditorwindow ( self. currentwidget ( ). geteditor ( ) ) | [
0.5152199864387512,
-0.9825478792190552,
0.25688406825065613,
-0.40271225571632385,
-0.8967041969299316,
0.7883648872375488,
0.4935627579689026,
0.4526231586933136,
-0.5264909267425537,
0.050803620368242264,
1.152099847793579,
-0.12624865770339966,
-0.727591335773468,
0.768878161907196,
... |
def extract _ ids ( self, dataset, node ) : id _ dictionary = dict ( ) id _ dictionary [ dataset _ id ] = dataset. id _ dictionary [ id ] id _ dictionary [ drs _ id ] = dataset. id _ dictionary [ drs _ id ] id _ dictionary [ id ] = dataset. id _ dictionary [ drs _ id ] + dot + self. file _ name id _ dictionary [ instan... | [
-0.6937783360481262,
-0.34881094098091125,
0.455742210149765,
-2.17470383644104,
-0.10025133192539215,
-0.5033041834831238,
-0.46240511536598206,
0.5029650926589966,
-0.19981220364570618,
0.09617606550455093,
-0.5425320863723755,
0.6120785474777222,
0.5376054644584656,
0.13459263741970062,... |
def write _ data ( self, vid _ data ) : if not self. hdf5 _ path : raise filenotfounderror ('hdf5 filepath is missing') if not self. dataset _ id : raise filenotfounderror ('dataset id is missing') session. write _ hdf5 ( self. hdf5 _ path, self. dataset _ id, vid _ data ) | [
-0.6061354875564575,
-1.1608937978744507,
0.15363456308841705,
0.7604740262031555,
0.7735126614570618,
0.19464276731014252,
0.36265841126441956,
0.22287431359291077,
0.7875876426696777,
-0.06411782652139664,
-0.29707953333854675,
0.686587929725647,
-0.34973862767219543,
0.11425677686929703... |
def display _ version ( ) : verline = " # terabee multiple counting v { } # ". format ( mpc. _ _ version _ _ ) print ( " # " * len ( verline ) ) print ( verline ) print ( " # " * len ( verline ) ) | [
1.1053386926651,
-0.8986688256263733,
0.619498610496521,
-0.2014508694410324,
0.5888571739196777,
0.48427751660346985,
0.9991413950920105,
0.34460678696632385,
-0.6082031726837158,
0.80256587266922,
-0.6330586671829224,
0.9403447508811951,
0.2275906205177307,
0.8189862370491028,
0.440411... |
def orient _ correctly ( tiles ) : # start at the top left, i know that correct orientation # then just move along the line until they are all in the right orientation correct = dict ( ) for j in range ( 12 ) : for i in range ( 12 ) : if ( i, j ) = = ( 0, 0 ) : # base case, initial top left needs to rotate once correct... | [
-0.44610655307769775,
-0.3262937366962433,
0.5253983736038208,
-0.3369823098182678,
-0.4406439960002899,
-0.5003365278244019,
0.5961064100265503,
-0.7630200982093811,
-0.20468191802501678,
0.2132154256105423,
-0.29408204555511475,
-0.9218971729278564,
-0.9340169429779053,
0.044902358204126... |
def is _ equal ( results1, results2, name = none, tols = tols, indent ='' ) : if not isinstance ( results1, dict ) : results1 = { name : results1 } if not isinstance ( results2, dict ) : results2 = { name : results2 } result _ types = sorted ( set ( results1. keys ( ) ) & set ( results2. keys ( ) ) ) tolerances = { res... | [
-0.06367235630750656,
-0.06618194282054901,
1.0918197631835938,
0.22600650787353516,
-0.4666542112827301,
0.11831216514110565,
0.5447221398353577,
-0.5805596709251404,
-0.14221136271953583,
0.6100580096244812,
-0.353179007768631,
-0.01332852989435196,
-0.1338118314743042,
0.065687336027622... |
def get _ ibnresnet ( blocks, model _ name = none, pretrained = false, root = os. path. join ( " ~ ", ". torch ", " models " ), * * kwargs ) : if blocks = = 50 : layers = [ 3, 4, 6, 3 ] elif blocks = = 101 : layers = [ 3, 4, 23, 3 ] elif blocks = = 152 : layers = [ 3, 8, 36, 3 ] else : raise valueerror ( " unsupported ... | [
0.0950261652469635,
-0.001983721973374486,
0.8012195229530334,
0.4950261414051056,
-0.03108268789947033,
-0.5554111003875732,
0.09113917499780655,
-0.41185009479522705,
-0.07572071254253387,
-0.4735884964466095,
-0.48811614513397217,
0.658706545829773,
-0.6495668888092041,
-0.3781704306602... |
def test _ add _ new _ post ( self ) : with app. test _ client ( ) as client : d = { " title " : " testpost2 ", " content " : " test case for adding a new post ", " user _ id " : self. user _ id } resp = client. post ( f'/ users / { self. user _ id } / posts / new ', data = d, follow _ redirects = true ) html = resp. g... | [
0.570129930973053,
0.5760030746459961,
0.4074251651763916,
0.9413352608680725,
0.551470160484314,
0.7426861524581909,
-0.4977661073207855,
-0.2206033170223236,
-0.021377673372626305,
-0.8543639183044434,
0.07355371862649918,
0.3559868633747101,
-0.07193467766046524,
0.7017085552215576,
-... |
def test _ cant _ create _ branch _ missing _ or _ invalid _ params ( self ) : json _ response = api _ call ( self, " post ", " / branch / create ", dict ( ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 400 ) self. assertequal ( json _ response [ " message " ], " missing city " ) json _ respo... | [
-0.03403901308774948,
-0.049708496779203415,
1.1027202606201172,
0.12357911467552185,
0.46586692333221436,
0.9637005925178528,
0.00643609743565321,
-0.16003058850765228,
-0.7757110595703125,
-0.20086751878261566,
-0.8589614033699036,
0.05683102086186409,
-0.4954157769680023,
0.855925858020... |
def write _ dp ( self, addr, value, to _ ap = 0 ) : cmd = 0x81 cmd = cmd | to _ ap < < 1 cmd = cmd | ( addr & 0b1100 ) < < 1 cmd = self. _ apply _ dp _ parity ( cmd ) self. write ( cmd. to _ bytes ( 1, byteorder = " little " ) ) status = 0 for i in range ( 3 ) : status + = ord ( self. read _ bit ( ) ) < < i self. clock... | [
-0.6977376341819763,
0.7472676038742065,
0.9591576457023621,
0.43435442447662354,
-0.22531767189502716,
-0.1806049644947052,
0.1191362738609314,
-0.14332431554794312,
1.1494383811950684,
0.7079831957817078,
0.456117182970047,
-0.2804845869541168,
-0.39730408787727356,
-0.17528197169303894,... |
def get _ provider ( self, type _ : type [ _ abstractconfigurationprovider ] ) - > optional [ _ abstractconfigurationprovider ] : return self. _ providers. get ( type _ ) | [
-0.8802760243415833,
0.33310770988464355,
0.21198424696922302,
-0.07755593955516815,
0.10877383500337601,
0.19047550857067108,
0.0629694014787674,
-1.1098824739456177,
0.7642079591751099,
0.6774960160255432,
0.2677362263202667,
-0.006176464259624481,
0.06283384561538696,
0.2580907046794891... |
def create _ bch _ connection ( ) : access = authserviceproxy ( " http : / / bitcoincashrpc : 12345678 @ 39. 104. 231. 49 : 2300 " ) return access | [
0.3738131523132324,
-0.2669393718242645,
0.5116440653800964,
-0.7085208892822266,
0.16178618371486664,
-0.18192656338214874,
-0.19803589582443237,
0.4765346944332123,
-0.39303043484687805,
-0.7534469366073608,
0.14466533064842224,
0.3736623227596283,
-1.5972046852111816,
-0.587887704372406... |
def raw _ countries _ statistics ( ) : countries = pd. read _ sql ( " select * from country ", getdata. conn ) print ( countries. isnull ( ). sum ( ) ) print ( countries. describe ( ) ) for index, row in countries. iterrows ( ) : print ( type ( row ['id'] ) ) print ( countries. dtypes ) | [
-0.011547005735337734,
0.8140261173248291,
0.5196247696876526,
-0.198042094707489,
0.3624444603919983,
0.3784968852996826,
0.24777288734912872,
-0.8057441115379333,
-0.39661654829978943,
-0.32378578186035156,
0.21028219163417816,
0.42298808693885803,
0.8862382769584656,
-0.0748833864927291... |
def validate _ error _ event _ attributes ( required _ params = { }, forgone _ params = { }, exact _ attrs = { } ) : error _ data _ samples = [ ] @ function _ wrapper def _ validate _ wrapper ( wrapped, instance, args, kwargs ) : @ transient _ function _ wrapper ('newrelic. core. stats _ engine ','statsengine. record _... | [
-0.6147837042808533,
-0.14317134022712708,
0.7820606827735901,
-0.10850003361701965,
-0.15623807907104492,
-0.021433765068650246,
0.013689117506146431,
-0.45071977376937866,
-0.3555396497249603,
0.6321439146995544,
-0.07085995376110077,
0.2483506053686142,
0.6620281338691711,
0.52367347478... |
def _ _ repr _ _ ( self ) : return " t ( { }, p ) ". format ( self. x ) | [
-0.5944072008132935,
-1.1833933591842651,
0.5360885262489319,
-2.0485174655914307,
-0.520332932472229,
0.7812841534614563,
-0.9310776591300964,
-0.024591999128460884,
0.07668615877628326,
1.4915053844451904,
-0.08226961642503738,
0.2669711410999298,
0.6273927688598633,
-1.1208566427230835,... |
def _ discretize ( target, num _ bins ) : discretized = np. zeros _ like ( target ) for i in range ( target. shape [ 0 ] ) : discretized [ i, : ] = np. digitize ( target [ i, : ], np. histogram ( target [ i, : ], num _ bins ) [ 1 ] [ : - 1 ] ) return discretized | [
-0.006583609618246555,
0.5077096819877625,
0.4567335546016693,
0.009850953705608845,
0.6802311539649963,
-0.4755038917064667,
0.15488667786121368,
0.4123326539993286,
0.8039772510528564,
-0.1742047667503357,
-0.028835246339440346,
0.8257107138633728,
0.4569348990917206,
-0.0792002454400062... |
def tai2utc ( tai ) : date _ tai = time ( tai - epoch _ diff - 19. 0, format ='gps ', scale ='tai') d = time ( date _ tai, format ='isot ', scale ='utc') return d. isot | [
-0.7353512644767761,
-0.6738358736038208,
0.7299525737762451,
-1.0106197595596313,
0.037905655801296234,
0.2520351707935333,
0.9848663210868835,
-0.8646328449249268,
0.23888546228408813,
0.45112845301628113,
0.7141042947769165,
-0.6859174966812134,
1.26590895652771,
-0.8912191987037659,
... |
def tab ( tab _ name, element _ list = none, section _ list = none ) : _ tab = {'type':'tab ','title': tab _ name, } if element _ list is not none : if isinstance ( element _ list, list ) : _ tab ['elements'] = element _ list else : _ tab ['elements'] = [ element _ list ] if section _ list is not none : if isinstance (... | [
-0.42716899514198303,
-0.45086100697517395,
0.47357377409935,
-0.09663493931293488,
-0.4174489974975586,
0.3381953835487366,
-0.7557200789451599,
0.5113533139228821,
-0.43082699179649353,
0.08087731897830963,
-0.7566861510276794,
0.02910502441227436,
0.40858587622642517,
0.2936695218086242... |
def send _ to _ prediction _ as _ is ( peptides _ file ) : input _ file = peptides _ file path _ to _ save = os. path. join ( main _ path, " output ",'' ) output _ file = os. path. join ( path _ to _ save, " prediction. txt " ) hla _ str ='hla - a01 : 01, hla - a02 : 01, hla - a03 : 01, hla - a24 : 02, hla - a26 : 01, ... | [
0.11163825541734695,
-0.5176320672035217,
0.6488274335861206,
-0.0663093775510788,
-0.1861460953950882,
0.20634405314922333,
1.060437560081482,
-0.15850049257278442,
-1.010023593902588,
0.5283129811286926,
-0.35407671332359314,
0.18169938027858734,
-0.27951595187187195,
-0.0445411875844001... |
def solve _ filter ( expr, vars ) : lhs _ values, _ = _ _ solve _ for _ repeated ( expr. lhs, vars ) def lazy _ filter ( ) : for lhs _ value in repeated. getvalues ( lhs _ values ) : if solve ( expr. rhs, _ _ nest _ scope ( expr. lhs, vars, lhs _ value ) ). value : yield lhs _ value return result ( repeated. lazy ( laz... | [
-0.5193427205085754,
0.25783613324165344,
0.5087891817092896,
0.023212933912873268,
-0.14864960312843323,
-0.9226656556129456,
-0.1602528840303421,
-0.3002215027809143,
-0.4752461612224579,
-0.0924314334988594,
-0.5635279417037964,
0.5535500049591064,
0.20891839265823364,
0.423687994480133... |
def test _ compare _ pyspec _ to _ matspec _ clean ( get _ matlab _ data _ clean, get _ python _ data _ clean, set _ tolerance ) : mat = get _ matlab _ data _ clean py = get _ python _ data _ clean tol = set _ tolerance bb _ spec = py. loc [ :, : 480 ] bb _ spec = mat. loc [ :, : 480 ] error = np. array ( abs ( bb _ sp... | [
0.3342193067073822,
-0.32842645049095154,
0.4478762149810791,
-0.44040802121162415,
0.9590340256690979,
0.918135404586792,
-0.02348056249320507,
-0.7906991839408875,
0.2603701055049896,
0.3944019675254822,
-0.1669890135526657,
0.7074082493782043,
0.4046842157840729,
-0.20040424168109894,
... |
def create _ extension _ proxy ( loader, extension ) : return extensionproxyloader ( loader, extension ) | [
0.9575666785240173,
-0.3635193705558777,
0.23184707760810852,
0.15906719863414764,
-1.2406086921691895,
-0.00523313507437706,
-1.4431880712509155,
-0.4637032747268677,
0.3011373281478882,
0.40404948592185974,
-0.28662779927253723,
0.17103548347949982,
-0.597160816192627,
-0.237962990999221... |
def match ( results, expected ) : for result in results : result. pop ('data') return results = = expected | [
-0.15325768291950226,
0.07220008969306946,
0.4362216591835022,
0.33406132459640503,
0.2550012469291687,
-0.13741102814674377,
-0.8287493586540222,
0.49956557154655457,
-0.07237190008163452,
-0.20999042689800262,
-0.4847923517227173,
-0.6222062706947327,
-0.8846245408058167,
-0.807030737400... |
def display _ full _ df ( df : pd. dataframe | pd. series, # ` dataframe ` or ` series ` to display ) : if is _ type ( df, pd. dataframe, raise _ error = false ) or is _ type ( df, pd. series, raise _ error = false ) : with pandas _ nrows _ ncols ( ) : display ( df ) else : raise typeerror ( f " df must me a pandas ` d... | [
0.11529908329248428,
1.2325862646102905,
0.6161606311798096,
0.4821471869945526,
-0.4186793267726898,
-0.09833413362503052,
0.7586160898208618,
-0.6781328916549683,
0.9192443490028381,
-0.24842196702957153,
0.8572484850883484,
0.6475726366043091,
0.4896555244922638,
0.23791305720806122,
... |
def get _ run _ id _ keys ( json _ results, run _ id _ list ) : run _ id _ keys = { } for run _ id in run _ id _ list : for key in json _ results : if run _ id in key : if run _ id not in run _ id _ keys : run _ id _ keys [ run _ id ] = key break return run _ id _ keys | [
-0.784389078617096,
-0.7294416427612305,
0.31522423028945923,
-0.1719856858253479,
0.1541736125946045,
-0.3794080913066864,
-0.39289408922195435,
-0.784248411655426,
-0.6983411312103271,
0.8571131229400635,
-0.890815019607544,
0.686255156993866,
-0.8117637634277344,
0.4822222590446472,
0... |
def deleteemptydirs ( pathname, topdirname ) : head, tail = os. path. split ( pathname ) while ( head! = topdirname ) and not os. listdir ( head ) : assert head. startswith ( topdirname ) #, topdirname + " < < > > " + head # subprocess. check _ call ( ( " rm ", " - r ", head ) ) # delete empty directory os. rmdir ( hea... | [
-0.5286204814910889,
-0.1366623491048813,
0.7111185789108276,
0.17529553174972534,
0.13205714523792267,
0.26737701892852783,
0.7798694372177124,
-0.40902844071388245,
1.1187039613723755,
-0.4145403504371643,
0.0685994029045105,
0.4031659960746765,
-0.3596307039260864,
0.47772783041000366,
... |
def test _ rununtilfailure ( self ) : result = self. runner. rununtilfailure ( self. test ) self. assertequal ( result. testsrun, 1 ) self. assertfalse ( result. wassuccessful ( ) ) self. assertequal ( self. _ getfailures ( result ), 1 ) | [
-0.640893280506134,
0.5811585187911987,
0.24877461791038513,
0.35912075638771057,
0.40643537044525146,
0.5595913529396057,
0.3721655011177063,
-0.2535640001296997,
-0.3514212667942047,
-1.5071676969528198,
-1.079829216003418,
-0.3914850056171417,
-0.995169460773468,
0.4168820083141327,
1... |
def test _ booking _ history _ list _ by _ user ( self ) : another _ user = baker. make _ recipe ('booking. user') baker. make _ recipe ('booking. booking ', user = another _ user, event = self. past _ booking. event ) # check there are now 3 bookings self. assertequal ( booking. objects. all ( ). count ( ), 3 ) self. ... | [
-0.48006922006607056,
1.2920787334442139,
0.48890483379364014,
1.4778627157211304,
-0.7428019046783447,
1.0300220251083374,
0.3888389766216278,
0.9386848211288452,
0.07134056836366653,
-0.328396201133728,
-0.384868323802948,
-0.202448770403862,
0.053390346467494965,
0.4188019335269928,
0... |
def bitwisexor ( a, b ) : return a ^ b | [
0.5830524563789368,
0.4279368817806244,
0.5116168260574341,
-0.0025914828293025494,
-0.5708873867988586,
-0.17684602737426758,
-1.7467344999313354,
-0.6589359641075134,
-0.46944063901901245,
-0.1266280710697174,
0.5117910504341125,
0.4340676963329315,
0.02228155918419361,
-1.38021826744079... |
def feh ( self, save = false, noratio = false ) : # pull in fitted abundances from tfit lines = [ 6300, 6587 ] nel = len ( lines ) flags = ['dn ','dk'] binmin = - 0. 5 binwid = 0. 1 nbins = 11 qtype = [ ('abund ', float ), ('feh ', float ), ('staterrlo ', float ), ('staterrhi ', float ), ('pop _ flag ','| s10') ] bins ... | [
0.12866929173469543,
0.0060998122207820415,
0.7132174372673035,
0.02119469828903675,
-0.7588657140731812,
0.593795120716095,
0.18271850049495697,
-0.13995791971683502,
-0.22848418354988098,
-0.3983740210533142,
0.009423762559890747,
1.052241325378418,
0.6791601181030273,
0.9223072528839111... |
def datatable _ columns ( self ) : return self. _ datatable _ columns | [
-0.2462744414806366,
-0.09614311903715134,
0.044703926891088486,
-0.09150546789169312,
0.34160375595092773,
0.47993582487106323,
0.642184853553772,
-0.8731594681739807,
-0.5818069577217102,
-0.7600873112678528,
-1.8533059358596802,
0.563957691192627,
1.0524269342422485,
-0.744539737701416,... |
def _ _ init _ _ ( self, name ) : self. name = name self. children = [ ] self. fathers = [ ] self. commname = [ ] self. subclasses = [ ] self. gs = [ ] self. cplst = [ ] self. inpath = [ ] | [
-0.021010033786296844,
-0.26345282793045044,
0.4579704701900482,
-0.43636003136634827,
-0.43120986223220825,
0.15450850129127502,
0.18333186209201813,
-0.3430445194244385,
0.012589745223522186,
-0.41778549551963806,
-1.6732560396194458,
-0.06705131381750107,
-0.5923868417739868,
1.51659846... |
def get _ transform ( opt, grayscale = true, convert = true, resize = true ) : transform _ list = [ ] if convert : transform _ list + = [ transforms. totensor ( ) ] return transforms. compose ( transform _ list ) | [
-1.4277857542037964,
1.1103246212005615,
0.331906795501709,
0.4148765504360199,
0.6191933155059814,
-0.8341565132141113,
-0.20114246010780334,
-0.7574077248573303,
0.8120406866073608,
0.8746245503425598,
-0.7131598591804504,
-0.10026495158672333,
-0.5521501898765564,
-0.5315220355987549,
... |
def _ run _ and _ validate ( masks, out _ param : str, list _ files : bool, * * conf ) : # read dir contents mask _ list = masks if type ( masks ) is list else [ masks ] expected = set ( ) for mask in mask _ list : # files only if list _ files : expected | = { f for f in iglob ( mask ) if path. isfile ( f ) } # dirs on... | [
-0.7324100732803345,
-0.5043176412582397,
0.6358384490013123,
0.9403151273727417,
0.1859493851661682,
0.13026240468025208,
0.7086252570152283,
0.34657901525497437,
-0.351868212223053,
-0.26844894886016846,
0.08952566236257553,
0.1023273766040802,
0.07648766040802002,
0.4666455388069153,
... |
def xor _ strings ( a : str, b : str ) - > str : min _ length = min ( len ( a ), len ( b ) ) res = " " for index in range ( min _ length ) : res + = hex ( int ( a [ index ], 16 ) ^ int ( b [ index ], 16 ) ) [ 2 : ] return res | [
0.7899307608604431,
0.20061299204826355,
0.8003677725791931,
-0.7809731364250183,
-0.26574239134788513,
-0.19263309240341187,
-1.5601134300231934,
0.17372164130210876,
-0.24347276985645294,
1.0222214460372925,
0.2986566424369812,
0.37417498230934143,
-0.21023690700531006,
-1.50704431533813... |
def check _ validate ( self ) - > bool : try : self. validate _ username ( self. username ) self. validate _ password ( self. password ) return true except validationerror : return false | [
-0.5395252704620361,
-0.12271054834127426,
0.7348620295524597,
1.0438017845153809,
-0.23529845476150513,
0.7212030291557312,
-0.1698286533355713,
0.3371358811855316,
-0.6420276761054993,
-0.3158012926578522,
0.43763265013694763,
-0.7261168956756592,
-0.7911891937255859,
0.44089770317077637... |
def make _ footer ( title : str = none, year ='2021 ', git _ repo ='https : / / github. com / sinahmr / prof - publications') - > str ( ) : title = " professors \'publications finder " if not title else title git _ repo = f'< a target = " _ blank " class = " w3 - text - red w3 - right " href = { git _ repo } > github <... | [
0.07974009215831757,
0.4961868226528168,
0.599309504032135,
-0.04930626228451729,
-0.08968503028154373,
0.6656994819641113,
-0.6612861156463623,
0.1581035554409027,
0.13573667407035828,
0.028847459703683853,
0.9887369871139526,
0.06998424232006073,
-0.11040717363357544,
0.45289626717567444... |
def parse _ column _ definition ( definition : str ) - > t. list [ t. callable ] : res = [ ] col = 0 while col < len ( definition ) : try : cell = _ cells [ definition [ col ] ] col + = 1 except keyerror : avail = ', '. join ( _ cells. keys ( ) ) msg = f " can't find a cell definition for'{ definition [ col ] }'at pos ... | [
-0.29007118940353394,
0.04685341566801071,
0.6760802865028381,
0.8473221063613892,
0.4079262316226959,
-0.870206892490387,
-0.16543073952198029,
0.029567312449216843,
-0.579209566116333,
0.3386732339859009,
-0.8601000905036926,
-0.04102790355682373,
0.21876181662082672,
0.5657990574836731,... |
def create _ key _ pair ( self, context, algorithm, length, expiration = none, name = none ) : if algorithm. lower ( )! ='rsa': raise notimplementederror ( " vaultkeymanager only implements rsa keys " ) priv _ key = rsa. generate _ private _ key ( public _ exponent = 65537, key _ size = length, backend = default _ back... | [
-0.09040407091379166,
-0.09511607885360718,
0.5199265480041504,
-0.1665177047252655,
-0.2986462414264679,
0.3456772267818451,
-0.998460590839386,
-0.47523173689842224,
-0.10389122366905212,
0.5191375613212585,
-0.7493128776550293,
0.27973946928977966,
-0.46494925022125244,
0.59148371219635... |
def matmul _ plus _ bias ( x, num _ proj, scope, reuse, bias _ init = 0. 0, orthogonal = false ) : in _ shape = tf. tensor. get _ shape ( x ). as _ list ( ) with tf. variable _ scope ( scope, reuse = reuse ) : if orthogonal : with tf. variable _ scope ('orthogonal _ stiefel ', reuse = reuse ) : a = tf. get _ variable (... | [
0.8345054388046265,
-0.04555630311369896,
0.6040077805519104,
-0.23503340780735016,
-0.4997921288013458,
0.7327858805656433,
-0.07596476376056671,
0.26832786202430725,
0.4333416819572449,
1.043439269065857,
-0.12485665827989578,
0.4947276711463928,
0.05575290694832802,
-0.5097111463546753,... |
def test _ restart _ during _ out _ of _ order _ persistence ( self ) - > none : # prefill table with 7 rows written by'master'self. _ insert _ rows ( " master ", 7 ) id _ gen = self. _ create _ id _ generator ( ) self. assertequal ( id _ gen. get _ positions ( ), { " master " : 7 } ) self. assertequal ( id _ gen. get ... | [
-0.301411896944046,
0.7877951860427856,
0.879302978515625,
-0.10815931111574173,
0.43338754773139954,
0.14011333882808685,
0.8185516595840454,
-0.13840839266777039,
-0.1041213870048523,
-0.2734987139701843,
-0.9234195351600647,
-0.45967158675193787,
-0.0268404558300972,
0.34307414293289185... |
def difference ( self, other ) : return sourceset ( self. sources - other. sources, self. conditions & other. conditions ) | [
-0.2610502541065216,
-0.300120085477829,
0.6630544066429138,
-0.5301297903060913,
-0.9581857919692993,
0.26056718826293945,
0.21450138092041016,
-1.217154860496521,
0.2267954796552658,
-1.233939290046692,
0.4297311007976532,
-0.11390360444784164,
-0.5952118039131165,
0.2696854770183563,
... |
def get _ package _ qid ( name : str ) - > optional [ str ] : return load _ packages ( ). get ( _ norm ( name ) ) | [
0.37542808055877686,
-0.03454330563545227,
0.37951526045799255,
-0.41064703464508057,
-1.0389020442962646,
-0.037335872650146484,
-0.8505666851997375,
-0.38379427790641785,
0.678738534450531,
0.568689227104187,
0.3570707440376282,
-0.299384206533432,
-0.7572435140609741,
-0.084674276411533... |
def _ process _ session _ init _ tcp _ message ( self, pdu ) : if pdu. type! = messagetype. session _ initialisation _ response _ message : return result = self. process _ data _ items _ init ( pdu. data _ items ) if result is none or result! = statuscode. success : return self. process _ data _ items ( pdu. data _ ite... | [
-0.7717366218566895,
-0.3326929807662964,
0.45488491654396057,
-0.18228565156459808,
1.0315721035003662,
-0.4026210308074951,
0.49640992283821106,
-0.9778437614440918,
0.5179535746574402,
0.31000077724456787,
-0.2877333164215088,
-0.3231819272041321,
-0.4824124872684479,
-0.150823324918746... |
def display ( self, df, n ) : print ( df [ : n ] ) | [
0.012199735268950462,
0.49894723296165466,
0.27379029989242554,
-0.09150583297014236,
0.3836795687675476,
-0.1926354020833969,
-0.14122216403484344,
-0.8656771779060364,
-0.9446014165878296,
-0.3001488745212555,
0.5255798101425171,
1.2925046682357788,
0.11292743682861328,
-0.33663463592529... |
def test _ paid _ special _ resolution _ correction _ on _ correction ( session, config, legal _ type, filing _ type ) : # setup filing + business for email legal _ name ='cp business'original _ filing = prep _ cp _ special _ resolution _ filing ( cp _ identifier,'1 ', legal _ type, legal _ name, submitter _ role = non... | [
1.5419052839279175,
-0.3214927613735199,
0.7356894016265869,
0.268039345741272,
0.1521463245153427,
0.20520387589931488,
0.37652063369750977,
0.3797958195209503,
0.19244003295898438,
0.031566470861434937,
0.1648937314748764,
0.4270949363708496,
0.28023767471313477,
0.7856029868125916,
0.... |
def oda ( a, f, last _ of _ array ) : return ( np. nansum ( np. sign ( f - last _ of _ array ) = = np. sign ( a - last _ of _ array ), axis = 0 ) / f. shape [ 0 ] ) | [
0.01926024630665779,
-0.00953755248337984,
0.7669930458068848,
0.022058019414544106,
0.5163301229476929,
-0.5755358338356018,
0.7876948118209839,
-0.13685229420661926,
0.5326061844825745,
0.6412353515625,
1.326391577720642,
0.26633337140083313,
0.6502411365509033,
-0.15195663273334503,
0... |
def draw ( self, mask, color = ( 0, 255, 0 ), line _ width = 50, average = false ) : h, w, c = mask. shape plot _ y = np. linspace ( 0, h - 1, h ) coeffs = self. average _ fit if average else self. last _ fit _ pixel line _ center = coeffs [ 0 ] * plot _ y * * 2 + coeffs [ 1 ] * plot _ y + coeffs [ 2 ] line _ left _ si... | [
0.05233430862426758,
-0.06212043762207031,
0.9139801263809204,
-0.6984179615974426,
0.5070951581001282,
0.3633444607257843,
-0.6083362102508545,
-0.3712153732776642,
0.7537178993225098,
0.01865638606250286,
0.905579149723053,
0.6457610726356506,
-0.1236240565776825,
-0.7615926861763,
-0.... |
def create _ grid _ partition ( self, atomic _ hierarchy ) : self. _ grid _ partition = grid _ partition ( grid _ size = self. grid _ size ( ), grid _ spacing = self. grid _ spacing ( ), atomic _ hierarchy = atomic _ hierarchy ) | [
0.9510138034820557,
0.5122476816177368,
0.4039306640625,
0.1467336267232895,
0.8535126447677612,
-0.2614400386810303,
-0.5112183690071106,
-0.3713417053222656,
-0.7457395792007446,
-0.4638082683086395,
0.3989393413066864,
-0.011870715767145157,
-0.9486445784568787,
0.46311885118484497,
0... |
def get _ readonly _ fields ( self, request, obj = none ) : get = request. get if ( get. get ( " status " ) = = " 1 " ) : self. readonly _ fields = ('uid ','phonenum ', ) self. inlines = [ ] else : self. readonly _ fields = ('t _ user ','image ','company ','contact ','bankcard ','obank ','uid ','phonenum ','texno ','ad... | [
-1.2402567863464355,
0.44955503940582275,
0.47778451442718506,
0.038507793098688126,
-0.4747263491153717,
0.4738016724586487,
0.2253827154636383,
0.09945514798164368,
0.7032470107078552,
0.035048648715019226,
-0.8474782109260559,
-0.02971646562218666,
-0.1811830848455429,
-0.54871016740798... |
def start _ backend _ application ( ) : sensors = sensor. objects. filter ( sensor _ type ='temperature') # if not isinstance ( sensors, list ) : # sensors = [ sensors ] for sensor in sensors : sensor _ application ( ( sensor ) ) # rule _ application ( sensor ) return 0 threads = [ ] for sensor in sensors : threadx = t... | [
0.6156933307647705,
0.16880516707897186,
0.8139514327049255,
0.6890984177589417,
1.4974298477172852,
0.07377617806196213,
0.30003300309181213,
0.29240521788597107,
0.16465982794761658,
0.7023565769195557,
0.2571352422237396,
0.2802460193634033,
-0.701759397983551,
1.1357197761535645,
-0.... |
def generate _ apidocs ( * args ) : module _ path = os. path. abspath ( os. path. join ( os. path. dirname ( _ _ file _ _ ), ".. ", ".. ", " monailabel " ) ) output _ path = os. path. abspath ( os. path. join ( os. path. dirname ( _ _ file _ _ ), " apidocs " ) ) apidoc _ command _ path = " sphinx - apidoc " if hasattr ... | [
0.4960728585720062,
0.2153794765472412,
0.9483351707458496,
-0.1223532184958458,
-0.2974344789981842,
0.8998003005981445,
0.9573240876197815,
0.45484158396720886,
0.19077938795089722,
-0.18244752287864685,
0.19580020010471344,
0.11679072678089142,
-0.5471725463867188,
0.30825868248939514,
... |
def _ _ init _ _ ( self, challenge _ id = none, avatar _ ids = none ) : # noqa : e501 self. openapi _ types = {'challenge _ id': str,'avatar _ ids': list [ str ] } self. attribute _ map = {'challenge _ id':'challengeid ','avatar _ ids':'avatarids'} self. _ challenge _ id = challenge _ id self. _ avatar _ ids = avatar _... | [
-0.6274104714393616,
-0.5380710959434509,
0.35458627343177795,
0.09551909565925598,
-0.4848721921443939,
0.028967242687940598,
0.4202333688735962,
0.3531585931777954,
0.371710866689682,
0.32647785544395447,
-0.8074399828910828,
-0.19692976772785187,
-0.07095307856798172,
-0.069743476808071... |
def _ equals ( self, other ) : return super ( cpofunctioncall, self ). _ equals ( other ) and ( self. operation = = other. operation ) | [
-0.4677213430404663,
0.4948510527610779,
0.5293354392051697,
0.6276372671127319,
-0.36051276326179504,
-0.20566833019256592,
0.05150553956627846,
-0.9238151907920837,
0.5229347944259644,
0.09123892337083817,
-0.9222817420959473,
-0.2748948633670807,
-0.4151855409145355,
-0.4114309251308441... |
def get _ htmls ( url _ list : list ) : async def fetch _ html ( client, url : str ) : " " " fetch response from http's " " " async with client. get ( url ) as resp : return await resp. text ( ) async def get _ task ( urls : list ) : " " " get html pages " " " async with aiohttp. clientsession ( ) as client : task = [ ... | [
-0.29278647899627686,
0.7984617352485657,
0.726879358291626,
0.6308267116546631,
-0.23961350321769714,
0.2741060256958008,
-0.6455950140953064,
-0.16382022202014923,
-0.005295136012136936,
0.42340388894081116,
-0.41853731870651245,
0.18973369896411896,
0.6056757569313049,
1.181186795234680... |
def _ get _ mysql _ rdbms ( self, table _ list : list [ tuple [ str, str ] ] ) : db _ tables = { } for table _ obj in table _ list : db _ name = table _ obj [ 0 ] table _ name = table _ obj [ 1 ] if db _ name not in db _ tables : db _ tables [ db _ name ] = [ ] if table _ name : db _ tables [ db _ name ]. append ( data... | [
-0.27525264024734497,
1.0059551000595093,
0.6827546954154968,
0.3384426534175873,
-0.08898410946130753,
0.030132684856653214,
-0.3955162465572357,
-0.0909704640507698,
0.31866735219955444,
-0.11896169930696487,
-1.2365608215332031,
0.14586563408374786,
-1.055763840675354,
1.2874755859375,
... |
def update _ rosters ( add _ delay, part = none, member = none ) : swgoh _ member _ url = " https : / / swgoh. gg / u / { } / collection / " cnx = sql _ connect ( ) timestamp = datetime. now ( ) if member : users = [ member ] else : users = get _ users ( cnx ) if part = = 1 : users = users [ : int ( len ( users ) / 2 )... | [
-0.4665925204753876,
-0.22235269844532013,
0.7963625192642212,
0.22075790166854858,
-0.03295090049505234,
0.06226753816008568,
-0.1849159449338913,
0.05275137722492218,
-0.36902087926864624,
-0.16359947621822357,
-0.14908136427402496,
0.44481366872787476,
-0.4141598045825958,
0.28096055984... |
def capacity ( self ) - > optional [ int ] : return pulumi. get ( self, " capacity " ) | [
0.9446277618408203,
0.6254335641860962,
0.5716527104377747,
0.4748823940753937,
0.8902387022972107,
0.5260403156280518,
1.1461586952209473,
-0.13312400877475739,
0.10015606880187988,
-0.07818960398435593,
0.43590492010116577,
0.23158714175224304,
0.27700623869895935,
-1.3288426399230957,
... |
def relabel ( name2dp, connections ) : for ndp in name2dp. values ( ) : if not isinstance ( ndp, simplewrap ) : raise _ desc ( valueerror, " i can only relabel if they are all simplewrap. " ) # id _ ndp, name - > id _ ndp, name2 fun _ map = { } fun _ names = set ( ) res _ map = { } res _ names = set ( ) def get _ new _... | [
-1.4027124643325806,
-0.8339664340019226,
1.0608829259872437,
-1.0379915237426758,
-0.5628397464752197,
0.005878204945474863,
-0.3727306127548218,
-0.45957323908805847,
0.2523954510688782,
0.1385127305984497,
-0.7565718293190002,
0.09559009224176407,
0.5875468850135803,
-0.1201258450746536... |
def update _ observed ( self, new _ observed ) : self. observed. update _ ref ( new _ observed ) | [
-0.4851865768432617,
-1.627210259437561,
0.45139455795288086,
-0.7386614680290222,
0.053578827530145645,
0.8854603171348572,
-0.5332342982292175,
-0.3233812153339386,
-0.455310195684433,
0.876763641834259,
-0.821522057056427,
1.3356190919876099,
-0.1663060188293457,
0.3141205608844757,
-... |
def status _ favourited _ by ( self, id : union [ status, idtype ] ) - > nonpaginatablelist [ account ] : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('get ', f'/ api / v1 / statuses / { id } / favourited _ by') | [
-0.4636682868003845,
0.12867610156536102,
0.25932013988494873,
1.008278727531433,
-0.35518601536750793,
-0.3378828167915344,
-0.6827753782272339,
-0.18237434327602386,
0.7265569567680359,
0.3028152287006378,
-0.9840369820594788,
1.2217634916305542,
0.5720019936561584,
0.5647704601287842,
... |
def daily _ report ( self, camera _ id, from _ date, to _ date ) : date _ range = pd. date _ range ( start = from _ date, end = to _ date ) base _ results = { key. strftime ('% y - % m - % d') : {'detectedobjects': 0,'violatingobjects': 0 } for key in date _ range } log _ dir = os. getenv ('logdirectory') file _ path =... | [
0.024877775460481644,
-0.3072699308395386,
0.871631920337677,
0.2488783895969391,
0.49983394145965576,
-0.3749561905860901,
0.3020620346069336,
-0.8372637629508972,
-0.46827971935272217,
-0.39818206429481506,
0.08816013485193253,
0.3707265257835388,
0.31208598613739014,
0.49723854660987854... |
def decode ( self, x ) : return''. join ( self. idx _ to _ char [ x ] for x in x ) | [
-0.7648112177848816,
-0.4172532558441162,
0.49092426896095276,
-0.42557865381240845,
-0.20658175647258759,
0.06490860134363174,
-1.5094448328018188,
-0.778146505355835,
0.7803128361701965,
0.05012034997344017,
-1.0256534814834595,
0.4701596796512604,
-0.2692638635635376,
-1.705521702766418... |
def add _ shelf ( self, name ) : shelf = shelf ( name, self ) self. shelves. append ( shelf ) print ( " added { name } shelf. ". format ( name = name ) ) return shelf | [
-0.09289057552814484,
-0.3039485812187195,
0.43734821677207947,
0.5530114769935608,
-0.6823221445083618,
1.0895637273788452,
-0.035775359719991684,
-1.215085744857788,
-0.35059189796447754,
-1.170735239982605,
-0.8298493027687073,
-0.18432310223579407,
-0.6085105538368225,
0.76432067155838... |
def associate _ public _ ip _ address ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " associate _ public _ ip _ address " ) | [
0.14577041566371918,
-0.39537522196769714,
0.48641276359558105,
0.5396296977996826,
0.4939040243625641,
1.1190234422683716,
0.513124406337738,
0.14847809076309204,
0.5573740601539612,
-0.11277205497026443,
-0.0878836065530777,
0.5382392406463623,
-0.15363530814647675,
-0.8307778239250183,
... |
def softmaxlossbias ( x, y, w, b, reg = 1 ) : scores = x. dot ( w ) + b # 500x10 - scores for each image for each class scores - = np. max ( scores, axis = 1 ) [ :, np. newaxis ] # subtract max value for the scores for each image p = np. exp ( scores ) / np. sum ( np. exp ( scores ), axis = 1 ) [ :, np. newaxis ] corre... | [
-0.143006831407547,
-0.5634495615959167,
0.704380214214325,
0.6560184359550476,
-0.7661560773849487,
-0.0029826185200363398,
0.26628953218460083,
0.627452552318573,
0.745330810546875,
0.9445123672485352,
0.22516831755638123,
0.6890544295310974,
0.7434267997741699,
0.6212790012359619,
0.6... |
def interface ( self ) : return self. broker. interface ( * * { " ifgroupmemberid " : self. ifgroupmemberid } ) | [
0.21463753283023834,
-0.11011297255754471,
0.04255304113030434,
0.4894491136074066,
-0.2665153741836548,
-0.4444256126880646,
0.34681951999664307,
-0.389175683259964,
-0.35421863198280334,
-0.3692820072174072,
0.2192477434873581,
0.5804280042648315,
-2.5137441158294678,
0.10126741230487823... |
def click _ makedefault ( self ) : try : result = self. driver. find _ element _ by _ css _ selector ( self. css _ makedefault ). is _ displayed ( ) if result = = true : default = self. driver. find _ element _ by _ css _ selector ( self. css _ makedefault ) action = touchactions ( self. driver ) action. tap ( default ... | [
-0.040113694965839386,
1.2022438049316406,
0.6768425107002258,
0.2562127411365509,
0.6639309525489807,
0.12319885194301605,
0.964215099811554,
-0.32564932107925415,
0.8534163236618042,
0.22092972695827484,
0.04199669882655144,
0.11816227436065674,
-0.2826201617717743,
0.04363047331571579,
... |
def _ validate _ translation _ table _ from _ file ( file _ name ) : with open ( file _ name,'r') as file : content = file. read ( ) # empty file? no problem! if not content : return none try : json _ data = from _ json ( content ) finally : # unallocate content if exception occurs content = none # no json? no problem!... | [
0.20469610393047333,
-0.02089363895356655,
0.8019099831581116,
-0.2264038622379303,
-0.6372955441474915,
-0.4472954273223877,
-0.10949524492025375,
-0.49841761589050293,
-1.1425199508666992,
0.5930503606796265,
-0.13076911866664886,
-0.6971583962440491,
0.6514132618904114,
0.06983820348978... |
def getcurrentuser ( request ) : user = users. get _ current _ user ( ) if user : return models. user ( google _ user = user ) session _ id = request. cookies. get ('session ','' ) if not session _ id : return none login = consumer. login. get _ by _ key _ name ( session _ id ) if not login : return none return models.... | [
-0.27510878443717957,
-1.2465872764587402,
0.6242213845252991,
1.1954165697097778,
0.14879539608955383,
-0.34339478611946106,
0.21048276126384735,
-0.9413086771965027,
1.0222034454345703,
0.19471247494220734,
0.5029184818267822,
0.7099114656448364,
0.013563628308475018,
-0.4439640641212463... |
def parents ( self, lhs, rhs ) : return [ node for node in rhs if node. parent in lhs ] | [
-0.02984112873673439,
-0.1075366958975792,
0.3551482558250427,
0.20278437435626984,
-0.41728919744491577,
0.4015650153160095,
-0.9843352437019348,
-0.41899919509887695,
-0.9676116108894348,
1.2670602798461914,
0.19967934489250183,
0.6326479315757751,
-0.6940836310386658,
0.7018254399299622... |
def import _ imagestext ( folder ) : images = [ ] a = os. listdir ( folder ) for image in a : img = numpy. loadtxt ( os. path. join ( folder, image ) ) images. append ( img ) return images | [
-0.22538968920707703,
0.1298823058605194,
0.5380903482437134,
-0.5316169261932373,
-0.7136685848236084,
-0.15748128294944763,
-0.10739340633153915,
0.30683642625808716,
-0.11221020668745041,
1.7776390314102173,
-0.3546648919582367,
0.15287628769874573,
-0.2854766845703125,
0.77927690744400... |
def _ _ init _ _ ( self, n = 3 ) : self. n = n self. table = [ [ ( ( i * n + i / / n + j ) % ( n * n ) + 1 ) for j in range ( n * n ) ] for i in range ( n * n ) ] print ( " the base table is ready! " ) | [
-0.3029087781906128,
0.6659848093986511,
0.4923447370529175,
0.9265075922012329,
-0.6043431758880615,
0.1544007807970047,
0.37542960047721863,
0.07378239184617996,
-0.20389720797538757,
-0.012289409525692463,
-1.2295503616333008,
-0.5785327553749084,
-0.5480212569236755,
0.7529440522193909... |
def matrix _ from _ pattern ( pattern, structure ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # import numpy as np npr, npc = pattern. shape nsr, nsc = structure. shape pattern _ 3d = np. expand _ dims ( n... | [
-0.003823478939011693,
-0.3156528174877167,
0.4448819160461426,
-0.9041796326637268,
-0.12322541326284409,
0.2639041244983673,
0.7823408246040344,
0.12100609391927719,
0.3400329053401947,
0.4318491220474243,
0.08406778424978256,
0.09230848401784897,
0.03656473010778427,
-1.1960508823394775... |
def get _ degree ( self, x : numerictype ) - > numerictype : raise notimplementederror ('the ` get _ degree ` method must be \ implemented') | [
-0.46627575159072876,
0.989791750907898,
0.7012307047843933,
0.9013499021530151,
-0.3456977605819702,
0.4569265842437744,
0.29591360688209534,
-0.769188642501831,
0.4866738021373749,
-0.24142903089523315,
-0.7113263607025146,
0.6890313029289246,
0.37310487031936646,
0.005548935383558273,
... |
def print _ exc _ plus ( ) : sys. stderr. flush ( ) # for eclipse sys. stdout. flush ( ) # for eclipse tb = sys. exc _ info ( ) [ 2 ] while true : if not tb. tb _ next : break tb = tb. tb _ next stack = [ ] f = tb. tb _ frame while f : stack. append ( f ) f = f. f _ back txt = traceback. format _ exc ( ) txt _ lines = ... | [
0.8271775245666504,
-0.19774265587329865,
1.340643286705017,
-0.2469850778579712,
-0.0707140639424324,
-0.7668986320495605,
-0.05875551700592041,
-0.4595930278301239,
-0.22692988812923431,
-0.07253537327051163,
0.18872122466564178,
0.7489495277404785,
0.5348380208015442,
0.4919304847717285... |
def mutate _ and _ test ( module _ path, operator, occurrence, test _ command, keep _ stdout ) : with open ( os. devnull, " w " ) as devnull : with redirect _ stdout ( sys. stdout if keep _ stdout else devnull ) : work _ result = asyncio. get _ event _ loop ( ). run _ until _ complete ( cosmic _ ray. mutating. mutate _... | [
0.2506009638309479,
-0.48494085669517517,
0.7624146938323975,
0.5974769592285156,
0.22711431980133057,
-0.06856661289930344,
0.6872999668121338,
-0.3204808533191681,
0.353847473859787,
0.1792696863412857,
-0.1015046089887619,
0.5258964896202087,
-0.005222190637141466,
0.24199560284614563,
... |
def add _ positional _ arg ( self, * args, * * kwargs ) : arg = searchargument ( * args, * * kwargs ) self. positional _ args. append ( arg ) | [
-0.8251588344573975,
-0.4950253665447235,
0.6605830192565918,
-0.10411369055509567,
0.4398123323917389,
0.8294875621795654,
-0.826156735420227,
0.907651424407959,
-0.1468759924173355,
-0.07428188621997833,
-0.3846528232097626,
0.1972237378358841,
-0.8278553485870361,
0.5754590630531311,
... |
def get _ chromium _ src _ path ( ) - > pathlib. path : _ chromium _ src _ root = pathlib. path ( _ _ file _ _ ). resolve ( strict = true ). parents [ 3 ] try : _ assert _ git _ repository ( _ chromium _ src _ root ) except ( valueerror, runtimeerror ) : raise assertionerror return _ chromium _ src _ root | [
0.8546684384346008,
0.20939891040325165,
0.39632630348205566,
0.3187238574028015,
0.7583652138710022,
0.5515985488891602,
1.0897912979125977,
-0.3302885591983795,
-0.14154021441936493,
0.2819736897945404,
0.3340410888195038,
0.5315465927124023,
-1.1198103427886963,
0.19308190047740936,
0... |
def parse _ args ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ('- - project ', type = str, help ='original table to work from') parser. add _ argument ('- - dataset ', type = str, help ='original table to work from') parser. add _ argument ('- - table ', type = str, default ='cleaned _ data ', hel... | [
-0.07564713060855865,
0.6757407784461975,
0.5181252956390381,
-0.09766835719347,
0.004186945501714945,
0.7063960433006287,
-0.4653686583042145,
0.6111117005348206,
-1.6083085536956787,
0.11890558898448944,
0.41580110788345337,
0.3199011981487274,
0.08477094769477844,
0.4441322386264801,
... |
def activate ( self, * * kwargs ) : self. _ check _ exists ( ) params = { } params [ " cmd " ] = " activate " params [ " id " ] = self. id parse _ kwargs ( params, kwargs ) u = requests. get ( self. wwt. wwt _ url, params = params ) layer _ str = u. content handle _ response ( layer _ str ) | [
-0.9228556752204895,
-0.5909922122955322,
0.3989095091819763,
0.23010340332984924,
0.3447760045528412,
0.26498332619667053,
-0.43790021538734436,
-0.8867794275283813,
-0.0943930447101593,
-0.36521437764167786,
-0.8428175449371338,
1.3790465593338013,
-1.069350004196167,
0.06097029522061348... |
def _ routerid _ set ( v : union [ layerfieldscontainer, layerfield ] ) - > set : assert not isinstance ( v, layerfieldscontainer ) or len ( v. fields ) = = 1 try : ridmask = str ( v. get _ default _ value ( ) ) assert isinstance ( ridmask, str ), ridmask ridmask _ int = int ( ridmask. replace (': ','' ), base = 16 ) r... | [
-0.3821408450603485,
0.7246698141098022,
0.4422673285007477,
-0.6799710988998413,
1.1399872303009033,
-0.7871297001838684,
0.6601012349128723,
-0.969277024269104,
-0.12449739128351212,
0.7000687718391418,
-0.035254452377557755,
0.2911320924758911,
-0.6225334405899048,
-0.4081600606441498,
... |
def calcasaptime ( self ) : curservertime = base. cr. toontowntimemanager. getcurserverdatetime ( ) basetime = curservertime basetime = basetime. replace ( basetime. year, basetime. month, basetime. day, basetime. hour, basetime. minute, second = 0, microsecond = 0 ) minute = curservertime. minute remainder = minute % ... | [
-0.475574254989624,
-0.7102906703948975,
0.7808647155761719,
-0.06031641364097595,
-1.0121318101882935,
0.2645341157913208,
0.0989794135093689,
0.1436254382133484,
1.19169020652771,
0.5755724906921387,
-0.036349039524793625,
-0.1319974660873413,
-0.5752507448196411,
0.20707456767559052,
... |
def handle _ create _ game ( create _ game _ message ) : channel _ message = none group _ name = channel _ group _ name _ onlinelist ws _ message = none user _ name = create _ game _ message [ " user " ] try : models. user. objects. get ( pk = user _ name ) except models. user. doesnotexist : print ( " warning : handle... | [
-0.15317590534687042,
0.10958174616098404,
0.7845897674560547,
-0.21583443880081177,
0.2713114321231842,
0.4869903028011322,
0.0414150096476078,
-0.6651623845100403,
-0.7132676243782043,
1.1546075344085693,
-0.13395455479621887,
-0.5337660908699036,
-0.7173708081245422,
0.9390856623649597,... |
def filter _ story ( self, metadata ) : if self. adult _ only : return metadata [ " rating " ]. lower ( ). strip ( ). replace ( " + ", " " ) = = " m " else : return true | [
0.02320263162255287,
0.18756918609142303,
0.43604910373687744,
0.2452663779258728,
-0.4994261562824249,
1.165050745010376,
-1.5164337158203125,
0.26115232706069946,
-0.7697904706001282,
0.7970149517059326,
1.0776818990707397,
0.19587522745132446,
-0.3587598204612732,
-0.1400143802165985,
... |
def assemble ( self ) : self. canonify ( ) args = [ sys. argv and sys. argv [ 0 ] or " python " ] if self. mountpoint : args. append ( self. mountpoint ) for m, v in self. modifiers. iteritems ( ) : if v : args. append ( self. fuse _ modifiers [ m ] ) opta = [ ] for o, v in self. optdict. iteritems ( ) : opta. append (... | [
-1.0583351850509644,
-1.0565904378890991,
0.5809608697891235,
-0.18544162809848785,
0.8843832015991211,
-0.5057135224342346,
-1.147327184677124,
0.25533097982406616,
-0.3234485983848572,
0.46807312965393066,
0.36561524868011475,
0.20556823909282684,
-0.06577674299478531,
1.2373664379119873... |
def send ( self, value ) : giter = self. _ giter self. _ trace ( " send % r % r ", giter, value ) return giter. send ( value ) | [
-0.9112957715988159,
0.9256470799446106,
0.3820301294326782,
0.33660969138145447,
-0.8492038249969482,
0.13931885361671448,
0.2906104624271393,
-1.9040632247924805,
-0.07879003137350082,
0.7950709462165833,
-0.3602531850337982,
0.10427065938711166,
-1.398647665977478,
0.5829480886459351,
... |
def delete _ segment ( self, dimension : tabledimension ) : [ selection _ row _ start, selection _ row _ end, selection _ col _ start, selection _ col _ end ] = self. get _ selected _ range ( ) if dimension = = tabledimension. row : for i in range ( 1 + selection _ row _ end - selection _ row _ start ) : self. removero... | [
-0.841307520866394,
-0.3049965798854828,
0.6730040311813354,
0.5622261762619019,
0.08824241906404495,
0.15043404698371887,
0.8353676795959473,
-0.555733859539032,
-0.2137608379125595,
0.4493177533149719,
-0.01786828599870205,
0.10921670496463776,
-0.10957218706607819,
0.17606016993522644,
... |
def pop ( self ) : if len ( self ) = = 0 : raise indexerror ('pop from empty stack') self. n - = 1 res = self. resizing _ array [ self. n ] self. resizing _ array [ self. n ] = none if len ( self ) and len ( self ) * 4 < = self. capacity : self. _ resize ( self. capacity / 2 ) return res | [
-0.415945827960968,
0.8516230583190918,
0.6739310026168823,
0.23818813264369965,
-0.17078405618667603,
-0.6593489050865173,
0.8408957123756409,
-0.869670569896698,
-0.11571601033210754,
0.20352554321289062,
-0.029794583097100258,
-0.8266517519950867,
-1.2203575372695923,
-0.478687584400177... |
def solve ( self, solver = none, display = true, export = false ) : if solver is none : solution = def _ sol ( self. do _ math ( ), display, export ) else : solution = solver. solve ( self. do _ math ( ), display, export ) if isinstance ( solution, solution ) : self. rc _ model. solution = solution else : if solution i... | [
0.1794973462820053,
0.22207345068454742,
0.41217976808547974,
0.9275616407394409,
-0.29773473739624023,
-0.2521139681339264,
0.9819290637969971,
-0.8688552975654602,
0.4263545870780945,
-0.5960521101951599,
-0.7814148664474487,
-0.5305720567703247,
0.07858505845069885,
0.6732166409492493,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.