text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ grouped _ jobs _ categories ( self ) : job _ post _ 1 = create _ job ( title = " job a ", category = job _ category _ choices. design, company = self. test _ company ) job _ post _ 2 = create _ job ( title = " job b ", category = job _ category _ choices. programming, company = self. test _ company ) job _ p...
[ 0.15132860839366913, 0.7812379598617554, 0.4496106207370758, -0.34180209040641785, 0.7333489060401917, 0.5893978476524353, 0.6054117679595947, -0.44297635555267334, -0.9271045923233032, -1.0973342657089233, -0.023752417415380478, -0.09234026819467545, 0.2500722408294678, -0.238040313124656...
def check _ theme _ compatibility ( self, config ) : theme _ dir = config ['theme']. dirs [ 0 ] if not os. access ( theme _ dir, os. w _ ok ) : sys. exit ( " error : docstyler plugin cannot write to theme \ directory... perhaps you are using a built - in \ theme :'mkdocs'or'readthedocs '? \ please try using a third - p...
[ 0.045140340924263, -0.35761359333992004, 0.2922920882701874, -0.1734306663274765, 0.46561479568481445, 0.6999285817146301, 0.911758303642273, -0.47270724177360535, -0.08534029126167297, 0.20506446063518524, 1.0666929483413696, -0.1023796871304512, -0.38639411330223083, 0.1820332556962967, ...
def flag ( self, _ ) : # the _ is an artifact of the < button - 3 > binding if not self. clicked and not app. ended and app. started : app. flags + = ( 1 - self. mark ) # increment / decrement total flags self. mark = ( self. mark - 1 ) % 3 # cycle through blank / flag / mark self ['image'] = gif [ self. marks [ self. ...
[ -0.4908347725868225, -0.197352796792984, 0.3981840908527374, 0.09559952467679977, 0.6957767009735107, 0.7569402456283569, 1.4128139019012451, 0.08115673810243607, 0.19544541835784912, -0.39338040351867676, -0.493958443403244, 0.17046654224395752, 0.4799627959728241, 0.5827206969261169, -...
def create _ main _ work _ dir ( args ) : exit _ code = 0 if args. workdir! = " " : mainworkdir = get _ pilot _ work _ dir ( args. workdir ) try : # create the main panda pilot work directory mkdirs ( mainworkdir ) except pilotexception as error : # print to stderr since logging has not been established yet print ('fai...
[ -0.6713571548461914, 0.18422429263591766, 0.8307212591171265, -0.3309086263179779, 0.06386774033308029, 0.6577375531196594, 0.6546621322631836, 0.06177332624793053, 0.1336776465177536, -0.20083370804786682, 0.7655222415924072, -0.3267177641391754, -0.5554983615875244, 0.4332374036312103, ...
def test _ wh _ file _ empty ( self ) : l = [ ] rectangle. save _ to _ file ( l ) with open ( " rectangle. json ", " r " ) as f : self. assertequal ( " [ ] ", f. read ( ) )
[ -0.5449194312095642, -0.6460641622543335, 0.4775758981704712, -1.12071692943573, 1.782175064086914, 0.9303363561630249, -0.21569907665252686, -0.4040378928184509, -0.7737242579460144, 0.19828587770462036, -0.8262714147567749, -0.12478942424058914, 0.3444059491157532, 0.43870308995246887, ...
def equipinv ( self, inventory ) : if ( self. bag. name = = " null " ) : self. bag = inventory print ( " equipped the " + inventory. name + ". " ) else : print ( " allready have a " + self. bag. name + " equiped. " )
[ -0.8182785511016846, -1.185231328010559, 0.31510913372039795, 0.38282307982444763, 1.0793774127960205, -0.07080002874135971, -0.14319635927677155, 0.091813825070858, 0.4768621027469635, 0.9003706574440002, -1.0982842445373535, 0.30066558718681335, -0.448921799659729, 0.4735487699508667, ...
def show _ details ( self ) : print ( " book details for { book } : \ n ". format ( book = self. title ) ) print self for key, value in self. details. iteritems ( ) : print ( " { k } : { v } ". format ( k = key, v = value ) )
[ 0.13960973918437958, -0.6083502769470215, 0.2596242129802704, -0.5163329243659973, 0.2538487911224365, 1.1557574272155762, -0.6967470645904541, 0.3667583763599396, -1.3155395984649658, -0.08069440722465515, 0.5040056705474854, 0.6436075568199158, 0.5113579630851746, 0.8689864277839661, -...
def _ _ getitem _ _ ( self, index ) : inputs = { } image _ org = np. array ( image. open ( self. images [ index ] ). convert ('rgb') ) inputs [ " image " ] = image _ org segmt _ org = np. array ( image. open ( self. segmts [ index ] ) ) inputs [ " segmt " ] = self. encode _ segmt ( segmt _ org ) inputs [ " mask _ segmt...
[ -1.187120795249939, -0.8549511432647705, 0.6393124461174011, -0.862151563167572, 0.0968945175409317, 0.02575349062681198, 0.8874651789665222, -0.36839422583580017, 0.022354107350111008, 0.507404625415802, -0.2443806529045105, 0.004474672023206949, -0.07560983300209045, -0.29312101006507874...
def _ _ server _ cli _ entrypoint _ _ ( args ) : logger. trace ( " _ _ server _ cli _ entrypoint _ _ ( ) - function called " ) port = args. get ('port _ flag ', 9090 ) try : port = int ( port ) except valueerror : looger. error ( " parsed'port'value ('{ }') cannot be converted to int. ". format ( port ) ) sys. exit ( -...
[ -0.07882452011108398, 0.06166255474090576, 0.7797930836677551, 0.4364780783653259, 0.23776835203170776, 0.06346715241670609, 0.33318039774894714, 0.30402302742004395, -0.9243888258934021, 0.7125990986824036, -0.12563380599021912, 0.701409637928009, 0.11691240966320038, 1.1096869707107544, ...
def _ _ getitem _ _ ( self, idx ) : song _ idx, section _ idx = self. index _ mapper [ idx ] sample = self. song _ tensor [ song _ idx ] sample = sample [ section _ idx, :, : ] x = torch. tensor ( sample, dtype = torch. float ) return x. to ( device )
[ -0.6307715177536011, -0.10175439715385437, 0.4115009009838104, -0.8211833834648132, -0.6503800749778748, -0.32886257767677307, 0.10943581908941269, -0.45776432752609253, 0.18002252280712128, 0.19803522527217865, 0.17363059520721436, 0.0002705045626498759, 0.4034315347671509, -2.24308252334...
def html _ get _ links ( uri ) : content = docgenutilities. http _ load ( uri ) links = [ ] if content : urlinfo = urllib. parse. urlparse ( uri ) urlpath =''. join ( [ urlinfo. scheme,': / / ', urlinfo. netloc ] ) m = re. findall ('href = " ( [ ^ " ] + ) " ', content ) for href in m : if re. match ( r'\ s + : / / ', h...
[ -0.4668378531932831, 0.350511372089386, 0.7341408133506775, 0.5991811752319336, 0.27057498693466187, 0.08327629417181015, 0.25876864790916443, 0.3968534767627716, -0.04411185160279274, -0.5963174700737, 0.2965918481349945, -0.056199006736278534, -0.75786954164505, 0.48486068844795227, -0...
def display _ message ( message, other _ lines = none, line _ sep ='* ', side _ sep ='* ', secondary = false, no _ return = true ) : if secondary : line _ sep ='-'side _ sep ='' if not type ( message ) = = list : message = [ message ] if not other _ lines : other _ lines = [ ] if not type ( other _ lines ) = = list : o...
[ 0.9305734038352966, 0.23687991499900818, 1.0512213706970215, -0.07672595977783203, -0.24280568957328796, 0.05876103416085243, -0.16695445775985718, -0.12182216346263885, -0.3842718005180359, -0.08365485817193985, 0.7805145382881165, 0.13558948040008545, -1.0802339315414429, 0.8860574364662...
def showlist ( self, layer ) : requested _ type = self. request. get ('type ', none ) if requested _ type and requested _ type not in model. resource. types : raise util. badrequest ('invalid resource type.') resources _ to _ write = [ ] for resource in layer. resource _ set : if requested _ type in ( resource. type, n...
[ -0.9232144951820374, -0.8373478651046753, 0.507893443107605, -1.127051591873169, 0.340595543384552, -0.6957494616508484, 0.4943326413631439, -0.302421897649765, -0.32917189598083496, 0.504789412021637, 0.2015801966190338, 0.171625554561615, 0.37587597966194153, 1.2234275341033936, -0.007...
def add _ snap _ user ( cfg = none ) : if not cfg : cfg = { } if not isinstance ( cfg, dict ) : raise valueerror ('configuration parameter was not a dict : % s ', cfg ) snapuser = cfg. get ('email ', none ) if not snapuser : return usercfg = {'snapuser': snapuser,'known': cfg. get ('known ', false ), } # query if we're...
[ -0.9894523024559021, 1.1247154474258423, 0.5456871390342712, 0.010358794592320919, -0.770738422870636, -0.2312847226858139, 0.5878915786743164, 0.09916257858276367, 0.5285855531692505, -0.4672774076461792, -0.8180529475212097, -0.3333825170993805, 0.07136229425668716, 0.29532015323638916, ...
def pad _ image ( self, img, mode ='reflect') : pad _ size = ( self. input _ shape [ 0 ] - 16 ) / / 2 return np. lib. pad ( img, ( ( pad _ size, ), ( pad _ size, ), ( 0, ) ), mode )
[ -0.40764984488487244, 0.26011916995048523, 0.4399329721927643, -0.6078749299049377, 0.30800753831863403, 0.6877505779266357, 0.40227609872817993, -0.303774356842041, 0.28884807229042053, 0.0054421937093138695, 0.3710416555404663, -0.03659486025571823, -0.34249359369277954, 0.60418999195098...
def init ( template ) : click. secho ( " intiate a new profile readme project... \ n ", bold = true, fg = " green " ) init _ project ( template ) click. secho ( " the profile readme project was successfully created! ", bold = true, fg = " green " )
[ 0.5507972240447998, 0.784969687461853, 0.3572976291179657, 0.5516217947006226, 0.800530195236206, 0.34558433294296265, -0.10090545564889908, 0.4108676314353943, -0.9855226874351501, -0.031613219529390335, -0.6003391146659851, 0.06728222221136093, -0.20291131734848022, 0.1546243578195572, ...
def _ _ printtodos ( thingstodos, openonly = true, xml = xml ( ) ) : if not isinstance ( thingstodos, thingstodos ) : raise typeerror ( " input parameter should be a thingstodos " ) if openonly and not thingstodos. hasopen ( ) : return xml with xml. todos ( ) : for todo in thingstodos : try : print " processing todo : ...
[ -0.7989683747291565, 0.5255425572395325, 0.6387596130371094, 0.6973503232002258, -0.8112924695014954, 0.3059142231941223, -0.18024636805057526, -0.2883663773536682, 0.7711511850357056, -0.6000497937202454, 0.8277841806411743, 0.016934210434556007, 0.16293203830718994, 0.7105361223220825, ...
def kind ( self ) : return self. _ data. get ('kind')
[ -0.02123679779469967, 1.197373867034912, 0.1260102391242981, 0.43579185009002686, 0.6450755596160889, 0.7990244030952454, 0.4362389147281647, -0.3789401352405548, 0.1523856222629547, -0.15503162145614624, 0.07970334589481354, 1.4472805261611938, -0.2672288715839386, -0.6716324687004089, ...
def fit ( self, x, y = none ) : x = check _ array ( x, ensure _ 2d = false ) validate _ params ( self. get _ params ( ), self. _ hyperparameters ) if x. ndim = = 2 : _ check _ has _ one _ column ( x ) is _ uniform = self. kind = ='uniform'fitter = self. _ fit _ uniform if is _ uniform else self. _ fit _ balanced return...
[ -0.7342125773429871, -0.017850911244750023, 0.45398369431495667, 1.0106264352798462, 0.11386299133300781, 0.5527015924453735, 0.13478641211986542, -0.39483803510665894, 0.2352227121591568, -0.5643421411514282, -0.23958095908164978, 0.8390363454818726, -0.22047105431556702, 0.60017889738082...
def test _ creation ( self ) : team = teamfactory ( ) data = {'team': team. pk,'has _ signed':'on ','first _ name':'jane ','last _ name':'doe ', } response = self. client. post ( self. url, data ) self. assertequal ( response. status _ code, 302 ) self. user. refresh _ from _ db ( ) self. assertequal ( self. user. firs...
[ 1.124424695968628, 0.986142098903656, 0.37370145320892334, 0.8308305740356445, 1.0168529748916626, 1.4175045490264893, 0.07912369072437286, -0.8725139498710632, -0.753949761390686, -1.2145925760269165, -1.0945379734039307, -0.5336725115776062, 0.613892138004303, -0.4936927258968353, 0.22...
def pretty _ print ( self, out = none, mxdepth = none, mxargs = none, adsize = false, indent = " ", curdepth = 0 ) : pretty _ print ( self, out, mxdepth, mxargs, adsize, indent, curdepth )
[ 0.10342410206794739, 0.8340625166893005, 0.3185962736606598, 0.34557589888572693, -1.170005202293396, -0.7902142405509949, 0.06351449340581894, -0.43920257687568665, -0.23679910600185394, -0.5294557213783264, 0.6875781416893005, 0.9140013456344604, -0.18942520022392273, 0.48345592617988586...
def validate ( ctx, verbose = false ) : from qgreenland. config import config if verbose : print ('layers :') pprint ( config ['layers'] ) print ('layer groups :') pprint ( config ['layer _ groups'] ) print ('datasets :') pprint ( config ['datasets'] ) print ('configuration validation passed.')
[ 0.3853133022785187, 0.37267154455184937, 0.5115889310836792, 0.20478330552577972, 0.5426105856895447, 1.4907363653182983, 0.5050933957099915, -0.29446467757225037, -0.8873340487480164, -0.12016672641038895, -0.2699612081050873, 0.7903861403465271, -0.027427351102232933, 0.6238808035850525,...
def voronoi _ finite _ polygons _ 2d ( vor, radius = none ) : if vor. points. shape [ 1 ]! = 2 : raise valueerror ( " requires 2d input " ) new _ regions = [ ] new _ vertices = vor. vertices. tolist ( ) center = vor. points. mean ( axis = 0 ) if radius is none : radius = vor. points. ptp ( ). max ( ) # construct a map ...
[ 0.50539630651474, -0.3921242654323578, 0.7327730059623718, -0.3531354069709778, -0.386610209941864, -0.21369746327400208, 0.15928076207637787, -0.46185046434402466, -0.6512115597724915, 0.6269429922103882, -0.2988388240337372, 0.5872387290000916, 0.192550390958786, 0.20779304206371307, -...
def unregister _ cuda _ shared _ memory ( self, name : str =..., headers : dict [ str, t. any ] =... ) - > none :
[ -0.3956086039543152, 0.3949521481990814, 0.631848931312561, 0.47612419724464417, -0.7310519218444824, -0.7778353691101074, 0.18917517364025116, 0.5939624905586243, -0.3269219994544983, -0.1992773562669754, -0.9711305499076843, 0.09266060590744019, -0.8247072100639343, -0.06186046823859215,...
def read _ in _ halos ( filename ) : # list of satellite positions x, don't care in which halo they are all _ satellites = [ ] with open ( filename,'r') as file : for i, line in enumerate ( file ) : if i = = 3 : num _ halos = int ( line. strip ('\ n') ) # i = 4 is always the first halo. if i > 4 : if'#'in line : # next...
[ -0.5671781897544861, -0.3247919976711273, 0.6315276026725769, -0.32488447427749634, -0.654228687286377, 0.1405087411403656, -0.47432833909988403, 0.9754374027252197, -0.6328948140144348, 0.1800502985715866, -0.41769924759864807, -0.5498902797698975, -0.13108886778354645, 0.4577196538448334...
def mag _ fit ( ref _ source, cat, filt ) : ref _ list = find _ ref ( ref _ source = ref _ source, cat = cat ) os. chdir ( config. blazar _ photometry ) ref _ flux = [ ] ref _ fluxerr = [ ] source = find _ source ( cat = cat ) if filt = ='b': ref _ mag = ref _ source [ :, 3 ]. tolist ( ) ref _ magerr = ref _ source [ :...
[ 0.15034987032413483, -0.9685809016227722, 0.5830822587013245, -0.6873747706413269, 0.08450290560722351, 0.2792559564113617, 0.03511432558298111, 0.37026551365852356, 0.2392875701189041, 0.12116144597530365, -0.45431211590766907, 0.72760409116745, -0.01430087722837925, 0.331169068813324, ...
def is _ office _ manager ( self ) : return self. role = = userroles. office _ manager
[ -0.10772068798542023, -0.2686106562614441, 0.3390013873577118, 0.3946768641471863, 0.104852095246315, 0.3785730302333832, -0.6456707119941711, -0.04363270476460457, 1.4325591325759888, 0.10724501311779022, -0.4147506654262543, 0.3260246515274048, -0.23498591780662537, 0.6892237663269043, ...
def setlot ( self, lot ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. setlot ( self, lot )
[ -0.96343994140625, -0.7122172713279724, 0.3985832929611206, -1.061199426651001, -0.5959190726280212, 0.13003361225128174, -0.39431095123291016, -0.007339244708418846, -0.3660905957221985, -0.5773951411247253, -0.6967031955718994, 0.2319929450750351, -0.5570606589317322, 0.11243490129709244...
def compile ( input _ path, vocab _ path, output _ dir ) : # create output directory if not exist if not os. path. exists ( output _ dir ) : os. makedirs ( output _ dir ) # create vocab file directory if not exist. and get the file path. if not os. path. isfile ( vocab _ path ) : if not os. path. exists ( vocab _ path ...
[ 0.4811510741710663, -0.4453445076942444, 0.9454010725021362, 0.14172859489917755, 0.28748181462287903, -0.3515453338623047, 0.6276791095733643, 0.3396935760974884, -0.44987159967422485, 0.1757073700428009, 0.24621908366680145, 0.26465752720832825, -0.6948959231376648, 0.18737082183361053, ...
def divide _ numbers ( self, value _ a, value _ b ) : try : self. result = value _ a / value _ b except exception as error _ e : raise zerodivisionerror from error _ e
[ 0.2414264678955078, 0.20965251326560974, 0.31843918561935425, 0.5255202651023865, 1.3188178539276123, -0.12090365588665009, 0.7117577195167542, 0.16203971207141876, -0.4445018768310547, -0.5119136571884155, 0.6071970462799072, -0.30750083923339844, -0.08410479873418808, 0.6751865148544312,...
def test _ attempt _ file _ write ( ) : with patch ('builtins. open') : result = writer. attempt _ file _ write ('fake ','fake') assert result is none
[ -0.5063698291778564, -0.18858414888381958, 0.16534064710140228, -0.0209586750715971, 1.0686742067337036, 0.07624567300081253, 0.3668051064014435, -0.06227458640933037, -0.9207814931869507, -0.7757720947265625, -0.4256855249404907, -0.7531696557998657, -0.2493603378534317, -0.61260342597961...
def winbio _ winbioasyncopensession ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " factor ", " pooltype ", " flags ", " unitarray ", " unitcount ", " databaseid ", " notificationmethod ", " targetwindow ", " messagecode ", " callbackroutine ", " userdata ", " asynchronousopen ", " sessionhandle " ] )...
[ -0.5906242728233337, -0.333648145198822, 0.5106920599937439, 0.43763235211372375, 0.05699136108160019, 0.08443854004144669, 1.7649859189987183, -0.947055459022522, 0.2922605872154236, 1.173401117324829, 0.0644712895154953, 0.7735205888748169, -0.938847541809082, 0.5303837060928345, 0.108...
def proc _ exit _ cb ( self, exit _ status ) : sys. exit ( exit _ status )
[ 0.9307126402854919, -1.1393848657608032, 0.3539113998413086, 0.04689681529998779, 0.6105002164840698, 0.6992719173431396, -0.097878098487854, 1.0140180587768555, -0.6019127368927002, 0.6232423782348633, -0.4834955930709839, -0.2681335508823395, 0.7461755871772766, 0.36215901374816895, 0....
def do _ main _ loop ( x _ init, v _ init, t _ init, t _ final, cstate, decoherence, dt ) : sys. stdout = open ('output _ sh _ dyn ','w') print ( ) print ('= = = = = = = = = = = = = = = = = = = = = = = = = =') print ('welcome to hip - hop - 1d') print ('a miniature fssh program') print ('author : prateek goel') print (...
[ -0.4438856542110443, -0.42115136981010437, 1.0804316997528076, 0.149989515542984, -0.2687590420246124, 0.40179288387298584, 0.44538819789886475, -0.06452030688524246, -0.7154108881950378, 0.45270881056785583, -0.04642727971076965, -0.3297293782234192, 0.4408513605594635, 0.5102649331092834...
def test _ get _ step _ parameters ( self ) : pass
[ -0.29638198018074036, 0.5179296731948853, 0.4422910511493683, 1.540752649307251, 0.6688097715377808, 0.24246226251125336, 0.9046440720558167, 0.30417636036872864, -1.0212782621383667, -0.5104710459709167, -1.439511775970459, -0.3253609836101532, -1.0738091468811035, 0.8168644309043884, -...
def is _ prime ( num ) : is _ prime = true if num = = 0 or num = = 1 : return if num < 0 : raise valueerror ( " num must be greater than 0 " ) for i in range ( 2, num ) : if num % i = = 0 : is _ prime = false return is _ prime
[ -0.5324658155441284, 0.559140145778656, 0.429666131734848, 1.1127004623413086, 0.5891021490097046, -0.15000316500663757, -0.48670676350593567, 0.014744453132152557, 0.9725909233093262, -0.3333410322666168, 0.3589850664138794, -0.2968927323818207, -1.1512585878372192, 0.7569341659545898, ...
def channel _ to _ freq ( channel ) : if 1 < = channel < = 13 : return 2407000000 + channel * 5 * 1000000 if channel = = 14 : return 2484000000 if channel > = 15 : return 5035000000 + ( channel - 7 ) * 5 * 1000000 return none
[ -0.007080372888594866, 0.7183679938316345, 0.4633848965167999, -0.9971118569374084, 0.2406798154115677, -1.3311724662780762, 0.3976988196372986, -0.8806502819061279, 0.8714010715484619, -0.5266078114509583, -0.4340305030345917, 0.13972468674182892, -1.0538181066513062, 0.2814999222755432, ...
def forward _ classifier ( self, full _ traj, pred _ labels, step = 5 ) : # turn np arrays into tensors if type ( full _ traj [ 0 ] [ 0 ] [ 0 ] ) is np. ndarray : full _ traj = [ [ ( torch. floattensor ( o ). to ( self. device ), torch. floattensor ( s ). to ( self. device ), torch. floattensor ( a ). to ( self. device...
[ -0.907068133354187, 0.5308621525764465, 0.740141749382019, 0.43408191204071045, 0.23858115077018738, -0.3507372736930847, 1.1797186136245728, 0.293697714805603, -0.3246889114379883, 0.4965936839580536, 0.16379259526729584, -0.314269483089447, 0.3142216205596924, 0.9041966795921326, -0.21...
def authorize ( self ) : request _ token = self. service. get _ request _ token ( params = {'oauth _ callback': self. get _ callback _ url ( ) } ) session ['request _ token'] = request _ token return redirect ( self. service. get _ authorize _ url ( request _ token [ 0 ] ) )
[ -1.0517919063568115, 0.05809611827135086, 0.5962367057800293, 1.1689507961273193, 0.5424168705940247, -0.7727397084236145, 0.16129960119724274, 0.04328484460711479, 0.7214879393577576, -0.8578640818595886, 0.9102850556373596, 1.1097395420074463, 0.2984035015106201, -0.4813973009586334, 0...
def autolabel ( rects, ax ) : for rect in rects : height = rect. get _ height ( ) ax. text ( rect. get _ x ( ) + rect. get _ width ( ) / 2., 1. 0 * height,'%. 4f'% float ( height ), ha ='center ', va ='bottom')
[ 0.44274699687957764, -1.123473882675171, 0.7170628905296326, -0.18395677208900452, -0.002452829387038946, 0.21265535056591034, 0.5847195386886597, -0.5306399464607239, -0.02926158905029297, 0.5658864974975586, -0.16748987138271332, 0.2143736183643341, 0.6658414006233215, -0.301493644714355...
def html ( html _ data ) : html _ el = {'type':'html ','data': html _ data, } return html _ el
[ -0.3071519732475281, 0.9798985719680786, 0.24276918172836304, -0.24734392762184143, -0.5006251335144043, 0.9035149812698364, -0.5828260779380798, 0.6209685206413269, -0.610794186592102, -0.3546193540096283, -0.3593469560146332, 0.3598679304122925, 0.40132248401641846, 0.6128616333007812, ...
def startalarm ( self, name, defaultcategory = none, caller = none, info = none ) : cmd = self. findalarm ( name, defaultcategory ) if cmd is none : avnlog. error ( " no alarm \ " % s \ " configured ", name ) self. setinfo ( name, " no alarm \ " % s \ " configured " % name, workerstatus. error ) return false running = ...
[ -0.397970974445343, -0.1579149216413498, 0.6143073439598083, 0.627275288105011, 0.3287433385848999, 0.6609624624252319, -0.025621414184570312, -0.19582749903202057, -0.07807562500238419, 0.00024359277449548244, -0.9505589008331299, -0.20930513739585876, -0.7778419256210327, 0.5757033228874...
def test _ controls ( self ) : user _ input = input ( ) print ( " gimme anyol input : " ) event = inputevent. none while event = = inputevent. none : event = user _ input. poll ( ) print ( " event : ", event ) print ( " got event ", event. description ) self. assertisnotnone ( event )
[ 0.870391845703125, 0.16542962193489075, 0.3154428005218506, 0.19294394552707672, 0.7997090220451355, 1.1557289361953735, -0.042517051100730896, -0.9381390810012817, 0.39891326427459717, -1.0734620094299316, -0.6265825629234314, -0.26682373881340027, -0.23813927173614502, 0.0213899202644824...
def analytics ( self ) : return self. _ analytics
[ 0.22367867827415466, -0.19665645062923431, 0.13682204484939575, 0.3521559238433838, 0.6256500482559204, 0.5692501664161682, 1.1595714092254639, -1.5378762483596802, 0.24930407106876373, -0.9575850963592529, 0.7952428460121155, 0.9178510904312134, 0.9062216281890869, -0.7174020409584045, ...
def send _ message ( ) : username1 = request. form. get ('recipient _ username') username = username1. lower ( ) user = user. query. filter _ by ( username = username ). first _ or _ 404 ( ) current _ user = user. query. filter ( user. user _ id = = session ['user _ id'] ). first ( ) sender = current _ user body = requ...
[ -0.2968067526817322, 0.6411264538764954, 0.8028191328048706, 0.7374734282493591, 0.5407671928405762, 0.34694385528564453, 0.6120773553848267, 0.23714679479599, -0.8112620711326599, -0.35797226428985596, -0.09628695249557495, 0.007233650889247656, -0.3872651755809784, 0.6996744275093079, ...
def no _ show ( self ) : self. config. set ('main ','hide _ update _ dialog ', true ) self. reject ( )
[ 0.1603558361530304, 0.5198981165885925, 0.3172684907913208, 0.07605239748954773, -0.8762648701667786, 1.0431675910949707, 0.467809796333313, 0.7064116597175598, -0.19534768164157867, 0.4497915804386139, 0.06849753856658936, 0.018167654052376747, -0.4890766143798828, 0.312257319688797, 0....
def pick _ wm _ 0 ( probability _ maps ) : import sys import os if ( isinstance ( probability _ maps, list ) ) : if ( len ( probability _ maps ) = = 1 ) : probability _ maps = probability _ maps [ 0 ] for file in probability _ maps : print file if file. endswith ( " seg _ 0. nii. gz " ) : return file return none
[ 0.05309838056564331, -1.429848074913025, 0.7265563607215881, 0.71805739402771, 0.4908905029296875, 0.0493679903447628, 0.8453614711761475, -0.18088969588279724, -0.197313591837883, -0.2594180405139923, 1.2911934852600098, -0.7187438011169434, -1.4810161590576172, 0.5186759829521179, -1.0...
def _ _ init _ _ ( self, url _ type, * args, * * kwargs ) : if url _ type not in self. url _ types : raise valueerror ( " url _ type must be one of : { } ". format ( ", ". join ( self. url _ types ) ) ) self. url _ type = url _ type super ( ). _ _ init _ _ ( * args, * * kwargs )
[ 0.17001239955425262, 0.2513146698474884, 0.4522668719291687, 0.5395122170448303, 0.391436368227005, 0.7446158528327942, 0.06615153700113297, 0.04781046137213707, -0.06775818765163422, -0.21346162259578705, -0.11534867435693741, 0.42105576395988464, -0.28898826241493225, 1.5095793008804321,...
def randomize _ parameters ( self ) : for i in range ( len ( self. layers ( ) ) ) : self. _ layers [ i ]. randomize ( )
[ -0.9331381320953369, -0.001390053192153573, 0.3146536350250244, -0.2137044072151184, 1.596182942390442, 0.4481566846370697, 0.6505046486854553, -0.6684668660163879, -0.0541415810585022, 0.27933505177497864, 0.3444942235946655, 0.5031487941741943, -0.8435710668563843, 1.456554651260376, -...
def scan ( self ) : while true : # scan for a target
[ -0.9979899525642395, -0.43495747447013855, 0.27574899792671204, 0.27124273777008057, 0.6646509170532227, -0.22309522330760956, -0.16852262616157532, -0.09487153589725494, -0.3451617658138275, -1.3668547868728638, 0.3589613139629364, 0.4615735411643982, -0.7171059846878052, -0.3611798882484...
def transform ( self, x, y, theta ) : self. rotate ( theta ) self. shift ( x, y )
[ -0.3979814946651459, 0.2743974030017853, 0.2943221628665924, -0.47830918431282043, 0.6700722575187683, 0.34290963411331177, -0.8780266642570496, -0.7564084529876709, -0.12645356357097626, -0.061670415103435516, -0.7261312007904053, 0.04469306766986847, 0.006441538222134113, -0.804673433303...
def _ _ init _ _ ( self ) : self. scheme = super ( archivedmoelinks, self ). scheme self. netloc ='archived. moe'self. apiloc ='archived. moe'self. imgloc ='archived. moe '
[ -0.25028613209724426, -0.4303268790245056, 0.27054956555366516, -0.4942947030067444, 0.6567466259002686, 0.10623157024383545, 0.09288661926984787, 0.5886582136154175, 1.0768256187438965, -0.5198769569396973, -0.29685091972351074, -0.0819348469376564, 1.2498137950897217, 0.9814331531524658,...
def read ( self, path ) : with open ( path,'r') as f : text = f. read ( ) text = unicode ( text, self. encoding, self. decode _ errors ) return text
[ -0.432500958442688, -0.9086112976074219, 0.4446893036365509, -0.4290032982826233, -1.1366407871246338, 0.4589014947414398, -0.30965539813041687, 0.3138601779937744, 0.042867377400398254, -0.12975595891475677, -0.3009759187698364, 0.21627263724803925, -0.33209800720214844, -1.77418041229248...
def launch _ slot ( ) : webbrowser. open _ new _ tab ('http : / /'+ activeconfig. server _ name )
[ -0.15515835583209991, -0.9387677907943726, 0.15365184843540192, 0.7526705265045166, -0.7861939668655396, 0.4367654323577881, 1.0786937475204468, 0.12324061244726181, -0.29862070083618164, 0.19881245493888855, 0.0231876689940691, 1.2001768350601196, 0.5507603287696838, 0.46430906653404236, ...
def plot _ cell _ annotation ( adata _ map, annotation ='cell _ type ', x ='x ', y ='y ', nrows = none, ncols = none, marker _ size = 5, cmap ='viridis ', suptitle _ add = false ) : # todo add checks for x and y df _ annotation = ut. project _ cell _ annotations ( adata _ map, annotation = annotation ) if nrows is none...
[ 0.036001499742269516, 0.5847227573394775, 0.7514235377311707, 0.23358497023582458, -0.8991284966468811, 0.22061549127101898, -0.00492521608248353, 0.2235359102487564, -0.24070540070533752, 0.09894708544015884, 0.5167769193649292, 0.9488502740859985, 0.5499439835548401, -0.00831218529492616...
def convert _ matlab _ gens ( self, genfile ) : try : from scipy. io import loadmat except importerror ( " scipy. io. loadmat not found. is scipy installed? " ) : raise cell _ array = loadmat ( genfile ) return self. cell2dict ( cell _ array )
[ -0.49186915159225464, -0.5239034295082092, 0.4197341203689575, -0.13341017067432404, -0.6014050245285034, 0.8503790497779846, -0.11048334091901779, -0.21217821538448334, -1.5098366737365723, 0.37546515464782715, 0.047546565532684326, -0.8497031331062317, -0.35891199111938477, 0.49875134229...
def load ( bot : any, plug : path, reloading : bool = false ) - > optional [ exception ] : c : optional [ exception ] = _ compile _ plugins ( plug, reloading ) if c : return c global namespace for function in list ( namespace. values ( ) ) : try : hook : list [ union [ plugins, dict [ str, list [ str ] ] ] ] hook = fun...
[ 0.06953610479831696, -0.41970160603523254, 0.6421536803245544, 0.02852700464427471, 0.2236688733100891, -1.1528003215789795, -0.055117715150117874, -0.09919975697994232, 0.8390935659408569, -0.3348166346549988, -0.9017737507820129, 0.5880393981933594, -1.2284127473831177, -0.25333976745605...
def print _ first _ point ( filename ) : # print city name for reference city = filename. split ('-') [ 0 ]. split ('/') [ - 1 ] print ('\ ncity : { } '. format ( city ) ) with open ( filename,'r') as f _ in : # # todo : use the csv library to set up a dictreader object. # # # # see https : / / docs. python. org / 3 / ...
[ 0.3840014338493347, -1.1665195226669312, 0.8279615640640259, -1.1466032266616821, -0.2655462324619293, 0.4118155241012573, -0.13630326092243195, 0.3820355236530304, -0.5352850556373596, 0.14563259482383728, -0.06359124928712845, 0.4430626928806305, 0.4439144432544708, 0.43911904096603394, ...
def test _ generate _ custom _ report ( test _ output _ dirs : outputfolderfortests ) - > none : model = covidmodel ( ) model. set _ output _ to ( test _ output _ dirs. root _ dir ) report _ dir = test _ output _ dirs. root _ dir / " reports " report _ dir. mkdir ( ) train _ csv _ path = model. outputs _ folder / get _...
[ 0.5770146250724792, -0.26464390754699707, 1.0133203268051147, 0.3837616741657257, 0.33780714869499207, -0.5035475492477417, 1.0889856815338135, -0.05086785927414894, -0.7116333842277527, -0.7101770639419556, -0.547868013381958, -0.2050693929195404, 0.4606153964996338, -0.16153737902641296,...
def is _ palindrome ( head : node ) : stack = [ ] for val in head : stack. append ( val ) for val in head : if val! = stack. pop ( ) : return false return true
[ -0.3050266206264496, 0.9080173373222351, 0.7477670311927795, 0.4004697799682617, -0.1376035362482071, -0.07929018884897232, -0.24912357330322266, 0.05954282358288765, -0.059950876981019974, 0.18222106993198395, -0.6171556115150452, -0.27557069063186646, -1.990656852722168, 0.49123477935791...
def tostring ( self, level = 0 ) : outputstr = " " * level if level > 0 : if self. task. completionstatus = = todotask. task _ done : outputstr + = " - - - " + self. task. description + " - - - \ n " else : outputstr + = " " + self. label + " " + self. task. description + " \ n " for node in self. children : outputstr ...
[ -0.5591041445732117, -0.5521451830863953, 0.6885552406311035, -0.139796182513237, -0.47059082984924316, 0.36609506607055664, 0.24739834666252136, -0.25001636147499084, -1.2157306671142578, 0.3568456172943115, -0.005621533375233412, -0.15705862641334534, -0.10997241735458374, 0.387582957744...
def read _ from _ dataset ( self ) : pass
[ -0.34781980514526367, -0.6985058784484863, 0.2842616140842438, -0.11812780052423477, 0.02361222915351391, 0.6693592667579651, -0.5325901508331299, -0.061073318123817444, -0.943472683429718, -0.7307913899421692, 1.0952078104019165, 1.1027554273605347, 0.7008926272392273, -0.8795029520988464...
def _ _ init _ _ ( self, name, commname, typ, comp, compof, reg, enz ) : self. name = name self. commname = commname self. typ = typ self. comp = comp self. compof = compof self. reg = reg self. enz = enz self. cplst = [ ] self. inpath = [ ]
[ 0.5798787474632263, -1.0774551630020142, 0.4660823345184326, 0.23992641270160675, 0.3733379542827606, 0.449993371963501, 0.6986353993415833, 0.3282894194126129, 0.2116243839263916, -0.13527776300907135, -0.7734403610229492, 0.30391058325767517, -1.1245884895324707, 0.8262540698051453, 0....
def test _ owner ( self ) : self. category _ item _ class. category _ list = [ {'owner':'alexmochu ','id':'4873498080 ','category':'software'} ] user = " alexmochu " msg = self. category _ item _ class. get _ owner ( user ) self. assertequal ( msg, [ {'owner':'alexmochu ','id':'4873498080 ','category':'software'} ] )
[ -0.5533508658409119, 0.27327996492385864, 0.35536158084869385, 1.0694785118103027, 0.6540353298187256, -0.028732893988490105, 0.23933161795139313, -0.3903772234916687, -0.11007280647754669, -0.9214942455291748, -0.8174377679824829, -0.20426540076732635, 0.5012364983558655, -0.1194256469607...
def transformobjrotate ( self, radiand = 270, direction ='z') : switcher = {'x': mathutils. euler ( ( math. radians ( radiand ), 0, 0 ),'xyz') [ 0 ],'y': mathutils. euler ( ( 0, math. radians ( radiand ), 0 ),'xyz') [ 1 ],'z': mathutils. euler ( ( 0, 0, math. radians ( radiand ) ),'xyz') [ 2 ], } " " " @ return {'finis...
[ -0.23358938097953796, -0.41829290986061096, 0.6552959680557251, -0.5511654615402222, 0.09040168672800064, 0.05142538622021675, 1.1427239179611206, -0.6479944586753845, -0.14588364958763123, 0.33448606729507446, -0.6426786184310913, 0.6790753602981567, -0.7134957909584045, -0.38260108232498...
def test _ write ( self ) : message = protocolerrormessage ( code = 1 ) m _ bytes = write _ message ( message ) self. assertequal ( m _ bytes,'f00000001')
[ -0.9027203917503357, 0.6095447540283203, 0.23336467146873474, 0.16141295433044434, 1.5806808471679688, 0.06142009049654007, 0.05145709216594696, -0.004682326223701239, -0.056082770228385925, -0.6517400741577148, -0.06535988301038742, -0.1343093067407608, -1.2952394485473633, 0.323715001344...
def solve ( self, lower, upper ) : mid = ( lower + upper ) / 2 prev = 0 mpt = mid while prev! = mpt : prev = mpt mpt = checkout ( prev, self. value ) if mpt > self. upper : return [ mid, self. upper ] if mpt > mid : return [ mid, mpt ] return [ mpt, mid ]
[ -0.552809476852417, -0.5301291346549988, 0.5233852863311768, 0.04087964445352554, -0.14008203148841858, -0.07451280206441879, -0.24572539329528809, -0.6822584271430969, -0.012752866372466087, 0.5913527607917786, -0.34609144926071167, 0.025783855468034744, -1.4412016868591309, 0.61123180389...
def intersect ( self, other ) : return sourceset ( self. sources & other. sources, self. conditions | other. conditions )
[ 0.2836410701274872, -0.10573148727416992, 0.6419445872306824, -0.10768599808216095, -0.8468547463417053, -0.2810608446598053, -0.09138129651546478, -0.9921861290931702, -0.18029500544071198, -0.44316214323043823, 1.367315411567688, -0.2002934068441391, -0.9499132037162781, 0.38747647404670...
def relative _ heuristic ( doc ) : for np in doc. nps : if np. getattr ( " text _ lower " ) in data. relatives : anaphor = np # look back for the subject of the closest verb. r _ sent = reconcile. getannotsentence ( doc. getpath ( ), np ) previous _ marks = [ x for x in doc. getcontainedmarkables ( r _ sent ). getlist ...
[ 0.8055593371391296, -0.11268486082553864, 0.7273289561271667, -0.28632599115371704, -0.7804824113845825, 0.39716869592666626, 0.9599127173423767, 0.4411941170692444, -0.10249558836221695, 0.2004121094942093, 0.4568064212799072, 0.11216853559017181, 0.24479512870311737, 0.7914725542068481, ...
def qmf3 _ in _ format ( atomlist, q, p, fname ) : atomlist _ q = xyz. vector2atomlist ( q, atomlist ) masses = atomicdata. atomlist2masses ( atomlist ) nat = len ( atomlist _ q ) txt = " $ coordinates [ \ n " # positions in bohr for zi, ( x, y, z ) in atomlist _ q : atname = atomicdata. atom _ names [ zi - 1 ] txt + =...
[ 0.2943620979785919, -0.4898996353149414, 0.7863060832023621, -0.996895432472229, -0.35383257269859314, 0.6812370419502258, -1.1264252662658691, 0.004787505138665438, -0.6770055890083313, 0.198855921626091, -0.08975911885499954, -0.23374590277671814, -0.5305139422416687, -0.1439501643180847...
def set _ transition _ matrix ( self, trmtx ) : if trmtx is none : self. trmtx = none self. children = ( ) else : trmtx = build _ cpo _ transition _ matrix ( trmtx ) self. trmtx = trmtx assert isinstance ( trmtx, cpotransitionmatrix ), " argument'trmtx'should be a cpotransitionmatrix " self. children = ( trmtx, )
[ -0.42852064967155457, 0.30005258321762085, 0.16080988943576813, -0.6300642490386963, -0.369804322719574, -0.028145883232355118, 0.41273096203804016, 0.3878629803657532, -0.26823267340660095, 0.1117430254817009, -1.7307747602462769, -0.13753268122673035, -0.4195459187030792, -0.183081343770...
def generatereposity ( self ) : nodes = [ ] nodes. append ( self. _ parsemanifestxml ( self. manifestfile, self. worktree ) ) for node in itertools. chain ( * nodes ) : if node. nodename = ='project': name = self. _ reqatt ( node,'name') path = node. getattribute ('path') if not path : path = name if path. startswith (...
[ -0.3647330403327942, 0.4612995684146881, 0.7083282470703125, 0.5012110471725464, -0.31892848014831543, 0.7875673174858093, 0.4563595950603485, 0.10095550864934921, -0.18483981490135193, 0.21241094172000885, 0.42260274291038513, -0.5799525380134583, -0.5015723705291748, 0.43080130219459534,...
def initentityfromspec ( self, spec, key, path ) : if ( spec = = spec. structure ) : structure = structure ( key, path ) return structure if ( spec = = spec. restaurant ) : restaurant = restaurant ( key, path ) return restaurant raise contextentityconflicterror ( " no matching child - entity for'" + self. getspecstring...
[ 0.4395401179790497, -0.720102846622467, 0.565213680267334, 0.07933372259140015, 0.13901859521865845, 0.3633948266506195, 0.40085917711257935, -0.15885452926158905, -0.15477821230888367, -0.3353135287761688, 0.12885014712810516, 0.1037917211651802, 0.011492817662656307, -0.16448234021663666...
def process _ matches ( matches ) : # a - overall sum for match in matches : if match. tie : for p in match. participants : if match. season : p. sumseasontie + = 1 else : p. sumoffseasontie + = 1 else : try : if match. season : match. winner. sumseasonwon + = 1 else : match. winner. sumoffseasonwon + = 1 loser _ list ...
[ 0.3287977874279022, -0.28216928243637085, 0.967481791973114, 0.11341462284326553, 0.31401708722114563, 0.6558187007904053, 1.163709044456482, 1.158230185508728, -0.022070402279496193, 1.0837997198104858, 0.03694574907422066, -0.41545090079307556, 0.2802223563194275, -0.3288210928440094, ...
def basc _ can _ skip _ init _ fields ( self, field _ names ) : # pylint : disable = no - self - use fields = field _ names [ : ] fields. remove ( barrele _ constant. barrele _ field _ host ) if len ( fields ) = = 0 : return true return false
[ -0.053452104330062866, 0.8599979877471924, 0.40681377053260803, 0.21531356871128082, 0.5125795006752014, 1.0374923944473267, 0.48216161131858826, 0.46798205375671387, -1.4705244302749634, -0.2721777558326721, -0.9345299005508423, -0.23382742702960968, -1.3723933696746826, -0.47445917129516...
def omniglot _ tasksets ( train _ ways, train _ samples, test _ ways, test _ samples, root, device = none, * * kwargs, ) : data _ transforms = transforms. compose ( [ transforms. resize ( 28, interpolation = lanczos ), transforms. totensor ( ), lambda x : 1. 0 - x, ] ) omniglot = l2l. vision. datasets. fullomniglot ( r...
[ -0.05360441654920578, 0.42261621356010437, 0.804735004901886, -0.5595744848251343, -1.0168243646621704, -0.04749283194541931, 0.14339062571525574, -0.517725944519043, 0.34940603375434875, -0.1231364831328392, -0.006873596925288439, 0.38401859998703003, 0.9850718975067139, 0.164522290229797...
def test _ pass _ args _ correctly _ single _ db ( self, mock _ download _ master _ file, mock _ download _ history _ file, mock _ get _ history _ db _ config, mock _ list _ bundles, mock _ list _ history _ databases, mock _ list _ realtime _ databases ) : def _ mock _ get _ history _ db _ config ( db ) : return { " ba...
[ -0.21566960215568542, 0.5591545104980469, 0.8295731544494629, 0.3089444041252136, 1.0768959522247314, 0.48146528005599976, 1.0307246446609497, 0.5707460641860962, -0.2684577405452728, 0.16016432642936707, -0.1476672887802124, -0.1661047488451004, -0.1366276741027832, 0.8255028128623962, ...
def serialize _ model ( model, filepath ) : pickle. dump ( model, open ( filepath,'wb') )
[ 0.277420312166214, -0.9111817479133606, -0.03923096880316734, -0.04687286913394928, 0.5087479948997498, 0.9496737718582153, 0.23970822989940643, -0.05655951425433159, -0.13108311593532562, 0.7394439578056335, -1.2856606245040894, -0.5659398436546326, 0.18478068709373474, -0.118396222591400...
def edit _ message _ reply _ markup ( self, chat _ id, message _ id, reply _ markup, * * options ) : return self. api _ call ( " editmessagereplymarkup ", chat _ id = chat _ id, message _ id = message _ id, reply _ markup = reply _ markup, * * options )
[ -0.9885348081588745, -0.38958871364593506, 0.48510584235191345, -0.32807618379592896, -0.026174435392022133, -0.9302282333374023, -0.3922171890735626, 0.014130739495158195, 0.1902940273284912, 0.49173521995544434, 0.26412513852119446, 1.329310655593872, -1.1208890676498413, -0.029525490477...
def test _ validate _ dob _ bad ( self ) : bad _ dob = " 99 / 99 / 2005 " with self. assertraises ( exception ) as context : helpers. validate _ dob ( bad _ dob ) exception = context. exception self. assertequal ( exception. args [ 0 ] [ " status _ code " ], 400 ) self. assertequal ( exception. args [ 0 ] [ " message "...
[ -0.11690209805965424, 0.291387140750885, 0.9315052628517151, 0.8162002563476562, 0.7395015358924866, 0.691515326499939, -0.3268592655658722, -0.6600233912467957, 0.4284362196922302, -0.511363685131073, -0.1700139343738556, 0.014202987775206566, -0.11883240193128586, 0.9545372128486633, 0...
def getposition ( self, enemy = 0 ) : if enemy = = 0 : config = self. enemy else : config = self. me points = none lowercolor = np. array ( [ config ['clowh'], config ['clows'], config ['clowv'] ] ) uppercolor = np. array ( [ config ['chighh'], config ['chighs'], config ['chighv'] ] ) imghsv = cv2. cvtcolor ( self. fra...
[ -0.19107849895954132, -0.6142354011535645, 1.2498317956924438, 0.32560494542121887, 0.10873908549547195, -0.9048523902893066, 0.3157622814178467, 0.14115507900714874, 0.19716769456863403, 1.0354788303375244, -0.07661329954862595, -0.7074143886566162, -0.4688296616077423, 0.4292407631874084...
def sample _ canonical ( self ) : pass
[ -0.1306757926940918, -0.9274260997772217, 0.27020227909088135, 0.8646965026855469, -0.7107835412025452, 1.2436738014221191, 0.584937572479248, -0.5022373199462891, -0.3985740840435028, 0.06901320815086365, 0.05821351334452629, 1.2064546346664429, 0.11333213746547699, 0.29215362668037415, ...
def test _ is _ deeann _ reversed ( self ) : self. assertequal ( reverse _ string ('deeann'),'nnaeed')
[ -0.6422315239906311, 0.163429394364357, 0.28195497393608093, -0.7359287738800049, 0.8004252314567566, 0.7413042187690735, -0.679089367389679, 0.031244706362485886, 0.2673216760158539, -0.8877734541893005, -0.598270058631897, 0.8510233163833618, 0.20346902310848236, -0.42476388812065125, ...
def bit _ layout ( iterable : iterable [ _ t ], binary _ op : callable [ [ _ t, _ t ], _ t ] = add ) - > list [ _ t ] : # this loop makes serious sense when the intermediate # representation in [ tweakblogs ] is understood. arr = list ( iterable ) i, length = 1, len ( arr ) while i < length : j = 2 * i - 1 while j < le...
[ -0.5483155250549316, 0.3058128356933594, 0.607099711894989, 0.22338898479938507, -0.2496987134218216, -0.1549461930990219, 1.458478331565857, -0.147525817155838, -0.35800406336784363, 0.7325747609138489, -0.9410669207572937, 0.03512180969119072, -0.6215648651123047, -0.2798064947128296, ...
def process _ middleware ( self, user _ agent, cache _ get _ many _ calls _ for _ request = 1 ) : fake _ request = httprequest ( ) fake _ request. meta ['http _ user _ agent'] = user _ agent with mock. patch. object ( caches ['default'],'get _ many ', wraps = caches ['default']. get _ many ) as mocked _ code : request ...
[ -0.615020751953125, 0.6612700819969177, 0.728458046913147, 0.47818228602409363, 0.48207372426986694, -0.09303334355354309, -0.06743557751178741, -0.10108327865600586, 0.9348003268241882, -0.4770054221153259, -0.31761956214904785, -0.5965672135353088, -0.10098002105951309, 0.839865326881408...
def user _ model ( username ) : return {'username': username,'scope':'basic ', }
[ -1.0189225673675537, 0.06865788251161575, 0.18207144737243652, -0.31975317001342773, -0.5108996629714966, 0.2865111529827118, 0.17655186355113983, -0.4407343864440918, -0.5129478573799133, 0.1483701914548874, -1.9009573459625244, -0.8679938316345215, 1.0526257753372192, -0.4873664081096649...
def write _ data _ item ( module _ symbols, symbol, repository ) : ret = true data _ item = create _ data _ item ( module _ symbols. qualname, symbol ) if not repository. write _ data _ item ( data _ item ) : logger. error ( " could not successfully operate on data item. data id : { 0 } ". format ( data _ item. id ) ) ...
[ -1.2848998308181763, 0.5649628639221191, 0.35084566473960876, -0.27598801255226135, 0.9742259383201599, 0.8155655264854431, -0.043846674263477325, 0.06071966513991356, -0.26704102754592896, 0.08282291144132614, -1.0967516899108887, -0.09711620211601257, -0.5738498568534851, -0.199770197272...
def perform _ actions ( self ) : self. _ update _ online _ status ( ) for action, parameters in self. actions : condition = parameters. pop ('condition ', none ) device _ name = parameters. get ('device ', none ) if log. level < = logging. debug : message _ f = ['performing { 0 }'] if parameters : message _ f + = ['( *...
[ -1.0392463207244873, -0.3095584213733673, 0.4199885129928589, 1.0784977674484253, 0.7341518402099609, -0.3820311725139618, 0.8240366578102112, -0.004211799707263708, -0.2835777699947357, 0.4642126262187958, 0.765969455242157, 0.04073629900813103, 0.21687501668930054, 0.9024006128311157, ...
def load _ data ( city, month, day ) : df = pd. read _ csv ('c : / / users / / mur / / documents / / tutorials / / udacity / / nanodegree _ prog _ for _ datasci / / project _ python _ 2 / /'+ city _ data [ city ] ) print ( " \ n - - - debug csv loaded in fram - - - ", df. head ( 3 ) ) # for debug # convert the start ti...
[ -0.09294493496417999, -0.31491196155548096, 0.8469297885894775, -0.6103605628013611, -0.6475763320922852, -0.17155934870243073, 0.08242955803871155, 0.521111249923706, 0.2923344075679779, -0.4391078054904938, 0.18400299549102783, 0.14630024135112762, 0.34812408685684204, 0.4114944636821747...
def _ getversion ( ) : try : cur _ dir = os. path. dirname ( _ _ file _ _ ) cmd = ['git ','- c ', cur _ dir,'describe ','- - tags ','- - dirty'] with open ( os. devnull,'w') as null : return subprocess. check _ output ( cmd, stderr = null ). strip ( ) except subprocess. calledprocesserror : # todo : remove once the fir...
[ 1.0886822938919067, -0.2295621931552887, 0.48363983631134033, -0.28623440861701965, 0.8538466691970825, -0.04092692956328392, 0.3603931665420532, -0.42337512969970703, -1.2873914241790771, 0.616149365901947, 0.11232846975326538, 0.2954866886138916, -0.6205785274505615, 0.8879045248031616, ...
def get ( self, request, path, * * kwargs ) - > httpresponse : try : response = serve ( request, path, insecure = true, * * kwargs ) except http404 : response = static. serve ( request, self. index _ path, document _ root = self. index _ document _ root, * * kwargs, ) return response
[ -0.814453125, -0.3399119973182678, 0.47516292333602905, 1.1051926612854004, 0.45865631103515625, 0.09201555699110031, 0.1886090487241745, -0.6937365531921387, 0.07649228721857071, 0.09924778342247009, 0.4088188111782074, 0.5543837547302246, -1.1680452823638916, -1.0215063095092773, 0.065...
def get _ integers _ div _ frac ( lst ) : result = [ ] for elem in lst : str _ elem = str ( elem ) if '.'in str _ elem : integer = int ( str _ elem. split ( '.') [ 0 ] ) decimals = int ( str _ elem. split ( '.') [ 1 ] ) if integer! = 0 and decimals > 0 : if decimals % integer = = 0 : result. append ( elem ) return resu...
[ -0.899427056312561, 0.17751863598823547, 0.5532395839691162, 0.5608490109443665, 0.13434870541095734, -0.18167679011821747, 0.1740412563085556, 0.062219131737947464, 0.03128373250365257, -0.3830511271953583, 0.020854754373431206, -0.722357451915741, -1.176941156387329, 0.8405319452285767, ...
def exp _ likelihood _ age ( lam, vectors ) : durations, ages = vectors log _ lambda = lam [ 0 ] + ( lam [ 1 ] * ages ) lambdas = np. exp ( log _ lambda ) log _ lik = log _ lambda - ( lambdas * durations ) return - 1 * log _ lik. sum ( )
[ -0.14163772761821747, -0.0875210240483284, 0.7591810822486877, -0.9898992776870728, -0.2758951187133789, 1.003037452697754, -0.8805170655250549, 0.31042540073394775, 0.5755465626716614, 0.07241414487361908, -0.012364822439849377, 0.17343580722808838, 0.39529094099998474, 0.3271940350532532...
def run _ makeblastdb ( path : str, dbtype : str = " nucl " ) - > str : cmd = ( " makeblastdb ", " - in ", path, " - dbtype ", " nucl " ) logger. info ( " executing % s ", repr ( " ". join ( cmd ) ) ) return subprocess. check _ output ( cmd ). decode ( " utf - 8 " )
[ -0.05586820840835571, 0.7026426196098328, 0.7467640042304993, 0.170709490776062, -0.19988040626049042, 0.9590064287185669, -0.0488479919731617, -0.9060072302818298, -0.16713206470012665, 0.07790946215391159, -0.5281152725219727, 0.8910205960273743, -1.0115045309066772, -0.4343918561935425,...
def insert _ message ( ip _ message, message ) : sql = " " " insert into comments ( comment _ ip, comment _ time, comment _ message ) values ( % s, % s, % s ) ; " " " conn = none try : postgresdatabase = " flaskdb " postgresuser = " ignacio " postgrespass = " holas " conn = psycopg2. connect ( database = postgresdataba...
[ 0.01930197700858116, 0.4893051087856293, 1.1367937326431274, 0.06134546548128128, 0.8929004669189453, 0.03917646408081055, -0.15371356904506683, -0.13086873292922974, -1.7591817378997803, 0.40489596128463745, 0.36898618936538696, -0.11207666248083115, -1.536599040031433, -0.303700804710388...
def get _ seed ( self ) : return self. _ seed
[ 0.2547707259654999, 0.03109697252511978, 0.3018122911453247, -0.07960370928049088, 0.0068293786607682705, 0.3434188961982727, 0.8578895926475525, 0.10805949568748474, 0.024540752172470093, -1.7168623208999634, 0.10616696625947952, 1.207064151763916, -0.4875466227531433, -0.7418413758277893...
def _ string _ to _ python ( self, v, dsc = none ) : if dsc is not none : # check if we deal with a set if dsc [ 7 ] & fieldflag. set : return self. _ set _ to _ python ( v, dsc ) if dsc [ 7 ] & fieldflag. binary : return v if self. use _ unicode : try : return unicode ( v, self. charset ) except : raise return str ( v...
[ -0.3890520930290222, 0.2773902118206024, 0.40342381596565247, -0.9948135018348694, -0.23164759576320648, -0.449032723903656, -0.16294291615486145, -0.10920495539903641, -0.11927783489227295, 0.19821582734584808, -0.2564915716648102, 1.2613087892532349, -0.029271474108099937, -0.31701612472...
def announcecontent ( row, column ) : # # todo : button to repeat a clue? # # todo : repeat a clue? # # todo : announce clues differently? height = 0 global current _ row, current _ col board _ row = row * 2 + top _ buffer board _ col = column * 2 + side _ buffer current _ row = row current _ col = column if ( row < = ...
[ 0.957848846912384, -0.5749057531356812, 0.8505524396896362, -0.11572690308094025, -0.6820429563522339, 0.4130862355232239, 0.9989395141601562, -0.8552275896072388, -0.2663068473339081, 0.42080116271972656, 0.13029514253139496, 1.3314666748046875, -0.22592642903327942, -0.22372941672801971,...
def start _ ec2 ( ) : print'starting ec2 server instance...'ec2 _ async _ result = threadpool ( processes = 1 ). apply _ async ( func = lambda _ proxy, args = ('start _ instance ', ) ) return ec2 _ async _ result
[ -0.7244860529899597, -0.1657436043024063, 0.4451518952846527, -1.3308911323547363, -0.03697918355464935, 0.4493001699447632, -0.37008190155029297, 0.7047017216682434, 0.05274006351828575, -0.2895865738391876, -0.14945438504219055, 1.1190611124038696, -0.17987024784088135, -0.21293647587299...
def findinitializationerrors ( self, * args, * * kwargs ) : # real signature unknown pass
[ -1.0680277347564697, -0.6753055453300476, 0.3040160536766052, 0.6177957057952881, 1.208594560623169, 0.02103237248957157, 1.0975669622421265, -0.3478441834449768, -0.5261715054512024, -0.17444485425949097, -0.9855385422706604, -0.36715999245643616, -0.3941809833049774, 1.724884033203125, ...