text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ mgui _ get _ cell ( self, row : int, col : int ) - > any : item = self. _ qwidget. item ( row, col ) if item : return item. data ( self. _ data _ role ) widget = self. _ qwidget. cellwidget ( row, col ) if widget : return getattr ( widget, " _ magic _ widget ", widget )
[ 0.616700291633606, 0.5144022107124329, 0.4605555832386017, 0.1006300076842308, -0.03241150453686714, -0.38141030073165894, -0.5382747054100037, -0.7944664359092712, -0.43294528126716614, -0.6388744711875916, 1.1691234111785889, 0.5305742025375366, 0.552646815776825, -0.3138185143470764, ...
def detect _ duplicates ( self, responses ) : if len ( responses ) > len ( set ( responses ) ) : raise rfx. duplicatechoice ( )
[ 0.1598576158285141, 0.11891795694828033, 0.3067667782306671, 0.14054077863693237, 1.5226552486419678, -0.033279385417699814, 0.04961470887064934, -1.562568187713623, 1.3792920112609863, -0.3797159790992737, -0.19586007297039032, -0.2282676249742508, 0.04734811186790466, 0.48714396357536316...
def _ get _ probability ( self, hypothesis ) : y = self. _ train _ outputs return y. count ( hypothesis ) / ( float ( len ( y ) ) )
[ -0.0469072125852108, 0.26579728722572327, 0.5282434821128845, 0.2552104890346527, 0.5207712054252625, -0.7155880331993103, 0.4445345103740692, 0.04421484097838402, -0.9106276035308838, 0.3427938222885132, 0.16471070051193237, -0.33793553709983826, -0.4036610424518585, -0.02367750182747841,...
def readjson ( self ) : return json. loads ( self. _ file. readline ( ). decode ( " utf - 8 " ) )
[ -0.6067601442337036, -1.4111247062683105, 0.5708793997764587, -1.3465162515640259, -0.6636315584182739, -0.1436915248632431, -0.9410221576690674, -0.013793437741696835, -0.7707932591438293, -0.19761499762535095, -0.09069684892892838, 0.8085106611251831, -0.3028959333896637, -1.109871149063...
def lines ( self, lines ) : if self. cache _ content : self. cached _ content =''. join ( [ b2u ( l ) for l in lines ] ) try : with self. _ open _ dockerfile ('wb') as dockerfile : dockerfile. writelines ( [ u2b ( l ) for l in lines ] ) except ( ioerror, oserror ) as ex : logger. error ( " couldn't write lines to docke...
[ -0.43299391865730286, 0.21738208830356598, 0.39669907093048096, 0.3908010423183441, 1.1040712594985962, 0.6677444577217102, 0.5484121441841125, 0.6565230488777161, -0.43981581926345825, -0.3353973925113678, -0.23640719056129456, -0.10519535839557648, 0.46257254481315613, 0.4293718338012695...
def check _ jsov _ special ( special ) : for key in special. keys ( ) : if key not in utils. children _ attributes. keys ( ) : print ( " error :'{ }'is not a recognized attribute. ". format ( key ) ) return false return true
[ -0.2766841948032379, 0.26513057947158813, 0.7359839081764221, 0.5642220377922058, -0.8742090463638306, 0.41494226455688477, -0.04280023276805878, 0.3171958327293396, -0.1132722795009613, 0.14402946829795837, -0.7735779285430908, -0.11899323016405106, 0.7661354541778564, 0.5445094108581543,...
def test _ double _ iter ( ) : class iterscraper ( scraper ) : def scrape ( self ) : yield self. scrape _ people ( ) def scrape _ people ( self ) : p = person ( " michael jordan " ) p. add _ source ( " http : / / example. com " ) yield p with mock. patch ( " json. dump " ) as json _ dump : record = iterscraper ( juris,...
[ -1.2884577512741089, 0.6068545579910278, 0.638123631477356, -0.5147688984870911, -0.022539403289556503, 0.7165655493736267, 0.4628199636936188, -0.4954327642917633, 0.14450255036354065, 0.14344777166843414, -0.8420665264129639, -0.060072194784879684, 0.3687702417373657, 0.7346439957618713,...
def announce _ result ( ai _ move, outcome ) : print ('the ai plays :'+ ai _ move ) print ('the winner is :'+ outcome ) print ('' )
[ 0.2499731183052063, 0.002180210081860423, 0.8073754906654358, -0.17688527703285217, 0.05235676467418671, -0.025359205901622772, 0.4471836984157562, 0.053719159215688705, -0.8887554407119751, 0.9900916218757629, 0.4583600163459778, 1.2055211067199707, 0.26681703329086304, -0.210736393928527...
def check _ lv _ exists ( self, name ) : subprocess. check _ output ( ['lvdisplay ', name ] )
[ 0.21117450296878815, -0.556938886642456, 0.5408399701118469, -0.6467300653457642, -0.23699676990509033, 0.5953876376152039, -0.6777158379554749, -0.5036216974258423, 0.12584258615970612, 0.21947722136974335, -0.3107602894306183, 0.529595673084259, 0.3655312955379486, 1.129993200302124, -...
def create _ empty _ region _ matrix ( region, resolution, genome ) : check _ region ( region = region, genome = genome ) chrom _ beads = bead _ ranges _ in _ chromosome ( chromosome = region [ 0 ], genome _ version = genome, resolution = resolution ) start _ bead, end _ bead = 0, 0 for i in range ( len ( chrom _ beads...
[ 0.06919144839048386, -0.6244034171104431, 0.4466259777545929, -0.6627456545829773, 0.11211951076984406, 0.5064788460731506, 1.4937249422073364, -0.10016878694295883, 0.29965999722480774, 0.3942647874355316, -0.6035516858100891, 0.7412029504776001, -1.3516894578933716, 0.007611096370965242,...
async def message _ delete _ bulk _ middleware ( self, payload : gatewaydispatch ) : return " on _ message _ delete _ bulk ", [ messagedeletebulkevent. from _ dict ( construct _ client _ dict ( self, payload. data ) ) ]
[ 0.9588759541511536, -0.12373284995555878, 0.4059482216835022, -0.3595605790615082, 0.45979878306388855, -0.5433482527732849, -0.5799597501754761, -0.4626457989215851, 0.5001767873764038, 0.10633836686611176, 0.5231574773788452, 1.1101348400115967, 0.06490670144557953, 1.289220929145813, ...
def user _ count ( self ) : return classmembership. objects. filter ( class _ taking _ id = self. id, is _ educator = false ). count ( )
[ -0.48447293043136597, 0.04604167863726616, 0.5129373073577881, 0.7277607321739197, 0.5747186541557312, 0.7497813701629639, 0.8235322833061218, 0.2908315062522888, 0.15087313950061798, -0.13124682009220123, -0.4976162612438202, -0.15080265700817108, -0.05034483224153519, 0.588612973690033, ...
def test _ toml _ columns ( sample _ data, sample _ sheet ) : assert set ( sample _ data ) = = set ( c. name for c in sample _ sheet. columns )
[ 1.0973904132843018, -0.12696848809719086, 0.16768191754817963, -0.8193508982658386, -0.16453172266483307, 0.5864899754524231, -0.572437584400177, -0.6229852437973022, -0.08681890368461609, -0.1492084562778473, -0.8233214616775513, -0.2629943788051605, 1.0466266870498657, -0.564170837402343...
def train ( self, training _ data, epochs, mini _ batch _ size, eta, test _ data = test _ data ) : # provide training data, number of epochs to train, batch size, the learning rate and the test _ data # learning rate : how fast do you want the sgd to proceed n _ test = len ( test _ data ) n = len ( training _ data ) fo...
[ 0.3077068626880646, 0.2509508430957794, 0.5296478271484375, 0.18889248371124268, 0.38719671964645386, -0.1721590757369995, -0.4949224591255188, 0.7988772392272949, -0.08477520942687988, -0.18024466931819916, 0.024575205519795418, 0.04187292605638504, -0.015836205333471298, -0.2367981672286...
def send _ to ( self, clients ) : var _ vals = { } with self. model. graph. as _ default ( ) : all _ vars = tf. trainable _ variables ( ) for v in all _ vars : val = self. model. sess. run ( v ) var _ vals [ v. name ] = val for c in clients : with c. model. graph. as _ default ( ) : all _ vars = tf. trainable _ variabl...
[ -0.2621742784976959, 0.058353543281555176, 0.43097513914108276, -0.2808478772640228, 0.1595636010169983, 0.017917197197675705, 0.39439836144447327, -0.6815707087516785, -1.168073058128357, 0.48541703820228577, -0.7180993556976318, 0.39133888483047485, 0.20732398331165314, 0.514561474323272...
def find _ nearest ( array, value ) : index = ( np. abs ( array - value ) ). argmin ( ) return index
[ -0.48767000436782837, -1.2243350744247437, 0.512209951877594, 0.5461954474449158, -1.6784253120422363, 0.5330199599266052, -0.13003018498420715, -0.8642942905426025, -0.5292673707008362, 0.4394398331642151, 0.818309485912323, 0.6956498026847839, -0.06267813593149185, 0.8331019878387451, ...
def k _ in ( stddev ) : return tf. truncated _ normal _ initializer ( mean = 0, stddev = stddev, dtype = tf. float32 )
[ 0.9180259704589844, 0.5390307903289795, 0.26683908700942993, -0.1410011351108551, -1.5267468690872192, 0.8197423219680786, 0.43559691309928894, 0.7018309831619263, -0.14363154768943787, 0.011905908584594727, -0.521159827709198, 0.12259219586849213, -0.22932924330234528, -0.7938742637634277...
async def revisions ( self, path, * * kwargs ) : prefix = path. full _ path. lstrip ('/') #'/'- >'','/ a / b'- >'a / b'query _ parameters = {'bucket': self. bucket. name,'prefix': prefix,'delimiter':'/'} url = self. connection. generate _ presigned _ url ('list _ object _ versions ', params = query _ parameters, expire...
[ 0.019242024049162865, 0.06278139352798462, 0.744301438331604, 0.15013615787029266, 0.05692819878458977, 0.554349958896637, -0.8779017925262451, 0.42835569381713867, 1.1574212312698364, 1.1707202196121216, -0.6438137292861938, 0.6938482522964478, -0.8044618368148804, -0.6755363941192627, ...
def process _ state _ info ( self, state ) : quickbotsupervisor. process _ state _ info ( self, state ) # the pose for controllers self. parameters. pose = self. pose _ est # update the trajectory self. tracker. add _ point ( self. pose _ est )
[ -0.39095380902290344, -0.1640579253435135, 0.3386353552341461, -0.5060664415359497, 0.5499075651168823, 0.2164502888917923, 0.4558583199977875, 0.7076436281204224, -0.06400318443775177, -0.6931570768356323, -0.7631589770317078, -0.46750733256340027, 0.6301518082618713, 0.6310293078422546, ...
def handle _ data ( handle, value ) : accelerometer = value x _ bytes = bytes ( [ accelerometer [ 0 ], accelerometer [ 1 ] ] ) y _ bytes = bytes ( [ accelerometer [ 2 ], accelerometer [ 3 ] ] ) z _ bytes = bytes ( [ accelerometer [ 4 ], accelerometer [ 5 ] ] ) x _ short = struct. unpack ('< h ', x _ bytes ) [ 0 ] y _ s...
[ 0.6612169742584229, -0.15279698371887207, 0.603227436542511, -0.29637548327445984, -0.502617597579956, 0.09998734295368195, 0.0015010327333584428, -0.6994370222091675, -0.14334067702293396, -0.7061256170272827, -0.68123859167099, 0.13970376551151276, -0.11217530071735382, -0.64226633310317...
def gen _ debug _ image _ and _ display ( resized _ frame, final _ mask, final _ result, anchor _ point _ overlay _ display _ img, ground _ truth _ output, wait _ time _ ms = 50 ) : white _ colour _ image = np. ones ( resized _ frame. shape, dtype = np. uint8 ) * 255 final _ mask _ colour = cv2. bitwise _ and ( white _...
[ -0.42124828696250916, -0.014315846376121044, 0.8314768671989441, 0.11773525178432465, 0.5544686913490295, -0.15394294261932373, 0.5495458841323853, -0.867265522480011, 0.14705801010131836, 0.2983669936656952, 0.6494058966636658, 0.5135149359703064, 0.06569565832614899, 0.638189971446991, ...
def doc ( doc _ id ) : docu = document. retrieve _ document ( doc _ id ) if not docu : abort ( 404 ) return render _ template ('doc. html ', page ='doc ', * * docu )
[ 0.7777414917945862, 0.5419418215751648, 0.3757106363773346, 0.6558643579483032, 0.0807858556509018, 0.06936377286911011, -0.1781691312789917, 1.095772624015808, 0.31534337997436523, -0.0861787497997284, 0.9210394620895386, 0.24531026184558868, 0.1906731128692627, 0.6906806230545044, -0.8...
def insert _ record ( self, device _ id, timestamp, measurements, data _ types, values ) : data _ types = [ data _ type. value for data _ type in data _ types ] request = self. gen _ insert _ record _ req ( device _ id, timestamp, measurements, data _ types, values ) status = self. _ _ client. insertrecord ( request ) ...
[ -1.1523339748382568, 1.8436000347137451, 0.5491755604743958, -0.02484104037284851, 1.2513991594314575, 0.706362247467041, 0.30581867694854736, -0.450655996799469, -0.3635670840740204, -0.4039517045021057, -0.5832899808883667, -0.03088057041168213, -1.2208812236785889, 0.5029066801071167, ...
def _ bell _ function _ table ( ) : bell _ function _ dict = dict ( ) # c - band m, a, b dbz _ dict = {'cr': ( - 2. 8, 12., 5. ),'ag': ( 17., 18. 1, 10. ),'lr': ( 1. 75, 29., 10. ),'rn': ( 39., 19., 10. ),'rp': ( 37., 9. 2, 5 ), # was 0. 8 originally'vi': ( - 1., 11., 5. ),'ws': ( 24., 21. 3, 10. ),'mh': ( 58. 18, 8., ...
[ 0.530539333820343, -0.5316349267959595, 0.9549582004547119, -0.5618390440940857, -1.187391757965088, -0.24422098696231842, 0.42520859837532043, -0.1587277352809906, -0.6411879658699036, 0.45703932642936707, -0.6154248714447021, 0.1363302320241928, -0.06203795224428177, 0.5877306461334229, ...
def plot _ timeseries _ tdep ( self, radius, theta, phi, * * kwargs ) : self. model _ tdep. plot _ timeseries ( radius, theta, phi, * * kwargs )
[ -1.1903759241104126, 0.8947188854217529, 0.19016997516155243, -1.2099350690841675, -0.2467372864484787, -0.02028600126504898, -0.533877968788147, -0.2617146372795105, -0.45294103026390076, 0.8688433766365051, 0.004136627074331045, 0.6334331631660461, 0.0040829903446137905, 0.09306275099515...
def _ forward ( self, i ) : # set bias and input self. i [ : - 1, 0 ] = i self. i [ - 1 :, 0 ] = self. bias # calculate hidden layer and set bias. # input potential u _ hidden is calculated by using the dot product of the # hidden layer's weights and the values from the network's input. # the results are passed to the ...
[ 0.0636516809463501, 0.062363650649785995, 0.4563394784927368, -0.33092552423477173, 0.06142565235495567, 0.30546891689300537, 1.4649326801300049, 0.34189191460609436, -0.5019779801368713, -0.3093665540218353, -0.7519958019256592, 0.33859995007514954, 0.7054526805877686, -0.4218365252017975...
def stoogeagent ( board, player ) : # collect open squares possiblemoves = [ ] for x in range ( len ( board ) ) : if board [ x ] = = consts. unowned : possiblemoves. append ( x ) # randomly choose open square return possiblemoves [ random. randint ( 0, len ( possiblemoves ) - 1 ) ]
[ -0.6699331998825073, -0.38546985387802124, 0.4956541061401367, -0.036405049264431, -0.7595915198326111, -0.04335569962859154, 0.8412594795227051, 0.04719442501664162, 0.5434427857398987, 0.5771991610527039, 0.26126402616500854, 0.3659784197807312, -0.4504241943359375, -0.6594662070274353, ...
def _ _ init _ _ ( self, name, id ) : self. _ _ name = name self. _ _ first _ field = playingfield. playingfield ( 16 ) self. _ _ second _ field = playingfield. playingfield ( 16 ) self. _ _ first _ player = id self. _ _ second _ player = none self. _ _ status = gamestatus. waiting # turn is either 1 or 2 from random i...
[ 0.27642664313316345, -0.3248804211616516, 0.8732067346572876, -0.21728484332561493, 0.024577850475907326, -0.1756744682788849, -0.4164876937866211, -0.5624260306358337, 0.07319045066833496, 0.19010064005851746, -1.2398720979690552, -0.2841353714466095, 0.2214743196964264, 0.214105680584907...
def test _ core _ files ( uri, filename, type _ hints ) : with requests _ mock. mocker ( ) as mock : # interdict network requests to retrieve data from the localized store instead. mock. get ( uri, content = read _ file ( filename ) ) results = datafy. get ( uri, type _ hints = type _ hints ) assert ok ( results ) expe...
[ -0.35020819306373596, 0.6634397506713867, 0.5157028436660767, -0.504801869392395, 0.9613564610481262, 0.27706634998321533, -0.29133662581443787, -0.029615815728902817, -0.6123076677322388, -0.2738165855407715, 0.04483923688530922, -0.19970831274986267, -0.7798412442207336, -0.3591103851795...
def topods _ compound ( * args ) : return _ topods. topods _ compound ( * args )
[ -1.002854824066162, 0.4876926839351654, 0.5421943068504333, 0.41520243883132935, 0.05710407346487045, -0.13445690274238586, 0.24552558362483978, -1.26851224899292, 0.016565609723329544, 0.1318015605211258, -0.03963557630777359, -1.0615029335021973, -0.5448295474052429, 0.09426134079694748,...
def choose _ who _ to _ vaccinate _ example ( graph : networkx. graph ) - > list : node2degree = dict ( graph. degree ) sorted _ nodes = sorted ( node2degree. items ( ), key = lambda item : item [ 1 ], reverse = true ) [ : 100 ] people _ to _ vaccinate = [ node [ 0 ] for node in sorted _ nodes ] return people _ to _ va...
[ -0.3228839933872223, -0.38096708059310913, 0.5264495611190796, 0.7122935056686401, -0.4729815721511841, -0.12857699394226074, -0.4200618863105774, 0.07837937772274017, -0.009061543270945549, 1.1473711729049683, -0.025119522586464882, 0.3659502863883972, 1.0970454216003418, -1.1440775394439...
def hubble _ constant ( self ) : return self. _ hubble _ constant
[ 0.43262308835983276, -0.6791421175003052, 0.4011848270893097, 0.7263100147247314, 0.305652916431427, 1.9987571239471436, 1.0590324401855469, 0.3072205185890198, -0.4730799198150635, 0.3787444829940796, 0.15224958956241608, -0.0855332687497139, -0.12576766312122345, -0.8729422688484192, 0...
def _ _ getitem _ _ ( self, idx ) : slide _ id = self. data _ df. image _ id. values [ idx ] if not self. use _ saved : image = openslide. openslide ( os. path. join ( self. image _ dir, f'{ slide _ id }. tiff') ) img = image. read _ region ( ( 0, 0 ), self. zoom _ level, image. level _ dimensions [ self. zoom _ level ...
[ -0.8364259004592896, 0.328815758228302, 0.4881305694580078, -0.17509008944034576, -0.12744708359241486, -1.1545147895812988, 0.4628084599971771, 0.13866126537322998, -0.09185092151165009, 0.07697278261184692, -1.0023701190948486, 0.07756859809160233, 0.5926892757415771, -0.1751769036054611...
async def post ( self ) : if " document " not in self. request. files : raise httperror ( 422, " need a document " ) document = self. request. files [ " document " ] [ 0 ] logging. info ( " uploaded file % s % s % i bytes " % ( document [ " filename " ], document [ " content _ type " ], len ( document [ " body " ] ) ) ...
[ -0.4932362139225006, -0.22603373229503632, 0.8476065397262573, -0.15455886721611023, -0.24980753660202026, -0.1523628681898117, -0.08975747227668762, 0.39338722825050354, -0.5950506329536438, -0.4647615849971771, 0.06868992000818253, -0.3338467478752136, -0.45506447553634644, 0.41393521428...
def _ _ init _ _ ( self, params, lr : float = 1e - 2, num _ burn _ in _ steps : int = 3000, noise : float = 0., mdecay : float = 0. 05, scale _ grad : float = 1. ) - > none : if lr < 0. 0 : raise valueerror ( " invalid learning rate : { } ". format ( lr ) ) if num _ burn _ in _ steps < 0 : raise valueerror ( " invalid ...
[ 0.37343764305114746, 0.3599199652671814, 0.9078102111816406, 0.6965885758399963, -0.031171614304184914, -0.39607158303260803, -0.9566812515258789, -0.08483544737100601, -0.35995420813560486, 0.09741171449422836, -0.11809292435646057, -0.20312468707561493, 0.21873965859413147, 1.28040564060...
def extract _ item _ from _ json ( self, json _ obj ) : pass
[ -0.7096205353736877, -0.9826062917709351, 0.3877923786640167, 0.5287373661994934, -0.7288507223129272, 0.3085859417915344, -0.11400003731250763, -0.5422977805137634, -0.019007476046681404, 0.24717020988464355, -0.9098958969116211, 0.0656057670712471, 0.30906981229782104, 0.0397081077098846...
def from _ buffer ( cls, buffer : pa. buffer, info : optional [ datasetinfo ] = none, split : optional [ namedsplit ] = none, indices _ buffer : optional [ pa. buffer ] = none, ) - > " dataset " : table = inmemorytable. from _ buffer ( buffer ) if indices _ buffer is not none : indices _ table = inmemorytable. from _ b...
[ 0.7499430179595947, 0.06643138825893402, 0.4055727422237396, 0.060380641371011734, -1.427990436553955, 0.12953336536884308, 0.01565409265458584, 0.03758493810892105, 0.7027655839920044, -0.9671428799629211, 0.09663014113903046, 0.10171151906251907, -0.3416922688484192, -0.8009227514266968,...
def push ( self, priority, item ) : if not isinstance ( priority, int ) : raise valueerror ( " priority must be an int " ) if priority not in self. queue : self. queue [ priority ] = [ ] self. queue [ priority ]. append ( item )
[ 0.12475039809942245, 0.41471627354621887, 0.4669256806373596, 0.2780804932117462, 0.5731180310249329, 0.5210105180740356, -1.8091012239456177, 0.1922852098941803, 1.0304011106491089, 0.772221565246582, -1.0593559741973877, 0.018172603100538254, -0.7410852909088135, 0.40264493227005005, 1...
def compute _ gradient _ lasso ( y, tx, w, lambda _ ) : n = int ( y. shape [ 0 ] ) e = y - tx. dot ( w ) return - ( np. transpose ( tx ). dot ( e ) ) / ( n ) + lambda _ * np. sign ( w )
[ 0.5961165428161621, 0.4400637447834015, 0.7306392788887024, -0.5264778733253479, -0.31597164273262024, 0.060435835272073746, 0.025728929787874222, 0.20486973226070404, -0.5235967040061951, 1.1411584615707397, -0.9776142239570618, 0.5175780057907104, 0.4573933184146881, 0.12235736846923828,...
def name ( cls ) : return " library _ content "
[ 0.42484569549560547, -1.815970778465271, 0.13115224242210388, -0.453337162733078, -0.03558649867773056, 1.3226902484893799, -0.2598927915096283, -0.2788504660129547, -0.37986427545547485, 0.4140550196170807, 0.04502818360924721, -0.6655415296554565, 0.07242915034294128, 0.34726670384407043...
def items ( self ) : # - > generator [ tuple [ unknown, any ] | tuple [ tuple [ unknown, unknown ], any ], none, none ] :...
[ -1.7021116018295288, 0.1851826161146164, 0.625937283039093, 0.21781013906002045, 0.4925176203250885, 0.32141128182411194, -0.21440444886684418, 0.127674400806427, -0.587753176689148, -0.9612166285514832, -0.6839843392372131, -0.5059114694595337, 0.26753610372543335, -0.49380794167518616, ...
def test _ diff _ of _ vectors ( self ) : self. assertequals ( [ 1, 1, 1 ], self. vector - vector ( [ 0, 1, 2 ] ) ) self. assertequals ( [ 1, 1, 1 ], self. vector - [ 0, 1, 2 ] ) self. assertraises ( nonnumericerror, self. vector. _ _ sub _ _, [ 1, 2,'a'] ) self. assertraises ( nonvectorerror, self. vector. _ _ sub _ _...
[ -0.7638154029846191, 0.225326806306839, 0.5464804768562317, 0.4965378940105438, 0.21390584111213684, 0.7116443514823914, 0.7515024542808533, -0.16307297348976135, -0.2696842849254608, -0.6614096164703369, -0.6100323796272278, -0.33905985951423645, 0.39649727940559387, 0.7778074145317078, ...
def _ check _ dps _ conn ( self, num _ trys = 3, wait = 10, restart = false ) : topo _ dps = self. _ cur _ topo. dpid _ table. keys ( ) t = 0 while t < num _ trys : con _ dps = map ( topolib. dpid _ to _ str, self. _ get _ con _ dps ( ) ) un _ con _ dps = list ( set ( topo _ dps ) - set ( con _ dps ) ) # all are connec...
[ -0.44221314787864685, 0.28568336367607117, 0.5513507723808289, 0.041470423340797424, 0.4038453698158264, -0.055761706084012985, -0.16484466195106506, 0.3584256172180176, -0.050325632095336914, 0.2293533831834793, -0.03204015642404556, -0.6842148900032043, -0.21276797354221344, -0.457674801...
def _ _ init _ _ ( self ) : self. _ root = none self. _ size = 0
[ -0.003565601771697402, -0.42990511655807495, 0.43333643674850464, -0.2987358570098877, 0.3600297272205353, -0.7590134739875793, 0.5051963925361633, 0.4896177649497986, 0.3437359929084778, -0.8031014204025269, -1.3108652830123901, 0.47328948974609375, -0.7210644483566284, 1.4072177410125732...
def setup ( self ) : self. app = create _ app ( " testing ", false ) self. app _ context = self. app. app _ context ( ) self. app _ context. push ( ) db. create _ all ( ) role. insert _ roles ( ) self. client = self. app. test _ client ( )
[ 0.7230789661407471, 0.2589242458343506, 0.5308989882469177, -0.03237885981798172, 1.6580572128295898, 0.543659508228302, 0.2593922019004822, -0.49309271574020386, 0.8092488050460815, 0.6869477033615112, -0.05221734568476677, -0.568193256855011, -0.41474270820617676, 0.35183650255203247, ...
def _ _ iter _ _ ( self ) : yield self. x yield self. y yield self. z yield self. w
[ -0.2027762085199356, -0.6196408867835999, 0.20386621356010437, -1.0590463876724243, 0.4605039656162262, 0.7959487438201904, 0.7153054475784302, -1.0285909175872803, -0.15470020473003387, -0.774734616279602, 0.2446095496416092, -0.09832002222537994, -0.09775615483522415, -0.0965458750724792...
def setup _ app ( globals _ dict = none ) : # check if we have a zope environment aka'app'mod = _ _ import _ _ ( _ _ name _ _ ) outer _ frame = sys. _ getframe ( 1 ) outer _ globals = outer _ frame. f _ globals if'app'in outer _ globals : return outer _ globals ['app'] elif globals _ dict and'app'in globals _ dict : re...
[ -0.08885132521390915, 0.010858814232051373, 0.770457923412323, 0.22296033799648285, -0.6942791938781738, 0.9046614170074463, 0.8991433382034302, 0.1855732798576355, 0.34731581807136536, 1.2318164110183716, 0.6507221460342407, 0.42282634973526, -0.7805706262588501, 0.5978475213050842, 0.4...
def showindicator ( self, on ) : if on : self. indicator. setcolor ( qcolor ( " green " ) ) else : self. indicator. setcolor ( qcolor ( " red " ) )
[ -0.06710969656705856, 0.05004696920514107, 0.5714890956878662, -0.5568887591362, -0.5808237195014954, 1.134053349494934, -0.4647939205169678, 1.3154093027114868, 0.6245388388633728, 0.9061525464057922, -0.20510156452655792, 0.22707070410251617, -0.13989193737506866, 1.130747675895691, -0...
def test _ parameterspacenorm ( ) : # parameterspacenorm = true # to check if the velocity is constant we can compare the speed ( the norm # of velocity ) in each step to the mean speed value over the entire steps. # if the velocity is constant, the speed in each step should be close # enough to the mean speed, where t...
[ 0.4808731973171234, -0.19213075935840607, 0.4058323800563812, 0.5032930374145508, 0.010827308520674706, 1.25911545753479, 0.27844464778900146, 0.3195800185203552, 0.33640506863594055, 0.3756871223449707, 0.6504738330841064, 0.5620695352554321, -0.5324019193649292, 1.102901577949524, -0.3...
def created _ date ( self ) : return self. _ created _ date
[ 1.4359660148620605, -0.18283376097679138, -0.0847359374165535, 0.8200823664665222, 1.3830915689468384, 1.1363465785980225, -0.12239737063646317, -0.10188993811607361, -0.07796552777290344, -1.9822298288345337, -0.3913986086845398, 0.5664184093475342, 0.5388638973236084, -0.1094458550214767...
def get _ svo ( self, tokens ) : svo _ pairs = [ ] # search svo for the root verb roots = list ( item for item in tokens if item. dep _ = = " root " and item. pos _ in self. verbs ) for root in roots : if self. is _ passive ( root ) : svo _ pairs. append ( self. extract _ passive _ svo ( root ) ) else : svo _ pairs. ap...
[ 0.10892797261476517, -0.28116777539253235, 0.7658096551895142, 0.7712400555610657, -0.6645909547805786, -0.5430453419685364, -0.34543684124946594, 0.3078761398792267, 0.05054882541298866, 0.5045331716537476, -0.5715171694755554, -0.87274569272995, -0.42577803134918213, 0.48503440618515015,...
def generateconfig ( _ ) : return " " " resources : - name : % s type : compute. v1. instance properties : machinesize : % s " " " % ( helpers. common. generatemachinename ( json. dumps ('myfrontend'). strip ('"'),'prod'), helpers. extra. common2. generatemachinesize ( ) )
[ -0.2782868444919586, 0.549404501914978, 0.5792547464370728, -1.4252853393554688, -0.754155695438385, 0.28794682025909424, -0.6201326251029968, 0.4465771019458771, -1.4677932262420654, 0.834652841091156, -0.08282902836799622, -0.08778449892997742, 0.22527723014354706, 0.5674506425857544, ...
def get _ stream _ mapping _ for _ value ( self, value : any ) : if self. stdin and self. stdin = = value : return mappediostream ( id = mappediostream. generate _ id ( " stdin " ), stream _ type = " stdin " ) if self. stdout and self. stdout = = value : return mappediostream ( id = mappediostream. generate _ id ( " st...
[ -0.5346733927726746, -0.6384904980659485, 0.6858368515968323, 0.1254163384437561, -0.3339352309703827, 0.4291563034057617, 0.25676289200782776, -1.654375672340393, 0.6927621960639954, -0.5245685577392578, 0.10939867049455643, 0.46489763259887695, -0.0027022117283195257, 1.22531259059906, ...
def network _ watcher _ name ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " network _ watcher _ name " )
[ 0.16600410640239716, -0.4246841371059418, 0.3633502125740051, -0.2021762877702713, -0.02191266044974327, 1.7916386127471924, 0.21377596259117126, -0.3224361836910248, -0.42146867513656616, -0.2141377478837967, -0.4210699200630188, 0.13186389207839966, 0.5960073471069336, 0.0224860198795795...
def insert _ aligned _ record ( self, device _ id, timestamp, measurements, data _ types, values ) : data _ types = [ data _ type. value for data _ type in data _ types ] request = self. gen _ insert _ record _ req ( device _ id, timestamp, measurements, data _ types, values, true ) status = self. _ _ client. insertrec...
[ -0.8084728121757507, 1.2919139862060547, 0.6152254939079285, -0.3579217791557312, 1.1503127813339233, 0.9512041211128235, 0.2678360939025879, -0.2965224087238312, -0.3849128484725952, -0.15942928194999695, -0.3710132837295532, -0.3376063108444214, -1.1772722005844116, 0.7537984848022461, ...
def command _ kickme ( self, bot : bot, update : update ) - > none : self. logger. info ( " / kickme command sent by % s ", self. _ log _ user ( update. message. from _ user ) ) target = update. message. from _ user bot. kick _ chat _ member ( chat _ id = self. config. group _ id, user _ id = target. id ) bot. unban _ ...
[ -0.2646748721599579, -0.7132546305656433, 0.6178354620933533, 0.6473672986030579, -0.503643810749054, 0.23316019773483276, 0.12662552297115326, 0.033769771456718445, -0.6478636264801025, 0.5817537307739258, -0.2867814600467682, 0.2404501587152481, -0.9314637780189514, -0.579022228717804, ...
def get _ entity _ actions ( self, uuid, * * kwargs ) : return self. request ( f'entities / { uuid } / actions ', * * kwargs )
[ -1.5812174081802368, -0.0284852534532547, 0.3465172350406647, 0.3646908402442932, 0.9684430360794067, -1.0163092613220215, -0.36079317331314087, -0.19712868332862854, 0.1366465538740158, 0.2524312436580658, -0.17797592282295227, 0.8836904168128967, -0.14982371032238007, 0.4018772542476654,...
def set _ inverting ( self, state ) : return self. set _ option ( 2, 0x01 if state else 0 )
[ -1.1652166843414307, 0.31061434745788574, 0.4648967981338501, 0.3998435139656067, 0.53603196144104, 0.5124243497848511, 0.44101518392562866, 0.46741050481796265, -0.12411974370479584, -0.22802390158176422, -1.3160265684127808, 0.08452297002077103, -0.9535877108573914, 0.12885259091854095, ...
def efficiency ( self ) : if self. average _ heart _ rate : return run. compute _ efficiency ( self. distance _ in _ meters ( ), self. heartbeats ( ) ) else : return 0
[ -0.5676013231277466, 0.6054060459136963, 0.29909899830818176, 0.5625931024551392, 0.7985110878944397, 0.5813112258911133, 0.4913676083087921, -0.31131476163864136, -0.6745020151138306, 0.42820224165916443, 0.7860082387924194, -0.17408907413482666, -0.6255655288696289, 0.47035881876945496, ...
def fragment _ decode ( pointer, prefix = " # ", output = tuple ) : segments = pointer. split ( " / " ) decoded = ( part _ decode ( unquote ( segment ) ) for segment in segments ) actual = next ( decoded ) if prefix! = actual : raise valueerror ( " expected prefix'{ } ', but was'{ }'". format ( prefix, actual ) ) retur...
[ -0.5410296320915222, -0.59005206823349, 0.2653835713863373, -0.42313456535339355, -1.0344173908233643, -1.4374953508377075, -0.4890768229961395, 0.01817402057349682, -0.19311098754405975, -0.1411566585302353, -0.07619419693946838, -0.9350202083587646, -1.0078389644622803, -0.94227647781372...
def hung _ ysb _ measure _ data ( cls, staff _ obj, date _ min = 0, date _ max = 0 ) : product _ list = [ 3 ] if isinstance ( staff _ obj, staff ) : staff = staff _ obj else : staff = staff _ obj. staff staff _ obj. ysb _ volume = 0 staff _ obj. ysb _ conversion _ rate = " 0 % " staff _ obj. ysb _ open _ number = 0 sta...
[ -0.2543654441833496, 0.17562994360923767, 0.898865282535553, 0.906541645526886, 0.2223517894744873, 0.9173541069030762, 0.253939688205719, -0.6008806824684143, -0.20384229719638824, -0.45896074175834656, -0.4093150794506073, 0.497950941324234, 0.13559748232364655, 0.9005270004272461, 0.1...
def fragment _ encode ( parts, prefix = " # " ) : encoded = ( quote ( part _ encode ( part ), safe = " / ~ " ) for part in parts ) return " / ". join ( chain ( [ prefix ], encoded ) )
[ 0.016770074144005775, -0.17193453013896942, 0.44548940658569336, 0.1456737220287323, -0.6558910012245178, -0.21158020198345184, -0.44583526253700256, -0.13854670524597168, 0.16193750500679016, 0.07678095996379852, 0.2236407846212387, -0.4560520648956299, -1.0951578617095947, -0.86076915264...
def _ add _ run ( run ) : if run. name not in _ state. runs _ by _ name : _ state. runs _ by _ name [ run. name ] = [ ] _ state. counts _ by _ name [ run. name ] = [ 0, 0 ] if _ is _ skipped ( run ) : _ state. counts _ by _ name [ run. name ] [ 1 ] + = 1 else : _ state. counts _ by _ name [ run. name ] [ 0 ] + = 1 if r...
[ -1.021041989326477, -0.004747730679810047, 0.5599963068962097, -0.4606758654117584, 0.559554398059845, -0.06086336076259613, 0.3805663585662842, -0.2326795607805252, 0.5659511685371399, 0.011872928589582443, -0.7023574709892273, 0.4497823715209961, 0.24920766055583954, 0.6399874091148376, ...
def loss _ function ( self, prbs, labels, mask ) : # note : you can reuse this from rnn _ model. loss = tf. keras. losses. sparse _ categorical _ crossentropy ( tf. boolean _ mask ( labels, mask ), tf. boolean _ mask ( prbs, mask ), from _ logits = false ) loss = tf. math. reduce _ mean ( loss ) return loss
[ -0.27844229340553284, 0.08554941415786743, 0.2387528270483017, 0.6864222288131714, 0.26797565817832947, 0.4700823426246643, 0.24019360542297363, 0.07380896806716919, -0.1875390261411667, 0.3830792307853699, 0.2096037119626999, 0.40390971302986145, -0.3659767508506775, -1.255159854888916, ...
def waittime ( self, write : bool = false ) : # take the previous requestsize in account calculating the desired # delay this time thisdelay = self. getdelay ( write = write ) now = time. time ( ) ago = now - ( self. last _ write if write else self. last _ read ) return max ( 0. 0, thisdelay - ago )
[ -0.4398007392883301, 0.28156307339668274, 0.6816208958625793, -0.028277164325118065, -0.08991017937660217, -0.08613128215074539, 0.3931506872177124, 0.4745754599571228, -0.6364027857780457, -0.6265336275100708, 0.8307546377182007, -1.2129181623458862, -1.2429239749908447, 0.217256799340248...
def dirichlet ( x, n ) : d = _ np. zeros ( x. shape, dtype = x. dtype ) k = x / / ( 2 * _ np. pi ) mask _ c2 = x / ( 2 * _ np. pi ) - k = = 0 mask _ c1 = _ np. logical _ not ( mask _ c2 ) d [ mask _ c1 ] = _ np. sin ( 0. 5 * n * x [ mask _ c1 ] ) / ( n * _ np. sin ( 0. 5 * x [ mask _ c1 ] ) ) d [ mask _ c2 ] = ( - 1. 0...
[ -0.1429443359375, 0.22620971500873566, 0.38390877842903137, -0.23941197991371155, -0.39464014768600464, 0.7230872511863708, -0.5419579744338989, -0.6914138793945312, 0.07827585190534592, 0.07058798521757126, -0.6070109605789185, 0.344154417514801, 0.3576025664806366, -0.18455931544303894, ...
def id ( self ) - > dict : return self. _ id
[ 0.04910309612751007, -0.9333086609840393, 0.18184256553649902, -0.6191052794456482, 0.03829839080572128, 0.6274195313453674, -0.2314043641090393, 0.2145671248435974, 1.089383602142334, -0.24536679685115814, -0.9146307706832886, 0.28209182620048523, -0.1442749798297882, -0.11497555673122406...
def getname ( self, username ) : with self. con : self. cur. execute ( " select realname from users where name ='" + username + "'; " ) name = self. cur. fetchall ( ) for na in name : for n in na : return n
[ -0.38311314582824707, 0.18718113005161285, 0.4085432291030884, 0.43011558055877686, -0.43388786911964417, -0.6131033897399902, 0.1381620317697525, -0.15756994485855103, -0.37317967414855957, 0.7794833779335022, -0.9616572260856628, -0.5777587890625, -0.7030814290046692, 0.4047662019729614,...
def _ _ handleholidays ( self ) : self. invitethemes = range ( len ( partyglobals. invitetheme ) ) if hasattr ( base. cr, " newsmanager " ) and base. cr. newsmanager : holidayids = base. cr. newsmanager. getholidayidlist ( ) if toontownglobals. valentines _ day not in holidayids : self. invitethemes. remove ( partyglob...
[ 0.15377216041088104, 0.07474734634160995, 0.30667418241500854, 0.036209385842084885, -0.2730030119419098, 0.5918429493904114, -0.40213775634765625, 0.395448237657547, 0.22332526743412018, 0.40967127680778503, -0.1724601686000824, -0.07626412808895111, -1.0043113231658936, 0.465581119060516...
def run ( ) : # construct the multivariate kernel densimeans, ty estimator graph - there's a bit of manual dependency injection here conf = mv _ kernel _ configuration. get _ configuration ( ) random = random _ behavior. random ( ) data _ generator = dg. gaussianmixture ( conf, random ) actuals = none if conf. fit _ to...
[ -0.4492183029651642, 0.1924433708190918, 0.7317477464675903, 0.04636191949248314, -0.1731790155172348, -0.4814077615737915, -0.15082062780857086, 0.6283837556838989, 0.05804397165775299, -0.1790609210729599, 0.6210839748382568, 0.5319430232048035, 0.07000038772821426, 0.3406621217727661, ...
def get _ service _ resources _ view ( request ) : service = ar. get _ service _ matchdict _ checked ( request ) svc _ res _ json = sf. format _ service _ resources ( service, db _ session = request. db, show _ all _ children = true, show _ private _ url = true ) return ax. valid _ http ( httpsuccess = httpok, content ...
[ -0.4045862853527069, -0.2538357973098755, 0.4204185903072357, -0.6526746153831482, -0.8306369781494141, -0.6081579923629761, 0.37070780992507935, -0.017295798286795616, 0.031395576894283295, -0.0855703055858612, 0.9823750853538513, 0.6024043560028076, 0.24929578602313995, 0.307860225439071...
def convert _ to _ resource ( obj, * args, * * kwargs ) : # handle model instances if isinstance ( obj, models. model ) : obj = model _ to _ resource ( obj, * args, * * kwargs ) # handle querysets elif isinstance ( obj, queryset ) : obj = queryset _ to _ resource ( obj, * args, * * kwargs ) # handle dict instances elif...
[ -0.6434944868087769, -0.01646428182721138, 0.6794277429580688, -0.1948240101337433, -0.09242131561040878, -0.28842365741729736, 0.3301313817501068, 0.03255004808306694, 0.5157535672187805, 0.40598705410957336, -0.7686818242073059, -0.5168347358703613, -0.42682820558547974, 0.38343572616577...
def _ which ( x, se, f ) : # get the index of the best score if callable ( f ) : return f ( x ) if f = = " min " : return np. argmin ( x ) if f = = " 1se " : " " " return the first score which exceeds the remaining ( higher penalized ) scores by at least 1 standard error. if none of the values exceed the most penalized...
[ 0.3677113652229309, -0.21536745131015778, 0.7274095416069031, 0.5379846692085266, -0.04970840737223625, -0.30062150955200195, 0.05342751741409302, -0.9698766469955444, -0.5834947824478149, 0.5639936923980713, 1.0525983572006226, 0.8254299759864807, 0.5726948976516724, -0.8899579048156738, ...
def first ( self ) : try : if self. _ first is none : self. _ first = self. take ( 1 ). list ( ) [ 0 ] return self. _ first except indexerror : raise valueerror ('empty dataset')
[ 0.523510754108429, 0.8373382091522217, 0.4587461054325104, -0.016133634373545647, 0.6113269925117493, -0.5622551441192627, -0.10981839150190353, 0.09775616228580475, 0.13095080852508545, -0.5852472186088562, 0.318148672580719, 0.4343236982822418, -0.37785568833351135, -0.14787708222866058,...
def get _ initializer ( self, init _ op, seed = none, init _ weight = none ) : if init _ op = = " uniform " : assert init _ weight return tf. random _ uniform _ initializer ( - init _ weight, init _ weight, seed = seed ) elif init _ op = = " glorot _ normal " : return tf. contrib. keras. initializers. glorot _ normal (...
[ 0.1703364998102188, -0.6756895184516907, 0.4684494137763977, 0.08267805725336075, -0.4989432692527771, 0.15537835657596588, 0.21067073941230774, 0.5739925503730774, 0.17420531809329987, -0.44297924637794495, -0.20061039924621582, 0.2534511089324951, -0.031042473390698433, -0.17494376003742...
def read _ from _ proccessout ( self ) : while self. alive : data = self. p. stdout. raw. read ( 1024 ). decode ('utf - 8') self. out _ queue. put ( data )
[ 0.5569804310798645, -1.1565734148025513, 0.7993836998939514, -0.6317101716995239, -0.1668427437543869, 0.3630995750427246, -0.47453492879867554, -0.3744637072086334, -0.9706093668937683, 0.147644504904747, 0.5794711709022522, 0.7432012557983398, -0.37384232878685, -0.42038610577583313, 0...
def preprocess _ df ( df, categorical _ columns ) : num _ cols = [ col for col in df. columns if col not in categorical _ columns ] res, means, stds = df _ standardize ( df, num _ cols ) res = to _ one _ hot ( res, categorical _ columns ) return res, means, stds
[ -0.2301749289035797, 0.9037232398986816, 0.41503703594207764, 0.3330445885658264, 0.7343379855155945, -0.44523710012435913, -0.2461053729057312, 0.5226314663887024, -0.37418076395988464, 0.36710086464881897, -0.07145138084888458, 0.6383041739463806, 0.3976702094078064, -0.4743238091468811,...
def plot _ radial _ proj _ prop ( props, snaps, rmax = 20, rmin = 0. 1, bin _ nums = 50, log _ bins = false, labels = none, foutname ='radial _ proj _ prop. png ', \ style ='color - linestyle ', include _ obs = true ) : # get plot stylization linewidths, colors, linestyles = plt _ set. setup _ plot _ style ( len ( snap...
[ 0.1633864939212799, 0.3040253818035126, 0.9567051529884338, 0.3182656466960907, -0.14585241675376892, 0.7923454642295837, 0.3244246542453766, -0.6355430483818054, 0.19250601530075073, -0.47905972599983215, 0.7968714237213135, 0.220570370554924, -0.015754150226712227, -0.3434559106826782, ...
def commands ( request ) : global light _ status # variable to know if the light connected in arduino is already on or not ( light switch ) if'search'in request : # if the user says'search'in their sentence search ( ) elif'what time is it'in request : # if the user says'what time is it'in their sentence time _ now = st...
[ -0.36333611607551575, -0.4960159361362457, 0.9322245121002197, 0.5505239367485046, 0.27136746048927307, 0.4042126536369324, -0.022191517055034637, -0.654291033744812, -0.27007678151130676, -0.6263553500175476, 0.16276974976062775, 0.009260383434593678, -0.24752715229988098, 0.3691014349460...
def has _ been _ generated ( self ) : if len ( self. _ maze ) > 0 and len ( self. _ maze [ 0 ] ) > 0 : return true else : return false
[ -0.7849292159080505, -0.0767996683716774, 0.6926029324531555, 0.21227452158927917, 0.9806661605834961, 0.3852483034133911, 0.5895142555236816, 1.2643988132476807, -0.5787598490715027, -0.5544458627700806, -0.7938668131828308, -0.776914656162262, -0.43717169761657715, 1.2259972095489502, ...
def calcultatelogprob ( self, * argv, * * kwargs ) : if ( kwargs [ " sd " ] is none ) : sd = kwargs [ " hyperstates " ] [ - 1 ] else : sd = kwargs [ " sd " ] current = kwargs [ " predict " ] ( argv [ 0 ], n = kwargs [ " n " ] ) for x in range ( len ( current ) ) : current [ x ] = tf. transpose ( current [ x ] ) realval...
[ -0.2904389202594757, 0.6141327619552612, 0.7945801019668579, 0.31305015087127686, -0.8774987459182739, 0.01260087639093399, -0.8351892828941345, 0.29937419295310974, -0.5880753993988037, 1.1656098365783691, -0.7958351373672485, 0.4922722578048706, 0.35585731267929077, 0.29721570014953613, ...
def main ( ) : game = input ( " do you want to play sudoku ( s ) or word ladder ( w )? " ) while game! = " s " and game! = " w " : print ( " that is not a valid input. " ) game = input ( " do you want to play sudoku ( s ) or word ladder ( w )? " ). lower ( ) if game = = " s " : view _ type = " text " g = sudokupuzzle (...
[ 0.28853973746299744, 0.49607381224632263, 1.0802602767944336, 0.660374104976654, -0.7339277863502502, 0.3994450867176056, 1.1158558130264282, -0.3389076590538025, 0.059310995042324066, 0.011941475793719292, 0.16459967195987701, 0.9336307048797607, -0.5616209506988525, 0.35990196466445923, ...
def iter _ pypi _ lines ( pypi _ project : str, create : bool = true ) - > iterable [ line ] : pypi _ project = pypi _ project. replace ( " _ ", " - " ) metadata = requests. get ( f " https : / / pypi. org / pypi / { pypi _ project } / json ", timeout = 300 ). json ( ) [ " info " ] package _ qid = get _ package _ qid (...
[ -0.18674534559249878, -0.17386086285114288, 0.5213913917541504, -0.15262119472026825, 0.7197308540344238, 0.6882296800613403, -0.47730299830436707, -0.39710429310798645, 0.2831888198852539, -0.5274676084518433, 0.4419611990451813, 0.08920768648386002, 0.32006949186325073, 0.749464988708496...
def run ( command _ line _ str, timeout _ sec, * * kwargs ) : if'stdout'in kwargs : raise valueerror ('stdout argument not allowed.') inputs _ args = shlex. split ( command _ line _ str ) process = subprocess. popen ( inputs _ args, stdout = subprocess. pipe, preexec _ fn = os. setsid, * * kwargs ) result = commandline...
[ 0.2825547158718109, -0.6719269156455994, 0.5809784531593323, 0.3206583261489868, -0.6361920237541199, -0.518748939037323, -0.7646426558494568, -0.3345291018486023, -0.6085533499717712, 0.22001293301582336, -0.4202992916107178, -0.22225956618785858, -0.30823415517807007, -0.4148601591587066...
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none ) - >'sharesubscription': opts = pulumi. resourceoptions. merge ( opts, pulumi. resourceoptions ( id = id ) ) _ _ props _ _ = dict ( ) _ _ props _ _ [ " created _ at " ] = none _ _ props _ _ [ " expiration _ ...
[ 0.2993367314338684, -0.09306834638118744, 0.6263108253479004, -0.22911997139453888, -0.33454322814941406, -0.2765022814273834, -0.08487123996019363, 0.07181870937347412, 0.5236717462539673, -0.005530946422368288, -0.794136106967926, 1.2033970355987549, -0.388086199760437, -0.65150928497314...
def count _ from _ top ( img ) : pixel _ count = 0 for row in img : unique _ pixel _ vals = np. unique ( row ) if 255 not in unique _ pixel _ vals : # ignore shading ( values between 0 - 255 ) pixel _ count + = 1 else : return pixel _ count
[ -0.5626293420791626, 0.4449938237667084, 0.5340157151222229, 0.14774560928344727, -0.8055405616760254, 0.2783605456352234, 0.9607652425765991, 0.2962774336338043, 1.1715589761734009, 0.5536777377128601, 0.2434229701757431, -0.07718144357204437, 0.529885470867157, 1.0706077814102173, -0.0...
def _ _ init _ _ ( self, parent : coin, puzzle _ hash : bytes32, amt : uint64, source : program ) : super ( ). _ _ init _ _ ( parent, puzzle _ hash, amt ) self. source = source
[ 1.3670499324798584, 0.882857084274292, 0.3676837384700775, -0.1833977848291397, -0.9138717651367188, 0.35451018810272217, 0.15840165317058563, 0.5014875531196594, 0.6368938088417053, 0.26348328590393066, -1.0422241687774658, 0.30708497762680054, 0.31032997369766235, 0.30785852670669556, ...
def test _ change _ requirement _ setting ( self ) : pass
[ -1.386100172996521, 0.44702595472335815, 0.2860250771045685, 0.5082019567489624, 0.00035452842712402344, -0.4567529559135437, 1.0627522468566895, 0.03607720881700516, 0.20455144345760345, 0.23823752999305725, -1.1026630401611328, 0.3234247863292694, -0.5890808701515198, 0.8683897256851196,...
def load _ snippet _ file ( self, snippet ) : # first thing is to check, wich files # are going to be used files _ and _ folders ='\ n '. join ( snippet. files _ and _ folders ) # there may be variables used in the paths path _ vars = self. find _ vars ( files _ and _ folders ) # files to be used for the template templ...
[ -0.20331774652004242, 0.19240890443325043, 0.6705199480056763, -0.45562565326690674, -0.738741934299469, -0.5126973390579224, 0.06511861830949783, 0.6381598711013794, -0.7122175693511963, 0.4265652596950531, -0.9920670390129089, -0.6050511002540588, -0.4346437454223633, 0.4826527535915375,...
def get _ market _ entities _ stats ( self, uuid ='market ', filter = none, * * kwargs ) : if filter : return self. request ( f'markets / { uuid } / entities / stats ', method ='post ', dto = filter, * * kwargs ) return self. request ( f'markets / { uuid } / entities / stats ', * * kwargs )
[ -1.1468989849090576, 0.9143202304840088, 0.37994223833084106, -0.6283233165740967, 0.03968370705842972, -0.3083282709121704, -0.4838445484638214, -0.5068170428276062, -0.370435893535614, -0.37625548243522644, 0.2011178880929947, 0.7691410779953003, -0.37061649560928345, 0.20337361097335815...
def receive _ dataset ( self, training _ dataset : trainingdataset ) : expansion _ service = duplicationservice ( training _ dataset, self. preference. general _ preference ) modification _ service = modificationservice ( self. preference. modification _ preference, self. progress _ bar _ delegate ) training _ dataset....
[ -0.7668320536613464, 1.2925142049789429, 0.5158432722091675, -0.8632763624191284, -0.14338119328022003, 0.29129478335380554, 0.03838998079299927, 0.0769190788269043, 0.4472677409648895, -0.9407429695129395, 0.33002644777297974, 0.7044060826301575, 0.1271374225616455, 0.4464188516139984, ...
def _ _ init _ _ ( self, type _, id _, name = none ) : self. type = type _ self. id = id _ if name is none : name = type _ self. name = name
[ -0.09638439118862152, -0.863544762134552, 0.662922739982605, 0.42625322937965393, 0.12718401849269867, -0.8125373125076294, -0.8238645792007446, -0.10366936028003693, 0.3103213906288147, 0.20391525328159332, -1.0555272102355957, 0.550850510597229, -0.19595393538475037, 0.7012598514556885, ...
def test _ it _ has _ all _ the _ fields ( self ) : data = {'owner': self. user. id,'name': " instance " } form = writeitinstancecreateformpopiturl ( ) self. assertin ( " name ", form. fields ) self. assertnotin ( " slug ", form. fields ) self. assertnotin ( " persons ", form. fields ) self. assertin ( " moderation _ n...
[ -0.29223111271858215, 0.14146806299686432, 0.44984593987464905, -0.3945673704147339, 0.5612792372703552, 0.773928165435791, -0.17403465509414673, 0.18527546525001526, -0.47221288084983826, -0.6576559543609619, -0.9675958156585693, -1.1820878982543945, -0.6367995142936707, -0.05974454060196...
def get _ diffusion _ coefficients ( d1, d2, r1, r2, frame _ duration, nframes ) : states = [ ] switch _ times = [ ] ds = np. zeros ( nframes ) if r1 = = 0 : ds [ : ] = d1 return ds lifetime = nframes * frame _ duration t = 0 # time in seconds if np. random. uniform ( ) < = r2 / ( r1 + r2 ) : # this is the equilibrium ...
[ -0.7614547610282898, 0.49217134714126587, 0.8264696598052979, -0.24094244837760925, 0.22246086597442627, -0.7916866540908813, 0.05778641626238823, -0.1424686312675476, 0.31200093030929565, 0.8060106039047241, -0.2626201808452606, 0.4819799065589905, 0.5516579747200012, 0.21349728107452393,...
def solve _ resolve ( expr, vars ) : objs, _ = _ _ solve _ for _ repeated ( expr. lhs, vars ) member = solve ( expr. rhs, vars ). value try : results = [ structured. resolve ( o, member ) for o in repeated. getvalues ( objs ) ] except ( keyerror, attributeerror ) : # raise a better exception for the non - existent memb...
[ -0.44292500615119934, 0.04265069216489792, 0.6935136914253235, -0.1605416089296341, 0.09795884042978287, -1.2380094528198242, -0.8984096050262451, 0.17910514771938324, -0.19470062851905823, -0.2501903772354126, -0.854975700378418, -0.20681534707546234, -0.22525081038475037, 0.0101285278797...
def preproc _ subtaskc ( df, df _ outer, cats, part _ task ) : # create nullmatrix matrix = np. zeros ( ( len ( df ), len ( cats ) ) ) opinions _ index = pd. dataframe ( matrix, columns = cats ) df _ long = pd. concat ( [ df, opinions _ index ], axis = 1 ) # fill opinions _ index for i in np. arange ( 0, len ( df _ lon...
[ -0.3288319408893585, 0.7373982667922974, 0.9395946264266968, -0.6450125575065613, -0.04764949157834053, -0.04862547665834427, -0.0683642104268074, 0.17206700146198273, -0.7687750458717346, 0.21749158203601837, 0.7658045291900635, -0.0918046161532402, 0.6677823662757874, -0.1270329207181930...
def dcl _ da ( cl _ data, re, alpha, h = 0. 01 ) : f = interpolate _ 2d _ linear ( dict _ fn = cl _ data, re = re, aoa = alpha ) f _ h = interpolate _ 2d _ linear ( dict _ fn = cl _ data, re = re, aoa = alpha + h ) return ( f _ h - f ) / h
[ 0.09300392121076584, -0.05764643847942352, 0.6020099520683289, -0.8336119055747986, -0.4663139581680298, 0.1319526582956314, 0.019990650936961174, 0.6202086806297302, -0.047628842294216156, -0.9023722410202026, 0.5185852646827698, -0.22207041084766388, 0.8887413740158081, -0.05081112310290...
def multivariate _ normal ( x, d, mean, covariance ) : x _ m = x - mean return ( 1. / ( np. sqrt ( ( 2 * np. pi ) * * d * np. linalg. det ( covariance ) ) ) * np. exp ( - ( np. linalg. solve ( covariance, x _ m ). t. dot ( x _ m ) ) / 2 ) )
[ -0.4729349911212921, 0.0915374681353569, 0.5808465480804443, 0.02627384290099144, -1.8401285409927368, -0.1661539226770401, -0.8070128560066223, 0.7124980688095093, 0.1971396654844284, 0.7503933310508728, -0.043610263615846634, 0.44785967469215393, -0.06991461664438248, -0.5164689421653748...
def convert _ output _ vector ( convert _ list ) : output = [ ] for result in convert _ list : output. append ( result. index ( max ( result ) ) ) return output
[ -1.6402747631072998, -0.8915108442306519, 0.6611618399620056, 1.1179094314575195, 0.6480387449264526, -0.6094104051589966, 0.5570105314254761, 0.151702418923378, 0.5100539922714233, 0.03351295739412308, -0.9591802358627319, -0.3063393235206604, 0.031207039952278137, 0.2221672534942627, -...
def get _ vcf _ coords ( self, transcript = none ) : chrom, start, end = self. get _ coords ( transcript ) # inserts and deletes require left - padding by 1 base if self. mutation _ type in ( " = ", " > " ) : pass elif self. mutation _ type in ( " del ", " ins ", " dup ", " delins " ) : # indels have left - padding. st...
[ -0.8135880827903748, -0.20623880624771118, 0.5984067916870117, 0.6463396549224854, 0.00737775769084692, -0.5795743465423584, 0.10234253108501434, -0.12528613209724426, -0.6135857105255127, 0.40200576186180115, -0.6279820799827576, 0.29862651228904724, -0.9204355478286743, -0.50027114152908...