text
stringlengths
25
2.19k
embedding
listlengths
768
768
def set _ um _ freq _ zpe ( self, v _ um, zpe _ um ) : if self. nmode : self. nmode. set _ um _ freq _ zpe ( v _ um, zpe _ um ) else : raise valueerror ( " nmode not defined for well, cannot set values. " )
[ -0.951562762260437, -0.13105076551437378, 0.5042535066604614, 0.37022796273231506, -0.172136589884758, 0.2261989265680313, 1.021712303161621, -0.10506913810968399, 0.6555991768836975, 0.29673027992248535, 0.34682294726371765, 0.5776386857032776, -0.46723952889442444, 0.719589352607727, -...
def conditiontext ( self ) : return''. join ( [ cond. conditiontext ( ) for cond in self. conditionlist ] ) [ 4 : ]
[ 0.2964118421077728, -1.1897283792495728, 0.21102890372276306, 0.2084893435239792, -0.624987006187439, 0.347451388835907, -0.19221466779708862, 0.022164564579725266, -0.01678338460624218, 0.7288115620613098, 0.05448006093502045, -0.7495372891426086, -1.2561336755752563, 0.3022785484790802, ...
def find _ voxel ( x, y, z, g ) : # g is grid boundaries i = max ( 0, int ( ( x - g [ " xlo " ] ) / / g [ " dx " ] ) ) j = max ( 0, int ( ( y - g [ " ylo " ] ) / / g [ " dy " ] ) ) k = max ( 0, int ( ( z - g [ " zlo " ] ) / / g [ " dz " ] ) ) return ( i, j, k )
[ 0.049220092594623566, -0.27283865213394165, 0.4975997805595398, 0.328575074672699, 0.13293321430683136, -0.4936909079551697, 0.06509312242269516, -0.5261498689651489, -1.3567827939987183, 0.7222463488578796, -0.3543960452079773, -0.45988601446151733, -0.3744685649871826, 0.1305769830942154...
def jaccard _ similarity ( set _ a, set _ b, assume _ unique = true ) : if not assume _ unique : set _ a = np. unique ( set _ a ) set _ b = np. unique ( set _ b ) n _ elements _ a = len ( set _ a ) n _ elements _ b = len ( set _ b ) n _ total = n _ elements _ a + n _ elements _ b if n _ total = = 0 : return 1. 0 else :...
[ 0.3591809570789337, 0.7779459357261658, 0.9325979948043823, -0.6603237986564636, -0.18950970470905304, -0.5316039323806763, 0.1252915859222412, 0.2788275182247162, 0.05318759009242058, 1.3811955451965332, 0.4538351893424988, 0.7891066670417786, -0.3459831476211548, 0.29783692955970764, 0...
def set _ name ( self, name ) : name = try _ again ( get _ input,'hello, what is your name?') if name is none else name self. name = name
[ -0.4500768780708313, 0.05867217108607292, 0.4123414158821106, 0.5391073226928711, -0.11338881403207779, -0.27624228596687317, 0.17170637845993042, -0.9202879071235657, -0.23689530789852142, -0.0984567329287529, -1.0967251062393188, -0.11069934815168381, -0.46769770979881287, 0.138073399662...
def lucas ( m ) : if m = = 1 : return 2 elif m = = 2 : return 1 else : return lucas ( m - 1 ) + lucas ( m - 2 )
[ 0.19993966817855835, -0.39599794149398804, 0.3750578463077545, 0.7764638066291809, -0.47476187348365784, -0.2233370989561081, -0.4473167359828949, 0.3024151623249054, 0.2934998571872711, -0.5154542326927185, 0.1517471969127655, 0.2639177739620209, -0.7690661549568176, 0.14120207726955414, ...
def to _ output ( self, value ) : return json. loads ( resolwe _ runtime _ utils. save _ dir ( self. name, value. path, * value. refs ) )
[ -1.315414309501648, -0.7677137851715088, 0.29909899830818176, -1.0421472787857056, -0.28187066316604614, -0.8771435022354126, 0.2678348124027252, -1.5690066814422607, -0.2297758311033249, 0.8042859435081482, -0.2893522381782532, -0.17678000032901764, -0.2715776562690735, -0.016389973461627...
def timeit ( func = none, good = 2, ok = 30, good _ face = u'o ( ) d ', ok _ face = u'( • • ) ', bad _ face = u'( ` )') : # if good standard is lower than ok standard, then make good and ok the # same standard ; the result is there are only two grades, good and bad good = ok if good > ok else good def decorator _ timei...
[ -0.7152254581451416, 0.43363335728645325, 0.7644920349121094, -0.3725729286670685, -0.10779958218336105, 0.686163067817688, -0.01393246091902256, -0.4301760792732239, -0.16381190717220306, 0.6826446652412415, -0.15804529190063477, 1.0208278894424438, 0.7578213810920715, 0.18500998616218567...
def getajaxargs ( ) : data = uiglobals. web. data ( ) return json. loads ( data )
[ -0.8626706600189209, -0.2656508684158325, 0.6394754648208618, -0.7274760603904724, -0.8299098610877991, 0.317518025636673, -0.9305176138877869, -0.38144737482070923, -0.27956297993659973, 0.6738332509994507, -1.141663670539856, 0.4677945375442505, -0.7327513098716736, 0.7012187242507935, ...
def _ _ region _ y _ update _ ui ( self ) : if self. _ _ ui _ update : for output in self. selected _ outputs : output. ui. region _ y = self. _ _ render _ region _ y _ spin _ box. value ( )
[ -0.6619293689727783, -1.281196117401123, 0.35092636942863464, -0.0883273184299469, 0.09930935502052307, -0.9092527627944946, 0.94154292345047, -0.722037672996521, -0.017642244696617126, -0.5324917435646057, -0.2932110130786896, 0.3716495633125305, -0.5373796224594116, 0.6336702704429626, ...
def _ f _ objective ( self, job _ info ) : config, budget, parent _ id = job _ info ['config'], job _ info ['budget'], job _ info ['parent _ id'] bracket _ id = job _ info ['bracket _ id'] fitness, cost = self. de [ budget ]. f _ objective ( config, budget ) run _ info = {'fitness': fitness,'cost': cost,'config': confi...
[ -0.08279092609882355, 0.09736445546150208, 0.6520549058914185, -0.023801108822226524, -0.6911724209785461, -0.5889298915863037, -0.6267587542533875, -0.5498427748680115, -1.7682678699493408, -0.04883964732289314, -0.2753138542175293, -0.2302437573671341, 0.725347101688385, 0.08485531806945...
def gaussian _ repr ( x ) : mean = x [..., : 2 ] cov _ shape = tuple ( list ( x. shape [ : - 1 ] ) + [ 2, 2 ] ) covmat = np. stack ( [ x [..., 2 ], x [..., 3 ], x [..., 3 ], x [..., 4 ] ], axis = - 1 ). reshape ( cov _ shape ) return mean, covmat
[ -0.5351952314376831, 0.12171816825866699, 0.6301299333572388, -0.8088268637657166, -0.8330792188644409, -0.19702079892158508, 0.20941777527332306, -0.049178510904312134, 0.22338880598545074, 1.6472889184951782, -0.718075692653656, 1.0534361600875854, 0.5230061411857605, -0.7555115222930908...
def _ find _ ntc _ family ( guide _ id ) : guide _ id _ list = guide _ id. split ('_') return'_ '. join ( guide _ id _ list [ 0 : 2 ] )
[ -0.39301493763923645, 0.1862238645553589, 0.39206942915916443, -0.9343827366828918, -0.5902600884437561, -0.9032624363899231, -0.043170034885406494, -1.0278279781341553, -1.125449776649475, 0.9259786605834961, -0.2822861075401306, -0.49910250306129456, -0.03661923483014107, 0.5161579251289...
def gelu ( x ) : cdf = 0. 5 * ( 1. 0 + tf. tanh ( ( np. sqrt ( 2 / np. pi ) * ( x + 0. 044715 * tf. pow ( x, 3 ) ) ) ) ) return x * cdf
[ 0.43893709778785706, 0.9402506947517395, 0.5181849598884583, -0.3406051695346832, -0.6670374870300293, 0.8435864448547363, 0.16134200990200043, 0.6021041870117188, 0.5028032064437866, -0.010663863271474838, -0.9109612107276917, 0.1009824275970459, 0.09176292270421982, -0.7954267263412476, ...
def getdistance2 ( lata, lona, latb, lonb ) : radlata = radians ( lata ) radlona = radians ( lona ) radlatb = radians ( latb ) radlonb = radians ( lonb ) a = radlata - radlatb b = radlona - radlonb s = 2 * asin ( sqrt ( pow ( sin ( a / 2 ), 2 ) + cos ( radlata ) * cos ( radlatb ) * pow ( sin ( b / 2 ), 2 ) ) ) s = s * ...
[ 0.9378439784049988, -0.7137820720672607, 0.6828295588493347, -0.544524610042572, -0.07285862416028976, 0.019783882424235344, -0.4569147229194641, 0.29489636421203613, 0.16104482114315033, -0.2986091375350952, -0.6019194722175598, 0.23465916514396667, 0.589780330657959, -0.12783826887607574...
def calculate _ avg ( instance ) : i = instance. n _ one _ star _ votes ii = instance. n _ two _ stars _ votes iii = instance. n _ three _ stars _ votes iv = instance. n _ four _ stars _ votes v = instance. n _ five _ stars _ votes n _ votes = instance. n _ votes n _ stars = ( i * 1 ) + ( ii * 2 ) + ( iii * 3 ) + ( iv ...
[ -1.5260368585586548, 0.4759919345378876, 0.31820449233055115, -0.3507233262062073, -0.4325147867202759, 0.12339568138122559, 0.20667873322963715, 0.20101597905158997, -0.27049654722213745, 1.167099118232727, -0.8704921007156372, 0.38704460859298706, -0.6648342609405518, 0.8861637711524963,...
def is _ absolute _ href ( href ) : parsed = urlparse ( href ) return parsed. scheme! ='' or os. path. isabs ( parsed. path )
[ -0.10375086218118668, -0.410126656293869, 0.587463915348053, -0.07576866447925568, 0.15726663172245026, 0.2254534810781479, -0.3383503556251526, -0.01203133538365364, 0.30781877040863037, 0.31503838300704956, 0.4628969728946686, 0.04135209321975708, 0.11192342638969421, 0.23835919797420502...
def load _ input ( input _ file : str ) - > any : with open ( input _ file, " rb " ) as fp : try : input _ data = _ read _ formatted ( fp ) except deserializationexception : info ('no data format specified.'' assuming input data is pickle format') fp. seek ( 0 ) try : input _ data = pickle. load ( fp ) except pickle. u...
[ -0.08135798573493958, -0.267112135887146, 0.4971843659877777, -0.5414830446243286, -0.2961805462837219, 0.1736920177936554, -0.41874879598617554, -0.043992795050144196, -0.15925393998622894, -0.7090469002723694, 0.42658114433288574, -0.43919312953948975, -0.4536452889442444, -0.70826315879...
def getfilesize ( self ) : return ( self. fieldtodec ( self. fileheader. filesize ) )
[ 0.7217820286750793, -0.35463687777519226, 0.5939602255821228, -0.6516854166984558, 0.9005481600761414, -0.3180224895477295, -0.17087328433990479, -0.16026616096496582, -1.0533632040023804, -1.3673526048660278, -0.07236696779727936, -0.8932660222053528, -0.42866450548171997, 0.0950896665453...
def setseriesformat ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterius3ius2 _ setseriesformat ( self, * args )
[ -1.1912606954574585, -0.3516961634159088, 0.1729160100221634, -0.17782802879810333, -0.31313592195510864, -0.2717205584049225, -0.5825225114822388, -0.588612973690033, 0.41354718804359436, 0.12236309796571732, -0.18297557532787323, 1.0593376159667969, -0.6633540987968445, 0.410673856735229...
def get _ scene _ by _ id ( self, scene _ id : str ) - > dict : return self. scenes [ scene _ id ]
[ -0.4035875201225281, -0.7197184562683105, 0.05455499887466431, -0.8330740928649902, -0.06443603336811066, -1.0433450937271118, -1.1769133806228638, -0.6777406930923462, -0.2367256134748459, 0.3978375792503357, 0.13922327756881714, 0.6809169054031372, -0.20672664046287537, 0.217033624649047...
def make _ api _ call _ alpha _ vantage ( self, api _ call ) : response = requests. get ( api _ call ) if response. status _ code! = 200 : raise exception ('api response : { } '. format ( response. status _ code ) ) return response. json ( )
[ -1.012569785118103, -0.2974151074886322, 0.8154548406600952, -0.2027602195739746, -0.22709687054157257, 0.49105969071388245, -1.0491074323654175, -0.7032467126846313, 0.4435427188873291, 1.3081108331680298, 0.13591144979000092, -0.04048669710755348, -0.09995687007904053, 0.1909053772687912...
def _ backward _ pass ( jaxpr : jaxpr, mode : _ mode, consts : list [ value ], primals _ in : list [ undefinedprimal ], cotangents _ in : tuple [ np. ndarray,... ], _ j _ rules : bool, _ s _ rules : bool, _ fwd : optional [ bool ] ) - > union [ list [ list [ union [ np. ndarray, zero ] ] ], list [ list [ tuple [ np. nd...
[ -1.0815346240997314, 0.3528438210487366, 0.6968232989311218, -1.0004373788833618, 0.2717432677745819, -0.37181952595710754, 0.5554104447364807, -0.059762224555015564, -0.8621147871017456, 0.5781070590019226, 0.03170710802078247, -0.2790977954864502, 0.6124902963638306, 0.01071513257920742,...
def find _ by _ username ( cls, username ) : return cls. query. filter _ by ( username = username ). first ( )
[ 0.14521217346191406, 0.45659980177879333, -0.16857114434242249, -0.11247217655181885, 0.6863939166069031, -0.4894587993621826, 0.7973639369010925, -0.4753243625164032, -0.7376562356948853, 0.10182814300060272, -0.062061894685029984, -0.36140239238739014, -0.7451497912406921, 0.187066227197...
def test _ set ( parse _ conf ) : with patch ( " salt. modules. logrotate. _ parse _ conf ", magicmock ( return _ value = parse _ conf ) ), patch. dict ( logrotate. _ _ salt _ _, { " file. replace " : magicmock ( return _ value = true ) } ) : assert logrotate. set _ ( " rotate ", " 2 " )
[ 0.45779839158058167, 0.8259066343307495, 0.5221120715141296, -0.9250087738037109, 1.0184317827224731, -0.4750749170780182, -0.36802709102630615, 0.22903454303741455, -0.22156912088394165, 0.11971136182546616, -0.9189009070396423, 0.301314115524292, -0.5691280364990234, -0.5600007772445679,...
def to _ dict ( self ) : result = { } if hasattr ( super ( unsharpfilter, self ), " to _ dict " ) : result = super ( unsharpfilter, self ). to _ dict ( ) for attr, _ in six. iteritems ( self. openapi _ types ) : value = getattr ( self, attr ) if value is none : continue if isinstance ( value, list ) : if len ( value ) ...
[ -1.172039270401001, -0.08942871540784836, 0.9853129982948303, -1.0625977516174316, -0.5069357752799988, -0.6862729787826538, 0.24742035567760468, -0.6070032715797424, 0.3164185583591461, 0.371532142162323, -0.27054354548454285, -0.04746995121240616, 0.2400382161140442, 1.4726835489273071, ...
def getdatafromurl ( url ) : try : request = urllib2. request ( url ) request. add _ header ('user - agent ','reppic picture link crawler v0. 1 by / u / nfresh') opener = urllib2. build _ opener ( ) data = opener. open ( request ) except ( urllib2. httperror, urllib2. urlerror ) as e : data = none logging. error ( " co...
[ -0.9113153219223022, 0.16866523027420044, 0.5238444805145264, -0.294628381729126, -0.6721987724304199, 0.1419447958469391, -0.11338897049427032, -0.06903547793626785, 0.674025297164917, -0.756479024887085, -0.7152605652809143, 0.14538462460041046, -0.13274700939655304, -0.6659502983093262,...
def get _ targets ( self ) : return ( self. train _ targets, self. validation _ targets, self. test _ targets )
[ -1.1324851512908936, -0.07375828176736832, 0.3934231698513031, 0.5965344309806824, 1.8360599279403687, 0.1509825885295868, -0.39685916900634766, -0.32811450958251953, -0.714812159538269, -0.012926612980663776, -0.35807886719703674, 0.25411757826805115, -0.4829176068305969, -0.2954868972301...
def verify _ password ( self, password ) : return check _ password _ hash ( self. password _ hash, password )
[ 0.6733218431472778, -0.059441640973091125, 0.24269050359725952, 1.36506986618042, 0.47442567348480225, 0.3163377344608307, -0.5453174114227295, 0.045308686792850494, 0.2900241017341614, -0.44154953956604004, -0.4739949703216553, 0.2518019378185272, -0.4865046739578247, 1.0634663105010986, ...
def update _ msid _ data ( msid _ list ='msid _ list _ fetch') : start _ time = time. strftime ( " % a, % d % b % y % h : % m : % s ", time. localtime ( ) ) # # - - - create msid < - - - > unit dictionary # [ udict, ddict ] = ecf. read _ unit _ list ( ) # # - - - read mta database # mta _ db = ecf. read _ mta _ databas...
[ 0.27191025018692017, -1.103537917137146, 0.8283746242523193, -0.35297366976737976, -0.8922980427742004, 1.1178700923919678, 0.13201266527175903, 0.8315616250038147, 0.015002396889030933, 0.6327854990959167, -0.5860199332237244, 0.36687642335891724, -0.6255795955657959, 0.6239629983901978, ...
def calcprob ( nodesastar, point ) : dist = 1e6 for node in nodesastar : mean = np. array ( [ node. x, node. y ] ) distfromnode = np. linalg. norm ( mean - point ) if distfromnode < dist : mindistnode = node dist = distfromnode y = multivariate _ normal. pdf ( point, mean = np. array ( [ mindistnode. x, mindistnode. y ...
[ 0.76314777135849, 0.07913129031658173, 0.5984058380126953, -0.12146952748298645, -0.7312021851539612, 0.01545774657279253, -0.08999583125114441, -0.1767135113477707, 0.36332932114601135, 0.589380145072937, 0.5951313972473145, 0.5922152996063232, -0.012595539912581444, -0.020938564091920853...
def critical _ points ( ) : yield 0 for x, y, z in permutations ( hand _ positions ( h, m, s ) ) : a, b, c = ( y - x, z - y, x - z + 360 ) for lhs, rhs in ( ( a, b ), ( a, c ), ( b, c ), ( a, 120 ), ( b, 120 ), ( c, 120 ) ) : yield from sym. solve ( lhs - rhs, [ s ] )
[ 0.5372888445854187, -0.4210715889930725, 0.4966733753681183, 0.36148715019226074, 0.15437592566013336, 0.3084372580051422, 0.0751839205622673, 0.09305262565612793, -0.2308545857667923, 0.5268059372901917, -0.899116575717926, -0.6786297559738159, -0.043037813156843185, -0.6141965389251709, ...
def clip _ transcale ( ts _ matrix ) : bounding _ boxes = transcale _ 2 _ bb ( ts _ matrix ) x, y, w, h = tf. split ( bounding _ boxes, 4, axis = 1 ) x _ new = tf. where ( x < 0, tf. zeros _ like ( x ), x ) y _ new = tf. where ( y < 0, tf. zeros _ like ( y ), y ) w _ new = tf. where ( x < 0, ( w + x ), w ) h _ new = tf...
[ -0.0852532610297203, -0.2711736857891083, 0.8644111752510071, -0.23845425248146057, -1.0631407499313354, -0.03866039589047432, -0.18075883388519287, -0.7946003079414368, -0.450069397687912, 1.8495349884033203, 0.0863005518913269, -0.017729563638567924, 0.8849611878395081, -0.23087038099765...
def calculate _ nerve _ ap _ speed ( self ) : ap _ test = [ false for x in range ( 0, len ( self. nerve _ ap [ 0 ] ), 1 ) ] temps = [ 0. 0 for x in range ( 0, len ( self. nerve _ ap [ 0 ] ), 1 ) ] for x in range ( 0, len ( self. temps ), 1 ) : for y in range ( 0, len ( self. nerve _ ap [ 0 ] ), 1 ) : if self. nerve _ a...
[ 0.7604590654373169, -0.009542088955640793, 0.741502583026886, -0.8118197321891785, 0.34679779410362244, -0.03621293604373932, -0.06335610151290894, -0.2685922682285309, 0.35119888186454773, 0.7723709940910339, 0.06443814188241959, 0.025268442928791046, -0.5084439516067505, 0.84063845872879...
def _ createwindow ( b, je ) : w = uiwindow ( je ['url'], title = je ['name'] ) w. show ( )
[ -0.21204611659049988, 0.4063410758972168, 0.346733421087265, 0.6193519830703735, -0.5748825669288635, 0.4457273781299591, 0.4225537180900574, 0.6373965740203857, 0.014383695088326931, -0.5201908946037292, 0.213683620095253, 0.4685235023498535, 0.45852476358413696, 0.4450090825557709, -0....
def fill _ missing ( self, tenant, missing ) : # for each missing topic attempt to create it in ams for topic in missing [ " topics " ] : # create topic topic _ new = self. create _ tenant _ topic ( tenant, topic ) log. info ( " tenant : { } - created missing topic : { } ". format ( tenant, topic _ new [ " name " ] ) )...
[ 0.9072157740592957, -0.2307625710964203, 0.530337393283844, -0.1991289108991623, 0.39159831404685974, 0.8915030360221863, -0.6168190240859985, -0.5684033036231995, -0.033735763281583786, 0.35822901129722595, 0.13576814532279968, 0.08358075469732285, 0.6707596182823181, 0.28307220339775085,...
def place _ orders ( self, board, actions ) : options = [ ] for ter in board : if ter. owner = = self : options. append ( ter ) for adjacent in ter. adjacent : for check in board : if check. name = = adjacent : options. append ( check ) random. shuffle ( options ) for ter in options : if self. score < 1 : return action...
[ -0.7813233137130737, 0.26921430230140686, 0.6402285099029541, 0.605711042881012, 0.9578325152397156, 0.6682907938957214, 0.8485828042030334, -0.7032568454742432, 0.743661105632782, 0.8723554015159607, 0.2674776017665863, -0.5582398772239685, -0.8005815744400024, -0.028659695759415627, -1...
def _ _ str _ _ ( self ) : return " " " je suis { } { } { } { } { } " " ". format ( self. nom, self. prenom, self. age, self. lieu _ res, self. _ taille )
[ 0.16443434357643127, -0.7831608653068542, 0.7175508141517639, -1.8961225748062134, -0.8922023177146912, 0.37821948528289795, -0.5549652576446533, -0.4552156925201416, -0.6028926372528076, -0.790631890296936, -0.1737184375524521, 0.7892661690711975, 0.7482507228851318, -0.08167604357004166,...
async def async _ oauth _ create _ entry ( self, data : dict ) - > flowresult : existing _ entry = await self. async _ set _ unique _ id ( domain ) if existing _ entry : self. hass. config _ entries. async _ update _ entry ( existing _ entry, data = data ) await self. hass. config _ entries. async _ reload ( existing _...
[ -0.596513032913208, 0.5159481763839722, 0.44741368293762207, 0.30219849944114685, 0.9109572768211365, -0.25616466999053955, -0.4386138319969177, -0.11289307475090027, 1.0877954959869385, 0.6688547134399414, -0.07540842890739441, 0.744688093662262, 0.13804012537002563, -0.12366849184036255,...
def cal _ sdri ( src _ ref, src _ est, mix ) : src _ anchor = mix sdr, sir, sar, popt = bss _ eval _ sources ( src _ ref, src _ est ) sdr0, sir0, sar0, popt0 = bss _ eval _ sources ( src _ ref, src _ anchor ) sum _ sdri = 0 for i in range ( len ( sdr ) ) : sum _ sdri + = sdr [ i ] - sdr0 [ i ] print ( sdr [ i ], sdr0 [...
[ -0.16924040019512177, 0.023509936407208443, 0.6906424164772034, -0.6747932434082031, -0.06848262250423431, -0.020670201629400253, 0.8685362935066223, -0.11201422661542892, 0.33843693137168884, 0.544800341129303, 0.011764006689190865, 0.6311013698577881, -0.2725135087966919, 0.6990925073623...
def wigglemaxlength ( self, nums ) : if not nums : return 0 up, down = 1, 1 for i in range ( 1, len ( nums ) ) : if nums [ i - 1 ] - nums [ i ] > 0 : down = up + 1 elif nums [ i - 1 ] - nums [ i ] < 0 : up = down + 1 return max ( up, down )
[ -0.1964128613471985, -0.13535046577453613, 0.6607287526130676, 0.961124837398529, -0.5035452246665955, 0.6459090709686279, 0.8041303157806396, 0.7042770385742188, 0.9809724688529968, 0.3104865849018097, 0.11393392086029053, 0.4619731605052948, -1.3430743217468262, 0.7119982242584229, -0....
def address _ map ( ) : users = user. query. all ( ) feature _ lst = [ ] for user in users : lat = user. latitude lng = user. longitude username = user. username zipcode = user. zipcode gard _ info = user. about _ me loc _ point = geojson. point ( ( user. longitude, user. latitude ) ) loc _ properties = dict ( name = u...
[ -0.6990376114845276, -1.2514830827713013, 0.5639498233795166, -0.22123406827449799, -0.3805907964706421, -0.01419452577829361, -0.07265787571668625, 0.789616048336029, -0.06549806892871857, 0.14620833098888397, -0.29375922679901123, 0.21200110018253326, 0.79376220703125, 0.2050949782133102...
def split ( self, x ) : numel = self. numel ( ) assert x. numel ( ) % numel = = 0,'not broadcastable'if x. dim ( ) = = 1 : x = x. unsqueeze ( 0 ) elif x. dim ( ) = = 2 : pass else : x = flatten ( x ) ch = 0 res = [ ] for child in self. _ children : take = child. numel ( ) res. append ( x [ :, ch : ch + take ] ) ch + = ...
[ -0.8692826628684998, 0.779926061630249, 0.8289714455604553, 1.0710469484329224, -0.39967456459999084, -0.18773287534713745, 0.6370193958282471, 0.1986369639635086, 0.9041353464126587, -0.05519799143075943, -1.008916974067688, 0.4365865886211395, -0.6260642409324646, -0.06734731793403625, ...
def _ _ characters ( self, data ) : self. _ _ tlist. append ( data )
[ -1.0063121318817139, -0.34349524974823, 0.2564147710800171, -1.7427284717559814, -0.1543925255537033, 0.825432538986206, -1.0659575462341309, -0.00294164358638227, 0.2625654339790344, 0.11020327359437943, -1.618901014328003, 0.08256150037050247, 0.02907908521592617, 0.0547635592520237, -...
def do _ insert ( self, * * kwargs ) : _ milhdbkf = ramstkmilhdbkf ( ) _ milhdbkf. hardware _ id = kwargs ['hardware _ id'] _ error _ code, _ msg = ramstkdatamodel. do _ insert ( self, entities = [ _ milhdbkf, ] ) if _ error _ code = = 0 : self. tree. create _ node ( _ milhdbkf. hardware _ id, _ milhdbkf. hardware _ id...
[ 0.24212738871574402, 0.9493731260299683, 0.7286405563354492, -0.04031616076827049, 0.39653900265693665, 0.16872993111610413, 0.4518131911754608, 0.34345483779907227, -0.9576285481452942, 0.588680624961853, -1.1257675886154175, -0.0809900313615799, -1.181488037109375, 0.5069925785064697, ...
def support ( self, towers ) : effected = [ ] for tower in towers : x = tower. x y = tower. y dis = math. sqrt ( ( self. x - x ) * * 2 + ( self. y - y ) * * 2 ) if dis < = self. range + tower. width / 2 : effected. append ( tower ) for tower in effected : tower. damage = tower. original _ damage + round ( tower. origin...
[ -0.16509224474430084, -1.2037638425827026, 0.4589082896709442, -0.595222532749176, 0.06254961341619492, 0.38041186332702637, 0.07279500365257263, 0.6675900816917419, 0.254258394241333, 0.595384418964386, -0.6609243154525757, -0.3245057463645935, -1.0048677921295166, 0.4920401871204376, -...
def run ( self ) : while checks. performchecks : if self. tickperformcheck < = self. tickcount : try : self. perform _ check ( ) except exception as e : log. log _ error ('error performing a new check : % s'% e ) log. log _ debug ('next checks in % s seconds...'% self. tickperformcheck ) self. tickcount = 0 self. tickc...
[ 0.02424897439777851, 0.1421814262866974, 0.3631913363933563, 0.7699139714241028, 0.6678529977798462, 0.411704957485199, 1.455523133277893, -0.021939558908343315, -0.8956267237663269, -1.3036444187164307, 0.8072342276573181, 0.12290894985198975, -0.517269492149353, 0.4590999186038971, 0.6...
def add _ item ( self, item ) : error = false def check ( x ) : return isinstance ( x, qtwidgets. qwidget ) or isinstance ( x, qtwidgets. qlayout ) if isinstance ( item, iterable ) : if not all ( check ( x ) for x in item ) : error = true elif not check ( item ) : # only single widget is added to the current row error ...
[ -0.8196540474891663, 0.28779852390289307, 0.48411455750465393, 1.13932204246521, -0.17866690456867218, 0.995431125164032, 0.3499719202518463, 0.29311543703079224, 0.9677860140800476, -0.5473623871803284, 0.39022737741470337, -0.4345674514770508, -0.7644458413124084, 0.42288658022880554, ...
def count _ live _ neighbors ( status ) : kernel = np. array ( [ [ 1, 1, 1 ], [ 1, 0, 1 ], [ 1, 1, 1 ] ] ) c = convolve2d ( status, kernel, mode ='same ', boundary = " fill " ) return c
[ 0.45010215044021606, -0.5154820084571838, 0.665229320526123, 0.5466435551643372, -0.09739802777767181, 0.41810670495033264, -0.1221860945224762, 0.27417561411857605, 0.022378282621502876, 0.16657109558582306, -0.7249254584312439, 0.11393073946237564, 0.5472070574760437, 0.5361588001251221,...
def stop ( self ) : self. _ stop _ me = true
[ -0.5989814400672913, -0.5891197919845581, 0.17649388313293457, -0.02857075445353985, 0.43840518593788147, 1.0655289888381958, 0.4876064956188202, 0.9713683128356934, -1.2935993671417236, -0.9079554677009583, -0.7988191246986389, -0.13917280733585358, -0.1931462287902832, -0.471162945032119...
def get _ points ( self, featmap _ sizes, dtype, device ) : mlvl _ points = [ ] for i in range ( len ( featmap _ sizes ) ) : mlvl _ points. append ( self. get _ points _ single ( featmap _ sizes [ i ], self. strides [ i ], dtype, device ) ) return mlvl _ points
[ -0.46438756585121155, 0.03973434865474701, 0.1721218228340149, 1.8497289419174194, 0.12592412531375885, 0.335971862077713, -0.3451690971851349, 0.7860866785049438, -0.29735928773880005, -0.050900716334581375, -0.3656482696533203, 0.27383193373680115, 0.3264646530151367, 1.2385258674621582,...
def _ send _ request ( self, request : httprequest, * * kwargs : any ) - > httpresponse : request _ copy = deepcopy ( request ) request _ copy. url = self. _ client. format _ url ( request _ copy. url ) return self. _ client. send _ request ( request _ copy, * * kwargs )
[ -1.9410767555236816, 0.06351780891418457, 0.43585169315338135, 0.29361671209335327, -0.37746870517730713, -0.33191585540771484, -0.8011435270309448, -0.5933589935302734, 0.3639243245124817, 0.33937329053878784, 0.3194849491119385, 0.7757585048675537, 0.29961836338043213, -0.484827697277069...
def draw ( self ) : if not pygame. display. get _ init ( ) : return false self. screen. fill ( self. bgcolor ) for o in self. objects : o. move ( ) pygame. display. flip ( ) if self. fps! = none : self. clock. tick ( self. fps ) else : self. clock. tick ( )
[ -0.35685160756111145, 0.2771318256855011, 0.7009991407394409, -0.03054959326982498, 0.5411466360092163, 0.9120864868164062, 0.5169615745544434, -0.8593419790267944, -0.11734533309936523, 0.5111441612243652, 0.002651963150128722, -0.10092195123434067, -0.39414578676223755, 1.135874509811401...
def radial _ distribution ( self, data _ type, ind, radius, nbins = 1 ) : # for non - spin - polarized runs, this is zero by definition. if not self. is _ spin _ polarized : radii = [ radius / nbins * ( i + 1 ) for i in range ( nbins ) ] data = np. zeros ( ( nbins, 2 ) ) data [ :, 0 ] = radii return data struct = self....
[ -0.3418484926223755, -0.0328059047460556, 0.6673018932342529, -0.5365505814552307, -0.2711534798145294, 0.22207991778850555, 0.1694822609424591, -0.20098084211349487, 0.33204254508018494, 0.4073701798915863, 0.21211577951908112, 0.850074291229248, -0.6157730221748352, 0.4302773177623749, ...
def trajectory _ type ( rows, path, fps, track _ id = 0, args = none ) : # # read reader = trajnetplusplustools. reader ( path, scene _ type ='paths') scenes = [ s for _, s in reader. scenes ( ) ] # # filtered frames and scenes new _ frames = set ( ) new _ scenes = [ ] start _ frames = set ( ) # # # # # # # # # # # # #...
[ 0.5511282086372375, -0.3653607964515686, 0.7930006384849548, -0.3097075819969177, -0.21127453446388245, -0.40416043996810913, 0.8002915978431702, -0.6467329263687134, -0.5833527445793152, 0.3997114598751068, -0.5166933536529541, -0.0625496432185173, 0.0972052812576294, 0.741199254989624, ...
def _ reverse ( self, head ) : previous = none current = head while current is not none : next _ = current. next current. next = previous current. prev = next _ previous = current current = next _ head = previous return head
[ -0.420693963766098, 0.6355107426643372, 0.7973386645317078, -0.5014936923980713, -0.49661263823509216, -1.2207517623901367, 0.23413395881652832, 0.3578943610191345, -0.46416741609573364, -0.2839922606945038, -0.21896302700042725, 0.746103048324585, -1.358555555343628, -0.6242843866348267, ...
def save _ as ( self, new _ filename ) : xfile. _ save _ file ( self. _ filename, self. _ datasourcetree, new _ filename )
[ -0.5559679865837097, -0.401765376329422, 0.23937155306339264, -1.0483952760696411, 0.2542168200016022, -0.3462064862251282, -0.2985377907752991, 0.6134799718856812, -0.8400292992591858, 0.6633463501930237, -1.2702134847640991, 0.14575828611850739, 0.515644371509552, 0.19287408888339996, ...
def is _ numeric ( value, exclude _ null = false ) : if exclude _ null and pd. isnull ( value ) : return false return np. issubdtype ( int, type ( value ) ) or np. issubdtype ( float, type ( value ) )
[ 0.16050897538661957, 0.9371602535247803, 0.5323372483253479, 1.1592861413955688, -0.14015989005565643, 0.28621646761894226, -0.048757076263427734, -0.2920190691947937, 0.4478972852230072, 0.0887352004647255, -0.07337692379951477, 0.34951645135879517, -0.2522706389427185, 0.2880878746509552...
def failure ( why ) : print ( why ) sys. exit ( 1 )
[ 0.5868350863456726, -0.049195073544979095, 0.41159796714782715, 0.892950177192688, -0.24666376411914825, 0.6793694496154785, -0.059906888753175735, -0.0009524050983600318, -0.13748086988925934, -0.8623919486999512, -0.16205354034900665, 0.9392359256744385, 0.30306771397590637, 0.4821062684...
def get _ user _ following _ groups ( self, user _ id, start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : kwargs ['_ return _ http _ data _ only'] = true if kwargs. get ('callback') : return self. get _ user _ following _ groups _ with _ http _ info ( user _ id, start, end, logged _ in ...
[ -0.28291088342666626, 0.6179896593093872, 0.8237484693527222, 1.0606334209442139, -1.2266079187393188, 0.0763867199420929, -0.08564574271440506, -1.5601520538330078, -0.005093378946185112, -0.39523112773895264, 0.057857029139995575, 1.3253452777862549, -0.4972016513347626, 0.45550507307052...
def api _ get _ feature ( id = none, feature = none ) : # auth _ func ( ) # not a valid feature if not id or not feature : return jsonify ( { } ) # return absolute features if feature in ['speed ','acceleration ','distance _ centroid ','metric _ distance ','direction'] : stmt ='''select array ( select round ('''+ featu...
[ -0.5526038408279419, -0.3076851963996887, 0.7018160820007324, 0.1139763593673706, 0.22678779065608978, -1.2298669815063477, -0.319786936044693, -0.4275555908679962, -0.3233136236667633, 0.07356142997741699, 0.046259555965662, 0.4346635937690735, 0.22504329681396484, 0.569949746131897, 0....
def get _ args ( ) : p = argumentparser ( ) p. add _ argument ('- n ','- - num _ seqs ', help ='number of sequences to generate ', default = 1e3 ) p. add _ argument ('- k ','- - num _ haplotypes ', help ='number of haplotypes to include ', default = 2 ) p. add _ argument ('- m ','- - num _ snps ', help ='number of snp ...
[ -0.15701924264431, -0.17853409051895142, 0.8669766783714294, -0.2412935495376587, -0.012078860774636269, 0.220716193318367, 0.09409081935882568, 0.4383828639984131, 0.018138768151402473, 0.1486128866672516, -0.5891888737678528, -0.1343296468257904, -1.0677865743637085, 0.659921407699585, ...
def test _ warn _ if _ no _ zipline _ service ( self ) : def mock _ list _ history _ databases ( ) : return [ " usa - stk - 1d ", " japan - stk - 1d ", " usa - stk - 15min ", " demo - stk - 1min ", " japan - stk - 15min " ] def mock _ list _ realtime _ databases ( ) : return { " demo - stk - taq " : [ " demo - stk - ta...
[ -0.20378291606903076, 0.9649118185043335, 0.5025026202201843, -0.12454268336296082, 0.3444730043411255, -0.29353615641593933, 0.39474737644195557, -0.4434155523777008, 0.04480969160795212, -0.10322479158639908, 0.10394520312547684, 0.21878844499588013, -0.24985846877098083, 0.8569748401641...
def test _ check _ input _ notbinary _ landmap ( ) : land _ nonbin = np. zeros ( ( 3, 3, 3 ) ) land _ nonbin [ 0, 1, 1 ] = 1 land _ nonbin [ 0, 1, 2 ] = 2 ch _ bin = np. zeros _ like ( land _ nonbin ) with pytest. raises ( valueerror ) : mob. check _ inputs ( ch _ bin, basevalues _ idx = [ 0 ], window _ idx = 1, landma...
[ -0.14398634433746338, -0.1994994729757309, 0.5691871047019958, 0.6850926876068115, 0.22745893895626068, 1.4773186445236206, 0.23653168976306915, -0.9059440493583679, -0.5142276287078857, -0.3685300648212433, 0.05080130696296692, 0.41399693489074707, -1.2314181327819824, 1.353094458580017, ...
def setfastkinetics ( exposedrows, serieslength, time, mode, hbin, vbin ) : return none
[ 0.6422477960586548, 0.42627808451652527, 0.12046156823635101, 1.0529571771621704, -0.3432657718658447, -0.8966936469078064, 0.09029369056224823, -0.5846156477928162, 0.05234496667981148, 0.03180806711316109, -0.044314779341220856, 0.27686285972595215, -0.26511675119400024, 0.55126321315765...
def get _ args ( ) : arg _ parser = argparse. argumentparser ( ) # pilot log creation arg _ parser. add _ argument ('- - no - pilot - log ', dest ='nopilotlog ', action ='store _ true ', default = false, help ='do not write the pilot log to file') # pilot work directory arg _ parser. add _ argument ('- a ', dest ='work...
[ 0.30799537897109985, -0.5889723896980286, 0.8707557916641235, -0.657512366771698, 0.44294774532318115, 0.461249977350235, -0.25636932253837585, -0.15979555249214172, -0.22951938211917877, 0.46800678968429565, 0.17503102123737335, 0.5431203246116638, -0.17288178205490112, 0.6913835406303406...
def sigmoid ( t ) : return 1 / ( 1 + np. exp ( - t ) )
[ -0.30291569232940674, -0.0721401572227478, 0.2926865518093109, -0.18344679474830627, 0.1463744342327118, 0.919344425201416, -0.10695312172174454, 0.34446215629577637, 0.4367745518684387, 0.9838358759880066, -0.4153558611869812, -0.7776153683662415, -0.1813836246728897, -0.7065098881721497,...
def _ aggregate _ global _ from _ local _ explanation ( local _ explanation = none, include _ local = true, features = none, explanation _ id = none, * * kwargs ) : kwargs = _ get _ aggregate _ kwargs ( local _ explanation, include _ local, features, explanation _ id, * * kwargs ) return _ create _ global _ explanation...
[ 0.7661022543907166, 0.43838366866111755, 0.5206292867660522, 0.3262113332748413, -0.6962798833847046, -0.1323729157447815, 0.22180944681167603, 1.8285666704177856, -0.17954705655574799, 0.8796873688697815, 0.03983522206544876, 0.8695566058158875, -0.3641851544380188, 0.5119302272796631, ...
def test _ properties ( self ) : assert self. strategy. ledger _ id = = self. ledger _ id assert self. strategy. is _ ledger _ tx = = self. is _ ledger _ tx
[ 0.727350115776062, -1.0028190612792969, 0.24349576234817505, 0.2802160680294037, 1.253040075302124, 0.4211573898792267, 0.14496548473834991, -0.3490559160709381, 0.7401025295257568, -0.03930771350860596, 0.43711772561073303, 0.5370367765426636, 0.20870226621627808, -0.5181889533996582, -...
def _ normalize ( self, value, * * options ) : while'' in value : value = value. replace ('','' ) return value
[ 0.6270303130149841, 0.3705877363681793, 0.4147881865501404, -0.7176750302314758, -0.5000203251838684, -0.3587521016597748, -0.331362247467041, 0.08464071899652481, 0.9220002293586731, 0.04170692712068558, 0.1978178322315216, 0.2948933243751526, -0.8439463376998901, -0.0185492355376482, 0...
def finalize _ options ( self ) : build _ ext. finalize _ options ( self ) sip _ config = sipconfig ( self ) if hasattr ( self, " finalize _ " + sys. platform ) : getattr ( self, " finalize _ " + sys. platform ) ( )
[ -0.5828928351402283, 0.10068798065185547, 0.46955353021621704, 0.4202374517917633, -0.11281892657279968, -0.2899335026741028, 0.40704354643821716, -0.25664690136909485, 0.8307236433029175, -0.5258448719978333, -0.3461499810218811, -0.6759188771247864, -0.17675618827342987, 1.64080584049224...
def test _ get _ content ( self ) : pass
[ 0.20112134516239166, 0.2616575062274933, 0.195246160030365, 1.5325374603271484, 0.566877543926239, 0.0788053348660469, 1.2244114875793457, -1.0488547086715698, -0.3169345557689667, -0.8888863921165466, -0.22559356689453125, -0.200211763381958, -0.9353103041648865, -0.8320122361183167, -0...
def unique _ variable ( self ) : return " ". join ( ( " _ ", self. unique ( ). replace ( " - ", " _ " ), ) )
[ -0.04708161950111389, -0.5341516137123108, 0.5632704496383667, -1.3035246133804321, -0.27584558725357056, 0.6976749300956726, -0.8691306710243225, -0.2781859338283539, -0.036379069089889526, -0.35995593667030334, -0.7973023056983948, 1.2224255800247192, 0.444957971572876, -0.98763447999954...
def stop ( self, * args, * * kwargs ) : self. logger. info ( " gracefully stopping the agent... " " this may take up to 10 seconds. " ) self. stopped = true self. nanny. stop ( ) self. receiver. stop ( )
[ -0.358178973197937, -0.3439325988292694, 0.07258477807044983, -0.880169153213501, 1.2018026113510132, -0.1991191953420639, -0.2711144983768463, 0.5839850902557373, -0.21269382536411285, -0.26266372203826904, -0.7054696679115295, 0.4471513628959656, -0.08402498066425323, 0.47496992349624634...
def put _ dir ( con : connection, from _ dir : str, to _ dir : str ) : con. local ( " tar cfz { 0 }. tar. gz { 0 } ". format ( from _ dir ) ) con. put ( " { }. tar. gz ". format ( from _ dir ), " { } ". format ( to _ dir ) ) con. run ( " tar zxf { 1 } / { 0 }. tar. gz - c { 1 } ". format ( from _ dir, to _ dir ) ) con....
[ 0.25557783246040344, 0.026623819023370743, 0.8866427540779114, -1.036743402481079, -0.06202462688088417, 0.08791360259056091, 0.13939176499843597, 0.7128468155860901, -0.8452313542366028, 0.26387670636177063, -0.3776703476905823, 0.8575637936592102, -0.23021969199180603, -0.593660175800323...
def getacquisitionprogress ( ) : andor _ solis. getacquisitionprogress. restype = ctypes. c _ uint acc = ctypes. c _ long ( ) series = ctypes. c _ long ( ) result = andor _ solis. getacquisitionprogress ( ctypes. byref ( acc ), ctypes. byref ( series ) ) check _ status ( result ) return int ( acc. value ), int ( series...
[ -0.27725300192832947, -0.5790223479270935, 0.6126297116279602, 0.291156530380249, -0.6253641247749329, -0.7970342636108398, 0.6579368114471436, -0.3872394859790802, 0.3870771527290344, 0.018595347180962563, 0.3584943413734436, 0.03336140140891075, 0.16363979876041412, -0.2084689885377884, ...
def describe ( self, periodlist ) : a = pd. concat ( self. simresults. fieldlist, axis = 1, keys = [ a. name for a in self. simresults. fieldlist ] ) b = a. iloc [ periodlist ] c = b. stack ( level = 0 ) d = c. sort _ index ( level = 1 ) d. index = d. index. swaplevel ( 0, 1 ) e = d. t. describe ( ). t e. to _ csv ( ou...
[ 0.14376957714557648, 1.0667535066604614, 0.5962058305740356, 0.08821982890367508, 0.20391909778118134, 0.14989353716373444, 0.32834717631340027, -0.5112592577934265, 0.006429221481084824, -0.19602085649967194, -0.041402608156204224, 0.6392353773117065, -0.23812329769134521, 0.2155923992395...
def importmicrographs ( self, pattern, suffix, voltage, sphericalaberration, amplitudecontrast ) : filepaths = glob ( expandpattern ( pattern ) ) # imgset = setofmicrographs ( filename = self. micspairssqlite, prefix = suffix ) imgset = self. _ createsetofmicrographs ( suffix = suffix ) acquisition = imgset. getacquisi...
[ 0.0677553117275238, -0.03898515924811363, 0.7670994997024536, -0.07754802703857422, -0.6856287717819214, 0.017202874645590782, 1.1005561351776123, -0.5570232272148132, 0.7607161998748779, 0.06797348707914352, 0.1961337924003601, 0.02401534654200077, -0.6458311080932617, -0.1611247807741165...
def test _ get _ non _ existant _ series ( self ) : path ='fake _ path'reader = graphite _ influxdb. influxdbreader ( influxdbclient ( database = self. db _ name ), path, graphite _ influxdb. utils. nullstatsd ( ) ) time _ info, data = reader. fetch ( int ( self. start _ time. strftime ( " % s " ) ), int ( self. end _ ...
[ -0.21671171486377716, 0.10490241646766663, 0.3032864034175873, -0.46486544609069824, 0.5862510800361633, 0.9520038962364197, -0.5486382842063904, -0.8395131826400757, -0.9603903889656067, -1.0642688274383545, -0.001591664389707148, 0.394094854593277, 0.09573071449995041, -0.217376887798309...
def resnet34 ( pretrained = false ) : model = resnet ( basicblock, [ 3, 4, 6, 3 ] ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['resnet34'] ) ) return model
[ -0.10860831290483475, 0.715921938419342, 0.26673343777656555, 1.0583974123001099, -0.20594866573810577, -0.20742177963256836, -0.09480283409357071, -0.23364464938640594, 0.6019561886787415, -0.38023191690444946, -1.3587156534194946, -0.96562260389328, -0.7488526701927185, -0.55102819204330...
def test _ nfc _ wps _ password _ token _ sta ( dev, apdev ) : ssid = " test - wps - nfc - pw - token - conf " params = ap _ wps _ params ( ssid ) hapd = hostapd. add _ ap ( apdev [ 0 ], params ) logger. info ( " wps provisioning step using password token from station " ) wps = dev [ 0 ]. request ( " wps _ nfc _ token ...
[ -0.11063112318515778, -0.040569745004177094, 0.7503700256347656, -0.18743683397769928, -0.09404811263084412, 0.4431173801422119, 0.190714493393898, -0.057498686015605927, -0.04602265730500221, 0.009781953878700733, 0.24013271927833557, 0.2145194262266159, 0.705260157585144, 0.2360393404960...
def reload _ core ( ) : payload = {'wt':'json ','action':'reload ','core':'ebooks'} requests. get ('http : / / leierkasten. local : 8983 / admin / cores ', params = payload )
[ -1.0768840312957764, -0.1276935338973999, 0.4523119330406189, -0.3143729269504547, -0.09927566349506378, -0.10739167034626007, -0.7100822329521179, -0.4323991537094116, -0.48550310730934143, 1.3260010480880737, 0.190684512257576, 1.0620298385620117, -1.6003048419952393, -0.1764860898256302...
def gaussian _ kernel ( length, sigma ) : n = ( length - 1. ) / 2. kernel = np. exp ( ( - 1 * np. power ( np. arange ( - n, n + 1 ), 2 ) ) / ( 2. * sigma * * 2 ) ) kernel [ kernel < np. finfo ( kernel. dtype ). eps * kernel. max ( ) ] = 0 sumh = kernel. sum ( ) if sumh! = 0 : kernel / = sumh return kernel - kernel. mea...
[ -0.006158057134598494, -0.25011417269706726, 0.27985790371894836, 0.5240796804428101, -0.9752841591835022, -0.5825286507606506, 0.2637156546115875, 0.29931893944740295, 0.20940613746643066, 0.5926811099052429, 0.1788426786661148, 1.0863738059997559, -0.7584812641143799, 0.38799867033958435...
def add _ exposure ( self, imset ) : # read the header and set identifiers hdr = imset. hdr band, expid = imset. band, imset. expid if band not in self. headers : self. headers [ band ] = { } self. headers [ band ] [ expid ] = hdr if hasattr ( imset, " gwcs " ) : if band not in self. tree : self. tree [ band ] = { } se...
[ -0.5996976494789124, -0.346377432346344, 0.5581462383270264, -1.2566865682601929, -0.6969799399375916, 0.021145649254322052, -0.4980320334434509, -0.6033254265785217, 0.9827378988265991, 0.05999520793557167, 0.7776040434837341, 0.24938732385635376, -0.503374457359314, 0.7413727641105652, ...
def call ( self, y _ true, y _ pred ) : class _ targets = y _ true class _ outputs, mask = y _ pred alpha = tf. convert _ to _ tensor ( self. alpha, dtype = y _ pred [ 0 ] [ 0 ]. dtype ) gamma = tf. convert _ to _ tensor ( self. gamma, dtype = y _ pred [ 0 ] [ 0 ]. dtype ) total _ loss = 0 for i in range ( len ( class ...
[ -0.6755767464637756, -0.5373031497001648, 0.7522618770599365, -0.21693260967731476, 0.03189634159207344, -0.33975207805633545, 0.46497589349746704, 0.24309498071670532, -0.12096717953681946, 0.9061071276664734, 0.3151826858520508, 0.370918333530426, 0.31456634402275085, -0.0039718365296721...
def assert _ stderr ( self, test _ srderr, equal = false ) : if equal is true : self. assertequal ( test _ srderr. getvalue ( ),'' ) else : self. assertnotequal ( test _ srderr. getvalue ( ),'' ) test _ srderr. truncate ( 0 ) test _ srderr. write ('' ) self. assertequal ( test _ srderr. getvalue ( ),'' )
[ -0.30866625905036926, 0.03004106506705284, 0.3941804766654968, -0.6678488254547119, 0.5884051322937012, 0.789412796497345, 0.462532639503479, -0.2732849717140198, 0.27495911717414856, 0.2734558582305908, 0.47664713859558105, 0.22587287425994873, -1.224944829940796, 1.193881630897522, 0.1...
def _ mgui _ bind _ change _ callback ( self, callback ) : def _ item _ callback ( item, callback = callback ) : col _ head = item. tablewidget ( ). horizontalheaderitem ( item. column ( ) ) col _ head = col _ head. text ( ) if col _ head is not none else " " row _ head = item. tablewidget ( ). verticalheaderitem ( ite...
[ -0.40080952644348145, -0.4791584610939026, 0.6260192394256592, -0.8960581421852112, -0.7019241452217102, 0.06118444353342056, -0.37256672978401184, -0.31266510486602783, -0.19286982715129852, 0.3163090646266937, -0.43021759390830994, -0.021213140338659286, 0.46482229232788086, 0.8464953899...
def test _ set _ parameters ( self ) : pass
[ -0.4530450701713562, 0.69584059715271, 0.2539915144443512, 0.769726574420929, 0.9244735240936279, 0.6229486465454102, 0.9013917446136475, 0.0037654773332178593, -0.4458748698234558, 0.05099375545978546, -0.5641319751739502, 0.6973553895950317, -0.967468798160553, 0.5112511515617371, -0.7...
def update _ request _ status ( status, request _ id ) : cur. execute ( " update requests set status = % s where id = % s ; ", ( status, request _ id ) ) config. conn. commit ( )
[ -0.9522621035575867, -1.4241430759429932, 0.1247551292181015, 0.09383498132228851, 0.04923306033015251, 0.3895835280418396, -1.6056569814682007, 0.44190749526023865, -0.05334797501564026, 0.579902708530426, -0.24667473137378693, 0.3394891023635864, -0.06167425215244293, 0.04518044367432594...
def is _ literal _ type ( tp : type ) - > bool : # stolen from typing _ inspect return ( tp is literal or ( isinstance ( tp, typing. _ genericalias ) and tp. _ _ origin _ _ is literal ) )
[ 0.021531833335757256, -0.5276005864143372, 0.42042219638824463, -0.6318204402923584, -0.3093821406364441, 1.1542950868606567, 0.16252769529819489, 0.039816830307245255, 0.16409218311309814, 1.0090606212615967, -0.5510680675506592, -0.13000424206256866, -0.1552453190088272, 0.21355116367340...
def uniform _ points _ on _ sphere ( npoints = 1, hemisphere = true, rotate = ( 0, 0, 0 ) ) : r = 1. 0 if hemisphere : theta = np. random. uniform ( 0, np. pi / 2, npoints ) else : theta = np. random. uniform ( 0, np. pi, npoints ) phi = np. random. uniform ( 0, 2 * np. pi, npoints ) x = r * np. sin ( theta ) * np. cos...
[ -0.31070008873939514, 0.01191733404994011, 1.1375987529754639, -0.603451669216156, 0.167586088180542, 0.1498114913702011, 0.36685481667518616, 0.42296937108039856, 1.135011076927185, 1.1124643087387085, -0.5298037528991699, 0.040034618228673935, -0.5192233920097351, -0.10271774232387543, ...
async def get _ event _ manager _ app _ by _ channel ( self, channel _ id : int ) - > list [ str ] : mycursor, db = await the _ database ( ) await mycursor. execute ( " select * from eventmanagerapplication where txt _ id = % s ", ( channel _ id, ) ) event _ manager _ app = await mycursor. fetchall ( ) await mycursor. ...
[ 0.5233245491981506, -0.7340551018714905, 0.4248226583003998, -0.7398073077201843, 0.31150999665260315, -0.019328568130731583, -0.8272713422775269, -0.1395472139120102, 0.057694874703884125, 0.9113609194755554, -0.03592224046587944, 0.14287450909614563, -0.3636995553970337, 1.16437292098999...
def put ( self, id _ class ) : data = get _ info _ token ( ) ip _ = request. environ. get ('http _ x _ real _ ip ', request. remote _ addr ) try : classname = str ( request. get _ json ( ) ['classname']. encode ('utf - 8'). strip ( ). decode ( " utf - 8 " ) ) payload = { " classname " : classname } insert _ request _ l...
[ -1.938988208770752, -0.23877593874931335, 1.1606192588806152, 0.18614646792411804, -0.5127769112586975, 0.2734724283218384, 0.09018164873123169, -0.1991710662841797, -0.06727173924446106, 0.7405093312263489, 0.11605553328990936, 0.37423965334892273, -0.5996189713478088, -0.8524999022483826...
def encode _ auth _ token ( username, isadmin ) : try : payload = {'exp': datetime. datetime. utcnow ( ) + datetime. timedelta ( days = 1000, seconds = 5 ),'iat': datetime. datetime. utcnow ( ),'username': username,'isadmin': isadmin } return jwt. encode ( payload, secret _ key, algorithm ='hs256') except exception as ...
[ 0.05422147363424301, 0.09218326210975647, 0.46899282932281494, 0.738679051399231, -0.5923413038253784, 0.3253154754638672, -0.7450451254844666, -0.23230452835559845, -0.03578883782029152, 0.8034136295318604, -0.8575660586357117, 1.1203547716140747, -0.05773325636982918, 0.08323399722576141...
def testgettaginstancereturnstagvalue ( self ) : result = tagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) [ ( objectid, path ) ] = result tagvalueapi ( self. user ). set ( { objectid : { u'username / tag': none } } ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transac...
[ -0.30745160579681396, 0.3784171938896179, 0.39210939407348633, -0.44500187039375305, 0.33289098739624023, 0.22678884863853455, -0.200222447514534, -0.5638325214385986, -0.7040134072303772, -1.1993228197097778, -0.6841341853141785, -0.2783401608467102, -0.12024978548288345, -0.0514428615570...
def add _ matrices ( mat1, mat2 ) : if shape ( mat1 )! = shape ( mat2 ) : return none else : new _ mat = rec _ matrix ( mat1, mat2 ) return new _ mat
[ 0.3003115653991699, 0.04787672683596611, 0.6161412596702576, 0.23746471107006073, 0.28357401490211487, 0.35107532143592834, -0.6249743103981018, -1.212873935699463, 0.7726519703865051, 0.00842652190476656, 0.1153884157538414, 0.6679002642631531, -0.5678354501724243, -0.36301830410957336, ...
def registerextension ( cls, * args, * * kwargs ) : # real signature unknown pass
[ -0.45149287581443787, 0.2793850600719452, 0.41106176376342773, 1.219982624053955, 0.8917209506034851, -0.21490828692913055, -0.36886653304100037, 0.040015220642089844, 0.6727404594421387, -0.2882537543773651, -2.0074594020843506, 0.34076830744743347, -0.07103807479143143, 0.627426147460937...
def low _ b _ inclusive ( ages, target ) : left, right = 0, len ( ages ) - 1 while left < = right : mid = ( right + left ) / / 2 if ages [ mid ] > = target : right = mid - 1 elif ages [ mid ] < target : left = mid + 1 return left
[ -0.3508817255496979, -0.5047115087509155, 0.7148417830467224, -0.5940824747085571, -0.31367650628089905, 0.21800771355628967, 0.4017026722431183, 0.11881667375564575, 0.9366569519042969, 0.4664514362812042, 0.3213666081428528, 1.2944846153259277, -0.9560509920120239, -0.09050237387418747, ...
def create _ new _ values ( self ) : model = self. queryset. model pks = [ ] extra _ create _ kwargs = self. extra _ create _ kwargs ( ) for value in self. _ new _ values : create _ kwargs = { self. create _ field : value } create _ kwargs. update ( extra _ create _ kwargs ) new _ item = self. create _ item ( * * creat...
[ -0.6311061978340149, -0.1426442265510559, 0.445949912071228, 0.9867233037948608, 0.48943138122558594, 0.8665189743041992, -0.7477477788925171, -0.45578256249427795, -1.4017205238342285, 0.06495127826929092, -0.8074565529823303, -0.5734699368476868, 0.1982548087835312, 1.2314974069595337, ...
def show _ slices ( im _ 3d, indices = none ) : plt. rcparams ['image. cmap'] ='gray'if indices is none : indices = np. array ( im _ 3d. shape ) / / 2 assert len ( indices ) = = 3, " " " except 3 - d array, but receive % d - d array indexing. " " " % len ( indices ) x _ th, y _ th, z _ th = indices fig, axes = plt. sub...
[ 0.7429572343826294, 0.13982531428337097, 0.7333358526229858, -0.26250728964805603, -0.2280835211277008, 0.3056448698043823, 0.3318677246570587, 0.6875191330909729, 0.8121582269668579, 1.14503014087677, 1.1357614994049072, 0.7832279205322266, -0.08764089643955231, -0.07003220915794373, 0....