text
stringlengths
25
2.19k
embedding
listlengths
768
768
def black _ check ( session, dilibraries = dilibraries ) : session. log ( f'run black _ check for { lib _ name }') standard _ di _ black _ check ( session, dilibraries = dilibraries )
[ -0.6724201440811157, -0.3295462429523468, 0.2457587867975235, 0.9347679615020752, 0.23027248680591583, -0.3624359965324402, 0.556334912776947, 0.3495965301990509, 1.2224438190460205, 0.21454524993896484, 0.0821220725774765, 0.2106868028640747, 0.3636978566646576, 0.39547833800315857, 0.5...
def min ( self, start = 0, end = none ) : return super ( minsegmenttree, self ). reduce ( start, end )
[ -0.7076892256736755, -0.5929464101791382, 0.4776296615600586, 0.5090882778167725, 0.5931712985038757, -0.4669662415981293, -0.4861719608306885, -0.19682320952415466, 0.04856394603848457, -0.7360864281654358, -0.17854997515678406, -0.2761077284812927, -1.0034253597259521, 0.3689566850662231...
def load _ more _ reviews _ url ( review _ page, data _ ajaxurl ) : load _ more = review _ page ( '. load - more - data') data _ key = load _ more. attr ('data - key') if data _ key is none : return none data _ url = imdb _ url + data _ ajaxurl + '? ref _ = undefined & paginationkey ='+ data _ key return data _ url
[ -0.4656059145927429, -0.12587769329547882, 0.41270381212234497, -0.7139691710472107, 0.2705267369747162, -0.027338676154613495, -1.3888206481933594, 0.11016350239515305, -0.3595108389854431, 0.474723219871521, 0.037447888404130936, 0.47544655203819275, -0.12505647540092468, 0.9536875486373...
def get _ enum ( self, enum ) : curves = [ ] for afmdata in self. _ mmlist : if afmdata. enum = = enum : curves. append ( afmdata ) if len ( curves ) = = 0 : raise keyerror ( f " could not find dataset with enum'{ enum } '! " ) elif len ( curves ) = = 1 : return curves [ 0 ] else : raise valueerror ( f " multiple curve...
[ -0.2979697287082672, -0.05482583865523338, 0.508945882320404, -0.5674721002578735, 0.008389994502067566, -0.0757644847035408, -0.46010100841522217, -0.9779098033905029, 1.2119736671447754, 0.1842658668756485, 1.3340919017791748, 1.5008859634399414, -0.0795724093914032, 0.7295337915420532, ...
def configure ( self, servers ) : nodes = [ ] log. debug ( " configuring servers { 0 } ". format ( servers ) ) # format server info into a dict for server in servers : nodes. append ( {'name': server. name,'ip': server. ip } ) # create the inventory file inventoryfile. create ( self. _ inventory _ path, nodes ) # run a...
[ -1.3205859661102295, -0.1227235496044159, 0.4858742952346802, 0.38389307260513306, 0.4292420744895935, 0.3853992819786072, 0.13918913900852203, -0.3195146918296814, -0.7379027605056763, 0.8974195718765259, -0.6842055916786194, -0.022083723917603493, -0.31253573298454285, -0.046613596379756...
def _ bnd _ hub ( self, n, hub ) : # index of face ( up or down ) face = 4 if hub = ='hub'else 5 # the easy part for attr in self. components ( ) : n. addtopologyset ( hub, ( flatten _ objects ( getattr ( self, attr ) ),'face ', face ) ) # utility function for adding edges edge _ add = 2 if hub = ='antihub'else 0 def e...
[ -0.1567532867193222, -0.6449533700942993, 0.8235152363777161, -0.30552810430526733, 0.1621563732624054, 0.8527971506118774, 0.26959964632987976, -0.21915002167224884, 0.6017088294029236, -0.3746376931667328, 0.5733925104141235, 0.3768094480037689, -0.669428288936615, 0.19863688945770264, ...
def _ handle _ create ( databases, database, force, output _ type, include, exclude ) : if database = ='-': # must write bytes to stdout ; use sys. stdout. buffer. fd = sys. stdout. buffer elif not force and os. path. exists ( database ) : raise fileexistserror ( f'the file { database } already exists! use - - force to...
[ 0.3036879003047943, 0.26212868094444275, 0.6536756753921509, 0.3825693726539612, 0.8643527626991272, 0.22814244031906128, 0.20674832165241241, 0.3287496566772461, -0.18176965415477753, -0.011218427680432796, 0.18317857384681702, 0.12630189955234528, -0.5208876132965088, 0.5684625506401062,...
def read _ xyz ( self, eleme1, eleme2, clay, clayao, perion ) : num _ h2o = 0 water _ o = [ 0 ] * 3 while 1 : line = self. file. readline ( ) if line : linesep = line. split ( ) if linesep [ 0 ]! = " item : " : if linesep [ 0 ] in self. ele1 : water _ o [ num _ h2o % 3 ] = [ float ( linesep [ 1 ] ), float ( linesep [ 2...
[ 0.03475305810570717, -0.8576700687408447, 0.9318820238113403, 0.34698233008384705, -0.04175984859466553, 0.7608471512794495, 0.5615701675415039, 0.06786905229091644, -0.5827598571777344, -0.06557505577802658, 0.2613665461540222, 0.12182590365409851, -0.636629045009613, 0.16548293828964233,...
def create _ logger ( level ='debug ', handler _ type ='stream ', path ='' ) : # recover the associate value to the specified level level _ value = getattr ( logging, level, 0 ) logger = logging. getlogger ('simple _ example') logger. name = " _ name _ " logger. setlevel ( level _ value ) # create the handler depengin ...
[ 0.0481979176402092, -1.2109447717666626, 0.7503076195716858, -0.6607189178466797, -0.40201669931411743, -0.027704140171408653, -0.6280436515808105, -0.22399203479290009, -0.781498372554779, -0.9037493467330933, -0.1479281187057495, 0.3373696804046631, -0.17492815852165222, 1.04259216785430...
def array ( self ) : return np. array ( self. value )
[ -0.3313851058483124, -1.4523625373840332, 0.35156017541885376, -0.4320402145385742, 0.7746009230613708, 0.786932647228241, -0.2602441906929016, -0.4813541769981384, 0.02490805834531784, -0.1740230768918991, -0.09629487991333008, 1.66154944896698, -0.009391200728714466, 0.31536445021629333,...
def _ ensure _ leading _ sample _ dim ( arr, sample _ dim = 0 ) : if is _ xarray _ object ( arr ) and is _ integer ( sample _ dim ) : # find name of dimension corresponding to integer # axis dimension. dims = list ( arr. dims ) axis _ nums = [ arr. get _ axis _ num ( d ) for d in dims ] sample _ dim = dims [ axis _ num...
[ 0.9664545655250549, -0.39506658911705017, 0.9009658098220825, 0.3370193541049957, -0.675381064414978, -0.16690562665462494, 0.9550878405570984, -0.7312222123146057, 1.1745753288269043, 0.7276557087898254, 0.9779086112976074, 0.45244503021240234, 0.021222559735178947, 0.4912119209766388, ...
def _ get _ driver ( self, mocked _ browser ) : driver = splinterbrowserdriver ( ) driver. _ browser = mocked _ browser return driver
[ -0.6191487312316895, -0.43637529015541077, 0.13762855529785156, 0.792497992515564, 0.17149372398853302, -0.39351266622543335, 0.566551148891449, 0.38607534766197205, 0.7557396292686462, 0.4657258093357086, -0.34680095314979553, -0.09282470494508743, -0.6210212707519531, 0.19883643090724945...
def find _ material ( self, mat : union [ int, str, material ] ) : if isinstance ( mat, int ) : return self. find _ material _ from _ id ( mat ) elif isinstance ( mat, str ) : return self. find _ material _ from _ name ( mat ) elif isinstance ( mat, material ) : return mat
[ -0.07562585175037384, -0.6795486807823181, 0.30346474051475525, 0.11464674770832062, -0.6939707398414612, 0.5019690990447998, -0.8340255618095398, -1.7535948753356934, 0.2815821170806885, -0.252215713262558, 1.4995113611221313, 0.7816018462181091, -1.1308550834655762, 0.4917933940887451, ...
def get _ clone _ expression ( self, define ='v _ j _ cdr3') : clone _ expression = { } for i in self. data : vgene = i ['vgene'] jgene = i ['jgene'] cdr3 = i ['cdr3'] count = i ['count'] expression = count / self. total if define = ='v _ j _ cdr3': index ='_ '. join ( [ vgene, jgene, cdr3 ] ) elif define = ='cdr3': in...
[ -0.0035339451860636473, 0.11802589893341064, 0.6269789934158325, 0.1250327080488205, -1.2916947603225708, -0.4804399311542511, -0.3079340159893036, -0.0316806435585022, -0.3473043739795685, 1.4394328594207764, -0.6933442950248718, 0.8422684073448181, 0.04974678158760071, -0.421658724546432...
def exit ( self, error ) : self. error = error exit ( error )
[ -0.03887258470058441, -0.17624318599700928, 0.06131955608725548, 1.020373821258545, 0.1412443220615387, 0.8951681852340698, 0.19476227462291718, 0.3054124414920807, 0.13802126049995422, 0.19393256306648254, -0.6321879029273987, -0.3450588881969452, -0.3049130141735077, 1.0384166240692139, ...
def get _ md _ entry ( db, entry, bibfile, add _ comments = true ) : md _ str = " " md _ str + = " - * * " + entry ['title'] + " * * " md _ str + = ", ( " + entry ['year'] + " ) " if'url'in entry. keys ( ) : md _ str + = " [ [ paper ] ] ( " + entry ['url'] + " ) " md _ str + = " [ [ bib ] ] ( " + create _ bib _ link ( ...
[ 0.4458064138889313, -1.0446223020553589, 0.8596201539039612, -0.8628022074699402, 0.28837037086486816, 0.0751170814037323, -1.0440211296081543, 0.4970535337924957, -0.208489328622818, 0.5028836727142334, 1.1028872728347778, 0.2986714541912079, -0.1357705444097519, 0.10022994875907898, -0...
def testpubmedfieldblanksearch ( self ) : form = self. form form. enter _ value ('accids ','j : 23094') form. click _ search ( ) # finds the results table and iterates through the table table _ element = self. driver. find _ element ( by. id, " resultstable " ) table = table ( table _ element ) # finds the pmid column ...
[ 0.31903088092803955, 0.9438530206680298, 0.355880469083786, 0.20627692341804504, 1.4664007425308228, 0.8074500560760498, 0.4637504816055298, -0.17300276458263397, -0.18741008639335632, -1.2264608144760132, 0.380260169506073, 0.13624083995819092, -1.4097285270690918, -0.2581993341445923, ...
def creation _ timestamp ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " creation _ timestamp " )
[ 1.0329196453094482, 0.4307679831981659, 0.26595041155815125, 0.4773792028427124, 1.4624977111816406, 1.340254783630371, -0.061906080693006516, -0.22112679481506348, 0.39736902713775635, -0.2674579322338104, 0.060288313776254654, 0.2894696891307831, 0.6809579730033875, -0.9068369269371033, ...
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : optional [ accountargs ] = none, opts : optional [ pulumi. resourceoptions ] = none ) :...
[ 0.5057005286216736, 0.13013365864753723, 0.4714255928993225, -0.10680839419364929, 0.37699219584465027, 0.020134862512350082, 0.759943962097168, 0.19188255071640015, 1.1436806917190552, -0.2571299374103546, 0.19280588626861572, 0.9609778523445129, 0.6759878396987915, -1.114020824432373, ...
def imag ( input, name = none ) : with ops. name _ scope ( name, " imag ", [ input ] ) as name : input = ops. convert _ to _ tensor ( input, name = " input " ) if input. dtype. is _ complex : return gen _ math _ ops. imag ( input, tout = input. dtype. real _ dtype, name = name ) else : return array _ ops. zeros _ like ...
[ -1.2840635776519775, 0.2961193025112152, 0.6008889079093933, 0.8089876770973206, -0.8652726411819458, 0.26110604405403137, 0.7896221876144409, -0.4159708023071289, 0.3348194360733032, 0.33053404092788696, -0.093475341796875, 0.5642994046211243, 0.2596490979194641, -0.714562177658081, 0.4...
def is _ prime ( n ) : prime = true for num in range ( 2, int ( n * * 0. 5 ) + 2 ) : if n % num = = 0 : prime = false break return prime
[ -0.6431719064712524, 0.29755899310112, 0.05252363905310631, 0.5740281343460083, 0.5170313119888306, -0.293171226978302, -0.7359169721603394, -0.631659746170044, 0.5019009113311768, -0.7768341898918152, -0.2928640842437744, -0.8261990547180176, -1.2825804948806763, 0.3240864872932434, -0....
def _ gridsearch ( self, x, y ) : self. model _ = gridsearchcv ( estimator = self. _ estimator, param _ grid = self. _ param _ grid, scoring = self. _ scoring, n _ jobs = self. _ n _ jobs, cv = self. _ cv, refit = self. _ refit, verbose = self. _ verbose ) self. model _. fit ( x, y ) # save key cv results on attributes...
[ -0.5660697817802429, -0.14108960330486298, 0.6196834444999695, 0.4021855592727661, 0.9389667510986328, -0.07054077088832855, -0.5504659414291382, -0.3904084265232086, -1.017128825187683, 0.11302873492240906, -0.2350892871618271, 0.3974199891090393, 0.7055216431617737, 0.33468738198280334, ...
def send ( self, request, pk = none ) : receiver = user. objects. get ( pk = pk ) message = chatmessage ( sender = request. user, receiver = receiver, text = request. data. get ('text') ) message. save ( ) return response ( { " code " : 1 }, status = status. http _ 201 _ created )
[ -1.0036283731460571, 0.6567415595054626, 0.6382268071174622, 0.23992829024791718, -0.1634306162595749, 0.22565796971321106, -0.19184035062789917, -0.31264442205429077, -0.3977199196815491, -0.3857159912586212, -1.024025559425354, -0.36441770195961, -0.1811722069978714, 0.3752458095550537, ...
def generate ( self, x : np. ndarray, y : optional [ np. ndarray ] = none, * * kwargs ) - > np. ndarray : mask = kwargs. get ( " mask " ) x _ adv = x. astype ( art _ numpy _ dtype ) y = check _ and _ transform _ label _ format ( y, self. estimator. nb _ classes ) if y is none : y = get _ labels _ np _ array ( self. est...
[ -0.7781220078468323, -0.3271275460720062, 1.0858707427978516, 0.5981212258338928, 0.4941631257534027, 0.1766364872455597, 0.05392301827669144, -0.5153751373291016, 0.050831351429224014, 0.5611405968666077, 0.24357722699642181, 0.748450517654419, 0.5672898888587952, -0.09690665453672409, ...
def command _ blog ( self, brain, arg ) : pattern = " ". join ( arg ) blog _ re = re. compile ( '. * % s. *'% pattern, re. i ) url = " http : / / sa. seoblogs. ops. yahoo. net / feed / " content = self. fetchurl ( url ) rss = xml. etree. elementtree. fromstring ( content. read ( ) ) channel = rss. find ( " channel " ) ...
[ -0.053036026656627655, 0.4209296405315399, 0.8268508315086365, -0.313367635011673, 0.47981932759284973, 0.1970168650150299, -0.30623331665992737, 0.10283228009939194, -0.14019529521465302, 0.9461425542831421, -0.23140211403369904, 0.7865394353866577, 0.03418433666229248, -0.372267752885818...
def testsendrequestconnectionerror ( self ) : self. client. sock. connect _ fail = true self. assertequal ( self. client. send _ request ( 9 ), ( 400, 2 ) )
[ -0.7298663258552551, 0.4470278322696686, 0.5125942230224609, 0.45725277066230774, 0.9458673596382141, 0.6644687652587891, -0.9746496081352234, -0.7712714076042175, -0.6421915292739868, -0.3833209276199341, 0.09493669867515564, 0.17420552670955658, -0.3204878270626068, 0.03096945583820343, ...
def load _ hr _ config ( config ) : logger = logging. getlogger ( _ _ name _ _ ) start _ hr = 8 end _ hr = 23 section _ name = " start _ end " if section _ name in config. sections ( ) : start _ hr _ config = config [ section _ name ]. get ( " start _ hr " ) if start _ hr _ config : logger. debug ( f " using start hr f...
[ -0.11018100380897522, -0.6029056906700134, 1.0661380290985107, -0.04155660793185234, -0.48581209778785706, 0.49925145506858826, -0.29094335436820984, 0.7859969139099121, -0.9002022743225098, 1.3075658082962036, -0.5373625159263611, -0.11721930652856827, -0.389133483171463, 1.12940526008605...
def temporalblock ( input _ layer, out _ channel, filter _ size, stride, dilation _ rate, counters, dropout, use _ highway = false, gated = false, reuse = false, normalization ='weight _ norm ', is _ training = false, init = false ) : keep _ prob = 1. 0 - dropout in _ channel = input _ layer. get _ shape ( ) [ - 1 ] na...
[ 0.5417783856391907, 0.09457812458276749, 0.9269474148750305, 0.5258576273918152, -0.5747424960136414, -0.016615912318229675, 0.6591420769691467, 0.10604541748762131, -0.26805466413497925, 0.9700026512145996, 0.15413224697113037, 0.3936869502067566, 0.07791855931282043, 0.23879805207252502,...
def get _ gene _ expression ( self, gene _ class, normailze _ by _ gene _ length = false, drop _ allele _ info = true, gene _ segment _ reference _ dirpath ='/ users / nstrauli / data / ref _ seqs / ig / from _ imgt _ appended / human /') : # check if gene _ class is a string ( i. e. singular ) if isinstance ( gene _ c...
[ -0.3041384220123291, -0.35678255558013916, 0.7899559736251831, -0.27715957164764404, -0.6597846746444702, -0.6487864851951599, 0.36501309275627136, 0.7613755464553833, -0.9381421804428101, 0.8982412815093994, -0.4416099190711975, 0.2510843276977539, 0.05337955057621002, 1.0199271440505981,...
def test _ atomic _ base64 _ binary _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 2. xsd ...
[ 0.052868664264678955, -0.5535570383071899, 0.3351438045501709, 1.4453903436660767, -0.219434455037117, -0.03603001683950424, -0.2975959777832031, -0.12185849249362946, -0.43813395500183105, 0.3110494911670685, -0.7011708617210388, 0.4388639032840729, 0.041284650564193726, 0.431615144014358...
def test _ atomic _ base64 _ binary _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ pattern _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - pattern - 2. xsd ", instance ...
[ -0.13395331799983978, -0.7268841862678528, 0.49077606201171875, 1.3733856678009033, 0.10018589347600937, -0.11765603721141815, 0.32352790236473083, -0.3477148711681366, -0.5875995755195618, 0.13711188733577728, -0.4798896014690399, 0.27251753211021423, -0.3744339346885681, 0.39860171079635...
def find _ k _ closest _ elements _ to _ pivot ( input _ numbers : list [ int ], k : int, pivot : int ) - > list [ int ] : if len ( input _ numbers ) < k : raise runtimeerror ('there is not enough input numbers in { } to return { } elements. '. format ( input _ numbers, k ) ) else : number _ lists _ by _ distances : di...
[ 0.18336935341358185, -0.23150299489498138, 0.5719181895256042, 0.524061381816864, -0.1891261488199234, 0.6768847703933716, 0.1685171127319336, 0.050834085792303085, 0.2808617055416107, 0.9027746319770813, -0.3339366614818573, -0.5299829244613647, -0.6743664741516113, 0.4554117023944855, ...
def css2xpath ( css ) : sel = scrapy. selector ( ) return sel. _ css2xpath ( css )
[ -0.8453068137168884, -0.341943621635437, 0.41913190484046936, 0.0760858878493309, -0.036013275384902954, 0.001303371274843812, 0.44683846831321716, -0.5327045321464539, 1.5153563022613525, 0.7331788539886475, -0.18327932059764862, -1.2907496690750122, 0.9345090985298157, -1.221222281455993...
def moore _ penrose _ pinv ( x, num _ iter = 6 ) : abs _ x = torch. abs ( x ) col = abs _ x. sum ( dim = - 1 ) row = abs _ x. sum ( dim = - 2 ) z = x. transpose ( - 1, - 2 ). contiguous ( ) z = z / ( torch. max ( col ) * torch. max ( row ) ) i = torch. eye ( x. shape [ - 1 ], device = x. device ). unsqueeze ( 0 ) for _...
[ -0.6253666877746582, 0.15275704860687256, 0.5060814619064331, 0.05435113236308098, -1.3101081848144531, 0.2167390137910843, 0.03321559354662895, -0.4939400255680084, 0.37301716208457947, 0.7635310888290405, -0.16209383308887482, -0.5045520663261414, -0.4380711317062378, -0.6853259205818176...
def get _ status ( self ) : return self. _ request ('get ','/ status')
[ -1.1355594396591187, -0.028607062995433807, 0.2121420055627823, 1.1645241975784302, 0.7761155962944031, -0.27919846773147583, -1.3946423530578613, -0.008621457032859325, 0.19575293362140656, -0.6965874433517456, -0.7743282914161682, 0.9571868181228638, -0.6212148666381836, -0.0969923660159...
def bias ( measured, observed ) : assert len ( measured. shape ) = = 2, " need 2 - d input " assert len ( observed. shape ) = = 2, " need 2 - d input " if measured. shape! = observed. shape : print ( f " regrid required. will interpolate observed { observed. shape } to measured grid { measured. shape }. " ) observed = ...
[ -0.04547358676791191, 0.5637542605400085, 0.6230036020278931, -0.14089623093605042, 0.4280639588832855, 0.6072895526885986, 0.5472570061683655, -0.0937146246433258, -0.6390846967697144, 0.33088448643684387, 0.02524612657725811, 1.8957253694534302, -0.24888025224208832, -0.06754625588655472...
def database ( self ) : return self. m _ database
[ -0.498508483171463, -0.3033283054828644, 0.00691137695685029, 0.714989185333252, -0.1634494662284851, 0.836552619934082, 0.4536580741405487, 0.03666593134403229, 1.0066205263137817, -0.9510956406593323, 0.5906913876533508, 0.4717610776424408, -1.0208791494369507, 0.049840789288282394, -0...
def id ( self ) - > int : return self. member. id
[ 1.0989880561828613, -0.75677490234375, 0.28921279311180115, 0.2719751298427582, 0.9392532706260681, 0.8115599751472473, 0.0961880013346672, 0.4592176377773285, 0.40738561749458313, -1.0012915134429932, -0.30352213978767395, 0.7655689716339111, -1.3169764280319214, -0.004633230157196522, ...
def squashrngcython ( rng, apermol ) : if not checksymmetry ( rng ) : raise runtimeerror ( " graph is non - symmetrical " ) sh = rng. shape rng = rng. toarray ( ) newsh = ( int ( sh [ 0 ] / apermol ), int ( sh [ 1 ] / apermol ) ) # pdb. set _ trace ( ) # molrng = lil _ matrix ( newsh ) molrng = np. zeros ( newsh ) molr...
[ 0.22420534491539001, -0.4313937723636627, 0.431289404630661, -1.1373153924942017, -0.025325659662485123, -0.19152018427848816, 0.08758703619241714, -0.6665154695510864, 0.5078822374343872, 0.3316674828529358, -0.15809114277362823, 0.06721843779087067, 0.23180778324604034, -0.25135096907615...
def segment _ data ( data, example _ size, seq _ len ) : data = ( data - sum ( data ) / len ( data ) ) / ( max ( data ) - min ( data ) ) num _ seq = int ( len ( data ) / ( example _ size * seq _ len ) ) data = data [ : num _ seq * seq _ len * example _ size ] return np. array ( data ). reshape ( num _ seq, seq _ len, e...
[ 0.47093120217323303, -0.010898182168602943, 0.5299288630485535, -0.4348641037940979, 0.25798600912094116, -0.0016110597644001245, -0.11690547317266464, 0.16965645551681519, 1.0309944152832031, 0.5593257546424866, -0.6314949989318848, 0.29780271649360657, -0.2772008180618286, -0.24901752173...
def delete ( self, bucket _ name : str, object _ name : str ) - > none : client = self. get _ conn ( ) bucket = client. bucket ( bucket _ name ) blob = bucket. blob ( blob _ name = object _ name ) blob. delete ( ) self. log. info ( " blob % s deleted. ", object _ name )
[ 1.105180263519287, -1.1008524894714355, 0.6508085131645203, 0.43617838621139526, 0.28021755814552307, 0.6105361580848694, -0.5599589943885803, -0.25938257575035095, -0.49667462706565857, 0.5243266820907593, -1.3433305025100708, 1.20689058303833, 0.1594918966293335, -1.1815388202667236, 0...
def comp _ external _ contour ( orig, thresh ) : # get the dimension and color channel of the input image img _ height, img _ width, img _ channels = orig. shape # initialize parameters trait _ img = orig. copy ( ) area = 0 w = h = 0 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ...
[ 0.8456738591194153, -0.45081472396850586, 1.1209367513656616, 0.2087433636188507, -0.5232536792755127, -0.5619611144065857, 0.8630266785621643, 0.46924862265586853, 0.27040916681289673, 0.7044370174407959, -0.9503408074378967, 0.11877772212028503, 0.4801499545574188, 0.859976053237915, 0...
def itksubtractconstantfromimagefilteriul3diul3 _ superclass _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilteriul3diul3 _ superclass _ cast ( * args )
[ 0.7455698251724243, 0.9262672066688538, 0.7379661798477173, -0.3801816701889038, -0.9738302230834961, 1.174911618232727, -0.4389187693595886, 1.1345714330673218, 0.40666547417640686, -0.6121295094490051, -0.7785155177116394, 0.23126092553138733, -0.005952038336545229, -1.1349756717681885, ...
def download ( url, data _ path ) : if not os. path. exists ( data _ path ) : os. makedirs ( data _ path ) url _ parse = urlparse ( url ) file _ name = os. path. join ( data _ path, url _ parse. path. split ('/') [ - 1 ] ) if not os. path. exists ( file _ name. replace ( '. gz ','' ) ) : logging. info ( " downloading %...
[ 1.2301316261291504, 0.14583531022071838, 0.8302516937255859, 0.600805401802063, 0.5467559099197388, -0.5046566724777222, 0.9213665127754211, 0.16154582798480988, 0.0821501687169075, -0.4091351330280304, -0.3308928310871124, -0.0516214482486248, -0.12057287245988846, -0.15505793690681458, ...
def test _ atomic _ boolean _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 3. xsd ", instance = " nistdata / atomic / bo...
[ 0.19541490077972412, -0.20690299570560455, 0.6215004920959473, 0.8038464784622192, 0.09705089777708054, 0.6142967343330383, -0.3314622938632965, -0.1947394162416458, -0.09980088472366333, 1.0277138948440552, -0.11560708284378052, -0.012411626055836678, -0.23604591190814972, -0.563601016998...
def quick _ select ( unsorted _ list, start, end, k ) : if start = = end : return unsorted _ list [ start ] left, right = start, end pivot = unsorted _ list [ left + ( ( right - left ) > > 1 ) ] while left < = right : while left < = right and unsorted _ list [ left ] < pivot : left + = 1 while left < = right and unsort...
[ 0.028794696554541588, -0.32179880142211914, 0.6614155173301697, 0.06524907797574997, -0.2791491746902466, -0.36748212575912476, -0.38294342160224915, -0.11511491239070892, 0.11444012075662613, 0.01913224533200264, -0.7211535573005676, -0.31357255578041077, -0.6215024590492249, 0.3604044616...
def render _ object ( self, obj _ id, r, t, fx, fy, cx, cy ) : raise notimplementederror
[ -0.09211608022451401, -0.8032324910163879, 0.44970083236694336, -0.25881636142730713, 0.11411523073911667, 0.26547470688819885, 0.011022292077541351, -0.056175511330366135, 0.019567308947443962, 0.256546288728714, -0.7767680287361145, -0.1903386414051056, 0.42073875665664673, -0.1819025278...
def guess _ storage ( self ) : # build lookups by name and id storage _ by _ id = { } storage _ by _ name = { } # the storages may change as new storages are added manually so we do # this each time this is called storages = self. _ storage _ model. storages for storage in storages : # store lower case names so we can ...
[ -0.3465404212474823, -1.1315436363220215, 0.5353060960769653, 0.8926900029182434, -0.33302730321884155, -0.6531646847724915, 0.4756852090358734, -0.3330274224281311, -0.44364094734191895, -0.2572232186794281, -0.5850298404693604, -0.44104132056236267, -0.025314340367913246, 0.9375455975532...
def make _ coord _ dict ( subs, subscript _ dict, terse = true ) : sub _ elems _ list = [ y for x in subscript _ dict. values ( ) for y in x ] coordinates = { } for sub in subs : if sub in sub _ elems _ list : name = find _ subscript _ name ( subscript _ dict, sub ) coordinates [ name ] = [ sub ] elif not terse : coord...
[ 0.15122361481189728, -0.10076043754816055, 0.4608425498008728, -0.3938082456588745, -0.9539154171943665, -0.011135956272482872, -0.42785534262657166, -0.08172264695167542, -0.5355503559112549, 0.6669507026672363, -0.42688506841659546, 0.2257264405488968, 0.5327008962631226, -0.023428218439...
def test _ update _ market _ value _ of _ asset _ not _ in _ list ( ) : start _ dt = pd. timestamp ('2017 - 10 - 05 08 : 00 : 00 ', tz = pytz. utc ) later _ dt = pd. timestamp ('2017 - 10 - 06 08 : 00 : 00 ', tz = pytz. utc ) port = portfolio ( start _ dt ) asset = equity ( " acme inc. ", " aaa ", tax _ exempt = false ...
[ -0.18112041056156158, 0.07605470716953278, 0.572844922542572, -0.7054378986358643, -0.07820792496204376, 0.5872002243995667, -0.016042759642004967, -0.5910053253173828, -0.19203387200832367, -0.02427615597844124, -0.47445639967918396, 0.0006563932402059436, -0.7389804720878601, -0.19363497...
def exp ( x ) : try : return variable ( x. name, np. exp ( x. val ), { k : v * np. exp ( x. val ) for ( k, v ) in x. der. items ( ) }, false ) except attributeerror : return np. exp ( x )
[ 0.7509564757347107, 0.19023245573043823, 0.49719753861427307, -0.1768762618303299, -1.4490174055099487, 0.14158211648464203, -0.7908239960670471, 0.06028668209910393, 0.6711474061012268, -0.09520670026540756, -0.3132343292236328, 0.19808779656887054, 0.29176363348960876, -0.061595421284437...
def _ withdraw _ funds ( amount, person ) : fund _ service. remove _ funds ( amount, person ) withdrawal = model. bankwithdrawals ( person _ id = person. id, amount = amount ) model. db. session. add ( withdrawal ) model. db. session. commit ( )
[ -0.036879539489746094, 0.45849916338920593, 0.5343074798583984, -0.31038543581962585, 0.1605202853679657, -0.1181088536977768, -0.3843930959701538, 0.42467743158340454, 0.15257568657398224, -0.7245287895202637, 0.18794608116149902, -1.1436052322387695, 0.08852523565292358, -0.6708732247352...
def close _ position ( self, instrument ) : url = " { 0 } / { 1 } / accounts / { 2 } / positions / { 3 } ". format ( self. domain, self. api _ version, self. account _ id, instrument ) try : return self. _ client _ _ call ( uri = url, method = " delete " ) except requestexception : return false except assertionerror : ...
[ -1.3090925216674805, 0.14015774428844452, 0.7395437955856323, -0.15208028256893158, -0.5861728191375732, 1.0506765842437744, 0.5544377565383911, -0.7494692206382751, 0.0883932039141655, 0.836231529712677, 0.21910062432289124, -0.6785755157470703, -1.7341699600219727, -0.49368321895599365, ...
def get _ iv ( self, protocol _ version ='1. 0') : print ( " [ + ] start getting iv... " ) msg = protocol. encode _ request _ iv ( protocol _ version ) self. _ write _ characteristic _ and _ wait ( msg ) return self. _ iv
[ -1.0300047397613525, -0.07791406661272049, 0.5390387177467346, 1.1892907619476318, 0.20431631803512573, 0.20650143921375275, 0.6114143133163452, -0.19316168129444122, -0.5446991920471191, -0.3794811964035034, -0.5779496431350708, 0.9213085770606995, -1.9353770017623901, -0.7874548435211182...
def events _ to _ timestamp _ image _ torch ( xs, ys, ts, ps, device = none, sensor _ size = ( 180, 240 ), clip _ out _ of _ range = true, interpolation ='bilinear ', padding = true, timestamp _ reverse = false ) : if device is none : device = xs. device xs, ys, ps, ts = xs. squeeze ( ), ys. squeeze ( ), ps. squeeze ( ...
[ -0.4268418848514557, 0.029431894421577454, 1.0115535259246826, -0.022412307560443878, -0.3836315870285034, -0.6996690034866333, -0.14565366506576538, 0.3127904236316681, 0.5371081829071045, 0.9185901284217834, -0.033552490174770355, 0.012553897686302662, 1.4256657361984253, -0.800916075706...
def on _ pushbutton _ ssdaddata _ clicked ( self ) : # todo : not implemented yet self. sendcmdssd _ ad _ data ( ) # receive data global gsocketbufsize gsocketbufsize = 32 * 1024 + 24 + 16 self. udpsocketclient. receivedata ( ) data = self. udpsocketclient. mdata # print ( " receive total length : ", len ( data ) ) dat...
[ 0.3374001383781433, 1.0273483991622925, 0.7939460873603821, -1.224679708480835, -0.14416572451591492, 1.0000494718551636, -0.20672515034675598, -0.15251994132995605, 0.5923451781272888, -0.21372854709625244, -0.4548586308956146, 1.3783550262451172, -0.17071302235126495, 0.2774076759815216,...
def _ generate _ lease _ requests _ for _ new _ machines ( machine _ type, swarming _ server ) : lease _ requests = [ ] request _ number = machine _ type. request _ count for _ in xrange ( machine _ type. target _ size - machine _ type. current _ size ) : request _ number + = 1 request _ id ='% s - % d'% ( machine _ ty...
[ -0.7298897504806519, 0.23500342667102814, 0.5829638242721558, -0.2113874852657318, 0.3892460763454437, 0.35639530420303345, -0.8189586400985718, -0.08110667020082474, -0.19313974678516388, 0.19156120717525482, -0.4396260380744934, 0.5865708589553833, 0.4269455075263977, 1.448181390762329, ...
def run ( self ) : self. setup ( ) while self. _ looping : try : self. processing ( ) except keyboardinterrupt : return 0 return 0
[ -0.6680511832237244, 0.6630814075469971, 0.5694475173950195, 0.04110603779554367, -0.08464769273996353, -0.0019240411929786205, 0.8374767899513245, -0.01479404792189598, -0.7899815440177917, 0.41741079092025757, 0.04960548132658005, -0.5997940897941589, -1.4713215827941895, 0.1551962196826...
def get _ tensor _ accuracy ( self, logits : torch. tensor, targets : torch. tensor ) - > tuple [ torch. tensor, torch. tensor ] : preds = torch. argmax ( logits, dim = - 1 ) # ( batch, len _ tokens ) masked _ tokens = targets. ne ( self. alphabet. padding _ idx ) masked _ preds = torch. masked _ select ( preds, masked...
[ -0.794701874256134, -0.8841338753700256, 0.4678100049495697, -0.5377228260040283, 0.550419270992279, -0.300106406211853, 0.08600999414920807, -0.18442358076572418, -0.047400884330272675, 0.8448495864868164, 0.12414385378360748, 1.2328765392303467, 0.3912830352783203, -0.6774049401283264, ...
def load _ testconditions ( self ) : # initializes arrays for conditions for each test self. capimages = np. zeros ( ( 1, self. n ) ) self. capdiamvals = np. zeros ( ( 1, self. n ) ) self. pressdiffvals = np. zeros ( ( 1, self. n ) ) self. height = np. zeros ( ( 1, self. n ) ) self. width = np. zeros ( ( 1, self. n ) )...
[ -0.7066500782966614, -0.8008229732513428, 0.7519793510437012, -0.5850580930709839, 0.001551473280414939, 0.47952741384506226, 0.8651476502418518, -1.2652473449707031, -0.40976545214653015, -0.3928159773349762, -0.3230631649494171, -0.7562180757522583, -0.6101765036582947, 0.662767827510833...
def test _ error ( self ) : self. assertnotidentical ( self. root. find ('error'), none )
[ 0.3039264678955078, 0.4337327778339386, 0.11148026585578918, 0.2613169550895691, 1.551284909248352, 0.8663118481636047, 0.6563338041305542, -0.0957222655415535, 0.997628927230835, -0.563413679599762, -0.10879988968372345, -0.2765952944755554, -0.3180537521839142, 0.08962893486022949, 0.3...
def enter _ to _ clear ( ) : input ( " \ n - - > appuyez sur entree pour continuer : " ) os. system ('cls')
[ 0.5671004056930542, 0.05956703796982765, 0.33586686849594116, 0.2525513172149658, -0.11631153523921967, 1.136640191078186, 0.24917297065258026, -1.480404257774353, -0.4143895208835602, 0.27505892515182495, 0.5858135223388672, 1.7403126955032349, 0.46753302216529846, -0.005459521897137165, ...
def ln _ likelihood _ det ( model _ plasma, det, data, sigma, labels = none ) : try : model _ data = det. take _ data ( model _ plasma ) except : return - np. inf if labels is none : ln _ p = gaussian _ likelihood ( data, model _ data, sigma ) else : ln _ p = 0. 0 for label in labels : ln _ p + = gaussian _ likelihood ...
[ 0.6854302883148193, -0.4180912971496582, 0.5547816157341003, 0.17349573969841003, -0.09503478556871414, 0.6200432181358337, -1.6186418533325195, 0.36227503418922424, -0.17711250483989716, -0.006861646194010973, 0.011450277641415596, -0.597671627998352, -0.5248396992683411, 0.07962080091238...
def test _ list _ decimal _ enumeration _ 2 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 3. xsd ", instance = " nistdata / list / ...
[ -0.48400643467903137, -0.5001170635223389, 0.70130854845047, 0.526669979095459, 0.3404895067214966, -0.03283151611685753, -0.4062042236328125, 0.19381016492843628, 1.1297149658203125, 0.24462778866291046, -0.7680454254150391, -0.5464626550674438, -0.04655691608786583, 0.15663336217403412, ...
def change _ led ( led, state, led _ state ) : led _ state = led _ state & masks [ led ] if state : led _ state = led _ state | bits [ led ] # print ( led _ state ) update _ leds ( led _ state )
[ -0.0015507455682381988, -0.6618839502334595, 0.38749024271965027, 0.11636433005332947, -0.12376964837312698, 0.2871881127357483, -0.4201812744140625, 0.24942134320735931, 0.9872549176216125, 0.2402419149875641, -0.48020172119140625, 1.525571584701538, -0.16760754585266113, 0.56693708896636...
def _ _ init _ _ ( self ) : self. ftp _ settings = read _ backend _ config ( self. get _ id ( ) ) self. verify _ dir = self. ftp _ settings [ " verify _ dir " ] self. archive _ staging _ dir = self. ftp _ settings [ " archive _ staging _ dir " ] self. connection _ pool = connectionpool ( ) self. download _ threads = [ ...
[ 0.20340995490550995, -0.1057591512799263, 0.43806976079940796, -0.04780541732907295, 1.0875043869018555, -0.5630599856376648, 0.014719342812895775, -0.5106979012489319, -0.45231249928474426, -0.10796808451414108, -0.0856332927942276, 0.5529996156692505, -0.7431018352508545, 0.4111534953117...
def taketest ( ) : user = getuser ( request, session ) problem = request. args. get ( " problem " ) questions = db. gettestquestions ( problem ) return render _ template ('test. html ', learningstyle = " visual ", user = user, problem = problem, questions = questions )
[ 0.6860387325286865, 0.05792113021016121, 0.28070902824401855, 0.09841035306453705, -0.5564512014389038, 0.5164577960968018, 0.3400944173336029, -0.16877633333206177, 0.48910218477249146, -0.22475583851337433, 0.536581814289093, -0.8328438997268677, -0.9344687461853027, -0.39182454347610474...
def batting _ heuristic ( player ) : score = player [ " strike _ rate " ] * 20 + \ player [ " average " ] * 200 + \ player [ " sixes " ] * 10 + \ player [ " boundaries " ] * 5 - \ player [ " ducks " ] * 10 + \ player [ " not _ out " ] * 5 + \ player [ " innings " ] * 10 + \ player [ " runs " ] * 5 + \ player [ " centur...
[ -0.3831171691417694, 0.07503047585487366, 0.6914207339286804, -0.6452358961105347, 0.0588451512157917, 0.31304141879081726, 0.16433635354042053, 0.36449795961380005, -0.4534623622894287, 0.6672580242156982, -1.0970556735992432, -0.36491647362709045, -0.24106216430664062, 0.332662433385849,...
def navigate _ to ( self, path, dont _ wait = none ) : links = path. split ('>') for link in links : self. click _ link ( link ) self. wait _ for _ page _ loaded ( dont _ wait )
[ -1.5150787830352783, 0.3270586431026459, 0.5346733331680298, 0.12350626289844513, 1.2142001390457153, 0.1353684365749359, -0.07915222644805908, 0.07695604115724564, -0.5723820924758911, -0.38365089893341064, -0.33974316716194153, -0.5112351179122925, 0.051264479756355286, -0.40720105171203...
def pandas _ series _ to _ arrow _ array ( series : pd. series ) - > pa. array : if hasattr ( series, " cat " ) : return pa. dictionaryarray. from _ arrays ( # pandas categorical value " - 1 " means none pa. array. from _ pandas ( series. cat. codes, mask = ( series. cat. codes = = - 1 ) ), pandas _ series _ to _ arrow...
[ -1.1570338010787964, -0.2312358021736145, 0.6230117678642273, 0.16082444787025452, -0.37504318356513977, 0.3611312508583069, 0.04940059408545494, -1.146006464958191, 1.5166170597076416, -0.11368836462497711, 0.00888714287430048, 1.3486882448196411, 0.8180840611457825, 0.016699638217687607,...
def hyper _ operator ( x, y, op ) : def hypop ( a, b, c ) : if c = = 0 : return a + 1 else : return hypop ( hypop ( a, b - 1, c ), a, c - 1 ) \ if ( c = = 1 and b > 0 ) or ( b > 1 ) else a print ( hypop ( x, y, op ) )
[ -0.004187442362308502, 0.3646923899650574, 0.6173403263092041, 1.5414336919784546, -0.4057314991950989, -0.2382647544145584, 0.2650929093360901, -0.2902124524116516, -0.12495430558919907, 0.2835443317890167, -0.1006026417016983, 0.10771561414003372, 0.058191731572151184, -0.950164973735809...
async def charge _ port _ door _ close ( self ) - > none : data = await self. _ send _ command ( " charge _ port _ door _ close " ) if data and data [ " response " ] [ " result " ] is true : params = { " charge _ port _ door _ open " : false } self. _ vehicle _ data [ " charge _ state " ]. update ( params )
[ -0.5295472145080566, -0.42695295810699463, 0.6092450618743896, 0.03485768288373947, 0.5546882748603821, 0.7506794333457947, -0.09661548584699631, 0.0686008557677269, -0.493517130613327, 0.34069401025772095, 0.09091389924287796, 0.7854776978492737, -1.5543965101242065, 1.1911990642547607, ...
def _ _ translate ( self, parameter _ values ) : template _ copy = self. template sam _ parser = parser ( ) sam _ translator = translator ( managed _ policy _ map = self. _ _ managed _ policy _ map ( ), sam _ parser = sam _ parser, # default plugins are already initialized within the translator plugins = self. extra _ ...
[ 0.07069117575883865, -0.5438752770423889, 0.3072575628757477, -0.16516746580600739, -0.206731915473938, -0.5874939560890198, -1.1810804605484009, 0.42390578985214233, 0.36435526609420776, -0.42116686701774597, -0.5175898671150208, -0.09919868409633636, -0.12210328876972198, -0.367819637060...
def cancel ( self, cr, uid, ids, context = none ) : self. write ( cr, uid, ids, {'state':'cancel'}, context = context ) return true
[ -0.5105825066566467, -0.32847002148628235, 0.16329391300678253, 0.1649159938097, -0.12682591378688812, 0.4869539141654968, 0.11165415495634079, 1.1143018007278442, 0.5404287576675415, 0.48145973682403564, -0.47564125061035156, -0.27324026823043823, -0.3936324715614319, -0.5271897315979004,...
def decode ( self, probs, sizes = none, num _ results = 1 ) : out, scores, offsets, seq _ lens = self. _ decoder. decode ( probs. cpu ( ), sizes ) strings = self. convert _ to _ strings ( out, seq _ lens ) offsets = self. convert _ tensor ( offsets, seq _ lens ) return strings, offsets, scores
[ -0.29154515266418457, -0.5900552868843079, 0.3965124189853668, -0.20077058672904968, -0.21634720265865326, -0.16743703186511993, -0.1805025041103363, 0.0009059906005859375, -0.050755128264427185, -0.20568536221981049, -0.15822571516036987, -0.2848098576068878, -0.4692820608615875, -0.65165...
def filter _ stack ( stacks : iterable, f : callable ) - > none : for s in stacks : if f ( s ) : yield s
[ 0.5260070562362671, 0.550577700138092, 0.35119569301605225, 1.1694591045379639, -0.29888617992401123, -0.7401558756828308, 0.060355182737112045, -0.24951960146427155, -1.0315487384796143, 0.2666119635105133, 0.30997711420059204, -0.3354299068450928, 0.4018998146057129, 0.3717764616012573, ...
def testgetinstance ( self, mock _ list _ instances ) : mock _ list _ instances. return _ value = mock _ list _ instances found _ instance = fake _ source _ project. compute. getinstance ( fake _ instance. name ) self. assertisinstance ( found _ instance, compute. googlecomputeinstance ) self. assertequal ( fake _ sour...
[ -0.8232296109199524, 0.9796075224876404, 0.3130006492137909, -0.9547327160835266, 0.5154423117637634, 0.7219327092170715, 0.09232883900403976, 0.1987612098455429, 0.17330960929393768, 0.1435842663049698, -1.0428142547607422, 0.27314114570617676, -0.7331418395042419, 0.6676297187805176, 0...
def save ( self, * args, * * kwargs ) : if self. profile _ pic : im = img. open ( self. profile _ pic ) im. thumbnail ( ( 200, 200 ), img. antialias ) output = bytesio ( ) im. save ( output, format ='jpeg') output. seek ( 0 ) self. profile _ pic = inmemoryuploadedfile ( output,'imagefield ', " % s. jpg " \ % self. prof...
[ -0.2811507284641266, 0.25922954082489014, 0.7450994253158569, -0.05098431184887886, 0.4283367693424225, -0.2160104215145111, 0.7049603462219238, -0.20877952873706818, 0.25392380356788635, 0.3542780876159668, -1.4266213178634644, -0.6483218669891357, -0.020615199580788612, 0.769372403621673...
def unset _ eventid ( self ) : self. eventid = none
[ 0.592323362827301, -1.003143548965454, 0.46693548560142517, -0.8929224610328674, 0.054230839014053345, 0.46656984090805054, 0.6068413257598877, 0.719041645526886, 0.2627383768558502, 0.09479589760303497, -0.1771497130393982, 1.588749647140503, -0.1726190745830536, 0.6121207475662231, 0.2...
def read _ json ( self, filename ) : with open ( filename,'r') as f : json _ data = eval ( f. read ( ) ) self. menu _ text = json _ data [ " menu _ text " ] self. new _ game _ text = json _ data [ " new _ game _ text " ] self. starting _ node = json _ data [ " starting _ node " ] self. continue _ text = json _ data [ "...
[ -1.6798412799835205, -1.2568204402923584, 0.5765202641487122, -0.8460206389427185, -0.4707093834877014, 0.44063490629196167, -0.44571781158447266, 0.0641818419098854, -1.1620222330093384, 0.9447098970413208, -0.6388915181159973, 0.4051252007484436, 0.3632866144180298, 0.037497226148843765,...
def get _ pipeline ( ) : extra _ trees _ classifier = extratreesclassifier ( n _ estimators = 100, criterion ='entropy ', max _ features = 0. 15, n _ jobs = - 1 ) rfe = rfe ( extra _ trees _ classifier, step = 0. 35 ) naive _ bayes = bernoullinb ( alpha = 0. 01, fit _ prior = true ) return pipeline ( [ ('feature _ sele...
[ 0.27394190430641174, 0.3212932348251343, 0.2981923818588257, 0.47528740763664246, 0.88603276014328, -0.4804708957672119, -0.3897482752799988, 1.054101824760437, -0.9140426516532898, -0.6175932288169861, -0.30292952060699463, 0.9249621629714966, 0.12265089899301529, 0.5564826726913452, 0....
def _ _ init _ _ ( self, config _ path, proc _ id ) : super ( self. _ _ class _ _, self ). _ _ init _ _ ( config _ path ) self. proc _ id = proc _ id self. payload = emoppayload ( self. settings, proc _ id ) self. scheduler = emopscheduler. get _ scheduler _ instance ( name = self. settings. scheduler, settings = self....
[ -0.05412742868065834, 0.35921651124954224, 0.5607089400291443, -0.6051958799362183, -0.057632725685834885, -0.28638145327568054, -0.29066944122314453, -0.39525628089904785, -0.11913488805294037, 0.41319143772125244, -0.5770726799964905, -0.3313758373260498, 0.4979674518108368, 0.9949892163...
def get _ db _ session ( self ) : database. initialize ( ) return database. get _ session ( )
[ -0.7318651676177979, 0.26897093653678894, 0.34778597950935364, 0.5336824655532837, 0.6214456558227539, -0.5496084094047546, 0.18127946555614471, -1.1071845293045044, 0.19783520698547363, -0.5026033520698547, -0.6059998869895935, 0.43886199593544006, -1.1088500022888184, -0.0419672578573226...
def test _ atomic _ qname _ min _ length _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 2. xsd ", instance = " nistdata / atomic ...
[ 0.24618685245513916, -1.125006914138794, 0.4268864393234253, 0.06679699569940567, -0.6162356734275818, 0.01939476653933525, -0.5281329154968262, -0.9011457562446594, 0.06991346925497055, 0.0582963190972805, -0.5535114407539368, 0.4313451647758484, 0.10433349013328552, 0.14264421164989471, ...
def _ map _ projection ( self, lat, lon, anchor _ lat, anchor _ lon ) : sin _ lat = np. sin ( lat ) cos _ lat = np. cos ( lat ) cos _ d _ lon = np. cos ( lon - anchor _ lon ) sin _ anchor _ lat = np. sin ( anchor _ lat ) cos _ anchor _ lat = np. cos ( anchor _ lat ) arg = sin _ anchor _ lat * sin _ lat + cos _ anchor _...
[ -0.3597088158130646, -0.8887282609939575, 0.8046464920043945, -0.986697256565094, -0.3552413284778595, 0.5231229662895203, -0.7681518793106079, 0.6176653504371643, 0.3823811411857605, 0.386093407869339, 0.44365018606185913, -0.0589040070772171, 0.4360458254814148, -0.48408323526382446, 1...
def inline _ equation ( self ) : return'\ n '. join ( [ r'\ begin { math } ', self. latex. get ( ), r'\ end { math }'] )
[ 0.799436628818512, -0.9251275062561035, 0.6891419887542725, -0.2162020355463028, -0.5590149164199829, 0.7873460650444031, 0.046352434903383255, -0.5451947450637817, -0.7487806677818298, 0.13770021498203278, 0.8830644488334656, 0.026609791442751884, -0.20641958713531494, -0.7563852071762085...
def download _ extract _ cars ( cars _ dir, cars _ url, cars _ annotations _ url ) : download _ url ( cars _ annotations _ url, root = cars _ dir ) download _ url ( cars _ url, root = cars _ dir ) filename = os. path. join ( cars _ dir, os. path. basename ( cars _ url ) ) with tarfile. open ( filename, " r : gz " ) as ...
[ 0.20712949335575104, -0.6476584672927856, 0.6239054203033447, -0.8020603060722351, -0.16845867037773132, -0.3525550067424774, -0.8726603984832764, 0.5707888603210449, -0.40958085656166077, -0.31576040387153625, 0.08713564276695251, 0.3062550127506256, 0.18529106676578522, -0.34636220335960...
def is _ moderator ( self ) : return self. role = = self. permissionchoice. moderator
[ -1.1272940635681152, -0.09554009139537811, 0.34740906953811646, 0.9563320875167847, 0.11594286561012268, -0.2891380786895752, -0.749579131603241, 0.14183738827705383, 1.3140889406204224, 0.013732452876865864, 0.7352967858314514, 0.9921536445617676, -0.753456175327301, 0.07972264289855957, ...
def serialise _ system ( self ) : modeller = app. modeller ( self. molecule. to _ openmm _ topology ( ), self. molecule. openmm _ coordinates ( ) ) forcefield = app. forcefield ( self. xml ) # check for virtual sites try : system = forcefield. createsystem ( modeller. topology, nonbondedmethod = app. nocutoff, constrai...
[ 0.3115713596343994, -0.40306875109672546, 0.2977893650531769, -0.15696756541728973, 0.2667900323867798, 1.0393779277801514, 1.0097929239273071, -0.29679539799690247, 0.6431648135185242, -0.5656977295875549, -0.2923876941204071, -0.21747639775276184, -0.5776116847991943, 0.8233664035797119,...
def make _ complete _ graph ( num _ nodes ) : graph = { } nodes = range ( num _ nodes ) for node in nodes : graph [ node ] = set ( range ( num _ nodes ) ) ( graph [ node ] ). remove ( node ) return graph
[ 0.06269330531358719, 0.7534409761428833, 0.47261327505111694, -0.5074762105941772, -0.6506690382957458, -0.39212119579315186, 0.9424942135810852, 0.12299118936061859, -0.3661841154098511, 1.1955899000167847, -1.1618365049362183, -0.20539629459381104, 0.04669279605150223, -1.261661052703857...
def start ( self ) : self. log. info ( " start : running < % s > in < % s >. " % ( self. cmd, self. test _ dir ) ) # spawn as a process and then wait until # the web server is ready to accept requests. # self. serverprocess = subprocess. popen ( args = self. cmd, shell = true, cwd = self. test _ dir, ) pid = self. serv...
[ 0.32857954502105713, -0.7128394842147827, 0.6810802817344666, -0.1831822693347931, 0.09796997904777527, 0.9287373423576355, 1.0769774913787842, 0.5613447427749634, 0.26715707778930664, -0.541133463382721, -0.01485670730471611, 0.5214303135871887, -0.623525857925415, 0.08323943614959717, ...
def csv _ print ( module _ name, server _ list, directory ) : full _ file _ path = directory + " / " + module _ name print ( " # # creating { } file. ". format ( full _ file _ path ) ) with open ( full _ file _ path,'w ', newline ='' ) as f : fieldnames = server _ list [ 0 ]. keys ( ) thewriter = csv. dictwriter ( f, f...
[ -0.1552877426147461, -0.16788014769554138, 0.36365169286727905, -0.15724307298660278, 0.5116133093833923, 0.6156114339828491, -0.08994649350643158, 0.5415311455726624, -0.6844537854194641, -0.11804427951574326, -0.7097387313842773, 1.208136796951294, 0.28608807921409607, 0.5510223507881165...
def dis _ between _ authors ( author1, author2 ) : metric = author. ametrictype if metric = = authormetric. centroiddis : return author2. distance _ to ( author1. get _ center ( ) ) temp = [ author1. distance _ to ( author2works ) for author2works in author2. get _ matrices ( ) ] if metric = = authormetric. averagedis ...
[ 0.3623301684856415, -0.3417331278324127, 0.36181408166885376, 1.215053915977478, -0.5765714645385742, 0.5478014945983887, 0.9689978361129761, 0.05390860512852669, -0.18011069297790527, 0.16449220478534698, 0.5098950862884521, 0.4818233549594879, -0.16587185859680176, -0.31831058859825134, ...
def get _ rois _ mask _ in _ native _ space ( sub _ id ) : roi _ dir = os. path. join ('pipelines ','rois') # get all roi file paths anat _ roi _ images = glob. glob ( os. path. join ( roi _ dir,'anatomical ','*. nii *') ) func _ roi _ images = glob. glob ( os. path. join ( roi _ dir,'functional ','* ','*. nii *') ) su...
[ 0.06439419090747833, -0.6705015897750854, 0.7642452716827393, 0.3238941431045532, -0.3696548044681549, -0.07909329235553741, 0.03875325992703438, -0.6382865905761719, -0.11681602895259857, -0.050378307700157166, -0.0917154848575592, 0.6752859950065613, 1.0425305366516113, 0.387221038341522...
def test _ atomic _ any _ uri _ enumeration _ nistxml _ sv _ iv _ atomic _ any _ uri _ enumeration _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - enumeration - 1. xsd ", instance = " nistdata / a...
[ -0.6612055897712708, -0.9573107957839966, 0.5398752689361572, 0.7198911309242249, 0.016125505790114403, -0.3240910768508911, 0.3757256865501404, -0.23257900774478912, 0.25141605734825134, -0.12111156433820724, 0.41730910539627075, -0.5217303037643433, -0.5138079524040222, 0.146039485931396...
def test _ atomic _ language _ length _ nistxml _ sv _ iv _ atomic _ language _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 1. xsd ", instance = " nistdata / atomic / langu...
[ 0.3737340271472931, -0.2746526002883911, 0.31364163756370544, 0.34674111008644104, -0.4090726673603058, 0.1540473848581314, 0.4215700626373291, 0.0038121419493108988, 0.15611135959625244, 1.0355292558670044, -0.5862239599227905, -0.4651305377483368, -0.0800323560833931, 0.47781461477279663...
def _ _ init _ _ ( self, t, trajectory, ats, molno ) : self. timestep = t self. ats = ats self. box = none self. rng = none if type ( trajectory ) is np. ndarray : carray = trajectory self. timestep = int ( carray [ 0 ] ) self. ats = int ( carray [ 2 ] ) self. nclusts = carray [ 1 ] pend = 4 + 3 * ats * molno self. pos...
[ -0.11279850453138351, -0.07683348655700684, 0.6899176239967346, -0.570189356803894, -0.5043050646781921, -0.36168596148490906, -0.328439861536026, 0.06152913346886635, 0.7461370825767517, 0.020452378317713737, -0.3676294982433319, -0.15009763836860657, 0.516655445098877, -0.017846645787358...
def thetafrombot _ locuc ( self, theta, noblock = false ) : return float ( theta )
[ 0.2697751224040985, -0.5156152844429016, 0.19273364543914795, -0.6109088659286499, -0.4423116445541382, 0.22765405476093292, 0.6718422174453735, 0.5379936695098877, -1.459062933921814, 0.34229472279548645, 0.05711541697382927, 0.2725956439971924, -0.3545053005218506, -0.79500412940979, -...
def remove _ site _ effects ( self ) : assert ( self. regrs _ site _ effects is not none ), " run regr _ model _ site _ effects ( ) first. " roi _ gs _ df = self. roi _ df. copy ( ) def apply _ model ( y ) : " " " returns data corrected for site effects. " " " return ( y - b0 ) / b1 # apply appropriate correction for e...
[ 0.4245401918888092, 0.032819170504808426, 0.41710343956947327, -0.40405717492103577, 0.4926619827747345, 0.5608466267585754, 1.8540900945663452, 0.28591036796569824, -0.15422794222831726, 0.11313634365797043, -0.0027332566678524017, 1.3394197225570679, -0.6362333297729492, -0.1573174595832...
def checkclick ( self, pos ) : if self. die1. checkclick ( pos ) or self. die2. checkclick ( pos ) : self. handlemouserelease ( )
[ -0.030145801603794098, -0.4460165500640869, 0.6366745829582214, 1.0531558990478516, 0.4068121016025543, -0.562839925289154, -0.3982459604740143, 0.3623729348182678, 0.45394977927207947, 0.4756534993648529, 0.5155617594718933, -0.4412909150123596, 0.04893554374575615, 0.1957254260778427, ...