text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ insert _ struct _ header ( line _ num ) : current _ buffer = vim. current. buffer # indent the docstring to the class indentation level spaces = _ check _ indentation ( line _ num ) if vim. eval ( " g : kylevimc _ doxygen " ) = ='1': comment = [ " / / / @ brief { % brief description % } ", " / / / @ author { % au... | [
0.20694051682949066,
0.050743408501148224,
0.8782253861427307,
-0.03535393998026848,
0.8002415895462036,
0.042458534240722656,
0.3954913020133972,
-0.11574441194534302,
-0.4170927107334137,
-0.06207245588302612,
-0.5200622081756592,
-0.19355793297290802,
-0.7128032445907593,
-0.32505074143... |
def get _ xml _ pose ( xml _ file, file _ name ) : with open ( xml _ file,'r') as xml : room = xmltodict. parse ( xml ) transform = none for cloud _ info in room ['semanticroom'] ['roomintermediateclouds'] ['roomintermediatecloud'] : if str ( cloud _ info ['@ filename'] ) = = file _ name : transform = cloud _ info [ " ... | [
0.3800179660320282,
-0.6180024147033691,
0.7318158149719238,
-0.721095085144043,
-0.746925413608551,
-0.4555293917655945,
-0.29694604873657227,
-0.20873335003852844,
-0.5026822090148926,
0.5971994996070862,
-0.5036056637763977,
-0.7430927753448486,
-0.7698850035667419,
-0.4758177399635315,... |
def analyzeislandfunction ( self, blocks ) : island _ start = blocks [ 0 ]. startea func = sark. function ( island _ start ) func _ start = func. startea context = islandcontext ( ) ( self. funcnameinner ( func. name ), island _ start ) for block in blocks : for line in sark. codeblock ( block. startea ). lines : # num... | [
0.39730551838874817,
-0.32519736886024475,
0.7194747924804688,
-0.4887999892234802,
0.11200998723506927,
-0.6331945061683655,
0.8381759524345398,
-0.7085316777229309,
0.030154958367347717,
-0.2966196537017822,
0.3938639163970947,
0.4464991092681885,
0.027050156146287918,
1.072332739830017,... |
def is _ bool _ var ( self ) : return true | [
0.13060633838176727,
-0.5891479849815369,
0.58260178565979,
0.8029150366783142,
0.15846365690231323,
0.9676313400268555,
-0.3955146372318268,
0.03891631215810776,
-0.5000694990158081,
0.1574595868587494,
-0.7768097519874573,
1.0903106927871704,
-0.46987485885620117,
0.0016532036243006587,
... |
def _ _ init _ _ ( self, name, mix, * args, * * kwargs ) : kwargs. update ( { " mix " : mix } ) super ( zeroinflatedbinomial, self ). _ _ init _ _ ( name, * args, * * kwargs ) | [
0.24408186972141266,
-0.11028023809194565,
0.7097291350364685,
0.3726353943347931,
0.4169994294643402,
0.3165562152862549,
0.2960369288921356,
0.2864673137664795,
0.6196240186691284,
-0.8978529572486877,
-0.7060297727584839,
-0.4583815336227417,
-0.7738803029060364,
1.1179274320602417,
0... |
def context _ processor ( ) : inject _ object = dict ( base _ url = request. base _ url, url _ root = request. url _ root ) return inject _ object | [
-0.38967350125312805,
-0.8007671236991882,
0.48751509189605713,
-0.39353224635124207,
-0.5431718230247498,
0.006856549996882677,
-0.32854560017585754,
0.20625506341457367,
0.04680725559592247,
-0.19963239133358002,
0.05289170518517494,
0.3642409145832062,
0.2679070234298706,
-0.10110041499... |
def get _ battery _ monitoring _ limits ( self ) : try : recv = self. _ read ( self. command _ get _ batt _ limits, self. _ i2c _ read _ len ) except keyboardinterrupt as e : # pragma : no cover self. _ log. warning ( " keyboard interrupt, % s ", e ) raise e except ioerror as e : # pragma : no cover msg = " failed read... | [
0.10082820802927017,
-0.7370837330818176,
0.5963315367698669,
0.06402083486318588,
-0.08280732482671738,
0.7623557448387146,
-0.4441796839237213,
-0.17281368374824524,
-1.1036490201950073,
-0.2773129940032959,
-0.814075767993927,
1.1250263452529907,
-0.4101110100746155,
0.08545268326997757... |
def get _ rolling _ mean ( df _ values, window ) : return pd. rolling _ mean ( df _ values, window = window ) | [
-1.3872812986373901,
1.28544282913208,
0.4147404134273529,
0.3039090633392334,
-0.07567897439002991,
0.10756400227546692,
0.1850561648607254,
0.22738951444625854,
-0.5859053134918213,
0.30633994936943054,
0.38610053062438965,
1.349002718925476,
-0.0041800024919211864,
0.3885650336742401,
... |
def getgame ( self, id, gt ) : values = {'type':'game ','nt':'1 ', self. game _ id : str ( id ), self. game _ type : gt } opener = urllib2. build _ opener ( urllib2. httpcookieprocessor ( self. jar ) ) opener. addheaders = [ ('user - agent ','android mobile') ] form _ data = urllib. urlencode ( values ) resp = opener. ... | [
-1.0599949359893799,
0.2146245539188385,
0.7594149112701416,
-0.12870168685913086,
-0.3260398507118225,
-0.40749409794807434,
-0.6637052297592163,
-0.5690966844558716,
-0.2165643870830536,
0.19495593011379242,
1.0615099668502808,
0.08781050145626068,
-1.1833670139312744,
0.0293516758829355... |
def test _ sortfilteredcustomers ( intercompartylist ) : sortedtuples = intercompartylist. sortfilteredcustomers ( tuples ) verify _ answer ( sortedtuples, [ ( 4,'ian kehoe'), ( 5,'nora dempsey') ] ) | [
-0.4041314423084259,
-0.08079896122217178,
0.20439614355564117,
-0.14166952669620514,
-0.6493174433708191,
0.09606663137674332,
0.26361942291259766,
-0.32307496666908264,
-0.6950291991233826,
0.09193094819784164,
-0.162314772605896,
-0.45126768946647644,
-0.9882205724716187,
-0.37763392925... |
def mask _ syllables ( self, mask : text = " x " ) - > text : return " ". join ( mask for cs in self. coarse _ stress _ pattern ) | [
0.5229277610778809,
0.05317382514476776,
0.3356894850730896,
0.30500346422195435,
-0.09917036443948746,
0.5471767783164978,
-0.14707522094249725,
-0.7553969621658325,
0.2855546772480011,
0.07243973016738892,
-0.33270588517189026,
-0.03244047984480858,
-0.6837509870529175,
-0.96232604980468... |
def show _ speed _ statistics ( self ) : temp = 0. 0 percent _ array = [ 0. 0 for x in range ( 3, len ( self. nerve _ ap _ speed ), 1 ) ] for x in range ( 3, len ( self. nerve _ ap _ speed ), 1 ) : temp = self. nerve _ ap _ speed [ x ] + temp average _ speed = temp / ( len ( self. nerve _ ap _ speed ) - 3 ) for x in ra... | [
0.9078339338302612,
0.15346640348434448,
0.4828081727027893,
-0.3314840793609619,
0.059208665043115616,
0.3154914677143097,
0.0736120268702507,
-0.15606971085071564,
0.14758601784706116,
0.5385708808898926,
0.25991591811180115,
0.599564790725708,
0.09009059518575668,
0.324026495218277,
0... |
def add _ item ( ) : # get the text from the entry fields code = codevar. get ( ) desc = descvar. get ( ) amount = amountvar. get ( ) logging. info ('item added') # concatenate the text from the entry fields into a single variable abc ='{ } : { } : { } '. format ( code, desc, amount ) logging. info ( abc +'sent to serv... | [
0.06808873265981674,
0.19412200152873993,
0.649390697479248,
-0.2926197052001953,
1.046892523765564,
0.5055053234100342,
-0.295530766248703,
-0.48648878931999207,
-0.5485342741012573,
-0.19421006739139557,
-0.7542112469673157,
0.8252626657485962,
-0.971790075302124,
0.5894168615341187,
0... |
def init _ toolbar ( self, orientation ='horizontal ', size = ( 16, 16 ), separation = 5 ) : if orientation = ='horizontal': self. toolbar = wx. toolbar ( self, - 1, style = wx. tb _ horizontal | wx. tb _ nodivider | wx. no _ border | wx. tb _ flat | wx. tb _ text ) else : self. toolbar = wx. toolbar ( self, - 1, style... | [
-0.30282750725746155,
0.7900819182395935,
0.7250372767448425,
-0.5222527980804443,
-0.41961753368377686,
0.5479782819747925,
0.5946075320243835,
-0.7478832602500916,
-0.9488710165023804,
-0.20046579837799072,
-0.8568660020828247,
-0.7975163459777832,
-0.11014378070831299,
0.860498070716857... |
def get _ missing _ fields ( cls, tabs ) : if not cls. exists _ in ( tabs ) : return none tab = cls. get _ from _ tabs ( tabs ) tab _ fields = tab. get ('fields ', [ ] ) return [ field. as _ dto ( ) for field in cls. contains if not field. exists _ in ( tab _ fields ) ] | [
-0.4037577211856842,
-0.29216715693473816,
0.5150700211524963,
0.06767582893371582,
0.5324230194091797,
0.8819581866264343,
-0.8903348445892334,
-0.8295429348945618,
-0.6528161764144897,
-0.028523217886686325,
-1.1861492395401,
-0.3957754373550415,
0.21870797872543335,
-0.826702356338501,
... |
def get _ all _ composites ( n ) : composites = [ ] for num in range ( 0, n + 1 ) : is _ composite = false for i in range ( 2, num ) : if num % i = = 0 : is _ composite = true if is _ composite : composites. append ( num ) return composites | [
-1.1245285272598267,
0.24174579977989197,
0.5457476377487183,
1.1184123754501343,
0.8389509916305542,
0.3464468717575073,
0.09873609989881516,
-0.18459951877593994,
0.04303262010216713,
-0.826499342918396,
-0.7965645790100098,
-0.23833796381950378,
-1.4056482315063477,
0.8613712787628174,
... |
def make _ get _ request ( endpoint, result ) : response = requests. get ( endpoint, headers = { " authorization " : " bearer " + result [ " access _ token " ], " content - type " : " application / json " } ) return response | [
-0.25841689109802246,
-0.2134346067905426,
0.4877355992794037,
0.20732802152633667,
0.5644614100456238,
-1.2692224979400635,
-1.4323874711990356,
-0.2677862346172333,
-0.6050563454627991,
0.34195417165756226,
-0.04221482574939728,
0.8514662981033325,
-0.03487074747681618,
-1.62810921669006... |
def disconnect ( self, si, logger, vcenter _ data _ model, vm _ uuid, network _ name = none, vm = none ) : logger. debug ( " disconnect interface vm :'{ 0 }'network :'{ 1 } '... ". format ( vm _ uuid, network _ name or " all " ) ) if vm is none : vm = self. pyvmomi _ service. find _ by _ uuid ( si, vm _ uuid ) if not v... | [
-0.1443365067243576,
0.3089231550693512,
0.6876870393753052,
0.6820544004440308,
0.2813625633716583,
-0.4496511220932007,
-0.08285855501890182,
0.09204244613647461,
0.3501892387866974,
0.9414922595024109,
0.23636901378631592,
-0.6017894148826599,
-0.8150767683982849,
-0.08524410426616669,
... |
def train ( self, policy ='random ', observe = false, num _ steps = 1, verbose = false, render = false ) : if policy = ='random': policy = self. random _ action else : if not callable ( policy ) : errmsg ='unrecognized policy function type : { }'errmsg = errmsg. format ( type ( policy ). _ _ name _ _ ) raise typeerror ... | [
-0.3041275441646576,
0.07144995033740997,
0.7827721238136292,
0.24908296763896942,
0.5818977952003479,
-0.18931487202644348,
0.5186983942985535,
0.21139369904994965,
0.7029434442520142,
0.533146858215332,
-0.39100974798202515,
0.5500980615615845,
-0.0559966079890728,
0.2983022928237915,
... |
def abortacquisition ( ) : return none | [
0.3267655372619629,
-1.6342488527297974,
0.34893307089805603,
0.36819028854370117,
0.30915871262550354,
0.13211201131343842,
0.6799739003181458,
-0.321148544549942,
0.39855825901031494,
-0.005672099534422159,
1.958189845085144,
0.39864468574523926,
-0.2628900706768036,
-1.0152606964111328,... |
async def test _ flow _ works ( hass, aioclient _ mock ) : flow = config _ flow. hangoutsflowhandler ( ) flow. hass = hass with patch ( " homeassistant. components. hangouts. config _ flow. get _ auth " ) : result = await flow. async _ step _ user ( { conf _ email : email, conf _ password : password } ) assert result [... | [
-0.08316325396299362,
0.3932199478149414,
0.23054027557373047,
0.7920544743537903,
0.9838475584983826,
0.4808216989040375,
0.3738847076892853,
0.3036397397518158,
0.3823269009590149,
-0.8611737489700317,
-0.6274685859680176,
-0.31084489822387695,
0.26715296506881714,
-0.1650848686695099,
... |
def main ( argv = none ) : if argv is none : argv = sys. argv [ 1 : ] ns = parse _ args ( argv ) ts = setup ( ns ) code _ gen ( ts, ns ) | [
-0.3404354155063629,
0.32101377844810486,
0.7008453607559204,
0.7060710787773132,
0.20883013308048248,
-0.5032294988632202,
0.15500125288963318,
0.8803996443748474,
-0.38521483540534973,
-0.07519110292196274,
-0.29311126470565796,
0.4139258861541748,
0.35202810168266296,
0.6821009516716003... |
def test _ 06 _ duskplus ( self ) : l _ time ='dusk + 00 : 21'l _ time, l _ seconds = timefield ( ). _ rise _ set ( l _ time, self. m _ riseset ) # print ('d1 - 06 - a - seconds { } - " { } " \ n '. format ( l _ seconds, l _ time ) ) self. assertequal ( l _ seconds, ( 20 * 60 + 58 ) * 60 + 30 ) | [
0.10642886906862259,
0.7423583269119263,
0.4366234540939331,
-0.04403460770845413,
-0.22600950300693512,
0.31392624974250793,
-0.18524426221847534,
-1.0339683294296265,
0.7395867109298706,
-0.2070082575082779,
-0.6342979669570923,
0.16414101421833038,
0.4160238206386566,
0.3305474519729614... |
def winbio _ winbioidentify ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " unitid ", " identity ", " subfactor ", " rejectdetail " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.21339598298072815,
0.014451926574110985,
0.3289063572883606,
1.1833319664001465,
0.23021985590457916,
1.2126795053482056,
0.7706394195556641,
-0.04529528319835663,
0.6838098168373108,
0.023020252585411072,
-1.249803066253662,
0.7000961899757385,
-1.6311007738113403,
0.37730351090431213,... |
def get _ files ( self, flag ) : try : license = glob. glob (''. join ( map ( either,'* license. tar. gz') ) ) [ 0 ] except exception : license = self. get _ license ( ) if not flag : try : installer = glob. glob (''. join ( map ( either,'appviewx. zip') ) ) [ 0 ] except exception : try : installer = glob. glob (''. jo... | [
0.5464522242546082,
-0.11511911451816559,
0.5166524648666382,
1.0406455993652344,
-0.2988858222961426,
-0.44514200091362,
-0.3956643342971802,
0.691170871257782,
-0.8765653371810913,
0.24136583507061005,
0.5443115234375,
-0.6302409768104553,
-0.40647003054618835,
0.940839946269989,
-0.07... |
def create ( self, event ) : global _ application if not _ application : import wx class application ( wx. pysimpleapp ) : def oninit ( self, display = self, event = event ) : frame = display. createframe ( ) event. set ( ) self. settopwindow ( frame ) return 1 _ application = app = application ( ) app. mainloop ( ) el... | [
0.7554919719696045,
0.07169612497091293,
0.5820784568786621,
1.534031867980957,
-1.090000867843628,
0.8936474323272705,
0.49331796169281006,
-0.8529968857765198,
0.9003221988677979,
-0.5759267807006836,
0.017673660069704056,
-0.19560901820659637,
-0.23306581377983093,
1.2046175003051758,
... |
def create _ discriminator _ growth _ layer _ block ( regularizer, params, block _ idx ) : with tf. variable _ scope ( name _ or _ scope = " discriminator ", reuse = tf. auto _ reuse ) : # get conv block layer properties. conv _ block = params [ " discriminator _ growth _ conv _ blocks " ] [ block _ idx ] # create new ... | [
-0.40302443504333496,
-0.2972661852836609,
0.9057443141937256,
0.860906720161438,
-0.10514094680547714,
-0.27213987708091736,
0.5176296830177307,
-0.5093938708305359,
-0.05402282625436783,
-0.5662963390350342,
-0.43162497878074646,
0.501064658164978,
0.22184620797634125,
0.5504225492477417... |
def get _ cluster _ output ( cluster _ name : optional [ pulumi. input [ str ] ] = none, resource _ group _ name : optional [ pulumi. input [ str ] ] = none, opts : optional [ pulumi. invokeoptions ] = none ) - > pulumi. output [ getclusterresult ] :... | [
0.06325837224721909,
0.25219786167144775,
0.3622642159461975,
0.08962293714284897,
0.0880877822637558,
-0.9971724152565002,
0.19895167648792267,
-0.367847740650177,
0.5320925116539001,
-0.4620245099067688,
1.1473886966705322,
1.4108396768569946,
-0.8066698908805847,
-1.6017777919769287,
... |
def suid _ emulate ( realroot _ ok = false, nonsudo _ ok = false, sudo _ wrap = false, use _ shebang = false, python _ flags = " ir ", inherit _ flags = false, user _ signal = none, pass _ env = [ ], showcmd _ opts = none ) : if _ suidstatus. _ status : # already run return _ suidstatus. _ status. is _ suid if showcmd ... | [
-0.33108946681022644,
0.13446412980556488,
0.9174842834472656,
0.7289992570877075,
-0.21177174150943756,
0.20876461267471313,
0.460873007774353,
0.5041489601135254,
0.39210426807403564,
0.24634790420532227,
-0.37959274649620056,
1.2755670547485352,
0.5394734740257263,
0.9492262601852417,
... |
def mutation ( self, ind ) : if random. random ( ) > self. mutationrate : return ind indexa = random. randint ( 0, self. gensize - 1 ) indexb = random. randint ( 0, self. gensize - 1 ) tmp = ind. genes [ indexa ] ind. genes [ indexa ] = ind. genes [ indexb ] ind. genes [ indexb ] = tmp ind. computefitness ( ) self. upd... | [
-0.5696977376937866,
-0.23148703575134277,
0.5675908327102661,
-0.16490110754966736,
-0.3380800485610962,
0.16324029862880707,
0.11027763038873672,
-0.8630460500717163,
0.47500088810920715,
-0.002894009230658412,
0.1753263920545578,
0.45047903060913086,
-0.3485770523548126,
-0.706877768039... |
def _ get _ compulsory _ course _ modules ( dept _ modules, course _ id, query _ params ) : modules = get _ cache ( " crscompmodules " ) for compulsory in modules. objects \. filter ( courseid = course _ id, setid = _ setid ) \. only ('moduleid') : for module in get _ cache ( " module " ). objects \. filter ( moduleid ... | [
-0.7028868198394775,
0.09176507592201233,
0.512802004814148,
-1.1819828748703003,
0.6534726023674011,
0.6825053691864014,
0.004058742430061102,
-0.40982547402381897,
-0.273764967918396,
0.9335129857063293,
-0.3546546697616577,
0.7030335068702698,
-0.16737933456897736,
0.8513444066047668,
... |
def init _ defaults ( self ) : pass | [
-0.17672449350357056,
-0.024813126772642136,
0.09910082817077637,
1.0901703834533691,
1.8585766553878784,
0.08843694627285004,
-0.17505218088626862,
-0.06332754343748093,
-0.5865361094474792,
-0.7900007367134094,
-1.6924782991409302,
-0.35484009981155396,
-0.5542142391204834,
0.81104087829... |
def draw _ footer ( canvas ) : note = ( u'bank details : { }, '. format ( settings. company _ title ), u'sort code : 00 - 00 - 00 account no : 00000000 ( quote invoice number ). ', u'please pay via bank transfer or cheque. all payments should be made in { }. '. format ( settings. inv _ currency ), u'make cheques payabl... | [
0.6295399069786072,
0.28580039739608765,
0.729365348815918,
-0.886343240737915,
0.7411065697669983,
0.8341649770736694,
-0.22206361591815948,
-0.81853848695755,
-0.11439479142427444,
-0.2664259374141693,
0.17380638420581818,
0.28401514887809753,
-0.6512569785118103,
0.48981109261512756,
... |
def _ _ init _ _ ( self, filename, record _ size, auto _ flush = true ) : self. _ _ record _ size = record _ size mode = " w + b " if not os. path. exists ( filename ) else " r + b " self. _ _ fh = open ( filename, mode ) self. auto _ flush = auto _ flush | [
0.5468165278434753,
-0.5287457704544067,
0.6505289673805237,
0.49662351608276367,
-0.5005844831466675,
0.6505935192108154,
0.9385305047035217,
0.9747039079666138,
-0.7632570266723633,
-0.2456778585910797,
0.10803770273923874,
0.32573944330215454,
0.05862018093466759,
0.2986074686050415,
... |
def butter _ bandpass _ filter ( self, data, lowcut, highcut, fs, order = 5 ) : b, a = self. butter _ bandpass ( lowcut, highcut, fs, order = order ) y = lfilter ( b, a, data ) return y | [
-0.21230436861515045,
-0.4365260601043701,
0.5128911733627319,
0.24095548689365387,
-0.3533133268356323,
-0.4918277859687805,
-0.40738993883132935,
-0.6844595074653625,
-0.1861203908920288,
-1.0689985752105713,
-0.06966660171747208,
0.9808452129364014,
-0.30458080768585205,
0.2739322781562... |
def _ get _ group _ names ( self, included, excluded ) : lists = self. _ parse _ include _ lists ( included, excluded ) if lists is not none : group _ names = self. _ store. get _ group _ names ( include = lists [ 0 ], exclude = lists [ 1 ] ) log. debug ('group names % s ', group _ names ) else : group _ names = none r... | [
0.1013132855296135,
0.6594573259353638,
0.4392106533050537,
-0.07125891000032425,
-1.152654767036438,
-0.19771148264408112,
-0.8484118580818176,
0.38687974214553833,
0.11704929918050766,
0.5457757711410522,
-0.1573248654603958,
0.6636924147605896,
-0.4591299891471863,
0.21394707262516022,
... |
def back ( self ) : self. current = self. current. parent | [
0.6449416875839233,
-0.499250590801239,
0.7182911038398743,
-0.6208077073097229,
-0.10300291329622269,
0.6581480503082275,
1.9674988985061646,
0.44915205240249634,
-0.581803560256958,
0.09764397889375687,
0.5145089626312256,
1.2067110538482666,
-0.9436824321746826,
-0.8273394107818604,
-... |
def has _ error _ notification ( self ) : return self. notification _ abort | [
0.012360962107777596,
-0.1328427940607071,
0.47004541754722595,
0.7019407153129578,
0.27245697379112244,
0.28369662165641785,
-0.40926411747932434,
0.11084358394145966,
0.11842264980077744,
0.3602597415447235,
-0.1644962877035141,
0.6705832481384277,
0.18483126163482666,
0.4277517199516296... |
def message ( msg, level = 0 ) : if level < = onevizion. config [ " verbosity " ] : print ( msg ) | [
0.3316904306411743,
0.35556045174598694,
0.38344910740852356,
0.9678415656089783,
0.25974079966545105,
-0.013231866993010044,
-0.351085364818573,
-0.3043290972709656,
-1.029327154159546,
0.1736755669116974,
0.5436612367630005,
0.5084311962127686,
-0.9736146926879883,
1.2213410139083862,
... |
def _ request ( self, text, properties, retries = 0 ) : text = to _ unicode ( text ) # ensures unicode try : r = requests. post ( self. server, params = {'properties': str ( properties ) }, data = text. encode ('utf - 8') ) r. raise _ for _ status ( ) return r except requests. connectionerror as e : if retries > 5 : lo... | [
0.05487982556223869,
0.2532602846622467,
0.44251683354377747,
-0.7971336841583252,
-0.5593052506446838,
0.05998343229293823,
-1.1346980333328247,
-0.5645378232002258,
-0.2945002019405365,
0.11109740287065506,
0.9213058352470398,
0.3973413407802582,
-1.457901120185852,
-0.5990632772445679,
... |
def run ( cmd ) : print ( f " running shell command : { cmd } " ) os. system ( cmd ) print ( f " done! \ n " ) | [
0.16804246604442596,
-0.22890065610408783,
0.5351260304450989,
0.2903236448764801,
-0.13665029406547546,
1.3228706121444702,
-0.027822569012641907,
0.5393878817558289,
-0.24074773490428925,
-0.9314900636672974,
-0.9553462862968445,
1.1372421979904175,
0.22759371995925903,
0.589741528034210... |
def _ _ get _ date _ from _ calendar ( self, calendar _ instance ) : self. c _ logger. info ( " staring to get date from calendar. " ) self. c _ logger. debug ( " the getting calendar instance : { } ". format ( calendar _ instance ) ) date _ from _ calendar = calendar _ instance. get ( ) self. c _ logger. info ( " succ... | [
0.37380266189575195,
0.2907017469406128,
0.5728039741516113,
-0.5049232244491577,
-0.4754157066345215,
0.9293639063835144,
-0.5598332285881042,
-0.5678120851516724,
0.2553102970123291,
-0.5592332482337952,
-0.16129915416240692,
1.0025581121444702,
-0.2971642315387726,
-0.11197610199451447,... |
def generator _ test ( rootdir, ids ) : while true : for pid in ids : yield load _ test ( rootdir, pid ) | [
-0.9431490302085876,
-1.0569438934326172,
0.36303025484085083,
-0.09990452975034714,
-0.1317087560892105,
-0.10597836971282959,
-0.2179451584815979,
-0.46727895736694336,
-0.2508206367492676,
-0.42135006189346313,
0.450278103351593,
-0.09906274080276489,
-0.9321088790893555,
0.099464036524... |
def savefileas ( self ) - > none : if self. image _ file _ name : try : new _ file _ name = filedialog. asksaveasfile ( mode ='wb ', defaultextension = ". png ", filetypes = ( ( " image file ", " *. png " ), ( " all files ", " *. * " ) ), title = " choose a file. " ) self. img. save ( new _ file _ name ) self. image _ ... | [
-0.6446593403816223,
-0.6192546486854553,
0.46330907940864563,
0.20482712984085083,
-0.26403772830963135,
0.07665590941905975,
0.501488208770752,
0.04047805815935135,
-0.19895873963832855,
-0.32279521226882935,
0.250186562538147,
-0.2794131934642792,
0.20927950739860535,
1.3521554470062256... |
def set _ external _ led _ colors ( self, colors ) : # send the start marker self. write _ external _ led _ word ( 0, 0, 0, 0 ) # send each color in turn for r, g, b in colors : self. write _ external _ led _ word ( 255, 255 * b, 255 * g, 255 * r ) | [
-0.7511274218559265,
0.19406750798225403,
0.716228187084198,
-0.42844119668006897,
0.015117858536541462,
0.5836614370346069,
-0.30591943860054016,
-0.2779381275177002,
0.03333918750286102,
0.04983415827155113,
-0.8071266412734985,
0.8791254758834839,
-0.751281201839447,
0.7962954640388489,... |
def main _ loop ( ) : def start _ workers ( ) : " " " creates the worker threads and initiates them. " " " from jomiel. subsys. broker. worker import worker _ new from threading import thread for worker _ id in range ( opts. broker _ worker _ threads ) : worker _ thread = thread ( target = worker _ new, args = ( worker... | [
0.02409319393336773,
-0.3064190745353699,
0.6480304002761841,
0.34653088450431824,
0.5377656817436218,
-0.12725910544395447,
0.5638831257820129,
0.07162453234195709,
-0.15187035501003265,
0.2622157037258148,
0.17605774104595184,
-0.1819457858800888,
-1.4925767183303833,
-0.258533239364624,... |
def run ( self ) : self. db. table ('event _ types'). insert ( {'name':'drank ','icon':'beer'} ) self. db. table ('event _ types'). insert ( {'name':'puked ','icon':'trash'} ) self. db. table ('event _ types'). insert ( {'name':'blacked out ','icon':'calendar - times'} ) self. db. table ('event _ types'). insert ( {'na... | [
-0.3855982720851898,
1.0659106969833374,
0.7147486805915833,
-0.4373033940792084,
0.7139556407928467,
0.183100625872612,
0.32683804631233215,
0.43967822194099426,
-0.3858232796192169,
0.722115695476532,
-1.2687880992889404,
-0.7109211087226868,
0.5174052119255066,
0.32992053031921387,
0.... |
def get _ mapping ( mapping _ name ) : # read in mapping if type ( mapping _ name ) = = str or type ( mapping _ name ) = = unicode : if mapping _ name. split ( ". " ) [ - 1 ] = = " mst " : mapping, obj = create _ map _ from _ reformulation ( mapping _ name ) elif mapping _ name. split ( ". " ) [ - 1 ] = = " txt " : map... | [
-0.6830477118492126,
-0.3870016038417816,
0.6975799202919006,
0.12631361186504364,
-1.4438852071762085,
0.5170781016349792,
0.05113348737359047,
0.37658852338790894,
0.47065213322639465,
0.29694321751594543,
0.46147650480270386,
0.5340778827667236,
0.10723081231117249,
-0.4796309769153595,... |
def range ( self ) : lows, highs = [ ], [ ] for track in self. tracks. values ( ) : # get ranges for each track low, high = track. range ( ) lows. append ( low ) highs. append ( high ) return ( min ( lows ), max ( highs ) ) # return extremes from all tracks | [
-0.8557835817337036,
-0.439928263425827,
0.5217223167419434,
0.3204202651977539,
0.6472659707069397,
0.12211666256189346,
-1.1443212032318115,
0.527254045009613,
-1.1757757663726807,
0.19334575533866882,
-0.8142068982124329,
0.1493242233991623,
-0.4090287685394287,
0.747318685054779,
-0.... |
def gprbuild ( * args, * * kwargs ) : complain _ on _ error = kwargs. pop ( " complain _ on _ error ", true ) quiet = kwargs. pop ( " quiet ", true ) if kwargs : first _ unknown _ kwarg = sorted ( kwargs ) [ 0 ] raise valueerror ( " invalid argument : { } ". format ( first _ unknown _ kwarg ) ) argv = [ " gprbuild " ] ... | [
-0.3722613453865051,
-0.4344465732574463,
1.1450845003128052,
0.7003880739212036,
0.8376863598823547,
0.6593072414398193,
-0.44549620151519775,
-0.21104127168655396,
0.016022199764847755,
-0.512408971786499,
0.494620680809021,
0.8304548263549805,
-0.9306867122650146,
0.17526856064796448,
... |
def _ bit _ to _ python ( self, v, dsc = none ) : s = v if len ( s ) < 8 : s ='\ x00'* ( 8 - len ( s ) ) + s return struct. unpack ('> q ', s ) [ 0 ] | [
-0.24952924251556396,
0.17311324179172516,
0.38246554136276245,
-0.6692151427268982,
-0.3015865087509155,
-0.6447238922119141,
-0.16405683755874634,
-0.4804731607437134,
0.9329656362533569,
-0.29668086767196655,
-0.6623370051383972,
1.1846884489059448,
0.03119787760078907,
-0.6330254077911... |
def _ query _ temperature ( self, host _ id ) : if self. _ mode = = " test " : temp = 30 else : temp = self. _ cur _ exp. get _ node ( host _ id ). cmd ( " cat / sys / devices / virtual / thermal / thermal _ zone0 / temp " ). strip ( ) temp = int ( float ( temp ) / 1000. 0 ) return temp | [
0.388176292181015,
0.0777311772108078,
0.2251076102256775,
-0.1223217248916626,
-0.1411922574043274,
-0.483024924993515,
0.38931530714035034,
0.5434332489967346,
0.243471160531044,
0.4357406795024872,
0.4376319944858551,
0.2573992908000946,
-0.9465303421020508,
0.5148179531097412,
-0.391... |
def cast ( * args ) : return _ itkimageserieswriterpython. itkimageserieswriterirgbus3irgbus2 _ cast ( * args ) | [
-0.8470083475112915,
-0.7293155193328857,
0.2423931062221527,
-0.022586654871702194,
0.6706434488296509,
0.8271172642707825,
-0.2970433533191681,
-0.14048457145690918,
0.2191285341978073,
0.770522952079773,
0.1359189748764038,
0.9348588585853577,
-1.215047836303711,
-0.63565993309021,
0.... |
def prove _ in _ model ( formula : formula, model : model ) - > proof : assert formula. operators ( ). issubset ( {'- > ','~'} ) assert is _ model ( model ) # task 6. 1b all _ lines = list ( ) # case 1 : handle case as x where x is variable if is _ variable ( str ( formula ) ) : if evaluate ( formula, model ) : # if th... | [
0.22457118332386017,
-0.1944066435098648,
0.6823689937591553,
0.5856791138648987,
0.09194101393222809,
0.08172541856765747,
-0.04665112867951393,
-0.1776071935892105,
-0.43489158153533936,
0.3057137131690979,
-0.08816061913967133,
-0.3465469777584076,
-0.36291155219078064,
0.98380607366561... |
def split _ train _ set ( source _ dir : str ='train ', split _ train _ dir : str ='split _ train ', split _ val _ dir : str ='split _ val ', train _ ratio : float = 0. 8, shuffle : bool = true, ) : source _ path = path ( source _ dir ) split _ train _ path = path ( split _ train _ dir ) split _ val _ path = path ( spl... | [
-0.49134862422943115,
0.8002618551254272,
0.8307461738586426,
-0.15516965091228485,
-1.05463445186615,
0.7227103114128113,
1.231774091720581,
0.31372037529945374,
-0.039210714399814606,
0.4502916932106018,
0.2553091049194336,
0.07963892817497253,
0.6129704713821411,
-0.23045703768730164,
... |
def add _ header ( response ) : response. headers ['x - ua - compatible'] ='ie = edge, chrome = 1'response. headers ['cache - control'] ='public, max - age = 0'return response | [
-0.6071053743362427,
-0.1844455599784851,
0.364192396402359,
0.6629661917686462,
0.5153127312660217,
0.7124181389808655,
-0.5366206765174866,
-0.05898766592144966,
1.0839147567749023,
0.3672475218772888,
-0.6167437434196472,
-0.47694116830825806,
-0.13371895253658295,
-0.564150333404541,
... |
def create _ tenant _ user ( self, tenant, role ) : project _ name = tenant. upper ( ) if role = = " project _ admin " : username = " ams _ { } _ admin ". format ( tenant. lower ( ) ) elif role = = " archiver " : username = " ams _ { } _ archiver ". format ( tenant. lower ( ) ) # archiver is actually a consumer role = ... | [
-0.04902682825922966,
0.11898525804281235,
0.38129737973213196,
0.0028769944328814745,
0.291501522064209,
0.3312801122665405,
-0.8835278153419495,
-0.21587593853473663,
0.4385311007499695,
0.6957133412361145,
-0.18078762292861938,
0.41663846373558044,
-0.1089889407157898,
-0.28303909301757... |
def psnr _ 5 ( y _ true, y _ pred ) : x = ( y _ pred [ :, :, :, :, 0 ] ) y = ( y _ true [ :, :, :, :, 0 ] ) vrange = k. max ( y ) - k. min ( y ) psnr = 20 * log10 ( vrange - ( 10 * log10 ( k. mean ( k. square ( y - x ) ) ) ) ) return psnr | [
0.7665136456489563,
-0.5150852799415588,
0.5537691116333008,
-0.19959326088428497,
-0.8517338633537292,
-0.6626051664352417,
0.06930005550384521,
-0.1801585555076599,
-0.6485230922698975,
0.7209866046905518,
-0.7501580119132996,
0.8941279649734497,
0.4876258969306946,
0.44956541061401367,
... |
def flow ( self, source _ node, source _ output, target _ node, target _ input ) : source = source _ node if source _ node = ='worldadapter'else source _ node. uid target = target _ node if target _ node = ='worldadapter'else target _ node. uid return self. _ nodenet. flow ( source, source _ output, target, target _ in... | [
-0.6623634099960327,
-0.3476988971233368,
0.30428579449653625,
-0.08972510695457458,
-0.08564815670251846,
0.2766993045806885,
0.07688793540000916,
-0.2812914550304413,
0.22227272391319275,
-0.37367939949035645,
0.9659494161605835,
1.0930297374725342,
0.4953922629356384,
-0.056448038667440... |
def _ update ( self, epoch, trainloss, testloss ) : print ('{ 0 } - - - '. format ( datetime. now ( ). time ( ). replace ( microsecond = 0 ) ),'epoch : { 0 } \ t '. format ( epoch ),'train loss : { 0 } \ t '. format ( round ( trainloss, 2 ) ),'valid loss : { 0 } \ t '. format ( round ( testloss, 2 ) ) ) | [
-0.3474231958389282,
-1.6114352941513062,
0.6811888217926025,
-1.121896743774414,
-0.6033502221107483,
0.2626565098762512,
-0.5729798078536987,
-0.11670617014169693,
-1.0039011240005493,
0.2843676507472992,
0.48357662558555603,
0.9719663858413696,
0.373369961977005,
-0.34545019268989563,
... |
def delete ( self, request, * args, * * kwargs ) : # check permission if not in _ some _ groups ( request. user. pk or 0, [ group _ admin _ pk ] ) : self. permission _ denied ( request ) # delete history data and history ( via cascade ) historydata. objects. all ( ). delete ( ) # rebuild history. history. objects. buil... | [
-0.23534588515758514,
0.415666788816452,
0.5220686793327332,
0.752378523349762,
0.3057742118835449,
0.7884427309036255,
0.9231594204902649,
-0.30551445484161377,
0.24875423312187195,
-0.3911527991294861,
0.6663289070129395,
1.5626442432403564,
-0.20167018473148346,
0.11624767631292343,
0... |
def eval _ datatable ( self, data _ map, *, eval _ env = none, data _ model = none ) : if not isinstance ( data _ map, dict ) : raise typeerror ( " data _ map should be a dictionary " ) if len ( data _ map ) < 1 : raise valueerror ( " data _ map should not be empty " ) if eval _ env is none : eval _ env = data _ algebr... | [
-0.4323410391807556,
-0.3144078254699707,
0.6590027809143066,
0.01373794861137867,
-0.3931701183319092,
0.8087246417999268,
0.6752416491508484,
0.660854697227478,
-0.6830773949623108,
0.17449796199798584,
-0.2558562755584717,
0.6687212586402893,
0.11130162328481674,
0.36263805627822876,
... |
def loaddata ( self, data = none ) : super ( footcomponentrig, self ). loaddata ( data ) footxfo = data. get ('footxfo') anklexfo = data. get ('anklexfo') toexfo = data. get ('toexfo') anklefkxfo = data. get ('anklefkxfo') toefkxfo = data. get ('toefkxfo') anklelen = data. get ('anklelen') toelen = data. get ('toelen')... | [
0.2943386435508728,
-0.301051527261734,
0.5640243291854858,
-0.8484201431274414,
0.6229353547096252,
-0.3574613332748413,
-0.1807592511177063,
-0.10014598816633224,
0.37324273586273193,
-0.5690179467201233,
-0.2719280421733856,
-0.80589359998703,
0.021138038486242294,
0.30017369985580444,
... |
def test _ create _ special _ like _ notification _ via _ signal ( self ) : self. special _ article _ like. save ( ) self. assertequal ( notification. objects. count ( ), 1 ) self. assertequal ( str ( notification. objects. get ( ) ), f'{ self. user _ 2. display _ name } special liked { self. article. title }') | [
0.5519192218780518,
0.17350073158740997,
0.2670011520385742,
0.3840768337249756,
0.006073099561035633,
1.192387580871582,
-0.0828697681427002,
0.07753244787454605,
-0.24455450475215912,
0.3018360733985901,
-2.2853105068206787,
0.4408290386199951,
0.25980859994888306,
0.02482086978852749,
... |
def build _ vocabulary ( self, descriptors = none ) : if descriptors is none : descriptors = [ ] print ( " extracting local features... " ) start = time. time ( ) for img _ idx in range ( self. n _ imgs ) : if self. valid _ idxs and img _ idx in self. valid _ idxs : continue # skip validation images img = find _ img ( ... | [
-0.4224320352077484,
-0.14878898859024048,
0.5351060032844543,
0.5738022327423096,
0.14413292706012726,
-0.9529951214790344,
-0.08300605416297913,
0.7794355750083923,
0.24927766621112823,
0.2520502209663391,
0.19786126911640167,
0.6672894954681396,
0.4468744993209839,
0.5752190351486206,
... |
def quant _ top _ block _ process ( clock, control _ unit, color, output _ interface, input _ interface, input _ val, rom, max _ addr ) : # select which component to be processes control _ unit. color _ component. next = color yield clock. posedge # select the table for quantisation if control _ unit. color _ component... | [
0.028083566576242447,
0.2017081081867218,
0.6916515231132507,
0.056119151413440704,
-0.17416167259216309,
0.13364142179489136,
1.0356701612472534,
-0.7164536118507385,
0.027815939858555794,
-0.27351269125938416,
-0.19590501487255096,
0.2676502764225006,
-0.5222415924072266,
0.5954009890556... |
def delete _ cluster ( redshift, cluster _ identifier ) : print ( " deleting cluster. please wait... " ) try : redshift. delete _ cluster ( clusteridentifier = cluster _ identifier, skipfinalclustersnapshot = true ) except exception as e : print ( e ) return none | [
0.3174387216567993,
-0.018409356474876404,
0.3024064898490906,
0.5234559178352356,
0.30728060007095337,
0.8060541152954102,
0.6834650039672852,
0.8619114756584167,
1.2575396299362183,
-0.7821779251098633,
-0.764816403388977,
0.29734671115875244,
0.06820226460695267,
0.19699673354625702,
... |
def _ act _ solve _ all ( self ) : all _ solutions ='' solutions = solve _ complete ( self. _ puzzle ) for solution in solutions : all _ solutions + = str ( solution ) +'\ n'if all _ solutions! ='' : return all _ solutions, true else : return'there are no solutions. ', true | [
-0.5545527338981628,
-0.6274088621139526,
0.6588046550750732,
0.2630827724933624,
0.9715023040771484,
-0.7187318801879883,
0.316470742225647,
-0.4409565329551697,
-0.2778392434120178,
0.7822824120521545,
-0.3519028425216675,
-0.5868490934371948,
0.2464030385017395,
0.8010839819908142,
-0... |
def _ _ repr _ _ ( self ) : if self. downtown _ row is not none and self. downtown _ col is not none : s ='row view \ n's + = self. table ( self. downtown _ row ) +'\ n's + ='column view \ n's + = self. table ( self. downtown _ col ) return s | [
-0.32559093832969666,
0.04803621023893356,
0.6164412498474121,
-0.48176661133766174,
-0.9836018681526184,
-0.02327488735318184,
0.2048802673816681,
0.06598930060863495,
-0.12771551311016083,
-0.5959156155586243,
0.9294122457504272,
0.4063262343406677,
0.6066902875900269,
0.3730877935886383... |
def create _ clients ( region _ name, aws _ access _ key _ id, aws _ secret _ access _ key ) : ec2 = boto3. resource ('ec2 ', \ region _ name = region _ name, \ aws _ access _ key _ id = aws _ access _ key _ id, \ aws _ secret _ access _ key = aws _ secret _ access _ key ) s3 = boto3. resource ('s3 ', \ region _ name =... | [
0.39809465408325195,
-0.5680160522460938,
0.7623180747032166,
-1.3959920406341553,
0.06578220427036285,
0.6407779455184937,
-0.12491186708211899,
-0.9409619569778442,
-0.44519713521003723,
0.6844362616539001,
-0.9502875208854675,
0.5981687903404236,
0.48113664984703064,
0.00177329569123685... |
def calculate _ mse ( e ) : return ( 1. / 2 ) * np. mean ( e * * 2 ) | [
-0.41875985264778137,
-0.3620744049549103,
0.016078229993581772,
0.35252368450164795,
-0.32659217715263367,
0.24774044752120972,
0.23954027891159058,
-0.14509990811347961,
0.17601142823696136,
0.41224274039268494,
-0.2951224446296692,
0.00139380875043571,
0.337444007396698,
0.8401654958724... |
def is _ root ( self ) : return self. _ parent is none | [
0.3815040588378906,
0.03777185454964638,
0.4609296917915344,
0.803022027015686,
0.5796213746070862,
0.03200351446866989,
0.05602601543068886,
-0.6232373118400574,
0.8914145231246948,
-0.21763001382350922,
-0.5434302687644958,
1.0741223096847534,
-0.6445413827896118,
0.7086086869239807,
-... |
def file _ type _ code ( self ) - > str : return self. _ file _ type _ code | [
0.4317544102668762,
-0.49521341919898987,
0.40759211778640747,
0.39274150133132935,
1.0951207876205444,
0.7059203386306763,
1.2072316408157349,
0.29494044184684753,
-0.1459013968706131,
-0.6691445112228394,
0.6820038557052612,
0.5257555246353149,
-0.012860152870416641,
0.12386825680732727,... |
def canuse ( self, caster, scobject ) : return activeability. canuse ( self, caster, scobject ) | [
-0.40686315298080444,
-1.482114553451538,
0.5595417618751526,
1.3088181018829346,
-0.678512692451477,
-0.5319697260856628,
0.9428292512893677,
-0.27109113335609436,
0.6965010166168213,
0.5211797952651978,
-0.18886852264404297,
1.0468636751174927,
-0.6274186372756958,
0.22794479131698608,
... |
def test _ configure _ flask ( ) : graph = create _ object _ graph ( name = " example ", testing = true ) assert _ that ( graph. app, is _ ( instance _ of ( flask ) ) ) | [
0.710158109664917,
0.784532904624939,
0.3553451895713806,
0.917145311832428,
0.20493678748607635,
0.1826549768447876,
0.5368589758872986,
-0.24142299592494965,
0.5142435431480408,
0.006296543404459953,
-0.6470085382461548,
0.30105483531951904,
0.5108219385147095,
-0.8097601532936096,
-0.... |
def _ create _ mask _ cache ( self, d _ inputs ) : if d _ inputs. _ in _ matvec _ context ( ) : sub = d _ inputs. _ names mask = np. ones ( len ( d _ inputs ), dtype = np. bool ) for key, val in self. _ metadata. items ( ) : if key [ 1 ] in sub : mask [ val [ 1 ] ] = false return mask | [
-1.486982822418213,
0.44281095266342163,
0.39808717370033264,
0.14106996357440948,
0.3149052560329437,
0.577123761177063,
0.3190928101539612,
-0.6931762099266052,
-0.3078193962574005,
0.7426131963729858,
0.10295383632183075,
0.034839995205402374,
-0.3128107190132141,
-0.14763328433036804,
... |
def xyz _ to _ mat ( foci, xyz _ dims = none, mat _ dims = none ) : foci = np. hstack ( ( foci, np. ones ( ( foci. shape [ 0 ], 1 ) ) ) ) mat = np. array ( [ [ - 0. 5, 0, 0, 45 ], [ 0, 0. 5, 0, 63 ], [ 0, 0, 0. 5, 36 ] ] ). t result = np. dot ( foci, mat ) [ :, : : - 1 ] # multiply and reverse column order return np. r... | [
-0.0910867229104042,
-1.1110188961029053,
0.45671749114990234,
-0.2829309105873108,
0.34328576922416687,
-0.774531364440918,
0.5004944205284119,
-0.1136578768491745,
0.5553603172302246,
0.5962875485420227,
-0.28569597005844116,
-0.28514575958251953,
0.21744970977306366,
-0.3619919717311859... |
def accuracy ( output, target, topk = ( 1, ) ) : maxk = max ( topk ) batch _ size = target. size ( 0 ) _, pred = output. topk ( maxk, 1, true, true ) pred = pred. t ( ) correct = pred. eq ( target. view ( 1, - 1 ). expand _ as ( pred ) ) res = [ ] for k in topk : correct _ k = correct [ : k ]. view ( - 1 ). float ( ). ... | [
-0.8331899046897888,
-0.5665203928947449,
0.625978946685791,
0.7391592860221863,
-0.5760585069656372,
-0.5138437747955322,
1.0204931497573853,
0.7640237808227539,
-0.4128255844116211,
0.6112820506095886,
0.23162920773029327,
0.4498496949672699,
1.338513970375061,
0.39215561747550964,
-0.... |
def wastemsec ( argmsecperiod = 10 ) : rez = time. time ( ) # get float sec now # showdebug ( " wastelog ", " wasting % 7d msec " % ( argmsecperiod ) ) while ( time. time ( ) - rez ) < ( argmsecperiod * 0. 001 ) : # waste time, just call a do nothing method. donothing ( ) return # exit after wasting time # end wastemse... | [
-0.18860915303230286,
-0.24362416565418243,
0.4797617495059967,
0.01805277355015278,
0.5343660712242126,
0.5934723615646362,
0.5077875256538391,
-1.1264309883117676,
-0.06275235116481781,
0.5274619460105896,
0.039600662887096405,
0.20843349397182465,
-0.26828232407569885,
0.950523674488067... |
def systemwarning ( self, warningtext = " acknowledge this system message. " ) : self. createsystemmsgackgui ( ) self. systemmsgackgui [ " text " ] = warningtext self. systemmsgackgui. show ( ) | [
1.2150516510009766,
0.3358704149723053,
0.4550510048866272,
0.32271522283554077,
-0.5195091962814331,
0.6046885251998901,
0.38626909255981445,
0.07884746789932251,
0.018733562901616096,
0.586217999458313,
-0.40944942831993103,
1.0983638763427734,
-0.36026668548583984,
1.1379129886627197,
... |
def predict _ detection _ model ( self ) : if self. ct _ scan _ detection is not none : self. detection _ results = self. detection _ neural _ network. predict _ using _ model ( self. ct _ scan _ detection ) else : self. debug ( " [! ] no reshaped images found! prediction cant be done! " ) raise exception ( " no reshap... | [
0.08531264215707779,
-0.39741671085357666,
0.2833061218261719,
1.202443242073059,
0.9025433659553528,
0.40087035298347473,
0.37880823016166687,
0.4348662197589874,
-0.5226307511329651,
-0.6695539355278015,
-0.3201528489589691,
-0.9695879817008972,
0.40456128120422363,
1.0692797899246216,
... |
def _ _ str _ _ ( self ) : return self. product _ name + ", " + str ( self. product _ price ) | [
-0.3612402081489563,
-1.7963409423828125,
0.641838014125824,
-0.5444169640541077,
-0.08607060462236404,
1.0570588111877441,
-1.1420199871063232,
-0.6107403039932251,
0.2938627600669861,
1.008230447769165,
0.2982228398323059,
0.2350056916475296,
0.8188272714614868,
-0.5566741228103638,
0.... |
def convert _ coords ( coords ) : dist _ y = geopy. distance. geodesic ( radar _ coords, ( coords [ 0 ], radar _ coords [ 1 ] ) ). m dist _ x = geopy. distance. geodesic ( radar _ coords, ( radar _ coords [ 0 ], coords [ 1 ] ) ). m if radar _ coords [ 1 ] > coords [ 1 ] : dist _ x * = ( - 1 ) if radar _ coords [ 0 ] > ... | [
0.16289043426513672,
-0.2965368330478668,
0.7618589997291565,
-1.008843183517456,
0.6128018498420715,
0.6249516010284424,
-0.9240394234657288,
-0.544323205947876,
-0.20632265508174896,
0.2090797871351242,
0.15148629248142242,
-0.599526047706604,
0.3244238793849945,
-0.021227747201919556,
... |
def action _ space ( self ) : raise notimplementederror | [
0.014698266983032227,
-0.6607428789138794,
0.4098358750343323,
1.2937798500061035,
0.46133333444595337,
0.5448929071426392,
1.1336233615875244,
-0.0632934644818306,
0.9992619752883911,
-0.7020801305770874,
0.03656686842441559,
0.9363574385643005,
0.33589375019073486,
0.935843825340271,
-... |
def output ( self, _ in, out, * * kw ) : | [
-0.8477267622947693,
-0.4350215792655945,
0.18948455154895782,
0.9620040059089661,
-0.9836479425430298,
-0.26144513487815857,
0.06999634951353073,
0.012238595634698868,
-0.8584445118904114,
-0.7404902577400208,
0.12071064859628677,
0.7997232675552368,
0.08938596397638321,
-0.50498121976852... |
def get _ retail _ site ( ) : return dm. retailsite. query. order _ by ( dm. retailsite. name. asc ( ) ) | [
-0.007150344084948301,
0.7612703442573547,
0.279855877161026,
-0.3880808651447296,
0.01271972805261612,
-0.792312502861023,
-0.14407514035701752,
-0.8327037692070007,
0.20220506191253662,
-0.2877306044101715,
0.17895574867725372,
0.014927484095096588,
-0.12066922336816788,
-0.4989358484745... |
def execute _ peak ( self, signal _ raw, lead, r _ peak, before, after ) : if self. plot _ mode : self. debug ( signal _ raw [ lead ], lead, r _ peak, before, after ) # remove baseline signal = self. _ baseline _ remove ( signal _ raw [ lead ] ) # convolve # signal = convolve ( signal, kernel = box1dkernel ( 7. 5 ) ) s... | [
0.14042875170707703,
0.3544243574142456,
0.868670642375946,
0.2864816188812256,
-0.680068850517273,
0.09676261246204376,
0.11592970788478851,
-0.12265311926603317,
0.4194653630256653,
0.8777973651885986,
0.13494686782360077,
1.086461067199707,
-0.19056642055511475,
-0.15791289508342743,
... |
def get ( org _ id ) : try : login _ options = orgservice. get _ login _ options _ for _ org ( org _ id, allowed _ roles = all _ allowed _ roles ) response, status = jsonify ( {'loginoption': login _ options. login _ source if login _ options else none } ), http _ status. http _ 200 _ ok except businessexception as exc... | [
-0.9106457829475403,
-0.07976076006889343,
0.6899855136871338,
0.057634491473436356,
0.22859440743923187,
-0.6499273180961609,
-0.6040464043617249,
-0.07127354294061661,
0.7535862922668457,
0.6735404133796692,
-0.40679222345352173,
1.1199679374694824,
-0.26888057589530945,
-0.1814933270215... |
def apply _ decay _ value _ norm ( mask, canvas _ y, max _ value, min _ value, center, grange ) : for x in range ( canvas _ y ) : radius = grange / 3 center _ prob = 1 / ( np. sqrt ( 2 * np. pi ) * abs ( radius ) ) u = ( x - center ) / abs ( radius ) x _ prob = ( 1 / ( np. sqrt ( 2 * np. pi ) * abs ( radius ) ) ) * np.... | [
0.1775583177804947,
-1.0094366073608398,
0.6586552262306213,
0.5088411569595337,
-0.4436834156513214,
0.13659286499023438,
0.12034217268228531,
0.5216370224952698,
0.8090633153915405,
-0.35296809673309326,
0.3151349723339081,
0.6626657843589783,
0.3003390431404114,
0.19677214324474335,
0... |
def get _ edge _ count _ d ( subj _ df, q _ state _ idx ) : # initialize dict with edge counts at 0 edge _ count _ d = { k : 0 for k in set ( subj _ df [ subj _ df ['question'] = = false ] ['edge'] ) } for state _ idx, dfrow in list ( subj _ df. iterrows ( ) ) [ : q _ state _ idx ] : if dfrow ['question'] : edge = dfro... | [
0.0944787785410881,
0.4233851134777069,
0.640674889087677,
-0.8255316615104675,
-0.4173611104488373,
0.5452080965042114,
0.17550581693649292,
0.20076929032802582,
0.53352290391922,
-0.0032264329493045807,
0.540588915348053,
0.21518303453922272,
1.050054669380188,
-0.14343126118183136,
0.... |
def run ( self ) : for item in self. conf. get _ top _ level _ items ( ) : # these are top level menus if item. filename. startswith ('phase1') : # proccess phase1 # handle all symbols first so that the variables used in menus are set for s in item. get _ items ( ) : if s. is _ symbol ( ) : # print " config { 0 } ". fo... | [
-0.8513013124465942,
-0.5398587584495544,
0.7602950930595398,
0.5400675535202026,
0.2248474508523941,
0.4181634485721588,
0.8443294167518616,
0.8944242596626282,
-0.7790549993515015,
0.3765886723995209,
-0.32947054505348206,
0.025580445304512978,
-0.007897675968706608,
1.3914909362792969,
... |
def koch ( tortoise : turtle. turtle ( ), order : int, size : int ) - > none : if order = = 0 : tortoise. forward ( size ) else : for angle in [ 60, - 120, 60, 0 ] : koch ( tortoise, order - 1, size / 3 ) tortoise. left ( angle ) | [
-0.08945180475711823,
1.192015528678894,
0.36049291491508484,
0.23539356887340546,
0.17238900065422058,
-0.2485414296388626,
-0.17060230672359467,
-0.3977258801460266,
-0.32008102536201477,
0.8283246159553528,
-0.676272988319397,
-0.532314658164978,
0.03519333153963089,
-0.1695527881383896... |
def test _ save _ toy ( self ) : example = { } example [ " position " ] = torch. tensor ( [ [ [ 0. 0, 0. 0, 0. 0 ], [ - 1. 0, 0. 0, 0. 0 ], [ - 1. 0, 0. 0, 1. 0 ], [ 0. 0, 0. 0, 1. 0 ], [ 0. 0, 1. 0, 0. 0 ], [ - 1. 0, 1. 0, 0. 0 ], [ - 1. 0, 1. 0, 1. 0 ], [ 0. 0, 1. 0, 1. 0 ], ] ] ) example [ " indices " ] = torch. ten... | [
0.34831586480140686,
-0.44517743587493896,
1.2360188961029053,
-0.41318953037261963,
0.5464522242546082,
-0.16653084754943848,
1.0634047985076904,
-0.8211401700973511,
-0.7599348425865173,
0.16233810782432556,
-1.8912718296051025,
-0.5694658160209656,
0.5266898274421692,
-0.065927609801292... |
def update _ entry ( self, entry ) : conn = self. conn sql ='''update entries set priority =?, begin _ date =?, end _ date =? where id =?'''cur = conn. cursor ( ) cur. execute ( sql, entry ) conn. commit ( ) | [
-0.443827748298645,
-0.6334360241889954,
0.6185253858566284,
0.10782957822084427,
0.10439413040876389,
0.2663709819316864,
-0.7146143913269043,
0.7821409702301025,
-0.0705823227763176,
0.7334870100021362,
-0.0600912980735302,
0.1066010519862175,
-0.34793972969055176,
0.23675568401813507,
... |
def get _ group _ by _ id ( self, id _ : int ) : return self. _ db _ inst. get _ group _ by _ id ( id _ ) | [
-0.4201603829860687,
0.9005448818206787,
0.1640911102294922,
-0.4427853226661682,
0.0062935673631727695,
-0.44061630964279175,
0.014336748979985714,
-1.0370192527770996,
-0.7863660454750061,
-0.2911878526210785,
0.21732722222805023,
0.3929835259914398,
-0.25391286611557007,
0.3124154210090... |
def data2img ( arr, font _ size = 50, resolution = ( 256, 256 ), font = cv2. font _ hershey _ simplex ) : x, y = resolution n _ colums, n _ features = 2, len ( arr ) n _ lines = n _ features % n _ colums + int ( n _ features / n _ colums ) frame = np. ones ( ( * resolution, 3 ), np. uint8 ) * 0 k = 0 # - - - - - iris -... | [
-0.6489388346672058,
0.04042064771056175,
1.0264273881912231,
0.18328313529491425,
-0.4212133586406708,
-0.6147594451904297,
-0.1997585892677307,
-0.07094646245241165,
0.9365844130516052,
0.6789116263389587,
-0.024869581684470177,
0.785368800163269,
-0.06998290121555328,
0.8122797012329102... |
def repl ( ) : ar = [ 0 ] ptr = 0 blocks = [ ] while 1 : try : not _ ok = true while not _ ok : try : prog = input ('>') not _ ok = false except keyboardinterrupt : print ( ) except eoferror : break if prog = ='p': print ( ptr ) elif prog = ='v': print ( ar [ ptr ] ) elif prog = ='a': print ( ar ) elif prog = ='help': ... | [
-0.152418851852417,
-0.05883292481303215,
1.1691023111343384,
0.34904494881629944,
-0.844465434551239,
-0.48072928190231323,
1.1522243022918701,
-0.3733837306499481,
0.2979252338409424,
-0.08745741099119186,
0.16488772630691528,
0.6514874696731567,
-0.35901930928230286,
0.10182631760835648... |
async def remove _ event _ message ( self, message : eventmessage ) - > mythicresponse : url = " { } { } : { } / api / v { } / event _ message / delete ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version ) resp = await self. post _ json ( url, data = { " messages " : [ mes... | [
-0.6078357100486755,
-0.2600628733634949,
0.6797096133232117,
-0.019535938277840614,
0.7360053062438965,
-0.9574131369590759,
-0.007399628404527903,
0.36544176936149597,
0.3751833140850067,
0.3144254684448242,
-0.1757308840751648,
0.16334646940231323,
-1.2467539310455322,
0.346444159746170... |
def generatesparsematrix ( self, df ) : noofusers = df ['user _ id']. nunique ( ) noofbooks = df ['book _ id']. nunique ( ) usermap = dict ( zip ( np. unique ( df [ " user _ id " ] ), list ( range ( noofusers ) ) ) ) bookmap = dict ( zip ( np. unique ( df [ " book _ id " ] ), list ( range ( noofbooks ) ) ) ) usermapinv... | [
-0.46150317788124084,
0.05675384774804115,
0.5498754978179932,
0.5155522227287292,
0.31302252411842346,
0.4781808853149414,
0.04361525923013687,
0.7738205194473267,
-0.48556801676750183,
0.07268834859132767,
0.6117419600486755,
-0.16361026465892792,
-0.8290221691131592,
-0.1481392979621887... |
def alternate _ plot ( smoothexprs, clustcentre, colour ) : # initialise plot values ( how many subplots etc. ) ntotal = len ( np. unique ( smoothexprs ['cluster'] ) ) nx = np. floor ( np. sqrt ( ntotal ) ) ny = int ( np. ceil ( ntotal / nx ) ) nx = int ( nx ) hfig = plt. figure ( figsize = ( 11. 69, 8. 27 ) ) # w, h t... | [
0.15205658972263336,
0.3242129981517792,
0.8075205087661743,
-0.17530526220798492,
-0.6156722903251648,
0.7922642230987549,
0.4043360650539398,
0.10945959389209747,
-0.025131255388259888,
0.8112581372261047,
0.5777712464332581,
0.4852238595485687,
-0.27843090891838074,
-0.00155604118481278... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.