text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ data ( afile, file _ type = none, * * keywords ) : if isstream ( afile ) and file _ type is none : file _ type = _ _ file _ type _ _ return read _ data ( afile, file _ type = file _ type, * * keywords )
[ 0.26169365644454956, -0.009527123533189297, 0.4846267104148865, 0.6753565073013306, -0.22072887420654297, 0.21860045194625854, -1.1896313428878784, -0.3818438649177551, -0.5600891709327698, -0.5300624966621399, 0.7113012075424194, 0.7035418152809143, -0.20598553121089935, 0.883372902870178...
def predict ( self, x : np. ndarray, inference _ batch _ size : int = 512, checkpoint : optional [ pathlike ] = none, ) - > tuple [ np. ndarray, float ] : from mdlearn. data. datasets. feature _ vector import timefeaturevectordataset dataset = timefeaturevectordataset ( x, in _ gpu _ memory = self. in _ gpu _ memory, w...
[ -0.9322540760040283, 0.15356333553791046, 0.854128897190094, 0.20246241986751556, -0.9388263821601868, -0.0038214230444282293, 0.056937236338853836, -0.43543511629104614, 0.0031623991671949625, 0.23434589803218842, -0.08924277126789093, 0.37923747301101685, 0.958085834980011, 0.51920133829...
def linear _ interpolation ( t, tp ) : # determine time cell dt = float ( t [ 1 ] - t [ 0 ] ) # assumed constant! i = int ( tp / dt ) if abs ( tp - t [ i ] ) < 1e - 13 : return i, none # tp = t [ i ] + w * dt w = ( tp - t [ i ] ) / dt return i, w
[ 0.6035282015800476, -0.3773459494113922, 0.6633920073509216, -0.48196542263031006, -0.44166961312294006, 0.20819039642810822, 0.006215116009116173, -0.2536183297634125, -0.571772038936615, 1.2907092571258545, -0.1339682936668396, -1.297513484954834, -0.8570336699485779, -0.2638626992702484...
def security _ group _ get _ by _ instance ( context, instance _ id ) : return impl. security _ group _ get _ by _ instance ( context, instance _ id )
[ -0.12555737793445587, 0.16040395200252533, -0.026049379259347916, -0.6651315093040466, -0.17325147986412048, -0.46033623814582825, -0.018288541585206985, -0.6309802532196045, -0.15926524996757507, 0.21196314692497253, 0.3982130289077759, 1.010196328163147, -0.2880062162876129, -0.025612179...
def get _ xs _ particle ( self, id _ particle _ 1, id _ particle _ 2 = - 1. ) : # if id _ particle _ 2 is not defined, set it to id _ particle _ 1 if id _ particle _ 2 < 0 : id _ particle _ 2 = id _ particle _ 1 for idx, xs in enumerate ( self. _ xs ) : if self. _ p1 [ idx ] = = id _ particle _ 1 and \ self. _ p2 [ idx...
[ 0.0370020717382431, -0.24345462024211884, 0.6503331661224365, -0.35630884766578674, 0.07768215239048004, -0.33028385043144226, -1.1435019969940186, -0.9376165270805359, -0.7154417634010315, 0.583159327507019, 0.35325247049331665, 0.9591414332389832, -1.0497344732284546, -0.6311556100845337...
def fixed _ ips _ by _ virtual _ interface ( context, vif _ id ) : return impl. fixed _ ips _ by _ virtual _ interface ( context, vif _ id )
[ -0.27888593077659607, -1.126060128211975, 0.17938736081123352, 0.5154828429222107, 0.042928166687488556, -1.3750200271606445, 1.0495539903640747, 0.19034850597381592, 0.3279341161251068, 0.9054182767868042, -0.34010910987854004, -0.5308549404144287, -0.49552422761917114, -0.408687680959701...
def admin _ only ( ) : return'super - seekrit admin page. '
[ 1.4233356714248657, 0.6086716055870056, 0.2524334788322449, -0.21297982335090637, 0.0844007134437561, 0.5678442716598511, -0.7212567329406738, -0.24976685643196106, 0.24791602790355682, 0.03114064782857895, 0.0461701974272728, 1.2688589096069336, 0.07760077714920044, -0.1677716076374054, ...
def unconsider _ event ( activity _ id, event _ id ) : # user login required if'username'not in flask. session : response = flask. make _ response ( json. dumps ('user login required'), 401 ) response. headers ['content - type'] ='application / json'return response try : with db _ session ( ) as db : user _ considering...
[ -0.07441077381372452, -0.4175753593444824, 0.9052000045776367, -0.17656297981739044, -0.251697301864624, 0.08087272197008133, 0.3640046715736389, 0.3648042380809784, -0.01414250023663044, 0.9005315899848938, 0.5539891123771667, 0.3788953423500061, -0.06563922762870789, 0.2146698385477066, ...
def is _ overlap ( object1, object2 ) : if object1. x + object1. width < object2. x : return false if object2. x + object2. width < object1. x : return false if object1. y + object1. height < object2. y : return false if object2. y + object2. height < object1. y : return false return true
[ -0.7195575833320618, -1.1100664138793945, 1.408685326576233, 0.8524894118309021, -0.6310357451438904, 0.7666826248168945, -0.5081162452697754, -1.0940546989440918, -0.12421739101409912, 0.6450662612915039, -1.0104296207427979, 0.1723473072052002, -0.31679508090019226, -0.853161096572876, ...
def get _ pre _ hidden ( mask, hidden ) : _, l, _ = hidden. shape hidden _ pre = torch. zeros _ like ( hidden ) for i, ( cur _ mask, cur _ hidden ) in enumerate ( zip ( mask, hidden ) ) : pred _ position = cur _ mask. nonzero ( ). flatten ( ) pred _ feature = torch. mean ( cur _ hidden [ pred _ position ], dim = 0, kee...
[ -0.18275512754917145, -0.05114896595478058, 0.6437538266181946, 0.5319260358810425, -0.26273950934410095, -0.07285758852958679, 0.8184749484062195, 0.09806365519762039, -0.3273545503616333, 0.33054420351982117, -0.9861752986907959, 0.9985745549201965, 0.39567604660987854, -0.82661157846450...
def relabel _ bit ( bit, idx, values ) : bit _ arr = np. array ( list ( bit ) ) bit _ arr [ idx ] = values return''. join ( bit _ arr )
[ -0.210306316614151, -0.28057652711868286, 0.49454373121261597, -0.3688339591026306, 0.4382416903972626, 0.394744336605072, -0.7938793897628784, -0.8032371997833252, 0.11601251363754272, 0.5245129466056824, 0.41154012084007263, 0.8467756509780884, -0.379526823759079, -0.5151496529579163, ...
def get _ type _ count ( self, agent _ class ) : return len ( self. agents _ by _ type [ agent _ class ] )
[ -0.5526247620582581, -0.5752822756767273, 0.5482021570205688, -0.19132889807224274, 0.8636476397514343, -0.16560664772987366, 0.42960214614868164, -0.23329691588878632, 0.3737148940563202, 0.35921913385391235, -0.6460162997245789, 0.12798520922660828, 0.2059956192970276, 0.5308048129081726...
def mcgroupcountend ( self ) : if self. force _ auto _ sync : self. get ('mcgroupcountend') return self. _ mcgroupcountend
[ -0.14503075182437897, 0.6450966596603394, 0.5608092546463013, 0.33166658878326416, -0.44294029474258423, 0.39916127920150757, 1.015484094619751, -0.0009983644122257829, -0.77159184217453, 0.32970473170280457, -0.6745156049728394, 0.7067095637321472, -0.980402946472168, 0.2153535783290863, ...
def load _ tests ( loader, tests, pattern ) : test _ dir = os. path. join ( os. path. dirname ( _ _ file _ _ ), tests _ dir ) return driver. build _ tests ( test _ dir, loader, host = none, intercept = helpers. setup _ app, fixture _ module = helpers )
[ 0.4511677622795105, -0.16893348097801208, 0.4113580882549286, 0.05422784015536308, 0.7950366735458374, -0.05223985016345978, 0.5003999471664429, 0.25490590929985046, 0.695403516292572, -0.1720673143863678, 0.21831926703453064, 0.0022385406773537397, -0.6355917453765869, -0.3101653158664703...
def quota _ class _ get ( context, class _ name, resource ) : return impl. quota _ class _ get ( context, class _ name, resource )
[ -0.775320827960968, -0.8047402501106262, 0.40244796872138977, 0.02606193535029888, -0.32261428236961365, -0.4913983643054962, -0.7908972501754761, -1.2703478336334229, 0.017162514850497246, 0.8904288411140442, 0.8297123312950134, 0.14079561829566956, 1.7618308067321777, -1.0125106573104858...
def write _ dataparams _ rst ( write _ file = none ) : dspec = delayspectrum ( ) out = " simpleds parameters \ n = = = = = = = = = = = = = = = = = = = = = = = = = = \ n " out + = ( " these are the standard attributes of delayspectrum objects. \ n \ nunder the hood " " they are actually properties based on unitparameter...
[ 0.11033841967582703, -0.1954297572374344, 1.3801034688949585, -0.8484321236610413, 0.4816427528858185, -0.09325211495161057, 0.23682305216789246, 0.5855082273483276, -0.8687974214553833, -0.013821002095937729, 0.0791424885392189, 0.583635151386261, -0.030299991369247437, 0.5870897769927979...
def get _ occupant _ name ( self ) : return self. occupant. name
[ -0.5538444519042969, -1.7882239818572998, 0.6621267199516296, -0.21629904210567474, -0.6865072250366211, 0.43571940064430237, 0.5706018805503845, 0.013655070215463638, -0.516670286655426, 0.7197336554527283, 0.8577465415000916, -0.14897780120372772, 0.3736407160758972, -0.7852044701576233,...
def add _ task ( self, task = task ( ) ) : self. tasks. append ( task ) return str ( task ) + " added. "
[ -0.6425526142120361, 0.06953347474336624, 0.41284531354904175, 0.238661989569664, -0.16023766994476318, 0.4146471917629242, -0.7731653451919556, 0.15810748934745789, 0.6004531979560852, -0.5927387475967407, -0.5759141445159912, -0.057066235691308975, 0.18571250140666962, 0.3199898302555084...
def on _ enter _ record ( self ) : logger. info ( " recording started ", extra = dict ( event ='record _ start') ) self. start _ recording ( )
[ 1.1949050426483154, -0.031735680997371674, 0.524712324142456, 0.45284542441368103, 1.0937273502349854, -0.42641887068748474, 0.1900290697813034, 1.000032663345337, 0.047989096492528915, 0.3015005588531494, -0.5071024298667908, 1.0720882415771484, 0.40269529819488525, 0.40534061193466187, ...
def transform _ dictionary ( self, dictionaryobject = none, fromprefix ='$ ', toprefix ='$ $') : if dictionaryobject is none : dictionaryobject = self. object _ dict for oldkey in list ( dictionaryobject ) : if oldkey. startswith ( fromprefix ) and oldkey. count ( fromprefix ) = = 1 : newkey = oldkey. replace ( frompre...
[ -0.5429791808128357, -0.44420886039733887, 0.9702069759368896, -0.41481494903564453, -1.2745944261550903, -0.3780895471572876, 0.2637190520763397, 0.8823891878128052, 0.5320258736610413, 0.5676125884056091, -0.4328782260417938, 0.7683815956115723, 0.5346174836158752, 0.05894427374005318, ...
def gf _ neg ( f, p ) : return [ - coeff % p for coeff in f ]
[ -0.9745530486106873, -0.2108960747718811, 0.5335437655448914, 0.2929716408252716, 0.6954237222671509, 1.0296111106872559, -1.6138273477554321, 0.6789512038230896, -1.1307181119918823, 0.5980430841445923, -0.29912254214286804, -0.20683445036411285, -0.7312559485435486, -0.8012791275978088, ...
def getbamdate ( bams, split ='- ', order = " des ", unknown ='u') : dts = [ ] for i, bam in enumerate ( bams ) : print ( i / len ( bams ), end ='\ r') data = os. popen ('export gcs _ oauth _ token = ` gcloud auth application - default print - access - token ` \ & & samtools view - h'+ bam +'| grep " ^ @ rg "') if data...
[ -0.5371286273002625, -0.06671079248189926, 1.0587157011032104, 0.5006089210510254, -0.5596773624420166, 0.18229521811008453, -0.8719663023948669, -0.5880717039108276, -0.02746954746544361, 0.33564507961273193, -0.14935816824436188, 0.1520744115114212, 0.2876526117324829, 0.0082898354157805...
def _ _ iter _ _ ( self ) : raise notimplementederror
[ -0.2765047252178192, -0.8988251090049744, 0.3011223077774048, -0.1665448397397995, 0.30070722103118896, 1.1132525205612183, 0.7751516103744507, -0.6689655780792236, -0.08209166675806046, -0.3987228572368622, 0.01641060784459114, 0.006332952529191971, 0.5536818504333496, 0.2804124355316162,...
def add _ banned _ urls ( website _ id, url, is _ pagination ) - > str : conn = get _ connection ( ) cursor = conn. cursor ( ) cursor. execute ( f " insert into banned _ url _ journal ( website _ id, url, is _ pagination ) values ( { website _ id },'{ url } ', { is _ pagination } ) " ) conn. commit ( ) return cursor. e...
[ 0.30606889724731445, 0.12168015539646149, 0.7257492542266846, 0.33213186264038086, -0.3161488175392151, -0.14424125850200653, 0.0600508488714695, 0.44314682483673096, 0.41914984583854675, 0.7211111187934875, 0.07318125665187836, 0.14431101083755493, -0.9561322331428528, -0.1735640019178390...
def state ( self ) : return self. _ _ state
[ -0.33756718039512634, -1.3281282186508179, 0.2626984417438507, -0.4825189411640167, -0.37525561451911926, 0.7838121056556702, 0.9151122570037842, -0.18629391491413116, 0.7868841290473938, -1.3372083902359009, -0.145671084523201, 0.1726927012205124, -0.32332733273506165, -0.3784979879856109...
def deserialize ( self, data : str ) - >'node': def detuplify ( t ) : if t : root = node ( t [ 0 ], [ ] ) for c in t [ 1 ] : root. children. append ( detuplify ( c ) ) return root return none return detuplify ( json. loads ( data ) )
[ -0.12031707167625427, -0.13441531360149384, 0.4735311269760132, -0.8857318162918091, -0.5084649324417114, -1.2868400812149048, -0.22414913773536682, 0.15517182648181915, 0.6588021516799927, -0.14236581325531006, -1.253327488899231, -0.023213090375065804, -0.4061758518218994, -0.69569575786...
def plot _ tfr ( self, frequency ='stimulation ', collapse _ epochs = true, collapse _ electrodes = false, figsize = ( 7, 5 ) ) : if frequency is none or frequency = ='stimulation': y = self. stimulation. tfr z = self. stimulation. frequencies elif type ( frequency ) is str : y = self. _ _ getattribute _ _ ( frequency ...
[ 0.5375174880027771, 1.2166584730148315, 0.9517670273780823, -0.3919338881969452, -0.40260905027389526, -0.5650018453598022, 0.5900716781616211, -0.3283202350139618, -0.014033781364560127, -0.3525044023990631, 0.7988718748092651, 0.3936075270175934, 0.19211557507514954, 0.6590962409973145, ...
def kodi _ info ( self ) : return {'season': self. season _ number,'plot': self. description,'premiered': self. episode _ air _ date,'mediatype':'episode ','episode': self. episode _ number,'tvshowtitle': self. series _ title,'title': self. title,'originaltitle': self. title,'duration': int ( self. duration _ ms ) / 10...
[ -0.23586052656173706, -0.9408749938011169, 0.682299017906189, -0.696343183517456, -0.9666547775268555, -0.48088595271110535, -0.9089187383651733, -0.8016342520713806, -0.07592599093914032, 0.7080264687538147, -0.7223231792449951, 1.225418210029602, -0.1537836343050003, 0.32391878962516785,...
def _ get _ results ( args, bhv, num _ epochs = 10, k _ param = 10, perm = false ) : res _ path = ( args. res _ dir +'/ roi _ % d _ net _ % d'% ( args. roi, args. net ) +'_ nw _ % s'% ( args. subnet ) +'_ bhv _ % s'% ( bhv ) +'_ trainsize _ % d'% ( args. train _ size ) ) perm _ res _ path = ( args. res _ dir +'_ perm''...
[ 0.34381595253944397, 0.10184197872877121, 1.017589807510376, 0.0015488232020288706, 0.8231066465377808, 0.017710622400045395, 0.23417678475379944, 0.37374410033226013, -0.7980910539627075, 0.27752894163131714, 0.010757212527096272, -0.23955464363098145, -0.04624102637171745, 0.649836122989...
def corellate _ weekend _ takings _ against _ rank ( self, first _ run ) : # check if we need to filter the data to the first run mojo _ df = self. mojo _ box _ office _ df if first _ run : mojo _ df = mojo _ df [ mojo _ df ['end _ date'] < = self. first _ run _ end ] # get weekend tweet count mojo _ df [ " weekend _ t...
[ 0.11752520501613617, -0.05031135678291321, 0.5362037420272827, -1.0643489360809326, -0.15814924240112305, -0.39303985238075256, -0.35616934299468994, 0.11275945603847504, -0.6269720792770386, 0.3231523931026459, 0.3591231405735016, 0.685835063457489, -0.8807376027107239, 0.7943312525749207...
def remove _ dead _ ends ( dungeon ) : done = false while not done : done = true # check for dead ends for tile in dungeon. corridor _ tiles : if is _ dead _ end ( dungeon, tile ) : tile. set _ type ( tiletypes. wall ) dungeon. corridor _ tiles. remove ( tile ) done = false
[ -0.26981794834136963, 0.053948089480400085, 0.316404789686203, -0.03022633120417595, 0.22111381590366364, 0.9738838076591492, 0.6913285851478577, 0.2950604259967804, -0.08219843357801437, 0.3172535002231598, -0.14310748875141144, -0.3261668384075165, -0.6812354922294617, 1.3576956987380981...
def _ upload _ to _ dataset _ local ( connector, host, clowder _ user, clowder _ pass, datasetid, filepath ) : logger = logging. getlogger ( _ _ name _ _ ) url ='% sapi / uploadtodataset / % s'% ( host, datasetid ) if os. path. exists ( filepath ) : # replace local path with remote path before uploading for source _ pa...
[ 0.2767634093761444, -0.26539888978004456, 0.6780994534492493, -0.6681470274925232, -0.02054823935031891, 0.029358403757214546, -0.37199607491493225, -0.3070792853832245, -0.7029799818992615, 0.608690619468689, -0.0005304696969687939, -0.12275111675262451, -0.17981858551502228, 0.2946079075...
def check _ output ( * popenargs, * * kwargs ) : if'stdout'in kwargs : raise valueerror ('stdout argument not allowed, it will be overridden.') process = subprocess. popen ( stdout = subprocess. pipe, stderr = subprocess. pipe, * popenargs, * * kwargs ) output, unused _ err = process. communicate ( ) retcode = process....
[ -0.004214470274746418, -0.25715744495391846, 0.8796498775482178, -0.0787641629576683, -0.649816632270813, -0.3017898201942444, -0.4341858923435211, -0.7539270520210266, -0.42445722222328186, -0.18024197220802307, 1.0726230144500732, -0.32863378524780273, -0.699022650718689, -0.026365522295...
def mean _ avg _ precision ( outputs : torch. tensor, targets : torch. tensor, topk : list [ int ] ) - > list [ torch. tensor ] : results = [ ] for k in topk : k = min ( outputs. size ( 1 ), k ) results. append ( torch. mean ( avg _ precision ( outputs, targets ) [ : k ] ) ) return results
[ -1.0059701204299927, -0.6936711072921753, 0.6389932632446289, 0.22385920584201813, -0.16215430200099945, -0.36208564043045044, 0.4189925193786621, -0.3254501521587372, -0.3565530478954315, 0.9598223567008972, 0.25819388031959534, -0.5518838763237, 0.7000787258148193, 0.5086284279823303, ...
def bit _ for _ bit ( title, headers, data _ node ) : b4b = {'type':'bit for bit ','title': title,'headers': headers,'data': data _ node, } return b4b
[ -0.3415209949016571, 0.09928730130195618, 0.6299739480018616, -0.6364557147026062, 0.23245659470558167, 0.1420324295759201, -0.6557894349098206, -0.818678617477417, -1.302418828010559, -0.13864967226982117, -0.15416233241558075, 0.3896275460720062, -0.15926678478717804, 0.30853986740112305...
def test _ get _ namespace _ slack _ exception _ other ( self, mock _ k8s _ corev1api, mock _ k8s _ config ) : mock _ k8s _ api = mock _ k8s _ corev1api. return _ value mock _ k8s _ api. read _ namespaced _ secret. side _ effect = apiexception ( reason = " other " ) expected _ result = none value = magtape. get _ names...
[ 0.7844119071960449, 0.694484293460846, 0.6940381526947021, 0.005561851430684328, 0.4575599431991577, 0.25027352571487427, -0.6637142896652222, -1.239721655845642, 0.836338996887207, -0.8041419386863708, -0.34256336092948914, 0.6890850067138672, -0.2729101777076721, 0.30572429299354553, 1...
def etatconnexion ( ftp ) : etat = ftp. getwelcome ( ) # grace a la fonction getwelcome ( ), on recupere le " message de bienvenue " print ( " etat : ", etat )
[ 0.7089505195617676, -0.5288766026496887, 0.593812882900238, -1.0050638914108276, 0.028505438938736916, 0.08040641993284225, -0.14255525171756744, -0.8106499314308167, -0.9040984511375427, 0.15766996145248413, -0.4521787464618683, 1.00954008102417, -0.5202369689941406, -0.10039137303829193,...
def callstandardgpu ( self, gpuarray, globaltimestep ) : # uppyramid of swept step self. gfunction ( gpuarray, numpy. int32 ( globaltimestep ), grid = self. grid, block = self. blocksize )
[ -0.7608163356781006, 0.8106467723846436, 0.5651877522468567, 1.034989595413208, -0.2163221836090088, 0.604710578918457, 0.22049710154533386, -0.20238710939884186, -0.4165218472480774, 1.0569130182266235, -0.029320204630494118, 0.6674051880836487, -0.7482714056968689, 0.9929959774017334, ...
def login ( login _ fail = none ) : if request. method = ='post': if request. form ['login'] = = " log in " : # log in button has been presssed return redirect ( url _ for ('home ', user _ name = " isaac " ) ) try : customer = customer ( request. form ['email'], request. form ['password'] ) if customer. login _ status ...
[ -0.1007385402917862, 0.096624955534935, 0.8075343370437622, 1.3022152185440063, -0.40236443281173706, 0.36476123332977295, -0.20622818171977997, 0.8078291416168213, -0.08169179409742355, -0.26868388056755066, 0.29066333174705505, -0.5764851570129395, -0.20552542805671692, 0.085943698883056...
def name ( self ) : return self. _ name
[ -0.5138100981712341, -1.1646956205368042, 0.21370011568069458, -0.46015816926956177, -0.8609189391136169, 0.9157972931861877, 0.21445101499557495, -0.455634206533432, 0.15261998772621155, 0.13091617822647095, -0.522395670413971, 0.2680298686027527, 0.42176124453544617, -0.44303271174430847...
def test _ one _ line _ comment _ file ( self ) : self. assertisnone ( self. _ _ execute _ test _ on _ file ( " # " + jsccommentstestsuite. _ _ example _ jsc ) ) self. assertisnone ( self. _ _ execute _ test _ on _ file ( " / / " + jsccommentstestsuite. _ _ example _ jsc ) ) self. assertisnone ( self. _ _ execute _ tes...
[ 0.6163148283958435, -0.736614465713501, 0.7588250637054443, -0.6084665656089783, 1.0540473461151123, 0.5194541215896606, 0.5123459100723267, -0.4930746555328369, -0.13093271851539612, -0.28433671593666077, -0.52749103307724, -0.25575777888298035, 0.35234740376472473, 0.7277073264122009, ...
def resume _ work ( self, context ) : execution _ context = context [ " execution _ context " ] wrk _ logger. debug ( " resuming worker for : " + self. worker ) if execution _ context : self. start _ time = execution _ context. get ( " start _ time ", datetime. utcnow ( ) ) self. worker _ ids = execution _ context. get...
[ 0.02295740693807602, -0.211520716547966, 0.7113680839538574, -0.13828903436660767, 0.4917104244232178, -0.05614693462848663, 0.13186395168304443, -0.00944223627448082, -0.2251182347536087, 0.5753087997436523, -0.5563977956771851, -0.038069553673267365, -0.3531864583492279, -0.1552072465419...
def default ( cls ) : db = cls ( ) root = db. add _ root ('root') node _ 1 _ 1 = db. add _ to _ parent ( root,'node _ 1 _ 1') db. add _ to _ parent ( root,'node _ 1 _ 2') node _ 2 _ 1 = db. add _ to _ parent ( node _ 1 _ 1,'node _ 2 _ 1') db. add _ to _ parent ( node _ 1 _ 1,'node _ 2 _ 2') node _ 3 _ 1 = db. add _ to ...
[ 0.3840532600879669, 0.9849351048469543, 0.8582359552383423, 0.2709544003009796, 0.24018006026744843, -0.4053848683834076, 0.40315550565719604, -0.23224446177482605, -0.5913439393043518, -0.18451452255249023, -0.36298346519470215, 0.006457055453211069, -0.701848566532135, 0.4730080664157867...
def ntu ( self, ntu ) : self. _ ntu = ntu
[ -0.6536828875541687, 0.5257076621055603, -0.028844932094216347, -0.7827093601226807, -0.12519629299640656, 0.6213476657867432, -0.20094944536685944, 0.6255239844322205, -0.10851526260375977, -0.6458304524421692, -1.8252729177474976, -0.8144050240516663, -0.11428400874137878, 0.188952475786...
def get _ end ( self ) : return self. end
[ -0.2254137396812439, -0.3124994933605194, 0.3120455741882324, 0.57804936170578, 0.36144909262657166, 0.8856456875801086, 0.00045949718332849443, 0.13566850125789642, -0.6552796959877014, -0.3609325885772705, -0.44839349389076233, 1.0779770612716675, -0.6342271566390991, -0.0418365299701690...
def score _ population ( tasks, costs, population, display = false ) : population _ size = population. shape [ 0 ] scores = np. zeros ( ( population _ size, 3 ), int ) show _ interval = int ( population _ size / 50 ) + 1 for i in range ( population _ size ) : if display and i % show _ interval = = 0 : print ( '. ', end...
[ -0.7014645934104919, 0.6374942660331726, 0.7609850764274597, 0.9911181330680847, 0.0053628599271178246, 0.8418289422988892, 0.778365969657898, -0.8353670239448547, -0.6658148169517517, 0.7131914496421814, -0.12844577431678772, -0.2252967208623886, 0.14241528511047363, 0.2641310393810272, ...
def get ( self, request, id ) : user = models. user. objects. get ( pk = id ) return render ( request, " accounts / reset - password. html ", { " user " : user } )
[ -0.1526387333869934, 0.24902594089508057, 0.329581618309021, 0.43305087089538574, -0.43875446915626526, -0.13382335007190704, 0.14852364361286163, 0.16129232943058014, 0.23392409086227417, 0.11134371906518936, 0.4652468264102936, 0.43562212586402893, -0.01648879237473011, -0.17002685368061...
def load _ model _ input ( self, input _ file, synthetic = false, limit _ n = - 1, verbose = false ) : # if this is a directory, process all files inside if os. path. isdir ( input _ file ) : # find all the. txt and csv files in input _ dir input _ dir = input _ file filelist = [ ] types = ('*. csv ','*. txt') starting...
[ -0.3312663733959198, 0.5567938685417175, 0.7166705131530762, 1.1327853202819824, 0.36612367630004883, 0.5948771834373474, 0.10724686086177826, 1.0796114206314087, -0.3923034071922302, 0.2546660602092743, -0.28995057940483093, 0.3037426173686981, -0.19459357857704163, 0.22019444406032562, ...
def call _ every ( func, times = 1, cooldown = 0., default = none ) : state = [ 0, - cooldown ] # counter, last _ call _ time @ functions. getargsfrom ( func ) def wrapped ( * args, * * kwargs ) : curr _ t = time. time ( ) if ( state [ 0 ] > = times - 1 ) and ( curr _ t > state [ 1 ] + cooldown ) : state [ 1 ] = curr _...
[ -0.22500015795230865, 0.4288772642612457, 0.7224316000938416, 0.02582906000316143, 0.07679946720600128, 0.20980842411518097, -0.24790652096271515, -0.4998528063297272, 0.23251815140247345, -0.0569290928542614, 0.18638063967227936, -0.3043711483478546, -0.07069727778434753, 0.61671221256256...
def stitch ( self ) : if not self. need _ stitch : return if self. upscale : if self. ring _ stitch : vertices = self. graph. get _ vertices ( ) for i in range ( self. num _ sample ) : end = np. int ( np. ceil ( len ( vertices [ i ] ) * self. connectivity ) ) while end > 10000 : self. stitch _ sample ( vertices [ i ], ...
[ 0.3412831723690033, 0.12278846651315689, 0.8070483207702637, 0.3853381872177124, -0.18431085348129272, 0.2767243981361389, 0.6446152925491333, -0.07443620264530182, 0.7029333114624023, 0.6276030540466309, -0.07080844789743423, 0.4207042455673218, -0.6730290055274963, 0.011000622063875198, ...
def build _ lr _ scheduler ( optimizer : optimizer, args : trainargs, total _ epochs : list [ int ] = none ) - > _ lrscheduler : # learning rate scheduler return noamlr ( optimizer = optimizer, warmup _ epochs = [ args. warmup _ epochs ], # total _ epochs = total _ epochs or [ args. epochs ] * args. num _ lrs, total _ ...
[ 0.053821973502635956, -0.668271541595459, 0.7162165641784668, -0.6535107493400574, -0.4782581925392151, -0.45858168601989746, -0.8863385319709778, 0.8194789886474609, -0.05060616508126259, 0.21640650928020477, 0.047478798776865005, 0.1839655339717865, -0.2761126756668091, 0.177304029464721...
def m2deg ( dlat, dlon, latitude ) : # equatorial radius r = 6378137 # [ m ] # one degree of latitude and longitude beta = atan ( 0. 99664719 * tan ( radians ( abs ( latitude ) ) ) ) onedeglon = ( pi / 180 ) * r * cos ( beta ) onedeglat = 111100 return dlat / onedeglat, dlon / onedeglon
[ -0.6788499355316162, -0.3829561769962311, 0.5599867701530457, -1.5696287155151367, -0.6940262913703918, 0.38619527220726013, -1.0616823434829712, 0.48613861203193665, -0.12977871298789978, 0.1129733994603157, -0.07768630236387253, -0.5253446102142334, 0.5846109986305237, 0.7003568410873413...
def hint _ pose _ qy ( self ) : return self. get _ input ( " hint _ pose _ qy " )
[ -0.11113718152046204, 0.3864513039588928, 0.5536747574806213, 0.9208382368087769, -0.147279292345047, 0.1858181655406952, 0.8181269764900208, -1.8284510374069214, 0.3577267825603485, -0.1823839545249939, -0.61064213514328, -0.03787682577967644, -1.054921269416809, -0.6009754538536072, -0...
def setincrementindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriul3iul2 _ setincrementindex ( self, * args )
[ -0.5737568140029907, 0.08101489394903183, 0.4292455315589905, 0.19862906634807587, -0.46032431721687317, 1.185503602027893, -0.015223406255245209, -0.10952651500701904, -0.23508460819721222, -0.3619362413883209, -1.5218541622161865, 0.5406469106674194, 0.07054056227207184, -0.0959542989730...
def load _ prereqs ( self, prereqs ) : if isinstance ( prereqs, str ) : prereqs = prereqs. replace ( " prereq : ", " " ) prereqs _ alt = re. split ( " ; | \ \. ", prereqs ) prereqs = re. split ( " ; | \ \. | \ \ ), | and ", prereqs ) prereqs = [ prereq for prereq in prereqs if prereq ] self. _ _ prereqs ( prereqs ) # s...
[ -1.7339140176773071, -0.2559516727924347, 0.9186481833457947, -0.3339041471481323, -1.3949190378189087, 0.5346894264221191, -0.18736815452575684, 0.4539608061313629, 0.18229490518569946, -0.05755627527832985, -0.051498763263225555, -0.5778378844261169, -0.8635303974151611, 0.30366131663322...
def radiation _ induced _ changes ( df ) : ric _ df = df [ renamed _ ric _ columns ]. copy ( ) ric = ric _ df ['ric']. convert _ objects ( convert _ numeric = true ) ric [ ric. isnull ( ) ] = 0 # absence of data indicated either by 9 or nan, normalize to only use one ric [ ric = = 9 ] = nan print ( " ric ", ( ric = = 1...
[ 0.024513432756066322, -0.21090129017829895, 0.6627094745635986, -0.25979524850845337, -0.38474687933921814, 0.40946099162101746, 0.4243425726890564, 0.6708710789680481, 0.27153080701828003, 0.2646869719028473, -0.06508360058069229, 0.6467664837837219, -0.8124024271965027, 0.020375194028019...
def filter ( self, record ) : # highlight warnings if record. levelno > = logging. warning : record. msg ='\ x1b [ 1m'+ record. msg +'\ x1b [ 0m'return record. levelno > = logging. info
[ 0.39409971237182617, 0.03155580908060074, 0.7110300660133362, 0.08693555742502213, -0.9807553887367249, -0.11305633187294006, -0.7134714126586914, -0.5129650235176086, -0.5171162486076355, 0.33826279640197754, 0.7284560799598694, 0.9421874284744263, -0.43742290139198303, 0.5354031920433044...
def get _ occurrence ( exchange _ id, instance _ index, format = u " default " ) : root = m. getitem ( m. itemshape ( t. baseshape ( format ) ), m. itemids ( ) ) items _ node = root. xpath ( " / / m : itemids ", namespaces = namespaces ) [ 0 ] for index in instance _ index : items _ node. append ( t. occurrenceitemid (...
[ 0.2139204442501068, -0.12253545969724655, 0.5042042136192322, -0.7639351487159729, 0.5117120146751404, -0.7293376922607422, 0.1752765029668808, 0.9913327693939209, 0.27460145950317383, 0.2810690701007843, 0.7703366279602051, 0.6788814663887024, -0.10375241190195084, -0.8333346843719482, ...
def basename ( self ) : return os. path. basename ( self. _ path )
[ 0.6768709421157837, -1.7479522228240967, 0.47503072023391724, -0.17833873629570007, 0.1099982038140297, 0.8615117073059082, 1.0874598026275635, 0.3126925230026245, -0.20851142704486847, -0.19411012530326843, 0.6980907320976257, -0.038997847586870193, 0.010224896483123302, -0.66284018754959...
def test _ create ( self ) : risk _ body = self. generate _ risk _ body ( ) response = self. api. post ( " / api / risks ", { " risk " : risk _ body } ) self. assertequal ( 201, response. status _ code ) risk = all _ models. risk. query. get ( risk _ body [ " id " ] ) self. assert _ instance ( risk _ body, risk )
[ 0.19035589694976807, 0.620637059211731, 0.5127344727516174, -0.31067538261413574, 1.6640149354934692, 0.9261052012443542, -1.3722412586212158, -0.4046741724014282, 0.095980204641819, -0.43816572427749634, -1.1152962446212769, -0.25346800684928894, -0.29907017946243286, -0.5143904685974121,...
def instance _ info _ cache _ create ( context, values ) : return impl. instance _ info _ cache _ create ( context, values )
[ -0.7691869139671326, 0.2117665559053421, 0.11137436330318451, -0.41870924830436707, -0.14068152010440826, 1.1632863283157349, -0.07423483580350876, -0.6272955536842346, -0.6864067912101746, 0.1738273799419403, -0.5310260653495789, -0.15243513882160187, -0.09284786134958267, -0.466597467660...
def test _ profile _ looks _ up _ by _ logged _ in _ user ( authn _ policy, user _ model ) : request = dummyrequest ( ) authn _ policy. authenticated _ userid. return _ value = " acct : foo @ bar. com " profilecontroller ( request ). profile ( ) user _ model. get _ by _ userid. assert _ called _ with ( request. domain,...
[ 0.6586858034133911, 0.24132993817329407, 0.205633744597435, 0.7618798613548279, 0.6221878528594971, 1.0890552997589111, 0.6444496512413025, -1.174939513206482, 0.476761132478714, -0.7572330832481384, -0.42548868060112, 0.2808072865009308, 0.779147744178772, -0.3253275752067566, -0.404086...
def fade _ in _ out ( color _ value : rgb, wait ) : color ( fade = " in ", rgb _ value = color _ value, wait = wait ) color ( fade = " out ", rgb _ value = color _ value, wait = wait )
[ 0.251411110162735, 0.07672247290611267, 0.5184857249259949, -0.24574139714241028, 0.053910065442323685, 0.7458273768424988, -0.284635066986084, 0.3192735016345978, -0.8594900965690613, -0.0697396844625473, -0.244381844997406, 0.9823594093322754, 0.48476099967956543, 0.9075666069984436, -...
def fail _ incompatible ( ) : print ('this agent supports only python versions 3. 6 and greater') sys. exit ( 1 )
[ 0.5854183435440063, -0.7214553952217102, 0.49332141876220703, 0.4223790466785431, 0.09817530959844589, 1.6655110120773315, -0.8555680513381958, 0.004682870581746101, -0.11523143947124481, 0.9398090243339539, -0.0028164705727249384, -0.5145819187164307, -0.5517429113388062, 0.22036395967006...
def _ _ iter _ _ ( self ) : i = 0 print ('_ _ iter _ _ executed') while true : # other code may have iterated between yields, # so always check the cache. if i < len ( self ) : print ( type ( self [ i ] ) ) yield self [ i ] else : # throws stopiteration when done. # prevent stopiteration bubbling from generator, follow...
[ -0.7142364978790283, -0.1576126515865326, 0.6199798583984375, 0.07525734603404999, 0.03909415006637573, 0.7340471148490906, 0.42406144738197327, -1.1665953397750854, -0.0784568190574646, -0.33981093764305115, 0.1996905505657196, 0.19271622598171234, -0.8004525303840637, 0.19621767103672028...
def test _ protlig _ fnat ( protlig _ caprimodule ) : protlig _ caprimodule. calc _ fnat ( ) assert round _ two _ dec ( protlig _ caprimodule. fnat ) = = 1. 0
[ 0.036991000175476074, -0.6170600652694702, 0.17826175689697266, 0.022495824843645096, 0.4362907409667969, 0.2763364017009735, -0.3997843861579895, -0.7348373532295227, -0.4419535994529724, -1.2565479278564453, -0.24889476597309113, 0.133338063955307, 0.9908207058906555, 0.5353885889053345,...
def lap _ inv ( self, s, gtype ='tri ', btype = 1 ) : if gtype = ='tri': # ensure passed array is of the correct length : assert ( len ( s ) = = self. n _ tverts ), " length of array passed to grad is not tri _ verts length " if btype = = 2 : # calculate the inverse divergence of the grad, which is the laplacian : laps...
[ 0.151571586728096, 0.041344355791807175, 0.9640002250671387, -0.5665628910064697, -0.9496051669120789, 0.3879004418849945, 0.5205498337745667, 0.31263840198516846, -0.2752560079097748, 0.21277451515197754, -0.2917296290397644, 0.6573514938354492, -0.9279074668884277, 0.12225709855556488, ...
def preprocess ( genre _ or _ style, min _ vals = [ 128, 128 ], n = none, shuffle = true ) : path = config. datafile ( genre _ or _ style ) # list all images in.. / data /'genre _ or _ style'/ img1. jpg print ( " reading images... " ) all _ images = [ x for x in os. listdir ( path ) if x. endswith ( ". jpg " ) | x. end...
[ -0.401398241519928, 0.591667890548706, 0.7306637167930603, -0.03210248053073883, -0.730837345123291, -0.4375571012496948, 0.5913214087486267, -0.09927358478307724, -0.06955491751432419, 0.25460487604141235, 0.5389575362205505, 0.904835045337677, 0.5856877565383911, 1.1688567399978638, 0....
def writeheader ( filename ) : filename. write ('<? xml version = " 1. 0 " encoding = " utf - 8 "? > \ n') filename. write ('< languagedata > \ n') filename. write ('\ n')
[ -0.22675108909606934, -0.8332815170288086, 0.5109269618988037, 0.2920469045639038, 0.26533541083335876, 1.1473292112350464, -0.6399368643760681, 0.8771706223487854, -1.1975626945495605, 0.15794304013252258, -0.20196911692619324, -0.55994713306427, 0.17038129270076752, 0.09203210473060608, ...
def set _ python _ short _ timeout ( timeout ) : pythonshellbase. set _ short _ timeout ( float ( timeout ) )
[ 0.9344066977500916, -0.01592925935983658, 0.28382939100265503, -0.13082799315452576, 0.3293423056602478, 0.5792733430862427, 0.06993726640939713, -0.5406806468963623, 0.32625579833984375, 0.10366100817918777, -0.8977776765823364, 0.7126718759536743, 0.1832677274942398, 0.6623367667198181, ...
def lnprob ( self, val ) : _ val = np. asfarray ( val ) valid = np. logical _ and ( self. _ lb < = _ val, _ val < = self. _ ub ) if self. _ closed _ bounds : # todo special case where lb = = ub = = val? prob = np. where ( valid, np. log ( 1 / ( self. _ ub - self. _ lb ) ), - np. inf ) else : prob = np. where ( valid, 0...
[ 0.6224697828292847, -0.0704713687300682, 0.6543848514556885, -0.06942806392908096, -0.7236061692237854, 0.9389325380325317, -0.724380373954773, -1.0286250114440918, 0.7418830394744873, 0.111378513276577, 0.3965175151824951, -0.05638127028942108, -0.8644469380378723, -0.22893762588500977, ...
def test _ storage _ providers _ exclude _ files ( self ) - > none : host, media _ id = self. _ download _ image ( ) rel _ file _ path = self. media _ repo. filepaths. url _ cache _ filepath _ rel ( media _ id ) media _ store _ path = os. path. join ( self. media _ store _ path, rel _ file _ path ) storage _ provider _...
[ 0.37745124101638794, 0.5343670845031738, 0.760593831539154, 0.3107255697250366, 0.3760984539985657, 0.918771505355835, 0.6019936203956604, -0.06847702711820602, 0.060331594198942184, 0.13565093278884888, -0.03172051161527634, 0.2088560312986374, -0.11854951828718185, -0.5295202732086182, ...
def _ _ init _ _ ( self, gamma = 1. 0 ) : super ( ). _ _ init _ _ ( ) self. canvas = api. canvas ( ) self. canvas. version = " 1. 2 " self. canvas. gamma _ r = self. canvas. gamma _ g = self. canvas. gamma _ b = gamma self. autoid = objects. base. index ( )
[ -0.19285306334495544, -0.9558488726615906, 0.5517578721046448, 0.002666926709935069, 0.8258870244026184, -0.19355987012386322, 0.3522080183029175, -0.18038706481456757, -0.08874666690826416, -0.21533598005771637, -0.4300253093242645, -0.03658235818147659, -0.144052192568779, 0.991868019104...
def visit _ importfrom ( self, node ) : self. new _ module ( node. lineno, " import _ from ", ( ". " * ( node. level or 0 ) ) + ( node. module or " " ) ) for alias in node. names : name = alias. asname or alias. name self. count _ name ( name, " importfrom " ) if name = = " * " : self. count _ simple ( " import _ star ...
[ -0.48217275738716125, 0.08212212473154068, 0.8213530778884888, -0.28528377413749695, -0.4773198068141937, 0.45790895819664, 0.7486217617988586, 0.08397810906171799, -0.16805675625801086, 0.984870970249176, -0.17469394207000732, 0.52738356590271, 1.1834005117416382, 1.162864327430725, 0.2...
def _ _ init _ _ ( self, mjd, # required error = 0. 0, obs ='barycenter ', freq = float ( " inf " ), scale ='utc ', # with defaults * * kwargs ) : # keyword args that are completely optional site = observatory. get ( obs ) if numpy. isscalar ( mjd ) : arg1, arg2 = mjd, none else : arg1, arg2 = mjd [ 0 ], mjd [ 1 ] self...
[ 0.0010606308933347464, 0.04050623998045921, 0.8428858518600464, -0.4616570472717285, -0.8553520441055298, 0.20031456649303436, -0.6034558415412903, -0.07465226203203201, 0.24004122614860535, 0.25044476985931396, 0.38196003437042236, -0.02781166136264801, 0.13059167563915253, 1.315916299819...
def makedir _ exist _ ok ( dirpath ) : try : os. makedirs ( dirpath ) except oserror as e : if e. errno = = errno. eexist : pass else : raise
[ -0.23109766840934753, 0.5965932011604309, 0.7402425408363342, -0.5585271716117859, 0.3523849844932556, 1.20614755153656, 0.7905383110046387, -0.07538937777280807, 0.38011622428894043, 0.6755040884017944, 0.31510457396507263, -0.7673594951629639, -0.24559557437896729, -0.5639134645462036, ...
def pyarchiver ( self ) : if self. _ _ check _ if _ archivation _ methods _ exist ( ) : pass else : print ( " % s is not installed or available " % self. archiving _ method ) return false if self. _ _ check _ if _ input _ file _ exists ( ) : pass else : print ( " % s file doesn't exist or not available " % self. file _...
[ -0.7408692836761475, -0.16141009330749512, 0.8320642113685608, 0.3181665539741516, 0.1764468401670456, 0.5287554860115051, 0.46361202001571655, 0.46488264203071594, -0.28848379850387573, 0.1877438724040985, -0.08162378519773483, -0.5177758932113647, -0.16477902233600616, 0.2767367362976074...
def clean _ csr ( self ) : text = self. cleaned _ data ['csr'] valid _ pem _ csr ( text ) key _ type = public _ key _ type ( import _ csr ( text ) ) min _ bits = self. template _ obj. min _ bits _ for ( key _ type ) validate _ csr _ bits ( text, min _ bits ) validate _ csr _ key _ usage ( text, self. template _ obj ) r...
[ -0.24055621027946472, -0.628068745136261, 0.26869338750839233, 0.38119542598724365, -1.2385449409484863, 0.4211854636669159, 0.04875264689326286, -0.3381968140602112, 0.005660287570208311, 0.43990960717201233, -0.1259612739086151, -0.22521208226680756, -0.9735099077224731, 0.48673874139785...
def set _ bet ( player _ posn, bet, bet _ num = 0 ) : players [ player _ posn ] ['bet'] [ bet _ num ] = bet print ( " { } has bet $ { :. 2f } in this round for hand { }. \ n ". format ( get _ name ( player _ posn ), bet, bet _ num + 1 ) )
[ -0.12327516824007034, -1.1712474822998047, 0.3996460437774658, -0.13294115662574768, 0.2288956493139267, 0.38356122374534607, 0.27519673109054565, 0.6098785400390625, -0.9864364266395569, -0.14976274967193604, -0.43297693133354187, 0.611043393611908, -0.10007981210947037, -0.09473213553428...
def _ update _ mode _ buttons ( self ) : for index in range ( 4 ) : if ( index = = self. _ mode _ index ) : self. _ modes _ buttons [ index ]. turn _ on ( ) else : self. _ modes _ buttons [ index ]. turn _ off ( )
[ -1.0110722780227661, -0.9692468643188477, 0.6186824440956116, -0.08904814720153809, 0.5462945103645325, 0.24168121814727783, -0.6162384152412415, -0.18157367408275604, 0.09396590292453766, 0.8274000883102417, -0.860206127166748, -0.531402587890625, -0.49738335609436035, -0.0121284890919923...
def size ( self ) : return len ( self. _ nodes. keys ( ) )
[ -0.612926721572876, 0.8367272615432739, 0.16935503482818604, -1.5967646837234497, 0.3194422721862793, 0.2064480483531952, 0.09560979902744293, 0.30238428711891174, -0.22284242510795593, -0.14152857661247253, -0.8807795643806458, 0.18170863389968872, 0.04873877018690109, -0.5546161532402039...
def team _ keys ( self, team _ keys ) : if team _ keys is none : raise valueerror ( " invalid value for ` team _ keys `, must not be ` none ` " ) # noqa : e501 self. _ team _ keys = team _ keys
[ -0.3611098527908325, 0.22471794486045837, -0.6364548206329346, 0.089882493019104, 0.3435833156108856, -0.2740330398082733, -0.08353446424007416, 0.19709078967571259, -1.3182580471038818, 0.752210795879364, -1.38043212890625, 0.15999923646450043, -0.38733506202697754, -0.27246832847595215, ...
def angle _ between ( u, v ) : norm _ u = np. linalg. norm ( u ) norm _ v = np. linalg. norm ( v ) u _ dot _ v = u. dot ( v ) angle = acos ( u _ dot _ v / ( norm _ u * norm _ v ) ) return angle
[ -0.039417508989572525, -0.6617377400398254, 0.46537622809410095, -0.39910051226615906, -0.4952770471572876, 0.23218928277492523, 0.13750864565372467, 1.1505876779556274, 0.336696058511734, 0.5605905055999756, 0.8153942227363586, 0.7835956811904907, -0.7648347616195679, -1.458137035369873, ...
def patch ( pe _ file, disp _ state, diffs ) : base = pe _ file. optional _ header. imagebase for ea, orig, new in diffs : if ( disp _ state is none ) or ea < disp _ state. ropf _ start : # non displaced instruction if ea < base : if not pe _ file. set _ bytes _ at _ offset ( ea, new ) : print " error setting bytes " e...
[ -0.6328904032707214, -0.8505337834358215, 0.6155904531478882, -0.8148595690727234, -0.13708050549030304, 1.0462242364883423, 0.6467653512954712, 0.52631014585495, 0.8351625800132751, 0.2342466562986374, 0.44805288314819336, -0.21777792274951935, -0.5297189950942993, 0.7624004483222961, -...
def get _ tenant _ project ( self, tenant ) : project = tenant. upper ( ) return self. get _ project ( project )
[ -0.39053529500961304, 0.40627363324165344, 0.11201819032430649, 0.7319710850715637, 0.29228243231773376, -0.19446012377738953, -0.7112075090408325, -0.8070564270019531, 0.36196351051330566, 0.21294692158699036, 1.0797698497772217, 0.210616335272789, -0.10018743574619293, -1.324576616287231...
def timestamp _ to _ datetime ( self, timestamp : str ) - > datetime : re _ match = self. _ relative _ timestamp _ regex. match ( timestamp ) if re _ match : datetime _ value = self. _ relative _ timestamp _ to _ datetime ( int ( re _ match. group ('amount') ), re _ match. group ('unit') ) else : datetime _ value = sel...
[ 0.34161177277565, 0.20881029963493347, 0.9280490279197693, 0.23963578045368195, -0.4795020818710327, -0.23794254660606384, -0.3397262394428253, -0.1689828783273697, 0.9402958154678345, 0.5641719698905945, 0.25575968623161316, -0.42102158069610596, 0.6178441643714905, -1.3214954137802124, ...
def move _ file ( filename, test _ taker, task _ folder, dest _ fldr _ root ) : shutil. move ( os. path. join ( os. getcwd ( ), filename ), os. path. join ( dest _ fldr _ root, test _ taker, task _ folder, filename ) )
[ 0.4770047068595886, -0.7636656165122986, 0.6089704632759094, 0.442242830991745, -0.3535107970237732, 0.6557737588882446, 1.5687193870544434, 0.47727102041244507, -1.289841651916504, 0.30520573258399963, 0.15014588832855225, 0.058845024555921555, 0.15761767327785492, 0.061878178268671036, ...
def toarray ( self ) : matrices = ( partial. toarray ( ) for partial in self ) labels = [ partial. label for partial in self ] return matrices, labels
[ -1.4270099401474, -2.5828278064727783, 0.5240843892097473, -1.3169065713882446, -0.1908692866563797, 0.7014460563659668, -0.09481015056371689, -0.623005211353302, -0.26615098118782043, 0.37362995743751526, -0.842848539352417, 0.39390528202056885, -0.9547591209411621, 0.8990052938461304, ...
def reconstitute _ from _ bytes ( self, descriptor _ proto _ bytes ) : descriptor _ proto = descriptorproto ( ) descriptor _ proto. parsefromstring ( descriptor _ proto _ bytes ) return self. reconstitute ( descriptor _ proto )
[ 0.43052273988723755, -0.33585038781166077, 0.29728928208351135, -0.25722581148147583, -0.0019604703411459923, -0.06672518700361252, -0.9147507548332214, 0.9545448422431946, -0.053371623158454895, -0.07660190016031265, -0.7239929437637329, 0.3668211102485657, -0.30079835653305054, -0.197118...
def fetch ( self, locatorobjlist, styletype = " rowwise _ by _ id ", filtertype = " none ", dataselectors = none, usenameflag = true, collectionname = none ) : schemadatadictbyid, containernamelist, _ = self. _ _ fetch ( locatorobjlist, filtertype, dataselectors = dataselectors, usenameflag = usenameflag ) schemadatadi...
[ -1.1109249591827393, -0.23425088822841644, 0.3656485676765442, -0.5684900283813477, -0.613970935344696, -0.37852567434310913, -0.795312762260437, 0.052721716463565826, 0.8823471665382385, 0.2410200536251068, -0.9256627559661865, 0.13128869235515594, 0.8844127058982849, 0.686590850353241, ...
def date _ expiry ( self, date _ expiry ) : self. _ date _ expiry = date _ expiry
[ -0.005941704846918583, -0.2017277330160141, 0.11968056857585907, 0.0349479578435421, 0.3854052722454071, 0.6151676774024963, -0.8878389596939087, 0.26671114563941956, -0.39302119612693787, -0.07497908920049667, -1.4687827825546265, -0.1620568335056305, -0.028687259182333946, 0.479329586029...
def show _ paths _ template _ set _ on ( self, template _ name ) : request = tsquerytemplatereq ( self. _ _ session _ id, template _ name, templatequerytype. show _ set _ templates. value ) response = self. _ _ client. queryschematemplate ( request ) logger. debug ( " show paths template set { }, on { } ". format ( sel...
[ -0.06454061716794968, 0.4717673659324646, 0.49632757902145386, -0.51116943359375, -0.8575625419616699, -0.25108858942985535, -0.046673379838466644, -0.5490807294845581, 0.28413453698158264, 1.0600723028182983, 0.0714804083108902, -0.15609797835350037, -0.732177197933197, 0.5120078325271606...
def test _ protdna _ ilrmsd ( protdna _ caprimodule ) : protdna _ caprimodule. calc _ ilrmsd ( ) assert round _ two _ dec ( protdna _ caprimodule. ilrmsd ) = = 5. 97
[ 0.8600585460662842, -1.1454840898513794, 0.2697617709636688, -0.9634811282157898, 0.4447653889656067, 0.4503895044326782, -0.9238350987434387, -0.37454697489738464, 0.5146936178207397, -1.0227375030517578, 0.02386651374399662, 0.4891315698623657, -0.7282372117042542, 0.13418719172477722, ...
def template _ resolver ( template _ file : str ) - > str : with open ( pathlib. path ( template _ file ). resolve ( ) ) as file : return file. read ( )
[ 0.086316779255867, -0.777157723903656, 0.47117897868156433, -0.7729665637016296, -0.4683891534805298, -0.34657737612724304, -0.15590128302574158, 0.930611789226532, -1.8633824586868286, 0.027265120297670364, 0.34717655181884766, -1.476630449295044, 0.18363648653030396, -0.711923360824585, ...
def generate _ html ( shooters, filename ) : try : f = open ( filename,'w') except ioerror, ( errno, strerror ) : print " i / o error ( % s ) : % s " % ( errno, strerror ) except : print " unexpected error : ", sys. exc _ info ( ) [ 0 ] raise header = " " " <? xml version = " 1. 0 " encoding = " iso - 8859 - 1 "? > <! ...
[ -0.2307286262512207, 0.4981781840324402, 0.8105522394180298, 0.2695993185043335, -0.6830750107765198, 0.3643481731414795, 0.4648444652557373, -0.019255658611655235, -0.9291608929634094, 0.7943381667137146, 0.26027539372444153, 0.015261505730450153, 0.7562806606292725, -0.09384006261825562,...
def make _ comparison _ args ( conf : list [ tuple [ str, str, str, union [ str, path, none ] ] ] ) : # temporary data structure config _ dict = { } for model, typ, dataset, ds _ path in conf : dataset _ collection = config _ dict. get ( dataset, { } ) path _ list = dataset _ collection. get ( typ, [ ] ) if ds _ path i...
[ -1.257019281387329, -0.012956988997757435, 0.35363441705703735, -0.6299342513084412, 0.6890414357185364, 0.5675206184387207, 0.6587149500846863, 0.9600788950920105, -0.5658653974533081, 1.235506534576416, -0.45988407731056213, -0.4348134398460388, 0.8956339955329895, 0.5560796856880188, ...
def visitjulian ( self, date ) : raise notimplementederror ( )
[ -0.8384901285171509, 0.38699573278427124, 0.5343327522277832, 0.015329832211136818, -0.7609136700630188, 0.6172206401824951, 0.5464960932731628, -0.6687341332435608, -0.34512558579444885, 0.06085341051220894, 0.1628437340259552, 1.106485366821289, 0.35064131021499634, 1.0118635892868042, ...
def reopen _ window ( self ) : for i in range ( 2 ) : self. parent. project _ info _ window. on _ articles _ pressed ( )
[ -0.1767786145210266, 0.3119061291217804, 0.3617052733898163, 0.43250396847724915, -0.0015007468173280358, -0.17914214730262756, 1.0746195316314697, -0.04442274197936058, -1.1947656869888306, -0.15212996304035187, 0.11815749853849411, 0.5637641549110413, -0.44990482926368713, 0.219535738229...
def test _ multi _ instance ( self ) - > none : self. _ insert _ rows ( " first ", 3 ) self. _ insert _ rows ( " second ", 4 ) first _ id _ gen = self. _ create _ id _ generator ( " first ", writers = [ " first ", " second " ] ) second _ id _ gen = self. _ create _ id _ generator ( " second ", writers = [ " first ", " ...
[ -0.6351925730705261, 0.34453263878822327, 0.9241292476654053, -0.5374971032142639, 0.5337608456611633, 0.007447726093232632, 0.4286413788795471, -0.29166680574417114, -0.590655505657196, -0.4160812199115753, -0.6851339936256409, -0.7322138547897339, -0.3415149450302124, 0.6974217295646667,...
def combinations ( iterable, r ) : pool = tuple ( iterable ) n = len ( pool ) if r > n : return indices = range ( r ) yield tuple ( pool [ i ] for i in indices ) while true : for i in reversed ( range ( r ) ) : if indices [ i ]! = i + n - r : break else : return indices [ i ] + = 1 for j in range ( i + 1, r ) : indices...
[ -1.075526237487793, 0.27211207151412964, 0.6117568016052246, 0.39896151423454285, -0.03763709217309952, 0.05917103961110115, 1.1490687131881714, -0.6150060892105103, -0.2415100634098053, 0.10033059865236282, -0.5384479761123657, -0.974408745765686, -0.4338383078575134, -0.747115969657898, ...