text
stringlengths
25
2.19k
embedding
listlengths
768
768
def process _ on _ delete _ handler ( sender, instance, * * kwargs ) - > bool : sales = sender. objects. filter ( reseller = instance. reseller, date _ _ month = instance. date. month, date _ _ year = instance. date. year ) if not sales. exists ( ) : return false sale = sales. first ( ) process. delay ( sale _ id = sal...
[ 1.1277340650558472, -0.27696532011032104, 0.7856273055076599, 0.052014678716659546, -0.2341710776090622, 0.3595089912414551, 0.4271238148212433, 0.17801757156848907, 0.11440324038267136, -0.10551957786083221, -0.11187276244163513, -0.7229017019271851, -0.4284454882144928, 0.724977016448974...
def get ( self, game _ id ) : # get the game object try : g = gamemodel. objects ( id = game _ id ). get ( ) except ( doesnotexist, validationerror ) : abort ( 404, message = f " game { game _ id } not found. " ) player _ list = [ p. name for p in g. players ] # todo : use @ marshal _ with for better validation return ...
[ -1.0378367900848389, -0.3028365671634674, 0.5103330612182617, -0.13351386785507202, 0.31174707412719727, -0.4420165419578552, -1.514123558998108, -0.5735699534416199, -0.005503316875547171, 1.3491219282150269, -0.23708325624465942, 0.14239539206027985, 0.15354125201702118, 0.54913431406021...
def get _ feature _ type ( feature _ code ) : if feature _ code = = 1 : return'point'elif feature _ code = = 2 : return'polyline'elif feature _ code = = 3 : return'polygon'else : return'none '
[ -0.17663004994392395, -0.3510802090167999, 0.5475019812583923, 0.14063464105129242, 1.1493850946426392, -0.5085572600364685, 0.17934805154800415, 0.19963863492012024, 0.32691964507102966, 0.08198073506355286, -0.7399807572364807, 0.4096089005470276, 0.22762413322925568, -0.3010818362236023...
def initialize ( self, request ) : self. query = getattr ( request, request. method ). urlencode ( ) self. payment _ id = self. custom
[ -0.061780259013175964, -0.3615324795246124, 0.15344835817813873, -0.15511201322078705, -0.0615665465593338, -0.8213742971420288, -0.78707355260849, -0.308386892080307, 0.6408048868179321, -0.3457403779029846, 0.6673497557640076, 0.2562199532985687, 0.5406051874160767, 1.2891085147857666, ...
def stepretrytf ( self, userdata ) : for tf _ retry in range ( 3 ) : try : return self. step ( userdata ) except rospy. serviceexception as e : rospy. logerr ( " service execution failed : % s ", e ) break except ( tf. lookupexception, tf. connectivityexception, tf. extrapolationexception ) as e : rospy. logwarn ( " tf...
[ -0.22937604784965515, 0.34806984663009644, 0.36908501386642456, -0.23119325935840607, 0.04924813285470009, -0.15434323251247406, 0.020174292847514153, -0.33657723665237427, -0.3882296085357666, -0.695053219795227, 0.12423288077116013, -0.41947489976882935, -0.2654987573623657, -0.520453691...
def _ readall ( self ) : stream = _ bytesio ( ) with _ handle _ azure _ exception ( ) : self. _ get _ to _ stream ( stream = stream, * * self. _ client _ kwargs ) return stream. getvalue ( )
[ 0.4725784957408905, -0.10942280292510986, 0.7448252439498901, 0.06311143189668655, 0.08910813182592392, -0.12320048362016678, -0.6878777742385864, -0.8761696815490723, -0.619320809841156, -0.7520924806594849, 0.660629391670227, 0.6321463584899902, -0.5956243276596069, -0.25181442499160767,...
def name ( self, name ) : if name is none : raise valueerror ( " invalid value for ` name `, must not be ` none ` " ) self. _ name = name
[ 0.014778664335608482, 0.1840142011642456, 0.041144631803035736, -0.23436057567596436, 0.18358543515205383, -0.2305835783481598, 0.10347366333007812, 0.3940497040748596, -0.11042408645153046, 0.847530722618103, -0.924835205078125, -0.7026101350784302, 0.09630832821130753, 0.7726419568061829...
def _ _ init _ _ ( self, pixelsize = 15, spritewidth = 8 ) : self. root = tk ( ) self. root. title ('ssd1306 sprite maker v1. 0') self. pixelsize = pixelsize self. spritewidth = spritewidth self. canvaswidth = pixelsize * spritewidth self. canvasheight = pixelsize * 8 self. animating = false self. placewidgets ( )
[ 0.511311411857605, 1.2551360130310059, 0.6481157541275024, 0.11070482432842255, -1.2300405502319336, 0.22378918528556824, 0.36532387137413025, 0.47574853897094727, 0.9654446840286255, -0.049363672733306885, -0.0008021002286113799, 0.41952890157699585, -0.4838349223136902, 1.280598878860473...
def generate _ map ( self, map _ name, images, keys ) : result = { map _ name : { } } key _ index = 0 for image _ id in images : ami = self. ec2. image ( image _ id ) ami _ name = ami. name creation _ date = ami. creation _ date self. print _ if _ verbose ('got : " { } " in " { } " '. format ( ami _ name, self. initial...
[ -1.0729321241378784, -0.577483594417572, 0.708207905292511, -0.9573299884796143, -0.4337254464626312, -0.27568140625953674, -0.5670881271362305, 0.022004028782248497, -0.18269097805023193, 0.6308771967887878, -0.570365846157074, -0.2667611539363861, 0.12856796383857727, 0.8323625326156616,...
def flatten ( lst ) : return [ inner _ list for sublist in lst for inner _ list in sublist ]
[ -0.3430558443069458, 0.21828502416610718, 0.43604063987731934, 0.9743785858154297, -0.08675424009561539, 0.8241069912910461, -0.9011836647987366, 1.2350256443023682, 0.09713462740182877, -0.6786114573478699, -1.4722148180007935, -0.1878155618906021, -0.7097091674804688, 0.7823348641395569,...
def client _ id ( self ) - > str : return pulumi. get ( self, " client _ id " )
[ 1.2569345235824585, -0.19521191716194153, 0.1424373835325241, 0.14112389087677002, 1.0994619131088257, 1.42971670627594, 0.4298657178878784, -0.1912393718957901, 0.585104763507843, -0.15475799143314362, 0.39113524556159973, 1.3559556007385254, 0.39937978982925415, -1.4635378122329712, -0...
def grayscale ( image ) : return image. convert ( " l " )
[ -0.43033280968666077, 0.7744521498680115, 0.22379741072654724, -1.259290099143982, 0.38708260655403137, 0.2511119842529297, -1.8401131629943848, -0.3589933514595032, 0.6148067712783813, 0.7021425366401672, 0.21564026176929474, -0.33206334710121155, -0.3826639652252197, 0.738855242729187, ...
def get _ geotweets _ by _ dates ( self, start _ date = none, end _ date = none, senti _ class = none ) : # if no start or end date filter to critical period if start _ date = = none : # try two weeks prior to release start _ date = self. ukreleasedate start _ date = datetime. combine ( ( start _ date - timedelta ( day...
[ -0.17496834695339203, 0.08211950957775116, 0.8942421674728394, 0.004491157364100218, 0.2097160369157791, 0.4300686717033386, -0.44490954279899597, -0.47551432251930237, -1.1075271368026733, 0.8266087174415588, 0.4819716811180115, 1.0882372856140137, 0.07986339926719666, -0.0125163169577717...
def compile _ match _ key _ fun ( self, p4 ) : print " compile _ match _ key _ fun " # if nothing specified in the " reads " expression then return none if not len ( self. field _ matches ) : return lambda p4 : none codel = ['def f ( p4 ) : ','match _ keyl = [ ]'] for fm in self. field _ matches : print'', fm assert le...
[ -0.686819851398468, -0.8926427364349365, 0.7952099442481995, 0.027546577155590057, 0.08546143770217896, -1.0175693035125732, 0.628434419631958, -0.08729799836874008, -0.5887515544891357, -0.2656615376472473, 0.23177777230739594, 0.003434666432440281, 0.6428937315940857, 0.10809584707021713...
def launch _ template _ specification ( self ) - > pulumi. input ['fleetlaunchtemplateconfiglaunchtemplatespecificationargs'] : return pulumi. get ( self, " launch _ template _ specification " )
[ 0.11389028280973434, -0.49988994002342224, 0.39011460542678833, -0.2059885859489441, -0.09065663814544678, 0.07268242537975311, -0.3618431091308594, 1.1962155103683472, 0.8948267102241516, 0.41295546293258667, -0.4732963442802429, 0.8984782695770264, 1.182567834854126, -0.5924172401428223,...
def get _ boundary _ intense ( img, show = false ) : if show : plt. gray ( ) plt. subplot ( 131 ) plt. title ( " original " ) plt. imshow ( img ) minlinelength = 50 maxlinegap = 10 img3 = np. zeros ( img. shape ) non _ zero = img > 0 img3 [ non _ zero ] = 255 x = misc. toimage ( img3, cmin = 0, cmax = 255, mode ='l') e...
[ 0.7177829146385193, -0.48411259055137634, 0.9733123183250427, 0.9433503150939941, 0.25005683302879333, 0.2918253540992737, -0.27986446022987366, 0.38671010732650757, 1.3652257919311523, 0.24309095740318298, 0.23018091917037964, 0.2612799108028412, -0.055188316851854324, 0.6749871969223022,...
def from _ proto ( msg : pbentitypayloadtype ) - >'entity':...
[ -0.005495280958712101, -0.6227192878723145, 0.2376457154750824, -0.3134595453739166, 0.8294578790664673, 0.8060588240623474, 0.35721123218536377, -0.3484644591808319, -0.1465543806552887, -0.8004240989685059, 0.18252891302108765, 0.1863943338394165, -0.30981624126434326, 0.9110585451126099...
def from _ dictionary ( cls, dictionary ) : if dictionary is none : return none # extract variables from the dictionary file _ type _ bucket _ extensions = dictionary. get ( " filetypebucketextensions " ) file _ type _ bucket _ name = dictionary. get ('filetypebucketname') # return an object of this model return cls ( ...
[ 0.19808882474899292, -0.18506573140621185, 0.2948532998561859, -0.5806384086608887, 0.07834164053201675, 0.17149734497070312, 0.019000161439180374, -0.1499418020248413, 0.21313787996768951, 0.24631771445274353, -0.39479130506515503, -0.8136396408081055, 0.5443317294120789, 0.02478348836302...
def detect _ problems ( filename, outfile = none ) : data = numpy. loadtxt ( fname = filename, delimiter = ',') if numpy. max ( data, axis = 0 ) [ 0 ] = = 0 and numpy. max ( data, axis = 0 ) [ 20 ] = = 20 : print ( " suspicious looking maxima " ) elif numpy. sum ( numpy. min ( data, axis = 0 ) ) = = 0 : print ( " minim...
[ 0.7807551622390747, -0.7517609596252441, 0.6252751350402832, 0.05530291423201561, 0.10384965687990189, 0.15396592020988464, 0.06898321956396103, 0.653702437877655, 0.660219132900238, -0.17632870376110077, 0.10477355122566223, 0.5716720223426819, -0.4399474263191223, 0.21141104400157928, ...
def create _ empty _ dataset ( host, clowder _ user, clowder _ pass, datasetname, description, parentid = none, spaceid = none ) : logger = logging. getlogger ( _ _ name _ _ ) url ='% sapi / datasets / createempty'% host if parentid : if spaceid : result = requests. post ( url, headers = { " content - type " : " applic...
[ -0.46272149682044983, 0.5977905988693237, 0.7378700971603394, -0.43332523107528687, -0.2553243339061737, 0.3959397077560425, -1.0300580263137817, -0.6190520524978638, -0.1251528263092041, -0.036896418780088425, -0.1792910248041153, 1.3316173553466797, -0.7042457461357117, 0.923409759998321...
def _ create _ install _ one _ of _ rule ( self, packages, reason, requirements = none ) : literals = [ self. _ pool. package _ id ( p ) for p in packages ] return packagerule ( literals, reason, requirements = requirements )
[ 0.11528926342725754, 0.14234121143817902, 0.1669129878282547, -0.5159066319465637, 1.1097087860107422, 0.2865150272846222, -0.599917471408844, 0.6918618679046631, 0.2755480408668518, 0.5052691102027893, 0.6802799105644226, -0.6589106917381287, -1.0665905475616455, 0.29758891463279724, -0...
def mod _ check ( ctx ) - > bool : if ctx. author. guild _ permissions. manage _ messages : return true return false
[ -0.005249291658401489, 0.6129288673400879, 0.6094566583633423, 0.629420280456543, 0.3889828622341156, 0.6897005438804626, -0.41651952266693115, -0.380236953496933, 0.1591264009475708, -0.20021450519561768, 0.4187282919883728, 1.1226136684417725, -1.1954536437988281, 0.8015820384025574, -...
def maybe _ download ( filename ) : if not os. path. exists ( work _ directory ) : os. mkdir ( work _ directory ) filepath = os. path. join ( work _ directory, filename ) if not os. path. exists ( filepath ) : filepath, _ = urlretrieve ( source _ url + filename, filepath ) statinfo = os. stat ( filepath ) print ('succe...
[ -0.4601339101791382, 0.1986253708600998, 0.6305010914802551, -0.30693531036376953, 0.5309300422668457, -0.2355317771434784, 1.334888219833374, -0.3008091449737549, 0.23522795736789703, -0.7418038249015808, 0.09963687509298325, -0.5253522396087646, -0.16538414359092712, 0.8324648141860962, ...
def rotation _ matrix ( axis, theta ) : theta = theta * math. pi / 180. 0 axis = np. asarray ( axis ) axis = axis / math. sqrt ( np. dot ( axis, axis ) ) a = math. cos ( theta / 2. 0 ) b, c, d = - axis * math. sin ( theta / 2. 0 ) aa, bb, cc, dd = a * a, b * b, c * c, d * d bc, ad, ac, ab, bd, cd = b * c, a * d, a * c,...
[ 0.4618763327598572, -0.41681748628616333, 0.6858319044113159, -1.0962555408477783, 0.3633039891719818, -0.16337239742279053, 0.5497116446495056, -0.3659636974334717, -0.3395545780658722, 0.11149441450834274, -0.5272906422615051, 0.464813232421875, 0.007034230511635542, -0.6985042095184326,...
def _ replace ( self, p, e ) : node = self. _ validate ( p ) old = node. _ element node. _ element = e return old
[ -0.3209954798221588, 0.23200078308582306, 0.4211527407169342, -0.5869914889335632, -0.16346827149391174, 0.4221702218055725, -0.5667654871940613, 1.291015863418579, 0.2899203598499298, -0.04872792959213257, 0.2571967542171478, 0.6110684275627136, -0.7845160365104675, -0.8040676712989807, ...
def entity _ model ( label ) : from entityfk. providers import get _ providers for provider in get _ providers ( ) : try : return provider. to _ model ( label ) except typenotsupported : pass raise exception ( ( " model { } could not be found " " and is not a registered model " ). format ( label ) )
[ -0.6055482029914856, -0.03315208479762077, 0.40302276611328125, 0.28581511974334717, 1.1431143283843994, 0.1957535445690155, -0.31998440623283386, -0.37124544382095337, 0.5172786116600037, 0.8922998905181885, -0.21895255148410797, -0.1653290092945099, 0.1624128222465515, -0.018964564427733...
def custom _ precision ( y _ true, y _ score ) : y _ true = label _ binarize ( y _ true, classes = np. unique ( y _ true ) ) average _ precision = average _ precision _ score ( y _ true, y _ score, average ='weighted') return average _ precision
[ -0.029611701145768166, -0.7945027351379395, 0.6042623519897461, 0.07436373829841614, 0.2671011686325073, -0.6789500713348389, -0.3041740655899048, 0.3013762831687927, -0.3972855508327484, 0.8726917505264282, 0.6217416524887085, 0.417478084564209, 0.7218549251556396, -0.13328798115253448, ...
def tsplit ( string, delimiters ) : delimiters = tuple ( delimiters ) stack = [ string, ] for delimiter in delimiters : for i, substring in enumerate ( stack ) : substack = substring. split ( delimiter ) stack. pop ( i ) for j, _ substring in enumerate ( substack ) : stack. insert ( i + j, _ substring ) return stack
[ -0.9472405910491943, 1.1561044454574585, 0.6092748641967773, -0.8416216969490051, -0.417519211769104, -0.9871527552604675, -0.6009094715118408, 0.5456951856613159, -0.8245306611061096, 1.2991664409637451, -0.7312482595443726, -0.5710194706916809, -0.428484171628952, -1.610845685005188, -...
def func _ regional ( regional : object ) - > list : add _ grp _ c = regional. find ('addgrpc') nodes = add _ grp _ c. find ('nodes') nodes _ regional _ list = [ ] for s in nodes. findall ('nodexy') : for t in s. findall ( '. / / node - latlon') : lat = t. find ('lat'). text lon = t. find ('lon'). text pos = ( format _...
[ -0.44886866211891174, -0.22116829454898834, 0.42433375120162964, -1.1347546577453613, 0.11048606783151627, -0.4841066598892212, 0.01868516579270363, 0.8582167625427246, -0.7272778749465942, 1.393829584121704, -0.5676809549331665, 0.3001731336116791, 0.87992924451828, -0.24785536527633667, ...
def _ update _ stats ( self ) : data = { } total _ gb ='unknown'alloc _ gb ='unknown'free _ gb ='unknown'v = self. vmem _ vip # 5. x. x arrays do not have a free _ bytes node, so we have to # compute it manually. # bn1 = " / vshare / state / global / 1 / container / % s / total _ bytes " \ % self. container bn2 = " / v...
[ 0.4324267506599426, -0.17242953181266785, 0.54719477891922, -0.31265556812286377, 0.13658955693244934, -0.2799449563026428, 0.06808977574110031, -0.8293289542198181, 0.022172633558511734, 0.6351028680801392, -0.5747110843658447, 0.4515231251716614, -0.4114169776439667, 0.22223880887031555,...
def is _ valid _ proof ( cls, block, block _ hash ) : return ( block _ hash. startswith ('0'* self. blockchain. difficulty ) and block _ hash = = block. compute _ hash ( ) )
[ 0.8506200313568115, -0.6395189762115479, 0.38740840554237366, 1.6294198036193848, -0.047856055200099945, -0.06851967424154282, -0.7535278797149658, 0.7081223130226135, 0.4513387680053711, 0.13122732937335968, -0.11959372460842133, 0.16299858689308167, -0.658422589302063, 0.9976288080215454...
def calculate _ rate _ common ( cls, new _ number, volume, open _ number, activation _ number ) : conversion _ rate ='' open _ rate ='' activation _ rate ='' if new _ number > 0 and volume > 0 : conversion _ rate = " { number } % ". format ( number = round ( ( volume / new _ number ) * 100, 2 ) ) if volume > 0 and open...
[ 0.07970692217350006, -0.7353113889694214, 0.6416226625442505, -0.289154976606369, 0.5335692167282104, -0.39951854944229126, -0.16206605732440948, -0.2973099648952484, -0.7167449593544006, 0.8482966423034668, 0.7795608639717102, -0.698239803314209, -1.0695470571517944, -0.1945841908454895, ...
def cogroup ( self, other : " groupeddata " ) - > " pandascogroupedops " : from pyspark. sql import groupeddata assert isinstance ( self, groupeddata ) return pandascogroupedops ( self, other )
[ -0.39503154158592224, 0.8885589241981506, 0.5476698279380798, 0.37498241662979126, -0.0710964947938919, -0.32345184683799744, 0.4675017297267914, -1.1863757371902466, -0.38645443320274353, -0.28685954213142395, 0.9697388410568237, -0.06276822090148926, 0.46719878911972046, -0.1519265919923...
def calculate _ advantage ( self, buffer : memory ) - > torch. tensor : with torch. no _ grad ( ) : q _ val = self. calculate _ q _ val ( buffer ) advantage = self. calculate _ gae ( buffer, q _ val ) return advantage
[ 0.22885482013225555, 0.15502318739891052, 0.47392794489860535, 0.5124650001525879, -0.194412961602211, 0.14640110731124878, 0.735176146030426, -0.23356132209300995, 0.1817478984594345, -0.08779177814722061, -0.8970101475715637, 0.44277098774909973, -0.6106082797050476, 0.6140186786651611, ...
def addnextmove ( self, side, newstatus, priority, msg ) : if side is not none and side. isunset ( ) and newstatus! = unset and \ side. id not in self. processedsideids : move = hexgamemove ( side. id, newstatus, unset, priority, msg = msg, fromsolver = true ) self. nextmovelist. append ( move ) self. processedsideids....
[ -0.5415239930152893, 0.4079849421977997, 0.6874145269393921, 0.09829991310834885, 0.19523395597934723, 0.12876667082309723, -1.7274502515792847, 0.4923889935016632, 0.5743523836135864, -0.07807834446430206, -0.28047481179237366, 0.041987042874097824, -0.38617703318595886, 1.303675889968872...
def _ generate _ video _ source ( self ) - > str : if self. _ srs _ enabled : return ffmpeg _ srs _ rtmp _ video _ src. format ( livestream _ name = srs _ livestream _ name _ tpl. format ( channel = self. _ stream _ conf. channel, cam _ id = self. cam. id, ) ) return ffmpeg _ cam _ video _ src. format ( user = self. _ ...
[ 0.25404515862464905, 0.18376782536506653, 0.4263575077056885, 0.42547807097435, 0.193940207362175, -0.4252544045448303, -0.37742698192596436, 0.031694673001766205, 0.8264601826667786, -0.027771685272455215, -0.2500869333744049, 0.40527352690696716, -0.38476482033729553, 0.8915054202079773,...
def create _ rigid _ blade _ dynamics _ file ( radius, unit _ factor = u. in2ft, iaero = 1, irvflo = 0, isv66 = false, isrotor = true, * * kwargs ) : # get propeller info with io. stringio ( ) as bd _ file : def write _ array ( arr ) : for i, el in enumerate ( arr ) : if i > 0 and i % 10 = = 0 : bd _ file. write ( " \ ...
[ 0.7030065059661865, -0.666102409362793, 1.1303390264511108, 0.6121135354042053, 0.4841218888759613, 1.048231840133667, 0.3882642388343811, -0.18340851366519928, -0.6373011469841003, -0.08272603154182434, 0.31968069076538086, 0.17042191326618195, -0.6324527859687805, 0.22571253776550293, ...
def _ _ cmp _ _ ( self, other ) : assert isinstance ( other, caption ) if self. score = = other. score : return 0 elif self. score < other. score : return - 1 else : return 1
[ -0.3706692159175873, -1.3584421873092651, 0.8443612456321716, 0.03315841406583786, -0.22748807072639465, 0.5019273161888123, 0.42547857761383057, -1.372268795967102, 0.7266680002212524, -0.22210080921649933, -0.8280417919158936, 0.11170414835214615, 0.2525958716869354, 0.434979647397995, ...
def plot _ maps _ external ( self, time, radius, *, nmax = none, reference = none, source = none ) : reference ='all'if reference is none else reference. lower ( ) source ='all'if source is none else source time = np. array ( time, dtype = float ) radius = np. array ( radius, dtype = float ) theta = np. linspace ( 1, 1...
[ -0.03972514346241951, 0.2700084447860718, 1.0202492475509644, -0.7226262092590332, -0.40006938576698303, -0.12970894575119019, -0.1150396540760994, 0.16920419037342072, -0.0017463931581005454, 0.11696647107601166, 0.11284678429365158, 1.1786924600601196, -0.07366318255662918, 1.18835258483...
def set _ dist ( self, dist ) : assert isinstance ( dist, nc. distance ) self. dist = dist self. dist. prepare _ if _ needed ( self. be _ cosmo )
[ -0.24877098202705383, 0.22025147080421448, 0.12614218890666962, 0.4634610116481781, 0.1738431751728058, 0.878792405128479, -0.2162656933069229, 0.8649938702583313, 0.2448921650648117, -0.2198299914598465, -0.953662633895874, 0.5842296481132507, 0.3193944990634918, 1.1487314701080322, 0.6...
def get ( cls, service, name = " ", option _ = " " ) : try : obj = nsacl6 _ stats ( ) if not name : response = obj. stat _ resources ( service, option _ ) else : obj. acl6name = name response = obj. stat _ resource ( service, option _ ) return response except exception as e : raise e
[ 0.3497430384159088, 0.044380974024534225, 0.5317550897598267, -0.1888308823108673, -0.022577369585633278, -0.9990841150283813, -0.4997938275337219, -1.2335888147354126, 1.1765260696411133, -0.031545765697956085, -0.040338657796382904, -0.022220037877559662, 0.1314481794834137, 0.1664727330...
def matching _ attribute ( pair : tuple, attribute : attribute ) - > bool : return getattr ( pair [ 0 ], attribute. name ) = = \ getattr ( pair [ 1 ], attribute. name )
[ -0.7062759399414062, -0.23779545724391937, 0.5178704261779785, -0.0692334771156311, -0.6858871579170227, -0.02059086039662361, -0.18396008014678955, -0.19742397964000702, -0.4428175389766693, 1.1090679168701172, 0.5714836120605469, 0.045354124158620834, 0.4154360592365265, -0.9272193312644...
def marshal ( self ) : pieces = self. method. encode ( ) pieces. insert ( 0, struct. pack ('> i ', self. method. index ) ) return self. _ marshal ( pieces )
[ -0.12950091063976288, 0.828221321105957, 0.24294905364513397, -0.6999322772026062, -0.23438984155654907, -0.5811362862586975, -0.561299741268158, -0.809333086013794, 0.4317188262939453, -0.7843151092529297, -0.4633115828037262, 0.7020301818847656, -0.703315258026123, -0.3856801986694336, ...
def _ _ call _ _ ( self, func ) : cls = self. _ _ class _ _ return innereventdecorator ( func, cls. event _ type, cls. valid _ args, * self. args, * * self. kwargs )
[ -0.28874510526657104, -0.03319757059216499, 0.6797018051147461, -0.10617958754301071, 0.06679834425449371, 0.06497186422348022, -0.46084776520729065, 0.6811307668685913, 0.7337855696678162, -0.3753799796104431, 0.5090168714523315, 0.5854624509811401, -0.1310538351535797, 0.0465355291962623...
def test _ incar _ validate ( vasp _ calc, vasp _ inputs, sandbox _ folder ) : from aiida. common import validationerror inputs _ dict = {'gga':'pe ','smear': 3 # < - invalid tag } inputs = vasp _ inputs ( parameters = inputs _ dict ) calc = vasp _ calc ( inputs = inputs ) with pytest. raises ( validationerror ) : calc...
[ 0.363197386264801, 0.8636173605918884, 0.5452394485473633, 0.4805549681186676, -0.2784990072250366, 0.8767544627189636, 0.2106931358575821, -0.003980081528425217, -0.008046616800129414, -0.38388505578041077, 0.46434685587882996, -0.3741057217121124, 0.24097298085689545, 0.4279157221317291,...
def depparse ( self, mode = " enhancedplusplus " ) : assert mode in [ " basic ", " alternative ", " collapsedccprocessed ", " collapsed ", " enhanced ", " enhancedplusplus ", ], " invalid mode " dep _ pb = getattr ( self. pb, mode + " dependencies " ) if dep _ pb is none : raise attributeerror ( " no dependencies for m...
[ 0.2408338189125061, -0.5058599710464478, 0.5576045513153076, -1.0692769289016724, -1.0143046379089355, 0.9777631759643555, -0.39053842425346375, -0.08725276589393616, 0.2835085391998291, -0.26363059878349304, -0.2139299213886261, -0.7478389739990234, -0.6136399507522583, 0.6537781953811646...
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, vpptokensubscription ) : return false return self. to _ dict ( ) = = other. to _ dict ( )
[ 0.14732404053211212, -0.23938803374767303, 0.5438399314880371, -0.2309984266757965, -0.4926968812942505, 0.024017203599214554, -1.388864278793335, -0.5192872881889343, 0.8627778887748718, 0.5780963897705078, -1.1559553146362305, 0.5778009295463562, -0.6695483922958374, -0.6969709396362305,...
def predict ( self, * args, * * kwargs ) : return none
[ -0.55367112159729, -0.524236261844635, 0.30684545636177063, 0.4244552552700043, 0.2542933225631714, -0.21026210486888885, -0.33209821581840515, 0.14477889239788055, -0.4750687777996063, -1.2640374898910522, -0.48548561334609985, 0.3971320390701294, -0.9689866304397583, 0.1396251767873764, ...
def changed _ time ( self ) - > optional [ str ] : return pulumi. get ( self, " changed _ time " )
[ 0.7262658476829529, -0.013486464507877827, 0.4344649314880371, 0.2730107009410858, 0.8188340663909912, 0.7334704995155334, -0.6285244226455688, -0.03716534748673439, 0.47534847259521484, 0.7478063702583313, -0.4785439670085907, 1.465911626815796, 0.4731188416481018, -0.1304996758699417, ...
def get _ last _ names _ 2010 ( ) : filename = '. / data / names / names _ 2010census _ top1000. csv'# use pandas to get data # https : / / stackoverflow. com / questions / 42138966 / pandas - read - csv - ignore - commas - one - column - per - line df _ last = pd. read _ csv ( filename, sep = ', ', header = none ) # d...
[ -0.10617278516292572, -0.4713549017906189, 0.915944516658783, -0.7965851426124573, 0.24466677010059357, 0.421324223279953, -0.7001565098762512, -0.3999413847923279, -0.17562474310398102, 0.599454402923584, 0.14226366579532623, 0.45023608207702637, 0.3767819106578827, -0.6900335550308228, ...
def segmentationmodel ( input _ shape = ( 256, 256, 3 ), out _ channels = 1 ) : img _ input = input ( shape = input _ shape, dtype ='float32') conv1 = conv2d ( 64, ( 3, 3 ), activation ='linear ', padding ='same ', use _ bias = false, name ='conv1') ( img _ input ) x = batchnormalization ( axis = 3 ) ( conv1 ) x = acti...
[ -0.12209879606962204, -0.21031050384044647, 0.8989720344543457, 0.47044745087623596, -0.8608792424201965, -0.20001527667045593, 0.07787153869867325, -0.43226000666618347, 0.6199831366539001, 0.2537333071231842, -0.8489259481430054, -0.43707525730133057, 0.47332534193992615, -0.294521003961...
def table _ location ( self, table, strip _ nameservice = false ) : self. _ tables _ init ( ) table _ location = self. table _ metadata ( table ) ['location'] if strip _ nameservice and table _ location. startswith ('hdfs : / /') : table _ location = urlparse ( table _ location ) [ 2 ] return table _ location
[ -0.6040260791778564, -0.003382723545655608, 0.4519084095954895, 0.860917329788208, -0.18496514856815338, 0.14015978574752808, 0.41682785749435425, -0.15841612219810486, -0.10948188602924347, -0.12728038430213928, 0.702218234539032, -0.08781933784484863, 0.433923602104187, 0.205748915672302...
def get _ users ( num ) : output = [ { " password " : pwd, # admin1234 " last _ login " : datetime. now ( ), " is _ superuser " : 0, " username " : fake. simple _ profile ( ) [ " username " ], " first _ name " : fake. first _ name ( ), " last _ name " : fake. last _ name ( ), " email " : fake. email ( ), " is _ staff "...
[ -0.6772012710571289, 0.9275052547454834, 0.4355026185512543, 0.06407720595598221, 0.24437834322452545, -0.17463286221027374, -0.17532671988010406, -1.0704569816589355, -0.39181947708129883, -0.3225879371166229, -1.7395528554916382, -0.13718661665916443, 0.057874880731105804, 0.095081247389...
def inspectloopmaker ( self, side ) : # only process unset sides if side. isunset ( ) : # get the whole link link = sidelink. fromside ( side, simple = false ) # get the connected sides on each endpoint connactivesides1 = link. endpoints [ 0 ]. getactivesidesexcept ( link. endlink [ 0 ]. id ) connactivesides2 = link. e...
[ 0.18379367887973785, -0.05577823892235756, 0.7805969715118408, -0.7336576581001282, 0.22055397927761078, -0.18264611065387726, 0.6252797842025757, -0.7227790951728821, -0.07306458801031113, 0.1828259527683258, 0.4070264995098114, 0.5105305910110474, -0.2972189784049988, 0.36465588212013245...
def tfit ( self, save = false, fitres = false ) : line = [ 6300, 6587 ] nel = len ( line ) f = plt. figure ( figsize = ( 6, 6 ) ) f. subplots _ adjust ( hspace = 0. 0001 ) ax = [ ] for i in range ( nel ) : p = getelnum. getelnum ( line [ i ] ) elstr = p. elstr. upper ( ) if i is 0 : ax. append ( plt. subplot ( nel, 1, ...
[ 0.715874969959259, 0.32528170943260193, 0.7504312992095947, -0.228071391582489, -0.10899993777275085, 0.8127768039703369, 0.6854947805404663, -0.27150195837020874, -0.28541672229766846, -0.42216676473617554, 0.16252794861793518, 0.029881443828344345, 0.14848273992538452, 0.5227105021476746...
def stop ( self, timeout = none ) : self. thread. stop _ request. set ( ) self. lock. acquire ( ) self. lock. notify ( ) self. lock. release ( ) self. thread. stop ( timeout = timeout )
[ -0.6717354655265808, -0.017771262675523758, 0.42304667830467224, 0.3424220085144043, 0.5147711038589478, -0.029670387506484985, -0.5060153007507324, 0.5214000940322876, -0.7127722501754761, -0.14607855677604675, -0.17247258126735687, 0.26687338948249817, -0.3904130458831787, -0.24684722721...
def pcaploop ( ) : pc = pcap. pcap ( name = opt. iface, immediate = true, promisc = false ) # use a generic filter to get around bugs on certain systems pc. setfilter ('tcp or udp') try : debug ( " listening on % s : % s " % ( pc. name, pc. filter ) ) for ts, pkt in pc : ethp = dpkt. ethernet. ethernet ( pkt ) if hasat...
[ -0.478702187538147, -0.5007665157318115, 0.6775964498519897, -0.24614830315113068, 0.013871487230062485, 0.3311524987220764, -0.07499173283576965, -0.1949666440486908, 0.3146040141582489, 0.5705501437187195, 0.6350487470626831, -0.7509943246841431, -0.1124933511018753, -0.12568338215351105...
def common _ count ( self, node _ 1, node _ 2 ) : return int ( len ( set ( nx. neighbors ( self. graph, node _ 1 ) ). intersection ( set ( nx. neighbors ( self. graph, node _ 2 ) ) ) ) )
[ 0.6136040091514587, 0.5666859745979309, 0.867722749710083, 0.15847085416316986, 0.25716137886047363, 0.8256922364234924, 0.18846184015274048, 0.40043357014656067, -1.6011309623718262, 0.4018443524837494, 0.18930421769618988, 0.33235764503479004, -0.1650104820728302, -0.23167073726654053, ...
def update _ on _ modify ( obj, event ) : registry = getutility ( iregistry ) settings = registry. forinterface ( ihootsuiteregistry ) if settings. portal _ types and ( obj. portal _ type in settings. portal _ types ) and ( event. new _ state. id = ='published') : # send the title to hootsuite datadt = obj. geteffectiv...
[ -0.454845666885376, -0.7386512756347656, 0.874136745929718, 0.41633060574531555, 0.2559725344181061, 0.2771310806274414, -0.931913435459137, -0.36278292536735535, 0.3188251256942749, 0.6837125420570374, -0.3261224031448364, 0.21797890961170197, 0.011392589658498764, 0.8650191426277161, 0...
def _ _ init _ _ ( self, name, ssn, address = " " ) : super ( ). _ _ init _ _ ( name, ssn, address ) self. course _ grades = [ ]
[ 0.8946378827095032, 0.3659614026546478, 0.7227482795715332, 0.3388504385948181, 0.24709340929985046, 0.5258014798164368, -0.8588982224464417, 0.9084535241127014, 0.2855817377567291, -0.29133379459381104, -0.7641400098800659, 0.6524646282196045, 0.36739227175712585, 0.7204234600067139, -0...
def train _ val _ test _ split ( ) : csv _ file = " / home / gyzhang / speech _ database / cstelling / new _ fine _ cut _ audio _ data _ 1 _ 17 / cst. csv " out _ dir = ". / " csv _ lines = pd. read _ csv ( filepath _ or _ buffer = csv _ file ) # append spk _ id now pdb. set _ trace ( ) rows = csv _ lines. shape [ 0 ] ...
[ -0.276689350605011, 0.193635031580925, 0.8410838842391968, 0.051407262682914734, 0.1751190721988678, 0.5748172998428345, 0.34045326709747314, 0.8932033777236938, -0.25942710041999817, 0.7226114869117737, -0.09862249344587326, 0.11711268872022629, 0.5287466645240784, -0.43675747513771057, ...
def call ( self, pxo, training ) : point, feat, row _ splits = pxo # ( n, 3 ), ( n, c ), ( b + 1 ) feat _ q, feat _ k, feat _ v = self. linear _ q ( feat ), self. linear _ k ( feat ), self. linear _ v ( feat ) # ( n, c ) feat _ k = queryandgroup ( self. nsample, point, point, feat _ k, none, row _ splits, row _ splits,...
[ 0.8881000876426697, 0.3826146423816681, 0.6208739876747131, 0.46653059124946594, -1.1643686294555664, 0.069954514503479, 0.8192787766456604, 0.2880760133266449, -0.0703587532043457, -0.3511667847633362, -0.6913437843322754, -0.1015017181634903, -0.07597718387842178, -0.25086504220962524, ...
def test _ set _ blue _ values ( ufo _ module ) : data _ in = [ gsalignmentzone ( pos = 500, size = 15 ), gsalignmentzone ( pos = 400, size = - 15 ), gsalignmentzone ( pos = 0, size = - 15 ), gsalignmentzone ( pos = - 200, size = 15 ), gsalignmentzone ( pos = - 300, size = - 15 ), ] expected _ blue _ values = [ - 200, ...
[ -0.7444316148757935, -0.5535988211631775, 0.6820127367973328, -0.03211589157581329, 0.3593344986438751, 0.7033502459526062, 0.5012715458869934, -0.03434901684522629, 0.19985999166965485, -0.699589192867279, -0.7450313568115234, 0.4296152889728546, -0.030222147703170776, 0.8540017008781433,...
def promjeni _ boju ( self ) : logging. debug ('zahtjev za promjenom boje') # defaultni izbor rgb = self. defaultgraf [ 8 ] a = self. defaultgraf [ 9 ] # convert u qcolor boja = pomocne _ funkcije. default _ color _ to _ qcolor ( rgb, a ) # poziv dijaloga za promjenu boje color, test = qtgui. qcolordialog. getrgba ( bo...
[ -0.31053677201271057, 0.05867314711213112, 0.6648576259613037, -0.665703296661377, -0.044160496443510056, 0.14639297127723694, 0.5266194343566895, -0.3121386170387268, -1.0179591178894043, 0.5552922487258911, -0.554214596748352, 0.35751214623451233, -0.7349978089332581, 1.291557788848877, ...
def _ get _ next _ filenames ( self, batch _ size, dataset, return _ start _ pos = false ) : filenames, start _ pos = none, none with self. position _ lock : if dataset = ='train': start _ pos = self. _ train _ pos filenames = self. _ train _ filenames [ self. _ train _ pos : self. _ train _ pos + batch _ size ] if len...
[ -0.5325050354003906, -0.45763474702835083, 0.9952458143234253, -0.39187389612197876, -0.2969452440738678, -0.061784375458955765, 0.512394368648529, 0.41292184591293335, 0.30064260959625244, 0.037922535091638565, 0.024415098130702972, -0.08872104436159134, -0.06363284587860107, 0.2022303491...
def state _ attributes ( self ) : return self. _ variables. copy ( )
[ -0.8804425597190857, -1.0241165161132812, 0.3952508568763733, 0.16783232986927032, -1.1399452686309814, 0.41803622245788574, 0.02933683432638645, -0.29876235127449036, 0.2529616057872772, 0.6827539205551147, -0.5154299736022949, 0.07393834739923477, -0.5407410264015198, -0.5041683912277222...
def setrelationships ( self, layers ) : if self. inputlayer = = false : self. parents = layers [ self. layernum - 1 ] if self. outputlayer = = false : self. children = layers [ self. layernum + 1 ]
[ -0.5792750120162964, -0.03499811887741089, 0.3884257972240448, -0.33013293147087097, 0.4835915267467499, 0.24471062421798706, 1.0901508331298828, -0.6326156854629517, -0.41873711347579956, -0.3735319972038269, 0.08097214996814728, -0.027042539790272713, -1.3230208158493042, 0.2813774943351...
def _ _ truediv _ _ ( self, other ) : other = build _ cpo _ expr ( other ) assert self. is _ kind _ of ( type _ floatexpr ) and other. is _ kind _ of ( type _ floatexpr ), " operands of / should be float or integer expressions " return cpofunctioncall ( oper _ float _ div, type _ floatexpr, ( self, other ) )
[ 0.12163295596837997, 0.08370592445135117, 0.7723649740219116, 0.9724275469779968, -0.6345992088317871, 0.28462690114974976, 1.05381178855896, -0.45945310592651367, -0.5536676645278931, 0.21684351563453674, -0.06613904237747192, 0.10549767315387726, -0.7661341428756714, 0.5280451774597168, ...
def great _ circle _ distance ( self, * * kwargs ) : r = 6371 # radius of earth in kilometers other _ latitude, other _ longitude = parse _ lat _ lng ( kwargs ) if other _ latitude is none or other _ longitude is none : return none other _ cos _ rad _ lat = math. cos ( math. radians ( other _ latitude ) ) other _ sin _...
[ 0.1425146758556366, -0.4256151020526886, 0.969373345375061, -0.9105876088142395, -0.32774603366851807, 0.266331285238266, -0.313772588968277, -0.31448400020599365, 0.3794645667076111, 0.01870627887547016, -0.571549654006958, -0.19494237005710602, -0.4955936074256897, 0.035705335438251495, ...
def set _ present ( self ) : self. presence = _ pres _ present
[ -0.5932208299636841, -1.5173680782318115, 0.5927624702453613, -0.16392721235752106, 0.7121319770812988, 1.5170785188674927, 0.25900572538375854, 1.1783051490783691, 0.12147792428731918, 0.6276542544364929, 0.0641612559556961, 0.059324756264686584, -0.04824354499578476, 0.5596646666526794, ...
def oriented ( self, * args ) : return _ topods. topods _ shape _ oriented ( self, * args )
[ -0.2523820698261261, -0.1978396475315094, 0.28737354278564453, -0.6606892347335815, 0.7648904919624329, 0.5531635284423828, 0.37964102625846863, -1.2679541110992432, -0.32734590768814087, -0.14588992297649384, -0.3791704773902893, -0.34334611892700195, -0.16746599972248077, -0.536401569843...
def is _ longer ( dna1, dna2 ) : if dna1 > dna2 : return true elif dna1 = = dna2 : return false else : return false
[ -0.16557666659355164, 0.031565554440021515, 0.5742411017417908, 0.08090230822563171, -0.5812138915061951, 0.11580827832221985, -1.624189853668213, -0.02704150788486004, 0.21291415393352509, -0.0932750254869461, -0.8402695059776306, 1.0320769548416138, 0.47599008679389954, 0.360157102346420...
def winbio _ winbioenrollcommit ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " identity ", " isnewtemplate " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.5022653341293335, -0.7521330118179321, 0.6014454364776611, 0.442154198884964, -0.14980652928352356, 0.5663111209869385, 0.6923269629478455, -0.2110091894865036, -0.21117264032363892, 1.4621328115463257, -0.46483150124549866, 0.24407564103603363, -1.424081802368164, 1.1137434244155884, ...
def get _ page ( self, target _ url : str ) - > hostednumberorderpage : response = self. _ version. domain. twilio. request ( " get ", target _ url ) return hostednumberorderpage ( self. _ version, response )
[ -0.20515283942222595, 0.7099718451499939, 0.36431196331977844, 0.5109837651252747, 0.44335827231407166, 0.23871536552906036, -0.9830133318901062, 0.1604788899421692, 0.2730713486671448, -0.10706827044487, -0.2909325361251831, -0.29827257990837097, -0.011137275956571102, -0.4183486998081207...
def average _ max _ temp _ month ( year : int, month : str ) - > float : max _ temp = [ temp [ 1 ] for temp in temp _ dataset [ year ] [ month ] ] return statistics. mean ( max _ temp )
[ 0.23677946627140045, -0.5896701216697693, 0.17365264892578125, 0.15231336653232574, -0.5946542024612427, 0.2655767798423767, -0.7621707320213318, 0.6514157652854919, -0.14045383036136627, 1.2334805727005005, -0.3835688829421997, 0.4577869474887848, -0.29548802971839905, 0.16124342381954193...
def _ _ init _ _ ( self ) : if tdsconfiguration. _ _ instance is none : tdsconfiguration. _ _ instance = self self. db _ type = none self. db _ details = { } try : try : tds _ dir _ path = os. path. dirname ( os. path. abspath ( _ _ file _ _ ) ) file _ object = xml. dom. minidom. parse ( tds _ dir _ path + r'\ tds. xml...
[ 0.022948971018195152, 0.00960448943078518, 0.7561367750167847, -0.19764284789562225, -0.0947841927409172, -0.009325966238975525, 0.2988615036010742, 0.00029138303943909705, -0.6150209903717041, -0.1947311908006668, 0.07462410628795624, -0.277144193649292, 0.3855608403682709, 0.842727959156...
def _ network _ template ( self, state ) : weights _ initializer = slim. variance _ scaling _ initializer ( factor = 1. 0 / np. sqrt ( 3. 0 ), mode ='fan _ in ', uniform = true ) net = tf. cast ( state, tf. float32 ) net = tf. div ( net, 255. ) net = slim. conv2d ( net, 32, [ 8, 8 ], stride = 4, weights _ initializer =...
[ -0.5536831617355347, 0.3791773319244385, 0.5782005786895752, -0.7867395281791687, -0.23427772521972656, -0.3902496099472046, 0.06721406430006027, -0.14851032197475433, 0.7103238701820374, -0.516194760799408, -0.5686911344528198, -0.7268408536911011, 0.35030707716941833, 0.09566284716129303...
def read _ data _ from _ file ( file _ name, list _ of _ product _ objects ) : try : file = open ( file _ name, " r " ) except filenotfounderror as e : print ( " please make sure the file by the name of : " + file _ name + " exists! " ) print ( " if using the cmd window, change directory to the folder you're working in...
[ -0.5011036396026611, -0.9222497344017029, 0.5734345316886902, 0.7142609357833862, 0.12097147107124329, 1.039868950843811, 0.5075089931488037, 0.14471381902694702, -0.9552967548370361, 0.6221675276756287, 0.11035080999135971, 0.15482467412948608, 0.2671278119087219, 0.17038291692733765, -...
def read _ neurone _ events ( fpath, session _ phase = 1, sampling _ rate = none ) : fname = path. join ( fpath, str ( session _ phase ), " events. bin " ) # get the sampling rate unless provided if sampling _ rate is none : protocol = read _ neurone _ protocol ( fpath ) sampling _ rate = protocol ['meta'] ['sampling _...
[ -0.5290569067001343, 0.02635873854160309, 0.8386785984039307, -0.6575281023979187, -0.3548183739185333, -0.3235040307044983, 0.402778685092926, -0.14615191519260406, -0.33205801248550415, 0.8697811365127563, -0.35229265689849854, -0.17497941851615906, 0.0035067819990217686, 0.1865972429513...
def encode _ image ( image ) : encoded _ image = tf. train. feature ( bytes _ list = tf. train. byteslist ( value = [ image. tostring ( ) ] ) ) feature _ dict = { " image " : encoded _ image } features = tf. train. features ( feature = feature _ dict ) return tf. train. example ( features = features )
[ -0.15315547585487366, 0.12521323561668396, -0.11252052336931229, -0.1636323183774948, -0.6256658434867859, -0.1914833039045334, -0.28776904940605164, 0.7782896161079407, 0.36931440234184265, 0.39319947361946106, -0.9944098591804504, 0.37775731086730957, 0.032098837196826935, -0.05986936017...
def get _ market _ stats ( self, uuid ='market ', filter = none, * * kwargs ) : if filter : return self. request ( f'markets / { uuid } / stats ', method ='post ', dto = filter, * * kwargs ) return self. request ( f'markets / { uuid } / stats ', * * kwargs )
[ -1.021472454071045, 1.1707221269607544, 0.2620336711406708, -0.12310653179883957, -0.028503483161330223, -0.4651229679584503, -0.5489257574081421, -0.3660608232021332, -0.011168915778398514, -0.3469198942184448, -0.23108594119548798, 1.1470962762832642, -0.6391698718070984, -0.231603682041...
def _ test _ decision _ tree _ regression ( ) : folder _ name = ". " from os import listdir files = sorted ( [ file for file in listdir ( folder _ name ) if " csv " in file ] ) for file in files : print file, test _ decision _ tree _ regression ( file )
[ 0.3837374746799469, 0.02545224502682686, 0.6051821708679199, 0.4510601758956909, 0.6892905831336975, -0.00015203071234282106, 0.6401696801185608, 0.2075270116329193, -0.24485889077186584, -0.09190940111875534, 0.029019061475992203, 0.6243754029273987, -0.19145771861076355, 0.82236427068710...
def append _ file ( self, file, * * options ) : self. append ( png. open _ any ( file ), * * options )
[ -0.35193175077438354, 0.15376365184783936, 0.4297839403152466, 0.18639259040355682, 0.30196112394332886, 0.6109697818756104, -0.6399080157279968, -0.10174800455570221, -0.4060511887073517, -1.316280484199524, 0.17509996891021729, -0.3473931550979614, 0.19977319240570068, 1.3030478954315186...
def find _ min _ ecm ( self ) : ecm _ list = [ ] for n in range ( 0, 10 ) : p = n * 0. 1 check _ error = pd. dataframe ( ) check _ error ['predictions'] = self. error _ df. probability > p check _ error ['labels _ bool'] = self. error _ df. labels _ bool check _ error ['fn'] = check _ error. parallel _ apply ( lambda r...
[ -0.47001639008522034, -0.11914928257465363, 0.7125990986824036, -0.38020166754722595, 1.1041476726531982, 0.32577985525131226, 0.01845899224281311, -0.1346798986196518, -0.7899079322814941, -0.3347741961479187, 0.2384262979030609, -0.15013736486434937, -0.7136155962944031, 0.46272215247154...
def box _ contains ( big, small ) : return ( interval _ contains ( big [ 0 ], small [ 0 ] ) and interval _ contains ( big [ 1 ], small [ 1 ] ) )
[ -0.14978419244289398, -0.0034365965984761715, 0.591776967048645, 0.03198261559009552, -0.5319200158119202, 0.0758836641907692, -1.1367981433868408, -0.86907958984375, -0.42796245217323303, -0.10255900770425797, -0.9679320454597473, 0.3264378607273102, -0.5652354955673218, -0.39095079898834...
def validate _ codons ( starts, stops ) : validalphabets = ['a ','c ','t ','g'] if not starts : starts = [ ] if not stops : stops = [ ] # check lengths for c in starts : if not len ( c ) = = 3 : print ('invalid start codon :'+ c ) return false if not ( ( c [ 0 ] in validalphabets ) and ( c [ 1 ] in validalphabets ) and...
[ -0.6574242115020752, -0.503403902053833, 0.8671585321426392, -0.4590419828891754, -0.13487888872623444, 1.1481602191925049, 0.03655298426747322, 0.05723559483885765, -0.6786868572235107, 0.6394909620285034, -1.0237234830856323, -0.14225542545318604, -0.3166598379611969, -0.3131267726421356...
def target _ portal _ member ( self ) : return self. _ target _ portal _ member
[ -0.003002568380907178, -1.2287685871124268, 0.22520916163921356, -0.5647958517074585, -0.032523833215236664, 1.4970126152038574, -0.2411755472421646, -0.31326112151145935, 0.6353459358215332, -0.22654719650745392, 0.5171819925308228, 1.4705857038497925, -0.4180232584476471, -1.804886698722...
def forget _ category ( data : dictionary ) : display _ categories ( data ) category _ choice = input ( " choose category : " ) del data [ category _ choice ] print ( " successfully deleted category! " )
[ 0.02122632786631584, 0.38770830631256104, 0.32292672991752625, 0.0027825643774122, -0.2334059327840805, 0.6568373441696167, 0.5187919735908508, -0.03908112272620201, 0.16789191961288452, -0.4826393127441406, 0.4190821349620819, 0.902642011642456, 0.3912942111492157, 0.3806914985179901, 1...
def builderrorresponse ( self, request, error = none ) : if error is not none : cls, e, tb = error else : cls, e, tb = sys. exc _ info ( ) fault = build _ fault ( cls, e, tb, self. gateway. debug ) return remoting. response ( fault, status = remoting. status _ error )
[ -0.22615094482898712, -0.3830687701702118, 0.28559866547584534, 0.8524911999702454, 0.41076451539993286, -0.6231882572174072, -0.2442544400691986, -0.04042293131351471, 1.364517092704773, -0.5433115363121033, -0.08645591884851456, -0.3000970184803009, -0.9249143004417419, 0.315443396568298...
def string _ to _ list ( string ) : numlist = [ ] for num in string. split ('\ t') : numlist. append ( int ( num ) ) return numlist
[ -0.06692657619714737, -0.550733208656311, 0.5122882127761841, -0.35278844833374023, 0.30533790588378906, -0.05837279558181763, -0.007146855816245079, 1.0966697931289673, 0.056707751005887985, 0.8943955302238464, -1.7087856531143188, 0.00012280649389140308, 0.24248337745666504, -0.340574681...
def predict ( self, df : pd. dataframe ) : return self. artifacts. model. predict ( df )
[ -1.010021686553955, 0.5668550133705139, 0.0903482437133789, 0.19003358483314514, -0.07847204804420471, -0.5108004212379456, 0.4609781801700592, -0.13745377957820892, -0.3658710718154907, -0.8335093855857849, 0.24310016632080078, -0.015104550868272781, 0.7437129616737366, -0.895164191722869...
def plot _ confusion _ matrix ( cm, classes, normalize = false, title ='confusion matrix ', cmap = plt. cm. blues ) : if normalize : cm = cm. astype ('float') / cm. sum ( axis = 1 ) [ :, np. newaxis ] print ( " normalized confusion matrix " ) else : print ('confusion matrix, sentiment comparison \ n 1000 quatrains') pr...
[ 0.16971710324287415, 0.4087717831134796, 0.5442041158676147, -0.37553566694259644, -0.5215479731559753, -0.34756094217300415, 0.8567475080490112, -0.4389433264732361, 0.5752951502799988, 0.5340437889099121, 1.0056813955307007, 0.5415669083595276, -0.40787845849990845, 0.30249080061912537, ...
def bounding _ box ( filename ) : # find 3d bounding box box = np. zeros ( ( 3, 2 ) ) # init bounding box flag = 0 # ascending for i, dim in enumerate ( filename. shape ) : # loop through ( x, y, z ) # ascending search while flag = = 0 : for dim _ test in np. arange ( dim ) : # get sum of all values in each slice if i ...
[ 0.30634984374046326, -0.7612014412879944, 1.3524706363677979, 0.1238793358206749, 0.0023730744142085314, 0.25955459475517273, 1.0058395862579346, -0.03243114426732063, -0.533401608467102, 0.08700979501008987, 0.4017377197742462, 0.654447615146637, -0.21974031627178192, 0.6499091386795044, ...
def _ timeleft ( info _ dict, claim = " exp " ) - > optional [ int ] : if claim in info _ dict : now = time ( ) timeleft = info _ dict [ claim ] - now return timeleft return none # pragma : no cover
[ 1.0140931606292725, -0.37498724460601807, 0.3720334768295288, -1.4795241355895996, 0.14218522608280182, 0.06898624449968338, -1.0261486768722534, 0.11014166474342346, 0.2753750681877136, 0.6499937772750854, -0.2931368947029114, -0.7613524198532104, -0.164811372756958, 0.650676965713501, ...
def test _ valid _ data ( self ) : # send all valid form data form = self. form _ data ( start _ date = " 2020 - 06 - 22 ", end _ date = " 2020 - 06 - 27 ", note = " some note content from test ", slack _ channel = " # slack ", project _ type = self. project _ type. pk, client = self. client. pk, ) self. asserttrue ( f...
[ 0.3392380177974701, 0.20640625059604645, 0.5636709928512573, -0.07644537091255188, 0.5231386423110962, 1.4275624752044678, -0.5161589980125427, 0.06585429608821869, -0.621637225151062, -1.2829965353012085, -0.7582166194915771, 0.44193437695503235, -0.3423740565776825, -0.26761311292648315,...
def create _ definition _ file ( cls, path _ and _ name = none ) : if path _ and _ name is none : path = rpw. ui. forms. select _ folder ( ) path _ and _ name = rpw. ui. forms. textinput ( " name ", r " { } \ pyrevitmep _ sharedparameters. txt ". format ( path ), false ) with open ( path _ and _ name, " w " ) : pass rp...
[ 0.5953937768936157, -0.6378682255744934, 0.6974311470985413, 0.5522739291191101, 0.010747620835900307, 0.511343240737915, 0.9994062781333923, 0.6639315485954285, -0.769599437713623, 0.18996822834014893, -0.23290322721004486, -0.3927210867404938, -0.6369452476501465, 0.547565221786499, -0...
def iseditable ( self ) : pass
[ -0.4193575382232666, -0.6684361696243286, 0.503515362739563, 0.8572885394096375, 0.7265033721923828, 0.5524696111679077, 0.8449822664260864, 0.20047494769096375, -0.6803169846534729, 0.2528010308742523, -0.3208082318305969, 0.5035074949264526, -0.7771059274673462, 0.42444944381713867, -1...
def cross _ validation ( ww _ data, rw _ data, k ) : k _ accuracy _ list = [ ] partition _ size = ww _ data. shape [ 0 ] / k # print ( " partition _ size is ", partition _ size ) # iterate through each partition ( which is k ) for i in range ( k ) : # print ( " partition _ size is ", partition _ size ) # print which pa...
[ 0.6101829409599304, -0.29032012820243835, 0.8583562970161438, -0.19985410571098328, -0.6644641160964966, 0.15599913895130157, 0.776471734046936, 1.411276936531067, -0.2643825113773346, 1.0753382444381714, 0.6704579591751099, -0.10674825310707092, -0.6314616203308105, 0.4696500897407532, ...
def main ( argv ) : database _ file _ path = flags. database uniprot _ list _ path = flags. uniprot with open ( database _ file _ path,'r') as file : file _ content = file. read ( ) pieces = file _ content. split ('\ n \ n') [ 1 ]. split ('\ n / / \ n') all _ values = collections. defaultdict ( set ) for piece in piece...
[ 0.2619052231311798, -0.02019137144088745, 0.813467800617218, 0.04700309783220291, 0.6567875742912292, 0.8991515040397644, 0.12458992004394531, 1.5636075735092163, -0.8356372117996216, 0.3917338252067566, -0.7000777721405029, -0.19367775321006775, 0.1876504123210907, -0.216483935713768, -...
def channel ( self, channel _ name ) : return chat ( self, channel _ name, " channel " )
[ 0.20647118985652924, -0.4714312255382538, 0.13970990478992462, -0.4046971797943115, 0.11246030032634735, 0.30823683738708496, -0.4028395414352417, -0.0040429155342280865, -0.11487088352441788, -0.5418782234191895, 0.4627728760242462, 1.075875997543335, -0.1256290078163147, -0.2555593550205...