text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def from _ yaml ( yaml _ config : union [ dict, str ] ) - >'compositeproblem': if isinstance ( yaml _ config, str ) : path _ prefix = os. path. dirname ( yaml _ config ) yaml _ config = yaml. load _ yaml ( yaml _ config ) else : path _ prefix = " " parameter _ df = parameters. get _ parameter _ df ( os. path. join ( pa... | [
0.7073442339897156,
-0.3933124840259552,
0.7013090252876282,
0.18986313045024872,
0.6663505434989929,
0.7183499932289124,
0.9883360862731934,
0.029268870130181313,
0.3503003716468811,
0.5394144654273987,
0.12341197580099106,
-0.5007086992263794,
-0.2616996765136719,
0.11874186992645264,
... |
def queue ( self, user, content _ type = none ) : flag = contentflag. objects. get ( name = contentflag. moderate _ flag ) where _ clause = " " " ( ( select count ( * ) from % ( approval _ table ) s where % ( approval _ table ) s. user _ id = % ( user _ id ) s and % ( approval _ table ) s. content _ type _ id = % ( fla... | [
0.9748736023902893,
-0.09369052946567535,
0.665192186832428,
-0.07181859761476517,
-0.5459166765213013,
-0.358769953250885,
-0.43832799792289734,
-0.1452179104089737,
-0.41573643684387207,
0.22112923860549927,
0.28431692719459534,
1.2291996479034424,
-0.807346522808075,
0.6769538521766663,... |
def get _ plant _ id _ in _ states ( states, grid ) : areas = _ check _ areas _ are _ in _ grid _ and _ format ( { " state " : states }, grid ) loadzones = set. union ( * ( grid. model _ immutables. zones [ " state2loadzone " ] [ i ] for i in areas [ " state " ] ) ) plant = grid. plant plant _ id = plant [ ( plant. zon... | [
0.0064756921492516994,
-0.33718788623809814,
0.46007803082466125,
-0.07238668948411942,
-0.035129815340042114,
-0.27860012650489807,
0.23548981547355652,
-0.421713650226593,
0.6062244772911072,
0.7617452144622803,
0.0661434754729271,
0.266092985868454,
0.06947234272956848,
-0.6338273882865... |
def test _ project _ exists _ with _ no _ milestone ( self ) : project = create _ project _ and _ milestones ( " title ", 0 ) response = self. client. get ( reverse ('projects : project ', args = ( 1, ) ) ) self. assertnotequal ( response. status _ code, 404 ) self. assertcontains ( response, " title " ) self. asserteq... | [
-0.42108213901519775,
0.8663426637649536,
0.20070858299732208,
-0.35336434841156006,
1.2709288597106934,
1.5978977680206299,
0.16871081292629242,
0.3628859221935272,
0.3061598539352417,
-0.4284632205963135,
-0.032039277255535126,
-0.4436018168926239,
-0.9373676180839539,
0.2350755482912063... |
def curl _ xy ( self, fx, fy, gtype ='tri') : # as there are an equal number of edges in tri and vor grids, check once : assert ( len ( fx ) = = self. n _ tedges ), " length of array passed to curl _ xy is not edges length! " assert ( len ( fy ) = = self. n _ tedges ), " length of array passed to curl _ xy is not edges... | [
0.1925954520702362,
-0.24103835225105286,
0.6463344097137451,
-0.9128779172897339,
-0.39713284373283386,
-0.18235333263874054,
0.3198876678943634,
-0.09468123316764832,
-0.5027608275413513,
0.3864805996417999,
0.8236801624298096,
0.4625997841358185,
-0.26615816354751587,
-0.218201339244842... |
def _ exit _ processes ( exit _ code ) : # type : ( int ) - > none if exit _ code! = 0 : logger. error ( f " encountered exit _ code { exit _ code } " ) sys. exit ( exit _ code ) | [
-0.026811547577381134,
0.5350557565689087,
0.37685054540634155,
-0.7721671462059021,
0.9424257874488831,
-0.22790126502513885,
0.3758610188961029,
-0.049381501972675323,
-0.21469581127166748,
0.5464165210723877,
0.3119574785232544,
-0.4148431122303009,
0.4729694724082947,
0.390383064746856... |
def save _ data ( afile, data, file _ type = none, * * keywords ) : if isstream ( afile ) and file _ type is none : file _ type = _ _ file _ type _ _ write _ data ( afile, data, file _ type = file _ type, * * keywords ) | [
-0.010733714327216148,
-0.006499954033643007,
0.3901897370815277,
0.6177383661270142,
0.6389263868331909,
0.19149962067604065,
-0.6753838658332825,
-0.13733407855033875,
-0.37798720598220825,
-0.33609962463378906,
-0.13187825679779053,
0.21617035567760468,
-0.6085270047187805,
1.6877208948... |
def handlenewabf ( fname ) : waittillcopied ( fname ) standard. autoabf ( fname ) | [
0.2365695685148239,
-1.0904899835586548,
0.2610020339488983,
1.69281005859375,
-0.33977073431015015,
0.6588411331176758,
0.6506031155586243,
-0.03714785352349281,
-0.43455690145492554,
0.06693863123655319,
-0.4124531149864197,
-0.05807565897703171,
0.6278347373008728,
-0.6423624753952026,
... |
def parse _ as _ df ( self, filepath _ pattern : str, group _ metrics : callable [ [ list [ logtype ] ], dict [ str, list [ logtype ] ] ] = group _ metrics, aggregate _ metrics : callable [ [ list [ logtype ] ], list [ logtype ] ] = aggregate _ metrics, ) - > dict [ str, pd. dataframe ] : metric _ logs = list ( self. p... | [
0.19552084803581238,
0.6828663349151611,
0.4004490077495575,
-0.11047082394361496,
0.5433655977249146,
-0.39373672008514404,
1.1431392431259155,
-0.1372828483581543,
-0.5567622780799866,
-0.14553305506706238,
0.6397570967674255,
0.5811081528663635,
0.32063695788383484,
0.04925535246729851,... |
def dont _ write _ to _ home _ directory ( ) : class youforgottoexplicitlychooseastoredirectory ( assertionerror ) : pass with mock. patch. object ( store,'get _ default _ directory ', side _ effect = youforgottoexplicitlychooseastoredirectory, ) : yield | [
-0.6088676452636719,
0.21545466780662537,
0.38037732243537903,
0.7010661363601685,
1.1084413528442383,
-0.0006415565148927271,
1.404435634613037,
0.013250425457954407,
0.7984130382537842,
-0.4360906779766083,
0.17777465283870697,
0.11781849712133408,
0.16670621931552887,
-0.185893848538398... |
def normalize ( vec ) : # calculate the length of the vector vec _ len = float ( vec [ 0 ] + vec [ 1 ] + vec [ 2 ] ) # divide the components of vec by the length of the vector norm _ vec = [ vec [ 0 ] / vec _ len, vec [ 1 ] / vec _ len, vec [ 2 ] / vec _ len ] return norm _ vec | [
0.46463513374328613,
-0.3883858025074005,
0.7440717220306396,
-0.6324970722198486,
0.08133485168218613,
0.370236873626709,
0.7853987216949463,
0.6778709292411804,
0.6561461091041565,
0.2769947052001953,
-0.994408369064331,
0.17117348313331604,
-0.5652494430541992,
-0.45563191175460815,
-... |
def user ( self, user ) : self. _ user = user | [
-0.9482523798942566,
0.3163187503814697,
-0.26149195432662964,
0.628936231136322,
-0.4038860499858856,
0.6224827170372009,
1.1872024536132812,
0.14917705953121185,
-0.4309680759906769,
-1.2905638217926025,
-1.6727393865585327,
-0.23598141968250275,
0.6535441279411316,
0.8017087578773499,
... |
def render _ cycle ( self, canvas, lock ) : pygame. init ( ) clock = pygame. time. clock ( ) self. running = true try : while self. running : lock. acquire ( ) # acquire lock, otherwise things get weird self. renderer. draw _ scene ( self. world, canvas ) lock. release ( ) clock. tick ( 60 ) # fps except exception as e... | [
-0.3750409185886383,
-0.04924328625202179,
0.8134276866912842,
-0.03880295157432556,
0.2084944248199463,
0.2377825230360031,
0.27260273694992065,
-1.3586509227752686,
-0.30623680353164673,
0.1024380475282669,
0.2598854899406433,
-0.3348790109157562,
-1.3214656114578247,
0.18142753839492798... |
def realised _ pnl ( self ) : if self. direction = = 1 : if self. sell _ quantity = = 0 : return 0. 0 else : return ( ( ( self. avg _ sold - self. avg _ bought ) * self. sell _ quantity ) - ( ( self. sell _ quantity / self. buy _ quantity ) * self. buy _ commission ) - self. sell _ commission ) elif self. direction = =... | [
0.027604104951024055,
-0.31678861379623413,
0.6224611401557922,
-0.7099993824958801,
0.4085816740989685,
0.19764837622642517,
0.24665670096874237,
0.530071496963501,
0.6954855918884277,
0.2721412181854248,
0.4502042233943939,
-0.2921057343482971,
-0.5711893439292908,
0.28352823853492737,
... |
def classes _ per _ month ( self ) : return self. classes _ per _ week * 4 | [
-0.193571075797081,
-0.011333823204040527,
0.7742735743522644,
0.07422241568565369,
0.22076496481895447,
1.2810252904891968,
0.2658924162387848,
-0.2506583034992218,
0.5813388824462891,
-1.3000574111938477,
0.47145429253578186,
-0.6641057729721069,
0.18232372403144836,
0.5660114884376526,
... |
def toaddress ( self ) - > str : return self. _ _ computeaddress ( ) | [
-0.253248929977417,
-0.4695897698402405,
0.6451423764228821,
-0.5780874490737915,
0.4508330225944519,
0.3138733208179474,
0.25659433007240295,
0.20653173327445984,
0.8142998814582825,
0.03364195674657822,
0.27826154232025146,
0.5430163145065308,
0.13605304062366486,
-1.244917631149292,
-... |
def filter _ matrix ( mtx, kernel ) : mtx _ filt = ndimage. convolve ( mtx, kernel ) return mtx _ filt | [
0.32461488246917725,
0.4381619095802307,
0.28237342834472656,
0.4970262348651886,
-1.371058702468872,
-0.29261529445648193,
-0.9542633295059204,
-0.2173629254102707,
-0.7524948120117188,
0.7087845802307129,
0.7066404223442078,
0.022583987563848495,
0.4334326982498169,
0.17254167795181274,
... |
def printfeed ( self, feed, ctr = 0 ) : if not feed. entry : print'\ nno entries in feed. \ n'return 0 for i, entry in enumerate ( feed. entry ) : print'\ n % s % s'% ( ctr + i + 1, entry. title. text ) if entry. content : print'% s'% ( entry. content. text ) for email in entry. email : if email. primary and email. pri... | [
0.5476257801055908,
-0.259311705827713,
0.5940608382225037,
-0.5867180228233337,
-0.04120433330535889,
-0.20586226880550385,
-0.4302015006542206,
-0.159484401345253,
-0.5321201086044312,
-0.8103426098823547,
0.3532443642616272,
0.678103506565094,
-0.1898953765630722,
0.028891844674944878,
... |
def system _ data ( self ) - > pulumi. output ['outputs. systemdataresponse'] : return pulumi. get ( self, " system _ data " ) | [
0.017479952424764633,
-0.1545061618089676,
0.3439401090145111,
0.2112925797700882,
0.6421319246292114,
1.4006861448287964,
0.11856787651777267,
-0.30228516459465027,
0.7505843639373779,
-0.9351820945739746,
-0.47909781336784363,
1.0090497732162476,
0.48967915773391724,
-0.10933360457420349... |
def inclusive _ range ( start : scalar, stop : scalar, step : scalar = 1 ) : assert ( ( isinstance ( start, int ) or isinstance ( start, float ) ) and ( isinstance ( stop, int ) or isinstance ( stop, float ) ) and ( isinstance ( step, int ) or isinstance ( step, float ) ) ), " wrong argument type " current = start whil... | [
-0.17976412177085876,
0.16038523614406586,
0.4555259644985199,
0.46811991930007935,
-0.7856137752532959,
0.38276174664497375,
0.2837018072605133,
-0.7950232028961182,
-1.0067534446716309,
-0.13808049261569977,
0.375306099653244,
0.6047698259353638,
-0.5959936380386353,
0.17508506774902344,... |
def heatbeat _ connect ( self ) : self. log. debug ( " establishing heartbeat connection. " ) return self. socket _ connect ( socket _ type = zmq. dealer, connection = self. connection _ string, port = self. args. heartbeat _ port, ) | [
0.2157224416732788,
-0.3257003724575043,
0.5971600413322449,
0.2247733324766159,
0.8876698017120361,
0.036976415663957596,
-0.3486708998680115,
-0.16206656396389008,
-0.6272486448287964,
-0.14952607452869415,
0.5898064374923706,
1.014358401298523,
-1.0397666692733765,
0.8275083899497986,
... |
def flush ( self ) : if not self. is _ open : raise serialutil. portnotopenerror while not self. command _ queue. empty ( ) : time. sleep ( 0. 01 ) | [
0.19684690237045288,
-0.502669095993042,
0.4611387550830841,
-0.03519800677895546,
0.6897480487823486,
0.5439438819885254,
0.592630922794342,
-0.6963619589805603,
-0.28487852215766907,
-0.8830114006996155,
0.5639416575431824,
1.2510501146316528,
-0.5026764273643494,
0.34372690320014954,
... |
def log _ functions ( args, process _ log, exp ) : if args. print : print ( process _ log ) if args. log : # if previous process log file found, save contents before overwriting if os. path. exists ( exp + paths ['log processes'] + '. log') : process _ log + ='\ nprevious process log found, will add to content.'with op... | [
0.3767116069793701,
-0.7728397846221924,
0.9086512923240662,
-0.2759745717048645,
0.7197672128677368,
0.09525441378355026,
-0.15360526740550995,
-0.2213345617055893,
-0.3412085771560669,
-0.013438892550766468,
0.03258422017097473,
0.47570785880088806,
0.34489870071411133,
0.020368140190839... |
def from _ json ( data, schema ) : for datum in data : yield jsondecoder ( schema, json. loads ( datum ) ) | [
-0.6512113213539124,
-0.6599249839782715,
0.3792479932308197,
-0.44014957547187805,
-1.0458122491836548,
-0.3441597819328308,
-1.6957036256790161,
0.5817285776138306,
0.16967977583408356,
-0.24973060190677643,
-0.9003499746322632,
0.298340767621994,
0.6917640566825867,
0.79010409116745,
... |
def test _ insert _ array1 ( self ) : arr = array ( 10 ) arr [ 0 ] = 10 arr [ 1 ] = 20 arr [ 2 ] = 30 arr [ 3 ] = 40 # print ( arr ) insert ( arr, 15, 2 ) res = arr [ 4 ] # print ( res ) self. assertequal ( res, 40 ) | [
-0.3551999628543854,
0.05327814817428589,
0.6778740286827087,
0.0744471326470375,
0.36903849244117737,
0.7756483554840088,
0.758310079574585,
0.3092367351055145,
-0.06304612755775452,
0.46888747811317444,
-1.0700886249542236,
-0.2871338129043579,
-1.1810688972473145,
0.3680911362171173,
... |
def model ( self ) : return self. models [ _ forecast ] | [
-0.656241774559021,
-0.4355018734931946,
0.07905974239110947,
0.517429769039154,
0.3154441714286804,
0.8519654870033264,
0.45819249749183655,
-0.37911319732666016,
-0.05287778005003929,
-0.5630424618721008,
-0.06624887138605118,
0.3917771279811859,
0.6400297284126282,
-0.6618761420249939,
... |
def adtpulse _ version ( adtpulse _ domain ) : resp = requests. get ( adtpulse _ domain ) parsed = beautifulsoup ( resp. content, html _ parser ) adtpulse _ script = parsed. find _ all ('script ', type ='text / javascript') [ 4 ]. string if " = " in adtpulse _ script : param, value = adtpulse _ script. split ( " = ", 1... | [
-0.2963956594467163,
-0.45206648111343384,
0.4641517698764801,
-0.2764415740966797,
-0.08132563531398773,
0.3119652271270752,
0.4502544701099396,
-0.5485464930534363,
0.3858707845211029,
1.7004942893981934,
-0.47679853439331055,
0.9068505167961121,
-0.5939139127731323,
0.16179615259170532,... |
def solid ( * args ) : return _ topods. topods _ solid ( * args ) | [
-0.29300346970558167,
-0.07370537519454956,
0.017984561622142792,
0.0018169094109907746,
-0.448828786611557,
0.5050286650657654,
0.6114053130149841,
-1.2759289741516113,
0.20600566267967224,
-1.026919960975647,
0.1962875872850418,
-0.720507025718689,
-1.1503305435180664,
0.1578932851552963... |
def show ( self ) : raise notimplementederror ( " this is just an abstract interface " ) | [
0.31821271777153015,
-0.08452057093381882,
0.5759705305099487,
-0.494474321603775,
-0.5336311459541321,
1.3860613107681274,
0.7377591133117676,
0.24302124977111816,
0.22214901447296143,
-0.15497145056724548,
0.6727334856987,
0.6263322234153748,
0.45268866419792175,
0.7667790055274963,
-0... |
def async _ infer ( self, model _ name : str, inputs : list [ inferinput ], callback : t. callable [ [ inferresult, inferenceserverexception ], none ], model _ version : str =..., outputs : list [ inferrequestedoutput ] =..., request _ id : str =..., sequence _ id : int =..., sequence _ start : bool =..., sequence _ en... | [
-0.8780399560928345,
-0.14332833886146545,
1.034308910369873,
0.6589692831039429,
-0.028864098712801933,
-0.3769797384738922,
-0.21006467938423157,
-0.20054736733436584,
-0.28104105591773987,
0.3071330189704895,
-0.6035940647125244,
0.29242047667503357,
-0.7815243005752563,
0.4777383506298... |
def get _ landing _ condition ( self ) : return self. health > 0 and abs ( degrees ( self. body. angle ) ) % 360 < = 10 and self. velocity < = 5 | [
0.3037188947200775,
-0.3597273528575897,
0.6353325247764587,
-0.4669730067253113,
-0.4205930233001709,
1.518483281135559,
-0.1752665787935257,
-0.11517329514026642,
-0.4194847047328949,
-0.23133917152881622,
0.24368703365325928,
-0.4024162292480469,
-0.6833460927009583,
0.8442540168762207,... |
def read _ features _ from _ file ( filename ) : # f = loadtxt ( filename ) # return f [ :, : 4 ], f [ :, 4 : ] # feature locations, descriptors f = skimage. io. load _ sift ( filename ) loc = [ [ x [ 1 ], x [ 0 ], x [ 2 ], x [ 3 ] ] for x in f ] des = [ x [ 4 ] for x in f ] loc = np. asarray ( loc ) des = np. asarray ... | [
-0.19755251705646515,
-0.990792989730835,
0.44218626618385315,
-0.30979886651039124,
-0.05792970955371857,
-0.32002878189086914,
-0.22771403193473816,
1.209824800491333,
-0.5428112149238586,
-0.14284124970436096,
-0.17869380116462708,
-0.03273007646203041,
0.7697691917419434,
-0.1583353430... |
def _ _ ignore _ sss _ changed ( self ) : return self. _ _ sss _ check _ box. is _ checked ( ) | [
-1.0333876609802246,
0.33591970801353455,
0.5916286706924438,
0.13554814457893372,
-0.46298375725746155,
0.8820276260375977,
0.22947625815868378,
-0.6028004288673401,
0.006276321597397327,
0.006452612578868866,
-0.6147564053535461,
0.23445965349674225,
-0.5306728482246399,
0.56477940082550... |
def fcncomputepointtraveltime ( xp, dp, r, epsr, sig, fc, xrx ) : # compute velocity eps = epsr * 8. 854e - 12 # sig = 10 * * logsig mu = 4 * np. pi * 1e - 7 v = np. sqrt ( 2 / ( mu * eps ) ) / np. sqrt ( np. sqrt ( 1 + ( sig / ( 2 * np. pi * fc * eps ) ) * * 2 ) + 1 ) # compute travel time t = 2 * ( np. sqrt ( ( xrx -... | [
0.2370826005935669,
0.1869845986366272,
0.5885488986968994,
-0.11501434445381165,
0.08510172367095947,
-0.2846609950065613,
-0.11528044939041138,
-0.07124581187963486,
0.3533807098865509,
1.0811045169830322,
-0.22574849426746368,
-1.036611795425415,
-0.12108942121267319,
-0.713917791843414... |
def cmyk _ to _ rgb ( c, m, y, k ) : r = int ( 255 * ( 1. 0 - ( c + k ) / 100. ) ) g = int ( 255 * ( 1. 0 - ( m + k ) / 100. ) ) b = int ( 255 * ( 1. 0 - ( y + k ) / 100. ) ) return r, g, b | [
0.38896214962005615,
-0.36984431743621826,
0.6077651977539062,
-0.5116938352584839,
-1.124800443649292,
-0.31377261877059937,
0.1938208043575287,
-0.11929220706224442,
-0.9123607277870178,
1.3473459482192993,
-0.7816681861877441,
-0.646638035774231,
-0.6410528421401978,
0.3544730544090271,... |
def replay ( self ) : if len ( self. memory ) < batch _ size : # accumulate enough samples in memory return # sample from memory queue batch = random. sample ( self. memory, batch _ size ) # batch observation = ( state, action, reward, next _ state, done ) states = np. array ( [ o [ 0 ] for o in batch ] ) actions = np.... | [
0.18106107413768768,
-0.005457146558910608,
0.8163017630577087,
-0.3539913594722748,
-0.07971839606761932,
-0.3089459240436554,
0.10309401154518127,
0.18559902906417847,
0.2505354881286621,
0.40827545523643494,
0.12259697169065475,
0.8505324125289917,
0.41649991273880005,
-0.54874128103256... |
def tag _ ons _ offs ( lcs _ gd, avg, sig, sig _ peaks = 10. ) : # - - print status. tstart = start ( " tag ons and offs. " ) tags _ on = np. zeros ( lcs _ gd. shape, dtype = bool ) tags _ off = np. zeros ( lcs _ gd. shape, dtype = bool ) # - - pos values, higher than prev and next value, and are not masked. tags _ on ... | [
0.5703860521316528,
-0.2890692949295044,
0.6087151765823364,
-0.8412964344024658,
-0.03469998762011528,
0.2879900336265564,
-0.27527475357055664,
-0.41432976722717285,
-0.8500932455062866,
0.8675044178962708,
-0.22857877612113953,
0.4042738676071167,
0.5747721195220947,
0.713983416557312,
... |
def db _ session ( self ) : session = self. db _ sessionmaker ( ) try : yield session session. commit ( ) except exception : session. rollback ( ) raise finally : session. close ( ) | [
-0.21734857559204102,
0.6504907011985779,
0.75789874792099,
0.07495183497667313,
-0.4238877594470978,
-0.34467118978500366,
-0.1523233950138092,
-0.9131755232810974,
0.6428949236869812,
0.38546648621559143,
0.9013859033584595,
-0.4395860433578491,
-0.3351992666721344,
-0.4863346815109253,
... |
def quit ( self ) : raise notimplementederror | [
-0.2098865509033203,
-0.3087596297264099,
0.40047428011894226,
0.624932587146759,
-0.04138607531785965,
1.679020881652832,
0.74359130859375,
-0.8640585541725159,
-0.23744916915893555,
-0.46393999457359314,
0.08533533662557602,
0.20120176672935486,
0.15913565456867218,
0.5761958956718445,
... |
def _ getraggedtensorrepresentationusedcolumns ( ragged _ tensor _ rep : schema _ pb2. tensorrepresentation. raggedtensor ) - > list [ path. columnpath ] : value _ column _ path = path. columnpath. from _ proto ( ragged _ tensor _ rep. feature _ path ) result = [ value _ column _ path ] for partition in ragged _ tensor... | [
-0.5689935684204102,
-0.6088201403617859,
0.3168274462223053,
-0.5713056325912476,
0.8478767275810242,
-0.4271802008152008,
1.1684938669204712,
-0.12541189789772034,
-0.5013415217399597,
0.3560241758823395,
-0.515346348285675,
0.44490739703178406,
0.8586740493774414,
-0.11508030444383621,
... |
def test _ user _ not _ logged ( self ) : data = {'client _ id': self. client. client _ id,'response _ type':'code ','redirect _ uri': self. client. default _ redirect _ uri,'scope':'openid email ','state': self. state, } response = self. _ auth _ request ('get ', data ) # check if user was redirected to the login view... | [
-0.9928869605064392,
0.6188642382621765,
0.3556945025920868,
-0.0690951868891716,
0.4576488435268402,
0.24946193397045135,
0.46986618638038635,
-1.3847218751907349,
1.158272624015808,
-1.2723196744918823,
-0.28169870376586914,
0.7280807495117188,
-0.0036160461604595184,
-0.7985730767250061... |
def get _ entity _ by _ hash ( self, entity _ hash : str ) : return self. _ db _ inst. get _ entity _ by _ hash ( entity _ hash ) | [
0.6108847856521606,
-0.4411901533603668,
0.17304272949695587,
0.30182600021362305,
1.1180593967437744,
-0.0594666413962841,
-0.2715752124786377,
-0.22009055316448212,
-0.5277422666549683,
-0.5074963569641113,
0.37993818521499634,
0.36678460240364075,
0.09264159202575684,
0.4115142822265625... |
def test _ setup _ without _ yaml _ file ( self ) : with assert _ setup _ component ( 1, device _ tracker. domain ) : assert setup _ component ( self. hass, device _ tracker. domain, test _ platform ) | [
0.4261346459388733,
0.44495049118995667,
0.2598593235015869,
0.01927761547267437,
0.7830362319946289,
0.5493277311325073,
1.4126533269882202,
0.6082708835601807,
-0.3672578036785126,
-0.7608358263969421,
-0.2644933760166168,
-0.3561614453792572,
0.742963433265686,
0.8802476525306702,
-0.... |
def test _ repr ( ) : ver = _ version. version ( " 1. 2. 3. 4. foo ", true, 5 ) assert repr ( ver ) = = \ " gensaschema. _ version. version ('1. 2. 3. 4. foo ', is _ dev = true, revision = 5 ) " ver = _ version. version ( " 1. 2. 3. 4. foo ", false, 5 ) assert repr ( ver ) = = \ " gensaschema. _ version. version ('1. 2... | [
0.03478920832276344,
-0.08039775490760803,
0.3355362117290497,
0.009412076324224472,
-0.6850490570068359,
0.38952353596687317,
0.39035147428512573,
0.2182423621416092,
-0.05325101688504219,
0.6914737820625305,
-0.624622642993927,
-0.07084822654724121,
-0.2398681640625,
-0.6966884136199951,... |
def add _ ssh _ prefix ( self, command, ssh _ options = " " ) : if ssh _ options and not isinstance ( ssh _ options, str ) : raise typeerror ( " options must be string " ) if not isinstance ( command, list ) : raise typeerror ( " command must be list " ) prefix = f " ssh { ssh _ options } { ssh _ user } @ { self. inter... | [
-0.10605771094560623,
0.4546186327934265,
0.6403888463973999,
0.10889828205108643,
0.25816601514816284,
0.9282169938087463,
-0.8752691745758057,
0.02056215889751911,
0.7344805598258972,
0.07401630282402039,
0.20417001843452454,
0.8184041976928711,
-0.594779372215271,
0.8060168623924255,
... |
def get _ activity _ for _ user _ and _ model ( user, object _ type ) : if not hasattr ( user, " exporteruser " ) and not hasattr ( user, " govuser " ) : raise permissiondenied ( f " invalid user object : { type ( user ) } " ) audit _ trail _ qs = audit. objects. all ( ) if hasattr ( user, " exporteruser " ) : # show e... | [
0.12701869010925293,
-0.565582811832428,
0.5739274621009827,
0.8539876341819763,
-0.1268235594034195,
0.22023078799247742,
0.9767147898674011,
-0.8631856441497803,
0.7491642832756042,
0.044635649770498276,
0.6133192777633667,
1.5267030000686646,
0.5509412288665771,
0.1950823962688446,
0.... |
def testdeletevaluesforquerywithmissingtag ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description'), ( u'username / foo ', u'description') ] ) objectid1 = uuid4 ( ) objectid2 = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid1 : { u... | [
-0.11495710164308548,
0.2730674147605896,
0.3223463296890259,
-0.16665276885032654,
0.23445221781730652,
0.2048216015100479,
-0.1951955109834671,
-0.5958822965621948,
-0.1514439582824707,
-0.5272401571273804,
-0.5539762377738953,
-0.40699055790901184,
0.5435543060302734,
0.6131894588470459... |
def sell ( self, selling _ price ) : if selling _ price < self. value : raise runtimeerror ('price of product is too low') # raise an exception when something is expected to go wrong with the code. selling _ price - = self. value return self. value | [
-0.49589499831199646,
0.04359825327992439,
0.44588202238082886,
0.31722772121429443,
-0.11405883729457855,
0.6982924938201904,
0.3692781627178192,
-0.21419793367385864,
0.4740103781223297,
-0.29850536584854126,
0.8198532462120056,
-0.30770552158355713,
-1.0434465408325195,
-0.0522391125559... |
def get _ bodyadj ( nodes, seuil ) : bodyadj, handadj = list _ to _ adjmatrix ( bodygraph ), list _ to _ adjmatrix ( handgraph ) adj = block _ diag ( bodyadj, handadj, handadj ) adj [ 7, 9 ], adj [ 9, 7 ], adj [ 4, 9 + 21 ], adj [ 9 + 21, 4 ] = 1, 1, 1, 1 length = adj. shape [ 0 ] for i, node in enumerate ( nodes ) : i... | [
-0.01259694155305624,
0.0085732601583004,
0.6291359066963196,
-0.5741345286369324,
-0.49282315373420715,
0.318183034658432,
0.08142352849245071,
-0.1525183618068695,
0.05604803189635277,
0.3469269871711731,
0.21002903580665588,
0.33634334802627563,
-0.5639044046401978,
0.07496747374534607,... |
def serialize _ numpy ( self, buff, numpy ) : try : _ x = self buff. write ( _ get _ struct _ 3i ( ). pack ( _ x. header. seq, _ x. header. stamp. secs, _ x. header. stamp. nsecs ) ) _ x = self. header. frame _ id length = len ( _ x ) if python3 or type ( _ x ) = = unicode : _ x = _ x. encode ('utf - 8') length = len (... | [
-0.2703498601913452,
-0.024394305422902107,
0.9465729594230652,
-0.494646281003952,
0.426841676235199,
0.14486826956272125,
-0.14180150628089905,
-1.1932474374771118,
0.8254136443138123,
-0.32269027829170227,
-1.1644009351730347,
0.3245716094970703,
-0.33948853611946106,
0.3045798838138580... |
def checktoken ( self, username, token ) : if username not in self. session : return ( false ) session _ secret = self. session [ username ] [ " session _ secret " ] session _ command _ counter = self. session [ username ] [ " command _ counter " ] check _ token = hashlib. md5 ( ( session _ secret + str ( session _ com... | [
-0.5088373422622681,
-0.13383448123931885,
0.5948662757873535,
0.47927606105804443,
0.11956053972244263,
-0.12451785802841187,
0.18521267175674438,
-0.2146090269088745,
-0.014305292628705502,
-0.08969926089048386,
-1.2602545022964478,
-0.08640117198228836,
-0.6060686707496643,
-0.193411320... |
def list _ str _ to _ list ( list _ str, separator = ',') : list _ str = list _ str. replace ('[ ','' ). replace ('] ','' ) return list _ str. split ( separator ) | [
0.0011582998558878899,
-0.8290996551513672,
0.43705958127975464,
0.03066331148147583,
-0.521709144115448,
-0.6258473992347717,
-1.2544126510620117,
1.7241675853729248,
1.2773398160934448,
0.805736780166626,
-1.2261868715286255,
-0.16233748197555542,
-0.06275966018438339,
0.0171136595308780... |
def merge _ weights _ to _ group ( ob, target _ group, source _ group, blend _ mode ) : vertices = ob. data. vertices source _ weights = get _ verts _ in _ group ( vertices, source _ group ) target _ weights = get _ verts _ in _ group ( vertices, target _ group ) new _ weights = [ ] for idx, weights in enumerate ( zip ... | [
-0.6512243747711182,
0.10493702441453934,
0.698292076587677,
0.14925622940063477,
0.3835356831550598,
-0.11707238107919693,
0.4140278995037079,
-0.21810835599899292,
-0.2379225194454193,
0.5683682560920715,
-0.36817488074302673,
0.43589767813682556,
-0.10316551476716995,
0.4301320016384125... |
def gradient _ checking ( self, x, y, error _ method ='mse ', regularization = 0. 7 ) : eps = 1e - 7 conglomerate _ network _ array = np. array ( [ ] ). reshape ( - 1, 1 ) conglomerate _ gradient _ array = np. array ( [ ] ). reshape ( - 1, 1 ) for p, r in zip ( self. network _ weights, self. network _ bias ) : conglome... | [
0.11583712697029114,
0.6689260601997375,
1.135744571685791,
0.06007492542266846,
0.19060856103897095,
0.19168303906917572,
0.8921642899513245,
-0.007593329064548016,
-0.21338294446468353,
0.8734177350997925,
0.23021861910820007,
0.3720468580722809,
-0.3362102806568146,
0.8971371650695801,
... |
def edit _ features ( feature _ set, df ) : print ('these are the features that lasso selected :'+ str ( feature _ set ) ) change _ feats ='y'while change _ feats = ='y': change _ feats = input ('would you like to change the features? ( y / n ) :') if change _ feats = ='y': add _ feats = input ('would you like to add o... | [
-0.13457682728767395,
-0.05168597772717476,
0.6850405931472778,
0.020712127909064293,
0.11467794328927994,
-0.5837118029594421,
0.5725135207176208,
-0.02640591934323311,
0.33926743268966675,
-0.6263505220413208,
0.01866935007274151,
0.7455595135688782,
-0.033754684031009674,
0.119121924042... |
def calculate _ std _ at _ ts ( ts ) : if center _ b = = false : # slice data frame : e. g. last 5 min # # for ts = 09 : 05 : 00 ( 2010 - 01 - 04 ) # # 2010 - 01 - 04 09 : 00 : 30 nan # 2010 - 01 - 04 09 : 01 : 00 0. 217163 # 2010 - 01 - 04 09 : 01 : 30 0. 145072 # 2010 - 01 - 04 09 : 02 : 00 - 0. 010714 # 2010 - 01 - ... | [
0.7205488681793213,
-0.5664496421813965,
1.2520928382873535,
-0.9690335392951965,
-0.04582657292485237,
-0.12871429324150085,
0.535361111164093,
0.17561118304729462,
0.021734898909926414,
0.5175269246101379,
-0.6745502352714539,
0.20216743648052216,
0.11179691553115845,
0.01060988660901784... |
def text ( self ) : return self. browser. text ( self. text _ locator, parent = self ) | [
0.26550066471099854,
-1.0473508834838867,
0.3836110830307007,
0.39820849895477295,
-0.5358354449272156,
-0.37966814637184143,
0.5306990146636963,
-0.4775746464729309,
0.9600734114646912,
-0.12370385974645615,
0.1601291298866272,
-0.4887765645980835,
0.10337649285793304,
-0.6018102169036865... |
def arm _ and _ takeoff ( atargetaltitude ) : print ( " basic pre - arm checks " ) print ( " arming motors " ) vehicle. mode = vehiclemode ( " guided " ) vehicle. armed = true print ( " vehicle armed! " ) # takeoff print ( " taking off! " ) vehicle. simple _ takeoff ( atargetaltitude ) # take off to target altitude lat... | [
0.3740859627723694,
-0.7581550478935242,
0.5489192605018616,
-0.3832627832889557,
0.1730077713727951,
0.6155810356140137,
0.013048692606389523,
-0.10045665502548218,
-0.24181437492370605,
-0.05169614404439926,
0.05505591630935669,
0.5095929503440857,
0.28688275814056396,
-0.331878274679183... |
def dowhilesession ( self ) : sendcontrolmessagetest. dowhilesession ( self ) log. debug ( " sending data to server : % s ", test _ msg ) self. send _ to _ server ( test _ msg ) | [
0.006734165363013744,
0.3657967746257782,
0.1814831644296646,
-0.26320844888687134,
1.996405839920044,
0.6995848417282104,
0.816376268863678,
-1.2966835498809814,
0.564684271812439,
-0.06141168996691704,
-0.5539524555206299,
0.40797993540763855,
-0.8984639644622803,
-0.015286123380064964,
... |
def givens ( a ) : n = len ( a ) redo = 6 an = [ i [ : ] for i in a ] gn = [ [ float ( i = = j ) for j in range ( n ) ] for i in range ( n ) ] q _ t = [ [ float ( i = = j ) for j in range ( n ) ] for i in range ( n ) ] a = an [ 0 ] [ n - 2 ] b = an [ 0 ] [ n - 1 ] index = 1 for i in range ( n ) : for j in range ( n - 1... | [
0.3007045388221741,
0.18869081139564514,
0.8119024038314819,
-0.2092096358537674,
-0.5226791501045227,
-0.5831981301307678,
-0.4137325584888458,
-0.27363482117652893,
0.6946086883544922,
0.5872169137001038,
-0.7506558895111084,
-0.35221973061561584,
0.22704169154167175,
0.06424682587385178... |
def compute _ and _ print _ pr _ auc ( labels, probabilities, output _ path = none ) : average _ precision = average _ precision _ score ( labels, probabilities [ :, 1 ] ) precision, recall, _ = precision _ recall _ curve ( labels, probabilities [ :, 1 ] ) plt. step ( recall, precision, color ='b ', alpha = 0. 2, where... | [
0.5937594175338745,
-0.5347838401794434,
1.0881623029708862,
-0.24114416539669037,
-0.04720447584986687,
0.36072248220443726,
0.6005788445472717,
0.7037527561187744,
0.19612663984298706,
0.3407093584537506,
0.7554110884666443,
0.9211240410804749,
0.49637359380722046,
-0.8479220867156982,
... |
def _ _ init _ _ ( self, data _ id, field, cache ) : # calling _ _ setattr _ _ on parent class as it is overridden in this one super ( ). _ _ setattr _ _ ( " _ data _ id ", data _ id ) super ( ). _ _ setattr _ _ ( " _ field ", field ) # map output fields to a valid python process syntax. for field _ descriptor in cache... | [
-0.7108516693115234,
0.15909461677074432,
0.7037766575813293,
-0.6653947234153748,
-0.9419320821762085,
-0.44268083572387695,
-0.4363735318183899,
0.1732971966266632,
0.2342141568660736,
0.013611450791358948,
-0.8143431544303894,
0.5687503814697266,
0.6126574277877808,
0.4719570279121399,
... |
def config _ init ( * * kwargs ) : kwargs ['xcode _ version'] = none d = {'defaults': { }, } configuration = _ prompt ( " configuration ", ['debug ','release'] ) if configuration : d ['defaults'] ['configuration'] = configuration platform = _ prompt ( " platform ", platform _ nicknames ( ) ) if platform : d ['defaults'... | [
-0.2728949189186096,
0.11884542554616928,
0.8041952252388,
0.45053908228874207,
0.5873916149139404,
-0.26325392723083496,
-0.0990423783659935,
0.10982581973075867,
-0.743895411491394,
0.5237728357315063,
-0.9219203591346741,
0.21892257034778595,
0.09431222826242447,
0.8769550323486328,
0... |
def terminate _ connection ( self, volume, connector, force = false, * * kwargs ) : self. _ login ( ) self. _ unexport _ lun ( volume ) self. _ delete _ iscsi _ target ( volume ) self. vmem _ vip. basic. save _ config ( ) | [
-0.3211328685283661,
-0.9366580247879028,
0.5326300859451294,
0.8801448941230774,
0.6309769153594971,
-0.42689865827560425,
-1.2155988216400146,
0.6225268244743347,
0.39054739475250244,
-0.22402983903884888,
-0.613146960735321,
0.1594078242778778,
-1.0380581617355347,
-1.2128701210021973,
... |
def id _ nr ( self ) : return self. _ id _ nr _ field [ : : - 1 ] | [
-0.6831934452056885,
0.12594953179359436,
0.45621928572654724,
0.18012800812721252,
1.283982276916504,
0.48584917187690735,
0.7373735904693604,
-0.3827003836631775,
0.09668949246406555,
-1.0627086162567139,
-0.7741029262542725,
-0.012765288352966309,
-0.464971125125885,
-0.7295016646385193... |
def located ( self, * args ) : return _ topods. topods _ shape _ located ( self, * args ) | [
-0.5042750835418701,
-0.6318399310112,
0.334012508392334,
-0.20701278746128082,
1.027050256729126,
0.518065333366394,
1.209352731704712,
-1.1691919565200806,
-0.09715556353330612,
-0.16229422390460968,
0.0007461298955604434,
0.1401105523109436,
0.2330494225025177,
-0.26514071226119995,
-... |
def grid ( self, npts ) : raise exception ( " this is the base region class! use a subclass " ) | [
-0.34793025255203247,
-0.2134450078010559,
0.22014568746089935,
0.37080124020576477,
0.600906252861023,
0.2830179035663605,
0.4964671730995178,
-0.5114136934280396,
0.27474579215049744,
-0.5105406641960144,
0.031523484736680984,
-0.18197709321975708,
-0.823573648929596,
1.212573766708374,
... |
def dump _ params ( out _ dir, name _ prefix, key = none, iv = none, mark = none ) : if key is not none : # ensure, that key is a numpy ndarray if isinstance ( key, ( list, np. ndarray ) ) : key _ arr = np. array ( key ) else : key _ arr = np. array ( [ key ] ) if key _ arr. ndim > 2 : np. savetxt ( join ( out _ dir, n... | [
-0.8911314606666565,
-0.278873473405838,
0.8872082829475403,
-0.3832390010356903,
-0.06758757680654526,
-0.43915846943855286,
-0.2657332718372345,
0.4030427634716034,
-0.14034196734428406,
1.2259902954101562,
-0.21649666130542755,
0.9110046029090881,
-0.2781411409378052,
1.1525007486343384... |
def show ( self ) : import vispy. app vispy _ backend = vispy. app. use _ app ( ). backend _ name cfg = self. get _ feature _ config ('static') if cfg and cfg. get ('value ', false ) : import imageio import io import ipython. display if'webgl'not in vispy _ backend : target = io. bytesio ( ) img = self. _ canvas. rende... | [
0.3661617040634155,
0.3469088673591614,
0.8097573518753052,
-0.08264654874801636,
-0.2746535837650299,
-0.10616549104452133,
0.17136810719966888,
-0.7796326875686646,
0.4165067672729492,
0.3494293987751007,
0.20059236884117126,
0.46676453948020935,
-0.043890200555324554,
-0.010407307185232... |
def names _ read ( file _ name ) : f = open ( file _ name, encoding ='utf - 8') return [ name [ : - 1 ] for name in f. readlines ( ) ] | [
-0.33848267793655396,
-0.5814458131790161,
0.6146448254585266,
-0.5233958959579468,
0.34392958879470825,
0.5947084426879883,
-1.4374890327453613,
0.3729182779788971,
-0.8025621175765991,
0.9969791173934937,
-0.23718558251857758,
-0.06790369004011154,
0.06864055246114731,
-0.220000714063644... |
def search _ groups ( self, query, start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : kwargs ['_ return _ http _ data _ only'] = true if kwargs. get ('callback') : return self. search _ groups _ with _ http _ info ( query, start, end, logged _ in _ user _ id, access _ token, client _ to... | [
-0.916882336139679,
0.6847096085548401,
0.6909645199775696,
0.3370843231678009,
-0.7005831599235535,
-0.14868570864200592,
-0.6764984726905823,
-1.488303780555725,
-0.13026519119739532,
-0.227781280875206,
0.5315329432487488,
1.007917046546936,
-0.9425607919692993,
0.060713108628988266,
... |
def annotate _ entity ( e, category, title, message, source = none ) : if e. tag! = " { % s } entitydescriptor " % ns ['md'] and e. tag! = " { % s } entitiesdescriptor " % ns ['md'] : raise metadataexception ('i can only annotate entitydescriptor or entitiesdescriptor elements') subject = e. get ('name ', e. get ('enti... | [
0.8052583932876587,
0.5474525094032288,
0.7595764398574829,
-0.4882473349571228,
-0.33616071939468384,
0.42763152718544006,
-0.9964401721954346,
0.6902649402618408,
0.8264591693878174,
0.17397476732730865,
0.4200083315372467,
1.0191761255264282,
0.9528818726539612,
1.1187098026275635,
0.... |
def test _ pos _ close _ without _ connection ( self ) : config = testbaseclass. get _ connection _ config ( ) self. client = aerospike. client ( config ) self. client. close ( ) try : self. closeobject = self. client. close ( ) except e. clustererror as exception : assert exception. code = = 11 | [
0.011079351417720318,
-0.7742359638214111,
0.44015511870384216,
-0.16552603244781494,
0.21925757825374603,
1.2927055358886719,
0.2712819576263428,
-0.08114159852266312,
-0.2356087863445282,
-0.2946181297302246,
0.34650152921676636,
-0.7749562859535217,
-1.09584379196167,
-0.202584668993949... |
def get _ model _ config ( self, model _ name : str, model _ version : str =..., headers : dict [ str, t. any ] =..., as _ json : t. literal [ false ] =..., ) - > service _ pb2. modelconfigresponse : | [
-1.3061769008636475,
-0.4372643530368805,
0.6718780398368835,
0.3057582676410675,
-0.7187370657920837,
-0.7362441420555115,
-1.1691974401474,
-0.6322445869445801,
-1.059799313545227,
0.7362324595451355,
-1.464021921157837,
-0.21981096267700195,
-0.0041177840903401375,
0.1582604944705963,
... |
def getid ( self ) : return self. _ getid ( ) / 10000. 0 | [
1.5282377004623413,
-0.0770987793803215,
0.440250962972641,
0.5656599998474121,
0.917186439037323,
0.3571903705596924,
0.6371772885322571,
-0.38999056816101074,
1.2166393995285034,
-0.4036363661289215,
-0.2624778747558594,
0.01043729204684496,
-1.0887043476104736,
0.6303631067276001,
-0.... |
def list _ endpoints ( self ) : raise notimplementederror ( " this function is not implemented yet. " ) | [
-0.5885600447654724,
-0.42198020219802856,
0.5130919814109802,
1.2337074279785156,
0.3594980239868164,
0.30440041422843933,
-0.34385165572166443,
0.6323553919792175,
0.22844311594963074,
0.3982866108417511,
-0.06953909248113632,
0.6506313681602478,
0.08069870620965958,
0.24100682139396667,... |
def send _ cmd ( self, method, url, params, expected _ status ) : retcode = 0 data = { } header = {'content - type':'application / cdmi - container ','accept':'application / cdmi - container ','x - cdmi - specification - version':'1. 0. 2'} # base64 encode the username and password auth = base64. encodebytes ('% s : % ... | [
-0.7125487327575684,
-0.0449879951775074,
0.965624988079071,
0.46970924735069275,
0.6111869215965271,
-0.7379041314125061,
-0.2166103571653366,
-0.6621119976043701,
-0.3573809564113617,
0.4853476285934448,
0.3644554018974304,
0.34644365310668945,
-0.44515544176101685,
0.28010043501853943,
... |
def conv _ forward ( a _ prev, w, b, hparameters ) : ( m, n _ h _ prev, n _ w _ prev, n _ c _ prev ) = a _ prev. shape ( f, f, n _ c _ prev, n _ c ) = w. shape stride = hparameters ['stride'] pad = hparameters ['pad'] n _ h = int ( ( ( n _ h _ prev - f + 2 * pad ) / stride ) + 1 ) n _ w = int ( ( ( n _ w _ prev - f + 2... | [
0.5989572405815125,
0.7524669170379639,
0.8393669724464417,
0.14676356315612793,
-0.1987854242324829,
-0.3146449327468872,
1.307691216468811,
0.5491030216217041,
-0.5559116005897522,
0.6637536287307739,
0.05659136548638344,
0.4292200803756714,
0.16388797760009766,
0.5942999720573425,
-0.... |
def find _ element ( self, locator, timeout = 20 ) : time. sleep ( 0. 5 ) return webdriverwait ( self. driver, timeout ). until ( ec. presence _ of _ element _ located ( locator ), message = f " can't find element by locator { locator } ", ) | [
0.17889286577701569,
-0.3876369595527649,
0.18089497089385986,
-0.12070230394601822,
0.003594675101339817,
0.3622991740703583,
0.24514922499656677,
0.07634453475475311,
0.2349158078432083,
0.13565847277641296,
-0.016000207513570786,
-0.3212038278579712,
-0.19376365840435028,
0.347940236330... |
def destroy ( self, * args, * * kwargs ) : if len ( projector. objects. all ( ) ) < = 1 : raise validationerror ( { " detail " : " you can't delete the last projector. " } ) projector _ instance = self. get _ object ( ) new _ projector _ id = ( projector. objects. exclude ( pk = projector _ instance. pk ). first ( ). p... | [
-0.26891112327575684,
0.6465420722961426,
0.750934898853302,
0.2026340365409851,
0.4700423777103424,
-0.1364974081516266,
0.195333793759346,
0.43622517585754395,
0.04991598427295685,
1.0028376579284668,
-0.25036126375198364,
-0.3610130548477173,
-0.7430589199066162,
0.26421302556991577,
... |
def get _ config _ filterlist ( self, filterlist ) : return ", ". join ( [ self. get _ filterfile ( filt _, fullpath = false ) for filt _ in filterlist ] ) | [
-1.3712702989578247,
-0.2583014965057373,
0.5768043398857117,
0.4895824193954468,
0.34544265270233154,
-0.07419255375862122,
-0.2425256371498108,
-0.061647720634937286,
-0.5195339322090149,
1.2966210842132568,
-0.46793946623802185,
0.1320362538099289,
0.2009640634059906,
0.9968283176422119... |
def test _ inequality ( ) : test _ obj = uvtest ( ) test _ obj2 = test _ obj. copy ( ) test _ obj2. float1 = 13 assert test _ obj! = test _ obj2 | [
-0.3510522246360779,
-0.26688650250434875,
0.5825217962265015,
1.472576379776001,
0.16819745302200317,
1.0899995565414429,
1.0185863971710205,
-0.4034781754016876,
0.35730791091918945,
-0.4043463170528412,
-0.3741498291492462,
-0.18677999079227448,
-1.0386377573013306,
-0.179808109998703,
... |
def get _ row _ from _ vms _ table ( conn, tenant _ uuid ) : try : cur = conn. execute ( " select * from vms where tenant _ id =? ", ( tenant _ uuid, ) ) except sqlite3. error as e : logging. error ( " error : % s when querying vms table for tenant % s ", e, tenant _ uuid ) return str ( e ), none result = cur. fetchall... | [
0.5303009748458862,
0.24383795261383057,
0.19232869148254395,
0.30419814586639404,
0.17174001038074493,
-1.132951021194458,
-1.0635992288589478,
-0.017643406987190247,
-0.6111174821853638,
1.1649407148361206,
1.0311659574508667,
-0.23243838548660278,
0.37224969267845154,
-0.323354512453079... |
def edge ( * args ) : return _ topods. topods _ edge ( * args ) | [
-0.7819721698760986,
0.5340104699134827,
0.3213685154914856,
0.6038867831230164,
0.5472059845924377,
0.35724881291389465,
0.14563335478305817,
-0.29460325837135315,
-0.5075622200965881,
-0.08541310578584671,
0.57632976770401,
-0.9436401724815369,
-1.3144503831863403,
0.21285881102085114,
... |
def test _ loginform _ post ( self ) : args = {'user _ name':'test _ user ','password':'password'} with patch ('user _ auth. views. loginform') as form : # make the function not to log the user in. form. return _ value. is _ valid = magicmock ( return _ value = false ) self. client. post ('/ user _ auth / login / ', ar... | [
-0.3753795623779297,
0.34029823541641235,
0.39352062344551086,
-0.06869395822286606,
-0.3933408856391907,
0.7144668698310852,
-0.4404955208301544,
0.1682434231042862,
0.3737247586250305,
-1.0943893194198608,
-0.8035669922828674,
-0.20135314762592316,
-0.27936697006225586,
-0.47925612330436... |
def predict ( r, y0, t0, t1, h = 1e - 5 ) : un = y0 intervals = int ( round ( abs ( t1 - t0 ) / h ) ) h = ( ( t1 - t0 ) / intervals ) print ( intervals ) print ( h ) for i in range ( intervals ) : f1 = ode _ func ( r, un ) f2 = ode _ func ( r, un + ( ( h / 2 ) * f1 ) ) f3 = ode _ func ( r, un + ( ( h / 2 ) * f2 ) ) f4 ... | [
0.3357580602169037,
0.04071567952632904,
0.6567615270614624,
0.29435211420059204,
-1.1429333686828613,
0.3727494180202484,
0.9725349545478821,
0.43942466378211975,
-1.4336247444152832,
-0.2229158580303192,
-0.7598282098770142,
-0.3140725791454315,
0.4512093961238861,
0.11278808861970901,
... |
def getmuandsigma ( arraydist ) : mu = arraydist. mean ( ) sigma = arraydist. std ( ) return mu, sigma | [
-0.17541281878948212,
-0.9578177332878113,
0.4246618449687958,
0.6720237731933594,
-0.2875908315181732,
0.3826616108417511,
-0.5626186728477478,
1.2418076992034912,
0.8300591707229614,
1.3026068210601807,
-0.29378318786621094,
1.1138331890106201,
0.13267897069454193,
0.5014059543609619,
... |
def meta ( ) : return jsonify ( version = config. api _ version, author = " nskelsey " ) | [
-0.7450641989707947,
-0.5167763829231262,
0.32388046383857727,
1.0067540407180786,
-0.35930606722831726,
-0.6513764262199402,
-1.3165292739868164,
0.06835024803876877,
-0.07095365226268768,
0.7853183746337891,
-0.6118875741958618,
0.8296812176704407,
1.0289182662963867,
0.2136051207780838,... |
async def _ _ aenter _ _ ( self ) : await self. connect ( ) return self | [
-0.15869171917438507,
-0.7170268297195435,
0.7066213488578796,
-0.45617082715034485,
0.09176608920097351,
0.10048225522041321,
-0.016889821738004684,
-0.33037179708480835,
0.6839176416397095,
-0.22449767589569092,
0.8057694435119629,
0.029836120083928108,
-0.008830041624605656,
-0.54363757... |
def get _ recipients ( cur, fuuid ) : cur. execute ( " select facility _ reporters ('% s') as recipients ; " % fuuid ) r = cur2. fetchone ( ) if r : return r [ " recipients " ] return " " | [
0.14187335968017578,
0.19859562814235687,
0.2682129144668579,
-1.1134212017059326,
0.24345004558563232,
-1.8692874908447266,
-0.7695906758308411,
0.8705379962921143,
-0.45176535844802856,
-0.18986135721206665,
0.12445610761642456,
-0.3140842020511627,
-0.8629072904586792,
0.131086185574531... |
def actionable ( msg ) : return f'\ 033 [ 92m { msg } \ 033 [ 0m ' | [
0.9928868412971497,
-0.54356449842453,
0.4486267864704132,
-0.2766072154045105,
0.6912757158279419,
0.1298661082983017,
0.10134509950876236,
0.05999172851443291,
0.1590065211057663,
-0.017883365973830223,
0.28977665305137634,
0.9145596623420715,
-0.33872485160827637,
-0.28929418325424194,
... |
def list _ views ( self, * classes ) : s = set ( classes ) return [ view for view in self. _ views if s. intersection ( { view. _ _ class _ _, view. _ _ class _ _. _ _ name _ _ } ) ] | [
-0.5405563712120056,
-0.0606527104973793,
0.566754162311554,
0.7920585870742798,
-0.003696577623486519,
0.3026468753814697,
-0.2130308598279953,
-0.554619312286377,
0.7999078631401062,
-0.649353563785553,
0.4923376142978668,
0.26988255977630615,
0.15437692403793335,
0.6808639168739319,
-... |
def list _ by _ status ( cls, statuses = none ) : if statuses is not none : params = { " status " : statuses } else : params = { } return list ( pagination. unpaginate ( cls. _ jobs _ path ( ), params, cls. _ client ) ) | [
-0.7371302843093872,
-0.33607053756713867,
0.08109986037015915,
0.1596565544605255,
0.21478641033172607,
-0.38981893658638,
-0.7325138449668884,
1.0015239715576172,
-0.18676847219467163,
-0.47386738657951355,
-0.27837905287742615,
-0.13131515681743622,
-0.10230262577533722,
0.3045827746391... |
def _ get ( self, key ) : # relations are not stored in self. _ cache by default since they # are not accessible at the initialization stage. if key = = " _ _ relations " and " _ _ relations " not in self. _ cache : self. _ cache [ " _ _ relations " ] = self. get _ relations ( ) super ( ). _ _ setattr _ _ ( " _ cache "... | [
-0.9008755683898926,
1.1933467388153076,
0.6076120138168335,
-1.4716415405273438,
-0.07031217962503433,
-0.1953016221523285,
0.022355807945132256,
-0.7224216461181641,
0.11834786832332611,
-0.4818013608455658,
-0.45017731189727783,
0.1011427491903305,
-0.843860924243927,
-0.365823119878768... |
def item _ text ( self, idx ) : return self. _ widget. itemtext ( idx ) | [
-0.6504386067390442,
-0.17630672454833984,
0.013529489748179913,
-0.6115649342536926,
-0.6527307033538818,
-0.20539410412311554,
-0.44018641114234924,
-1.0943318605422974,
0.5792180895805359,
0.5139225125312805,
-0.5999322533607483,
-0.448518842458725,
-0.06564841419458389,
-2.020294904708... |
def simulation _ process ( peptide, column ) : appended _ data = pd. dataframe ( ) flag = false # this flag will turn to true when i reach to the desired amount of peptide that are good for my simulation while flag = = false : # df1 = pd. dataframe ( ) df1 = send _ pep _ to _ pred ( peptide ) the _ simulation = simulat... | [
-0.222451314330101,
0.37927693128585815,
0.8583229184150696,
-0.17305371165275574,
0.24872727692127228,
0.07361750304698944,
-0.7505665421485901,
-0.2318606972694397,
-0.7367331981658936,
0.2291940450668335,
-0.030758772045373917,
0.11858583241701126,
-0.39650729298591614,
-0.3626289367675... |
def update _ log _ settings ( self, settings : dict [ str, t. any ], headers : dict [ str, t. any ] =..., as _ json : t. literal [ false ] =..., ) - > service _ pb2. logsettingsresponse : | [
-1.4907684326171875,
-0.24867144227027893,
0.6276490688323975,
0.15657716989517212,
-0.391946941614151,
-0.48767831921577454,
-0.7812969088554382,
-1.251590371131897,
-0.012423559091985226,
0.7262083292007446,
-0.5974831581115723,
0.6737054586410522,
-0.7213101387023926,
-0.553804278373718... |
def test _ connection ( ) : try : urllib. request. urlopen ( " https : / / google. com ", timeout = 1. 0 ) except urllib. error. urlerror : raise bilbypipeerror ( " it appears you are not connected to a network and so won't be " " able to interface with gracedb. you may wish to specify the " " local - generation argume... | [
-0.07614612579345703,
0.4486227333545685,
0.5307593941688538,
0.3252778649330139,
1.0660669803619385,
0.9759983420372009,
1.1778818368911743,
0.7332357168197632,
-1.3078043460845947,
-0.13208739459514618,
0.34825119376182556,
0.04006873443722725,
-0.9901667833328247,
0.9144399762153625,
... |
def testfirsteventtimestamp ( self ) : gen = _ eventgenerator ( self ) acc = self. _ make _ accumulator ( gen ) gen. addevent ( event _ pb2. event ( wall _ time = 10, step = 20, file _ version = " brain. event : 2 " ) ) gen. addscalartensor ( " s1 ", wall _ time = 30, step = 40, value = 20 ) self. assertequal ( acc. fi... | [
1.0167316198349,
0.16251912713050842,
0.5870034098625183,
0.4555334448814392,
1.1663984060287476,
0.5869917273521423,
0.1029873713850975,
-0.3902129828929901,
0.01384288351982832,
-0.5473020076751709,
-0.8946353197097778,
-0.28632652759552,
0.3936008810997009,
0.6673018932342529,
0.48541... |
def test _ get _ containers _ no _ include _ no _ exclude ( self ) : expected _ ids = [ " 87d533137e70601d17a4bf9d563b11d528ba81e31e2299eb8d4ab2ef5a54f0c0 ", " 84afc8ee4d726544e77dcfe22c6f5be04f36b115ea99c0510d612666f83da1ce ", " e511aaf76add81d41c1536b2a93a17448d9f9d3c6a3f8a5abab1d9a582c397fc ", " cfcb7f7d1481c805f91f... | [
0.3299754858016968,
0.1457643061876297,
1.117811918258667,
-0.3240504264831543,
0.4185361862182617,
-0.049057573080062866,
0.5102583169937134,
0.6220847964286804,
-0.4006640315055847,
0.033583126962184906,
-1.0684694051742554,
-0.47508445382118225,
-0.7505103945732117,
-0.166852205991745,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.