text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ edge ( self, edge ) : # < edge label = " gi : 4506787 ( pp. 0. 1 ) 4757960 " source = " - 13 " target = " - 82 " > source, target = edge # odd hack. i don't know why the data is keyed on 0, maybe a # directional thing? attrs = self. _ source. graph ( ). get _ edge _ data ( source, target ) [ 0 ] edge = edge ( edg...
[ -0.9762499332427979, 0.11265844106674194, 0.3903256952762604, -1.2476434707641602, 0.09910804778337479, -0.1300293356180191, -0.3240741193294525, 0.7323709726333618, 0.31024327874183655, -0.21852587163448334, 0.15380118787288666, 0.11058014631271362, 0.6999471187591553, -0.0234946310520172...
def _ collapsependingtext ( self ) : data =''. join ( self. _ pendingtext ) self. _ currentnode. children. append ( _ textnode ( data ) ) self. _ pendingtext = [ ]
[ -0.5175009965896606, -0.1678338497877121, 0.5477911233901978, -1.3498214483261108, -1.0461159944534302, -0.1171615719795227, -0.2890220582485199, 1.1337422132492065, -0.29859259724617004, 0.7042598128318787, 0.0372491218149662, -0.557028591632843, -1.0945303440093994, 0.4741910994052887, ...
def test _ aling _ hor _ alignment _ hor _ sizer ( box _ sizer ) : al = _ align _ item ( uiitem ( ), wx. horizontal, horalign. right, none, current _ layout = 0 ) assert isinstance ( al [ 0 ], mockboxsizer ) assert isinstance ( al [ 0 ]. item, uiitem )
[ -0.03325774893164635, -0.2989709973335266, 0.39829033613204956, 1.323621392250061, -0.511909544467926, 0.7459565997123718, -0.0351981446146965, 0.005738333333283663, -0.21900638937950134, -0.7606953382492065, 0.012549236416816711, -0.990288496017456, 0.07465711981058121, 0.8683233857154846...
def get _ loaders ( x _ train, x _ val, x _ test, y _ train, y _ val, y _ test, batch _ size, device ) : # convert labels to vectors and put on device y _ train = torch. from _ numpy ( np. asarray ( y _ train, dtype ='int32') ). to ( device ) y _ val = torch. from _ numpy ( np. asarray ( y _ val, dtype ='int32') ). to ...
[ 0.12445220351219177, 0.3624514043331146, 0.6626303195953369, -0.5449374318122864, 0.2500661313533783, -0.12296392768621445, -0.3485340476036072, -0.7380090951919556, -0.8205984830856323, -0.03296105936169624, -0.1734275072813034, -0.004762075375765562, 0.3759278953075409, -0.78270256519317...
def classifier _ metrics ( model, x _ test, y _ test, y _ pred, feature _ array, target _ array, k _ folds = 5, outdir = '. / outputs /') : from classification _ model _ metrics import calc _ roc, calc _ auc, \ gen _ confusion _ matrix, calc _ accuracy, calc _ f1 _ score from sklearn. model _ selection import cross _ v...
[ 0.5481191873550415, -0.1202106773853302, 0.5524389743804932, 0.8312233686447144, 0.4379429519176483, 0.3248783349990845, 1.3268667459487915, -0.04049663990736008, -0.9423925280570984, 0.30679720640182495, 0.1995488554239273, 0.37150827050209045, 0.5933622121810913, 0.6756856441497803, 0....
def process _ changes ( self, changes _ buffer ) : processed _ items = [ ] seq = none for change _ line in changes _ buffer : item, rev, seq = self. process _ change _ line ( change _ line ) if item is not none : processed _ items. append ( ( item, rev, seq, ) ) return ( processed _ items, seq, )
[ -0.5499751567840576, -1.3175787925720215, 0.44190382957458496, -0.03928404301404953, 0.5750198364257812, -0.65842604637146, -0.6622462272644043, 0.23252275586128235, -0.27972325682640076, 0.22520671784877777, -1.2256550788879395, -0.5044063329696655, -0.2459404319524765, 0.7532729506492615...
def build ( self, * * walk _ kwargs ) : self. good = self. cv. walk ( self. director, self. metadata ['slot _ type'], otext = self. metadata ['otext'], generic = self. metadata ['nena _ corpus'], intfeatures = self. metadata ['intfeatures'], featuremeta = self. metadata ['object _ features'], * * walk _ kwargs, )
[ -0.9363411664962769, -0.24928060173988342, 0.30246686935424805, 0.002134856767952442, 0.20171041786670685, 0.5411233901977539, 0.45220470428466797, -0.49112600088119507, -0.8502863049507141, -0.5017833113670349, 0.2630847990512848, 0.9773933291435242, 0.2822721004486084, 0.3480073511600494...
def throttle _ function ( func, every _ n = 1000 ) : counter = 0 def throttled ( * args, * * kwargs ) : nonlocal counter result = none if counter % every _ n = = 0 : result = func ( * args, * * kwargs ) counter + = 1 return result return throttled
[ 0.7102954983711243, 0.13174477219581604, 0.599513053894043, -0.04483470320701599, 0.14410088956356049, -0.7591245770454407, -0.09251442551612854, -0.5582154989242554, 0.2062658816576004, -0.7243732810020447, 0.2861720621585846, 0.1305210292339325, -0.2581177353858948, 0.2156757414340973, ...
def _ setup ( self ) : for key in dir ( self ) : if key. isupper ( ) and not isinstance ( getattr ( self. _ _ class _ _, key ), property ) : self. _ set _ value ( key, getattr ( self, key ), priority = self. configalchemy _ default _ value _ priority, ) return true
[ -1.5056467056274414, 0.269609272480011, 0.5119892358779907, 0.12127126753330231, 0.6485224962234497, -0.6875723600387573, -0.3135165572166443, 0.0028989939019083977, -0.5246338248252869, 0.28012996912002563, -0.021019000560045242, -1.3660372495651245, 0.02640262059867382, 0.895737051963806...
def _ _ init _ _ ( self ) : self. _ grid = array2d ( self. num _ rows, self. num _ cols ) self. _ currentplayer = self. player _ a self. _ gamestate = self. game _ in # game in in the beginning for r in range ( self. num _ rows ) : for c in range ( self. num _ cols ) : self. _ grid [ r, c ] = self. player _ none self. ...
[ -0.33329981565475464, -0.6438990831375122, 0.8289240002632141, -0.4113968312740326, -0.1435421109199524, 0.37867483496665955, 0.6097568869590759, 0.20138724148273468, 0.1392599642276764, 0.5149067640304565, -0.1241314709186554, -0.4736938774585724, -0.483786404132843, 0.6428046822547913, ...
def managed _ temp _ object ( ) : import tempfile _, temp _ object = tempfile. mkstemp ( ) try : yield temp _ object finally : os. remove ( temp _ object )
[ 0.5954570174217224, -1.0372978448867798, 0.5913006067276001, -0.5623487234115601, 0.044945500791072845, 0.0921068862080574, 0.4101029336452484, -0.3355835974216461, 0.1081838607788086, -0.25475189089775085, -0.6212517619132996, -0.6414985060691833, 0.013514225371181965, -0.3072816133499145...
def _ yule _ walker ( self ) : # v = np. eye ( self. d ) # u = np. eye ( self. d ) # c0 = np. eye ( self. d ) v = self. c [ 0, :, : ]. copy ( ) u = self. c [ 0, :, : ]. copy ( ) c0 = self. c [ 0, :, : ]. copy ( ) a = [ np. eye ( self. d ) ] b = [ np. eye ( self. d ) ] for i in range ( 1, self. k + 1 ) : # print ('i = '...
[ -0.004628387279808521, -0.1946042776107788, 0.9764028787612915, -0.4615475535392761, -0.23531875014305115, 0.2156178206205368, 1.626919150352478, 0.48441222310066223, -0.16304151713848114, 0.09970217198133469, -0.29609379172325134, -0.3421012759208679, -0.18756332993507385, 0.2597457468509...
def test _ prescence _ of _ argument ( image ) : assert ( image = = '. / tests / test _ files / image2. jpg')
[ -0.09539351612329483, 0.2198258936405182, 0.5526964664459229, 0.2815701365470886, 0.7935084700584412, 0.5987759232521057, 1.1952636241912842, -0.2555501461029053, -0.006456746254116297, 0.16035069525241852, 0.3401484191417694, 0.3857973515987396, 0.4578332006931305, 1.0886424779891968, -...
def reorient _ 4d _ image ( image ) : for i in np. arange ( image. shape [ 3 ] ) : if i = = 0 : newimage = np. transpose ( image [ :, :, :, i ], ( 2, 0, 1 ) ) newimage = np. rot90 ( newimage, 2 ) elif i = = 1 : tmpimage = np. transpose ( image [ :, :, :, i ], ( 2, 0, 1 ) ) tmpimage = np. rot90 ( tmpimage, 2 ) newimage ...
[ -0.656722366809845, -0.4605947434902191, 0.8990708589553833, 0.16857805848121643, -0.1645183563232422, -0.21906042098999023, 0.9486952424049377, -0.2611970603466034, 0.028808344155550003, 1.0266141891479492, 0.7372360229492188, -0.3995164930820465, -0.7235843539237976, -0.6740177869796753,...
def thisisamodule ( self ) : return np. arange ( self. start, self. end )
[ -1.4016470909118652, -1.136205792427063, 0.43903157114982605, 0.4219485819339752, 1.1453238725662231, 0.6033933162689209, 0.17521803081035614, -0.5704752802848816, 1.342018723487854, 0.17518819868564606, 0.40401625633239746, 1.480290412902832, -0.3231661021709442, 0.06984610855579376, -1...
def load _ registers _ from _ xml ( self, xml : str, filter _ reg : list [ str ] = none ) - > none : xml _ elements = et. parse ( xml ) xml _ registers = xml _ elements. findall ( " register " ) xml _ registers = self. _ filter _ by _ names ( xml _ registers, filter _ reg or [ ] ) # load all registers into the class fo...
[ -0.58379727602005, 0.8104366064071655, 0.4657161831855774, 0.42563775181770325, 0.24049153923988342, -0.28893405199050903, -0.8780763149261475, 0.06950727105140686, 0.514219343662262, 0.07036423683166504, -0.2858544588088989, -0.18589900434017181, 0.015424009412527084, 0.6198999881744385, ...
def connect ( db ='monitoring') : db _ config ['database'] = db try : if booldebug : print ('connettendo al database mysql...') conn = mysqlconnection ( * * db _ config ) if conn. is _ connected ( ) : if booldebug : print ('connessione stabilita.') return conn else : if booldebug : print ('connessione fallita.') return...
[ 0.0895349457859993, -0.05189500004053116, 0.6289255023002625, 0.6661596298217773, -0.09927351772785187, 0.11484525352716446, -0.37186864018440247, -0.08113125711679459, -0.26877376437187195, -0.3850994110107422, -0.3836231827735901, -0.7980202436447144, -0.7000247836112976, 0.3177500069141...
def kappa _ vec ( x, axis = none ) : if axis is none : if x. ndim = = 1 : return x [ : - 1 ] - n _ vec ( x ) / 2. 0 elif x. ndim = = 2 : return x [ :, : - 1 ] - n _ vec ( x ) / 2. 0 else : raise valueerror ( " x must be 1 or 2d " ) else : inds = [ slice ( none ) if dim! = axis else slice ( none, - 1 ) for dim in range ...
[ -0.3438173532485962, 0.07932408899068832, 1.0019112825393677, 1.2540432214736938, -0.3964904546737671, 0.1642235964536667, 0.8088234663009644, 0.31359177827835083, -0.20764878392219543, 0.30288687348365784, -0.33012354373931885, 0.9962301254272461, 0.5603042840957642, 0.5188620686531067, ...
def heatmap ( data, row _ labels, col _ labels, ax = none, cbar _ kw = { }, cbarlabel = " ", * * kwargs ) : if not ax : ax = plt. gca ( ) # plot the heatmap im = ax. imshow ( data, * * kwargs ) # create colorbar cbar = ax. figure. colorbar ( im, ax = ax, * * cbar _ kw ) cbar. ax. set _ ylabel ( cbarlabel, rotation = - ...
[ 0.23110102117061615, -0.0614636205136776, 0.8192129135131836, -0.53593909740448, -0.2171163260936737, -0.22080430388450623, 0.7375619411468506, 0.1912720650434494, 0.6822060346603394, 0.4868406355381012, 0.5292869806289673, 0.2905460298061371, 0.3012109696865082, 0.48161691427230835, 1.4...
def _ get _ port _ state ( self ) : return self. _ _ port _ state
[ 0.13161207735538483, -0.9298189878463745, 0.4249255657196045, -0.6858481764793396, -0.2279118299484253, 0.4999834895133972, 0.5536258220672607, -0.29296672344207764, 0.35082799196243286, -0.2105586975812912, 0.11328723281621933, 0.40817931294441223, -0.7836536765098572, -0.5945605635643005...
def reset _ message _ subscription _ by _ timestamp ( self, stream, subscription, timestamp ) : if self. persistent : url _ endpoint ='/ streams / persistent / stream / { } / subscription / { } / resetcursor / { } '. format ( stream, subscription, timestamp ) # else : # url _ endpoint ='/ streams / non - persistent / s...
[ 0.06398765742778778, 0.10731977224349976, 0.8018064498901367, 0.5488468408584595, 0.30351853370666504, -1.1763672828674316, -0.18096235394477844, -1.1177603006362915, 0.03674199804663658, 0.9406932592391968, 0.012536641210317612, 1.70259690284729, -0.8833601474761963, -0.5648339986801147, ...
def test _ data _ url ( self ) - > none : self. lookups [ " matrix. org " ] = [ ( ipv4address, " 10. 1. 2. 3 " ) ] data = base64. b64encode ( small _ png ). decode ( ) query _ params = urlencode ( { " url " : f'< html > < head > < img src = " data : image / png ; base64, { data } " / > < / head > < / html >'} ) channel...
[ -0.837863028049469, 1.6428793668746948, 0.4662608206272125, -0.0646037608385086, -0.2339162677526474, 0.6011358499526978, -0.2827630341053009, 0.23348653316497803, 0.4165818691253662, -0.5567042827606201, 0.06190444529056549, 0.6177408695220947, 0.12575091421604156, 0.2527555227279663, -...
def handle _ overflow ( s1, s2 ) : if s1 < = 30 and s2 < = 30 : print ( " no overflow " ) elif s2 > 30 and s1 < 30 : print ( " move to section 1 : " + str ( 30 - s1 ) ) elif s1 > 30 and s2 < 30 : print ( " move to section 2 : " + str ( 30 - s2 ) ) else : print ( " no space left in either section " )
[ -0.1958410143852234, -0.5359355211257935, 0.819009006023407, -0.6356432437896729, -0.22458308935165405, 0.75449138879776, 0.09978142380714417, -1.0094786882400513, 0.2271849662065506, -0.5555172562599182, 0.8385197520256042, 0.45778340101242065, 0.17165714502334595, 0.11945384740829468, ...
def reduce _ by _ crowding ( scores, number _ to _ select ) : population _ ids = np. arange ( scores. shape [ 0 ] ) crowding _ distances = calculate _ crowding ( scores ) picked _ population _ ids = np. zeros ( ( number _ to _ select ) ) picked _ scores = np. zeros ( ( number _ to _ select, len ( scores [ 0, : ] ) ) ) ...
[ -0.2998100221157074, -0.12611988186836243, 0.9028640389442444, 0.04959162324666977, 1.0269441604614258, -0.40706512331962585, 1.3168082237243652, -0.5128755569458008, -0.3289123773574829, 1.0294369459152222, -0.5638570785522461, 0.27432963252067566, 0.4826968014240265, -0.05180775746703148...
def update _ frame _ counter ( self ) : self. _ frame _ counter + = 1 ;
[ -0.8690667152404785, -0.35985782742500305, 0.3605584502220154, 0.46067410707473755, -0.35178646445274353, -0.13789549469947815, 0.47789517045021057, -0.16714760661125183, -0.19902905821800232, -0.8250440359115601, -0.5396412014961243, 0.637631356716156, -0.17617042362689972, 0.848738312721...
def shout _ with _ a _ number ( a _ string, a _ number ) : a _ string ='please work, i want to get this'a _ string. upper ( ) a _ number ='123'return a _ string + a _ number
[ 0.34851765632629395, -0.27191635966300964, 0.6304259300231934, 0.2449849396944046, 0.29676246643066406, -0.0794101431965828, -0.5829266309738159, 0.3940025866031647, 0.04810163006186485, -0.20689092576503754, 0.41412925720214844, 0.8450028896331787, 0.48186972737312317, -0.9652572870254517...
def get _ maps ( self, * ids ) : return self. _ request ( " maps ", ids = ', '. join ( str ( id ) for id in ids ) )
[ -1.7088466882705688, -0.3142462372779846, 0.3237100839614868, 0.6072919964790344, 0.9327630400657654, 0.05518084764480591, -1.1827536821365356, -1.0740126371383667, 0.9098464846611023, -0.19611455500125885, -0.24813757836818695, 0.1305873543024063, -0.7143511176109314, -0.13107873499393463...
def save _ tc ( self ) : with open ( os. path. join ( self. tc. model _ folder,'train _ config. pk'),'w') as tcp : pickle. dump ( self. tc, tcp )
[ -0.2493162304162979, -0.17022687196731567, 0.3398652672767639, -1.2947639226913452, 1.1792813539505005, 0.4445075988769531, 0.29960986971855164, 0.2087198793888092, -1.3015334606170654, 1.5455920696258545, -1.4362025260925293, -1.1605274677276611, -0.11095213145017624, -0.7323456406593323,...
def test _ derivative ( ) : r _ test = np. arange ( 18 ) dr = derivative ( r = r _ test, t = 0 ) list _ test = [ 2. 00000000e + 00, 3. 00000000e + 00, 6. 99826313e + 17, 6. 99826313e + 17, 6. 00000000e + 00, 7. 00000000e + 00, 2. 79929323e + 18, 2. 79929323e + 18, 1. 00000000e + 01, 1. 10000000e + 01, - 3. 00435858e + ...
[ 0.350698322057724, -0.5056894421577454, 0.9333088994026184, -0.34881827235221863, 0.7832261919975281, 1.2077089548110962, 0.730209231376648, 0.3404335379600525, -0.1312171369791031, -0.3472879230976105, -0.17200028896331787, -0.6476367115974426, -0.33572185039520264, 0.34283164143562317, ...
def check _ rect ( self, points ) : if len ( points )! = 4 : return false for pt in points : if len ( pt )! = 2 : return false return true
[ -0.2602778375148773, 0.7897326946258545, 0.5072430968284607, 0.9026298522949219, 0.6305867433547974, 0.7660399079322815, -0.4469480514526367, 0.18481257557868958, -0.193145751953125, 0.1355002224445343, -0.565900981426239, -1.186078667640686, -0.6023886799812317, 0.33147159218788147, -1....
def export ( self, san, path, canadd = false, exclude = [ ] ) : out = [ ] noupdate ='' for i in self. set _ params : if i not in exclude : g = san. getobj ( self, i ) d = san. _ defaults. get ( self. _ _ class _ _. _ _ name _ _ + '.'+ i,'' ) isdict = getattr ( self, i ). _ _ class _ _. _ _ name _ _ = ='dict'if d and d ...
[ -0.20185698568820953, -0.18781201541423798, 1.0158534049987793, 0.9576246738433838, -0.538159966468811, 0.15834897756576538, -0.10708638280630112, -0.689117431640625, 0.1222011148929596, 1.1351988315582275, 0.06343105435371399, 0.5713417530059814, 0.17718447744846344, 0.6037530303001404, ...
def create _ ml _ datasets ( ) : args = parse _ args ( ) client = bigquery. client ( ) for i, dest _ table in enumerate ( table _ names ) : # labels to exclude depending on classification problem exclude = [ labels [ idx ] for idx, label in enumerate ( labels ) if idx! = i ] query = base _ query. format ( args. project...
[ 0.059083420783281326, 0.5029556751251221, 0.5715397596359253, -0.0473603717982769, -0.18717177212238312, 1.38155996799469, 0.09983588755130768, 0.3134649395942688, -0.9321577548980713, -0.15715625882148743, 0.698177695274353, 0.8787009119987488, -0.13581189513206482, 0.4236595332622528, ...
def _ attributes _ t _ call _ setter ( self, key, val ) : # make sure interface is ready to use. d = self. _ attributes _ t _ init ( key ) # avoid recursion if d ['attributes'] [ key ] ['recursion'] : return # no callbacks for private keys if key [ 0 ] = ='_'and d ['private'] : return # key _ setter overwrites results ...
[ -0.9066290259361267, 0.47955742478370667, 0.576326310634613, -0.38897019624710083, -1.2691656351089478, -0.6366639733314514, -0.3542124927043915, -0.6902627348899841, -0.22820034623146057, 0.6228338479995728, 0.04322953149676323, 0.13975083827972412, 0.3725150227546692, 1.3849653005599976,...
def primary _ connection _ string ( self ) - > str : return pulumi. get ( self, " primary _ connection _ string " )
[ 0.536673367023468, -0.8802425265312195, 0.5301498770713806, 0.32487285137176514, -0.009888377971947193, 0.7920889258384705, -0.364613801240921, -0.41416165232658386, 0.22024524211883545, -0.463557630777359, 1.2920461893081665, 0.4273996651172638, -0.24592018127441406, -1.1791913509368896, ...
def add _ lease _ expiration _ ts ( key, lease _ expiration _ ts ) : instance = key. get ( ) if not instance : logging. warning ('instance does not exist : % s ', key ) return if instance. lease _ expiration _ ts = = lease _ expiration _ ts : return logging. info ('updating lease _ expiration _ ts ( % s - > % s ) ', in...
[ -0.525090217590332, -0.2673611044883728, 0.5248591303825378, -0.9864150881767273, -0.13982219994068146, 0.5714752674102783, -1.3884392976760864, 1.1814806461334229, 0.3431618809700012, 1.3302319049835205, -0.8375946879386902, -0.24638248980045319, 0.23485282063484192, -0.24052399396896362,...
def flow ( params = none ) : # inspect magic to get variables in caller scope import inspect, types frame = inspect. currentframe ( ) frame = frame. f _ back variables = frame. f _ locals tasks = { } for variable in variables : # if variable is a module, # check inside the module to see if any of them has task classes ...
[ 0.33104056119918823, -0.10040034353733063, 0.5851895809173584, 0.5954415202140808, 0.17155875265598297, -0.7151140570640564, 1.0068566799163818, 0.04119220748543739, 0.3027743399143219, -0.16309098899364471, -0.5002829432487488, 0.22132998704910278, -0.6472523808479309, 0.9550541043281555,...
def get _ props ( obj, prop _ names ) : return [ getattr ( obj, p ) for p in prop _ names ]
[ -0.015135001391172409, -1.3538668155670166, 0.3511723577976227, 0.3253674805164337, 0.5215140581130981, 0.26747190952301025, -1.1961653232574463, 0.14049890637397766, -0.190527081489563, 0.36845889687538147, 0.19642896950244904, -0.037775006145238876, 0.6983590722084045, -0.501374661922454...
def get _ pending _ moderated _ objects _ communities ( self, max _ id ) : query = q ( memberships _ _ user _ id = self. pk ) & ( q ( memberships _ _ is _ moderator = true ) | q ( memberships _ _ is _ administrator = true ) ) moderatedobject = get _ moderated _ object _ model ( ) query. add ( q ( moderated _ objects _ ...
[ -0.24849046766757965, -0.8347519636154175, 0.5083504915237427, -0.051103703677654266, 0.1514580100774765, -0.054889921098947525, -0.4578746557235718, 0.028342410922050476, 0.8385766744613647, -0.09687608480453491, -0.011033076792955399, 0.5728065967559814, -0.27534639835357666, 0.972485244...
def test _ blockheader _ to _ raw _ each ( ) : wrong = [ ] error = [ ] for block, filename in testing _ utils. gen _ allblocks ( ) : try : rawblockheader = blockheader _ to _ raw ( block ) if rawblockheader! = block ['rawblockheader'] : wrong. append ( filename ) except : error. append ( filename ) assert ( len ( wrong...
[ -0.1547785997390747, -0.5407474637031555, 0.7702777981758118, 0.4726540446281433, 0.46235889196395874, 0.26445716619491577, -0.022258203476667404, -0.053771961480379105, -0.3461274206638336, 0.4170812666416168, -0.7394375205039978, -0.6398166418075562, 0.047554366290569305, 0.4113701283931...
def get _ xml _ attrib ( xml _ tree, tag, attrib, repeated = false ) : attribute = none for element in xml _ tree. iter ( tag = tag ) : attribute = element. attrib [ attrib ] if repeated : break if attribute is none : raise valueerror ('xml attribute % s not found'% attrib ) else : return attribute
[ 0.4479822516441345, -0.6072995066642761, 0.4185451865196228, 0.062236297875642776, -0.35052379965782166, -0.5788242816925049, -0.5475704669952393, -0.15807925164699554, -0.3846386671066284, 0.54937744140625, 1.1822431087493896, 0.08270873874425888, 0.45296528935432434, -0.3321688175201416,...
def scores _ to _ rating ( score1, score2, score3, score4, score5 ) : # todo convert scores into numbers score1 = convert _ to _ numeric ( score1 ) score2 = convert _ to _ numeric ( score2 ) score3 = convert _ to _ numeric ( score3 ) score4 = convert _ to _ numeric ( score4 ) score5 = convert _ to _ numeric ( score5 ) ...
[ -0.5355952382087708, 0.28545019030570984, 0.7498785257339478, -0.05513656884431839, 0.41046378016471863, -0.314832478761673, 0.6355906128883362, -0.319101482629776, -0.5442498326301575, 1.459547996520996, -0.3102901577949524, -0.9924048185348511, -1.1572141647338867, -1.1037201881408691, ...
def get _ author ( self, user _ id ) : sql = f'select user _ login from wp _ users where id = { user _ id } ;'res = self. db _ session. execute ( sql ). first ( ) if res : return res [ 0 ] return none
[ -0.23341521620750427, -0.5281752347946167, 0.2960357069969177, 0.6089754700660706, -0.18584230542182922, -0.6677790880203247, 0.2406795173883438, -0.5370634198188782, -0.13338297605514526, 0.20135796070098877, 0.7733010053634644, 0.7590243220329285, -0.07448725402355194, -0.109770022332668...
def mpr _ wnetgetuser ( jitter, get _ str, set _ str ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " lpname ", " lpusername ", " lpnlength " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.0680866464972496, -0.3699266016483307, 0.5294279456138611, -0.5024082660675049, -0.45260781049728394, 0.1186237782239914, 0.12681050598621368, -0.8539018034934998, 0.06611035764217377, 0.020844854414463043, 0.08022637665271759, 0.08138670772314072, -0.8305041193962097, 0.322619915008544...
def from _ json _ file ( cls, json _ file ) : with tf. gfile. gfile ( json _ file, " r " ) as reader : text = reader. read ( ) return cls. from _ dict ( json. loads ( text ) )
[ 0.2738538086414337, -0.9118175506591797, 0.3477000892162323, -1.076884388923645, -0.8710132241249084, 0.8067831993103027, -0.21452684700489044, -0.3313833475112915, -0.7698656916618347, 0.5601502060890198, -0.12865619361400604, -0.4269385039806366, 0.624384880065918, -0.3729851245880127, ...
def do _ paint ( self, visible _ blocks, line _ numbers ) : # line numbers for the visible region. first _ visible _ line = visible _ blocks [ 0 ] + 1 last _ visible _ line = visible _ blocks [ 1 ] + 1 # line numbers for the indent guide. start _ line = line _ numbers [ 0 ] end _ line = line _ numbers [ 1 ] # guide sta...
[ 0.24213995039463043, -0.5219386219978333, 0.9541333317756653, -0.6321568489074707, -0.7570164203643799, 0.32179778814315796, 0.5090453028678894, 0.12493940442800522, -0.17191006243228912, 0.6834021806716919, 0.19501347839832306, 0.8706738352775574, -1.0552700757980347, 0.6175671815872192, ...
def _ get _ cutout ( self, transposed _ cube, threads : union [ int, literal [ " auto " ] ] = 1, verbose = true ) : # these limits are not guarenteed to be within the image footprint xmin, xmax = self. cutout _ lims [ 1 ] ymin, ymax = self. cutout _ lims [ 0 ] # get the image array limits xmax _ cube, ymax _ cube, _, _...
[ 0.18546758592128754, 0.5161948800086975, 1.0627775192260742, -0.3987603187561035, -0.16494260728359222, -0.4315982460975647, -0.005969109013676643, -0.16682523488998413, -0.4770604968070984, 0.6039250493049622, 0.35429978370666504, 0.29547688364982605, -0.47772544622421265, -0.107412479817...
def _ gather _ parameters ( stack _ def, context _ parameters ) : parameters = copy. deepcopy ( stack _ def. get ( " parameters ", { } ) ) stack _ specific _ params = { } for key, value in context _ parameters. iteritems ( ) : stack = none if " : : " in key : stack, key = key. split ( " : : ", 1 ) if not stack : # non ...
[ -0.061918213963508606, 0.38240814208984375, 0.5518516898155212, 0.3567579984664917, 0.22772112488746643, -0.6295824646949768, -0.8257212042808533, -0.0477614663541317, -0.7449373006820679, 1.797534465789795, 0.25228312611579895, 0.6436055302619934, 0.3989658057689667, 0.8170474767684937, ...
def construct _ xmp _ file ( imagefile, key _ value _ data ) : # remove the quotes and leading b from the string base64image = base64. b64encode ( imagefile. read ( ) ). decode ('utf - 8') # get the xmp template path = os. path. join ( os. path. dirname ( os. path. abspath ( _ _ file _ _ ) ), " template. xmp " ) with o...
[ -0.039886556565761566, -0.46593177318573, 0.5331902503967285, -1.0802838802337646, -0.9505743384361267, -0.4690884053707123, -0.605431318283081, 1.2388230562210083, -0.4514895975589752, 0.5812832713127136, 0.5905224084854126, -0.223981574177742, -0.43130072951316833, 0.20992884039878845, ...
def get _ object ( self, bucket _ name : str, object _ name : str ) - > dict : return self. objectdata. get _ object ( bucket _ name, object _ name )
[ -0.31328582763671875, -0.8344115614891052, 0.5827063322067261, -0.4424733519554138, -0.6622040867805481, 0.0800495371222496, -0.7823224663734436, -0.5767322182655334, -1.1605148315429688, 0.0776432603597641, -0.8359076380729675, 1.3934266567230225, 0.7079875469207764, -1.4062998294830322, ...
def mean ( self, axis : int = 0 ) - > " dataframe " : if axis = = 0 : return wrap _ df ( self. _ df. mean ( ) ) if axis = = 1 : return wrap _ s ( self. _ df. hmean ( ) ). to _ frame ( ) raise valueerror ( " axis should be 0 or 1 " )
[ -1.4283639192581177, 0.9673821330070496, 0.411190390586853, 0.7364912033081055, 0.01786704547703266, 0.02975059114396572, 0.33440130949020386, -0.5466084480285645, 0.2218220829963684, -0.025168402120471, 0.6233601570129395, 1.1920208930969238, -0.5952641367912292, -0.38022130727767944, 1...
def find _ peaks ( self, x, size, min _ height, min _ dist, max _ num ) : ir _ valley _ locs, n _ peaks = self. find _ peaks _ above _ min _ height ( x, size, min _ height, max _ num ) ir _ valley _ locs, n _ peaks = self. remove _ close _ peaks ( n _ peaks, ir _ valley _ locs, x, min _ dist ) n _ peaks = min ( [ n _ p...
[ -0.0078865522518754, 0.37011027336120605, 0.6668176054954529, 1.332267165184021, -0.19975373148918152, -0.007890268228948116, -0.13594409823417664, -0.14293476939201355, 0.38538163900375366, 0.3442319631576538, -0.7357684969902039, 0.014816952869296074, 0.041888851672410965, -0.41162115335...
def time _ in _ current _ status ( self, time _ in _ current _ status ) : self. _ time _ in _ current _ status = time _ in _ current _ status
[ -0.12948442995548248, -1.8694429397583008, -0.125481978058815, -0.5618387460708618, -0.5182119607925415, 1.3433732986450195, -0.367358922958374, 0.43752625584602356, -1.0219061374664307, 0.3797626495361328, -1.399626612663269, -0.5468911528587341, -0.0325944609940052, 0.8049901127815247, ...
def set _ annotmatch _ truth ( ibs, annotmatch _ rowid _ list, annotmatch _ truth _ list, duplicate _ behavior ='error') : id _ iter = annotmatch _ rowid _ list colnames = ( annotmatch _ truth, ) ibs. db. set ( const. annotmatch _ table, colnames, annotmatch _ truth _ list, id _ iter, duplicate _ behavior = duplicate _...
[ -0.7720262408256531, 0.11547628045082092, 0.4868876039981842, 0.06955350190401077, 0.2559276819229126, 0.6370824575424194, -0.11172138154506683, 0.30043846368789673, 0.11287923902273178, 1.400068759918213, -1.320893406867981, 0.3150345981121063, -0.48407140374183655, 0.1995566487312317, ...
def remove _ legend ( self ) - > none : if " chart _ legend " in self. _ artists. layout : self. _ artists. layout. pop ( " chart _ legend " ). remove ( )
[ 1.3601584434509277, 0.0394369475543499, 0.5204477906227112, -0.8418168425559998, -0.4612904489040375, 0.2681100368499756, 0.6803907752037048, 0.9217997193336487, 0.04181845486164093, -0.4785354733467102, -0.5517612099647522, -0.17510266602039337, -0.240687757730484, -0.26580241322517395, ...
def _ _ repr _ _ ( self ) : # type : (... ) - > str _ info = self. get _ additional _ info _ for _ repr ( ) additional _ info = ( _ info + ',') if len ( _ info ) > 0 else'' validator _ type = type ( self ). _ _ name _ _ main _ val _ function = self. get _ main _ function _ name ( ) none _ policy = get _ none _ policy _...
[ -0.43769222497940063, -0.7958477139472961, 0.5809244513511658, -1.0046907663345337, -0.4965684413909912, 0.42861413955688477, -0.3198297321796417, -0.04307183250784874, 0.024197464808821678, -0.05970221757888794, 0.3296734392642975, 1.0811476707458496, -0.07700157165527344, 0.0664176866412...
def cosmdustspectrum ( amin = 0. 1, amax = 1. 0, na = 100., p = 4. 0, rho = 3. 0, cosm = cosmology ( ) ) : return dust. dustspectrum ( rad = dust. dustdist ( rad = dust. adist ( amin = amin, amax = amax, na = na ), p = p, rho = rho ), md = cosmdens ( cosm = cosm ). md )
[ 1.1249059438705444, -0.5629668235778809, 0.4121818542480469, -0.10429323464632034, -0.14938212931156158, 0.42656010389328003, -0.39912644028663635, 0.24984616041183472, -0.6430649757385254, -0.41386228799819946, -0.09612854570150375, 0.9173966646194458, -0.2583026885986328, 0.0684516355395...
def get _ nb _ files ( directory ) : if not os. path. exists ( directory ) : return 0 cnt = 0 for r, dirs, files in os. walk ( directory ) : for dr in dirs : cnt + = len ( glob. glob ( os. path. join ( r, dr + " / * " ) ) ) return cnt
[ 0.05366835370659828, 1.331775188446045, 0.9571011066436768, 0.25582215189933777, 0.44861435890197754, -0.16681541502475739, 1.3389889001846313, 0.2526196837425232, 0.5405582785606384, -0.37512966990470886, -0.47106537222862244, -0.45894065499305725, -0.12846960127353668, 1.1494768857955933...
def schedule _ job ( results, registry, db, job _ keeper = none, pred = lambda job : true ) : @ push def schedule _ f ( job _ sink _ ) : job _ sink = job _ sink _ ( ) result _ sink = results. sink ( ) while true : key, job = yield if pred ( job ) : job _ msg = registry. deep _ encode ( job ) prov = prov _ key ( job _ m...
[ -0.49856165051460266, 0.4135999381542206, 0.46050795912742615, 0.1077343001961708, -0.3809329569339752, -0.4449009597301483, 0.21644510328769684, 0.5053682923316956, -0.4238060414791107, -0.8366240859031677, -0.09021947532892227, -0.4191890358924866, 0.17646503448486328, 0.4117239713668823...
def get _ letter _ count ( limit ) : letter _ count = 0 for x in xrange ( 1, limit + 1 ) : if x < 100 : for word in get _ double _ digit _ word ( x ) : print word letter _ count + = len ( word ) elif x < 1000 : for word in get _ triple _ digit _ word ( x ) : letter _ count + = len ( word ) elif x = = 1000 : letter _ co...
[ -0.3935399055480957, 0.4019503593444824, 0.5010092258453369, -0.7342891097068787, 0.23446576297283173, 0.18522724509239197, 0.21498219668865204, 0.32961776852607727, 0.8944924473762512, 0.898154079914093, -0.7761530876159668, 1.4935225248336792, 0.44226059317588806, 0.04807521030306816, ...
def building _ alhambrapsfmosaico ( listmosaics, listpsfnames, size ) : # it creates the list of images to be used ( from " listing. py " ). psflist = u. get _ str ( listpsfnames, 0 ) mosaiclist = u. get _ str ( listmosaics, 0 ) # starting with the process... # creating " albumdata " where the whole information will be...
[ 0.25280189514160156, -0.5325366258621216, 0.6616589426994324, 0.7204186320304871, -0.13237090408802032, -0.05010754615068436, 0.7280307412147522, 0.15132978558540344, -0.49072641134262085, -0.26349982619285583, -0.6747826933860779, -0.134690061211586, 0.015459279529750347, -0.0570833608508...
def normalizefullname ( originalvalue _ str ) : try : iscorrectformat, result _ str = _ _ check _ formatting ( originalvalue _ str ) if ( iscorrectformat ) : upper _ str = result _ str. upper ( ) return true, upper _ str else : return false, result _ str except exception as err : return false, err
[ -0.4847441613674164, -1.008324146270752, 0.9832062125205994, 0.7895565032958984, -1.6366873979568481, 0.5189322829246521, 0.5404340028762817, 0.13540762662887573, 0.30179598927497864, 0.5730270147323608, 0.3394937217235565, -0.44943180680274963, -0.6362137198448181, 0.10450616478919983, ...
def open _ any ( cls, file ) : with open _ file ( file, " rb " ) as f : header = f. read ( 8 ) f. seek ( 0 ) if header! = png _ sign : b = file _ to _ png ( f ) else : b = f. read ( ) return cls. from _ bytes ( b )
[ -0.48240983486175537, 0.0204150527715683, 0.6124057173728943, 0.37818512320518494, -0.5801913738250732, 0.2585171163082123, -0.16319800913333893, -0.08369745314121246, 0.0686178207397461, -1.1015100479125977, 0.3473169207572937, -0.6679210066795349, 0.09541106969118118, 0.2759276032447815,...
def rm ( paths ) : if isinstance ( paths, str ) : paths = paths. split ( ) return sh ( ['hdfs ','dfs ','- rm ','- r'] + paths )
[ -0.5404605269432068, 1.0767598152160645, 0.6176285147666931, 0.8681781888008118, 0.1409839242696762, -0.19197627902030945, -0.18471947312355042, 0.2636863887310028, 0.022009067237377167, -0.18820632994174957, 1.028664469718933, -0.8977171182632446, -1.078456997871399, -0.23921965062618256,...
def get _ page _ text _ dict ( page _ ids, silent = false ) : page _ ids = set ( page _ ids ) output = { page _ id : " " for page _ id in page _ ids } bucket = config. s3 _ bucket ( ) s3 _ conn = s3client. connect ( bucket ) for page _ id in page _ ids : urlpath = " % s / % s " % ('page _ text ', page _ id ) try : text...
[ 0.34097981452941895, -1.1976428031921387, 0.558891236782074, -0.506917417049408, -1.0927218198776245, -0.12365356832742691, -1.1648014783859253, 0.29980888962745667, 0.06727351993322372, 1.5065752267837524, -0.33121564984321594, -0.6691129207611084, -0.08653563261032104, -0.276830494403839...
def test _ get _ managed _ objects ( self ) : self. _ inequality _ test ( stratisdbus. get _ managed _ objects ( ), { } )
[ 0.2754181921482086, 0.39299264550209045, 0.3999159038066864, 0.614398717880249, 1.357498049736023, 0.9189260005950928, 0.2673492133617401, -1.361330509185791, 0.0801912248134613, -1.4735198020935059, -0.8016273379325867, 0.38345539569854736, -0.12846149504184723, 0.5435221195220947, 0.08...
def get _ size ( path ) : total _ size = 0 if ( os. path. isfile ( path ) ) : total _ size = os. path. getsize ( path ) elif ( os. path. isdir ( path ) ) : for dirpath, dirnames, filenames in os. walk ( path ) : for f in filenames : fp = os. path. join ( dirpath, f ) total _ size + = os. path. getsize ( fp ) return tot...
[ 0.4234646260738373, 0.6214277148246765, 0.8543367385864258, 0.15540727972984314, 0.04484468325972557, -0.020086750388145447, 1.2046018838882446, -0.45771998167037964, 0.8334438800811768, -0.293221652507782, -0.15739008784294128, -0.6586864590644836, -0.6027446389198303, 0.7665001749992371,...
def test _ get _ affiliate _ other _ site ( self ) : affiliate _ partner = mediapartner. objects. get ( id = 401 ) self. login ( affiliate _ partner. email ) response = self. client. get ('/ media - partner /') self. asserttrue ('/ media - partner - sign - in /'in response ['location'] ) self. assertequal ( response. s...
[ -0.3373146951198578, 0.21513402462005615, 0.4707227647304535, 0.333986759185791, -0.4238033592700958, 1.0210188627243042, 1.0294500589370728, 0.0668276846408844, 0.9053398966789246, -0.30243077874183655, 0.1409331113100052, 0.40467455983161926, 0.08801896125078201, -0.2057058960199356, 0...
def test _ certificate _ delete ( self ) : pass
[ 0.9169108867645264, 0.5336814522743225, 0.317423939704895, 1.3781237602233887, 0.11029794067144394, 0.41395893692970276, 1.151195764541626, 1.0706582069396973, 0.6346341371536255, -0.3781163990497589, -0.6877419352531433, -0.3602999746799469, -1.170691967010498, -0.5225515365600586, 0.38...
def test _ flickr _ multipart _ upload ( ) : def _ pretend _ to _ be _ flickr _ library ( ) : content _ type, body = " text / plain ", " hello world " h = httplib. httpconnection ( " httpbin. org " ) headers = { " content - type " : content _ type, " content - length " : str ( len ( body ) ) } h. request ( " post ", " ...
[ -0.27301499247550964, 0.21750275790691376, 0.6714206337928772, 0.2667334973812103, 0.7352933883666992, -0.066828154027462, 0.2846834659576416, -0.36950138211250305, 0.3786483407020569, -0.5427603721618652, -0.3085627853870392, -0.4429904818534851, -0.31917625665664673, 0.4115196466445923, ...
def bin _ permutations ( n ) : return int ( ( fact ( 2 * n ) ) / ( fact ( n ) ) * * 2 )
[ -0.1378021389245987, 0.8994731903076172, 0.2607647180557251, 0.771567702293396, -0.6421293616294861, 0.33730822801589966, 1.1460509300231934, -0.6614564657211304, -0.29496392607688904, -0.555578351020813, -0.6067173480987549, -0.20159216225147247, -0.3019425570964813, 0.8515443801879883, ...
def getresult ( self, * * resultargs ) : # set args for proxy objects try : self. result. setresultargs ( resultargs ) except attributeerror, e : pass finally : pass # allow for the result to have a different context than just the parent resultparent = self. resultparent if self. resultparent else self. parent resultpa...
[ 0.057121217250823975, 0.405233234167099, 0.7514505386352539, -0.3039013743400574, 0.667625904083252, -1.361025333404541, 0.5094954967498779, -0.7549684047698975, 0.37301933765411377, -1.2170146703720093, -0.21243371069431305, -0.24415984749794006, -0.8411073088645935, 0.22390107810497284, ...
def get _ neo4j _ connection ( host, port, user, auth ) : driver = graphdatabase. driver ( " bolt : / / % s : % s " % ( host, str ( port ) ), auth = basic _ auth ( user, auth ) ) session = driver. session ( ) return driver, session
[ -0.08808407932519913, -0.5610925555229187, 0.39820393919944763, 0.39733409881591797, 0.22175785899162292, -0.7212755084037781, -0.4250863790512085, -0.5305243730545044, -0.9963871240615845, 0.13526375591754913, -0.4618319571018219, 0.4566483497619629, -0.6700285077095032, -0.72229164838790...
def promjeni _ izbor _ stabla ( self, x ) : logging. debug ('promjeni _ izbor _ stabla, start.') ind = self. treeview. currentindex ( ) # dohvati trenutni aktivni indeks item = self. stablo. getitem ( ind ) # dohvati specificni objekt pod tim indeksom prog = item. _ data [ 2 ] # dohvati program mjerenja iz liste podata...
[ -0.10891739279031754, -0.5907471179962158, 0.5548307299613953, -0.45133906602859497, 0.22354471683502197, 0.6773004531860352, 0.9132987260818481, -0.5551167726516724, -0.18944837152957916, 0.23697496950626373, -0.5436705350875854, 0.08663208037614822, -0.3553117513656616, -0.17643961310386...
def match _ token ( self, token ) : words = token. split ( ) if len ( words ) = = 1 : # test here " no argument " selection keywords. keyword = token. upper ( ) if keyword = = " hetero " : return self. hetatm else : raise exception ('invalid selection keyword :'+ keyword ) elif len ( words ) > 1 : # here test selection...
[ -0.6145153045654297, -0.4615795314311981, 0.6642197966575623, 0.04947156086564064, -0.6075462102890015, -0.6848541498184204, -0.5097202062606812, -0.24934305250644684, -0.2584121823310852, -0.4354691505432129, -0.14594347774982452, -0.165656179189682, -0.701901376247406, 0.2424715161323547...
def endpoint _ configurations ( self ) - > sequence ['outputs. getdomainnameendpointconfigurationresult'] : return pulumi. get ( self, " endpoint _ configurations " )
[ -0.8331852555274963, 0.17353011667728424, 0.35990482568740845, 0.8700937032699585, 0.7218178510665894, 0.5088014602661133, 0.0009559755562804639, 0.20548447966575623, 0.5562770962715149, 0.6459041833877563, -0.8824754953384399, 0.1597641408443451, 0.34490954875946045, -0.5044791102409363, ...
def update _ exclusions ( excl, paths = list ( ) ) : log = get _ logger ( ) # note : the gfa and petal exclusion polygons in these files are for # the petal in the default position ( location 3 ). they will be # rotated by downstream codes like fiberassign. if the petal locations # in focalplane coordinates are very di...
[ -0.31732726097106934, -0.2183675318956375, 0.690848171710968, -0.5588428974151611, -0.5756334662437439, 0.3195440471172333, 0.31829625368118286, -0.10147812962532043, -0.528562068939209, 0.6762689352035522, -0.3574167788028717, -0.3627040386199951, 0.40003740787506104, -0.2771241366863251,...
def maketestsuitev200909 ( ) : suite = unittest. testsuite ( ) suite. addtests ( unittest. makesuite ( geolocationservicetestv200909 ) ) return suite
[ 0.4103231728076935, -0.08549726009368896, 0.29921504855155945, 0.32435929775238037, 0.3218343257904053, 0.06932858377695084, 0.2355811446905136, 0.5185093879699707, 1.5344284772872925, -0.14421968162059784, 0.16241231560707092, -0.19681237637996674, 0.16796714067459106, -0.6188164353370667...
def step ( self, closure : optional [ callable [ [ ], float ] ] = none ) - > optional [ float ] : loss = none if closure is not none : with torch. enable _ grad ( ) : loss = closure ( ) for group in self. param _ groups : eps = group ['eps'] lr = group ['lr'] + eps weight _ decay = group ['weight _ decay'] momentum = g...
[ -0.08329979330301285, 0.18814700841903687, 0.7826266288757324, -0.1077904999256134, -0.23233851790428162, -0.3266685903072357, 0.6680923700332642, 0.49615034461021423, -0.18109774589538574, -0.035311780869960785, -0.0539497509598732, 0.5790435075759888, 0.17736007273197174, 1.3437141180038...
def past _ trades ( key, secret _ key, * * params ) : endpoint ='mytrades'return request ( authenticate = true, key = key, secret _ key = secret _ key, version = 1, endpoint = endpoint, method ='post ', body _ params = params )
[ -0.8006927967071533, 0.9128263592720032, 0.7383686304092407, 0.1655007004737854, -0.1920507550239563, -0.44830209016799927, -1.056795597076416, -0.4612337052822113, -0.19370576739311218, 0.5471786260604858, -0.9619121551513672, 1.1569054126739502, -1.1004338264465332, -0.12608928978443146,...
def getrouter ( self ) : query ='' conn = self. get _ connection ( ) headers = {'content - type':'application / json ','authorization':'a10 % s'% self. sessionid } conn. request ('get ', self. get _ path ( ) +'/'+ query, headers = headers ) response = conn. getresponse ( ) expected _ status = 200 errors = { 500 :'an un...
[ -1.07410728931427, -0.7569825053215027, 0.8006673455238342, 0.029282359406352043, -0.3116622865200043, -0.9162884950637817, -0.5187703371047974, -0.8109018206596375, -0.015260228887200356, 0.31390517950057983, 0.20854543149471283, 0.9789474606513977, -0.6790220141410828, 0.5079305768013, ...
def _ get _ pixeles _ modis ( self, proporcion ) : poligono = loads ( self. wkt _ polygon ) geometrias = minimal _ pixel _ extractor _ modis. get _ pixeles _ modis ( poligono, proporcion ) if geometrias is not none : # # return pixel centroid return geometrias [ 0 ] # # no selected pixels return none
[ -0.6994932293891907, -0.8018273115158081, 0.3750767111778259, -0.00015612271090503782, -0.04753740504384041, -0.021971935406327248, -1.125422716140747, -0.5907903909683228, 1.184760570526123, 0.42781752347946167, 1.25222909450531, 0.3129846453666687, -0.5230746865272522, -0.528965055942535...
def put _ all ( self, multimap : typing. dict [ keytype, typing. sequence [ valuetype ] ] ) - > future [ none ] : check _ not _ none ( multimap, " multimap can't be none " ) if not multimap : return immediatefuture ( none ) partition _ service = self. _ context. partition _ service partition _ map : typing. defaultdict...
[ -0.8465170860290527, 0.05909442529082298, 0.772290825843811, 0.931229293346405, -0.16381846368312836, -0.5456537008285522, -0.5241312384605408, 1.0335519313812256, 0.19153478741645813, 0.383157342672348, -1.0982213020324707, -0.40663018822669983, -0.5225810408592224, 0.508687436580658, -...
def reconfig _ aeq _ get _ controlstatus ( fpgaid, verbose = 1 ) : global debug cmd = " rdwr - b % d global. g. rcfg. aeq _ controlstatus " % fpgaid if ( verbose & 2 ) = = 2 : print cmd out = exec _ cmd ( cmd ) if out = = " " : if ( verbose & 1 ) = = 1 : print " = " * 30 if ( verbose & 1 ) = = 1 : print " aeq control /...
[ -0.2834315598011017, -0.0896349549293518, 0.731595516204834, -0.5047574043273926, -0.01782122813165188, -0.30015799403190613, 0.6177748441696167, -0.013294734992086887, 0.11997319757938385, 0.2067180871963501, -0.27822038531303406, 0.3631855249404907, -0.676515519618988, 0.5262009501457214...
def extraer _ iv _ landsat ( self ) : mod = l. _ get _ recurso ('landsat / le7 _ l1t _ 8day _ ndvi') self. landsat7 _ 8day _ ndvi = self. _ interpolar _ serie ( mod, u'ndvi') mod = l. _ get _ recurso ('landsat / le7 _ l1t _ 8day _ evi') self. landsat7 _ 8day _ evi = self. _ interpolar _ serie ( mod, u'evi') mod = l. _ ...
[ -0.2284335345029831, 0.29049381613731384, 0.7107088565826416, -0.4469219148159027, -0.08819227665662766, 0.77910315990448, -0.35502105951309204, -0.2870432734489441, 0.5932350158691406, -0.17247775197029114, 0.2861650288105011, 0.2998746335506439, 0.10333530604839325, 0.639716386795044, ...
def send ( self, stanza ) : if type ( stanza ) in [ type ('' ), type ( u'' ) ] : return self. _ owner _ send ( stanza ) if not isinstance ( stanza, protocol ) : _ id = none elif not stanza. getid ( ) : global id id + = 1 _ id = ` id ` stanza. setid ( _ id ) else : _ id = stanza. getid ( ) if self. _ owner. _ registered...
[ -0.8343908190727234, 0.0541142001748085, 1.0326480865478516, 0.4547124207019806, -0.7162433862686157, -0.29033011198043823, 0.5986173748970032, -0.3876277208328247, 0.7562147378921509, -0.2364613115787506, -0.5781958699226379, 0.8905129432678223, -0.15257206559181213, 0.48481595516204834, ...
def clean _ tuples _ list ( tuples ) : new _ tuple = [ ] stemmer = frenchstemmer ( ignore _ stopwords = false ) for tup in tuples : new _ discription ='' words _ in _ discription = word _ tokenize ( tup [ 0 ] ) for word in words _ in _ discription : word. encode ('utf - 8') if stemmer. stem ( word. lower ( ) ) in scien...
[ -0.3038482666015625, 0.08706410229206085, 0.557896077632904, -0.29699671268463135, 0.3297272026538849, -0.021861223503947258, -0.7416467070579529, 0.1925133466720581, -0.6134148240089417, 1.1185154914855957, 0.1093253567814827, -0.5179399251937866, -0.064301036298275, 0.907516598701477, ...
def warn ( message ) : return status _ line ( ('status ','warn ', message ) )
[ 0.8504855036735535, 0.3262586295604706, 0.20488880574703217, 0.044912129640579224, 0.07491090148687363, -0.7412624955177307, -0.8639906048774719, -0.5233744978904724, -0.7579027414321899, -0.34980857372283936, 0.14687369763851166, 1.1238245964050293, 0.50850510597229, -0.2657848000526428, ...
def contains _ entry ( self, key : keytype, value : valuetype ) - > future [ bool ] : check _ not _ none ( key, " key can't be none " ) check _ not _ none ( value, " value can't be none " ) try : key _ data = self. _ to _ data ( key ) value _ data = self. _ to _ data ( value ) except schemanotreplicatederror as e : ret...
[ -0.3469083309173584, 0.03484112769365311, 0.5836266279220581, 0.5279666781425476, -0.566167950630188, 0.07013194262981415, -1.0267597436904907, -0.20522841811180115, 0.17902785539627075, 0.01052144356071949, -0.16949962079524994, 0.8353356719017029, -0.3775192201137543, 0.4256550967693329,...
def test _ pkg _ mancache ( self ) : plist = self. pkgsend _ bulk ( self. rurl, ( self. foo10, self. foo11 ), refresh _ index = true ) api _ obj = self. image _ create ( self. rurl ) self. pkg ( " list - af " ) self. _ _ do _ install ( api _ obj, [ " foo @ 1. 0 " ] ) # verify that manifest file exists after install. pf...
[ -0.4613429009914398, -0.13089381158351898, 0.8169095516204834, 0.20198525488376617, -0.16254594922065735, 0.10847759991884232, 0.09671148657798767, 0.2542979419231415, 0.49263256788253784, 0.2905322015285492, -0.6549723148345947, -0.2749803364276886, 0.3095937669277191, 0.8073129653930664,...
def get _ callables _ creator ( self ) : return failure _ raiser
[ 0.01127083133906126, 0.3979934751987457, 0.23016931116580963, 0.5344748497009277, 0.0878918468952179, 0.04751726984977722, -0.3271019756793976, -0.4322088062763214, -0.14332640171051025, -1.9872692823410034, -0.355862021446228, -0.125452920794487, -0.40296852588653564, 0.5129281282424927, ...
def _ _ call _ _ ( self, shuffle : bool = false, batch _ size : int = 2, num _ workers : int = 8, pin _ memory : bool = true, ) - > dataloader : dataloader = dataloader ( self. dataset, shuffle = shuffle, batch _ size = batch _ size, num _ workers = num _ workers, pin _ memory = pin _ memory, drop _ last = true, ) retu...
[ -0.25673598051071167, 0.7829305529594421, 0.6494422554969788, -0.47720324993133545, -0.26214754581451416, 0.11681243777275085, -0.2353014498949051, 0.15445375442504883, 0.6346404552459717, -0.5950236320495605, -0.04213882237672806, 0.4446203410625458, -0.15675553679466248, -0.0629489347338...
def update _ agent ( n ) : rewards [ n ], dr _ ds = agents [ n ]. get _ reward ( next _ observation, ref ) f, g = agents [ n ]. get _ transition _ matrices ( rls _ estimator ) agents [ n ]. update _ networks ( observation, next _ observation, ref, next _ ref, dr _ ds, f, g )
[ -0.8090741038322449, -0.31038329005241394, 0.43651673197746277, -0.26886820793151855, 0.1985602080821991, -0.4612566828727722, -0.22638164460659027, -0.5825503468513489, 1.023325800895691, 0.7533204555511475, -0.03592745587229729, -0.026107484474778175, 0.9342461228370667, 0.40908923745155...
def play _ game ( secret _ word ) : word ='' for i in range ( 0, len ( secret _ word ) ) : word = word + " - " return word
[ -0.13390325009822845, 0.7587342262268066, 0.6934409737586975, 0.016653776168823242, 0.8090579509735107, 1.0316165685653687, -1.0717239379882812, 0.18481044471263885, 0.1872314214706421, 0.7869127988815308, -0.08836614340543747, 0.8625717163085938, -0.9760344624519348, -0.013943273574113846...
def _ _ repr _ _ ( self ) : with self. _ lock : sensors = [ self. get ( name, extract = false ) for name in self. keys ( ) ] return " < katdal. { } sensors = { } cached = { } virtual = { } at { : # x } > ". format ( self. _ _ class _ _. _ _ name _ _, len ( sensors ), np. sum ( [ not isinstance ( s, sensorgetter ) for s...
[ -0.3029700517654419, -0.9942450523376465, 0.44955524802207947, -0.882359504699707, -0.5951131582260132, 0.6607421040534973, -0.653062641620636, -0.6342613697052002, 0.2192016839981079, 0.7048702239990234, -0.04547910764813423, 0.5496909618377686, 0.23662711679935455, 0.1411883682012558, ...
def get _ postcode _ error ( self ) - > str : logging. info ( " get error message from'post code'field. " ) return self. driver. find _ element ( * addaddresslocators. postcode _ error ). text
[ -0.43343380093574524, 0.5518576502799988, 0.35552945733070374, -0.11868835240602493, 0.47850310802459717, -0.10014756768941879, 0.7496287822723389, -0.03075139969587326, -0.11492045223712921, 0.43858975172042847, 0.3736724853515625, -0.23336905241012573, -0.7412205934524536, 0.059452466666...
def test _ get _ user _ jobs ( self ) : self. assertsetequal ( set ( self. user1. get _ user _ jobs ( ) ), { self. position1 } )
[ 0.315508633852005, 0.05442420393228531, 0.19630059599876404, 1.0621821880340576, 0.4435255527496338, 0.7303527593612671, 0.6336492896080017, -0.5397002696990967, -0.708271324634552, -0.7371021509170532, -0.5387004613876343, -0.40777987241744995, -0.38050612807273865, -0.9801390171051025, ...
def check _ images _ path ( path ) : global images _ path, analysis _ path if path is none : path = " " if os. path. isdir ( path ) : images _ path = path return true else : # if user did not upload analysis if analysis _ path = = " " : return false # else if user uploaded analysis else : return true
[ 0.03863031789660454, 0.34560632705688477, 0.44002413749694824, 0.2906785309314728, 0.37399619817733765, 0.32748690247535706, 0.742117166519165, -0.48366329073905945, -0.11241839826107025, -0.13515406847000122, 0.4639453589916229, -0.40936368703842163, -0.13907721638679504, 0.64011448621749...
def envoyerunfichier ( fichier _ chemin, fichier _ nom, ftp ) : # ouverture du fichier file = open ( fichier _ chemin,'rb') # fichier a envoyer ftp. storbinary ('stor'+ fichier _ nom, file ) # fermeture du fichier file. close ( )
[ 0.8249032497406006, -0.6618415117263794, 0.4242536723613739, -0.9014935493469238, -0.12505921721458435, 0.44100016355514526, -0.8989715576171875, -0.18030162155628204, -1.6463569402694702, 0.5963073372840881, -0.33475250005722046, 0.7558578252792358, -0.38981640338897705, -0.23479276895523...
def block _ device _ mapping _ create ( context, values ) : return impl. block _ device _ mapping _ create ( context, values )
[ -1.5485326051712036, 0.9731466770172119, 0.22061866521835327, 1.1751757860183716, -0.02955210953950882, 0.7492503523826599, 0.8711277842521667, -1.158705472946167, 0.2694864273071289, -0.481410413980484, -0.12201164662837982, -0.32182708382606506, 0.13087600469589233, -0.03891867399215698,...
def mpd _ active ( self ) : client = mpd ( ) try : client. connect ( self. mpd _ host, self. mpd _ port ) except exception as e : return false if self. mpd _ pass! ='' : client. password ( self. mpd _ pass ) if client. status ( ) ['state'] = ='play': self. player _ name = " mpd " self. running = true currentsong = clie...
[ -0.0846429392695427, -1.6740553379058838, 1.043372392654419, -0.29367172718048096, -0.8570729494094849, 0.9009763598442078, -0.4725593030452728, 0.5075039863586426, -0.2440016269683838, 0.46831077337265015, -0.18306928873062134, 0.7536895871162415, -1.4375770092010498, -0.9302704334259033,...