text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def setup ( self ) : slicer. mrmlscene. clear ( 0 ) | [
0.4303460717201233,
-0.30286332964897156,
0.11115585267543793,
0.10619620233774185,
0.8190085291862488,
-0.35378497838974,
0.7121067047119141,
-0.43570244312286377,
0.338886559009552,
0.6548787355422974,
0.0876455008983612,
0.37696802616119385,
-0.4799724817276001,
1.2229692935943604,
-1... |
def run _ test _ profile _ required ( self ) : response = self. client. get ( self. url, follow = true ) self. assertredirects ( response, reverse ( " tasks : home " ), status _ code = 302, target _ status _ code = 200 ) | [
0.31358832120895386,
0.20337188243865967,
0.5274330973625183,
0.8049849271774292,
0.6638851761817932,
1.743098258972168,
1.598556637763977,
-0.43626052141189575,
-0.1485607922077179,
-0.7752889394760132,
-0.6946242451667786,
0.38902777433395386,
0.30582863092422485,
-0.13168534636497498,
... |
def create _ cert _ builder ( subject, issuer _ name, public _ key, days = 30, is _ ca = false ) : builder = x509. certificatebuilder ( ) builder = builder. subject _ name ( subject ) builder = builder. issuer _ name ( issuer _ name ) builder = builder. public _ key ( public _ key ) builder = builder. not _ valid _ bef... | [
0.49976691603660583,
0.3438851237297058,
0.6507323384284973,
0.7514511346817017,
-1.2858412265777588,
0.34218159317970276,
-0.9647069573402405,
0.18076162040233612,
0.4565434455871582,
-0.6402156949043274,
0.1586090624332428,
-0.2619936764240265,
-0.03615645691752434,
-0.40211185812950134,... |
def _ called _ via _ sudo ( ) : ppid = os. getppid ( ) has _ root = ( os. geteuid ( ) = = 0 ) try : surround _ info = _ surround _ info. check _ surround ( ) except oserror as e : if e. errno = = errno. eagain : raise suidsetuperror ( e. message ) raise e except runtimeerror as e : raise suidsetuperror ( e. message ) i... | [
0.26484400033950806,
0.1883731484413147,
1.1357589960098267,
0.38674020767211914,
-0.166215181350708,
0.5475297570228577,
0.4088435769081116,
0.5238078236579895,
-0.4787117540836334,
-0.6174389719963074,
0.19007310271263123,
0.5998374223709106,
0.2647669017314911,
0.14942632615566254,
-0... |
def is _ banned ( self ) : import aberbase. ban return self. uid. lower ( ) in aberbase. ban. banned ( ) | [
0.7072740197181702,
-0.5621082186698914,
0.39212071895599365,
1.759047031402588,
0.09932862967252731,
0.5682715177536011,
0.34231752157211304,
-0.7631009221076965,
0.7885713577270508,
-0.538743257522583,
-0.127900168299675,
1.5360616445541382,
-1.17528235912323,
0.5816125869750977,
-0.32... |
def isinternalmechanicalshutter ( ) : andor _ solis. isinternalmechanicalshutter. restype = ctypes. c _ uint internalshutter = ctypes. c _ int ( ) result = andor _ solis. isinternalmechanicalshutter ( ctypes. byref ( internalshutter ) ) check _ status ( result ) return int ( internalshutter. value ) | [
-0.24770528078079224,
0.36595073342323303,
0.4476974904537201,
-0.1064271479845047,
-0.3936927616596222,
0.1288340538740158,
0.43128758668899536,
-0.1451636254787445,
0.23697970807552338,
-0.7249642014503479,
-0.3280986547470093,
0.8313224911689758,
-1.4999001026153564,
0.3809685707092285,... |
def test _ cancel _ booking _ with _ filter _ and _ tab _ and _ page ( self ) : event = baker. make _ recipe ('booking. future _ ev') booking = baker. make _ recipe ('booking. booking ', event = event, user = self. user, paid = true ) self. assertequal ( booking. objects. all ( ). count ( ), 1 ) self. client. login ( u... | [
-0.23850677907466888,
0.5930588841438293,
0.6188035607337952,
1.2673851251602173,
-0.5973394513130188,
0.8718585968017578,
0.18644380569458008,
1.411073923110962,
-0.07402599602937698,
0.17481504380702972,
0.06766246259212494,
-0.4236724376678467,
0.661431610584259,
0.40877029299736023,
... |
def global _ importance _ rank ( self ) : return self. _ global _ importance _ rank. tolist ( ) | [
-0.14169922471046448,
0.284316748380661,
0.5427070260047913,
0.37751340866088867,
1.6747971773147583,
1.186673641204834,
0.10722699016332626,
1.0951789617538452,
0.3535447120666504,
1.0305476188659668,
-1.3014575242996216,
1.3394513130187988,
-0.8092806935310364,
0.3616476058959961,
0.59... |
def test _ async _ fifo ( args = none ) : if args is none : args = namespace ( width = 8, size = 16, name ='test') reset = resetsignal ( 0, active = 1, isasync = true ) wclk = clock ( 0, frequency = 22e6 ) rclk = clock ( 0, frequency = 50e6 ) fbus = fifobus ( width = args. width ) start = signal ( bool ( 0 ) ) @ myhdl.... | [
0.26211369037628174,
0.12281907349824905,
0.6177639365196228,
0.32739633321762085,
0.42013639211654663,
-0.6868552565574646,
0.8111699819564819,
0.24972616136074066,
-0.16891790926456451,
0.41683751344680786,
-0.2830299139022827,
-0.001720606000162661,
-0.9594195485115051,
0.18631565570831... |
def _ scan ( self ) : # convert textual iso 8601 timestamp in utc to # millisecond - precision unix epoch. str _ min = self. _ metrology _ params. timestamp [ : 16 ] + " utc " str _ sec = self. _ metrology _ params. timestamp [ 17 : ] epoch = timegm ( strptime ( str _ min, " % y - % m - % dt % h : % m % z " ) ) + float... | [
-0.20359234511852264,
0.3843596279621124,
0.4284806251525879,
-0.16670797765254974,
-0.5917718410491943,
-0.47379744052886963,
-0.15481209754943848,
-0.5477884411811829,
0.2501804530620575,
-0.6739816069602966,
0.41309282183647156,
0.4850924015045166,
0.5363591909408569,
-0.326195180416107... |
def rollback _ aa _ samples ( self ) : if self. _ _ rop is not none : self. _ _ rop. parm ( " ar _ aa _ samples " ). set ( self. _ _ aa _ samples ) | [
0.31631574034690857,
-0.9245551824569702,
0.6047450304031372,
-0.8047367334365845,
1.0921248197555542,
0.09557368606328964,
1.2728617191314697,
0.47494006156921387,
0.3034555912017822,
0.7046290636062622,
1.0289280414581299,
0.6505695581436157,
-0.26789146661758423,
-0.18834494054317474,
... |
def list _ addresses _ at _ subscription _ level ( self, filter : optional [ str ] = none, skip _ token : optional [ str ] = none, * * kwargs : any ) - > iterable [ " _ models. addressresource " ] : api _ version = self. _ get _ api _ version ('list _ addresses _ at _ subscription _ level') if api _ version = ='2020 - ... | [
-0.9149885177612305,
0.04616634175181389,
1.0379962921142578,
0.007412237115204334,
-0.41981083154678345,
-0.6035249829292297,
-0.5401037931442261,
-0.8503862619400024,
0.39607030153274536,
0.17515301704406738,
-0.4550355076789856,
1.3777631521224976,
-0.05034277215600014,
0.15704536437988... |
def create _ cora _ row ( row : list, category : str, img _ filename : str ) - > tuple : return ( retailer _ code, retailer _ name, row [ sku _ col _ idx ], row [ url _ col _ idx ], category, row [ name _ col _ idx ], is _ sleeper ( row ), try _ float _ cast ( row [ saleprice _ col _ idx ] ), try _ float _ cast ( row [... | [
-0.7720061540603638,
0.6086539626121521,
0.2831878066062927,
0.03695675730705261,
0.014440209604799747,
-0.8876780867576599,
-0.5378729701042175,
-0.6178805232048035,
-0.011157352477312088,
0.6447909474372864,
0.06375784426927567,
-0.6140739917755127,
0.6202957034111023,
0.5188425779342651... |
def get _ instance ( self, instance _ id ) : | [
-0.22998492419719696,
-0.586544394493103,
0.05948362872004509,
-0.6701483726501465,
0.3276589512825012,
0.12097374349832535,
-0.20130687952041626,
0.45502105355262756,
-0.24870999157428741,
0.30738821625709534,
0.3004637658596039,
1.0818991661071777,
-0.23189663887023926,
0.044405844062566... |
def check _ event _ attributes ( event _ data, required _ params = { }, forgone _ params = { }, exact _ attrs = { } ) : intrinsics, user _ attributes, agent _ attributes = next ( iter ( event _ data ) ) if required _ params : for param in required _ params ['agent'] : assert param in agent _ attributes, ( param, agent ... | [
0.13141921162605286,
-0.5883685946464539,
0.7235460877418518,
-0.2835911214351654,
0.03636660426855087,
0.8359711766242981,
-0.22916249930858612,
0.39823755621910095,
-0.9779508113861084,
0.6689335107803345,
0.4407534897327423,
0.22572800517082214,
-0.049042023718357086,
0.6870618462562561... |
def augmentation ( image, orig _ key _ points ) : which = random. randint ( 0, 10 ) # 0. rotate if which in [ 0, 1, 2 ] : t _ image, t _ keypoints = augmentation _ rotate ( image, orig _ key _ points ) flag = 1 # 1. scale elif which in [ 3, 4, 5, 6, 7, 8 ] : t _ image, t _ keypoints = augmentation _ scale ( image, orig... | [
-0.7235084772109985,
-0.1704212874174118,
0.6736512780189514,
0.0125175965949893,
0.17604926228523254,
0.18767526745796204,
0.09501323848962784,
0.02793118730187416,
-0.2534591257572174,
1.7449427843093872,
-0.4355509877204895,
-0.21466316282749176,
-0.3011986017227173,
0.354278564453125,
... |
def display _ name ( self, display _ name ) : if self. _ configuration. client _ side _ validation and display _ name is none : raise valueerror ( " invalid value for ` display _ name `, must not be ` none ` " ) # noqa : e501 self. _ display _ name = display _ name | [
0.8394638895988464,
-0.35959798097610474,
0.054185111075639725,
0.9473794102668762,
-0.8735430836677551,
0.8597934246063232,
0.44571706652641296,
0.23598279058933258,
-0.048967521637678146,
0.46514445543289185,
-0.40518641471862793,
-0.693505048751831,
-0.1080133318901062,
0.37835857272148... |
def enum _ previews _ asset _ items ( self, context ) : enum _ items = [ ] path _ models = bpy. data. window _ managers ['winman']. nexus _ model _ manager _ dir _ resource category = context. scene. nexus _ model _ manager. category _ list library = context. scene. nexus _ model _ manager. library _ list directory = o... | [
-1.1622837781906128,
-0.10293374955654144,
0.7039139866828918,
-0.7397791743278503,
-0.41908344626426697,
-0.053208570927381516,
-0.06929328292608261,
-0.3238717019557953,
0.4325881004333496,
0.5385484099388123,
-0.3233864903450012,
-0.6213975548744202,
0.5786545276641846,
0.29092621803283... |
def find _ markers ( ocr ) : return [ ( left, top ) for text, left, top, width, height in ocr if 0. 085 < left < 0. 096 and re. match ( r " [ 0 - 9 ] { 5, 6 } ", text ) ] | [
-0.927046537399292,
-0.7783670425415039,
0.519499659538269,
-0.13627134263515472,
-0.1376800686120987,
-0.08662624657154083,
0.2608433961868286,
-0.2947103679180145,
0.39874717593193054,
1.0447025299072266,
-0.7000796794891357,
-1.3106886148452759,
-0.677993893623352,
0.5220181345939636,
... |
def enable _ pairing ( self ) : print " pairing enabled " try : out = self. get _ output ( " power on " ) out = self. get _ output ( " discoverable on " ) out = self. get _ output ( " pairable on " ) out = self. get _ output ( " agent off " ) except bluetoothctlerror, e : print ( e ) return none | [
0.3630182147026062,
-0.5561356544494629,
0.7333443760871887,
0.7742919921875,
0.18391373753547668,
-0.5413622856140137,
-0.38178104162216187,
0.7440931797027588,
0.03793991729617119,
-0.4118293523788452,
0.010514912195503712,
-0.10499049723148346,
-1.0331037044525146,
0.9292219877243042,
... |
def group ( self, datasets : virtualdatasetbag, * * search _ terms : dict [ str, any ] ) - > virtualdatasetbox : raise notimplementederror | [
-0.8006039261817932,
0.7815664410591125,
0.34434473514556885,
-0.6362349390983582,
-0.3551419675350189,
-0.11760446429252625,
-0.16936136782169342,
-0.1758289486169815,
-0.00498368451371789,
-0.8050523996353149,
0.013134211301803589,
0.602469265460968,
0.17390601336956024,
0.02160392142832... |
def test _ status _ any _ subtask _ paused ( self ) : task1 = statussimulatingtaskproxy ( ) task2 = statussimulatingtaskproxy ( ) ctask = taskcontainer ('tester') ctask. add _ task ( task1 ) ctask. add _ task ( task2 ) self. verify _ status ( status _ paused, status _ stopped, status _ paused, ctask ) self. verify _ st... | [
0.7240551114082336,
0.256403386592865,
0.7327345013618469,
1.610454797744751,
0.45846131443977356,
0.7793508768081665,
0.2771093249320984,
0.3391609787940979,
0.1667449027299881,
-0.6101303100585938,
-1.5768930912017822,
-0.34111469984054565,
-0.09220651537179947,
0.7473264336585999,
-0.... |
def _ _ contains _ _ ( self, key ) : curr _ node = self. _ root for char in key : curr _ node _ 1 = curr _ node [ 1 ] if char in curr _ node _ 1 : curr _ node = curr _ node _ 1 [ char ] else : return false return true | [
-0.6524032950401306,
-0.47910046577453613,
0.5143646597862244,
0.006262687500566244,
-1.269069790840149,
-0.15752190351486206,
-0.1284688115119934,
0.12230712175369263,
-0.865402102470398,
0.6245739459991455,
0.20913676917552948,
0.38306277990341187,
-1.5266882181167603,
0.3591241538524627... |
def extract _ types ( sc ) : types = [ ] mapping = { } i = 0 sen _ list = [ file. get _ sentences ( ) for file in sc. files ] for list in sen _ list : for item in list : wf = item. wfs for form in wf : i + = 1 if form. is _ word _ form ( ) : if form. lemma is not none : mapping. update ( { str ( i ) : form. lemma } ) e... | [
-0.7225824594497681,
-0.8349966406822205,
0.5496063232421875,
-0.7670179009437561,
-0.19072458148002625,
-0.7292112708091736,
-0.11944348365068436,
0.2069811373949051,
-0.14558877050876617,
0.5142373442649841,
-0.7577717900276184,
-0.46374383568763733,
-0.0943475291132927,
1.52078366279602... |
def output ( self ) : return finestrino. localtarget ('/ tmp / processdata. txt') | [
1.153006911277771,
-1.1177095174789429,
0.1088222786784172,
-1.0876795053482056,
0.09237733483314514,
-0.12489470094442368,
0.17699457705020905,
0.887483537197113,
-1.0964828729629517,
-1.1788033246994019,
0.8962413668632507,
0.37362879514694214,
-0.10825648158788681,
-0.7910327315330505,
... |
def save ( self, filename ) : np. savez ( filename, train _ filenames = self. _ train _ filenames, train _ pos = self. _ train _ pos, train _ size = self. _ train _ size, validation _ filenames = self. _ validation _ filenames, validation _ pos = self. _ validation _ pos, validation _ size = self. _ validation _ size, ... | [
-0.5766001343727112,
-0.7184903025627136,
0.1848657876253128,
0.16295126080513,
0.6798759698867798,
0.35949334502220154,
1.346750020980835,
-0.07836183160543442,
-0.16834045946598053,
-0.24167996644973755,
-0.9206305146217346,
0.23842377960681915,
-0.36825814843177795,
0.3603265881538391,
... |
def train _ model ( model, train _ loader, examples _ num, epochs _ num = 10 ) : weights = torch. tensor ( [ examples _ num / ( 88 * examples _ num / 100 ), examples _ num / ( 8 * examples _ num / 100 ), examples _ num / ( 4 * examples _ num / 100 ) ] ). float ( ) criterion = nn. crossentropyloss ( ) # todo insert weig... | [
0.016685282811522484,
0.9355887770652771,
0.7051740288734436,
0.14568383991718292,
-0.021428966894745827,
-0.023485401645302773,
0.08604025840759277,
0.06653015315532684,
-0.5830857157707214,
0.15504753589630127,
-0.49511614441871643,
0.49530738592147827,
0.6951745748519897,
0.617847979068... |
def range _ wrapped ( n, offset ) : for i in range ( 0, n ) : yield ( i + offset ) % n | [
-1.2826405763626099,
0.03981063887476921,
0.4576062858104706,
-0.5739608407020569,
-0.6869427561759949,
0.7826036214828491,
-0.8028597831726074,
-0.16185329854488373,
0.32437387108802795,
-0.46972042322158813,
-0.12239180505275726,
0.34656277298927307,
0.09519810229539871,
-0.2653451561927... |
def _ _ getitem _ _ ( self, item ) : if self. creg is none : self. creg = self. couple _ register ( ) return self. creg [ item ] | [
-0.4220542013645172,
0.19303734600543976,
0.47757571935653687,
0.28074827790260315,
0.6156798601150513,
-0.6220223307609558,
0.5949040651321411,
-1.199095368385315,
0.49338385462760925,
-0.6609135866165161,
-0.39331722259521484,
0.06676264107227325,
-0.6316129565238953,
-0.4435482919216156... |
def to _ obj ( self, obj _ dict ) : station = station. objects. get _ by _ name ( obj _ dict [ " station " ] ) created _ at = datetime. strptime ( obj _ dict [ " timestamp " ],'% y - % m - % dt % h : % m : % s. % f') username = obj _ dict [ " username " ] return inspection ( station, username, created _ at = created _ ... | [
-0.8278766870498657,
0.10609447956085205,
0.647311806678772,
-0.40048739314079285,
-0.4251047670841217,
0.6512300968170166,
0.17417722940444946,
0.1146179810166359,
-0.23017829656600952,
0.5208732485771179,
-0.5924445986747742,
-0.6393072605133057,
0.03162514045834541,
-0.6314061284065247,... |
def is _ empty ( self ) : return self. head is none | [
-0.8411914110183716,
-0.10954327136278152,
0.420565128326416,
0.018355289474129677,
1.012072205543518,
-0.023157557472586632,
-0.8468809127807617,
-0.26195278763771057,
0.1504824161529541,
-0.054830558598041534,
-0.8256699442863464,
0.6759560704231262,
-0.6454116702079773,
0.18009018898010... |
def acl6pktsbridgedrate ( self ) : try : return self. _ acl6pktsbridgedrate except exception as e : raise e | [
1.4939314126968384,
0.41980940103530884,
0.18891899287700653,
0.6807768940925598,
0.482864111661911,
-0.04591257870197296,
0.23449066281318665,
-0.7325013875961304,
0.33496686816215515,
-0.18978741765022278,
0.2488432675600052,
-0.003273407695814967,
-1.127563714981079,
-0.4506431221961975... |
def test _ invalid _ response _ type ( self ) : # create an authorize request with an unsupported response _ type. data = {'client _ id': self. client. client _ id,'response _ type':'something _ wrong ','redirect _ uri': self. client. default _ redirect _ uri,'scope':'openid email ','state': self. state, } response = s... | [
-0.324907511472702,
-0.1730687916278839,
0.4717637300491333,
-0.384830117225647,
0.7832853198051453,
0.6065638661384583,
0.18778665363788605,
-0.4992923438549042,
0.9738001227378845,
-0.7470216751098633,
-0.06803587079048157,
0.28972142934799194,
0.279962956905365,
-0.8901888728141785,
0... |
def _ find _ current ( self, event ) : # todo : sort by zorder of axes then by zorder within axes found = selection ( ) self. _ artists. sort ( key = lambda x : x. zorder, reverse = true ) for artist in self. _ artists : # todo : should contains ( ) return false if invisible? if not artist. get _ visible ( ) : continue... | [
-0.032465655356645584,
-0.7419004440307617,
0.6507294178009033,
-0.8822908401489258,
-0.558385968208313,
-0.02956191822886467,
1.2481228113174438,
-1.1136497259140015,
0.1303047388792038,
0.3677140772342682,
0.011759022250771523,
0.031803835183382034,
-0.9237041473388672,
-0.58421576023101... |
def printsolvers ( self ) : for solver in self. _ solvers : if solver. age > 0 and solver. living : print ( solver. getdescription ( ) ) | [
-0.4201323091983795,
-0.8093294501304626,
0.4257744550704956,
0.6031922698020935,
0.8957194089889526,
0.7521366477012634,
-0.4512525200843811,
-0.8749430179595947,
-0.33623257279396057,
-0.0034701547119766474,
0.020415887236595154,
0.5309386253356934,
-0.26836270093917847,
1.29803550243377... |
def key _ expansion ( master _ key ) : # " expands the'1010...'128 bit string input into a list of 52 integers in the range 0 - 2 * * 16 ( 16bits ), [ 1, 3, 5, 9,... ] " # the 128 bit key is expanded into 52 16 - bit keys. # double the string so we can walk off and wrap around twice = master _ key * 2 temp _ key = [ ] ... | [
-0.1810697317123413,
0.08062148839235306,
0.7698004245758057,
-0.24895401298999786,
-0.672035276889801,
-0.5612785816192627,
0.16773724555969238,
0.8587269186973572,
0.4672180712223053,
0.5798753499984741,
-0.1312531679868698,
0.4135805666446686,
-0.5279998779296875,
0.3774348795413971,
... |
def imshow ( matrix ) : winname = str ( calendar. timegm ( time. gmtime ( ) ) ) cv2. namedwindow ( winname ) # create a named window cv2. movewindow ( winname, position _ x, position _ y ) cv2. imshow ( winname, matrix ) cv2. waitkey ( 1 ) | [
-0.131404846906662,
-0.1517440378665924,
0.4202703535556793,
0.8179824948310852,
-1.4063371419906616,
0.28569087386131287,
0.6659499406814575,
-0.1992839276790619,
0.039701852947473526,
0.5123627781867981,
0.46979302167892456,
0.8083856701850891,
0.305056631565094,
0.5446076989173889,
-0... |
def yield _ csv _ rows ( csv _ filename ) : with r _ open ( csv _ filename ) as csvfile : spamreader = csv. reader ( csvfile, delimiter ='\ t ', lineterminator ='\ n') for row in spamreader : yield row | [
0.7084548473358154,
-0.4292628765106201,
0.39752691984176636,
0.18066512048244476,
-0.336895227432251,
0.5270376801490784,
-0.17639870941638947,
0.9210178256034851,
0.16162832081317902,
-0.021539365872740746,
0.2126748114824295,
-0.25100651383399963,
0.4469219148159027,
0.18866677582263947... |
def start ( update, context ) : update. message. reply _ text ('hi!') | [
0.8327108025550842,
0.13594286143779755,
0.4120081067085266,
0.9070822596549988,
0.18199309706687927,
0.1149996891617775,
-0.15437500178813934,
0.910704493522644,
0.9847676157951355,
-0.176509827375412,
-0.6636224389076233,
1.0179672241210938,
-0.929531991481781,
-0.7156946063041687,
-2.... |
def handle _ partial _ sample _ weights ( outputs, sample _ weights, sample _ weight _ modes, check _ all _ flat = false ) : any _ sample _ weight = sample _ weights is not none and any ( w is not none for w in sample _ weights ) partial _ sample _ weight = any _ sample _ weight and any ( w is none for w in sample _ we... | [
0.2910451889038086,
-1.461254358291626,
0.6289836764335632,
0.6443230509757996,
-0.2226918488740921,
-0.6840636730194092,
0.3253486156463623,
-0.6342891454696655,
-0.28123629093170166,
0.33763888478279114,
0.4007920026779175,
-0.4347165822982788,
-0.4010196626186371,
0.9114683270454407,
... |
def reverse _ dna ( sequence ) : sequence = sequence. replace ('t ','u') sequence = sequence. replace ('a ','t') sequence = sequence. replace ('u ','a') sequence = sequence. replace ('g ','u') sequence = sequence. replace ('c ','g') sequence = sequence. replace ('u ','c') return sequence [ : : - 1 ] | [
-0.6878038048744202,
-0.5103069543838501,
0.4846932888031006,
-1.627427101135254,
-0.02769085019826889,
-0.6828698515892029,
-0.21439476311206818,
1.2845332622528076,
-0.0307740680873394,
0.7001981139183044,
-0.9915371537208557,
0.3433140516281128,
-0.051502302289009094,
-0.864953935146331... |
def _ get _ k8s _ client ( ) : # note that we are using'in _ cluster _ config'log. debug ( " loading kubernetes config " ) kubernetes. config. load _ incluster _ config ( ) log. debug ( " creating kubernetes client " ) return kubernetes. client. corev1api ( ) | [
-0.019551487639546394,
-0.7703181505203247,
0.1522064357995987,
-0.5570685863494873,
-0.6132110953330994,
0.32410088181495667,
-0.6593334674835205,
-0.11822619289159775,
0.19305603206157684,
0.5077356100082397,
0.5626220107078552,
0.45992839336395264,
-0.970701277256012,
-1.15632164478302,... |
def ok ( message ) : return status _ line ( ('status ','ok ', message ) ) | [
1.3789478540420532,
-0.15896746516227722,
0.1444644331932068,
0.36532679200172424,
-0.04361169785261154,
-0.3616575300693512,
-0.18572092056274414,
0.30592966079711914,
-0.6896098852157593,
0.2593146860599518,
0.018575165420770645,
1.057752251625061,
0.12242691218852997,
-0.009014046750962... |
def test _ mutual _ info _ score _ functional _ is _ symmetric ( preds, target ) : for p, t in zip ( preds, target ) : assert torch. allclose ( mutual _ info _ score ( p, t ), mutual _ info _ score ( t, p ) ) | [
-0.723347008228302,
-0.3506707549095154,
0.3234589695930481,
0.7126206755638123,
0.9893445372581482,
0.271007239818573,
-0.4404042959213257,
-0.277387410402298,
-0.8643838167190552,
-0.16393202543258667,
-0.18044117093086243,
0.4392539858818054,
0.7256914973258972,
-0.19624190032482147,
... |
def time _ features _ from _ frequency _ str ( freq _ str : str ) - > list [ timefeature ] : features _ by _ offsets = { offsets. yearend : [ ], offsets. quarterend : [ monthofyear ], offsets. monthend : [ monthofyear ], offsets. week : [ dayofmonth, weekofyear ], offsets. day : [ dayofweek, dayofmonth, dayofyear ], of... | [
-0.16462887823581696,
-0.8194752931594849,
0.7092999815940857,
0.04248663783073425,
0.10982871800661087,
-0.10083691030740738,
0.21412916481494904,
-0.13853977620601654,
0.7516165375709534,
0.010693869553506374,
-0.7742598652839661,
0.37602418661117554,
0.187265545129776,
0.272032529115676... |
def tags ( self ) - > optional [ mapping [ str, str ] ] : return pulumi. get ( self, " tags " ) | [
0.49468427896499634,
0.6906231641769409,
0.500225305557251,
-0.027391448616981506,
1.2460026741027832,
0.3964167833328247,
-0.9459965825080872,
-0.075942762196064,
0.28300008177757263,
-0.043076932430267334,
-0.8528786897659302,
0.3407745659351349,
0.2208414077758789,
-0.13886459171772003,... |
def get _ object _ and _ interface ( self : optional [ dict [ str, any ] ], object : optional [ dict [ str, any ] ] = none, interface : optional [ dict [ str, any ] ] = none, service : optional [ dict [ str, any ] ] = none, ) - > tuple [ managedobject, optional [ interface ] ] : if object : if " id " in object : # obje... | [
-0.49702808260917664,
-0.11556031554937363,
0.9183911681175232,
-0.014963330700993538,
-0.19161446392536163,
0.29795971512794495,
-0.10622650384902954,
-0.5881548523902893,
0.530752956867218,
0.21082265675067902,
0.33522647619247437,
0.46368202567100525,
-0.13408346474170685,
0.83778375387... |
def terminate _ threads ( self ) : for server in self. protocol. outgoing _ queues : self. protocol. outgoing _ queues [ server ]. put ( none ) for i in range ( self. max _ processors ) : self. proc _ queue. put ( none ) | [
0.059343498200178146,
-0.11033383756875992,
0.5474129319190979,
-0.9619911313056946,
1.3128130435943604,
0.46491339802742004,
-0.05551794171333313,
-0.10819204896688461,
-0.23143823444843292,
-0.481176495552063,
-0.5225586891174316,
0.5367385149002075,
-1.357554316520691,
0.705386281013488... |
def plot _ power _ spectrum ( self, time, * * kwargs ) : defaults = dict ( radius = none, deriv = 0, nmax = self. nmax, titles ='spatial power spectrum') kwargs = defaultkeys ( defaults, kwargs ) radius = kwargs. pop ('radius') nmax = kwargs. pop ('nmax') deriv = kwargs. pop ('deriv') units = f'( { du. gauss _ units ( ... | [
0.9725515246391296,
0.32436445355415344,
0.6224966049194336,
0.32749244570732117,
-0.6036643385887146,
-0.10552394390106201,
-0.8051800727844238,
0.17210793495178223,
-0.9207465052604675,
-0.15356267988681793,
0.10835358500480652,
1.4557651281356812,
0.5132016539573669,
0.9705262184143066,... |
def _ update _ bullets ( self ) : # update bullets position. self. bullets. update ( ) # for every bullet in the group detect collision with the target. for bullet in self. bullets : self. bullet _ target _ collision = pygame. sprite. spritecollideany ( self. target, self. bullets ) if self. bullet _ target _ collision... | [
-0.6995427012443542,
-0.763857364654541,
0.4063660204410553,
-0.28253909945487976,
0.7354530096054077,
-0.25233250856399536,
-0.30910825729370117,
-1.325690746307373,
-0.4229040741920471,
1.1419401168823242,
-0.2514796257019043,
-0.6553138494491577,
-0.6178961992263794,
0.2377840280532837,... |
def showrestaurants ( ) : restaurants = session. query ( restaurant ) if'username'not in login _ session : return render _ template ('restaurants _ public. html ', restaurants = restaurants, login _ session = login _ session ) return render _ template ('restaurants. html ', restaurants = restaurants, login _ session = ... | [
-0.7747532725334167,
0.6548247337341309,
0.21310098469257355,
0.29428428411483765,
-0.5693626403808594,
-0.22306446731090546,
0.0325300395488739,
1.1227986812591553,
0.30548009276390076,
0.03292807936668396,
0.3294220566749573,
0.6599465608596802,
-0.6163848638534546,
0.5126407742500305,
... |
def get _ irq ( self, target ) : return query _ int _ attribute ( self, target, 0, nv _ ctrl _ irq ) | [
-1.5579417943954468,
-0.05024603009223938,
0.3598240315914154,
0.33883747458457947,
-0.17815540730953217,
-0.8828871250152588,
0.4632912576198578,
-1.1490992307662964,
-0.10270416736602783,
0.20295339822769165,
0.13615362346172333,
-0.27606821060180664,
-1.18435800075531,
-0.75678741931915... |
def hit ( self, item, * identifiers ) : return self. storage ( ). acquire _ entry ( item. key _ for ( * identifiers ), item. amount, item. get _ expiry ( ) ) | [
-0.32681557536125183,
-0.03705890104174614,
0.14932554960250854,
0.6092204451560974,
0.8933902978897095,
-0.26055577397346497,
-0.5516577363014221,
-0.23467853665351868,
-0.5654920935630798,
0.18745380640029907,
-0.32127735018730164,
-0.2407001256942749,
-0.5176185965538025,
-2.28015446662... |
def dstconnected ( self, protocol ) : if self. tunnel _ type = ='tls - uni': pass # handshake not completed at this point for tls - uni else : print " ccp has connected to ct, starting ccp server... " self. dstproto = protocol # we're the producer for the dst transport protocol. transport. registerproducer ( self, true... | [
-0.3181608021259308,
-0.11363288760185242,
0.37959998846054077,
-0.29301702976226807,
0.3125137388706207,
0.8901753425598145,
0.04114418476819992,
-0.10120709985494614,
-0.11935121566057205,
0.11273413151502609,
-0.8731442093849182,
0.5441954731941223,
0.04167835786938667,
-0.2869729995727... |
def canonical _ entity ( self ) : if self. _ canonical _ entity : return self. _ canonical _ entity else : return self | [
0.5350755453109741,
-0.7936240434646606,
0.5796315670013428,
0.3900454342365265,
0.2556389570236206,
1.2554365396499634,
0.8136520981788635,
-0.5333186388015747,
-0.11003593355417252,
-0.3107885420322418,
1.0583468675613403,
1.1452778577804565,
-0.22573697566986084,
-0.09105581790208817,
... |
def complete _ appointment ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': appointment = appointment. objects. get ( pk = request. post. get ('appointment _ pk') ) if timezone. now ( ) > appointment. end _ date _ time : appointment. status = appointment. status _ completed appointme... | [
-0.3700534999370575,
-0.30234742164611816,
0.7937859296798706,
0.34931468963623047,
-0.5942503213882446,
1.6116752624511719,
-0.4335269629955292,
0.474203884601593,
0.11196044087409973,
1.5158557891845703,
0.32334282994270325,
-0.24141807854175568,
0.05880078300833702,
0.5490010976791382,
... |
def select _ menu _ item ( items ) : print " select one of the following : " _ count = 1 for i in items : print " [ " + str ( _ count ) + " ] " + " " + str ( i ) _ count = _ count + 1 _ in = raw _ input ( " input 1 to " + str ( len ( items ) ) + " " ) try : _ in _ int = int ( _ in ) if 1 < = _ in _ int < = len ( items ... | [
-1.1727936267852783,
-0.07311449944972992,
0.6283850073814392,
1.0405685901641846,
0.10791553556919098,
0.30282342433929443,
0.25077706575393677,
-0.48690328001976013,
-0.17204804718494415,
-0.4836181700229645,
0.15034569799900055,
0.11809416115283966,
-1.082194447517395,
-0.22270441055297... |
def iter _ mc ( self, ns _ key, ipv4 _ amount = none ) : ver _ args = [ {'name':'ns _ key ','arg': ns _ key,'t': emunamespacekey }, {'name':'ipv4 _ amount ','arg': ipv4 _ amount,'t': int,'must': false }, ] emuvalidator. verify ( ver _ args ) params = ns _ key. conv _ to _ dict ( true ) return self. emu _ c. _ get _ n _... | [
-1.36587393283844,
0.21621286869049072,
0.5763585567474365,
0.11571487039327621,
-0.6615287065505981,
-0.5519811511039734,
0.012331693433225155,
-0.7898091077804565,
-0.25018373131752014,
0.8797646760940552,
0.19113366305828094,
0.3509238660335541,
-0.7545918226242065,
0.9939919710159302,
... |
def _ copy _ over _ script ( filepath : str ) - > str : remove _ lines _ containing = [ '. run _ this _ script'] new _ lines = [ ] with open ( filepath,'r') as f : lines = f. readlines ( ) for line in lines : if not any ( [ s in line for s in remove _ lines _ containing ] ) : new _ lines. append ( line ) new _ filepath... | [
0.28716591000556946,
-1.1959565877914429,
0.6519947052001953,
0.3123394548892975,
-0.3514239192008972,
0.22411766648292542,
1.0731990337371826,
-0.7073649168014526,
0.3016434907913208,
1.2979047298431396,
0.09711120277643204,
0.14459696412086487,
0.47444015741348267,
0.5159193277359009,
... |
def test _ transaction _ id _ filter _ and _ format ( client, acc1 _ usd _ deposit _ transaction _ factory, acc2 _ eth _ withdrawal _ transaction _ factory, ) : acc1 _ usd _ deposit _ transaction _ factory ( client _ address, protocol = transaction. protocol. sep6 ) withdrawal = acc2 _ eth _ withdrawal _ transaction _ ... | [
0.33769893646240234,
-0.292799711227417,
0.6559780240058899,
-0.36503684520721436,
0.17907562851905823,
-0.07548012584447861,
-0.47363683581352234,
-0.2846926748752594,
0.11191271990537643,
-0.2473677545785904,
-0.46547287702560425,
-0.1722145974636078,
0.8223950862884521,
-0.4555342197418... |
def show _ welcome ( ) : help _ line = lambda line : f " * { line : ^ 78 } * " help _ text = ( " hello friend! " + " \ n " " ever wondered how many months, days, hours, minutes or seconds " + " \ n " " have passed since your birthday? " + " \ n " " have you completely lost track of the years? " + " \ n " " well, look n... | [
0.8979824781417847,
0.22214064002037048,
1.0074467658996582,
0.3315816819667816,
-0.2654177248477936,
0.4106805622577667,
0.020051656290888786,
0.15453428030014038,
-0.7068285942077637,
0.005240556318312883,
-0.10928815603256226,
0.6792312860488892,
1.1249457597732544,
0.7083795666694641,
... |
def duplicate _ object ( source, destination ) : minio _ client. copy _ object ( bucket _ name = bucket _ name, object _ name = destination, object _ source = f " { bucket _ name } / { source } " ) | [
-0.1660209447145462,
-0.3176136612892151,
0.539229154586792,
-0.13702651858329773,
-0.7756506204605103,
0.6269481182098389,
-0.14069192111492157,
-0.3778575658798218,
0.0747641921043396,
0.7598137855529785,
-1.6485317945480347,
1.0198488235473633,
1.1282774209976196,
-1.613686203956604,
... |
def gethandle ( self ) : return _ topods. topods _ tvertex _ gethandle ( self ) | [
0.45292288064956665,
0.8351725935935974,
0.3090844452381134,
0.23531506955623627,
1.177978515625,
1.0979619026184082,
0.6352964639663696,
-0.9222672581672668,
0.08594107627868652,
-0.8881556987762451,
0.431474506855011,
0.15661588311195374,
-1.3620731830596924,
-0.8870741724967957,
0.294... |
def calibrate ( self, n, sigma _ m, km ) : # the forward price f = self. s * np. exp ( self. r * self. t ) def obj ( x ) : self. alpha, self. beta, self. rho, self. sigma = x sse = 0 for i in range ( n ) : p = ( f * km [ i ] ) * * ( ( 1 - self. beta ) / 2 ) q = np. log ( f / km [ i ] ) z = self. alpha * p * q / self. s... | [
0.9322115182876587,
-0.3086259961128235,
0.9647941589355469,
0.4645787477493286,
-0.7915835380554199,
-0.4289793372154236,
-0.10307914763689041,
-0.30918237566947937,
-0.7664544582366943,
0.6428220272064209,
-0.3758556842803955,
-0.10226786881685257,
-1.1981436014175415,
0.6844521760940552... |
def query _ pts _ multi _ bacteria ( observation _ window _ hours ) : query = " " " with admissions as ( select admits. subject _ id, admits. hadm _ id, admits. admittime, admits. deathtime, microb. charttime, microb. org _ itemid org _ id, case when admits. deathtime < microb. charttime then 1 else 0 end as death _ be... | [
0.3187366724014282,
-0.21699653565883636,
0.794413685798645,
0.14080287516117096,
-0.8233687281608582,
0.292558878660202,
0.19276386499404907,
-0.25629255175590515,
-0.1408410370349884,
0.5064476728439331,
0.42225003242492676,
1.0333149433135986,
-0.3165875971317291,
0.8978782296180725,
... |
def does _ dir _ exist ( self, directory, buildit = false ) : if not os. path. isdir ( directory ) : if not buildit : return false os. makedirs ( directory ) return true | [
-1.5876328945159912,
0.4193046987056732,
0.7103039622306824,
-0.24315650761127472,
0.9899225234985352,
1.1709169149398804,
0.348548024892807,
0.6011245250701904,
0.14104747772216797,
-0.38137727975845337,
0.13222946226596832,
-0.5688859820365906,
-0.14507563412189484,
0.23825183510780334,
... |
def appendmsg ( self, filename, msg ) : f = open ( filename, " a " ) f. write ( " autograder [ % s ] : % s \ n " % ( datetime. now ( ). ctime ( ), msg ) ) f. close ( ) | [
0.05507314205169678,
-0.6357622146606445,
0.5820190906524658,
-0.5515132546424866,
0.29712244868278503,
1.3149070739746094,
-0.2802148461341858,
0.6585598587989807,
-1.47178316116333,
-0.21466906368732452,
0.040310025215148926,
1.013453483581543,
-0.3703010380268097,
1.6049264669418335,
... |
def get _ tensor _ by _ name ( self, song _ name ) : song _ idx = self. song _ to _ idx [ song _ name ] # song _ idx, bar _ idx = self. song _ to _ bar _ idx [ song _ name ] # print ( bar _ idx ) samples = self. song _ tensor [ song _ idx ] samples = torch. tensor ( samples, dtype = torch. float ) return samples | [
-0.008779488503932953,
-0.7764238119125366,
0.24091261625289917,
-0.7739237546920776,
-0.1878904104232788,
-0.16991157829761505,
0.6167095303535461,
-0.584125816822052,
-0.6964841485023499,
1.0112967491149902,
-0.39151179790496826,
0.2071002870798111,
0.09093620628118515,
-1.51077771186828... |
def setgriddatasetmetas ( self, griddatasetmetas ) : self. griddatasetmetas = griddatasetmetas | [
-1.0011588335037231,
0.8998457789421082,
0.4078599214553833,
-1.120305061340332,
0.6223496794700623,
-0.10948552936315536,
-1.3771896362304688,
-0.5960678458213806,
-0.702514111995697,
-0.3653828203678131,
0.08923014253377914,
1.2765758037567139,
0.8528285026550293,
0.14967215061187744,
... |
def gif _ defaced ( bids _ dir, subject _ label, session = none, t2w = none ) : from bids import bidslayout from glob import glob from os. path import join as opj from shutil import move import gif _ your _ nifti. core as gif2nif layout = bidslayout ( bids _ dir ) bidsonym _ path = opj ( bids _ dir,'sourcedata / bidson... | [
-0.2372758388519287,
0.11176387220621109,
0.670361340045929,
0.1862211972475052,
0.0777457132935524,
0.275382399559021,
0.8930398225784302,
0.4279172420501709,
-0.20652996003627777,
0.36609354615211487,
-0.4804189205169678,
0.5359397530555725,
0.7702343463897705,
0.7079061269760132,
0.12... |
def append ( self, item ) : heapq. heappush ( self. heap, ( self. f ( item ), item ) ) | [
-0.09341121464967728,
0.17885079979896545,
0.26814964413642883,
0.5945316553115845,
0.11959129571914673,
0.2586904466152191,
-0.7458076477050781,
-0.36023083329200745,
0.35599932074546814,
-0.22125746309757233,
-0.6253960132598877,
0.08328693360090256,
0.17554539442062378,
0.46184539794921... |
def setmode ( ) : global mode if mode = = 0 : dock. setparent ( mdi ) dock. settitlebarwidget ( wid ) wid. hide ( ) dock. show ( ) widgetlist ( true ) mode = 1 else : dock. setparent ( mw ) dock. settitlebarwidget ( none ) mw. adddockwidget ( qtcore. qt. leftdockwidgetarea, dock ) dock. show ( ) widgetlist ( false ) mo... | [
-0.12854301929473877,
0.9131122827529907,
0.6682046055793762,
0.16733503341674805,
-0.6241310834884644,
1.1923997402191162,
0.7982375025749207,
0.3992104232311249,
0.3576710820198059,
-0.06640876829624176,
-0.137007474899292,
-0.2113797813653946,
-0.5519054532051086,
1.9233348369598389,
... |
def test _ withindistance _ no ( intercompartylist ) : stanfordnoinvite = intercompartylist. withindistance ( stanford, office, shortdistance ) salinasnoinvite = intercompartylist. withindistance ( salinas, office, longdistance ) verify _ answer ( stanfordnoinvite, false ) verify _ answer ( salinasnoinvite, false ) | [
-0.2283637374639511,
0.03747258335351944,
0.40834054350852966,
0.16148261725902557,
-0.9122517108917236,
1.0279299020767212,
-0.9856665730476379,
0.4585191607475281,
-0.613778293132782,
-0.2194392830133438,
-1.148361325263977,
0.6809452772140503,
-1.2413456439971924,
-0.08359304070472717,
... |
def create _ draft _ board ( engine, username, df _ rankings, df _ stats ) : # left join rankings dataframe to the stats dataframe df _ rankings = df _ rankings. set _ index ( " id " ) df _ stats = df _ stats. set _ index ( " id " ) df = df _ rankings. join ( df _ stats, how = " left " ). reset _ index ( ) # fill nulls... | [
-0.1059984639286995,
0.7996012568473816,
0.9261475205421448,
-0.2197742909193039,
0.6384485363960266,
-0.26238706707954407,
0.344155490398407,
-0.30501362681388855,
-0.11309997737407684,
0.13689711689949036,
0.10340458899736404,
0.10721616446971893,
0.86680006980896,
-0.4327303469181061,
... |
def setupfirewall ( self ) : log. info ( " \ tsetting up firewall... " ) section = self. data. getsection ( " network " ) ports = section. get ( " open _ ports " ). data. values ( ) for port in ports : proto = port. get ( " proto " ) port _ num = port. get ( " port " ) desc = port. get ( " description " ) # create the ... | [
0.4110467731952667,
0.5826557278633118,
0.3426056504249573,
-0.3401435315608978,
1.588234782218933,
0.48189395666122437,
0.35384610295295715,
0.9611491560935974,
-0.435153067111969,
-0.3659365177154541,
0.20257897675037384,
-0.2559936046600342,
-0.2246764451265335,
1.041211485862732,
0.6... |
def consensus _ cluster ( h _ matrices : list ) : x = np. vstack ( [ df. loc [ :,'max _ id']. values for df in h _ matrices ] ) consensus _ matrix = np. vstack ( [ ( x [ :, [ y ] ] = = x [ : ] ). sum ( 0 ) for y in range ( x. shape [ 1 ] ) ] ) df = pd. dataframe ( consensus _ matrix, index = h _ matrices [ 0 ]. index, ... | [
-0.6838539242744446,
0.02162620611488819,
0.5685015320777893,
0.36137863993644714,
0.542288064956665,
0.043650951236486435,
0.5270261168479919,
1.0151135921478271,
-0.8981202244758606,
1.672813057899475,
1.0193232297897339,
0.20558986067771912,
-0.09604111313819885,
0.024866994470357895,
... |
def reference ( self, reference ) : self. _ reference = reference | [
0.10882293432950974,
-0.27150267362594604,
-0.08301292359828949,
-0.030459651723504066,
0.00019436648290138692,
0.5862460732460022,
0.5429030656814575,
0.3702320456504822,
0.01710488088428974,
0.10020475834608078,
-0.3311921954154968,
0.1447490006685257,
-0.5511152744293213,
0.238891825079... |
def order _ book ( self, market _ id : str ) : data = self. get ( f " { market _ id } / market / order _ book " ) if self. return _ json : return data return _ m. orderbook. create _ from _ json ( data ) | [
-0.8579874634742737,
-0.0425785668194294,
0.23515522480010986,
0.6116869449615479,
0.34202152490615845,
-0.0977899357676506,
-0.6825230717658997,
-0.9265865087509155,
-0.2562488913536072,
0.23053166270256042,
-0.38314536213874817,
0.7421923875808716,
-0.9450967311859131,
-0.479755759239196... |
def access _ if ( ifnod, exc _ id ) : if _ id = self. create _ ast _ component ( ifnod, component. if ) self. create _ composition ( if _ id, * self. composition _ edge ) subscript = ast. subscript ( now _ attribute ('condition _ exceptions'), ast. index ( ast. num ( exc _ id ) ), l ( ) ) else _ subscript = ast. subscr... | [
0.17457632720470428,
-0.7226668000221252,
0.7948307991027832,
-0.06070174276828766,
-0.5384335517883301,
-0.45258399844169617,
1.1697834730148315,
0.5228146314620972,
0.4263245463371277,
0.0739152580499649,
0.7539492845535278,
0.556102991104126,
-0.3046585023403168,
0.20190709829330444,
... |
def test _ valid _ read ( self ) : valid1 ='s00010000000b { " message " :'message = read _ message ( valid1, _ proto _ version ) self. assertisinstance ( message, streamresultmessage ) self. assertequal ( message. request _ id, " 0001 " ) self. assertequal ( message. payload,'{ " message " :') | [
0.22071342170238495,
0.12760092318058014,
0.5762884020805359,
0.28565773367881775,
-0.16106872260570526,
0.21700729429721832,
-0.43104496598243713,
-0.5885727405548096,
0.25151336193084717,
-1.1105107069015503,
0.33819636702537537,
0.03844577074050903,
-1.16422438621521,
-0.608133137226104... |
def scale _ coords ( processed _ shape : tuple [ int ], coords : list [ int ], original _ shape : tuple [ int ], ratio _ pad : tuple [ int ] = none ) - > list [ int ] : # calculate from original _ shape if ratio _ pad is none : # gain = old / new gain = min ( processed _ shape [ 0 ] / original _ shape [ 0 ], processed ... | [
0.0520923025906086,
-0.27651622891426086,
0.9021509885787964,
-0.7090810537338257,
-0.7482666373252869,
0.027352897450327873,
0.001090093282982707,
-0.34733283519744873,
-0.25481775403022766,
0.9408805966377258,
0.053339652717113495,
-0.03635675832629204,
0.8152884244918823,
-0.17784142494... |
def indices _ in _ timeframe ( times : list [ list [ datetime ] ], datetime _ from : datetime, datetime _ to : datetime ) - > int : idx _ from = 0 idx _ to = 0 for start, end in times : if start < datetime _ from : idx _ from + = 1 if end < datetime _ to : idx _ to + = 1 else : break return idx _ from, idx _ to | [
-1.7946621179580688,
0.17495973408222198,
0.44701868295669556,
-0.8374626040458679,
-0.3765852153301239,
-0.24999505281448364,
0.17315322160720825,
0.5059788227081299,
-0.9153479933738708,
0.8705658912658691,
-0.5220268368721008,
-0.006650202441960573,
-0.05338083952665329,
-0.289782166481... |
def _ is _ valid ( cls, * args, * * kwargs ) : return false | [
-1.1610827445983887,
-0.6474173069000244,
0.4270249307155609,
0.49946802854537964,
0.10054474323987961,
1.2857260704040527,
-0.22506800293922424,
0.40207889676094055,
-0.15741892158985138,
-0.6050648093223572,
0.2842557728290558,
-0.7691373229026794,
-0.919573187828064,
0.16295567154884338... |
def insert ( self, word ) : children = self. root. children for c in word : if c not in children : tmp = trienode ( ) tmp. c = c children [ c ] = tmp treenode = children [ c ] children = treenode. children treenode. isword = true | [
0.45440733432769775,
1.145965337753296,
0.5762455463409424,
-0.48643508553504944,
0.13226228952407837,
0.6091792583465576,
0.7046831250190735,
0.8717994689941406,
-0.011333956383168697,
0.7560365200042725,
-1.0325733423233032,
0.08798820525407791,
-1.7136321067810059,
0.7059149146080017,
... |
def _ pre _ update ( self ) : self. _ matrix = self. _ coo | [
0.32774344086647034,
-0.8409475684165955,
0.22764775156974792,
-0.6852055788040161,
-0.20104603469371796,
-0.8837575316429138,
1.0818922519683838,
0.16542045772075653,
-0.10349776595830917,
-0.001814117538742721,
0.06564490497112274,
0.3027111291885376,
0.24470359086990356,
-0.396272808313... |
def peek ( self ) : if self. _ size > 0 : return self. top. valor raise indexerror ( " the stack is empty! " ) | [
0.1382932960987091,
0.893321692943573,
0.7743082046508789,
0.2763848602771759,
-0.23589110374450684,
0.24623842537403107,
0.1610807478427887,
-1.0252842903137207,
-0.2942624092102051,
-0.4121098816394806,
0.3398241102695465,
0.42412635684013367,
-0.11719296872615814,
-0.0457451269030571,
... |
def _ rollback ( self, resource : str, renamed _ resource : str ) - > none : self. cache. remove _ item ( resource ) # clear the item from the cache, let it be re - added naturally if os. path. exists ( resource ) : os. remove ( resource ) if renamed _ resource : # restore the renamed file os. rename ( renamed _ resour... | [
0.47068777680397034,
-0.5050427317619324,
0.4850330948829651,
-0.6592681407928467,
-0.640289306640625,
-0.07473495602607727,
-0.564068078994751,
0.9863201975822449,
0.05085993558168411,
1.1677186489105225,
-0.0754430815577507,
0.6472151875495911,
-0.022113138809800148,
-0.8285003900527954,... |
def put _ resource ( self, url, data ) : # set up headers headers = dict ( ) headers. update ( {'accept':'application / json'} ) # do the put request r = requests. put ( url, headers = headers, verify = self. verify, data = json. dumps ( data ), proxies = self. proxies ) # if successful return json data ( or empty json... | [
-0.8361943364143372,
-0.432589054107666,
0.7460616230964661,
-0.8250033259391785,
-0.733970582485199,
-0.5067844986915588,
-1.0681039094924927,
-0.28072506189346313,
-0.03013431280851364,
0.6179322600364685,
-0.9489151835441589,
-0.01118776760995388,
-1.2750300168991089,
-0.750308275222778... |
def create ( self ) : ma = self. marca. text ( ) plat = self. plataforma. text ( ) cant = self. cantidad. text ( ) val = self. valor. text ( ) d = int ( self. dia. currenttext ( ) ) m = self. mes1. currentindex ( ) + 1 a = int ( self. anio. currenttext ( ) ) # chequeando si estan completas todas las entradas check = {'... | [
0.31668615341186523,
0.11693930625915527,
0.6913055181503296,
1.0888018608093262,
0.743593692779541,
-0.014375829137861729,
0.7273362278938293,
-0.342408686876297,
-0.9019870758056641,
-0.0987824946641922,
-0.6260108947753906,
-0.15387383103370667,
-0.197825089097023,
0.7372150421142578,
... |
def signedgreater ( a, b ) : return 1 if _ _ twocomplement ( a ) > _ _ twocomplement ( b ) else 0 | [
-0.811258852481842,
-0.5532816648483276,
0.7659297585487366,
0.4257153272628784,
-0.35622984170913696,
0.1408306509256363,
-0.11438114196062088,
0.224225714802742,
-0.5060843825340271,
-0.36853888630867004,
-0.5569285154342651,
-0.10123593360185623,
-0.2242632508277893,
0.5263310670852661,... |
def add _ flag ( self, object, flag ) : content _ flag _ object = self. get _ flag _ object ( flag ) content _ type _ object, object _ id = contenttype. objects. get _ for _ model ( object. _ _ class _ _ ), object. id try : content _ flag _ instance = contentflaginstance. objects. get ( content _ type = content _ type ... | [
0.35861989855766296,
-0.281832218170166,
0.7567299008369446,
-0.07255537807941437,
0.06399895250797272,
1.2317441701889038,
-0.14678090810775757,
-0.3418861925601959,
-0.37125688791275024,
-0.28621867299079895,
-0.886832594871521,
0.3672216236591339,
-0.9379943013191223,
0.1120925545692443... |
def friend _ request _ status ( self ) : return self. _ friend _ request _ status | [
-0.9993532299995422,
-0.40092483162879944,
0.5360387563705444,
0.5769986510276794,
0.0014267124934121966,
0.8995810151100159,
-0.33001935482025146,
-0.9698551297187805,
-0.19364964962005615,
-0.967240571975708,
-0.44220712780952454,
-0.3303239047527313,
0.26450419425964355,
-0.388970255851... |
def status ( ) : return json. dumps ( { " is _ active " : str ( allowed _ to _ buzz ( ) ). lower ( ) } ), 200 | [
-0.7293877005577087,
-1.1821101903915405,
0.30743634700775146,
-0.04125548154115677,
-0.38339319825172424,
-0.04542238637804985,
-0.5943118929862976,
0.3047417998313904,
0.07869347929954529,
1.0045361518859863,
-1.0618300437927246,
0.5907098054885864,
-0.503720760345459,
-0.969249308109283... |
def extend ( self, items ) : for item in items : self. append ( item ) | [
-0.180759459733963,
-0.06456762552261353,
0.4465303421020508,
0.7540947794914246,
0.8898418545722961,
0.8953922390937805,
-1.5537225008010864,
0.5542150139808655,
0.39610999822616577,
-0.5352274775505066,
-1.0500249862670898,
-0.2851219177246094,
-0.016019824892282486,
0.9267505407333374,
... |
def setup ( self ) : self. _ prepare ( ) | [
0.1456272155046463,
-0.15206588804721832,
0.073155976831913,
0.09228769689798355,
0.6620765328407288,
-0.37275752425193787,
1.053411841392517,
-0.12717629969120026,
0.6307992339134216,
-0.21728180348873138,
-0.20416490733623505,
-0.3956758677959442,
0.4819979667663574,
0.3979533612728119,
... |
def _ flush ( self ) : self. _ sock. settimeout ( 0. 1 ) line = self. read ( ) result = " " while line! = none : result + = line line = self. _ read ( ) self. _ sock. settimeout ( self. _ timeout ) return result | [
0.08945388346910477,
0.06783144176006317,
0.6932653188705444,
-0.9118087291717529,
-0.4808596968650818,
-0.2525944411754608,
-0.5378344058990479,
-0.734642744064331,
-0.6555408835411072,
-0.21735116839408875,
0.9522759318351746,
0.48586758971214294,
-1.0109223127365112,
-0.1523334532976150... |
def conv3x3 ( in _ planes, out _ planes, stride = 1 ) : return nn. conv2d ( in _ planes, out _ planes, kernel _ size = 3, stride = stride, padding = 1, bias = false ) | [
0.9446840286254883,
-0.03730257228016853,
0.3336145579814911,
0.19440624117851257,
-1.2206488847732544,
1.280963659286499,
-1.3977582454681396,
-0.0411563441157341,
-0.4501476287841797,
0.608845591545105,
-0.20295453071594238,
0.006514042615890503,
-0.17177630960941315,
-1.4275084733963013... |
def converttovertexcomponent ( self, components ) : retval = components try : srccomponent = om. mfnsingleindexedcomponent ( components ) srccomponenttype = srccomponent. componenttype except : return components if srccomponenttype! = om. mfn. kmeshvertcomponent : srcindices = set ( srccomponent. getelements ( ) ) retv... | [
-0.019729185849428177,
-0.30242064595222473,
0.808932363986969,
0.10916534811258316,
-0.08593545109033585,
-0.09747812151908875,
-0.01767749898135662,
-0.38517096638679504,
1.7047762870788574,
0.2128470242023468,
-0.09181199222803116,
-0.306244820356369,
-0.567901074886322,
-0.269066274166... |
def view _ list _ items ( shoppinglist _ id ) : # make sure that user is logged in if check _ if _ user _ logged _ in ( ) : user = session ['user _ email'] # retrieve shopping list object and query it for list items my _ list = shopping _ list _ app. get _ shopping _ list ( shoppinglist _ id, user ) my _ list _ items =... | [
-0.5799034833908081,
0.3307807147502899,
0.1440078765153885,
0.3882632255554199,
-0.10652868449687958,
0.0890209972858429,
-0.6803785562515259,
0.8479200005531311,
1.0823243856430054,
-0.13733530044555664,
-0.448455810546875,
-0.30848556756973267,
0.047807786613702774,
0.9156286120414734,
... |
def _ _ init _ _ ( self, random _ state = 99 ) : self. random _ state = random _ state # self. manager _ models = paramsmanager ( param _ file, key _ read = " models " ) | [
-0.24720513820648193,
-0.6165481209754944,
0.3290106952190399,
0.2229996621608734,
0.6930492520332336,
1.1228140592575073,
-0.02441883087158203,
0.5985473394393921,
-0.6265180110931396,
-0.22544419765472412,
-0.6211533546447754,
-0.7187179923057556,
0.4002145528793335,
1.3475583791732788,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.