text
stringlengths
25
2.19k
embedding
listlengths
768
768
def add _ drop ( self, prob ) : if len ( self. _ _ inps ) = = 0 or len ( self. _ _ fmaps ) = = 0 : raise valueerror ('specify the number of input dimensions and the image size!') self. _ _ model. append ('{ } : add ( nn. dropout ( { } ) ) '. format ( self. _ _ blocks [ - 1 ], prob ) ) self. _ _ fmaps. append ( self. _ ...
[ -0.7727829217910767, 0.08205953240394592, 0.7070298790931702, 0.2287089079618454, 0.28400760889053345, 0.7620581388473511, 0.14408297836780548, -0.14400526881217957, -0.13523438572883606, -0.3101509213447571, -0.22698377072811127, -0.5893296599388123, -1.2673900127410889, 0.574840903282165...
def get _ text _ width ( text ) - > int : if qtpy. pyside2 : from qtpy. qtgui import qt as _ qt else : from qtpy. qtcore import qt as _ qt if _ qt. mightberichtext ( text ) : doc = qtextdocument ( ) doc. sethtml ( text ) return doc. size ( ). width ( ) else : fm = qfontmetrics ( qfont ( " ", 0 ) ) return fm. boundingre...
[ 0.4789823293685913, -0.12702232599258423, 0.7755478620529175, -0.08623910695314407, -1.4953608512878418, -0.3730933964252472, 0.3777994215488434, -0.3814532458782196, 0.9993478059768677, -0.5288407802581787, 0.21831925213336945, -0.17432956397533417, -1.0575395822525024, 0.795066773891449,...
def _ _ getitem _ _ ( self, name ) : if name = ='right _ open _ 2': return self. construct _ subgait ('right _ leg ', name ) elif name = ='left _ swing _ 2': return self. construct _ subgait ('left _ leg ', name ) elif name = ='right _ swing _ 2': return self. construct _ subgait ('right _ leg ', name ) else : return s...
[ -0.5450178384780884, -0.46315038204193115, 0.6365551352500916, 0.1439787745475769, -0.8014163374900818, 0.40807974338531494, -0.05234542489051819, -1.001380443572998, -0.8835002779960632, -0.7154519557952881, -0.5525742173194885, 0.12086140364408493, -0.32158371806144714, -0.18134896457195...
async def test _ properties ( v3 _ server, v3 _ settings _ response ) : v3 _ server. post ( ( f " https : / / api. simplisafe. com / v1 / ss3 / subscriptions / { test _ subscription _ id } " " / settings / normal " ), status = 200, body = v3 _ settings _ response, ) async with aiohttp. clientsession ( ) as session : si...
[ -0.5655978322029114, -0.19002383947372437, 0.6738439202308655, 0.1172860860824585, 0.6643227934837341, 0.24969236552715302, -0.22022953629493713, -0.2604348957538605, 0.8634172081947327, -0.5603300333023071, -0.29083630442619324, -0.009989527054131031, -0.5951686501502991, -0.1334432512521...
def sections ( self ) : return self. cf. sections ( )
[ 0.1838950365781784, -0.5009362101554871, 0.30051103234291077, 0.5235481858253479, 0.2832103371620178, 0.03831876069307327, 0.6047633290290833, -0.7655757069587708, -0.2359859198331833, -1.528365135192871, 0.4795069396495819, -1.086885690689087, 0.21750222146511078, 1.1499370336532593, -0...
def func _ to _ optimise ( xy ) : x, y = xy return - ( 1 - x ) * * 2 - ( 2 - y * * 2 ) * * 2
[ -0.7478245496749878, 0.2478625625371933, 0.2676493227481842, -0.2039644867181778, 0.23220443725585938, -0.9925845861434937, -0.08583994209766388, -1.6686338186264038, -0.5985657572746277, 1.0587750673294067, -0.5601919889450073, 0.5014186501502991, 0.7825967669487, -0.5943471193313599, 0...
def visit ( self, node : ast. self ) : # dummy _ node = self. register _ instruction ( cil. cildummy,'lw $ a0, 4 ( $ sp )') self _ vinfo = variableinfo ('self') self _ vinfo. holder = 1 return self _ vinfo
[ -0.22350025177001953, -0.11340124160051346, 0.33424511551856995, -0.5313552618026733, -0.274309366941452, -0.5160776972770691, 0.786334753036499, -0.2057104855775833, 0.07259407639503479, -0.05339004099369049, -0.8272861242294312, 0.8958153128623962, -0.301688551902771, 0.6503808498382568,...
def test _ arange _ with _ all _ args ( self ) : def test _ f ( dummy ) : return torch. arange ( dummy. size ( 0 ), 30, 1 ) dummy = torch. randn ( 10 ) jitvsglow ( test _ f, dummy, expected _ fused _ ops = { " aten : : arange " } )
[ 0.08144047856330872, 0.880717933177948, 0.40404510498046875, 0.788429319858551, 0.44936254620552063, -0.2140403687953949, -0.05784044414758682, -0.28016382455825806, 0.27553850412368774, -0.22210969030857086, -0.0357779785990715, 0.39481598138809204, 0.3787064254283905, 0.5034762620925903,...
def ui _ definition ( self ) - > optional [ any ] : return pulumi. get ( self, " ui _ definition " )
[ 0.9720293879508972, 0.379841148853302, 0.43008145689964294, 1.1838241815567017, 1.1435638666152954, 0.7599869966506958, -0.020330291241407394, 0.5185561180114746, 0.672239363193512, -0.9006001949310303, 0.02672719955444336, 0.9012031555175781, -0.03350813314318657, -0.4061269462108612, -...
def create _ urn ( domain, node = none, port = none, link = none ) : if node = = none : return " urn : ogf : network : domain = % s " % domain if node! = none and port = = none and link = = none : return " urn : ogf : network : domain = % s : node = % s " % ( domain, node ) if node! = none and port! = none and link = =...
[ 0.17049725353717804, -0.3961753249168396, 0.6877133250236511, -0.9915964007377625, 0.7386709451675415, -0.18958339095115662, -0.40212950110435486, 0.08141055703163147, -0.4637853503227234, -0.7555944323539734, 0.37530383467674255, 0.5222274661064148, -0.4509745240211487, -0.671789288520813...
def normalizezip ( originalvalue _ str ) : try : iscorrectformat, result _ str = _ _ check _ formatting ( originalvalue _ str ) if ( iscorrectformat ) : padded _ str = result _ str. rjust ( 5,'0') return true, padded _ str else : return false, result _ str except exception as err : return false, err
[ -0.3074437379837036, -0.7958557605743408, 0.8341456651687622, 0.38235363364219666, -1.166318416595459, 0.3844488859176636, 1.3706363439559937, -0.05449565127491951, 0.7084668278694153, 0.3754456043243408, 0.2554057240486145, -0.5591800212860107, -1.1803919076919556, 0.3783406615257263, 0...
def addlocationresourceargs ( parser ) : arg _ specs = [ presentation _ specs. resourcepresentationspec ('- - location ', getlocationresourcespec ( ), ('the batch location resource. if you omit this flag, the default'' location is used if you set the batch / location property.'' otherwise, omitting this flag lists jobs...
[ 0.4483010768890381, -0.8674744367599487, 0.6105458736419678, -0.3531625270843506, 0.773337185382843, 0.6359502077102661, 0.16418184340000153, 1.2335375547409058, -0.147173672914505, -0.07986249029636383, 0.3543267846107483, -0.2088245451450348, 0.45085108280181885, 0.6325768232345581, -0...
def setdelays ( self, delay = none, writedelay = none, absolute : bool = false ) - > none : with self. lock : delay = delay or self. mindelay writedelay = writedelay or config. put _ throttle if absolute : self. maxdelay = delay self. mindelay = delay self. delay = delay self. writedelay = min ( max ( self. mindelay, w...
[ 0.17445945739746094, 0.058218661695718765, 0.7575125098228455, -0.3192650377750397, 0.14310064911842346, 0.5156025290489197, -0.4085316061973572, 0.6532256007194519, -0.6234126091003418, -0.6811206936836243, 0.13498695194721222, 0.032568588852882385, -0.09022700786590576, 0.045053862035274...
def join _ paths ( path, name ) : path = re. sub ('/ + ','/ ', name if name. startswith ('/') else f'{ path } / { name }') return path
[ 0.6466955542564392, -0.30653509497642517, 0.5774244666099548, 0.44679000973701477, -1.3099251985549927, 0.338623970746994, -0.2068350613117218, 0.4314846098423004, 0.15348196029663086, 0.5780829787254333, 0.02410680241882801, -0.8543824553489685, -0.7145423889160156, -0.8014237880706787, ...
def exclude _ response ( data, response _ feat ='f _ pts') : x _ df = data. drop ( response _ feat, axis = 1 ) return x _ df
[ 0.4019531309604645, 0.047189436852931976, 0.3652856945991516, 0.5527983903884888, -0.5727368593215942, 0.6929978132247925, 0.6839972138404846, -0.7114053964614868, 0.7580729722976685, -0.97832852602005, -0.1854902058839798, -0.6496080160140991, -0.2906039357185364, -2.266016721725464, 0....
def player _ standings ( ) : r _ value = execute _ query ( " select * from tournament _ filter ( % s ) ", ( tournament _ id, ) ) return r _ value
[ -0.47820085287094116, -0.12972119450569153, 0.3785345256328583, -0.18781517446041107, 0.14211685955524445, -0.7032204866409302, -0.6585860848426819, -0.24376770853996277, -1.0263644456863403, 0.5266615748405457, -0.05293884500861168, -0.23454421758651733, -0.10156001150608063, -1.228477239...
def set _ intensity ( self, intensity ) : _ check _ arg _ intensity ( intensity, self. granularity ) self. intensity = intensity if intensity is none : self. children = ( ) else : self. children = ( intensity, )
[ -0.6245056390762329, 0.6702420711517334, 0.45576536655426025, 0.27375033497810364, 1.0707149505615234, -0.45810869336128235, 0.6842404007911682, 0.6618155241012573, -0.2518189549446106, 0.4521365165710449, -0.7472724914550781, -0.45747220516204834, -0.8575763702392578, 0.2851245105266571, ...
def dataset _ configuration ( self ) - >'outputs. labelingdatasetconfigurationresponse': return pulumi. get ( self, " dataset _ configuration " )
[ -0.2437974214553833, -0.06400326639413834, 0.24822898209095, -0.6929505467414856, 0.2572357654571533, 0.13060703873634338, 0.04603826627135277, 0.4388965368270874, 0.7167933583259583, 0.1984873265028, -0.1750020831823349, 0.9508299827575684, 0.9839144945144653, -0.2972968518733978, -0.96...
def find _ epi _ spikes ( image, filename, qchtml, ftype, cur = none, bvec = none ) : image = str ( image ) # input checks opath = os. path. dirname ( image ) # grab the image folder pic = os. path. join ( qcpath, filename +'_ fmriplots. png') # load in the daterbytes output = str ( image ) image = nib. load ( image )....
[ 0.34363430738449097, -0.017579348757863045, 0.8413267135620117, -0.2957257330417633, -0.6522120833396912, -0.6528356075286865, 1.0158721208572388, 0.2722682058811188, 0.2693694829940796, 0.5080346465110779, 0.6434847712516785, 0.22137337923049927, 0.09060516208410263, 0.8557403683662415, ...
def is _ valid _ hex _ of _ length ( hex _ str, length = none ) : if length is none : return is _ valid _ hex _ str ( hex _ str ) if not str ( length ). isdigit ( ) : logger. error ( " non - negative integer expected as length. " ) return false pattern = re. compile ( " ^ ( 0 [ x | x ] )? [ a - fa - f0 - 9 ] { " + str ...
[ -0.0069991713389754295, -0.20941394567489624, 0.3599030077457428, -0.22543774545192719, -0.6146926283836365, 0.7821786403656006, -0.8618483543395996, 1.154137134552002, 0.6896712779998779, -0.3967578113079071, -0.3294679522514343, -0.6790162920951843, -0.2757422924041748, 0.770382106304168...
def approximate ( self, x, parent = none ) : log, exp, sqrt, pi = math. log, math. exp, math. sqrt, math. pi x = float ( x ) xi = log ( x ) y = ( exp ( xi ) - 1. 0 ) / xi - x while abs ( y ) > 1e - 12 : dydxi = ( exp ( xi ) * ( xi - 1. 0 ) + 1. 0 ) / ( xi * xi ) xi - = y / dydxi y = ( exp ( xi ) - 1. 0 ) / xi - x retur...
[ 0.13037322461605072, 0.040319062769412994, 0.8477684855461121, -0.8864700794219971, -1.071629285812378, 0.5870901942253113, -0.4040239453315735, -0.5521121025085449, 0.6889989972114563, -0.30080586671829224, 0.24251021444797516, 0.21180742979049683, -0.4853346645832062, 0.356519490480423, ...
def var ( self ) - > " dataframe " : return wrap _ df ( self. _ df. var ( ) )
[ -0.43665605783462524, 0.262841135263443, 0.2239987999200821, -0.11072856932878494, 0.015506335534155369, -0.3301284611225128, 0.2110304832458496, -1.018066167831421, -0.05621124058961868, -1.6992861032485962, 0.841588020324707, 1.8987523317337036, 0.4203393757343292, -1.3238451480865479, ...
def get _ physical _ volumes ( self ) : self. pv _ list = self. get _ all _ physical _ volumes ( self. _ root _ helper, self. vg _ name ) return self. pv _ list
[ -0.5226277709007263, -0.31267473101615906, 0.3111930191516876, 1.7334818840026855, 0.06840097904205322, 0.022005178034305573, -1.6126762628555298, -0.2411908060312271, -0.2864484488964081, -0.09101185947656631, 0.29304400086402893, 0.3515874147415161, 0.23019886016845703, 0.715538203716278...
def write _ 4d ( self, path = none, return _ nimg = false ) : if path is none : path = os. getcwd ( ) fids = np. unique ( self. featureset _ id ) nimgs = [ ] for i, fid in enumerate ( fids ) : pos _ idx = np. where ( i = = fids ) [ 0 ] [ 0 ] s = self. data _ shape [ pos _ idx ] to _ write = np. zeros ( ( np. prod ( s )...
[ -0.6319935917854309, -0.3810933828353882, 0.8558494448661804, 0.37220388650894165, -0.04363824799656868, -0.6217604875564575, 0.3097817003726959, -0.6195058226585388, -0.7392141819000244, -0.03972287476062775, -0.1782623678445816, -0.8196697235107422, -0.9997801184654236, 0.374404996633529...
def exit ( self ) : for window in copy. copy ( self. _ _ windows ) : # closing the window will trigger the about _ to _ close event to be called which # will then call window close which will fire its _ window _ close _ event which will # remove the window from the list of window in _ window _ did _ close. window. requ...
[ -0.4107513427734375, -0.619480311870575, 0.6301620006561279, 0.5921756625175476, 0.01964382454752922, 0.18160679936408997, 0.5968611240386963, 0.5028467178344727, -0.04943320155143738, 0.8098427057266235, -0.03053245320916176, 0.19261807203292847, -0.5540217161178589, 1.4547429084777832, ...
def plot _ price _ trend ( df, start _ date, end _ date ) : mask = ( df ['date'] > start _ date ) & ( df ['date'] < = end _ date ) sdf = df. loc [ mask ] plt. figure ( figsize = ( 10, 5 ) ) chart = sns. lineplot ( x ='date ', y ='price ', data = sdf ) # chart. set _ xticklabels ( chart. get _ xticklabels ( ), rotation ...
[ 0.19189943373203278, 0.47411495447158813, 0.6803162097930908, 0.05215230956673622, -0.04278615862131119, 0.3760477602481842, -0.07390419393777847, -0.4740738272666931, -0.4324086904525757, -0.587651789188385, 0.3350629210472107, 1.7945516109466553, 0.7749226093292236, -0.9720990657806396, ...
def test _ members ( self ) : self. found _ lines _ eq ('member : bitfield ', [ ('class < b > bitfield < / b > { ', 8 ), ('size _ t < b > _ words < / b > ( ) const { ', 17 ), ('_ word * < b > _ bits < / b > ; ', 22 ), ('size _ t < b > _ size < / b > ; ', 23 ), ('< b > bitfield < / b > ( size _ t size ) { ', 27 ), ('< b...
[ 0.38730335235595703, -0.47444474697113037, 0.5282908082008362, -0.5744935274124146, 0.6522589325904846, 0.22857438027858734, 0.24982742965221405, -0.3442838191986084, -0.16365088522434235, -0.1551641821861267, -0.7315178513526917, -0.010730086825788021, -0.8207114338874817, 0.5938099026679...
def run _ query ( input _ query : str ) - > none : if input _ query! = query _ one and input _ query! = query _ two : raise valueerror ( f " you must run either the { query _ one } or { query _ two } query " ) else : execute _ query ( input _ query )
[ -0.5098323822021484, -0.40625086426734924, 0.36174407601356506, 0.6286476254463196, 1.0917294025421143, 0.9483563303947449, -0.7326223850250244, -0.14418403804302216, 0.1026688814163208, -0.08661606907844543, 0.8982143402099609, 0.6229140162467957, -0.6322605013847351, 0.14575159549713135,...
def _ is _ cpo _ int ( arg ) : return is _ int ( arg ) and ( int _ min < = arg < = int _ max )
[ 0.05839671194553375, -0.28234121203422546, 0.3513629734516144, 0.21886563301086426, -0.5218175649642944, 0.7515085339546204, 0.15548734366893768, -0.05394991859793663, -0.36814990639686584, 0.7340033650398254, -1.053883671760559, 0.18230636417865753, -1.2445721626281738, -0.070528902113437...
def increase _ score _ value ( self ) : self. alien _ point = int ( self. alien _ point * self. score _ scale )
[ -0.6229326128959656, -0.493225634098053, 0.6344824433326721, -0.194471538066864, 0.6136828064918518, 0.4994855225086212, -0.6536617279052734, -0.33972886204719543, -0.728225588798523, 0.9242469668388367, 0.20984198153018951, 0.09792209416627884, 0.9234737157821655, -0.05643535405397415, ...
def _ init _ bus ( cls, bus _ num, address, tb ) : device _ found = false device = cls. _ device _ prefix. format ( bus _ num ) try : tb. _ i2c _ read = io. open ( device, mode ='rb ', buffering = 0 ) tb. _ i2c _ write = io. open ( device, mode ='wb ', buffering = 0 ) except ( ioerror, oserror ) as e : # pragma : no co...
[ -0.5208663940429688, -0.10212573409080505, 0.8929322361946106, -0.23661506175994873, -0.1799820363521576, 0.03447087109088898, 1.1283481121063232, 0.055431898683309555, -0.48332101106643677, -0.554745078086853, 0.29652291536331177, 0.455309122800827, -0.3692026138305664, -0.023401062935590...
def find ( self, orig, dest, find, mode = " walking ", measure = " value " ) : shouldfetch = false # new location to find? if self. _ lastorig! = orig and self. _ lastdest! = dest : shouldfetch = true self. _ lastorig = orig self. _ lastdest = dest if self. _ mostrecentrequesttime! = none : # check if a new request sho...
[ -0.8939155340194702, -0.21023212373256683, 0.8199859857559204, -0.4062255322933197, -0.5536823868751526, 0.2643982172012329, 0.1437414437532425, -1.1280341148376465, -0.14675946533679962, 0.25051742792129517, 0.764447033405304, -0.30983561277389526, -0.37063223123550415, 0.0096808122470974...
def hstack ( self, columns : " union [ list [ series ], dataframe ] ", in _ place = false ) - > optional [ " dataframe " ] : if not isinstance ( columns, list ) : columns = columns. get _ columns ( ) if in _ place : self. _ df. hstack _ mut ( [ s. inner ( ) for s in columns ] ) else : return wrap _ df ( self. _ df. hst...
[ -0.458768367767334, 1.632002830505371, 0.4675910472869873, 0.9474496245384216, 0.6254409551620483, -0.1438027322292328, -0.300913542509079, -0.06322916597127914, -0.2605435848236084, -0.34562021493911743, -0.1669945865869522, 0.9989388585090637, -0.2764040529727936, -0.5856210589408875, ...
def rotate _ cw ( self ) : current = self. config. displayorientation if current = = win32con. dmdo _ default : self. rotation _ 270 ( ) elif current = = win32con. dmdo _ 90 : self. rotation _ default ( ) elif current = = win32con. dmdo _ 180 : self. rotation _ 90 ( ) elif current = = win32con. dmdo _ 270 : self. rotat...
[ -0.749187171459198, 0.09800995886325836, 0.5730910897254944, -0.09150587022304535, -0.3309907019138336, -0.05277402326464653, 1.4515674114227295, -0.9768173694610596, -0.5404463410377502, -0.030322983860969543, 0.07695861905813217, 0.748055636882782, -1.2904256582260132, 0.4818002283573150...
def registernamespacehandler ( self, xmlns, handler, typ ='', ns ='', makefirst = 0, system = 0 ) : self. registerhandler ('default ', handler, typ, ns, xmlns, makefirst, system )
[ -0.2550258934497833, 0.571277379989624, 0.09127690643072128, 0.4918780028820038, 0.8446844220161438, 0.5181789994239807, -1.1926722526550293, -0.730460524559021, 0.40270110964775085, -1.1447514295578003, -0.8750786781311035, 0.19284282624721527, -0.02429962158203125, 0.8900567889213562, ...
def test _ _ parser _ _ lexer _ fail _ via _ parse ( ) : lexer = lexer ( config = fluffconfig ( overrides = { " dialect " : " ansi " } ) ) _, vs = lexer. lex ( " select \ u0394 " ) assert vs assert len ( vs ) = = 1 err = vs [ 0 ] assert isinstance ( err, sqllexerror ) assert err. line _ pos = = 8
[ 0.3918958306312561, -0.2865324020385742, 0.3336293697357178, -0.06069168075919151, -0.25686174631118774, 0.26044556498527527, -0.7478168606758118, -0.26259133219718933, -0.03263792768120766, -0.7584586143493652, -0.905609667301178, -0.40932193398475647, -0.034106530249118805, 0.19790747761...
def remove _ comments _ and _ stuff ( line ) : line = re. sub ( comment _ pattern,'', line ) # remove comments tabs _ pattern = re. compile ( r " \ t + " ) new _ line _ pattern = re. compile ( r " \ n * " ) line = re. sub ( tabs _ pattern, space _ char, line ) # removes tabs line = re. sub ( new _ line _ pattern,'', li...
[ 0.45745420455932617, -0.871895432472229, 0.7358008623123169, -0.1001613661646843, -0.54884934425354, 0.1935519427061081, 0.659917950630188, 0.44647416472435, -0.07057855278253555, -0.31770437955856323, -0.11715959757566452, -0.20673859119415283, 0.39317139983177185, -0.012852920219302177, ...
def start ( self ) : with mouselistener ( on _ click = self. _ on _ click, on _ scroll = self. _ on _ scroll ) as listener : listener. join ( )
[ 1.4781816005706787, -1.0699235200881958, 0.5272480845451355, 0.5807695388793945, 0.41708964109420776, 0.09518463909626007, 0.21520277857780457, 0.22887274622917175, 0.05887661874294281, -0.5913422703742981, -0.4710628092288971, 0.6410661935806274, 0.5582349896430969, 0.4016839861869812, ...
def is _ present ( website _ name, product _ id ) : return amazonin. query. filter ( amazonin. product _ id = = product _ id ). first ( )
[ 0.8680132627487183, -0.6397978067398071, 0.3893112242221832, 0.24818956851959229, 0.6716983914375305, 0.5338225364685059, -0.7323583364486694, -0.2751840054988861, 0.8485175967216492, 0.7647584676742554, 0.6113526821136475, 0.23346127569675446, -0.5036903023719788, 0.28549137711524963, -...
def std _ damping ( self, standard _ deviation ) : # the difference between the standard deviation of the # curvature and the target standard deviation. delta _ std = abs ( standard _ deviation - self. target _ std ) return np. exp ( - abs ( self. std _ damping _ strength ) * delta _ std )
[ -0.0666603296995163, 0.08566142618656158, 0.6596277356147766, -0.05476486310362816, -0.7819526195526123, 0.710418164730072, 0.7380756735801697, -0.042115721851587296, 0.4992871582508087, -0.36646631360054016, -0.3411663770675659, 0.8490546345710754, -0.09230643510818481, 0.1322676986455917...
def add ( name, command, arguments _ descr, creates _ file = none, stdout _ file = none, stdout _ mod = _ identity, stdout _ res = none, header _ string = none, header _ command = none, header _ mod = _ identity, allowed _ return _ codes = [ 0 ], combinations _ filter = lambda args : true, ) : if _ state. run _ was _ c...
[ -0.34751221537590027, -0.03026563674211502, 1.2289167642593384, 0.790124773979187, 0.16274584829807281, -0.175557941198349, -0.4053254723548889, 0.285374253988266, -0.4381735324859619, 0.07571151107549667, 0.25999996066093445, 0.2249167114496231, -0.5643532276153564, 0.3649822771549225, ...
async def get _ room ( self, request : smart _ device _ management _ service. getroomrequest = none, *, retry : retries. retry = gapic _ v1. method. default, timeout : float = none, metadata : sequence [ tuple [ str, str ] ] = ( ), ) - > site. room : # create or coerce a protobuf request object. request = smart _ devic...
[ -1.1835237741470337, 0.9694534540176392, 0.6270365118980408, 0.7369990348815918, 0.3011619448661804, -0.2072925716638565, -0.07859425246715546, -0.8691378235816956, 0.28349539637565613, -0.10006207227706909, 0.6875519752502441, 1.3958971500396729, -0.5630504488945007, -0.22928468883037567,...
def get _ descriptors _ uris ( dl, prefix ='' ) : prefix = prefix or'' uri _ regex = f'^ { prefix } \ w * : ( \ /? \ /? ) [ ^ \ s ] +'dl = list ( filter ( lambda x : x is not none, dl ) ) return list ( filter ( lambda x : re. match ( uri _ regex, x ), dl ) )
[ -0.7240851521492004, -0.04999015852808952, 0.6616086363792419, 0.00017764668154995888, -0.13937336206436157, -0.8802916407585144, -0.8818143010139465, 1.883898377418518, 0.36494365334510803, 0.006855507846921682, 0.26046714186668396, 0.167843297123909, 0.29790061712265015, 0.20775449275970...
def lambda _ handler ( event, context ) : current _ module = " aggregation by column - wrangler " error _ message = " " # define run _ id outside of try block run _ id = 0 try : # retrieve run _ id before input validation # because it is used in exception handling run _ id = event [ " runtimevariables " ] [ " run _ id ...
[ 0.12105106562376022, -0.3009900748729706, 0.9864367246627808, -0.3440174162387848, -0.02311408333480358, 0.24972866475582123, 0.01585642248392105, -0.3321758210659027, -0.8984185457229614, 0.1642274409532547, -0.23071669042110443, 0.93525630235672, 0.39549511671066284, -0.2652643918991089,...
def plotclasses ( y ) : fig = plt. figure ( ) ax = plt. subplot ( 1, 1, 1 ) x1 = range ( y. shape [ 1 ] ) y1 = [ sum ( y [ :, a ] ) for a in range ( y. shape [ 1 ] ) ] width = 0. 8 labels = " s1, s2, s3, s4, s5, w1, w2, w3, w4, k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14, k15 ". split ( ',') if y. shape...
[ 0.14333422482013702, 0.3048427999019623, 1.2125897407531738, -0.40911659598350525, -0.6324766278266907, 0.6067005395889282, 1.1088072061538696, 0.05514879152178764, -0.3162492513656616, -0.03509068116545677, 0.04620074853301048, 0.10725685209035873, 0.24127498269081116, 0.8424839377403259,...
def cluster _ analysis ( simname, cutoff, coords _ loc = [ 3, 6 ] ) : coord, bs = extract. extract _ unwrapped ( simname, first _ only = true, boxsize = true ) current _ timestep = coord ['timestep _ 0'] cluster _ set = { } cluster _ index = 0 type2 = current _ timestep [ current _ timestep ['type'] = = 2 ]. values typ...
[ -0.24643509089946747, -0.13719996809959412, 0.7255547046661377, 0.06952240318059921, -0.17503905296325684, -0.1823938935995102, 0.22496666014194489, -0.1668958216905594, -0.8883447051048279, 0.77252197265625, 0.6462569236755371, -0.2703549861907959, -0.1978617012500763, -0.2459997087717056...
def test _ concurrentexplicitworkingdirectory ( self ) : self. parseoptions ( ['- - temp - directory ', os. path. abspath ( self. mktemp ( ) ) ] ) initialdirectory = os. getcwd ( ) self. addcleanup ( os. chdir, initialdirectory ) firstrunner = self. getrunner ( ) secondrunner = self. getrunner ( ) class concurrentcase ...
[ -0.09586553275585175, 0.6035293936729431, 0.6683023571968079, 0.30831021070480347, 0.6437597870826721, 0.22720567882061005, 1.1535162925720215, 0.30934056639671326, 0.502181887626648, -0.26760903000831604, -0.6825699210166931, 0.005797265097498894, -0.3923720717430115, 0.4486536681652069, ...
def validate ( schema ) : def decorator ( function ) : # pylint : disable = missing - docstring if not asyncio. iscoroutinefunction ( function ) : raise typeerror ( " {! r } is not a coroutine function ". format ( function ) ) @ asyncio. coroutine @ functools. wraps ( function ) def wrapper ( self, entity ) : # pylint ...
[ -0.5487909913063049, -0.062111079692840576, 0.6623368859291077, -0.3341051936149597, 0.05239831283688545, 0.08468903601169586, -0.3156532645225525, 0.5747458934783936, 0.06868820637464523, 0.70655757188797, 0.8335309624671936, 0.5164231657981873, 0.16091614961624146, 0.21743911504745483, ...
def over _ composite ( rgbas ) : for i in range ( len ( rgbas ) ) : rgb = rgbas [ i ] [ :, :, :, 0 : 3 ] alpha = rgbas [ i ] [ :, :, :, 3 : ] if i = = 0 : output = rgb else : rgb _ by _ alpha = rgb * alpha output = rgb _ by _ alpha + output * ( 1. 0 - alpha ) return output
[ -0.914860188961029, -0.11443711817264557, 0.7960546016693115, 0.043072737753391266, 0.4142063558101654, -0.3085332214832306, 1.2422429323196411, -0.310512900352478, 0.6163342595100403, 1.0198115110397339, 0.2844165563583374, -1.4665181636810303, -0.4524814188480377, 0.5493316650390625, -...
def _ stripapiname ( api _ name ) : if api _ name. endswith ('trusted') : api _ name = api _ name [ : - len ('trusted') ] if api _ name. endswith ('_ dev') : api _ name = api _ name [ : - len ('_ dev') ] if api _ name. endswith ('_ private') : api _ name = api _ name [ : - len ('_ private') ] return api _ name
[ -1.3756849765777588, -0.7761093974113464, 0.5250850915908813, -1.1604231595993042, -0.738921582698822, 0.8558477163314819, -0.504913866519928, -0.6353741884231567, 0.213728129863739, 0.7883145213127136, -0.5953086018562317, 0.4943411648273468, -0.8233668804168701, -0.308520644903183, 1.9...
def blur _ bbox _ soft ( im : np. ndarray, bbox, iters = 1, expand _ per = - 0. 1, multiscale = true, mask _ k _ fac = 0. 125, im _ k _ fac = 0. 33, shape = " ellipse ", ) : if not bbox : return im bboxes = bbox if isinstance ( bbox, list ) else [ bbox ] bboxes _ mask = [ b. expand _ per ( expand _ per, keep _ edges = ...
[ 0.14121298491954803, -0.1688707172870636, 1.0888381004333496, 1.1458208560943604, -0.625792384147644, -0.15877847373485565, 0.264176607131958, -0.3976840674877167, 0.5019335746765137, -0.010016131214797497, 0.6101666688919067, -0.38068872690200806, 0.6283120512962341, 0.40256258845329285, ...
def softmax ( x, theta = 1. 0, axis = none ) : # make x at least 2d y = np. atleast _ 2d ( x ) # find axis if axis is none : axis = next ( j [ 0 ] for j in enumerate ( y. shape ) if j [ 1 ] > 1 ) # multiply y against the theta parameter, y = y * float ( theta ) # subtract the max for numerical stability y = y - np. exp...
[ 1.0025445222854614, 0.33547666668891907, 0.9860731959342957, 0.37715867161750793, -1.2788448333740234, -0.5569618940353394, -0.31387680768966675, 0.3225175440311432, 0.7591486573219299, 0.6765236258506775, -0.1350206583738327, 0.591670572757721, 0.30213218927383423, -0.3666843771934509, ...
def polynomiale ( a, b, c, d, x ) : return ( a * math. pow ( x, 3 ) ) + ( b * math. pow ( x, 2 ) ) + ( c * math. pow ( x, 1 ) ) + d ;
[ 1.239776849746704, 0.02781086042523384, 0.40965431928634644, -0.4589172303676605, 0.13024047017097473, 0.7498505115509033, -0.7344338893890381, 0.08472907543182373, -0.12909163534641266, 0.253397136926651, 0.03330806642770767, 0.03501035273075104, 0.05711089447140694, -1.3302223682403564, ...
def drop _ everything ( ) : from sqlalchemy. engine. reflection import inspector from sqlalchemy. schema import dropconstraint, droptable, metadata, table con = db. engine. connect ( ) trans = con. begin ( ) inspector = inspector. from _ engine ( db. engine ) # we need to re - create a minimal metadata with only the re...
[ -0.8036121726036072, 0.3420621454715729, 0.7254430651664734, 0.3195626437664032, 0.2171829342842102, 0.10008369386196136, 0.16804341971874237, 0.15744344890117645, -0.7997449636459351, 0.10890873521566391, -0.0866377130150795, 0.1605272889137268, 0.14641748368740082, 0.20566371083259583, ...
def reset ( self, ) : self. iterations = 0 self. fib1 = 1 self. fib2 = 1 self. fib3 = 2 self. matrix. set _ brightness ( brightness )
[ 0.03164292126893997, 0.7586156725883484, 0.25529953837394714, 0.882658064365387, 0.4722888171672821, -0.41261082887649536, 1.4868687391281128, -0.08107969164848328, -0.7423940896987915, 0.7705827355384827, -0.38912340998649597, 0.6096851825714111, -1.1345700025558472, 1.0581519603729248, ...
def calctf ( outfilename = " transferfunctions ", pathtofile = ". / root / treeproducertestpt _ gen. root ", doonlyjettf = 1, relweightbin0 = 0. 65, relweightbin1 = 0. 65, relshiftbin0 = 0. 92, reg = " _ std ", gen = " _ part ", li _ jet _ types = [ " light ", " heavy " ], ) : # # # # # # # # # # # # # # # # # # # # # ...
[ 0.9443709254264832, 0.013713259249925613, 0.9429157376289368, -0.31768953800201416, -0.5387997031211853, 0.24074432253837585, 1.1224901676177979, 0.41067206859588623, -1.185363531112671, 0.6335932612419128, -0.6198493242263794, 0.6404167413711548, -0.47964489459991455, -0.48218783736228943...
def dumphandlers ( self ) : return self. handlers
[ -1.272678256034851, -0.9933376312255859, 0.28043219447135925, -0.6632014513015747, 0.3294909596443176, 0.7034710645675659, -0.19596299529075623, -0.35878100991249084, 0.2142416536808014, -1.047017216682434, -0.8756398558616638, 0.034933269023895264, -0.9588431715965271, 0.2753717303276062,...
def enrich ( self, ages, zs, s _ masses, time _ step _ length, gas _ mass ) : max _ snii _ age = slt. lifetime ( 8. 0, 0. 02 ) min _ snii _ age = slt. lifetime ( 80., 0. 02 ) isnii = ( ages - time _ step _ length < max _ snii _ age ) & ( ages > min _ snii _ age ) iagb = ( ages - time _ step _ length > = max _ snii _ ag...
[ 0.21888859570026398, -0.17272219061851501, 0.573918342590332, 0.04330844804644585, 0.4837034344673157, -0.13006435334682465, 0.024526096880435944, -0.6210620999336243, 0.07461688667535782, -0.12798424065113068, -0.42117005586624146, 0.3592296540737152, 0.30701500177383423, 0.44766813516616...
def _ reqatt ( self, node, attname ) : v = node. getattribute ( attname ) if not v : raise manifestparseerror ( " no % s in < % s > within % s " % ( attname, node. nodename, self. manifestfile ) ) return v
[ -0.13633407652378082, -1.2520289421081543, 0.5842046737670898, -0.8863695859909058, -1.3248186111450195, -0.2556610107421875, -0.8076068162918091, -0.35343703627586365, -0.18669027090072632, -0.43091440200805664, 2.0922374725341797, 0.99586421251297, -0.15874528884887695, -0.61368966102600...
def get _ ax ( rows = 1, cols = 1, size = 16 ) : _, ax = plt. subplots ( rows, cols, figsize = ( size * cols, size * rows ) ) return ax
[ 1.5500003099441528, 1.155982494354248, 0.40697604417800903, -0.05521317571401596, -1.1135144233703613, 0.16254720091819763, -0.05346973240375519, -0.6159124970436096, -0.0004069713468197733, -0.6758503317832947, 0.14217910170555115, 1.116718053817749, 0.41777294874191284, -1.39653658866882...
def _ run _ command ( self, command, kwargs ) : if command not in self. command _ register : raise keyerror ('this command is not in the command register.') func = self. command _ register [ command ] ['function'] names = self. command _ register [ command ] ['arg _ names'] if not sorted ( kwargs. keys ( ) ) = = sorted...
[ 0.06220433861017227, 0.32582888007164, 0.48344212770462036, -0.2158631533384323, 0.4265442490577698, -0.35998445749282837, -0.7453154921531677, -0.2918640673160553, -0.10124789923429489, -0.007203479763120413, -0.08568785339593887, 1.1866333484649658, -0.770734965801239, 0.275728702545166,...
def test _ new _ user _ email _ normalized ( self ) : email ='test @ londonappdev. com'user = get _ user _ model ( ). objects. create _ user ( email,'test123') self. assertequal ( user. email, email. lower ( ) )
[ 0.9443743824958801, 0.22722172737121582, 0.08639517426490784, 0.4433688223361969, 0.05162692070007324, 1.2234182357788086, -0.02669663541018963, 0.29559096693992615, 0.013693376444280148, -0.2772786021232605, -0.6181882619857788, -0.2710888683795929, -0.9565079212188721, -0.223903566598892...
def cm _ analysis ( y _ true, y _ pred, filename, labels, ymap = none, figsize = ( 10, 10 ) ) : if ymap! = none : y _ pred = [ ymap [ yi ] for yi in y _ pred ] y _ true = [ ymap [ yi ] for yi in y _ true ] labels = [ ymap [ yi ] for yi in labels ] cm = confusion _ matrix ( y _ true, y _ pred, labels = labels ) cm _ sum...
[ 0.532084047794342, -0.5611448287963867, 0.9429886937141418, 0.3431856632232666, -0.3227342367172241, -0.007275680545717478, 1.5734331607818604, 1.3011345863342285, -0.27388668060302734, 0.07986260205507278, 0.09059498459100723, 0.09326455742120743, 0.33313798904418945, 0.5557262897491455, ...
def _ _ rand _ _ ( self, other ) : return build _ cpo _ expr ( other ). _ _ and _ _ ( self )
[ -0.11970717459917068, -0.8748874664306641, 0.613917887210846, -0.013438869267702103, -0.9485567212104797, 0.36697590351104736, 0.6589218974113464, 0.22054269909858704, 0.5484781265258789, 0.14412270486354828, -0.5137740969657898, 0.3281949758529663, -0.45403093099594116, -0.397863119840621...
def debug _ log ( ) : try : raise exception except : f = sys. exc _ info ( ) [ 2 ]. tb _ frame. f _ back print'debug _ log % d % s : % d'% ( thread. get _ ident ( ), f. f _ code. co _ name, f. f _ lineno )
[ 0.9117147326469421, -0.15182721614837646, 1.0452966690063477, 0.07375434786081314, 0.6797163486480713, -0.3035840094089508, 0.08463340997695923, -0.16461226344108582, -0.708479106426239, -0.28600063920021057, 0.4130289554595947, 0.8590935468673706, -0.15525738894939423, -0.1194694787263870...
def extract _ paper _ id ( df ) : # df. paper _ id = df. paper _ id. apply ( lambda x : x. split (':') [ - 1 ] ) df. paper _ id = df. paper _ id. apply ( lambda x : re. search ( cfg. paper _ id _ regex, x ). group ( ) ) return df
[ -0.21720536053180695, -0.9570502042770386, 0.38904470205307007, -0.32462161779403687, 0.46253857016563416, 0.1974986493587494, -0.5865789651870728, 0.39477434754371643, 0.5969495177268982, 0.9304141402244568, -0.5684362649917603, 0.6848759651184082, -0.44986945390701294, -1.162219882011413...
def cd ( self, dir ) : # flag to check if the dir exists dir _ ex = 0 # if dir = =.. return to the parent folder if dir = = ".. " : dir _ ex = 1 # take the previous folder's url and go there if self. index _ of _ url _ s > 0 : self. index _ of _ url _ s - = 1 self. driver. get ( self. url _ s [ self. index _ of _ url _...
[ -0.9272230267524719, 0.08617521822452545, 0.9412124752998352, 0.7259203791618347, 0.4376060962677002, 0.07206322252750397, 1.3869456052780151, 0.9025292992591858, 0.22777655720710754, -0.3434198200702667, 0.5547193288803101, 0.4083188474178314, -0.5087730288505554, 1.3196818828582764, 0....
def print _ sorted _ table ( table ) : list _ to _ print = sorted ( table. items ( ), key = itemgetter ( 1 ), reverse = true ) pos = 1 for item in list _ to _ print : print ( format ( pos, " 02n " ) + " " + format ( item [ 0 ], " 12s " ) + " " + str ( item [ 1 ] ) ) pos + = 1
[ -0.10490376502275467, -0.5366668701171875, 0.7020757794380188, 0.2509711682796478, -0.05262245237827301, 0.40614280104637146, -0.47730469703674316, -0.4219740927219391, -0.4894988536834717, -0.18039514124393463, -0.76637202501297, 0.37791022658348083, 0.4345247745513916, 0.9169022440910339...
def set _ channels ( self, n _ channels ) : self. _ _ fmaps. append ( n _ channels )
[ -1.1879057884216309, -0.244574636220932, 0.43537387251853943, -0.17894847691059113, 0.5425750017166138, -0.4214848279953003, -0.5050698518753052, -1.201019048690796, 0.8588608503341675, -1.2905168533325195, -0.8716782331466675, -0.36464428901672363, -0.27526363730430603, 1.0527592897415161...
def create _ likes ( self ) : msg _ 1 = message ( text = " test message 1 ", user _ id = self. uid _ 1 ) m
[ 0.4511120319366455, 0.5151587724685669, 0.3264720141887665, 0.32573068141937256, 0.824120044708252, 1.0520156621932983, 0.19078423082828522, -0.9520186185836792, -0.4862743318080902, -0.9492751955986023, -0.142791748046875, 1.0886948108673096, -1.6184650659561157, 0.8857178092002869, -1....
def mask _ composite ( im : np. ndarray, im _ masked, im _ mask ) : im _ mask _ alpha = im _ mask / 255. 0 im = im _ mask _ alpha [ :, :, none ] * im _ masked + ( 1 - im _ mask _ alpha ) [ :, :, none ] * im return ( im ). astype ( np. uint8 )
[ -0.955561101436615, -0.7478618025779724, 0.8327987790107727, 0.289808064699173, 0.9361531734466553, -0.03293037414550781, 0.6355655789375305, -0.33021390438079834, 0.8591508269309998, 0.6500229239463806, 0.7240982055664062, -0.5543975234031677, -0.4204493761062622, -0.7121787667274475, 0...
def check ( actions, request, target = { } ) : user = auth _ utils. get _ user ( request ) credentials = _ user _ to _ credentials ( request, user ) enforcer = _ get _ enforcer ( ) for action in actions : scope, action = action [ 0 ], action [ 1 ] if scope in enforcer : # if any check fails return failure if not enforc...
[ -1.5850402116775513, 0.00341617688536644, 0.5528967976570129, 0.6459961533546448, 0.2504165470600128, 0.2002221941947937, 0.16247129440307617, -0.17812196910381317, 0.1813305914402008, 0.1622324287891388, 0.7070285081863403, 0.3702041208744049, 0.2390291392803192, 0.05659520998597145, -0...
def identity _ client _ id ( self ) - > optional [ str ] : return pulumi. get ( self, " identity _ client _ id " )
[ 0.4731341600418091, -0.586229681968689, 0.19058334827423096, 0.4256629943847656, 1.3183588981628418, 1.3871475458145142, 0.6311625242233276, -0.5369641780853271, 0.5582448840141296, 0.007692817598581314, 0.2558041214942932, 1.452315092086792, -0.4875982403755188, -1.2512837648391724, -0....
def djikstra _ algo ( self, source _ index ) : distance _ list = [ math. inf ] * len ( self. vertices ) distance _ list [ source _ index ] = 0 spt _ set = [ false ] * len ( self. vertices ) parent = [ - 1 ] * len ( self. vertices ) for i in range ( len ( self. vertices ) ) : min _ node _ index = self. find _ shortest _...
[ -0.5861125588417053, 0.5523505210876465, 0.582166314125061, -0.001414546393789351, -0.5345001220703125, -0.10592246800661087, 0.9395922422409058, 0.2868119478225708, 0.9210026264190674, 0.9022755026817322, -1.2443686723709106, 0.19388388097286224, -0.1088094487786293, 0.573904275894165, ...
def dequeue ( self ) : if self. length = = 0 : return none new _ head = self. head. next value = self. head. value self. head = new _ head self. length - = 1 return value
[ 0.14516378939151764, 0.06245545297861099, 0.8543699383735657, -0.5810994505882263, -0.29278287291526794, -1.106046438217163, -0.11960992962121964, -0.007189278490841389, 0.3903753459453583, -0.26579737663269043, -0.47721511125564575, 1.090102195739746, -1.2567294836044312, 0.86939847469329...
def can ( self ) : return str ( current _ user. get _ id ( ) ) = = str ( self. community. id _ user ) or \ permission ( actionneed ('admin - access') ). can ( )
[ 0.3548835217952728, -0.23639020323753357, 0.5425885319709778, 1.2175925970077515, -0.1140386089682579, 0.09707794338464737, 0.409206748008728, -0.7106022238731384, -0.4882703721523285, -0.003821613732725382, 0.9679325819015503, 0.8116254210472107, -0.9140157699584961, 0.6064968705177307, ...
def total _ and _ 95 ( data _ d, sensor, m _ vals ) : total = sum ( m _ vals ) temp _ table = [ ] total _ table = [ ] did = len ( data _ d [ sensor ] [ 1 ] [ 0 ] ) for j in range ( len ( data _ d [ sensor ] [ 1 ] ) - 1 ) : for p in range ( did ) : if j = = 0 : temp _ table. append ( [ data _ d [ sensor ] [ 1 ] [ j ] [ ...
[ 0.1865656077861786, -0.26434120535850525, 0.6071823239326477, -0.08362789452075958, -0.6602420210838318, -0.35461270809173584, 0.24453763663768768, 0.17702700197696686, -0.5886970162391663, 0.20200897753238678, 0.0056156255304813385, -0.2619374394416809, 0.7202445268630981, 1.0611796379089...
def _ connectto ( self, master, masterindex = none, slaveindex = none, exclude = none, fit = false ) : return list ( self. _ connecttoiter ( master, masterindex, slaveindex, exclude, fit ) )
[ -1.150539755821228, -0.18287892639636993, 0.5396832227706909, -0.046312615275382996, -0.6553762555122375, -0.4095211923122406, -0.27687573432922363, 0.0027096380945295095, 0.18803945183753967, 0.8841958045959473, -0.05178303271532059, 0.6488109230995178, -0.3531727194786072, -0.47604379057...
def gallery ( title, image _ elem _ list ) : gal = {'type':'gallery ','title': title,'data': image _ elem _ list, } return gal
[ -1.2370727062225342, 0.5831647515296936, 0.190159410238266, 0.4392266571521759, -0.2870417535305023, 0.21152669191360474, -0.30523213744163513, 0.6082577109336853, -0.44161632657051086, 0.283534973859787, -0.9931442737579346, 0.281576931476593, 0.3629820942878723, 0.8018369078636169, 0.4...
def attend _ event ( activity _ id, event _ id ) : # user login required if'username'not in flask. session : response = flask. make _ response ( json. dumps ('user login required'), 401 ) response. headers ['content - type'] ='application / json'return response try : with db _ session ( ) as db : user _ attending = db....
[ 0.053461864590644836, -0.801834762096405, 1.070102334022522, 0.0987776592373848, -0.13705477118492126, 0.15259309113025665, 0.31344592571258545, -0.23105692863464355, 0.060291633009910583, 1.2704004049301147, 0.34277409315109253, 0.5753551721572876, 0.4282037019729614, 0.12880413234233856,...
def single _ rarefaction ( tbl, n = 0 ) : if n and n > 0 and n < tbl. shape [ 0 ] : tbl = tbl. loc [ sample ( list ( tbl. index ), n ) ] return sum ( tbl. sum ( axis = 0 ) > 0 )
[ -0.2058999091386795, 1.3383688926696777, 0.46073591709136963, 0.7540580630302429, 0.3774564564228058, -0.6024759411811829, 0.8796236515045166, 0.47651153802871704, 0.9988228678703308, -0.13008855283260345, -0.3717123866081238, 0.04886069521307945, 0.09211494773626328, 0.18910053372383118, ...
def test _ lightgbm _ regressor _ random _ seed _ bounds _ seed ( x _ y _ regression ) : x, y = x _ y _ regression col _ names = [ " col _ { } ". format ( i ) for i in range ( len ( x [ 0 ] ) ) ] x = pd. dataframe ( x, columns = col _ names ) y = pd. series ( y ) clf = lightgbmregressor ( n _ estimators = 1, max _ dept...
[ 0.27047014236450195, -0.23731690645217896, 0.5636443495750427, 0.04010244831442833, 0.4892691671848297, 0.4925958216190338, -0.5295881032943726, -1.5069679021835327, 0.023550178855657578, -1.282243013381958, -0.5811773538589478, 0.9981024265289307, -0.1833360195159912, 0.26170116662979126,...
def get _ volume ( self, name ) : ref _ list = self. get _ volumes ( name ) for r in ref _ list : if r ['name'] = = name : return r return none
[ 0.14303964376449585, -0.9372839331626892, 0.6017035841941833, -0.361805260181427, -0.13583046197891235, -1.1716846227645874, -0.5716383457183838, -1.346297025680542, -0.2049834281206131, 0.29105642437934875, 0.607510507106781, 0.47740164399147034, -0.808402955532074, 0.042230699211359024, ...
def omap ( fn : callable, obj ) : # recursively map each value in map if isinstance ( obj, dict ) : val = type ( obj ) ( { k : omap ( fn, v ) for k, v in obj. items ( ) } ) # recursively map each item in an array elif isinstance ( obj, list ) : val = type ( obj ) ( [ omap ( fn, v ) for v in obj ] ) # primitives will al...
[ -1.187774896621704, -0.3920058310031891, 0.7343156933784485, 0.5511798858642578, -1.1511787176132202, -0.2835560441017151, -0.7496817111968994, 0.10901278257369995, 1.0216442346572876, -0.790643572807312, -0.292704701423645, -0.3721267282962799, 0.6165046691894531, 0.18211840093135834, -...
def circle _ circumference ( radius ) : return 2 * pi * radius
[ 0.17292122542858124, -0.6803325414657593, 0.3471277356147766, -0.8978397846221924, -0.08886813372373581, -0.7859401702880859, 1.2889404296875, 0.1942051649093628, -0.2895415723323822, 0.6828258037567139, -0.10910368710756302, -0.07697191834449768, 0.09128064662218094, 0.28367647528648376, ...
def test _ fine _ drag ( self ) : d _ theta = 0. 03 # rotation error per single gate. backend = finedragtestbackend ( error = d _ theta ) qubit = 0 test _ tol = 0. 005 beta = parameter ( " β " ) chan = parameter ( " ch0 " ) with pulse. build ( backend = backend, name = " xp " ) as x _ plus : pulse. play ( pulse. drag (...
[ 0.07602250576019287, 0.9754940271377563, 0.7380842566490173, -0.21995221078395844, 0.16763202846050262, 0.41142627596855164, 0.12691091001033783, -0.3473201096057892, -0.12754133343696594, -0.8354840278625488, -0.6555559635162354, 0.006342630833387375, -0.5253519415855408, 0.04687273502349...
def test _ callback ( self ) - > none : # ensure that we are correctly testing the fallback when " get _ extra _ attributes " # is not implemented. mapping _ provider = self. provider. _ user _ mapping _ provider with self. assertraises ( attributeerror ) : _ = mapping _ provider. get _ extra _ attributes username = " ...
[ -0.04720769822597504, 0.5461094975471497, 0.7480146884918213, 0.08938605338335037, -0.06715467572212219, 0.554162859916687, 0.8475291728973389, -0.23548126220703125, 1.0103259086608887, -0.4787963926792145, -1.037014365196228, 0.06299065053462982, 0.24609708786010742, -0.3287912607192993, ...
def ask _ sup _ inflation ( supers, products, prices ) : enter _ loop = true while enter _ loop : try : start = ask _ and _ convert ( prices, start ) end = ask _ and _ convert ( prices, end ) print ( ) for sup _ id in supers : print ('{ } : { :. 2f } % '. format ( supers [ sup _ id ], get _ sup _ inflation ( start, end...
[ -0.2897945046424866, 0.11698916554450989, 0.5855298638343811, 1.1343607902526855, -0.5090693831443787, 0.5613880157470703, 0.5811841487884521, -0.17655621469020844, -0.4314502477645874, 0.2309069037437439, -0.3870476484298706, 1.3570524454116821, -0.40529167652130127, -0.10279899090528488,...
def get _ flags ( self ) : if hasattr ( self, " toas " ) : return numpy. array ( [ t. flags for t in self. toas ] ) else : return self. table ['flags']
[ -0.7631068825721741, 0.24930796027183533, 0.37677001953125, 0.5462262630462646, 0.87891685962677, 0.2548435926437378, -0.2899892032146454, -0.27739202976226807, -0.08581073582172394, -0.2404886931180954, 0.37248727679252625, 0.6092419028282166, 0.038799725472927094, 0.5220088958740234, -...
def about ( ) : return render _ template ('about. html ', title ='about ', year = datetime. now ( ). year, message ='your application description page.')
[ 1.2646480798721313, 0.20963384211063385, 0.6334327459335327, 0.4660998582839966, 0.052030786871910095, 0.546686053276062, -0.3156717121601105, 1.0816054344177246, -0.8678154349327087, 0.5984929800033569, 1.1899367570877075, 0.18709367513656616, -0.08337126672267914, 1.2686904668807983, 0...
def add _ ai _ player ( self, value : int ) : self. players. append ( ai _ player ( negamax ( value ) ) ) self. values _ for _ negamax. append ( value )
[ -1.4259051084518433, 0.12798118591308594, 0.5233134031295776, 0.07661321014165878, 0.4209304749965668, 0.9187648892402649, -0.5356364846229553, -0.7315236926078796, -0.0004663293657358736, 0.7158450484275818, -0.30762383341789246, -0.008731062524020672, -0.14836706221103668, 0.421260982751...
def _ _ init _ _ ( self, data : " union [ dict [ str, sequence ], list [ series ], np. ndarray ] ", nullable : bool = true, ) : columns = [ ] if isinstance ( data, dict ) : for k, v in data. items ( ) : columns. append ( series ( k, v, nullable = nullable ). inner ( ) ) elif isinstance ( data, np. ndarray ) : shape = d...
[ -0.2396407425403595, 0.6515833139419556, 0.8244218230247498, -0.07567907124757767, -0.31471535563468933, -0.9208371043205261, 0.04672309383749962, -0.09139157086610794, 0.33053281903266907, -0.8346276879310608, 0.012578084133565426, 0.5545210838317871, 0.4440467953681946, 0.197135403752326...
def getdynamicregistermap ( self, request, context ) : logger. info ('server getdynamicregistermap : % s ', request ) so _ path = self. _ binary _ path + request. so _ digest dynamic _ methods = get _ dynamic _ register _ methods ( so _ path, none ) method _ map = [ ] for name, addr in dynamic _ methods. items ( ) : me...
[ -1.7200236320495605, -0.2070716917514801, 0.5699885487556458, 0.1804792433977127, 0.701528787612915, -1.1930955648422241, 0.774517834186554, -0.06984080374240875, 0.28974848985671997, -0.43258997797966003, -0.6464264988899231, 0.2800663411617279, 0.017800742760300636, 0.9945961833000183, ...
def make _ returns ( rewards : np. ndarray, gamma : float, end _ value : float = 0. 0 ) - > np. ndarray : t, = rewards. shape t = lambda i : t - 1 - i return jax. lax. fori _ loop ( 0, t, lambda i, ret : jax. ops. index _ update ( ret, t ( i ), rewards [ t ( i ) ] + gamma * jax. lax. cond ( i = = 0, lambda _ : end _ va...
[ -0.3544567823410034, 0.1689213514328003, 0.5101845860481262, -0.6734280586242676, 0.466606080532074, -0.6534508466720581, -0.09464859217405319, -0.02003679797053337, -0.9719446897506714, 0.4924866557121277, 0.809397280216217, 0.5932739973068237, 0.24548587203025818, -1.395796537399292, 0...
def is _ valid ( self ) : if self. timestamp > = time. time ( ) - 10 : return true else : return false
[ -0.27881062030792236, 0.5092448592185974, 0.8212001919746399, 0.00947426538914442, 0.5755688548088074, 0.7254809737205505, -1.0942463874816895, 0.11308258026838303, 0.27006420493125916, 0.2725237011909485, 0.13399280607700348, -0.3115783631801605, -0.287612646818161, -0.14314845204353333, ...
def disk _ size _ gb ( self ) - > pulumi. output [ float ] : return pulumi. get ( self, " disk _ size _ gb " )
[ 0.29807111620903015, 1.6293541193008423, 0.5319647789001465, 0.45700064301490784, 0.8477910161018372, 0.8868141174316406, 0.819316029548645, 0.41698235273361206, -0.22288262844085693, -0.501020073890686, 0.3469669818878174, 0.8483732342720032, -0.43074166774749756, -0.4205458164215088, -...
def _ update _ ncx ( self ) : epub _ ncx = os. path. join ( self. epub _ dir,'book. ncx') epub _ ncx _ doc = minidom. parse ( epub _ ncx ) navpoint _ xml ='''< navpoint id = " description " playorder = " 0 " > < navlabel > < text > story description < / text > < / navlabel > < content src = " description. html " / > < ...
[ -0.2436274141073227, -0.46710917353630066, 0.5290035009384155, 0.12173903733491898, -0.16786494851112366, 1.5239728689193726, -0.6643173098564148, 0.4232766330242157, 0.035700421780347824, 0.4439341127872467, 0.1787550300359726, -0.5885695815086365, -0.1514696329832077, -0.3589712381362915...
def checkorthogonal ( segment1, segment2 ) : if ( np. dot ( segment1. vector, segment2. vector ) > = 0 ) : return true else : return false
[ -0.294989675283432, -1.0177148580551147, 0.8337566256523132, 0.4089522957801819, 0.11816676706075668, 1.1061562299728394, -1.0406097173690796, -0.29185807704925537, -0.4148836135864258, 0.5709388852119446, 0.580355167388916, 0.2271680384874344, 0.5705361366271973, -0.24712224304676056, -...
def check _ change ( sensor ) : if sensor ['state'] ['lastupdated']! = _ _ memory _ _. get ( sensor ['uniqueid'], false ) : change = sensor ['state']. get ('buttonevent') notify ( sensor ['uniqueid'], change ) print ( " button { } pushed on { } ". format ( sensor ['uniqueid'], change ) ) _ _ memory _ _ [ sensor ['uniqu...
[ 0.3724348545074463, -0.19954344630241394, 0.6695302128791809, -0.6403932571411133, 0.28943881392478943, 0.10592794418334961, -0.5782845616340637, -0.1806621551513672, 1.4187686443328857, 0.5828932523727417, -0.8027657270431519, 0.5684416890144348, 0.10212360322475433, 1.1921114921569824, ...
def maybe ( callback, description, verbose = true ) : if verbose : print'maybe : starting ', description try : return true, callback ( ) except ( exception ), exc : if verbose : print'headline : failed to ', description,'exception ', exc if not ( isinstance ( exc, systemexit ) or isinstance ( exc, externalfailure ) ) :...
[ 0.5902376770973206, 0.4467509686946869, 0.7428409457206726, 0.27941739559173584, -0.20177125930786133, -0.22212626039981842, -0.8981764912605286, 0.2020072191953659, 0.1580212414264679, 0.22879117727279663, 0.7202414870262146, -0.07004828751087189, -1.0067840814590454, 0.5981746912002563, ...