text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ fiat _ prices ( self, base ='usd') : return self. get _ request ('/ api / v1 / prices? base = { } '. format ( base ) )
[ -2.2965471744537354, 0.8930965662002563, 0.44352447986602783, 1.3158798217773438, 0.6655800342559814, -1.0588568449020386, -1.4139505624771118, -0.834106981754303, -0.7432163953781128, 0.020160889253020287, -0.7001979947090149, 0.13090811669826508, -0.8259775638580322, 0.6794570088386536, ...
def nudge _ dataset ( x, y, direction _ vectors ) : start = time. time ( ) shift = lambda x, w : convolve ( x. reshape ( ( 28, 28 ) ), mode ='constant ', weights = w ). ravel ( ) x = np. concatenate ( [ x ] + [ np. apply _ along _ axis ( shift, 1, x, vector ) for vector in direction _ vectors ] ) y = np. concatenate ( ...
[ 0.16781389713287354, 0.6155566573143005, 0.6823210120201111, -0.2734169065952301, 0.43851739168167114, -0.020648222416639328, -0.453171044588089, 0.1683855652809143, 0.8774212002754211, -0.0135324252769351, 0.31545042991638184, 0.6723263263702393, -0.08894471824169159, 0.41249018907546997,...
def add _ family _ event ( request ) : if request. method = = post : # shared fields logged _ in _ user = request. user body = json. loads ( request. body ) # event fields name = body. get ('name') event _ description = body. get ('event _ description') year = body. get ('year') date = body. get ('date') image = body. ...
[ 0.023941054940223694, -0.20613238215446472, 0.849754273891449, 1.1028515100479126, 0.3186783790588379, 0.6694033145904541, -0.5322378277778625, 0.3516480028629303, -0.15212564170360565, -0.7324973344802856, -0.22315382957458496, -0.8035629987716675, -0.019617915153503418, 0.706799805164337...
def get _ permissions ( self ) : if self. action = = " create " : permission _ classes = [ cancreateversion ] elif self. action = = " update " : permission _ classes = [ canupdateversion ] else : try : permission _ classes = getattr ( self, self. action ). kwargs. get ( " permission _ classes " ) except attributeerror ...
[ -1.0200914144515991, -0.5407453179359436, 0.5690995454788208, 1.7920831441879272, 1.3219972848892212, 0.4630565345287323, -0.0900387167930603, -0.32091501355171204, 0.5369178652763367, 0.610548198223114, 0.40545493364334106, -0.01818268559873104, 0.39576855301856995, 0.38490134477615356, ...
def archive ( ) : with open ('data / traffic. log ','r') as logger _ file : date = logger _ file. readline ( ). rstrip ( ) with open ( f " data / logs / { date }. txt ",'w') as storing _ file : for line in logger _ file : storing _ file. write ( line ) with open ('data / traffic. log ','w') as logger _ file : logger _ ...
[ 0.33445942401885986, -0.9883095026016235, 0.8845411539077759, -0.6347136497497559, -0.29485586285591125, 0.7819147109985352, 0.32272371649742126, 0.8324305415153503, -0.7954542636871338, 0.03886401280760765, -0.11916879564523697, 0.32708606123924255, 0.6437671780586243, 0.4375777542591095,...
def fiksvm _ load _ model ( model _ file _ name ) : model = libfiksvm. fiksvm _ load _ model ( model _ file _ name ) if not model : print ( " can't open model file % s " % model _ file _ name ) return none model = topymodel ( model ) return model
[ 0.3974704146385193, 0.2191983461380005, 0.3610968589782715, 0.41981056332588196, -1.091695785522461, 0.3411402404308319, -0.23885110020637512, 0.3959793150424957, -0.24914635717868805, 0.1219339519739151, -0.17199374735355377, -1.0451220273971558, 0.13578122854232788, -0.13576452434062958,...
def get _ censored _ demand ( conn ) : censored _ demand = pd. read _ sql _ query ( " " " select distinct station _ id as start _ station _ id, substr ( time, 1, 13 ) as date _ hour from status where bikes _ available = 0 ; " " ", con = conn ) censored _ demand ['date _ hour'] = pd. to _ datetime ( censored _ demand ['...
[ -0.635262668132782, -0.3207407295703888, 0.4714033007621765, 0.44828593730926514, -0.6807274222373962, 0.3711400628089905, -0.7708675861358643, -0.2664356827735901, -0.7073652148246765, 0.6112251877784729, -0.7879193425178528, 0.4353067874908447, 0.29556185007095337, -0.016491064801812172,...
def load _ cfg ( basename, options ) : timon. tests. common. yaml _ fname = fname = basename + ". yaml " options. fname = fname with patch ('timon. configure. open ', writer, create = true ) : timon. configure. apply _ config ( options ) jsontxt = writer. written _ data ( ) data = json. loads ( jsontxt ) with patch ('j...
[ -0.15846440196037292, -0.2936842143535614, 0.5131062865257263, -0.7541083097457886, -0.3415909707546234, -0.6710337400436401, 0.3211863040924072, 0.16245046257972717, -0.0317797027528286, 0.20308484137058258, -0.5441461801528931, -0.8454809784889221, -0.618237316608429, 0.1984289139509201,...
def production ( self ) : # first we need to convert the cv atom indices to match our system. # read through gro file and connect residue names with what we packed the system with def convert _ indices ( resname, indices, stop _ after = none ) : result = [ ] residue _ count = 0 with open ( self. current _ structure ) a...
[ -0.14090166985988617, 0.20173145830631256, 0.7137860655784607, 0.18730612099170685, 0.3410913050174713, -0.18805424869060516, 0.6108068227767944, -0.18559786677360535, -0.49440696835517883, 0.13437007367610931, 0.2069878727197647, -0.5594096183776855, 0.13871699571609497, -0.13137833774089...
def default _ ledger _ accounts ( self, default _ ledger _ accounts ) : self. _ default _ ledger _ accounts = default _ ledger _ accounts
[ -0.5283839106559753, -0.02494298666715622, -0.296237051486969, 0.7774924039840698, 0.5745655298233032, 0.8783052563667297, 1.088428020477295, 0.3400616943836212, -0.5275998115539551, -0.2995118796825409, -0.44029808044433594, -1.037700891494751, -0.6834354400634766, 0.0774713084101677, -...
def get _ rupture _ centers ( self, ruptures ) : lons = np. array ( [ rup. hypocenter. longitude for rup in ruptures ] ) lats = np. array ( [ rup. hypocenter. latitude for rup in ruptures ] ) if isinstance ( self, ( pointsource, areasource ) ) : # # rup. hypocenter does not appear to have correct depth information dept...
[ -1.124681830406189, -0.1935184895992279, 0.45816776156425476, -0.9851850271224976, 0.772563636302948, 0.4491375684738159, 0.1708509922027588, -0.21383848786354065, 0.9491191506385803, 0.21239301562309265, -0.07832957059144974, -0.028501495718955994, 0.2074459046125412, 0.207840234041214, ...
def alphabeta ( self, game, depth, alpha = float ( " - inf " ), beta = float ( " inf " ) ) : if self. time _ left ( ) < self. timer _ threshold : raise searchtimeout ( ) legalmoves = game. get _ legal _ moves ( ) ; if not legalmoves : return ( - 1, - 1 ) startscore = float ( " - inf " ) usemove = ( - 1, - 1 ) score = n...
[ -0.9921646118164062, -0.6252366304397583, 0.8849347233772278, -0.15770676732063293, -0.006846364121884108, -0.6024919152259827, 0.418559193611145, -0.4264845550060272, -0.2498714029788971, 0.09930503368377686, 0.37549909949302673, 0.9612560868263245, -0.8201626539230347, 0.6032885313034058...
def test _ list _ integer _ length _ 1 _ nistxml _ sv _ iv _ list _ integer _ length _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 2. xsd ", instance = " nistdata / list / integer / schem...
[ -0.5686599612236023, -0.41017335653305054, 0.4129864573478699, 0.630482017993927, -0.44040733575820923, -0.17501293122768402, 0.173347607254982, 0.2643047571182251, 0.20563453435897827, 0.700342059135437, -1.4046090841293335, -0.0661209225654602, -0.17319759726524353, 1.237466812133789, ...
def _ _ setattr _ _ ( self, name, value ) : _ set _ or _ connect _ a _ to _ b ( self. _ _ getattr _ _ ( name ), value )
[ -0.8533130884170532, -0.9317129254341125, 0.6200926303863525, -0.7371125817298889, -0.7436327338218689, -0.3915542662143707, 0.38681653141975403, -1.4616001844406128, 0.29619070887565613, 0.44567471742630005, 0.17743605375289917, -0.11147883534431458, 1.0980570316314697, 0.5562469959259033...
def run _ cmd ( cmd ) : print ('+ { } '. format ( cmd ) ) if isinstance ( cmd, str ) : cmd = cmd. split ( ) p = subprocess. popen ( cmd, stdout = subprocess. pipe, stderr = subprocess. pipe ) output, err = p. communicate ( ) # when running in python 3, the output of subprocess. popen. communicate ( ) # is a bytes objec...
[ -0.5199154615402222, -0.8193861842155457, 0.783940315246582, -0.03876591846346855, -1.1102735996246338, -0.09507764875888824, -0.17903326451778412, 0.12745080888271332, 0.41791218519210815, -0.40059322118759155, 0.39238598942756653, 0.5610389709472656, -0.1930830329656601, -0.1041740030050...
def make _ x ( xi, xj ) : x = np. vstack ( ( xi, xj ) ) return x
[ 0.2878396511077881, 1.0951908826828003, 0.3028500974178314, -0.5532759428024292, 0.3268876075744629, -0.03893203288316727, -1.2846472263336182, -0.4927694499492645, -0.182186096906662, 0.8351239562034607, -0.1439264863729477, 0.7140374779701233, 0.5452518463134766, -1.3527361154556274, 0...
def _ _ set _ speeds ( self, right _ speed, left _ speed ) : self. _ _ right _ wheel ['motor']. set _ speed ( right _ speed ) self. _ _ left _ wheel ['motor']. set _ speed ( left _ speed )
[ 0.08050719648599625, 0.31960657238960266, 0.4847694933414459, -0.2973212003707886, 0.6663860082626343, -0.03405452519655228, -1.0323734283447266, 0.5596450567245483, -1.1739314794540405, 0.5477851033210754, -0.8883383870124817, 0.05172092840075493, 0.0831848606467247, 1.3897985219955444, ...
def og _ load _ driving _ agent _ make _ video ( pelican _ agent _ filepath, pelican _ agent _ name, panther _ agent _ filepath, panther _ agent _ name, config _ file _ path ='/ components / plark - game / plark _ game / game _ config / 10x10 / balanced. json ', video _ path ='/ components / plark _ ai _ flask / builta...
[ -0.060363125056028366, -0.6122556328773499, 0.7492472529411316, 0.36699193716049194, 0.5737089514732361, 0.2770828604698181, -0.08468431234359741, -0.2934626340866089, 0.39726659655570984, 0.8763062953948975, 0.07047004997730255, 0.2604513466358185, 0.38186129927635193, -0.3040511310100555...
def customization _ data ( client = none ) : res _ file = os. path. join ( os. path. dirname ( _ _ file _ _ ), res _ file ) if not os. path. isfile ( res _ file ) : raise filenotfounderror ( " { } not found ". format ( res _ file ) ) with io. open ( res _ file, mode ='rt') as f : b64 _ data = base64. b64encode ( f. rea...
[ 0.5484849810600281, -0.1781381368637085, 0.49377408623695374, 0.3988531827926636, -0.30226048827171326, -0.1765616089105606, 0.331044465303421, 0.4221658408641815, -0.42416465282440186, 0.43236759305000305, -0.31031036376953125, 0.7024499773979187, 0.607072651386261, -0.3855588734149933, ...
def test _ specimen _ page _ anon ( self ) : with app. test _ client ( ) as client : resp = client. get ( " / specimen / 12 " ) html = resp. get _ data ( as _ text = true ) self. assertequal ( resp. status _ code, 200 ) self. assertin ( " quercus ", html ) self. assertnotin ( " edit ", html )
[ -0.14654091000556946, 0.03372152894735336, 0.40402698516845703, -0.2217618227005005, 0.44302898645401, 0.8086692690849304, -0.7705341577529907, 0.007080937270075083, 0.19970184564590454, 0.09302809089422226, -0.13001593947410583, 0.5462312698364258, -0.031607452780008316, 0.373872011899948...
def _ traced _ connect _ attr ( attr _ a, attr _ b ) : # connect attr _ a to attr _ b cmds. connectattr ( attr _ a, attr _ b, force = true ) # if commands are traced... if node. trace _ commands : # format both attributes correctly formatted _ attrs = [ ] for attr in [ attr _ a, attr _ b ] : # look for the node of the ...
[ -0.024136126041412354, -0.7323524355888367, 0.8532629013061523, -0.4792555570602417, 0.5111246109008789, -0.601249098777771, 0.6994927525520325, -0.8004024028778076, -0.023610282689332962, 0.5492313504219055, 1.1789560317993164, 0.7415973544120789, 0.5842998623847961, 0.31505075097084045, ...
def test _ ensure _ device _ manufacturer _ strict _ missing ( self ) : plugin _ settings [ " object _ match _ strategy " ] = " strict " onboarding _ kwargs = { " netdev _ hostname " : " device1 ", " netdev _ nb _ role _ slug " : plugin _ settings [ " default _ device _ role " ], " netdev _ vendor " : " cisco ", " netd...
[ -0.031113838776946068, 0.6934437155723572, 0.5422223806381226, 1.0522066354751587, 0.9749380946159363, 0.27042168378829956, 0.47738710045814514, -0.20682069659233093, 0.30620357394218445, -0.5617222785949707, -0.5521591305732727, -0.37711969017982483, 0.22142624855041504, 1.331158041954040...
def plot _ walls ( self ) : x, y = self. size plot _ array ( self. envmat, x, y )
[ 0.49234575033187866, 1.0310803651809692, 0.2438613623380661, -0.4909469485282898, 0.1839531809091568, 0.801593005657196, 0.7590593695640564, -1.5264681577682495, -0.6289219260215759, 0.4914528429508209, 0.5113718509674072, 1.5637913942337036, -0.25683680176734924, 1.059905767440796, -0.1...
def _ _ handleselection ( self, track, level ) : self. handlepurchase ( track, level )
[ -0.10405850410461426, -0.29110023379325867, 0.32928746938705444, 0.9207911491394043, 0.6408851742744446, -0.4008232057094574, 1.0369057655334473, -0.8561622500419617, -0.0897693857550621, 0.30715054273605347, 0.3916996419429779, -0.578356921672821, 0.11836153268814087, -0.6184603571891785,...
def compute _ qty _ for _ export _ stock ( self, product _ stock, shopify _ product, odoo _ product ) : quantity = product _ stock. get ( odoo _ product. id, 0 ) if shopify _ product. fix _ stock _ type = ='fix': if shopify _ product. fix _ stock _ value < quantity : quantity = shopify _ product. fix _ stock _ value el...
[ -0.2144158035516739, -0.30891290307044983, 0.463287353515625, 1.0128806829452515, 0.5762319564819336, -0.42470139265060425, -0.18218505382537842, -1.1439540386199951, 0.9097456932067871, 0.029591400176286697, 0.11478988826274872, 0.9375779628753662, 0.5400819778442383, -0.11259137094020844...
def test01 _ calculate _ anomaly _ risk ( self ) : self. dut. phase _ id = 3 # cdr self. dut. lst _ anomaly _ mgmt = [ [ ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0 ] ] _ error _ code = _ calculate _ anomaly _ risk ( self. dut ) self. assertequal ( _ error _ code, 0 ) self. assertalmostequal ( self. du...
[ -0.32518965005874634, 0.15932372212409973, 0.6772593259811401, -0.5971792340278625, 0.23869135975837708, 0.49190571904182434, 0.08292048424482346, 0.42572975158691406, 0.2332392781972885, 0.5167495608329773, -0.4113673269748688, 0.4432019591331482, 0.4839521646499634, -0.17696277797222137,...
def inverse _ matrix ( * attrs ) : return _ create _ and _ connect _ node ('inverse _ matrix ', * attrs )
[ -1.021092414855957, 0.32358989119529724, 0.3100983500480652, -0.09958510100841522, -0.29315537214279175, -0.1264730989933014, 0.7589867115020752, 0.45970210433006287, -0.9700119495391846, -0.24105596542358398, -0.1919783353805542, 0.5146559476852417, -1.0113170146942139, -1.055088400840759...
async def fixture _ connection _ settings _ service ( network _ manager _ services : dict [ str, dbusservicemock | dict [ str, dbusservicemock ] ] ) - > connectionsettingsservice : yield network _ manager _ services [ " network _ connection _ settings " ]
[ -0.7314997315406799, 0.5860116481781006, 0.16697876155376434, -0.563808023929596, 0.29858478903770447, -0.7980893850326538, -0.6001020073890686, -1.3903347253799438, 0.011381889693439007, -0.39071211218833923, 0.46361270546913147, -0.22301967442035675, -0.9102652668952942, 0.35671055316925...
def wait _ till _ termindate ( self, c ) : stop = false while stop is false : description = c. describe _ cluster ( clusterid = self. job _ flow _ id ) state = description ['cluster'] ['status'] ['state'] if state = ='terminated'or state = ='terminated _ with _ errors': stop = true print ( state ) # prevent throttlinge...
[ 0.5098069906234741, -0.09093724191188812, 0.5287154912948608, -0.18779334425926208, 0.3295503556728363, 0.8300120830535889, -0.6301507949829102, -0.5291337370872498, -0.45198580622673035, -0.5115718841552734, -0.018150927498936653, 0.7039123177528381, -0.2330179661512375, -0.51558357477188...
def slot _ mappings ( self ) - > dict [ text, union [ dict, list [ dict ] ] ] : return { " cid " : [ self. from _ entity ( entity = " cid ", intent = " inform " ) ], " time " : [ self. from _ entity ( entity = " time " ) ] }
[ -0.5914942026138306, -0.2897988259792328, 0.398738294839859, -0.5366964340209961, -1.1139057874679565, 0.41285720467567444, -0.1309872418642044, 0.3867701590061188, -0.026789775118231773, 0.11088032275438309, 0.06698660552501678, -0.7816444635391235, 1.017229437828064, 0.8457891941070557, ...
def test _ just _ label ( self ) : st. file _ uploader ( " the label " ) c = self. get _ delta _ from _ queue ( ). new _ element. file _ uploader self. assertequal ( c. label, " the label " )
[ 0.22762539982795715, -0.7262231707572937, 0.2590217888355255, -0.11945613473653793, 1.009609341621399, 1.4333616495132446, -0.41112807393074036, -0.2915303707122803, 0.4962520897388458, -0.5597609281539917, -0.010231242515146732, -0.3275164067745209, -0.15712863206863403, 0.923104465007782...
def get _ process _ version ( self, gbd _ process _ id ) : # check if existing gbd processes file exists gbd _ processes _ file = " { } / gbd _ processes. json ". format ( self. args. out _ dir ) if os. path. exists ( gbd _ processes _ file ) : gbd _ processes = json. load ( file ( gbd _ processes _ file,'r') ) else : ...
[ 0.16185909509658813, -0.8262544870376587, 0.96007239818573, -1.180042028427124, 0.3500654101371765, 0.8854530453681946, -0.2518857419490814, -0.716804027557373, 0.025514300912618637, 0.32343876361846924, 0.5474441647529602, 0.6517734527587891, -0.18710733950138092, -0.1653611660003662, 0...
def get _ short _ name ( self ) : return self. first _ name
[ 1.0531214475631714, -0.540841817855835, 0.46730607748031616, -0.14960339665412903, -0.19182956218719482, 0.20235387980937958, -0.08185985684394836, -0.3340136408805847, 0.1522829532623291, -0.4275017976760864, 0.44268640875816345, 0.5193896889686584, 0.25117477774620056, 0.3229259252548218...
def preprocess ( i ) : i = i [ 35 : 195 ] # crop i = i [ : : 2, : : 2, 0 ] # downsample by factor of 2 i [ i = = 144 ] = 0 # erase background ( background type 1 ) i [ i = = 109 ] = 0 # erase background ( background type 2 ) i [ i! = 0 ] = 1 # everything else ( paddles, ball ) just set to 1 return i. astype ( np. float...
[ -0.45238110423088074, 0.2586423456668854, 0.7188845276832581, -0.3805977702140808, 0.24935120344161987, -0.011618395335972309, 1.330870270729065, -0.6258773803710938, 1.1383311748504639, 0.47257348895072937, -0.17276941239833832, 0.43191608786582947, -0.12425168603658676, -0.63963222503662...
def get _ parameter _ store _ params ( cmd _ line : namespace ) : # parameters provided to us by the command line param _ names = [ cmd _ line. client _ id _ parameter, cmd _ line. client _ secret _ parameter ] # create a kv client kv _ client = secretclient ( vault _ url = cmd _ line. vault _ uri, credential = default...
[ 0.357708215713501, -1.0254091024398804, 0.5764983892440796, 0.3579019606113434, 0.10551196336746216, 0.46138039231300354, -0.3903321623802185, -0.6905081272125244, -0.4761976897716522, 0.31359922885894775, -0.017453694716095924, 0.38921284675598145, -0.4550708830356598, 0.4780904948711395,...
def patches2array ( patches, img _ size, nn _ input _ patch _ size = ( 64, 64 ), nn _ output _ patch _ size = ( 16, 16 ), step _ size = 4 ) : logging. info ('patches2array, patches. shape : { }, img _ size : { } '. format ( patches. shape, img _ size ) ) logging. debug ('patches2array : img _ size : { } '. format ( img...
[ -0.4782223701477051, -1.0455520153045654, 0.7946034073829651, -0.5029821395874023, -0.26035448908805847, -0.34520143270492554, 0.8784818053245544, -0.7360159158706665, -0.08648993819952011, 0.18661409616470337, -0.523917555809021, 0.33725497126579285, 0.3173637092113495, 0.7010393738746643...
def find ( self, filename, ignore _ case = false ) : raise filenotfounderror
[ -0.035928115248680115, -0.20907779037952423, 0.6652129888534546, 0.2671029269695282, 0.4164634346961975, 1.1381016969680786, 0.5660002827644348, 0.12472686171531677, -1.2244865894317627, 0.697206974029541, 0.7718127965927124, -0.5393900871276855, -0.8195128440856934, 0.7861942052841187, ...
def set _ turning ( self, inner _ pants _ curves, turning _ dict, twisting _ dict ) : self. _ turning = np. zeros ( len ( inner _ pants _ curves ), dtype = int ) for i in range ( len ( inner _ pants _ curves ) ) : pants _ curve = inner _ pants _ curves [ i ] current _ turning = none if pants _ curve in turning _ dict :...
[ -0.9084309339523315, -0.8503480553627014, 0.47744306921958923, -0.6268300414085388, 0.9443752765655518, 0.27009105682373047, -0.2515832483768463, 0.42679718136787415, -0.4130201041698456, -0.37370380759239197, -0.30223578214645386, 1.1045202016830444, -0.4333999752998352, 0.500823378562927...
def _ loadcalibration ( self, url, cname ) : resolved _ url = resolveurl ( url, cname ) url _ type = parseurl ( resolved _ url ) if url _ type = = url _ empty : self. _ loadcalibration ( default _ camera _ info _ url, cname ) return rospy. loginfo ('camera calibration url :'+ resolved _ url ) if url _ type = = url _ fi...
[ -0.4854131042957306, -0.39209598302841187, 0.6090953350067139, 0.6373312473297119, -0.09459883719682693, -0.05552295222878456, -0.3031344413757324, -0.10617637634277344, 0.34995949268341064, -0.18356072902679443, -0.6643081307411194, -1.111312985420227, -0.12004581838846207, 0.483851850032...
def find _ next _ best _ move ( board, player ) : global model best _ prob _ to _ win = - 1 if player = = 1 : best _ prob _ to _ win = 2 best _ x = best _ y = 0 for x in range ( 3 ) : for y in range ( 3 ) : if not board [ 0, x, y ] and not board [ 1, x, y ] : # nobody has played in this position. # let's play and see h...
[ -0.39888983964920044, -0.21019603312015533, 0.8461951017379761, 1.0601866245269775, -0.5125350952148438, 0.1902788281440735, 0.05353963002562523, 0.18026743829250336, -0.7864160537719727, -0.08394096046686172, 0.08640976250171661, 0.7392320036888123, -0.171945720911026, 0.06798803061246872...
def test _ home ( self ) : response = self. client. get ('/') self. assert200 ( response ) self. asserttemplateused ('index. html')
[ 0.05227845907211304, 0.2319386750459671, 0.5483085513114929, 1.4257761240005493, 0.6051457524299622, 0.06659466028213501, 1.2271760702133179, -0.31946712732315063, 1.018592119216919, -0.37397605180740356, -0.5401725172996521, 0.30476853251457214, -0.1888384073972702, 0.1649155616760254, ...
def upload _ pon ( pon _ df, pon _ name, namespace, workspace ) : os. system ('mkdir - p pons') filename = '. / pons / fc _ upload _ pon _ % s. txt'% ( pon _ name ) pon _ df. to _ csv ( filename,'\ t ', index = false ) res = upload _ entities _ from _ tsv ( namespace, workspace,'pons / fc _ upload _ pon _ % s. txt'% po...
[ -0.6402412056922913, -0.1701982021331787, 0.5890542268753052, -0.17515768110752106, 0.46826067566871643, -0.5146939754486084, -0.48312434554100037, 0.33741894364356995, -0.4376700818538666, 0.19556230306625366, -0.4146095812320709, -0.4325568377971649, 0.08620233088731766, -0.8831306695938...
def drawboard ( self ) : image = pygame. transform. scale ( self. board, ( configuration. window _ width, configuration. window _ height ) ) self. window. blit ( image, ( 0, 0 ) )
[ -0.4425203204154968, 1.0960266590118408, 0.6069393754005432, 0.22159834206104279, 0.219309002161026, 0.8747033476829529, 0.5625333189964294, 0.16807322204113007, -0.3077438473701477, 0.0034399651922285557, 0.37414801120758057, 0.8468858599662781, -0.8791354298591614, 1.224682092666626, 0...
def make _ y ( yi, yj ) : y = np. append ( yi, yj ) return y
[ -0.05836915969848633, -0.3720548152923584, 0.6217314004898071, -0.5404725074768066, 0.38288718461990356, -0.14970248937606812, -0.6843281388282776, -0.6861283779144287, -0.20752672851085663, -0.47480130195617676, -0.10147367417812347, 1.2714016437530518, 0.2997187674045563, -0.139858186244...
def prepare _ grant _ uri ( uri, client _ id, response _ type, redirect _ uri = none, scope = none, state = none, * * kwargs ) : if not is _ secure _ transport ( uri ) : raise insecuretransporterror ( ) params = [ ( ('response _ type ', response _ type ) ), ( ('client _ id ', client _ id ) ) ] if redirect _ uri : param...
[ -0.19677935540676117, 0.22023966908454895, 0.8107464909553528, -0.40192317962646484, -0.15460406243801117, -0.0544409416615963, 0.13485442101955414, 0.24675415456295013, 0.7547246813774109, 0.1517220288515091, 0.5133481621742249, 0.6048893332481384, -0.256891667842865, 0.14943253993988037,...
def search ( self, topic, max = none, c = 100 ) : # searches for tweets results = self. api. getsearch ( term = topic, max _ id = max, count = c, result _ type = " mixed ", lang ='en') tweets = list ( ) min _ id = none for tweet in results : # tries to find the oldest tweet id if min _ id = = none or int ( tweet. id ) ...
[ 0.12015396356582642, -0.17128168046474457, 0.4462857246398926, -0.2789188623428345, 0.34094762802124023, -0.4137267768383026, -0.4875536859035492, 0.06955117732286453, -0.7055070400238037, -0.10930399596691132, -0.7459420561790466, 0.1731322705745697, -0.5079066753387451, 0.93977952003479,...
def reload ( self ) : self. _ check ( )
[ -0.3786976933479309, -0.21327617764472961, 0.13573318719863892, 0.9858140349388123, 0.5714523792266846, 0.1318049132823944, 0.6016059517860413, -0.31292662024497986, -0.42331787943840027, -0.610962450504303, 0.8834152817726135, 1.0840739011764526, -0.5170993208885193, -0.3810793161392212, ...
def with _ chip _ key ( self, key ) : b = self. _ copy ( ) b. chip _ key = key return b
[ -0.35925906896591187, 0.0015950285596773028, 0.3118264079093933, 0.33384644985198975, -1.395594596862793, -0.2847001850605011, -0.17300355434417725, 0.07598526775836945, 0.7566183805465698, 0.5963059663772583, -0.3872859477996826, 0.4266008138656616, -0.8468989133834839, 0.640591025352478,...
def _ _ add _ _ ( self, obj ) : if isinstance ( obj, matrix ) : if not ( self. m = = obj. m and self. n = = obj. n ) : raise exc. comformabilityerror ( " matrices must have the same dimensions " ) res = matrix ( self. m, self. n ) for i in range ( self. m ) : for j in range ( self. n ) : val = self [ i, j ] + obj [ i, ...
[ -0.4896540343761444, -0.47163665294647217, 0.6798554062843323, 0.6154186129570007, -0.20686092972755432, 0.6490681767463684, 0.9990785121917725, -0.9486866593360901, 1.3604844808578491, -0.3345150053501129, 0.16948550939559937, 0.27362194657325745, -0.8259545564651489, -0.04768452793359756...
def add ( self, asset : asset ) : self. assets. append ( asset )
[ -0.3415435552597046, -0.43621841073036194, 0.13714167475700378, -0.8788997530937195, -0.1431851089000702, 1.1657644510269165, -0.8257692456245422, -0.5492337942123413, 0.20941124856472015, -1.1288238763809204, 0.4844982624053955, 0.6857085227966309, -0.05622972920536995, 0.4615365564823150...
def deletedevicemanagementextensionpkg ( self, bundleid ) : dmereq = apiclient. dmesinglerequest % ( self. host, bundleid ) r = requests. delete ( dmereq, auth = self. credentials, verify = self. verify ) status = r. status _ code if status = = 204 : self. logger. debug ( " device management extension package removed "...
[ -1.3714251518249512, 0.7565964460372925, 0.4311557114124298, 0.5573549866676331, -0.9363247752189636, 0.7482860684394836, 0.13081562519073486, 0.30048099160194397, 1.308213472366333, 0.5160340666770935, -0.16836032271385193, 0.03183578699827194, -1.1399588584899902, 0.4803638160228729, 0...
def get _ name ( self, host _ name ) : if wildcard _ match ( self. _ pattern, host _ name ) : return host _ name else : return self. _ fallback
[ 0.13537491858005524, 0.45688503980636597, 0.6015061140060425, 0.4629276394844055, -0.5747969746589661, -0.10776374489068985, -0.037601273506879807, 0.2005329579114914, -0.22051510214805603, 0.30819204449653625, 0.47515448927879333, 0.16322119534015656, -0.9307762384414673, -0.1052500456571...
def test _ atomic _ id _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 4. xsd ", instance = " nistdata / atomic / id / schema + instance...
[ -0.12523873150348663, -0.08424895256757736, 0.4533517062664032, 0.728219211101532, -0.2280541956424713, 0.531703770160675, 0.2392728328704834, 0.009674246422946453, 0.49117007851600647, 1.0729804039001465, -0.014662904664874077, -0.03612218424677849, -0.11663661152124405, -0.75096601247787...
def get _ treatment _ url ( self, obj ) : if obj. treatment : return get _ related _ content _ url ( treatment, obj. treatment. id )
[ 0.2499254196882248, -0.35435307025909424, 0.34525129199028015, -0.22634842991828918, 0.4635050892829895, -0.09892143309116364, 0.43056923151016235, -0.005805828608572483, 0.2642357051372528, -0.010440072976052761, 0.014522776007652283, 0.09414488077163696, 0.24282768368721008, -0.173817157...
def _ calculate _ pfl _ constant ( branches, buses, index _ set _ branch, base _ point = basepointtype. flatstart ) : _ len _ branch = len ( index _ set _ branch ) _ mapping _ branch = { i : index _ set _ branch [ i ] for i in list ( range ( 0, _ len _ branch ) ) } pfl _ constant = np. zeros ( _ len _ branch ) for idx ...
[ -0.17153070867061615, -0.3188668191432953, 0.5904608964920044, -0.6144517064094543, -0.27774596214294434, 0.30599379539489746, -0.1354614496231079, 0.3378553092479706, -0.20151449739933014, 0.0524890311062336, 0.10484692454338074, -0.1050269603729248, -0.4503871202468872, -0.22892624139785...
def test _ api _ can _ create _ a _ user ( self ) : self. assertequal ( self. response. status _ code, status. http _ 201 _ created )
[ 0.09604520350694656, -0.05318339169025421, 0.12723998725414276, 1.089349627494812, 0.660189151763916, 1.516914963722229, -0.07107669860124588, 0.3581906259059906, -0.4291616380214691, -0.8054220080375671, -0.8808135986328125, -0.7586915493011475, 0.6147995591163635, 0.14956621825695038, ...
def items _ from _ events ( self, events : iterable [ tevent ] ) - > iterable [ namedtuple ] : # convert the domain event ( s ) to sequenced item ( s ). return map ( self. event _ mapper. item _ from _ event, events )
[ -1.671912431716919, -0.3249008059501648, 0.4749440550804138, 0.8951849937438965, -0.0026399940252304077, 0.004893200937658548, -0.24802914261817932, -0.11217917501926422, -0.08903959393501282, 0.47641822695732117, -0.656060516834259, -0.6269060969352722, 0.4761259853839874, -0.148663446307...
def isactive ( self ) : return not freecad. activedocument is none
[ 0.490562379360199, -1.3590526580810547, 0.34579864144325256, -0.007461541797965765, -0.6766735911369324, 0.19430427253246307, 0.6671691536903381, -0.4732091426849365, 0.48540788888931274, -0.8101328015327454, -0.6947942972183228, -0.02680397965013981, -0.98980313539505, -0.7070726156234741...
def testisloggedinfunction ( self ) : self. utils. account. login _ as ( self. username, self. password ) flag = self. po. is _ logged _ in ( ) assert flag is true, \ " is _ logged _ in ( ) returned % s, expected true " % ( flag )
[ -0.03180433809757233, -0.4470299482345581, 0.2819683849811554, 0.5451493263244629, 0.8844892382621765, 0.3988696336746216, 0.8101568222045898, 0.6050739884376526, 0.536673903465271, -0.8662002682685852, -0.9152023792266846, 0.5560156106948853, -0.47099918127059937, -1.1589478254318237, -...
def load _ image _ gt ( dataset, config, image _ id ) : # load image and mask image = dataset. load _ image ( image _ id ) image _ info = dataset. image _ info [ image _ id ] original _ shape = image. shape image, window, scale, padding, crop = tf _ utils. resize _ image ( image, min _ dim = config. image _ min _ dim, ...
[ -1.2021892070770264, 0.3140348494052887, 0.9714471101760864, -0.13459829986095428, 0.13474397361278534, -0.008205368183553219, -0.006460829172283411, -0.06424101442098618, -0.7827531099319458, 0.5760345458984375, 0.296455442905426, 0.4390081763267517, 1.0102986097335815, -0.148120537400245...
def putcmd ( self, cmd, args = " " ) : if args = = " " : str ='% s % s'% ( cmd, crlf ) else : str ='% s % s % s'% ( cmd, args, crlf ) self. send ( str )
[ 0.21773143112659454, 0.4401956796646118, 0.4271211624145508, -0.8393852710723877, 1.0590205192565918, 0.19023452699184418, -0.3314896821975708, 0.06085704639554024, -0.17616736888885498, -0.6679700613021851, 0.27821084856987, 0.2937909960746765, -1.261193871498108, 0.6363905668258667, -0...
def region ( self, region ) : self. _ region = region
[ -0.24496307969093323, 0.2497362345457077, -0.2335263192653656, -0.3198394179344177, -0.1940561830997467, 0.9328451752662659, 0.9849399924278259, 0.503121018409729, -0.18939290940761566, -0.6156801581382751, -1.179771065711975, 0.44515424966812134, -0.030140426009893417, 0.4769258499145508,...
def sell ( ) : id _ session = session [ " user _ id " ] # getting data range _ size = db. execute ( " select count ( * ) as count from finance where finance _ id = : finance _ id ", finance _ id = id _ session ) size = range _ size [ 0 ] ['count'] get _ data = db. execute ( " select * from finance where finance _ id = ...
[ -0.11906082928180695, 0.001683010719716549, 1.051388144493103, -0.2367182970046997, 0.46074748039245605, -0.5408254265785217, 0.39333441853523254, -0.3437703549861908, 0.06547867506742477, -0.023113567382097244, 0.07608666270971298, -0.07739482820034027, 0.08594705909490585, 0.008630151860...
def random _ string _ generator ( size = 6, chars = string. ascii _ uppercase + string. digits ) - > str : return''. join ( random. choice ( chars ) for _ in range ( size ) )
[ -0.1153176799416542, 0.00720515102148056, 0.17916052043437958, -1.0568318367004395, -0.8748284578323364, 0.21361170709133148, -0.6741196513175964, -0.7744549512863159, 0.2441263049840927, -0.8077311515808105, -0.12565875053405762, -0.024255717173218727, 0.1368909627199173, -1.0642210245132...
def short _ body ( self, system, body ) : if body. startswith ( system +'' ) : return body [ len ( system ) + 1 : ] else : return body
[ 0.4220464527606964, 0.19864654541015625, 0.38749557733535767, 0.022030042484402657, -0.26189377903938293, 0.6393373608589172, -0.5968064665794373, -1.2641444206237793, 1.3270422220230103, 0.11415872722864151, 0.6918900609016418, 1.6005611419677734, -0.6886605024337769, 0.323342502117157, ...
async def color ( self, ctx : context, color : colourconverter ) - > none : self. embeds [ ctx. author ]. embed. colour = color await ctx. send ( " embeds color updated. " )
[ -0.30120107531547546, -0.32145044207572937, 0.4303768277168274, 0.39539068937301636, 0.811028003692627, 1.016716718673706, -0.6581246852874756, 0.706281840801239, 0.0592394657433033, 0.02262602001428604, -0.9416358470916748, 1.4035528898239136, -0.6160328388214111, 0.8234485983848572, -0...
def active _ end _ date ( self, active _ start _ date ) : pattern _ dict = dict ( ) pattern _ dict ['freq _ type'] = self. schedule _ freq _ type pattern _ dict ['active _ end _ date'] = active _ start _ date schedule _ pattern = schedulepattern ( self. _ pattern ) self. _ pattern = schedule _ pattern. create _ schedul...
[ -0.7315446734428406, -0.6474173665046692, 0.5468485355377197, -0.3111545741558075, -0.10841087996959686, 0.3079880177974701, 0.6668701171875, 0.7234655618667603, -0.19180487096309662, 0.15240126848220825, -0.5578243732452393, 0.931606650352478, 0.4010534882545471, -0.733295202255249, 0.0...
def extract _ client _ login _ token ( http _ body, scopes ) : token _ string = get _ client _ login _ token ( http _ body ) token = clientlogintoken ( scopes = scopes ) token. set _ token _ string ( token _ string ) return token
[ -0.7364802360534668, -1.2243356704711914, 0.2273300588130951, -0.45517775416374207, -0.4595772325992584, -0.11859645694494247, -0.18969258666038513, 0.18345360457897186, 0.5306048393249512, 0.154719278216362, -0.9511905312538147, 1.3016551733016968, 0.0573544055223465, -1.338803768157959, ...
def adjust _ gamma ( image, gamma ) : # build a lookup table mapping the pixel values [ 0, 255 ] to # their adjusted gamma values invgamma = 1. 0 / gamma table = np. array ( [ ( ( i / 255. 0 ) * * invgamma ) * 255 for i in np. arange ( 0, 256 ) ] ). astype ( " uint8 " ) # apply gamma correction using the lookup table r...
[ -0.4209487736225128, -1.0046865940093994, 0.6495236754417419, -0.15197212994098663, 0.011858250945806503, -0.13645724952220917, 0.15887638926506042, 0.2746735215187073, 0.4617924690246582, 0.3569502532482147, 1.4115663766860962, 0.82848060131073, -0.4460318982601166, 0.5413877367973328, ...
def compute _ rotation _ matrix ( self, rotate _ param ) : pitch, yaw, roll = rotate _ param [ :, 0 ], rotate _ param [ :, 1 ], rotate _ param [ :, 2 ] bs = rotate _ param. shape [ 0 ] device = rotate _ param. device pitch _ matrix = torch. eye ( 3, device = device ) [ none, :, : ]. expand ( bs, - 1, - 1 ). clone ( ) y...
[ -0.28499507904052734, 0.08244718611240387, 0.9813918471336365, 0.31481441855430603, 0.7808176279067993, -0.6442500948905945, 1.151827096939087, 0.21287181973457336, 0.22483833134174347, 0.6939502358436584, 0.24564415216445923, 0.11153750121593475, -0.4350970983505249, -0.18532483279705048,...
def bool _ view ( flag ) : return " yes " if flag else " no "
[ 0.22069616615772247, 0.5066529512405396, 0.1251165270805359, -0.13402657210826874, -1.3164623975753784, -0.020658474415540695, -0.4879331588745117, 0.7182016968727112, -0.3962537944316864, -0.5456903576850891, 0.08840638399124146, 0.5478447079658508, 0.3078383803367615, -0.2717406153678894...
def _ _ init _ _ ( self, value = none, error = none, weights = none ) : self. value = value self. error = error self. weights = weights
[ 0.8571267127990723, -0.025561422109603882, 0.5572440028190613, 0.8134154081344604, 0.0596684031188488, -0.36053165793418884, -0.4677814543247223, 0.14303267002105713, 0.001860631164163351, -0.1295812577009201, -0.054579880088567734, 0.305653840303421, -0.3613981604576111, 0.787415504455566...
def isequal ( self, other ) : # test lengths are equal. if ( len ( self. seq )! = len ( other. seq ) ) : print ( " sequences are of different lengths. isequal ( ) returning false. " ) equal = false # if equal lengths, test if values are all equal. else : equal = all ( self. seq = = other. seq ) # return true or false r...
[ -0.434717059135437, -0.5172519087791443, 0.623417317867279, 0.5066368579864502, 0.32922711968421936, 0.15542054176330566, -0.40337103605270386, -0.3133765757083893, 1.0032914876937866, 0.4462318420410156, -1.2316653728485107, -0.029050026088953018, -0.8166162967681885, 0.8178257346153259, ...
def north _ american ( self ) : name = name ( ) # the editor requires a surname name. add _ surname ( surname ( ) ) name. set _ primary _ surname ( 0 ) father _ handle = self. family. get _ father _ handle ( ) if father _ handle : father = self. dbstate. db. get _ person _ from _ handle ( father _ handle ) preset _ nam...
[ -0.4341180622577667, 0.08174347877502441, 0.5420480966567993, -0.14029641449451447, -0.9955152273178101, 0.011335534043610096, -0.5874292254447937, -0.5196603536605835, 0.2619302272796631, -0.253552109003067, -0.2650430202484131, -0.4587947130203247, 0.7293791770935059, 0.5341846942901611,...
def get _ parameterization _ dimensionality ( self ) : if self. parameterized _ locations is none : raise valueerror ( " load data first " ) return self. parameterized _ locations. shape [ 1 ]
[ -1.1730165481567383, 0.46711158752441406, 0.44978490471839905, -0.03959884122014046, 0.6852343082427979, 0.3985205292701721, 0.3911779522895813, 0.5792492628097534, 0.12259881943464279, 0.16182421147823334, 0.38050079345703125, 0.7145209312438965, -0.43423914909362793, 0.33392661809921265,...
def process _ login ( request ) : # get username and password try : username = request. post ['username'] password = request. post ['password'] except keyerror : return httpresponsebadrequest ( ) # redirections signin _ page = reverse _ lazy ( " home " ) # redirect to login page if failed doctor _ page = reverse _ lazy...
[ -0.5899031162261963, -0.5851037502288818, 1.0392847061157227, 0.8026379942893982, -0.0753822922706604, 0.38986659049987793, 0.6057342290878296, -0.13836877048015594, 0.7817776799201965, -0.48913294076919556, 0.2780050039291382, -0.2754193842411041, 0.002381157362833619, 0.19858700037002563...
def create ( self, cr, uid, data, context = none ) : if data ['employee _ id'] : rec = self. pool. get ('hr. employee'). browse ( cr, uid, data ['employee _ id'], context = context ) data. update ( {'degree _ id': rec. degree _ id. id,'department _ id': rec. department _ id. id,'emp _ code': rec. emp _ code } ) return ...
[ 0.2931007146835327, 0.02176516503095627, 0.532313883304596, -0.6637625694274902, 0.9803227782249451, 0.09844443947076797, -0.6871622800827026, 0.77875155210495, 0.09654174745082855, -0.5457890033721924, 0.12222518026828766, 0.5502141714096069, 0.10879390686750412, 0.7128341197967529, -0....
def generate _ pointcloud ( rgb _ file, depth _ file, ply _ file ) : start = time. time ( ) ; rgb = cv2. imread ( rgb _ file ) rgb = rgb. astype ( np. uint8 ) depth = cv2. imread ( depth _ file ) depth = depth [ :, :, 0 ] depth = depth. astype ( np. float32 ) # coords x = np. zeros ( ( depth. shape [ 0 ], depth. shape ...
[ 0.15100815892219543, 0.4446682929992676, 1.2908705472946167, 0.6466967463493347, 0.31655746698379517, 0.02983606420457363, -0.07856032252311707, 0.103656105697155, -0.2772977352142334, 1.053462028503418, 0.28228262066841125, 0.27717381715774536, -0.5286819934844971, 0.1829596757888794, -...
def test _ atomic _ language _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 2. xsd ", instance = " nistdata / atomic ...
[ 0.1778710037469864, -0.6552934050559998, 0.4682490825653076, 0.7771769165992737, -0.3984513580799103, 0.033196087926626205, -0.11153604835271835, -0.11459238827228546, -0.4538858234882355, 0.4304350018501282, -0.27435845136642456, -0.011240574531257153, 0.009299436584115028, 0.189230561256...
def _ load _ hdf5 _ v1 ( self, filename, group = " twiss " ) : f = h5py. file ( filename,'r') self. element = list ( f [ group ] ['element'] ) self. tune = tuple ( f [ group ] ['tune'] ) self. _ twtable = np. array ( f [ group ] ['twtable'] ) f. close ( )
[ -0.7560311555862427, 0.24593205749988556, 0.2524106502532959, -0.09980589151382446, -0.6568083763122559, 0.287223219871521, 0.7667474746704102, 0.018037648871541023, -1.3093816041946411, 0.805655300617218, 0.04459680989384651, 0.34230366349220276, -0.180462047457695, 0.17088502645492554, ...
def test _ mail _ webhook _ get _ is _ none ( self ) : httpretty. register _ uri ( uri = " http : / / 127. 0. 0. 1 / ", method ='get ', status = 200, ) requests. get ('http : / / 127. 0. 0. 1 /') result = webhook ( httpretty. last _ request ( ) ) self. assertisnone ( result )
[ -0.05164749175310135, 0.2525099515914917, 0.7254347801208496, -0.1676579713821411, 0.6122715473175049, -0.20608533918857574, -0.7641705274581909, -0.23239845037460327, -0.37285903096199036, -0.9589683413505554, -0.6372339129447937, 1.2123138904571533, -0.9260790944099426, -0.24944521486759...
def _ _ next _ _ ( self ) : rowvalues = none try : row = next ( self. _ rowreader ) data = [ r for r in row ] # convert iterator or generator to list if len ( data ) < len ( self. _ headings ) : if self. _ shortrowsallowed : for n in range ( len ( data ), len ( self. _ headings ) ) : data [ n ] = none else : raise valu...
[ -0.8173018097877502, -0.1734449565410614, 0.7340828776359558, -0.1475697159767151, -0.45948973298072815, -1.108636498451233, -0.44412297010421753, 0.1913357973098755, -0.13977006077766418, -0.5258188247680664, 0.2771832346916199, 0.4131660461425781, 0.32836416363716125, 0.3614000678062439,...
def clean ( self ) : if any ( self. errors ) : # don't bother validating the formset unless each form is valid on its own return non _ blank _ found = false for i in range ( 0, self. total _ form _ count ( ) ) : form = self. forms [ i ] if form. is _ valid ( ) and'email'in form. cleaned _ data and form. cleaned _ data ...
[ -0.3482033908367157, 0.03514571115374565, 0.569983184337616, -0.5017687678337097, 0.3096576929092407, -0.012423990294337273, 0.21264804899692535, 0.5847867727279663, -0.4401136338710785, -0.6202016472816467, 0.0829242467880249, 0.48846250772476196, -0.4256972670555115, 1.0452771186828613, ...
def collision ( self, obj ) : up, down, left, right = range ( 4 ) allowed = { up : true, down : true, left : true, right : true } if self. x < = ( obj. x + obj. width ) and ( self. x + self. width ) > = obj. x and self. y < = ( obj. y + obj. height ) and ( self. y + self. height ) > = obj. y : if self. y = = ( obj. y +...
[ 0.10323423147201538, -0.395368367433548, 1.260746717453003, -0.39906302094459534, -1.4258453845977783, 0.5563753843307495, 0.6212291717529297, -1.4058703184127808, -0.15045617520809174, 1.052831768989563, -0.8140007257461548, -0.915740430355072, -0.8591741919517517, 0.10825103521347046, ...
def _ bool _ check _ tag ( self, tag _ name = " # parashar " ) : self. _ _ search _ tag ( tag _ name ) try : self. _ _ open _ first _ tile ( ) return true except exception as e : logging. error ( e, exc _ info = true ) return false
[ 0.228319451212883, -0.006705025210976601, 0.7029747366905212, 0.5534945130348206, -0.28376731276512146, 0.23039861023426056, 0.32520291209220886, 0.006084012798964977, -0.7327770590782166, 0.22334697842597961, -0.0047307186760008335, -0.8649781346321106, -0.24021796882152557, 0.81366825103...
def logs ( self, limit : optional [ int ] = default _ limit, page _ size : int = default _ page _ size ) - > " paginatedlist [ webhooklog ] " : return self. _ client. webhook. logs ( self. id, limit = limit, page _ size = page _ size )
[ 0.44199249148368835, 0.04250369220972061, 0.5899763703346252, 0.3017179071903229, 0.8993796706199646, -0.23090991377830505, -0.8295568823814392, 0.18448437750339508, 0.47037819027900696, 0.33551257848739624, -0.5293377041816711, 1.5116215944290161, -0.3093230426311493, 0.6936690807342529, ...
def stem _ word ( word ) : try : return stemmer. stem ( word ) except recursionerror : return " "
[ 0.22304818034172058, 1.1888675689697266, -0.0329841747879982, 0.8431735634803772, -0.6521894335746765, -0.16628530621528625, -0.04775942116975784, -0.6290439367294312, 0.7615141272544861, -0.18933086097240448, -0.002765558660030365, -0.757644534111023, -0.511039137840271, 0.188905313611030...
def on _ asset _ changed ( self ) : assets _ model = self. data [ " model " ] [ " assets " ] parent _ input = self. data ['inputs'] ['parent'] selected = assets _ model. get _ selected _ assets ( ) self. valid _ parent = false if len ( selected ) > 1 : parent _ input. settext ('< please select only one asset! >') elif ...
[ -0.01802697964012623, -0.45458564162254333, 0.5163078308105469, 0.18281190097332, -0.16874563694000244, 0.05531669408082962, 0.4838258624076843, -0.7030355930328369, 0.03714532032608986, 0.007578106597065926, 0.4680635929107666, 0.14306558668613434, -0.07201838493347168, 0.2477930784225464...
def dayofweek _ sample ( x ) : enc = onehotencoder ( sparse ='false ', drop ='first ', categories = [ list ( range ( 0, 8 ) ) ] ) array = enc. fit _ transform ( np. array ( x. index. dayofweek ). reshape ( - 1, 1 ) ) array = array. toarray ( ) columns = ['dayofweek _'+ str ( i ) for i in range ( 1, 8 ) ] return pd. dat...
[ -0.7705643177032471, 0.7805731892585754, 0.5439780950546265, -0.47012966871261597, -0.45466211438179016, -0.899591863155365, 0.2906665802001953, -0.7947704792022705, 1.2433890104293823, 0.0036111839581280947, 0.43793702125549316, 0.10965240746736526, 0.33754515647888184, -0.559384107589721...
def resolveurl ( url, cname ) : resolved ='' # resolved url to return rest = 0 # index of remaining string to parse while true : # find the next'$'in the url string dollar = url. find ('$ ', rest ) if dollar = = - 1 : # no more'$'s there? resolved + = url [ rest : ] return resolved # copy characters up to the next'$'re...
[ -0.5027756690979004, -0.328628271818161, 0.7606228590011597, 0.272900253534317, -0.01667790673673153, -0.4153832197189331, -0.4250759184360504, 0.37078794836997986, 0.5492909550666809, -0.556162416934967, -0.41750821471214294, -0.2641523480415344, -0.3620663583278656, 0.22354324162006378, ...
def calculate _ distance ( latitude, longitude, max _ dist, matches ) : # matches : [ id, age, pict, sex, interest, lat, long, dist ] delta _ lat = np. subtract ( latitude, matches [ :, 5 ]. astype ( float ) ) delta _ long = np. subtract ( longitude, matches [ :, 6 ]. astype ( float ) ) distance = np. sqrt ( np. power ...
[ -0.24277862906455994, -0.25423622131347656, 0.6480470895767212, -0.28580906987190247, -0.8613715171813965, 0.15517981350421906, -0.25442731380462646, 0.912445068359375, -0.080841563642025, 0.29136359691619873, -0.3947075307369232, -0.5288906693458557, -0.17917178571224213, -0.7480937838554...
def edit _ showtime ( request, showtime _ id ) : if not request. user. is _ superuser : messages. error ( request,'sorry, only website owners can do that.') return redirect ( reverse ('home') ) showtime = get _ object _ or _ 404 ( showtime, pk = showtime _ id ) if request. method = ='post': form = showtimeform ( reques...
[ -0.578009843826294, -0.2932055592536926, 0.669872522354126, 0.062041107565164566, -0.20701831579208374, 0.15943454205989838, 1.0018417835235596, 1.0662020444869995, 0.20358584821224213, 0.8326250314712524, -0.23254497349262238, -0.1511564701795578, -0.08123977482318878, 0.4228442907333374,...
def delete _ user _ from _ session ( self ) : if self. is _ user _ id _ in _ session ( ) is true : del self. session ['user _ id']
[ 0.6239261627197266, -1.0312176942825317, 0.17519444227218628, 0.7322312593460083, -0.1785813570022583, 0.15579432249069214, 0.37383976578712463, -0.28330811858177185, 1.2830700874328613, 0.19821937382221222, 0.175440713763237, 0.7527768015861511, -0.2946646213531494, 0.6628720164299011, ...
def speakunicodecharacter ( self, character ) : speech. speak ( messages. unicode % \ self. utilities. unicodevaluestring ( character ) )
[ 0.05086134001612663, -0.5440075397491455, 0.31866374611854553, -0.5447953343391418, -0.09812026470899582, 0.3845943510532379, 0.15008662641048431, 0.021324969828128815, 0.8249216675758362, -0.4979917109012604, -0.650684654712677, 0.6826848983764648, -0.10349644720554352, -0.275314152240753...
def modify ( ctx, # mandatory main parameter volumeid, # optional main parameter accountid = none, # optional main parameter access = none, # optional subparameter of optional main parameter. miniops = none, # optional subparameter of optional main parameter. maxiops = none, # optional subparameter of optional main par...
[ -0.41614145040512085, -0.3667334318161011, 1.0117393732070923, -0.09450400620698929, 0.027436230331659317, -0.20608074963092804, -0.18607252836227417, 0.3954850733280182, 1.0701059103012085, 0.061917807906866074, -0.5420516729354858, 0.9734988808631897, -1.0250146389007568, -0.536110341548...
def update _ fields _ model ( self, * args, * * kwargs ) : cur _ ct = self. fmodel. rowcount ( ) df = self. dfmodel. dataframe ( ) if cur _ ct > 0 : for i in range ( self. fmodel. rowcount ( ) ) : item = self. fmodel. item ( i, 0 ) if item and item. text ( ) not in df. columns : self. fmodel. takerow ( i ) for col in d...
[ -1.1421245336532593, 0.1399073451757431, 0.5361326932907104, -0.1572507917881012, -0.08793646097183228, -0.3318442702293396, 0.1798580437898636, -0.12919917702674866, -0.6857911944389343, -0.1495397984981537, -0.579638659954071, -1.0336145162582397, 0.12620118260383606, 0.205787792801857, ...
def add ( self, model _ sec : float, e2e _ sec : float, batch _ size : int ) : if batch _ size! = self. _ batch _ size : raise valueerror ( " batch _ size of { } does not match the original batch _ size { } ". format ( batch _ size, self. _ batch _ size ) ) self. _ batch _ model _ times. append ( model _ sec ) self. _ ...
[ -0.10501024127006531, 0.02841460332274437, 0.6016921401023865, 0.6181133985519409, 0.4996200501918793, 0.7685773968696594, -0.5528405904769897, -0.16863423585891724, -0.7429203987121582, 0.3208204209804535, -1.1654731035232544, 0.3286292850971222, 0.625453770160675, 0.9919841289520264, 0...
def itype ( module, name, input _ types, decorator = inputs ) : register ( module, decorator = decorator, names = [ name ], decorator _ type = " inputs ", types = input _ types )
[ -1.1877219676971436, 0.8759337663650513, 0.5997846722602844, 0.1452120691537857, 0.7123346328735352, 0.38772597908973694, -0.08243681490421295, -0.2426804155111313, -0.06018462032079697, 0.7735320329666138, -0.42887789011001587, 0.902435839176178, -0.6497433185577393, 0.319463312625885, ...
def setupclass ( cls ) : print ('\ n─────────────────────────────────────────────────────────────────────────────────────────') print ('starting the execution of tests for class " slashnexthostreport " with valid set of inputs.') print ('──────────────────────────────────────────────────────────────────────────────────...
[ 1.433440089225769, -0.00734694255515933, 1.1873655319213867, -0.5143253207206726, 0.7642358541488647, 0.7567088007926941, 1.0421335697174072, -0.5349674820899963, -0.7892494797706604, -0.32145389914512634, 0.5162410736083984, 0.3366208076477051, -0.48723846673965454, 0.029995571821928024, ...
def build _ model ( self, input _ dim, output _ dim, batch _ size = batch _ size ) : print ( " input _ dim ", input _ dim, " output _ dim ", output _ dim ) l _ in = lasagne. layers. inputlayer ( shape = ( batch _ size, input _ dim ), ) l _ hidden = lasagne. layers. denselayer ( l _ in, num _ units = 200, nonlinearity =...
[ 0.29862716794013977, -0.49515771865844727, 0.5887534022331238, 0.6992518901824951, -0.299069881439209, 0.5879250764846802, -0.18101449310779572, 0.4985836148262024, -0.21951594948768616, -0.2548496723175049, -0.17864252626895905, 0.4123585820198059, 0.5214500427246094, -0.08949758112430573...