text
stringlengths
25
2.19k
embedding
listlengths
768
768
def coord _ to _ sortable ( self, x : jaxarray ) - > jaxarray : return x
[ 0.007915697060525417, -0.3382517099380493, 0.5789850354194641, -0.46705392003059387, -0.28761160373687744, 0.2996622323989868, -0.35247573256492615, -1.7913302183151245, -0.042746368795633316, 0.201838880777359, -0.09454762190580368, 0.3238351345062256, 0.30127498507499695, -0.507076680660...
def get _ default _ config ( ) - > optional [ pyrrigateconf ] : return get _ first _ config ( default _ config _ paths )
[ 1.1483532190322876, -0.046972911804914474, 0.30487436056137085, 1.0770080089569092, 1.3254284858703613, -0.7795129418373108, -0.05350935086607933, 0.4555496275424957, -0.39657092094421387, -0.2202097326517105, -0.20922961831092834, -0.6633656024932861, -0.5320714116096497, 0.60580354928970...
def _ _ get _ non _ trivial _ properties ( self, in _ object, excluded _ params = none ) : if in _ object is none : raise valueerror ( " in _ object can't be none " ) m _ return = set ( ) # get all no trivial properties for x in dir ( in _ object ) : found = false # looking for invalud param for y in excluded _ params ...
[ -0.43940815329551697, -0.20033694803714752, 0.7229321599006653, 0.09080076962709427, -0.4806149899959564, 0.38621267676353455, -0.40268072485923767, -0.510637104511261, -0.4235941469669342, 0.12256371974945068, -0.16308483481407166, -0.107755146920681, -0.32361283898353577, -0.127118200063...
def compute _ loss _ and _ gradients ( self, x, y ) : # before running forward and backward pass through the model, # clear parameter gradients aggregated from the previous pass # todo compute loss and fill param gradients # don't worry about implementing l2 regularization, we will not # need it in this assignment para...
[ -0.09832726418972015, -0.0772128701210022, 0.6795447468757629, 0.1128106638789177, 0.2364819198846817, -0.12848606705665588, 0.1538238376379013, -0.15916498005390167, -0.6093695759773254, 0.3066833019256592, -0.09336461126804352, 0.5169676542282104, -0.15008695423603058, 0.6605644822120667...
def main ( ) : parser = argparse. argumentparser ( description ='get panel') parser. add _ argument ('- - a ', metavar ='accession _ id ', type = str ) args = parser. parse _ args ( ) accession _ id = args. a json _ response = create _ job ( accession _ id ) panel _ ids = json. dumps ( json _ response, indent = 4 ) sys...
[ 0.5326651930809021, -0.18274030089378357, 0.9729876518249512, -0.8456745147705078, 0.49027279019355774, 0.27253273129463196, -0.28936803340911865, -0.36558473110198975, -0.8440950512886047, 0.22417309880256653, 0.012127391062676907, 1.3571445941925049, -0.10237740725278854, 0.3636046648025...
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, opts : optional [ pulumi. resourceoptions ] = none, custom _ oss _ bucket : optional [ pulumi. input [ str ] ] = none, instance _ name : optional [ pulumi. input [ str ] ] = none, instance _ type : optional [ pulumi. input [ str ] ] = none, kms _ encrypted _ passw...
[ 0.027819210663437843, -0.03292955458164215, 0.7733892798423767, -0.3065376281738281, -0.6103050708770752, -0.244937926530838, -0.8149778842926025, 0.24025505781173706, 1.1897783279418945, -0.11920391768217087, -0.08481185138225555, 1.0427061319351196, 0.41370922327041626, -1.24006438255310...
def test _ delete _ build _ type ( self ) : pass
[ 0.2062331587076187, 0.09001324325799942, 0.11026600748300552, 1.5044357776641846, 0.713952898979187, 0.7197337746620178, 1.493906021118164, 0.378120094537735, 0.43624094128608704, -0.6867755055427551, -1.0247517824172974, 0.3388596177101135, -1.2386884689331055, 0.3414278030395508, 0.411...
def expand _ matrix ( x, n ) : m, k = x. shape if n < = m : return x newx = np. zeros ( ( n, k ) ) newx [ : m, : k ] = x return newx
[ -0.16711623966693878, 0.7069426774978638, 0.3824189305305481, 0.29249629378318787, -0.5636475682258606, 0.11170299351215363, -0.7517026662826538, -0.3786040246486664, 0.7468188405036926, -0.15797826647758484, 0.7299240231513977, 0.28060466051101685, 0.4012064039707184, -0.17304150760173798...
def _ renamepoint ( self, pointidx, newname ) : if newname! = self. _ pointslist [ pointidx ] ['name'] : # we only do something if this has really changed and if the name # is not blank # first make sure the 3d renderer knows about this ca = self. _ pointslist [ pointidx ] ['sphereactor'] ca. setcaption ( newname ) # n...
[ -0.5661207437515259, -0.4934888482093811, 0.3997858762741089, 0.15532419085502625, -0.7283392548561096, -0.44434961676597595, -0.7177901864051819, -0.1295376867055893, 1.3477445840835571, 1.3136937618255615, -0.500063419342041, 0.8158887624740601, 0.44731372594833374, 0.2055804580450058, ...
def _ _ init _ _ ( self, spec ) : self. spec = spec self. typemap = { } for x, y in vars ( spec ). items ( ) : try : if issubclass ( y, element ) : if hasattr ( y,'xmlname') : x = y. xmlname self. typemap [ x ] = y except typeerror : pass
[ -0.6410714387893677, -0.8436973094940186, 0.4813961982727051, -0.14917483925819397, -0.49455392360687256, -0.0952344611287117, 0.3564909100532532, -0.2191847711801529, 0.39773672819137573, -0.05559805780649185, -0.260407954454422, -0.5395520925521851, 0.18544010818004608, 1.136530756950378...
def _ connection _ failed ( self, link _ uri, msg ) : print ('connection to % s failed : % s'% ( link _ uri, msg ) ) self. is _ connected = false
[ 0.0310589000582695, -0.48978617787361145, 0.18822680413722992, -0.5663884878158569, 0.9308677911758423, -0.253540962934494, -0.8164640665054321, 0.28323793411254883, -0.7309208512306213, -0.7750515937805176, 0.6652342081069946, 0.46459197998046875, -0.8309487104415894, -0.1528705209493637,...
def _ check _ set _ dt ( self, dt ) : if dt is not none : if ( dt < self. current _ dt ) : raise valueerror ('supplied update time of " % s " is earlier than'' the current time of " % s ".'% ( dt, self. current _ dt ) ) else : self. current _ dt = dt
[ -0.265271931886673, 0.20621074736118317, 0.42890089750289917, -0.14341410994529724, -0.43919652700424194, 0.2621232867240906, 0.14276336133480072, -0.9886496663093567, -0.27849578857421875, 0.7401487827301025, 0.6771026849746704, 0.44995492696762085, -0.1883820742368698, 0.8652269244194031...
def readfile ( self ) : if not path ( self. filename ). is _ file ( ) : return ( " error " ) f = open ( self. filename, errors ='ignore') rawstring = f. read ( ) f. close ( ) return ( rawstring )
[ -0.20739758014678955, -0.5548068881034851, 0.7609673738479614, 0.17693109810352325, -0.7719539403915405, 0.589733362197876, -0.021990042179822922, -0.07694106549024582, -0.5902680158615112, -0.46435481309890747, 1.1486763954162598, -0.08791245520114899, 0.3110804855823517, -1.1442897319793...
def create _ gum ( self, roivoxelvals, mask, image, plotflag = true ) : # greyscale uniformity map mean _ pixel _ value = np. mean ( roivoxelvals ) dims = mask. shape gum = np. zeros ( dims ) # greyscale uniformity map # assign each voxel according to its intensity relative to the mean pixel value # outlined in ipem re...
[ 0.07915201783180237, 0.09286390990018845, 0.9022614359855652, -0.2781500518321991, -0.32015734910964966, 0.3491516709327698, 1.099853277206421, -0.3912580609321594, 0.17551623284816742, 0.5788000226020813, 1.1534323692321777, 0.7450012564659119, -0.6403092741966248, 0.1651693433523178, 0...
def connect ( self ) : try : self. sock. connect ( self. socket _ path ) self. _ ready ( ) except exception as e : raise udsexception ( str ( e ) )
[ -0.5098589062690735, 0.5534767508506775, 0.6271242499351501, -0.03692368417978287, 0.15474632382392883, 0.40888768434524536, 0.3379010856151581, 0.21759659051895142, -0.3259657621383667, -0.619327187538147, -0.01995525322854519, -0.04107333719730377, 0.6284071803092957, -0.2637104094028473...
def layer ( self, depth, as _ debuggers = true ) : if depth < 0 or depth > self. depth : raise valueerror ( " depth { } is out of range ( 0 - { } ) ". format ( depth, self. depth ) ) nodes = [ ] self. _ layer _ helper ( self. current, 0, depth, nodes ) return nodes
[ -1.610339879989624, 0.2614167630672455, 0.3764345645904541, 0.005131611134856939, 0.6121628880500793, 0.3249515891075134, 0.7991256713867188, -0.7422256469726562, 0.21792104840278625, -0.162557914853096, -0.16337627172470093, 1.0766557455062866, -0.656177818775177, 0.9817385077476501, -1...
def decode _ message ( self, radio _ sequence ) : state ='unknown'cpt = 0 def is _ short ( duration ) : return true if ( duration < 20 ) else false def is _ long ( duration ) : return true if ( 20 < duration ) else false for i in radio _ sequence : # print state if state = ='unknown': sequence = [ ] cpt = 0 if is _ lon...
[ -0.5464757680892944, -0.3165835738182068, 0.9313516616821289, -0.11381928622722626, -0.5231845378875732, -0.5731160044670105, 0.021683230996131897, -0.245700404047966, -0.011418863199651241, 0.24593320488929749, -0.9829741716384888, -0.5041055679321289, -0.557047426700592, 0.33540043234825...
def testhastaginstanceexists ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) tag = gettags ( paths = [ u'username / bar'] ). one ( ) objectid = uuid4 ( ) createtagvalue ( self. user. id, tag. id, objectid, 42 ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. tr...
[ 0.09566032886505127, 0.4807474613189697, 0.40523529052734375, -0.3078887164592743, 0.7501783967018127, 0.7569420337677002, 0.1312074363231659, 0.0743955448269844, -0.6883948445320129, -0.5082423686981201, -0.9728879332542419, -0.3142866790294647, 0.14774885773658752, 0.3188035786151886, ...
def to _ chars ( im, args ) : # ensure this is single channel ( greyscale ) im = im. convert ('l') # aspect ratio of a character when its displayed # ( they aren't perfect squares like pixels ) # height / width char _ aspect = 2 # result size in characters width = args. width height = int ( im. height / im. width * wid...
[ -0.6949779391288757, -0.4555937945842743, 0.8807621598243713, -0.6536993980407715, -0.5593271851539612, -0.718202531337738, -0.2859260141849518, -0.2825045585632324, 0.4244104325771332, 0.5846853256225586, 0.2581939697265625, 0.3096102178096771, 0.17626550793647766, 0.3007592260837555, -...
def search _ property ( cls, search _ term, page, per _ page ) : ids, total = search _ docs ( search _ term, page, per _ page ) if total = = 0 or isinstance ( total, dict ) : return cls. query. filter _ by ( id = 0 ), 0 ids _ to _ query = [ ] for i in range ( len ( ids ) ) : ids _ to _ query. append ( ( ids [ i ], i ) ...
[ -0.7695897221565247, -0.2982008457183838, 0.6963894963264465, -0.07726612687110901, 0.17814508080482483, -0.9485805630683899, -0.4339055120944977, -0.2444300651550293, -0.13261184096336365, 0.39573726058006287, 0.40102556347846985, -0.6416220664978027, -0.35621553659439087, -0.191042661666...
def generate _ adjacency _ matrix ( self, edges ) : adjacency _ matrix _ init = [ [ 0 for i in self. vertices ] for j in self. vertices ] for edge in edges : index _ one = self. vertices. index ( edge ['vertice _ one'] ) index _ two = self. vertices. index ( edge ['vertice _ two'] ) adjacency _ matrix _ init [ index _ ...
[ -0.6201415061950684, -0.38195839524269104, 0.6546542048454285, -0.47628629207611084, 0.4915558099746704, -0.08150634914636612, 0.1986740231513977, 0.25952035188674927, 0.21970200538635254, 0.6168988347053528, -0.15575388073921204, 0.06785888224840164, -0.16392135620117188, 0.35299170017242...
def _ set _ builtin _ eval _ globals ( self ) : builtins = rulebuiltinsmodule ( ) builtins. configuration = self. configuration builtins. context = self. context self. eval _ globals ['ruleml'] = builtins
[ -0.25433236360549927, -0.06102936714887619, 0.30814889073371887, -0.4681512713432312, 0.960294783115387, 1.4193196296691895, 0.18210013210773468, 1.0126914978027344, -0.25018927454948425, 0.25394222140312195, -1.0245610475540161, 1.5576484203338623, -0.8691644668579102, 0.611625611782074, ...
def remove _ punc ( s ) : s = regex. sub ( r'[ ^ a - za - z0 - 9 ] ','', s ). strip ( ) s =''. join ( [ tok. strip ( ) for tok in s. split ( ) if tok ] ) return s
[ 0.23246344923973083, -0.7348448634147644, 0.6140252351760864, -0.9850564002990723, -0.7635636329650879, -0.15448863804340363, 0.12866312265396118, 1.7231591939926147, 0.668086051940918, -0.11111609637737274, -0.029784996062517166, 0.2883085012435913, -0.06191534921526909, -1.14083361625671...
def datetimestamp ( ) - > str : ts = time. time ( ) ts = datetime. datetime. fromtimestamp ( ts ). strftime ('% y % m % dt % h % m % s') return ts
[ -0.07711315155029297, -0.1917889416217804, 0.9459218978881836, -0.5382216572761536, -0.40700647234916687, -0.02639118954539299, -1.2156469821929932, -0.435253381729126, 0.5971217751502991, 0.4197954833507538, -0.223016157746315, 0.010532483458518982, 0.9834561347961426, -1.047821283340454,...
def get _ node _ id ( filename : str ='/ var / lib / cloud / data / instance - id') - > str : if ( not os. path. isfile ( filename ) ) : raise runtimeerror ( " instance file ( { } ) does not exists ". format ( filename ) ) fh = open ( filename,'r') id = fh. readline ( ). rstrip ( " \ n " ) fh. close ( ) return id
[ 0.26751047372817993, -0.5140236616134644, 0.5794342756271362, -0.7593433260917664, 0.1548069566488266, 0.9199473261833191, 0.18740738928318024, 0.5292043089866638, -0.7408609390258789, 0.9521737694740295, 0.27611884474754333, 0.6482731699943542, -0.35424813628196716, -0.2830243408679962, ...
def do _ calculate ( self, node _ id, * * kwargs ) : _ hr _ multiplier = float ( kwargs ['hr _ multiplier'] ) _ attributes = self. tree. get _ node ( node _ id ). data if _ attributes is not none : if _ attributes ['category _ id'] > 0 : _ attributes, _ _ = component. calculate ( * * _ attributes ) else : # if the asse...
[ 0.07852562516927719, -0.09154080599546432, 0.9468011260032654, -0.101251982152462, 0.3508640229701996, -0.5934618711471558, 0.09295449405908585, -0.38536858558654785, -0.5350220799446106, -0.1479298621416092, -0.14321424067020416, -0.39554914832115173, -0.09985898435115814, 0.8702918887138...
def _ _ set _ pakkr _ returns ( self, _ type : optional [ _ returntype ] ) : self. _ _ steps _ returns. assert _ is _ superset ( _ type ) self. _ _ custom _ returns = _ type
[ -0.033719904720783234, 0.46209582686424255, 0.4059944152832031, 0.3641103208065033, 0.35654598474502563, -0.170965313911438, 0.2301529198884964, -0.5710327625274658, 0.1295800358057022, -0.4787466824054718, 0.11020748317241669, -0.22300542891025543, -0.7664871215820312, 0.6620237827301025,...
def filters ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input ['networkpacketcapturefilterargs'] ] ] ] : return pulumi. get ( self, " filters " )
[ -0.4620853662490845, 0.1602451503276825, 0.5176063776016235, 0.7945498824119568, 0.8368992209434509, 0.8261497020721436, -0.1717505156993866, -0.5619111657142639, 1.3591866493225098, -0.3210066258907318, -1.0200769901275635, 0.4810940623283386, -0.17375656962394714, 0.042459093034267426, ...
def smoothing ( datadf, method = " sliding ", * * kwargs ) : if method = = " sliding " : if'winsize'in kwargs : winsize = kwargs ['winsize'] else : winsize = 10 print ( " arg'winsize'is set as default ", winsize ) datadf = datadf. rolling ( window = winsize, center = false ). mean ( ) datadf = datadf. fillna ( method =...
[ -0.07962438464164734, 0.6225062012672424, 0.8642739653587341, 0.5242130160331726, -0.7734706401824951, -0.7264014482498169, 0.9500429034233093, 0.6905142068862915, 0.08019506186246872, 0.2863715887069702, 0.758762776851654, 1.5790393352508545, -0.3260616660118103, 1.050704836845398, 0.39...
def spec ( self ) : return {'vendor':'bigtop ','hadoop': get _ hadoop _ version ( ), }
[ -0.48174306750297546, 0.24495849013328552, 0.3331790864467621, -0.5479922294616699, 0.3889424204826355, -0.28674232959747314, -0.47428545355796814, 0.16112692654132843, -0.10050713270902634, 0.9337319731712341, -0.4242868423461914, -0.5459514856338501, 1.224679708480835, 0.2316547036170959...
def _ acquire _ config ( self, bracket, budget ) : # select a parent / target parent _ id = self. _ get _ next _ parent _ for _ subpop ( budget ) target = self. de [ budget ]. population [ parent _ id ] # identify lower budget / fidelity to transfer information from lower _ budget, num _ configs = bracket. get _ lower ...
[ -0.3160237669944763, 0.27325451374053955, 0.8755386471748352, 0.4243758022785187, 0.023141218349337578, 0.03722797706723213, -0.12081249803304672, 0.016814107075333595, -0.0020281998440623283, 0.11241751909255981, 0.05987057462334633, 0.8541081547737122, 0.1793339103460312, 0.4988506436347...
def unencrypt _ path ( dest, src, homedir = none, verbose = false ) : assert dest and not os. path. isdir ( dest ) and \ os. path. isdir ( os. path. dirname ( dest ) ) assert src and src. endswith ( '. gpg') and os. path. isfile ( src ) cmd = ['gpg'] if verbose : print'\ nunencrypt _ path ( % s, % s )'% ( dest, src ) c...
[ -0.32640692591667175, 0.8013609647750854, 0.8361189961433411, -0.1949816644191742, -0.29019755125045776, -0.16683681309223175, 0.27141720056533813, -0.010591816157102585, -0.2927079200744629, 0.8427848815917969, 0.11933743953704834, 0.5182732343673706, -0.4280128479003906, -0.2113263756036...
def create _ stand _ buttons ( self, group ) : stand = pedl. vboxlayout ( spacing = self. vert _ spacing, alignment = alignmentchoice. center ) # create main frame stand. addlayout ( standindicator ( group ) ) stand. addlayout ( standbutton ( group ) ) # buttonize for widget in stand. widgets : messagebutton. buttonize...
[ 0.6313473582267761, -0.24590709805488586, 0.37526488304138184, 0.4491899013519287, -0.21378612518310547, 0.5098242163658142, 0.6252313256263733, 0.04963134974241257, 0.41794946789741516, 0.25104326009750366, -0.6531701683998108, -1.0631029605865479, -0.9718049168586731, 0.4680033326148987,...
def welcome ( ) : return ( f " available routes : < br / > " f " / api / v1. 0 / precipitation < br / > " f " / api / v1. 0 / stations < br / > " f " / api / v1. 0 / tobs < br / > " f " / api / v1. 0 / < start > < br / > " f " / api / v1. 0 / < start > / < end > " )
[ -0.21538421511650085, -0.6668375134468079, 0.7167515158653259, -0.8624740242958069, 0.12825119495391846, -0.1004265695810318, -1.327800989151001, 0.42217233777046204, -0.6362332701683044, 0.9371377825737, -0.3333459496498108, 0.6575522422790527, 0.1323496550321579, 0.466361939907074, -0....
def get _ cmap ( n, name ='hsv') : return plt. cm. get _ cmap ( name, n )
[ -0.5124546885490417, -0.49804848432540894, 0.19632942974567413, 0.36133068799972534, -0.7261391878128052, -0.8456776142120361, 0.23286966979503632, -1.0223169326782227, 0.6169544458389282, -0.3756100535392761, -0.5083351731300354, 0.5417006611824036, 0.0871342197060585, 0.12321656942367554...
def get _ edge _ esn ( self ) : return self. addon. getsetting ('edge _ esn') or self. generate _ edge _ esn ( )
[ -0.5437605381011963, 0.18653148412704468, 0.51261967420578, 1.0520925521850586, 0.592138946056366, -0.3919875919818878, -0.23989716172218323, 0.27406805753707886, 0.8227197527885437, 0.45773813128471375, -0.15080417692661285, -0.0643521323800087, -0.4925161600112915, -0.3335534632205963, ...
def down _ half ( self ) : new _ interval = ( self. get _ interval ( ) - c. intvl _ min _ 2 ) % c. intvl _ octave new _ note = none if self. get _ note _ name ( ) = = c. note _ c : # c - > b new _ note = note ( c. note _ b, c. tone _ natural, new _ interval ) elif self. get _ note _ name ( ) = = c. note _ f : # f - > e...
[ 0.3851779103279114, -0.9605061411857605, 0.8058061003684998, -0.237516388297081, -0.5192384719848633, 0.7464200258255005, 0.288279265165329, -0.7706336975097656, -0.6563425064086914, -0.24469105899333954, 0.13878872990608215, 0.5541399121284485, -0.7664721608161926, -0.27541518211364746, ...
def gethighgraylevelemphasisfeaturevalue ( self ) : pg = self. coefficients ['pg'] ivector = self. coefficients ['ivector'] nz = self. coefficients ['nz'] hgle = numpy. sum ( pg * ( ivector [ none, : ] * * 2 ), 1 ) / nz return hgle
[ 0.17261944711208344, 0.2252684235572815, 0.3824901878833771, 0.48111438751220703, 0.5939907431602478, 0.6009594798088074, 0.3356679677963257, 0.48045215010643005, 0.20292340219020844, 0.4559440016746521, -0.22950628399848938, 0.7323637008666992, -0.9234078526496887, 0.49985870718955994, ...
def makeheader ( url, port, path ) : clientsocket. connect ( ( url, port ) ) clientsocket. send ( makenormalget ( url, path ) ) header = " " while " \ r \ n \ r \ n " not in header : data = clientsocket. recv ( 1 ) header + = data if " \ r \ n \ r \ n " in header : print " close " return extractcontentlength ( header )...
[ -0.4044002294540405, -0.25634142756462097, 0.6906900405883789, -0.5254948139190674, -0.7012659907341003, -0.37497878074645996, -1.1054682731628418, -0.9842491745948792, -1.6965696811676025, 0.1452789604663849, -0.28453177213668823, -0.11442482471466064, -0.4721027612686157, -0.828173100948...
def _ _ subclasshook _ _ ( cls, other _ cls ) : interface _ methods = cls. _ get _ methods ( ) driver _ methods = _ get _ method _ info ( other _ cls ) interface _ keys = interface _ methods. keys ( ) driver _ keys = driver _ methods. keys ( ) matching _ count = len ( set ( interface _ keys ) & set ( driver _ keys ) ) ...
[ -0.8136835694313049, 0.1942199021577835, 0.9042046666145325, 0.5404912829399109, -0.06622675806283951, -0.15093255043029785, 0.17231880128383636, -0.16877388954162598, 0.09864772856235504, 0.7168285846710205, 0.03068920224905014, -1.4072890281677246, 0.006487943697720766, 0.941363930702209...
def load _ tests ( loader, standard _ tests, unused _ pattern ) : folder = unit _ test _ dir pattern _ match = " test _ *. py " unit _ tests = loader. discover ( folder, top _ level _ dir = unit _ test _ dir, pattern = pattern _ match ) standard _ tests. addtests ( unit _ tests ) return standard _ tests
[ -0.02398279495537281, 0.48208826780319214, 0.5728598833084106, 0.37484970688819885, 0.34654536843299866, 0.5621426701545715, 0.21874840557575226, -0.2705187499523163, 0.27750951051712036, 0.04021626338362694, -0.35528501868247986, -0.11718952655792236, -0.4196740686893463, 0.21080057322978...
def augmentation _ scale ( image, orig _ key _ points ) : for orig _ key _ point in orig _ key _ points : if orig _ key _ point [ 0 ] = = - 1 : return none, none # 1. calculate maximum of zoom scale zm # ( 1 ) find the maximum height and width between key points argmin _ h = np. argmin ( orig _ key _ points [ :, 1 ] ) ...
[ 0.05495091527700424, -0.444278359413147, 0.99886554479599, 0.2309895008802414, -0.3824383020401001, -0.7606544494628906, -0.16324442625045776, 0.7510856986045837, 0.03738371282815933, 1.373481035232544, -0.8149009346961975, 0.5528565049171448, 0.31759870052337646, 0.5089776515960693, 0.2...
def strip _ prmtop ( prmtop, mask = " : wat, : na +, : cl - " ) : structure = pt. load _ topology ( os. path. normpath ( prmtop ) ) stripped = pt. strip ( mask, structure ) # stripped _ name = os. path. join ( os. path. splitext ( prmtop ) [ 0 ],'- stripped ', os. path. splitext ( prmtop ) [ 1 ] ) # stripped. save ( fi...
[ -0.6954713463783264, -0.8333048820495605, 0.5022780895233154, -0.07952135801315308, -0.9880057573318481, 1.1181272268295288, 0.5192375183105469, 0.12249783426523209, 0.26417815685272217, 0.4076039791107178, 0.1610080599784851, -0.11222899705171585, -0.6969612836837769, -0.9390541911125183,...
def finishmef ( siftemplate, mef, numccds ) : f = open ( mef,'w') for i in range ( numccds ) : data = open ( siftemplate % {'ccdid': i } ). read ( ) f. write ( data ) f. close ( ) return ( 0 )
[ -0.15388062596321106, -1.186932921409607, 0.19984601438045502, -0.583479106426239, 0.4094947278499603, 0.03814743831753731, 0.1572449952363968, -0.08918458968400955, -0.9082136750221252, -0.4302860200405121, -0.8488325476646423, -0.8287888765335083, -0.7968428134918213, 0.21804898977279663...
def _ namespace ( obj ) : # mostly for functions and modules and such # fixme :'wrong'for decorators and curried functions try : # xxx : needs some work and testing on different types module = qual = str ( getmodule ( obj ) ). split ( ) [ 1 ]. strip ('"'). strip ( "'" ) qual = qual. split ( '.') if ismodule ( obj ) : r...
[ -0.3069663941860199, -0.8230597376823425, 0.8129005432128906, -0.353634238243103, -0.00045197803410701454, -0.3585819602012634, 0.03793831169605255, -0.3693386912345886, 0.9824185967445374, 0.5900190472602844, -0.40811383724212646, 1.2777676582336426, 0.24184687435626984, 0.685460567474365...
def set _ 5gnr _ channelbw ( self, ibw ) : self. write ( f'conf : nrmm : meas : cc1 : cban b { ibw }')
[ -0.18572355806827545, -0.00804512295871973, 0.34708741307258606, 0.009316330775618553, 1.070472240447998, 0.8414927124977112, 1.181098461151123, -1.5453413724899292, -0.35735198855400085, 0.06220562756061554, -0.18446432054042816, 0.8190819025039673, -1.89177668094635, 0.9602946639060974, ...
def get _ full _ name ( self ) : return''. join ( [ self. first _ name, self. last _ name ] ). strip ( )
[ 0.6970204710960388, -1.1809638738632202, 0.7509884834289551, -0.7113633155822754, -0.2608492076396942, 0.4645073115825653, -1.7315363883972168, -0.029678694903850555, -0.2531436085700989, 0.009303860366344452, 0.010303420014679432, 0.16797871887683868, 0.10292528569698334, 0.27717316150665...
def file _ logging ( file _ name, loglevel = logging. info, fileformat ='[ % ( asctime ) s ] % ( levelname ) s : % ( message ) s ', filedatefmt ='% m / % d / % y % i : % m : % s % p ', filemode ='w') : # logging to file logging. basicconfig ( filename = file _ name, level = loglevel, format = fileformat, datefmt = file...
[ -0.25299936532974243, -1.4236737489700317, 0.8304623365402222, -0.4930361211299896, 0.2769226133823395, 0.49843207001686096, -0.4123176634311676, 0.04554501548409462, -1.0286097526550293, -0.1580411195755005, -0.20346614718437195, -0.1586146354675293, 0.4494166076183319, 0.6456505060195923...
def _ _ getitem _ _ ( self, key ) : index = self. _ hash _ func ( key ) while true : item = self. _ bucket _ array [ index ] if self. _ is _ empty _ or _ available ( item ) : if item is none : raise keyerror else : if item. key = = key : return item. value index = ( index + 1 ) % len ( self. _ bucket _ array )
[ 0.13686412572860718, 0.13946178555488586, 0.6570768356323242, 0.3564817011356354, -0.4248850643634796, 0.1477373093366623, 0.20920176804065704, -1.4586586952209473, -0.7492474913597107, -0.4872016906738281, 0.30423760414123535, 0.26157841086387634, 0.261923223733902, -0.4493861198425293, ...
def setup ( self ) : self. rng = rnglib. simplerng ( )
[ 0.34214261174201965, 0.20574477314949036, 0.2646780014038086, -0.6648629903793335, 0.5484544634819031, 0.5828331112861633, 0.6262311339378357, 0.6074486374855042, 0.8543111085891724, -0.7231875061988831, -1.200810432434082, -0.6451441049575806, -0.45448750257492065, 1.1010559797286987, -...
def get _ hslist ( station, year, file _ func, nfiles = 12, ht = true ) : if ht : fname = file _ func ( station, year, 1 ) else : fname = file _ func ( station, year ) data = pd. read _ csv ( fname, nrows = 1 ) headers = data. columns. tolist ( ) hlist = get _ hsensors ( headers ) sidlist = data. iloc [ 0 ]. tolist ( )...
[ -0.17728291451931, -0.5439165830612183, 0.9034194350242615, 0.45596811175346375, -0.6381925344467163, 0.3657638728618622, -0.3508985936641693, 0.5332509875297546, -0.4138873219490051, 0.5381935238838196, -0.30758535861968994, 0.4608702063560486, 0.39890456199645996, 1.1698249578475952, 0...
def _ validate _ translation _ table _ from _ dict ( translation _ table ) : validated _ translation _ table = none for locale, relations in translation _ table. items ( ) : locale = maybe _ locale ( locale ) relations = _ validate _ translation _ table _ relations ( relations ) if not relations : continue if validated...
[ 0.1898123174905777, 0.2038845270872116, 0.41513678431510925, -0.5674331784248352, -0.529649555683136, -0.17997930943965912, 0.2748268246650696, -0.10435675829648972, -0.3892025649547577, 0.150852233171463, -0.07178357988595963, -1.3810954093933105, 0.3067380487918854, -0.07309316843748093,...
def solution _ func ( t ) : return 1 / ( 1 + np. exp ( - t ) )
[ 0.11947164684534073, -0.21197493374347687, 0.329791396856308, 0.18948061764240265, 0.4140588343143463, -0.3030352294445038, 0.7512810230255127, 0.5353832244873047, -0.33927616477012634, 0.7748293876647949, -0.11859581619501114, -0.07575991004705429, 0.5746836066246033, -0.28091779351234436...
def test _ enabling _ comment _ notifications _ by _ default ( self ) : assessmentfactory ( ) asmt = assessment. query. first ( ) self. asserttrue ( asmt. send _ by _ default ) recipients = asmt. recipients. split ( ", " ) if asmt. recipients else [ ] self. assertequal ( sorted ( recipients ), [ " assessor ", " creator...
[ 0.6208273768424988, 0.10420087724924088, 0.36466631293296814, -0.15774090588092804, 1.128746509552002, 0.22720031440258026, 0.20341117680072784, -0.04519551992416382, -0.1129331961274147, 0.2136530727148056, -0.790782630443573, 0.02194039709866047, -0.4121052324771881, -0.01413186918944120...
def af _ results ( self ) : return self. _ _ af _ results
[ 0.5945428609848022, 0.10995269566774368, 0.3324151039123535, -0.012017853558063507, 0.34637027978897095, 0.07208438217639923, 0.42744776606559753, -1.113372802734375, 0.20287790894508362, -1.1839855909347534, 0.31187957525253296, -0.17722947895526886, 0.6674165725708008, 0.7637823224067688...
def _ get _ bounding _ box ( self, object _ name, color _ image ) : return np. array ( [ 200, 270, 300, 370 ] ) # return np. array ( [ 500, 500, 1000, 800 ] )
[ -0.9555341601371765, -0.48396918177604675, 0.46596378087997437, -0.22481167316436768, 1.0059566497802734, -0.39271020889282227, -0.2743002474308014, -0.4656580686569214, 0.5808247327804565, 0.42946165800094604, -0.2590341866016388, 0.9975638389587402, 0.33504900336265564, 0.343876630067825...
def testgettaginstancewithbinaryvalue ( self ) : tagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) objectid = uuid4 ( ) thriftvalue = createbinarythriftvalue ('hello, world! ','text / plain') self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : yield self...
[ 0.1270517110824585, 0.1800331026315689, 0.44188904762268066, -0.5185263156890869, -0.010406384244561195, 0.5421761870384216, -0.06766154617071152, -0.5674136281013489, -0.48927024006843567, -0.28703027963638306, -0.9816067814826965, 0.21172933280467987, -0.2152751386165619, 0.6503417491912...
def factorial _ n ( n ) : return math. factorial ( n )
[ -0.004168780520558357, 1.1287568807601929, -0.21027511358261108, 0.6582969427108765, 0.18928763270378113, -0.9621171355247498, -0.06584376096725464, -0.27754083275794983, -0.29620832204818726, -1.6452962160110474, -0.3646973967552185, 0.2706274092197418, 0.8498971462249756, 0.8074017763137...
def parse ( term ) : if not validate ( term ) : raise exception ( " malformed term : % s " % term ) year = int ( term [ 1 : ] ) season = seasons. index ( term [ 0 ] ) return ( year - epoch ) * len ( seasons ) + season
[ -0.5658465027809143, -0.48232796788215637, 0.7575718760490417, -0.15768657624721527, -1.0637338161468506, 0.03402369096875191, 0.24162010848522186, 0.7313025593757629, 0.4087084233760834, 0.48735857009887695, -0.7009674310684204, 0.7823213934898376, 0.08411487191915512, -0.7894616723060608...
def latex _ heading ( name, street _ address, city _ state _ zip, email, phone ) : return r " " " \ documentclass [ letterpaper, 10pt ] { article } \ usepackage [ margin =. 5in, includehead, headsep = 0mm, headheight = 30pt ] { geometry } \ usepackage [ utf8 ] { inputenc } \ usepackage [ english ] { babel } \ usepackag...
[ 0.6251131296157837, -0.46624690294265747, 1.1450309753417969, -0.6114100813865662, -0.6232613325119019, -0.1473633050918579, -0.32836148142814636, 0.36326712369918823, 0.05532225966453552, 0.3936459422111511, 0.5335177183151245, -0.3650313913822174, 0.36693134903907776, -0.4435881078243255...
def do _ part ( self, seq, * * kwargs ) : key = none for attempt in range ( self. retries ) : getlogger ( ). debug ( " attempt % d / % d to transfer part % d ", attempt, self. retries, seq ) with self. source. chunkfile ( seq, * * kwargs ) as part : try : def cb ( tx, total ) : readcontrol ( ) make _ progress ( {'part'...
[ -0.32786041498184204, 0.20392802357673645, 0.8675203919410706, -0.2846435010433197, -0.3036600351333618, 0.15741007030010223, 0.45025795698165894, -0.3899984359741211, -0.3110065758228302, 0.6455861330032349, -0.43729475140571594, -0.6777650117874146, -1.147061824798584, -0.012817744165658...
def overlap _ with _ complextargetset ( self, cts, translator, verbose = false, human _ ensmbl _ to _ human _ gene _ symbol = none, # for the sets _ table only, if given. pum _ targ _ gene _ symbols = none, # for the sets _ table only, if given. ) : translator. refresh ( ) sets _ table = [ ] if verbose : print ( " this...
[ -0.29123833775520325, -0.4366861581802368, 0.7267897725105286, 0.014198042452335358, -0.3290853798389435, -0.6501836776733398, 0.2550545036792755, 0.7156946063041687, -0.00937749445438385, 0.026315398514270782, -0.20731784403324127, 0.21931155025959015, 0.4633687436580658, -0.0312612354755...
def field _ info ( self ) : if self. _ field _ info is none and \ self. _ field _ info _ class is not none : self. _ field _ info = self. _ field _ info _ class ( self ) return self. _ field _ info
[ 0.3368082046508789, -0.27958744764328003, 0.3742522597312927, -0.5845523476600647, 0.7676554918289185, 0.5522632598876953, 0.15313230454921722, -1.1604015827178955, 0.015179216861724854, -1.0655492544174194, -0.8075148463249207, -0.30053454637527466, 0.2545425295829773, -0.2879016101360321...
def cast ( * args ) : return _ itkimageserieswriterpython. itkimageserieswriterius3ius2 _ cast ( * args )
[ -0.9751214385032654, -0.7205691337585449, 0.19162407517433167, -0.45435044169425964, 0.2605397403240204, 0.5885151624679565, -0.5065310001373291, -0.632037878036499, 0.2930801510810852, 1.2435636520385742, 0.4259216785430908, 0.2776990532875061, -1.0007847547531128, 0.15498973429203033, ...
def setdiameter ( self, diameter ) : if diameter > 35 or diameter < 0. 1 : raise pumperror ( " % s : diameter % s mm is out of range " % ( self. name, diameter ) ) # todo : got to be a better way of doing this with string formatting diameter = str ( diameter ) # pump only considers 2 d. p. - anymore are ignored if len ...
[ -0.5551832318305969, -0.5909285545349121, 0.9102383852005005, 0.24914680421352386, -0.5805073380470276, 0.37046265602111816, 0.6559723615646362, -0.5877023935317993, 0.9618949890136719, -0.28350070118904114, 0.5328845381736755, 0.39695608615875244, -0.8145966529846191, 0.4810209572315216, ...
def get _ queryset ( self ) : return question. objects. order _ by ('- pub _ date') [ : 5 ]
[ 0.5862158536911011, -0.22422456741333008, 0.5476636290550232, 0.6342774629592896, 0.010896461084485054, 0.6433711647987366, -0.08901461213827133, -0.4455724358558655, -0.9056409001350403, -0.1636219471693039, 0.6473675966262817, -0.10297095030546188, -0.15291042625904083, 0.016322512179613...
def test _ _ app _ manager _ delete _ non _ existant _ user _ _ raises ( am ) : with pytest. raises ( usernotexistserror ) : am. delete _ user ( username = " uname " )
[ 0.35134512186050415, 0.5895108580589294, 0.197610542178154, 1.2051773071289062, 0.07134522497653961, 0.9884544014930725, -0.08194469660520554, 0.28570112586021423, -0.28435301780700684, -0.009797935374081135, -0.24647016823291779, -0.49467429518699646, 0.07319167256355286, 1.68722105026245...
def findimports ( node ) : tag = etree. qname ( node. tag ). localname if tag = = " import " : otherfile = node. attrib. get ( " schemalocation ", "?? " ) if otherfile not in { " xml. xsd ", " teix. xsd " } : sep = " / " if schemadir else " " otherpath = f " { schemadir } { sep } { otherfile } " otherexists = fileexist...
[ 0.3026280105113983, -0.2308863252401352, 0.8822582364082336, 0.1033645048737526, 0.4176281690597534, 0.13635185360908508, 0.6533951759338379, -0.49478694796562195, 0.097669318318367, 0.2750355303287506, -0.3028409779071808, -0.8535774350166321, 0.3607691824436188, 1.6900936365127563, -0....
def _ create _ tester ( casing : str, handler : callable [ [ any ], str ] ) - > callable [ [ str ], none ] : def tester ( key : str ) - > none : stripped = key. strip ( ) if stripped and handler ( stripped )! = stripped : raise caseerror ( key = key, case = casing, expected = handler ( key ) ) return tester
[ 0.021026896312832832, -0.5582813620567322, 0.33921435475349426, -0.8094133138656616, -0.7811803817749023, 0.5740464329719543, 0.008964394219219685, -0.0785192921757698, -0.3938111662864685, -0.06912149488925934, 0.01817447878420353, 0.15756016969680786, 0.05215387046337128, 1.0709966421127...
def test _ directory _ is _ idempotent ( file, tmp _ path ) : name = tmp _ path / " a _ dir _ twice " extra _ kwds = { } if is _ windows : extra _ kwds [ " win _ owner " ] = salt. utils. win _ functions. get _ current _ user ( with _ domain = true ) ret = file. directory ( name = str ( name ), * * extra _ kwds ) assert...
[ -0.7033622860908508, 0.5158013105392456, 0.42771467566490173, 0.433624267578125, 0.1847938448190689, 0.5534377694129944, 1.015504002571106, -0.1510094702243805, 0.4883694648742676, -0.9133087396621704, -0.3553018271923065, 0.524071991443634, -0.27739807963371277, 0.7499687671661377, -0.3...
def _ initialize _ interpolator ( self, q, max _ rot _ vel = 0. 5 ) : if not self. _ interpolator : # setup poses start _ pose = self. _ kinematics. get _ tool _ pose ( q ) self. _ start _ pose = start _ pose print ( " start pose : ", start _ pose ) print ( " stop pose : ", self. _ target _ pose ) # setup interpolator ...
[ -0.9100335836410522, 0.007925326935946941, 0.6329959630966187, -0.6091761589050293, -0.17723672091960907, -0.029734062030911446, 0.3573928773403168, 0.12347445636987686, 0.4370030164718628, -0.14612416923046112, -0.6589219570159912, -0.10672040283679962, -0.30541104078292847, 0.31609266996...
def find _ num _ of _ elements ( carray, lim, side = 0 ) : # # - - - assume that the huge limit value means that there is no limit # if abs ( lim ) > 1e6 : return 0 if side = = 0 : out = numpy. where ( carray < lim ) else : out = numpy. where ( carray > lim ) try : cnt = len ( out [ 0 ] ) except : cnt = 0 return cnt
[ 0.18796133995056152, 0.10131541639566422, 0.6097529530525208, -0.11532535403966904, -0.19873733818531036, -0.3221098780632019, 0.3586544990539551, 0.4042813181877136, 0.6790017485618591, -0.3808596730232239, -0.29472440481185913, 0.2978169620037079, -0.46666932106018066, 0.5210395455360413...
def add _ three ( x : int ) - > int : return x + 3
[ -0.4373834431171417, 1.242818832397461, 0.26411670446395874, -0.40021196007728577, -0.012421824038028717, 1.0436345338821411, -1.3185110092163086, -0.2626299262046814, 0.5356048345565796, -0.4528147876262665, -1.3629337549209595, 0.04892655834555626, 0.47824013233184814, -1.477376580238342...
def unpickle ( file _ ) : if isinstance ( file _, basestring ) : return pickle. load ( open ( file _, openmode. rb ) ) else : return pickle. load ( file _ )
[ 0.019883746281266212, 0.01874491199851036, 0.5755901336669922, -0.5318763852119446, -0.35832372307777405, -0.08151300251483917, -0.14883831143379211, 0.3487781584262848, -0.9246430397033691, -0.5918831825256348, 0.5997678637504578, -0.4831583499908447, -0.31902387738227844, -0.963334918022...
def async _ get _ options _ flow ( config _ entry : config _ entries. configentry, ) - > yalexsbleoptionsflowhandler : return yalexsbleoptionsflowhandler ( config _ entry )
[ 0.9305792450904846, -0.18807511031627655, 0.15995696187019348, 0.8299692273139954, 1.2842150926589966, -0.16085098683834076, 0.5909804105758667, -0.3096139132976532, 0.8924526572227478, -0.14499346911907196, 0.29840758442878723, 0.6302016973495483, 0.41483330726623535, -0.48669394850730896...
def _ init _ shopify ( ) : shopify. shopifyresource. site = _ site shopify. shopifyresource. user = os. environ ['shopify _ api _ key'] shopify. shopifyresource. password = os. environ ['shopify _ password']
[ -0.982329785823822, -0.18621650338172913, 0.16091662645339966, 0.12351081520318985, 0.2076362520456314, -0.43799763917922974, -0.031186150386929512, -0.45937252044677734, 0.39085742831230164, 0.07272370159626007, -1.655933141708374, 0.5959773659706116, 0.6267396807670593, 0.349626213312149...
def _ _ init _ _ ( self, imagemsg ) : self. _ rospyimage = imagemsg self. _ numpyarray = self. _ converttonumpy ( imagemsg )
[ -0.43445271253585815, 0.010230902582406998, 0.20066098868846893, 0.10912486910820007, 0.7404145002365112, -1.0318831205368042, 0.3952576518058777, -0.302616685628891, 0.4643729627132416, -0.13222035765647888, 0.13127921521663666, 0.11319854855537415, 0.006985622923821211, 1.358751177787780...
def set ( self, * args ) : assert len ( args ) in ( 1, 2 ) if len ( args ) = = 1 : value = args [ 0 ] self. _ impl. set ( value ) else : index, value = args if isinstance ( value, real ) : self. _ impl. settpldbl ( tuple ( index ). _ impl, value ) elif isinstance ( value, basestring ) : self. _ impl. settplstr ( tuple ...
[ -1.435949683189392, 0.3482346534729004, 0.45124271512031555, -0.6251890659332275, 0.1832127720117569, 0.6605652570724487, 0.5133289098739624, -0.9280945658683777, -0.3949083089828491, -0.05648484453558922, -0.47409340739250183, 0.17384304106235504, -0.29679661989212036, 0.12963832914829254...
def ampersand ( ) : return [ [ 0, 1, 1, 0, 0 ], [ 1, 0, 0, 1, 0 ], [ 1, 0, 0, 1, 0 ], [ 0, 1, 1, 0, 0 ], [ 1, 0, 1, 0, 1 ], [ 1, 0, 0, 1, 0 ], [ 0, 1, 1, 0, 1 ], ]
[ -0.7717718482017517, -0.7157435417175293, 0.8048043847084045, -0.5852947235107422, -0.21141454577445984, -0.10424566268920898, 0.470398485660553, -0.5573136210441589, 0.8579760789871216, 0.609856367111206, -0.9190967679023743, 0.41473665833473206, -0.20649591088294983, 0.8800349831581116, ...
def test _ flattendeprecated ( self ) : warningsshown = self. flushwarnings ( [ self. test _ flattendeprecated ] ) self. assertequal ( len ( warningsshown ), 0 ) # trigger the deprecation warning. text. flatten warningsshown = self. flushwarnings ( [ self. test _ flattendeprecated ] ) self. assertequal ( len ( warnings...
[ -0.33761149644851685, 0.605199933052063, 0.46345552802085876, -0.5147188901901245, -0.017632098868489265, -0.8326191306114197, -0.6499718427658081, 0.17583060264587402, -0.23867793381214142, -0.2125108689069748, -0.749320387840271, 0.5808973908424377, -0.5163034200668335, 0.050956040620803...
def step ( self, action ) : raise notimplementederror
[ -1.0806560516357422, -0.2852545380592346, 0.287894070148468, 0.2946639657020569, 0.4101586639881134, 1.0559475421905518, 0.5155857801437378, 0.07815910875797272, 0.1992596983909607, -0.9046633839607239, -0.7404063940048218, 0.2746099829673767, 0.4545932710170746, 0.945610523223877, -0.73...
def get ( longitude, latitude, km ) : apartments, price _ sqm, living _ area _ sqm = apartmentlocationrepository. get ( longitude, latitude, km ) return ( {'livingareasqmmean': round ( living _ area _ sqm, 2 ),'pricesqmmean': round ( price _ sqm, 2 ),'apartments': apartments } )
[ -0.19396816194057465, -0.303506463766098, 0.2616269290447235, -0.5883516073226929, -0.6937249898910522, -0.05003923177719116, -1.3935517072677612, 0.24060462415218353, -0.4801943004131317, 0.18019500374794006, -0.3821643888950348, -0.7005196213722229, 0.29302045702934265, -0.27390730381011...
def _ _ switchtoinput ( self, source ) : source. remove ( source. get _ child ( ) ) entry = gtk. entry ( ) if source is self. btnnickname : entry. set _ text ( str ( self. _ myview. nick ) ) elif source is self. btnpsm : entry. set _ text ( str ( self. _ myview. psm ) ) source. add ( entry ) entry. show ( ) entry. grab...
[ -0.20441889762878418, 0.006225732620805502, 0.42219510674476624, -0.6463107466697693, -0.687889575958252, -0.05839956924319267, 0.4875267446041107, 0.3996707499027252, 0.4436614513397217, -0.16714374721050262, -0.6757015585899353, 0.21140609681606293, -0.3582128584384918, 0.205262959003448...
def merge ( * spectra ) : partials = [ ] for spectrum in spectra : partials. extend ( spectrum. partials ) s = spectrum ( partials ) return s
[ 0.16980718076229095, -0.6092294454574585, 0.40115317702293396, 0.36912086606025696, -0.6645944118499756, 0.9186874032020569, -1.1316899061203003, -0.10173901915550232, 0.7535168528556824, -0.8754847049713135, -0.31724897027015686, -0.7646144032478333, -1.5045578479766846, 0.139619767665863...
def create _ dummy _ value _ unplaced ( ) : value = 10. 0 type _ signature = computation _ types. tensortype ( tf. float32 ) return value, type _ signature
[ 0.6064726114273071, 0.36513400077819824, 0.38176363706588745, -1.0987869501113892, 1.6581875085830688, 0.36233648657798767, 1.0902767181396484, -0.04127628356218338, -0.779742419719696, -0.04877246171236038, -1.2813233137130737, -0.04542578384280205, 0.46806541085243225, 0.6509135365486145...
def delete _ request ( request _ id ) : cur. execute ( " delete from requests where id = % s ; ", ( request _ id, ) )
[ -0.06950882077217102, 0.022979477420449257, 0.06081332638859749, 0.2349943369626999, 0.7822011709213257, -0.1984335333108902, -1.1542630195617676, -0.2920660972595215, 0.4430294334888458, -0.4022076427936554, 0.5521100163459778, 0.19896894693374634, 0.10908559709787369, 0.5205041766166687,...
def rollback ( dev _ project : str, project : str, env : str, target _ release : str, run _ mode : str ) - > none : steps = plan. get _ rollback _ plan ( gcs. gcsclient ( dev _ project ), appengine. appengineadmin ( project ), env, target _ release ) print ('rollback steps : \ n \ n') for step in steps : print ( f'{ st...
[ 0.34191906452178955, 0.19519267976284027, 0.6244531869888306, 0.0896385982632637, 0.5222650766372681, 0.8390614986419678, -0.12197452038526535, -0.5459457039833069, -0.9513562321662903, 0.17886686325073242, 0.312539279460907, 0.7574337720870972, -0.2678857445716858, -0.5162947773933411, ...
def get _ business _ documents ( identifier : str, document _ name : str = none ) : # basic checks if not authorized ( identifier, jwt, ['view ', ] ) : return jsonify ( message = get _ error _ message ( errorcode. not _ authorized, * * {'identifier': identifier } ) ), httpstatus. unauthorized business = business. find ...
[ -1.1444177627563477, -0.644659161567688, 0.9569637179374695, 0.5714409947395325, -0.797892689704895, -0.4615781605243683, -0.11561312526464462, -0.2911493182182312, 0.4883131682872772, 0.47877466678619385, -0.36955147981643677, 1.0479497909545898, -0.7127130627632141, 0.11199317127466202, ...
def max _ min ( * time ) : return 120 - min ( hand _ angles ( hand _ positions ( * time ) ) )
[ 0.14991521835327148, -0.2913495600223541, 0.3317808210849762, 0.6317745447158813, -0.9462974071502686, 0.22437264025211334, -1.289088487625122, -0.8740038275718689, 0.14798018336296082, -0.31642186641693115, -0.25618883967399597, -0.577072262763977, 0.1876213699579239, -0.14539334177970886...
def setvsspeed ( index ) : return none
[ 0.2642853558063507, 0.33319467306137085, 0.33237409591674805, 0.972353994846344, 0.545981228351593, -0.41243311762809753, 0.043991103768348694, -0.173362597823143, 1.101211667060852, 0.4582357108592987, -1.053040623664856, 0.052643679082393646, -1.3602277040481567, -0.24371851980686188, ...
def file _ extension ( file ) : filename _, file _ extension _ = os. path. splitext ( file ) # ext return file _ extension _ [ 1 : ]
[ 0.8292279243469238, 0.39047160744667053, 0.48551344871520996, 0.9246230721473694, 0.0826825201511383, 0.39715924859046936, 0.33586329221725464, 1.214410662651062, -0.0927901417016983, 0.741662323474884, -0.3570328652858734, 0.02760324813425541, 0.37412336468696594, 0.03408607468008995, 0...
def merge _ rt _ data ( wikidata _ df, rating ) : rt _ df = json _ to _ df ('rotten - tomatoes') rt _ df = rt _ df [ ['rotten _ tomatoes _ id ', rating ] ] rt _ df = rt _ df. dropna ( subset = [ rating ] ) wikidata _ df = pd. merge ( wikidata _ df, rt _ df, on ='rotten _ tomatoes _ id') return wikidata _ df
[ -0.8922985196113586, 0.6479358673095703, 0.4810091555118561, -0.9188658595085144, 0.2525518834590912, 0.5566086173057556, -1.4819415807724, 0.4868016242980957, -0.5587083697319031, 0.864430844783783, 0.005546978674829006, 0.06725773215293884, -0.04311259090900421, -1.1335338354110718, -0...
def get _ class _ perms ( cls ) : if not issubclass ( cls, model ) : raise exception ( " get _ class _ perms must take a subclass of model as first arg " ) return perms _ dict [ cls ]. class _ perms
[ -0.588420033454895, 0.2276959866285324, 0.7480443120002747, 0.776157796382904, -0.5150893330574036, 0.42939603328704834, 0.32722216844558716, -0.21930107474327087, -0.08208712935447693, 0.5885318517684937, -0.8188341856002808, -0.23223388195037842, -0.07868069410324097, 0.7015188932418823,...
def bssc _ init _ fields ( self, log, field _ names ) : # pylint : disable = no - self - use for field in field _ names : if field = = barrele _ constant. barrele _ field _ host : continue if field = = barrele _ constant. barrele _ field _ up : self. bssc _ is _ up ( log ) elif field = = barrele _ constant. barrele _ f...
[ -0.5115545988082886, 0.5190507769584656, 0.6332638263702393, 0.4198073744773865, 0.9785633087158203, -0.11727987229824066, -0.009332564659416676, -0.08927564322948456, -1.2029091119766235, -0.14446239173412323, -0.9054809212684631, 0.3002074062824249, 0.24629126489162445, 0.056129448115825...
def to _ chars _ superpixels ( im, args ) : # ensure this is single channel greyscale im = im. convert ('l') # samples per pixel ( ratio of these is assumed char aspect ratio ) # 2, 4 for full 8 dot braille, or 2, 3 for 6 dot braille horiz _ samples = 2 vert _ samples = 4 # scale down to desired size pixels _ across = ...
[ -0.40411576628685, -0.22009919583797455, 1.1646288633346558, -0.2051759958267212, -0.3926997184753418, -0.23342613875865936, -0.22248636186122894, -0.01642961986362934, 0.34427645802497864, 0.5038890838623047, 0.014325305819511414, 0.28630486130714417, 0.10834765434265137, -0.1816075295209...
def test _ from _ dict ( self ) : # run / check with self. assertraises ( notimplementederror ) : scipywrapper. from _ dict ( { } )
[ 0.03359488025307655, 0.3252164125442505, 0.3378637433052063, -0.8480021357536316, 0.21679310500621796, 1.3309104442596436, -0.39836585521698, 0.15824945271015167, 0.8657124638557434, -0.2706327736377716, 0.6821146011352539, 0.37389111518859863, 0.5814452767372131, 0.5671138167381287, 0.8...
def transcale _ 2 _ affine ( ts _ matrix ) : w, tx, h, ty = tf. split ( ts _ matrix, 4 ) return tf. concat ( [ w, [ 0 ], tx, [ 0 ], h, ty ], axis = 0 )
[ 0.24917390942573547, 0.15372003614902496, 0.6926807165145874, -0.3402048647403717, -0.16017958521842957, -0.8552920818328857, -0.8556289672851562, -0.18669699132442474, -1.2141371965408325, 1.5421247482299805, -0.07503240555524826, -0.8715376853942871, 0.7289485335350037, -0.30954062938690...
def test _ info ( self ) : bind = create _ group ( ) info = attributeinfo ( bind. attrs ) info. doc = " documentation " mapper = attributetypemapper ( bind ) assert mapper. info = = info
[ -0.020076386630535126, -0.8244799375534058, 0.18982964754104614, -0.0000012379425697872648, -0.5677756071090698, 0.9359099268913269, 0.2681015729904175, -0.761301577091217, -0.20225642621517181, -0.3653237223625183, -0.15159377455711365, 0.16782419383525848, 0.7684685587882996, 0.221182927...
def search ( self, word : str ) - > bool : node = self. trie for w in word : if w not in node : return false node = node [ w ] return'#'in node # check if word is inserted or just a prefix
[ 0.37268713116645813, 0.9606453776359558, 0.5666462182998657, -0.14989718794822693, -0.4211011826992035, 0.7908188700675964, -0.3875275254249573, 0.5151006579399109, 0.08955758064985275, -0.2570534348487854, 0.5408849120140076, 0.19176943600177765, -1.140553593635559, 0.8116604685783386, ...
def scheduled _ status _ update ( self, id : union [ status, idtype ], scheduled _ at : datetime ) - > scheduledstatus : scheduled _ at = self. _ _ consistent _ isoformat _ utc ( scheduled _ at ) id = self. _ _ unpack _ id ( id ) params = self. _ _ generate _ params ( locals ( ), ['id'] ) return self. _ _ api _ request...
[ -1.3806536197662354, -1.322562336921692, 0.17248383164405823, -0.31685134768486023, -0.36700692772865295, -0.08371845632791519, -1.1714046001434326, 0.13043545186519623, 0.4147113561630249, 0.12539681792259216, -1.47404944896698, 0.7434245944023132, -0.24159182608127594, -1.268731713294983...