text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def add _ action ( self, icon _ path, text, callback, enabled _ flag = true, add _ to _ menu = true, add _ to _ toolbar = true, status _ tip = none, whats _ this = none, parent = none ) : icon = qicon ( icon _ path ) action = qaction ( icon, text, parent ) action. triggered. connect ( callback ) action. setenabled ( en... | [
-0.20072323083877563,
-0.4906685948371887,
0.5835965871810913,
0.2610699236392975,
0.29337573051452637,
-0.2512718737125397,
-0.05911363288760185,
0.27341651916503906,
0.921906054019928,
-0.06906270980834961,
-0.912510097026825,
-0.48998552560806274,
-0.5201005339622498,
0.1237053200602531... |
async def ioapikey ( self, ctx : commands. context, io _ user : optional [ str ] = none, io _ key : optional [ str ] = none ) - > none : await self. config. io _ user. set ( io _ user ) await self. config. io _ key. set ( io _ key ) await ctx. send ( _ ( " credentials set. " ) ) if ctx. channel. permissions _ for ( ctx... | [
-0.6779316663742065,
-0.11819551140069962,
0.5129557847976685,
0.4853783845901489,
0.8038495779037476,
0.11780998110771179,
0.032040417194366455,
-0.06027967855334282,
-0.40329551696777344,
0.412067711353302,
-0.3391139507293701,
0.9442082643508911,
-0.8671709299087524,
-0.4432788491249084... |
def genconf _ dir _ option ( command : callable [..., none ] ) - > callable [..., none ] : click _ option _ function = click. option ('- - genconf - dir ','files _ to _ copy _ to _ genconf _ dir ', type = click _ pathlib. path ( exists = true, dir _ okay = true, file _ okay = false, resolve _ path = true, ), callback =... | [
-0.6108523011207581,
0.21821002662181854,
0.7199189066886902,
0.19696176052093506,
0.5297174453735352,
-0.3899768888950348,
1.6486034393310547,
-0.08700697869062424,
-0.29656875133514404,
0.07550420612096786,
-0.023470163345336914,
0.43684452772140503,
0.8433705568313599,
0.366847246885299... |
def generate _ parameters ( client, status ) : status = client. get _ status ( ) applications = list ( status. get _ applications ( ) ) if len ( applications ) = = 0 : raise invalidactionerror ('no applications to choose from.') return {'application': choice ( applications ) } | [
-0.21184684336185455,
-0.23089496791362762,
0.30614447593688965,
0.19746488332748413,
-0.5561830997467041,
0.36445003747940063,
-0.3646155297756195,
0.26051461696624756,
-0.13314682245254517,
1.2846088409423828,
-0.16918906569480896,
0.12447661906480789,
0.3624137341976166,
0.9264082908630... |
def download _ user ( username ) : print ( f " downloading user { username } " ) if not os. path. exists ( username ) : os. mkdir ( username ) os. chdir ( username ) r = requests. get ( f " https : / / api. scratch. mit. edu / users / { username } ", headers = headers ) userid = json. loads ( r. content ) [ " id " ] wi... | [
-0.7476034164428711,
0.35335642099380493,
0.6528597474098206,
-0.017446428537368774,
-0.6138394474983215,
0.979745626449585,
0.3657550811767578,
-0.943037748336792,
0.27143189311027527,
-0.45763856172561646,
-0.6396511793136597,
-0.3845283091068268,
0.894009530544281,
0.2152954787015915,
... |
def markselected ( self ) : try : if self. view. layer = = none : return qgsmessagelog. logmessage ( " going to look into selection ", " messages ", qgis. info ) sels = self. view. layer. selectedfeatures ( ) # the selected features in the active ( from this plugin's point of view ) layer n = len ( sels ) qgsmessagelog... | [
-0.15462282299995422,
-0.8014357089996338,
0.41494861245155334,
-0.3008444607257843,
0.5483106970787048,
-0.8429176807403564,
1.5486828088760376,
-0.6451232433319092,
0.7148969769477844,
-0.6901111006736755,
0.23079821467399597,
1.109498143196106,
-0.12279249727725983,
0.1933131366968155,
... |
def _ _ init _ _ ( self ) : self. board = ['* ','* ','* ','* ','* ','* ','* ','* ','*'] self. count = 0 # used for tracking the number of moves that have been made. if = = 8, then game cannot continue. | [
0.28071266412734985,
0.3835294842720032,
0.7570152282714844,
0.9410913586616516,
-0.3314301371574402,
0.3852999210357666,
0.26043057441711426,
0.061459846794605255,
-0.3312726318836212,
0.5034282803535461,
-0.15309478342533112,
-0.0357697419822216,
-0.5117124915122986,
-0.04337621852755546... |
def plot _ detect _ single ( sim _ name, fname = none ) : print'detect single : ', sim _ name # settings if sim _ name = ='data': title ='human observers'else : title ='ideal observer :'+ sim _ name xlbl ='contour spacing ( pixels )'ylbl ='proportion correct'fig _ sz = ( 10, 8 ) miny = 0. 4 maxy = 1. 0 axis _ pad _ x =... | [
0.7997499704360962,
0.4554440975189209,
0.9204132556915283,
0.271202027797699,
-0.7594092488288879,
0.6629751324653625,
0.5149533152580261,
0.5550093054771423,
0.18162691593170166,
0.16606301069259644,
0.3882884681224823,
0.7342129349708557,
0.5827533602714539,
0.400778591632843,
0.20886... |
def list _ upcoming _ actions ( self, project _ name : str, dev _ box _ name : str, user _ id : str = " me ", * * kwargs : any ) - > iterable [ json ] : _ headers = kwargs. pop ( " headers ", { } ) or { } _ params = kwargs. pop ( " params ", { } ) or { } cls : clstype [ json ] = kwargs. pop ( " cls ", none ) error _ ma... | [
-1.707539439201355,
0.13902872800827026,
0.6659594178199768,
0.21420831978321075,
-0.14111047983169556,
-0.498996376991272,
-0.5301967263221741,
-1.0785033702850342,
-0.10188236832618713,
-0.10143649578094482,
-0.28647860884666443,
1.4045010805130005,
0.08822286128997803,
0.063907667994499... |
def available ( self ) - > bool : return super ( ). available and self. _ panel. online | [
-0.019005293026566505,
-0.6808183193206787,
0.41585201025009155,
0.6180745959281921,
-0.542118489742279,
1.3925623893737793,
-0.3963603079319,
0.8598204255104065,
-0.2648419439792633,
0.9148961901664734,
-0.4652171730995178,
0.001467759138904512,
-0.6382755041122437,
0.5212475657463074,
... |
def searchbandi ( self ) : pc = gettoolbyname ( self. context, " portal _ catalog " ) stato = self. request. form. get ( " stato _ bandi ", " " ) searchabletext = self. request. form. get ( " searchabletext ", " " ) query = self. request. form. copy ( ) if stato : now = datetime ( ) if stato = = " scheduled " : query [... | [
-0.2861068844795227,
-0.21274082362651825,
0.6902734637260437,
0.29247403144836426,
-0.45922982692718506,
0.6634411811828613,
-0.37679973244667053,
-0.46901175379753113,
-0.7016667127609253,
0.08481010794639587,
0.5213028788566589,
0.4165267050266266,
-0.8083581328392029,
0.207533746957778... |
def writerows ( self, data ) : for row in data : self. writerow ( row ) | [
-1.053783655166626,
-0.1938420683145523,
0.11004506796598434,
0.25141826272010803,
1.0558439493179321,
-0.15713107585906982,
0.03123047761619091,
0.8396441340446472,
0.3239537179470062,
-0.007961200550198555,
-0.09416867792606354,
-0.555412769317627,
-0.22958487272262573,
1.650836229324340... |
def get _ mfcc _ filters ( freq _ min, freq _ high, mel _ filter _ num, fft _ size, sample _ rate ) : filter _ points = get _ mfcc _ filter _ points ( freq _ min, freq _ high, mel _ filter _ num, fft _ size, sample _ rate ) filters = np. zeros ( ( len ( filter _ points ) - 2, int ( fft _ size / 2 + 1 ) ) ) for n in ran... | [
-0.278541624546051,
-0.3696083724498749,
0.6111573576927185,
0.41035711765289307,
0.2622644603252411,
-1.2920764684677124,
-0.10432695597410202,
-0.06532792747020721,
0.1430763155221939,
-0.10925702005624771,
-0.1436385214328766,
0.808958888053894,
0.4456650912761688,
0.46048590540885925,
... |
def _ assemble _ bitrate _ statistics ( self ) : self. avg _ bitrate = ( sum ( f [ " size " ] for f in self. frames ) * 8 ) / self. duration self. avg _ bitrate _ over _ chunks = np. mean ( self. _ collect _ chunks ( ) ) self. max _ bitrate _ factor = self. max _ bitrate / self. avg _ bitrate # output data ret = { " in... | [
0.16405154764652252,
-0.6395054459571838,
0.6790722012519836,
-1.5318515300750732,
-0.2007063329219818,
-0.6057932376861572,
-0.15388494729995728,
-1.5005649328231812,
-1.0927170515060425,
0.46514248847961426,
0.019277473911643028,
0.7045095562934875,
-0.0852259024977684,
0.559904754161834... |
def _ retrieve _ objects ( self, * * kwargs ) - > list [ form ] : forms = [ ] for forms _ json in self. _ value : form = form ( client = self. _ client, json = forms _ json ) form. refresh ( ) # to populate the object with all expected data forms. append ( form ) return forms | [
-0.9498144388198853,
-0.5527331233024597,
0.36651262640953064,
-0.08479918539524078,
1.2194278240203857,
0.2385263442993164,
-0.6304651498794556,
-1.026827335357666,
0.861260712146759,
-0.9185646176338196,
-0.9242957830429077,
-0.5063011050224304,
0.1674884855747223,
0.46708232164382935,
... |
def _ list _ vulns ( self ) : raw _ list = self. nessus. request _ list ('report2 / vulnerabilities ','vulnlist ','vulnerability ', report = self. uuid ) vulns = [ ] for vuln in raw _ list : v = vulnerability ( nessus = self. nessus, plugin _ id = vuln ['plugin _ id'], severity = vuln ['severity'] ) v. _ name = vuln ['... | [
-0.474476158618927,
-0.6889804005622864,
0.20820310711860657,
0.25407376885414124,
0.6565860509872437,
-1.0098018646240234,
-1.5943986177444458,
0.46488630771636963,
0.9160407781600952,
-0.14555084705352783,
-1.0724616050720215,
0.5289744734764099,
-0.2411157637834549,
0.18512693047523499,... |
def can _ lock _ course ( self, forum, user ) : return self. _ perform _ basic _ permission _ check ( forum, user, " can _ lock _ course " ) | [
-0.8992865681648254,
0.4229910373687744,
0.4957144856452942,
1.7926840782165527,
-0.376017689704895,
0.5256228446960449,
0.35715585947036743,
-0.642301619052887,
-0.2095874696969986,
0.3997422754764557,
-0.13187392055988312,
0.6327694058418274,
-0.7532288432121277,
0.3249383866786957,
-0... |
def test _ watch _ period _ failure ( self ) : self. expect _ get _ statuses ( ) self. expect _ health _ check ( 0, true, num _ calls = self. expected _ cycles - 1 ) self. expect _ health _ check ( 1, true, num _ calls = self. expected _ cycles - 1 ) self. expect _ health _ check ( 2, true, num _ calls = self. expected... | [
0.004518519155681133,
0.8218652009963989,
0.5462674498558044,
0.492779016494751,
1.0635113716125488,
0.7459380626678467,
0.9075513482093811,
-0.7515431046485901,
-0.4641169011592865,
-0.7113767862319946,
-0.11255760490894318,
0.22453121840953827,
-0.31745997071266174,
-0.28814002871513367,... |
def test _ inputs _ sort _ functionality ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. pagination. select _ page _ option ( " 50 per page " ) input... | [
-0.07467945665121078,
-0.140905499458313,
0.6446449756622314,
0.3787936866283417,
0.5105255246162415,
0.08563608676195145,
0.0018692445009946823,
-1.0703988075256348,
-0.24857445061206818,
-0.7214289903640747,
0.039797477424144745,
-0.14786198735237122,
-0.09956678003072739,
0.196614846587... |
def show _ listings ( self, color = none, color _ wiggle = 5 ) : endpoint ='/ listings / active'params = { } if color : params ['color'] = color params ['color _ accuracy'] = color _ wiggle response = self. execute ( endpoint, params = params ) return response | [
-0.5913636088371277,
0.3126123249530792,
0.41780969500541687,
-0.23052537441253662,
-0.2542772591114044,
-0.725441575050354,
0.18190784752368927,
0.5516905188560486,
0.17371907830238342,
0.7648407816886902,
-0.22271978855133057,
1.3326247930526733,
-1.150939702987671,
0.10468821227550507,
... |
def polygonize ( self, lines ) : source = getattr ( lines,'geoms ', none ) or lines try : source = iter ( source ) except typeerror : source = [ source ] finally : obs = [ self. shapeup ( l ) for l in source ] geom _ array _ type = c _ void _ p * len ( obs ) geom _ array = geom _ array _ type ( ) for i, line in enumera... | [
0.1887291520833969,
0.023482143878936768,
0.5343529582023621,
0.05957181751728058,
0.22531212866306305,
0.5339781045913696,
-0.8990728259086609,
-0.5911396741867065,
0.268661767244339,
-0.27327021956443787,
0.04162377864122391,
-0.0670943632721901,
0.766875684261322,
-0.32528695464134216,
... |
def iscalibrated ( self ) : if self. camera _ info is none : raise camerainfomissingerror ('calibration missing,'+'loadcamerainfo ( ) needed.') return self. camera _ info. k [ 0 ]! = 0. 0 | [
0.1892947256565094,
-0.774215042591095,
0.49374279379844666,
0.9917376041412354,
0.12301737815141678,
0.6828217506408691,
-0.7112756371498108,
-0.3353014886379242,
0.024250125512480736,
0.08680982142686844,
-0.5278866291046143,
-0.6156230568885803,
-0.46267035603523254,
1.3174337148666382,... |
def verification _ result ( self ) : return self. _ verification _ result | [
0.2530112862586975,
0.19020168483257294,
0.14160899817943573,
0.8804817795753479,
0.5390586853027344,
-0.10098211467266083,
0.49242591857910156,
-0.6036142110824585,
0.2271205335855484,
-1.1225810050964355,
-1.597762942314148,
-0.03371787443757057,
-0.10362108796834946,
-0.6456061005592346... |
def update _ props ( self, element _ id, props ) : return self. _ request ('put ','/ elements / { } / props '. format ( element _ id ), body = {'props': props } ) | [
-1.2926418781280518,
-0.901120662689209,
0.16699066758155823,
-0.2530989646911621,
0.0810786634683609,
0.4729660749435425,
-0.8913442492485046,
0.0778256207704544,
0.5881940722465515,
0.8957833647727966,
-0.2393699735403061,
0.15800827741622925,
-1.119810938835144,
-0.2973785102367401,
0... |
def active _ start _ date ( self ) : return schedulepattern. _ time _ converter ( self. _ pattern ['active _ start _ date'],'% m / % d / % y ', false ) | [
0.1381048858165741,
-1.467563271522522,
0.6611413955688477,
0.04018044471740723,
-0.37329980731010437,
0.2129688262939453,
0.5277055501937866,
-0.2713001072406769,
0.7436404824256897,
0.3962233364582062,
0.11616426706314087,
0.8511916399002075,
0.593367338180542,
-0.8018748760223389,
-0.... |
def get _ max _ width ( table, index ) : return max ( [ len ( format _ num ( row [ index ] ) ) for row in table ] ) | [
0.09100695699453354,
0.592937171459198,
0.5554510951042175,
0.7441344261169434,
-0.21738074719905853,
-0.8475019335746765,
-0.608625054359436,
0.5108637809753418,
1.1694456338882446,
-0.2889835238456726,
0.32995545864105225,
-0.5380744934082031,
-0.03225740045309067,
0.3564448356628418,
... |
def info ( self ) : return'','single - object ' | [
0.12187924236059189,
-0.3699093461036682,
0.49573078751564026,
-0.14990469813346863,
0.9282515048980713,
1.141821026802063,
0.2508845329284668,
-0.10353554040193558,
0.18409189581871033,
-0.038494840264320374,
-0.7721622586250305,
0.05643301084637642,
1.3072484731674194,
0.0097489794716238... |
def killsafaricookies ( ) : import os import plistlib # plex's sandboxing doesn't allow me to import platform, # so let's not check for darwin and just fail. # import platform # isdarwin = " darwin " in platform. system ( ). lower ( ) isdarwin = true # assume if isdarwin : filename = os. path. expanduser ( " ~ / librar... | [
-0.19698679447174072,
0.005441053304821253,
0.5599234104156494,
1.32901930809021,
0.41216763854026794,
-0.02785060741007328,
0.5780184268951416,
0.5730132460594177,
0.8270291686058044,
0.23385801911354065,
-0.6537196040153503,
0.280539870262146,
-0.4989633858203888,
0.322040855884552,
0.... |
def get _ realms ( self, token, request ) : raise notimplementederror ( " subclasses must implement this function. " ) | [
-0.9242047071456909,
-0.016154266893863678,
0.5744761228561401,
-0.031165752559900284,
0.5170694589614868,
0.0696483701467514,
-0.7139554023742676,
-0.8304398059844971,
-0.03535137325525284,
0.10852402448654175,
-0.20873135328292847,
0.5375350117683411,
0.18313685059547424,
0.4487575888633... |
def _ _ init _ _ ( self, repo, commit, tree = none ) : self. repo = repo self. commit = commit self. name = self. commit. id self. type ='version'self. user = str ( self. commit. author ) self. comment = str ( self. commit. message ) self. date = datetime. utcfromtimestamp ( self. commit. commit _ time ) if tree is non... | [
0.7462217211723328,
-1.0410088300704956,
0.6276369094848633,
0.3359296917915344,
0.26863643527030945,
-0.43900826573371887,
-0.9649959802627563,
0.09410084784030914,
-0.3981843888759613,
1.036041021347046,
-0.28452998399734497,
0.4266307055950165,
-0.445380300283432,
0.1848793625831604,
... |
def translate _ leet ( phrase ) : english _ to _ leet _ conversion = { " a " : " @ ", " o " : " 0 ", " e " : " 3 ", " l " : " 1 ", " s " : " 5 ", " t " : " 7 " } translated = " " # loop through each letter in the phrase # use. get to get the value of the key at the lower - cased version of the letter # if that doesn't ... | [
-0.0037980214692652225,
-0.7772307991981506,
0.5599422454833984,
-2.0258214473724365,
0.19112609326839447,
0.15598376095294952,
-0.8031007051467896,
-0.23089726269245148,
0.4331813454627991,
0.9761694073677063,
-0.7657009363174438,
-0.3787349462509155,
-0.04876873269677162,
-0.515779435634... |
def data _ stream ( * args ) : params = [ str. lower ( ins ) + str ( s ) for ins in insids for s in stream ] print _ ( params, fileout ) ws. send ( json. dumps ( { " method " : " subscribe ", " params " : params, " id " : 1 } ) ) t1 _ idx = 0 while len ( endflag ) = = 0 : if len ( symklns [ insids [ 0 ] ] ) % 5 = = 0 a... | [
-0.5995895862579346,
0.1296180784702301,
0.5735921859741211,
0.1433517336845398,
0.6596722602844238,
0.021722152829170227,
0.37576085329055786,
-1.4155874252319336,
-0.9538785815238953,
0.07726874947547913,
-0.6803430914878845,
0.8706752061843872,
-0.8945561051368713,
0.6333906650543213,
... |
def normalize _ adj ( adj ) : adj = sp. coo _ matrix ( adj ) rowsum = np. array ( adj. sum ( 1 ) ) d _ inv _ sqrt = np. power ( rowsum, - 0. 5 ). flatten ( ) d _ inv _ sqrt [ np. isinf ( d _ inv _ sqrt ) ] = 0. d _ mat _ inv _ sqrt = sp. diags ( d _ inv _ sqrt ) return adj. dot ( d _ mat _ inv _ sqrt ). transpose ( ). ... | [
0.1569855958223343,
-0.17539307475090027,
0.5207112431526184,
-0.24491678178310394,
-0.7715774774551392,
-0.3685297667980194,
0.8503908514976501,
0.30383580923080444,
1.1972371339797974,
0.792430579662323,
0.8168767690658569,
0.14073944091796875,
-0.09706463664770126,
0.0388406477868557,
... |
def itervalues ( self ) : ts = filestoragemanagersingleton. get ( self. _ id ) return ts. itervalues ( ) | [
-0.0721156969666481,
-0.20026615262031555,
0.23211778700351715,
-0.16397212445735931,
0.6349007487297058,
-0.6000009179115295,
-0.7574795484542847,
-0.17057998478412628,
-0.596336305141449,
-0.6896607875823975,
0.32054921984672546,
0.3064969778060913,
0.7036104202270508,
0.8410341143608093... |
def test _ view _ url _ register _ accessible _ by _ name ( self, client ) : response = client. get ( reverse ( " register " ) ) assert response. status _ code = = 200 | [
-0.2141137421131134,
0.8726009726524353,
0.5137659907341003,
0.05029786005616188,
0.3688989579677582,
0.14288493990898132,
0.4910077750682831,
0.5936164259910583,
-0.3312346041202545,
-0.2780584394931793,
-0.8380577564239502,
0.4326947331428528,
0.4456864297389984,
0.2841164469718933,
-0... |
def test _ list _ integer _ max _ length _ 2 _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 3. xsd ", instance = " nistdata / list / ... | [
-0.1416596621274948,
-0.08109282702207565,
0.28891387581825256,
0.6012473106384277,
-0.2387128621339798,
0.33698731660842896,
-0.9603308439254761,
0.19763092696666718,
1.23855721950531,
0.9123355746269226,
-0.8761192560195923,
-0.3369165360927582,
-0.3753657042980194,
0.35143059492111206,
... |
def set _ tile ( self, row, col, value ) : self. _ tiles [ row ] [ col ] = value | [
-0.13434907793998718,
0.36547866463661194,
0.12933564186096191,
-0.445431649684906,
-0.5183182954788208,
0.17316612601280212,
0.030277086421847343,
-0.46917662024497986,
-0.6678736805915833,
0.46040695905685425,
-0.5502833724021912,
0.5691058039665222,
0.4333787262439728,
-0.44867339730262... |
def _ _ repr _ _ ( self ) : ts = filestoragemanagersingleton. get ( self. _ id ) return repr ( ts ) | [
-0.21607547998428345,
-0.804267406463623,
0.30394962430000305,
-1.350082278251648,
0.28871795535087585,
-0.6001286506652832,
-0.6163858771324158,
0.055693626403808594,
0.4517950117588043,
-0.2681465148925781,
0.04847559332847595,
0.6432380080223083,
0.6714786291122437,
0.08107027411460876,... |
def max _ similarity ( self, query ) : q = [ self. w2v _ text _ process ( query ) ] q = self. embedding _ feats ( q ) sims = np. transpose ( cosine _ similarity ( q, self. vectors ) ) max _ s = sims. max ( ) max _ i = np. argmax ( sims ) return max _ i, max _ s | [
-0.38938891887664795,
0.04931285232305527,
0.3267855942249298,
0.2673611044883728,
-0.9272447824478149,
0.06646516174077988,
-0.39124566316604614,
0.24158407747745514,
0.6920703649520874,
0.5749167799949646,
-0.17831671237945557,
-0.3185091018676758,
-0.23394298553466797,
0.398172676563262... |
def volume _ level ( self ) - > float | none : return self. _ currently _ playing. get ( " device ", { } ). get ( " volume _ percent ", 0 ) / 100 | [
0.22534310817718506,
-0.30175378918647766,
0.24217700958251953,
1.0838979482650757,
0.24902991950511932,
-0.001517290249466896,
0.06682144850492477,
-1.2231037616729736,
-0.2123498022556305,
-0.15496498346328735,
0.7639589309692383,
-0.1801525205373764,
-0.30560502409935,
-0.17361481487751... |
def init _ weights ( self ) : pass | [
0.17548906803131104,
-0.26339060068130493,
0.2592460811138153,
0.9854438900947571,
1.156959056854248,
0.2829769551753998,
0.5097401738166809,
-0.013909603469073772,
-0.7987102270126343,
-0.42349106073379517,
-1.5090656280517578,
0.2416549175977707,
-0.2805033326148987,
1.2753117084503174,
... |
def determine _ translation _ status ( self ) : raise notimplementederror ('subclasses that define a ` ` translation _ status ` ` field should'' also implement the ` ` determine _ translation _ status ` ` method.') | [
-0.08670337498188019,
-0.06660504639148712,
0.6343324780464172,
0.0384315624833107,
-0.2572559118270874,
1.0229123830795288,
-0.42553189396858215,
0.1554892212152481,
-0.20708666741847992,
-0.24429140985012054,
-1.7542240619659424,
-0.518123209476471,
0.5614674687385559,
0.4390846788883209... |
def warmup _ lr _ scheduler ( optimizer, epoch, init _ lr, max _ lr ) : lr = min ( init _ lr + ( max _ lr - init _ lr ) / 5. 0 * ( epoch - 1 ), max _ lr ) for param _ group in optimizer. param _ groups : param _ group ['lr'] = lr return optimizer | [
0.24150218069553375,
-0.6199491620063782,
0.5489164590835571,
-0.6240401864051819,
-0.774627685546875,
-0.355224609375,
-0.6778095960617065,
0.6337294578552246,
-0.1866050511598587,
0.5708600282669067,
-0.3297570049762726,
0.40733492374420166,
0.013739137910306454,
0.49693289399147034,
0... |
def getdevicestateforlogicalinterface ( self, typeid, deviceid, logicalinterfaceid ) : req = apiclient. devicestateurl % ( self. host, typeid, deviceid, logicalinterfaceid ) resp = requests. get ( req, auth = self. credentials, verify = self. verify ) if resp. status _ code = = 200 : self. logger. debug ( " state retri... | [
-0.5422027707099915,
-0.19498564302921295,
0.29914385080337524,
-0.2705652117729187,
-0.6645181179046631,
0.03313308581709862,
-0.38990405201911926,
-1.2074179649353027,
0.38376638293266296,
0.27647864818573,
-0.035516683012247086,
0.4799615740776062,
-1.4089796543121338,
0.146582201123237... |
def decorator ( func ) : @ wraps ( func ) def wrapper ( * args, * * kwargs ) : " " " wrap functions that use the decorator function. " " " message _ warn =''. join ( ['{ : } must be installed '. format ( package _ name ),'to use { : }. '. format ( func. _ _ name _ _ ),'see instructions at ','https : / / github. com / p... | [
-0.12091467529535294,
-0.2362069934606552,
0.675852358341217,
-0.01356054563075304,
-0.2521870732307434,
-0.7095640301704407,
-0.3985784947872162,
0.10206262767314911,
0.7150782942771912,
0.8497627377510071,
1.5409512519836426,
-0.01615818589925766,
0.9401073455810547,
0.5143488049507141,
... |
def data _ available ( self ) - > bool : # self. _ vehicle _ data gets updated with some data from vehicle _ list endpoint # only return true if data specifically from vehicle _ data endpoint is available # vehicle _ state is only from the vehicle _ data endpoint if self. _ vehicle _ data. get ( " vehicle _ state ", { ... | [
-0.9221487045288086,
-0.8356643319129944,
0.4213869869709015,
-0.2966676950454712,
0.09039285778999329,
0.20188531279563904,
-1.8917760848999023,
0.5379428267478943,
0.37733495235443115,
0.7942297458648682,
-0.031046343967318535,
0.04472995549440384,
0.008639120496809483,
-0.21258834004402... |
def log _ cef ( self, message _ name, message _ description, type ='log _ info ', items = [ ] ) : # open a connection to syslog to the proper facility syslog. openlog ( self. prog _ name, 0, self. facility ) label _ string ='' # iterating over the items list and construct the label string to send for row in items : for... | [
0.31941941380500793,
-0.3075964152812958,
0.49859705567359924,
0.19672469794750214,
0.4744056165218353,
-0.12958171963691711,
-0.5500441789627075,
0.8772130608558655,
-0.8634285926818848,
0.401071697473526,
-0.5664618611335754,
0.010381518863141537,
-0.5145171284675598,
1.065908670425415,
... |
def replace _ ( self, path : str, payload : dict, rev : int ) - > dict : return self. _ http. put ( path, payload, rev = rev ) | [
-0.490201860666275,
-0.061685673892498016,
0.6830979585647583,
-1.2455488443374634,
-0.6268736720085144,
-0.13358137011528015,
-0.11822561919689178,
0.5394256711006165,
-1.2105023860931396,
-0.009263298474252224,
-0.581082820892334,
0.37528684735298157,
-0.8147605061531067,
-1.727766513824... |
def readable ( self ) : return self. byte _ source. readable ( ) | [
0.3459683954715729,
0.37399762868881226,
0.36218294501304626,
-0.8196312785148621,
-0.02695040963590145,
0.4500580430030823,
-0.09207427501678467,
0.2996211051940918,
-0.4981541037559509,
-0.06971774995326996,
-0.48038047552108765,
0.46636512875556946,
-0.7391650676727295,
-0.5285445451736... |
def validate _ scopes ( self, client _ id, scopes, client, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.') | [
-0.7811353206634521,
-0.5625473260879517,
0.48968860507011414,
-0.22538618743419647,
-0.3559930920600891,
0.49955883622169495,
0.10205209255218506,
-0.7009032964706421,
0.5390545725822449,
0.7678900957107544,
0.10620785504579544,
0.9269283413887024,
-0.2002931535243988,
0.43888986110687256... |
def _ _ repr _ _ ( self ) : return self. _ _ class _ _. _ _ name _ _ | [
-1.0446557998657227,
-1.5696731805801392,
0.8781793117523193,
-1.0582505464553833,
-0.5706750750541687,
0.792336642742157,
-0.051352158188819885,
-0.2506915330886841,
1.1030783653259277,
0.8082067966461182,
-0.2528889775276184,
0.7919038534164429,
0.7562751770019531,
-0.37481316924095154,
... |
def recordtracedataexception ( self ) : self. _ exceptions. append ( traceback. format _ exc ( ) ) | [
0.5494340062141418,
0.44828489422798157,
0.5125572681427002,
-0.7384213209152222,
0.7579230666160583,
0.5427179336547852,
-0.24562804400920868,
0.4018392860889435,
0.6370511054992676,
-0.527506947517395,
-0.7347469925880432,
0.5938570499420166,
0.35010555386543274,
-0.04693252220749855,
... |
def show _ auto ( * args ) : return _ ida _ auto. show _ auto ( * args ) | [
-0.5585724711418152,
0.281453400850296,
0.5616127848625183,
0.634984016418457,
-0.6792382597923279,
-0.7648971080780029,
1.7530697584152222,
-0.0031482551712542772,
-0.9896843433380127,
-0.5037440657615662,
-0.3920145034790039,
0.8166444897651672,
-0.09124789386987686,
0.41650402545928955,... |
def _ search _ multiprocessing ( self ) : pool = multiprocessing. pool ( self. _ main _ args _. n _ jobs ) self. processlist, _ p _ list = zip ( * pool. map ( self. _ search, self. _ main _ args _. _ n _ process _ range ) ) return self. processlist, _ p _ list | [
-1.6263189315795898,
-0.4009532630443573,
0.4755971431732178,
-0.2027769386768341,
-0.16822874546051025,
0.32377007603645325,
-0.3296034038066864,
0.19979311525821686,
-0.5343984365463257,
0.494777113199234,
-0.30298861861228943,
-0.05814775079488754,
-0.8063727617263794,
0.888808310031890... |
def wrap _ exception ( func : callable ) - > callable : try : # only do the wrapping if pygatt is installed. # otherwise it's pointless anyway from pygatt. backends. bgapi. exceptions import bgapierror from pygatt. exceptions import notconnectederror except importerror : return func def _ func _ wrapper ( * args, * * k... | [
-0.06596590578556061,
-0.2611401081085205,
0.28311213850975037,
-0.12586021423339844,
0.44482722878456116,
0.16280409693717957,
-0.7615561485290527,
-0.3914640247821808,
-0.0012134462594985962,
1.1335937976837158,
0.6274716854095459,
0.3390282392501831,
0.2188258171081543,
-0.1498333513736... |
def eval ( self, e, n, extra _ constraints = ( ), exact = none ) : return self. _ solver. eval ( e, n, extra _ constraints = self. _ adjust _ constraint _ list ( extra _ constraints ), exact = exact ) | [
-1.1485955715179443,
0.4393238425254822,
0.44417858123779297,
-0.2376083880662918,
0.00867206510156393,
-0.1489969789981842,
-0.3614499866962433,
0.5203105807304382,
0.06542962044477463,
0.34870120882987976,
-0.7602092027664185,
-0.46370747685432434,
0.15838739275932312,
0.0088434955105185... |
def check _ for _ family _ change ( self, handles ) : if self. obj. get _ handle ( ) in handles : # rebuild data # # todo : gallery and note tab are not rebuild?? objreal = self. dbstate. db. get _ family _ from _ handle ( self. obj. get _ handle ( ) ) # update selection of data that we obtain from database change : ma... | [
0.023289956152439117,
-0.894457221031189,
0.5668889284133911,
-0.11810462176799774,
-0.20237264037132263,
-0.28807541728019714,
0.6483481526374817,
-0.30553993582725525,
0.07336121052503586,
-0.8860291242599487,
-0.07566102594137192,
0.24632474780082703,
0.06552635878324509,
0.791294336318... |
def visualize _ game _ round _ count ( ) : return html. span ('rounds : { 0 } '. format ( len ( pre. round _ names ) ), style = {'padding':'5px ','fontsize':'16px'} ) | [
0.4463910460472107,
0.9093827605247498,
0.5695532560348511,
-2.0179829597473145,
-0.4653700292110443,
0.057368844747543335,
0.3645327687263489,
-0.2056160569190979,
0.1946098804473877,
0.615619957447052,
0.3622558116912842,
0.466490238904953,
0.6708509922027588,
-0.05781209468841553,
0.4... |
def oui _ lookup ( mac ) : mac _ oui = mac. upper ( ). replace (': ','' ) [ : 6 ] return oui [ oui ['assignment'] = = mac _ oui ]. iloc [ 0 ] ['organization name'] | [
-0.8919804096221924,
0.06998936086893082,
0.5357437133789062,
-0.5470128059387207,
-0.5478317737579346,
-0.026808008551597595,
0.5888955593109131,
0.08888131380081177,
-0.4686325490474701,
0.713873028755188,
0.9595724940299988,
-0.54170823097229,
-0.002916153520345688,
-1.257399082183838,
... |
def ciphers _ obj ( ) : # # complete the code so the function returns the # # appropriated cipher object. the purpose is to # # fill xxxx with the appropriated parameters # # begin _ code return aes. new ( key, aes. mode _ gcm, nonce = none, mac _ len = mac _ len ) # # end _ code | [
0.5278377532958984,
-0.12105423957109451,
0.41783463954925537,
0.024115009233355522,
-0.49469584226608276,
0.452625036239624,
1.424190878868103,
-0.9287012219429016,
0.16503120958805084,
-0.1364654302597046,
-0.09937863051891327,
0.8927916288375854,
-0.24001102149486542,
0.3428058028221130... |
def append _ in _ large ( self, typ1, append _ to _ num, typ2, appended _ num, with _ sign = 1 ) : x1 = self. paths _ in _ large _ branch ( add _ to _ branch ) x2 = self. paths _ in _ large _ branch ( added _ branch ) x1 + = with _ sign * x2 | [
-0.6092147827148438,
0.3303273618221283,
0.5773941278457642,
0.839550256729126,
0.1183067187666893,
0.09230108559131622,
-0.05531718209385872,
-0.3915884494781494,
0.2555665969848633,
0.08436116576194763,
-0.3045336902141571,
-0.17362086474895477,
0.22105368971824646,
0.34730198979377747,
... |
def test _ list _ decimal _ pattern _ 1 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 2. xsd ", instance = " nistdata / list / decimal / sc... | [
-0.465361624956131,
-0.5104800462722778,
0.6282690167427063,
0.7852591872215271,
-0.13672739267349243,
-0.15736988186836243,
0.3263241648674011,
0.3846200108528137,
0.176274836063385,
0.11127667129039764,
-1.3919681310653687,
-0.19168706238269806,
0.13418151438236237,
0.7227677702903748,
... |
def write _ messages _ file ( path, messages, mtype ) : if not os. path. exists ( os. path. join ( path,'locale') ) : os. makedirs ( os. path. join ( path,'locale') ) fname = os. path. join ( path,'locale ','_ messages _'+ mtype + '. json') messages = list ( set ( messages ) ) filtered = [ ] for m in messages : if m an... | [
-0.4591704308986664,
-1.014534592628479,
0.8894049525260925,
-0.5096743702888489,
0.280829519033432,
0.15717212855815887,
0.5076334476470947,
-0.565765917301178,
-0.7153540849685669,
0.9134871363639832,
-0.4777376055717468,
0.14128293097019196,
-0.05145668610930443,
0.5941384434700012,
-... |
def parameter _ joint _ names ( self ) - > list [ str ] : return [ joint for joint in self. actuated _ joint _ names if joint in self. param _ joints ] | [
0.07710552215576172,
-0.7154467701911926,
0.4963054060935974,
0.5893267393112183,
-0.44492068886756897,
0.5880097150802612,
-0.23712630569934845,
0.2663147747516632,
-0.4094475507736206,
0.6033908128738403,
0.03722793981432915,
1.4472793340682983,
-1.040600061416626,
-0.30281442403793335,
... |
def adjust _ instructions _ capital ( self, capital _ ts, total _ capital _ ts = none ) : if not isinstance ( capital _ ts, dict ) : raise exception ('adjust _ capital should be a dictionary of comp - > capital _ ts') no _ instrs = len ( self. concat _ instr _ df ) if'capital _ adjusted'not in self. _ concat _ instr _ ... | [
-0.9589511752128601,
0.5139619708061218,
0.7190446257591248,
0.0016279257833957672,
-0.11271926015615463,
-0.49104368686676025,
0.9010122418403625,
-0.10491915792226791,
0.42178627848625183,
0.517999529838562,
1.0344860553741455,
0.37979331612586975,
0.17970415949821472,
1.0351362228393555... |
def add _ format ( self, workbook, fmt ) : fmt _ def = fmt. value if isinstance ( fmt, self. format ) else fmt return workbook. add _ format ( fmt _ def ) | [
-0.20633022487163544,
-0.23062537610530853,
0.34859323501586914,
0.9761155247688293,
0.09451211988925934,
0.5306826829910278,
-1.443575143814087,
-0.5783175826072693,
0.759931743144989,
-1.180920124053955,
0.7571762800216675,
0.2812807559967041,
-0.9740350246429443,
0.9500885605812073,
-... |
def on _ session _ ended ( session _ ended _ request, session ) : print ( " on _ session _ ended requestid = " + session _ ended _ request ['requestid'] + ", sessionid = " + session ['sessionid'] ) # add cleanup logic here | [
0.11942692846059799,
-1.7699819803237915,
0.44301024079322815,
0.020936954766511917,
0.2185303419828415,
-0.2194417417049408,
-0.25981783866882324,
-0.5167511701583862,
1.340659499168396,
0.5084563493728638,
0.053319502621889114,
1.072373390197754,
0.46164241433143616,
0.9843176603317261,
... |
def parse _ zipcode ( self, x ) : if'\ n'in x : zipcode = x. split ('\ n') [ 1 ] else : zipcode = x. split ( " " ) [ 0 ]. split ( " - " ) [ 0 ] try : converted _ zipcode = int ( zipcode ) except exception as exc : converted _ zipcode = 0 return converted _ zipcode | [
0.06601200997829437,
0.004465377889573574,
0.9133443832397461,
0.03189297392964363,
-0.19020432233810425,
-0.7747487425804138,
-0.2579263150691986,
1.0830082893371582,
0.8041025400161743,
0.12152353674173355,
0.32225561141967773,
-0.14424726366996765,
-0.2169024795293808,
0.226314887404441... |
def unsorted _ segment _ mean ( data, segment _ ids, num _ segments, name = none ) : with ops. name _ scope ( name, " unsortedsegmentmean " ) : data = ops. convert _ to _ tensor ( data ) segment _ ids = ops. convert _ to _ tensor ( segment _ ids ) n = _ unsorted _ segment _ n ( data, segment _ ids, num _ segments ) sum... | [
-1.1666351556777954,
-0.20393496751785278,
0.4417152404785156,
-0.7116736769676208,
0.22668176889419556,
-0.18353532254695892,
0.3559305667877197,
-0.4685550630092621,
0.6231407523155212,
0.496359646320343,
-0.5765502452850342,
-0.2763819992542267,
0.1247948631644249,
-0.8912418484687805,
... |
def triangle _ response ( temperature, t _ min, t _ opt, t _ max ) : outside _ triangle = np. logical _ or ( temperature < = t _ min, temperature > = t _ max ) left _ side = np. logical _ and ( temperature > t _ min, temperature < = t _ opt ) right _ side = np. logical _ and ( temperature > t _ opt, temperature < t _ m... | [
0.1445430964231491,
-0.15677572786808014,
0.4106394648551941,
-0.770872175693512,
0.08033774048089981,
0.03284599632024765,
-0.33025068044662476,
0.14900240302085876,
0.09939660876989365,
0.930509626865387,
-0.4709179997444153,
0.023504987359046936,
0.3283056914806366,
-1.3256500959396362,... |
def is _ fs _ directory ( file ) : return file. info. name. type = = tsk _ fs _ name _ type _ dir | [
-0.49769216775894165,
0.2802490293979645,
0.3322697579860687,
1.115412950515747,
-0.4389778971672058,
-0.5267724990844727,
0.7216818332672119,
-0.6620084047317505,
0.6803260445594788,
-0.6611783504486084,
-0.039670415222644806,
-0.7263976335525513,
0.8378214836120605,
0.9381407499313354,
... |
def randwindow ( self, window _ shape ) : row = random. randrange ( window _ shape [ 0 ], self. shape [ 1 ] ) col = random. randrange ( window _ shape [ 1 ], self. shape [ 2 ] ) return self [ :, row - window _ shape [ 0 ] : row, col - window _ shape [ 1 ] : col ] | [
-0.3153568208217621,
-0.6514275670051575,
0.402011513710022,
-0.3887796103954315,
-0.5432895421981812,
1.2085744142532349,
0.832453727722168,
-0.5507420897483826,
0.4648893475532532,
0.2712183892726898,
0.07093407213687897,
1.2764126062393188,
-0.5574413537979126,
0.08793475478887558,
-0... |
def test _ atomic _ boolean _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 2. xsd ", instance = " nistdata / atomic / bo... | [
-0.071568064391613,
-0.6926935911178589,
0.5759710073471069,
1.1300649642944336,
-0.10087097436189651,
0.22529180347919464,
0.16857847571372986,
-0.214812234044075,
-0.824377179145813,
0.5383356213569641,
-0.32903212308883667,
0.20721836388111115,
-0.0751357451081276,
-0.014130204916000366... |
def test _ calculate _ mil _ 217f _ part _ count ( category _ id ) : attributes ['hazard _ rate _ method _ id'] = 1 attributes ['environment _ active _ id'] = 4 attributes ['environment _ dormant _ id'] = 3 attributes ['category _ id'] = category _ id if category _ id = = 10 : for subcategory _ id in [ 1, 2, 3, 4 ] : a... | [
0.7648870348930359,
0.6099477410316467,
0.6364649534225464,
-0.5406616926193237,
1.153408169746399,
-0.3350571393966675,
0.037671368569135666,
-0.48746582865715027,
-0.1548803448677063,
-0.747040331363678,
-0.24995511770248413,
-0.9839025735855103,
0.29575806856155396,
0.5809149742126465,
... |
def convert ( output, path, converters = none, verify = true ) : # get all converters if converters is none : converters = all _ subclasses ( baseconverter ) # find converters matching mime type or extension. convs = find _ converter ( output, converters ) # try converters in order of priority for cls in convs : try : ... | [
-0.35935166478157043,
-0.6593360900878906,
0.5810643434524536,
1.9651285409927368,
-0.08013273775577545,
-1.1270495653152466,
-0.5063442587852478,
0.058794986456632614,
0.14488068222999573,
-0.061414558440446854,
-0.6285191774368286,
-0.005376562010496855,
-0.8230622410774231,
0.3454922139... |
def constrain _ everyone ( self, value : union [ str, none ] ) - > bool : return self. _ constrain _ presence ('everyone ', value ) | [
-0.2644064724445343,
-0.3167763650417328,
0.5752748847007751,
0.8333511352539062,
-0.38572800159454346,
1.1443172693252563,
0.35031858086586,
0.304135799407959,
-0.12095367908477783,
0.6160710453987122,
-0.38560566306114197,
-0.5073217749595642,
-0.9659759402275085,
0.8874410390853882,
-... |
def _ calculate _ l11 ( branches, buses, index _ set _ branch, index _ set _ bus, base _ point = basepointtype. flatstart ) : _ len _ bus = len ( index _ set _ bus ) _ mapping _ bus = { i : index _ set _ bus [ i ] for i in list ( range ( 0, _ len _ bus ) ) } _ len _ branch = len ( index _ set _ branch ) _ mapping _ bra... | [
-0.19979526102542877,
-0.6014217734336853,
0.7133105397224426,
-0.9311622977256775,
0.12495733797550201,
-0.13962389528751373,
-0.19453692436218262,
0.6465647220611572,
0.05928829684853554,
0.4571899175643921,
0.4067101776599884,
0.028442824259400368,
-0.05377698317170143,
-0.2026026099920... |
def getstatus ( self ) : pass | [
-0.09466410428285599,
-1.3233811855316162,
0.2349187582731247,
1.127413272857666,
0.37891578674316406,
0.7275617122650146,
-0.046383146196603775,
0.5719525814056396,
-0.18773245811462402,
-0.6009039878845215,
-1.7314132452011108,
0.7460248470306396,
-0.23071691393852234,
0.6598184108734131... |
def group _ base _ message _ key ( cls, message ) : return {'id': message. campaign _ id,'time': message. date } | [
-0.6046335697174072,
-0.5934921503067017,
0.2306399792432785,
-0.6666401028633118,
0.26755252480506897,
0.26044321060180664,
-0.3126315474510193,
-0.8023902177810669,
-1.2514820098876953,
0.9173932671546936,
-0.04078323394060135,
0.48627451062202454,
-0.8103905320167542,
1.1853135824203491... |
def link _ simple ( f, search _ range, pos _ columns = none, t _ column ='frame ', * * kwargs ) : if pos _ columns is none : pos _ columns = guess _ pos _ columns ( f ) ndim = len ( pos _ columns ) search _ range = validate _ tuple ( search _ range, ndim ) # copy the dataframe f = f. copy ( ) # coerce t _ column to int... | [
-0.460469514131546,
0.27978140115737915,
0.6122105121612549,
-0.45608317852020264,
0.20294243097305298,
-0.1824135184288025,
0.04223386570811272,
0.29095035791397095,
-0.498527467250824,
-0.19424721598625183,
-0.41658976674079895,
-0.13436058163642883,
0.34608888626098633,
-0.9227359294891... |
def chunks ( l, n ) : for i in range ( 0, len ( l ), n ) : yield l [ i : i + n ] | [
-0.28746387362480164,
0.5728985071182251,
0.39129555225372314,
-0.017833421006798744,
-0.16806411743164062,
0.5943106412887573,
-1.019998550415039,
-0.4482986330986023,
-0.38011443614959717,
-0.7051392793655396,
-0.6505395174026489,
-0.3429281711578369,
0.0986400693655014,
0.60941970348358... |
def insert _ time ( ) : time _ style = ( " dd - mm - yy hh : mm : ss ", " yy - mm - dd hh : mm : ss ", " dd - mmm - yy hh : mm : ss ", " yymmdd. hhmmss " ) time _ syntax = ( " % d - % m - % y % h : % m : % s ", " % y - % m - % d % h : % m : % s ", " % d - % b - % y % h : % m : % s ", " % y % m % d. % h % m % s " ) # dr... | [
-0.6779866814613342,
0.2336251586675644,
1.1497039794921875,
-0.8657496571540833,
0.8280540704727173,
0.18648646771907806,
-0.2078622579574585,
-0.3264268934726715,
0.15020771324634552,
0.9733667969703674,
-0.7721773386001587,
-0.30061227083206177,
-1.138608694076538,
0.28337258100509644,
... |
def _ _ init _ _ ( self, vf _ ts _ methods = none ) : self. vf _ ts _ methods = vf _ ts _ methods or vftsmethods ( ) | [
0.27216440439224243,
0.6481359004974365,
0.20697066187858582,
0.8790863156318665,
0.3205769956111908,
-1.103303074836731,
-1.0848755836486816,
0.12007098644971848,
0.4426577389240265,
-0.1913796365261078,
0.07016459852457047,
-0.5201902389526367,
0.1183885782957077,
0.8617090582847595,
-... |
def validation _ losses ( self ) : if self. _ validation _ losses is none : # builds the per - task metrics and losses. self. _ validation _ losses = { } for name in self. task. tasks : self. _ validation _ losses [ name ] = tf. keras. metrics. mean ( " validation _ loss ", dtype = tf. float32 ) return self. _ validati... | [
-0.6034374833106995,
0.5235021114349365,
0.3462432026863098,
-0.07337579876184464,
-0.9243264198303223,
0.7649480104446411,
0.39901673793792725,
-0.8837453126907349,
-0.5889952182769775,
0.15725663304328918,
-0.700547993183136,
-0.12775570154190063,
0.668664276599884,
0.9131004214286804,
... |
def plot ( self, n ) : pylab. clf ( ) pylab. hot ( ) pylab. subplot ( 2, 2, 1 ) pylab. contour ( numpy. abs ( self. e1 [ :, :, n ]. t ), 16 ) pylab. axis ( " image " ) pylab. title ( " e1 " ) pylab. subplot ( 2, 2, 2 ) pylab. contour ( numpy. abs ( self. h1 [ :, :, n ]. t ), 16 ) pylab. axis ( " image " ) pylab. title ... | [
-0.37941744923591614,
0.18693816661834717,
0.8575150966644287,
0.38091400265693665,
0.05743853375315666,
0.5710642337799072,
0.26693499088287354,
-0.12598460912704468,
-0.8177180886268616,
-0.1401524841785431,
-0.2101525366306305,
0.12462300062179565,
0.9239698648452759,
1.5730199813842773... |
def set _ errors _ in _ session ( self, errors ) : self. session ['errors'] = errors | [
-1.0525522232055664,
-0.9850732684135437,
0.1968507021665573,
-0.3409818112850189,
0.6248931884765625,
0.2558458745479584,
-0.0969977080821991,
-0.7246071696281433,
1.4537166357040405,
-0.17944300174713135,
-1.1226767301559448,
0.0778132826089859,
0.2955063283443451,
-0.2896285951137543,
... |
def sin ( x ) : try : return variable ( x. name, np. sin ( x. val ), { k : v * np. cos ( x. val ) for ( k, v ) in x. der. items ( ) }, false ) except attributeerror : return np. sin ( x ) | [
-0.12523597478866577,
-0.11215216666460037,
0.4599776566028595,
0.11526218056678772,
-1.2758498191833496,
-0.0983961746096611,
-0.6074332594871521,
-0.4618866741657257,
0.2087096869945526,
-0.5472747683525085,
-0.3612229824066162,
0.5444457530975342,
0.03452101722359657,
-0.542512893676757... |
def dashboard ( ) : return render _ template ('home / dashboard. html ', title = " dashboard " ) | [
1.2354216575622559,
1.0939035415649414,
0.266762375831604,
1.072957158088684,
-0.11060059070587158,
0.4041200578212738,
0.5486590266227722,
1.4245567321777344,
-1.058951735496521,
-0.7593600153923035,
0.46370068192481995,
-0.5349450707435608,
0.08407136797904968,
0.3113344609737396,
0.21... |
def from _ pandas ( df : " pandas. dataframe ", rechunk : bool = true # noqa : f821 ) - > " dataframe " : # note : we first tried to infer the schema via pyarrow and then modify the schema if needed. # however arrow 3. 0 determines the type of a string like this : # pa. array ( array ). type # needlessly allocating and... | [
-0.2865781784057617,
0.7192017436027527,
0.4968024492263794,
0.43373170495033264,
-0.3728708028793335,
-0.664534330368042,
0.10123259574174881,
-0.40745460987091064,
0.6570044755935669,
-0.5692047476768494,
0.1409970074892044,
0.3784019649028778,
0.8723224997520447,
-0.47165393829345703,
... |
def model _ z ( self, params, z, zdgrid, mc ) : if zdgrid! = none : k = np. searchsorted ( zdgrid. zarr, z ) - 1 k = np. maximum ( k, 0 ) zk = zdgrid. zarr [ k ] + zdgrid. dz / 2. m0 = self. m0 + mc ( zk ) park = params. copy ( ) park [ 1 ] = params [ 1 ] + mc ( zk ) model _ k = self. bivariate _ rl _ m ( park, self. l... | [
0.05548812076449394,
-0.5954322218894958,
0.403315007686615,
0.372024267911911,
0.1368374228477478,
0.15059825778007507,
1.1482281684875488,
0.3747626543045044,
0.13040700554847717,
0.24179716408252716,
0.30517151951789856,
-0.040632616728544235,
-0.33242952823638916,
0.557275116443634,
... |
def login ( self ) : # goto site bot = self. bot bot. get ( " https : / / my. concordia. ca / psp / upprpr9 /? cmd = login & languagecd = eng " ) time. sleep ( 1 ) # print ( " logging in... " ) # locate and populate user and pwd fields. user _ field = bot. find _ element _ by _ class _ name ('form _ login _ username') ... | [
-0.6541846990585327,
-0.17177729308605194,
0.8417866826057434,
0.1303126960992813,
0.024998864158988,
0.5531924962997437,
0.9199603796005249,
0.41606107354164124,
-0.06015245243906975,
-0.3118937015533447,
-0.568639874458313,
0.3271377682685852,
-0.21474727988243103,
0.2312692254781723,
... |
def getaverage ( list ) : lenl = len ( list ) suml, suma, sumb = 0. 0, 0. 0, 0. 0 for x in list : suml + = x. lab _ l suma + = x. lab _ a sumb + = x. lab _ b return labcolor ( lab _ l = suml / lenl, lab _ a = suma / lenl, lab _ b = sumb / lenl ) | [
0.2683431804180145,
-0.215582475066185,
0.704501748085022,
-0.14242695271968842,
0.1575438529253006,
0.6864515542984009,
0.41811326146125793,
-0.40294066071510315,
0.28419387340545654,
0.4060312509536743,
-0.08372653275728226,
-0.010490275919437408,
-0.29412224888801575,
1.3589171171188354... |
def _ _ init _ _ ( self ) : self. state = catalogdata ( ) self. new _ files, self. old _ files = self. state. get _ status ( ) | [
0.03048141486942768,
-0.8091223239898682,
0.3654322624206543,
-0.21901872754096985,
0.5241024494171143,
0.28077033162117004,
-0.2890864908695221,
0.9639531373977661,
-0.9794966578483582,
-0.4701571464538574,
-0.3770362436771393,
0.3773321807384491,
1.084908127784729,
0.9190723896026611,
... |
def nerv _ grad ( x, p _ ij, log _ p _ ij, w _ cf, n, n _ components, arr _ den _ s _ i ) : x = np. reshape ( a = x, newshape = ( n, n _ components ) ) # computing the lds similarities q _ ij, log _ q _ ij = sne _ lds _ similarities _ fast ( dsm _ lds = pairwise _ dist ( x = x, metric ='sqeuclidean ', tomatrix = true )... | [
-0.2505936026573181,
0.09621535241603851,
1.1717325448989868,
-0.6075440049171448,
-0.5196561217308044,
0.15944993495941162,
-0.24878248572349548,
-0.14284098148345947,
-0.26304498314857483,
0.42795464396476746,
0.06067449599504471,
0.17558881640434265,
-0.13806697726249695,
-0.30744457244... |
def init _ model ( self ) : self. model = cinn ( in _ ch = self. in _ ch, img _ size = self. img _ size, operator = self. op, conditional _ args = {'filter _ type': self. filter _ type,'frequency _ scaling': self. frequency _ scaling }, optimizer _ args = {'lr': self. lr,'weight _ decay': self. weight _ decay }, clampi... | [
0.24422666430473328,
-0.5611757040023804,
0.35846662521362305,
0.4933106005191803,
0.39452147483825684,
-0.014845186844468117,
0.1997753083705902,
0.6952413320541382,
-0.4664764702320099,
0.11198721826076508,
-0.5239442586898804,
0.24072563648223877,
-0.04099864885210991,
0.938620448112487... |
def won ( self ) : w = [ true for i in self. board if len ( i ) > 0 ] return not ( true in w ) | [
-0.4181582033634186,
0.46054771542549133,
0.5079084038734436,
0.9747757315635681,
0.2549578547477722,
0.15879397094249725,
0.07775137573480606,
1.2323757410049438,
-0.2903089225292206,
-0.4252617061138153,
-0.9163356423377991,
-0.16683295369148254,
-0.8847532868385315,
0.7782829999923706,
... |
def generate _ notes ( model, notes, network _ input, n _ vocab ) : # pick a random sequence from input as starting point for prediction pitchnames = sorted ( set ( item for item in notes ) ) start = np. random. randint ( 0, len ( network _ input ) - 1 ) int _ to _ note = dict ( ( number, note ) for number, note in enu... | [
-0.8305912613868713,
-0.08814264833927155,
0.5942925810813904,
0.4432930052280426,
0.15131036937236786,
0.32957446575164795,
0.6961768865585327,
-0.2510100305080414,
-0.10135010629892349,
0.9844282865524292,
-0.835169792175293,
-0.4308387339115143,
-0.10059833526611328,
0.363396018743515,
... |
def get _ elmo _ vec _ batch ( sentences, elmo ) : emb = elmo. embed _ batch ( sentences ) # averaged = [ ] # for x in emb : # n _ layer, _, _ = x. shape # averaged. append ( x. sum ( 0 ) / float ( n _ layer ) ) return emb # ( batch, 3, len, dim ) | [
0.761833131313324,
0.27170300483703613,
0.5238790512084961,
0.8822349309921265,
0.12418511509895325,
0.7434930801391602,
0.3879922032356262,
0.34967857599258423,
0.015993639826774597,
0.8583911657333374,
-0.843330442905426,
-0.26753875613212585,
0.7215037941932678,
0.5927570462226868,
-1... |
def rec _ in ( self, frame ) : self. rec _ buffer. append ( frame. payload ) return | [
0.014209900051355362,
0.9044644236564636,
0.5196384787559509,
-0.6765750050544739,
-0.10043439269065857,
0.6358978748321533,
-0.22903196513652802,
-0.4423225224018097,
-0.08718091249465942,
-0.8199918270111084,
-0.8290742039680481,
1.3700326681137085,
-0.7890334725379944,
0.213951960206031... |
def _ setup _ markov _ network ( self, probabilistic ) : for index _ counter in range ( self. genome. shape [ 0 ] - 1 ) : | [
-1.2247728109359741,
-0.11329507827758789,
0.366611123085022,
0.8353182077407837,
0.8026326298713684,
-0.07534310966730118,
0.47176826000213623,
-0.032279565930366516,
-0.2802022695541382,
0.09431222081184387,
0.06173931062221527,
0.2260092943906784,
0.1009317934513092,
0.14240463078022003... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.