text
stringlengths
25
2.19k
embedding
listlengths
768
768
def img _ upload ( ) : if'user _ id'in session : user _ id = session. get ('user _ id') f1 = request. files. get ('usr _ img') if f1! = none : filename1 = secure _ filename ( f1. filename ) f1. save ( os. path. join ( app. config ['upload _ folder'], " profile _ pics / ", filename1 ) ) user _ in _ session = user. query...
[ -0.9109387397766113, -0.19266654551029205, 0.8830385208129883, 1.000486969947815, 0.15334844589233398, 0.10149314999580383, 0.8851143717765808, 0.05411848425865173, -0.0002768511767499149, 0.17524805665016174, -0.4076777696609497, -0.15271414816379547, 0.3065166473388672, 0.076249487698078...
def _ uninstallvboxonwindows ( self, fignoreservices = false ) : import win32com. client ; # pylint : disable = f0401 win32com. client. gencache. ensuremodule ('{ 000c1092 - 0000 - 0000 - c000 - 000000000046 } ', 1033, 1, 0 ) ; oinstaller = win32com. client. dispatch ('windowsinstaller. installer ', resultclsid ='{ 000...
[ 0.5673894882202148, -0.3565693497657776, 0.6179835200309753, 0.8538791537284851, 0.18896165490150452, -0.5626043677330017, 0.5580370426177979, -0.05000164732336998, 0.7088286876678467, 0.6431005001068115, -0.6775396466255188, 0.006073194555938244, -0.5411623120307922, 0.4953644275665283, ...
def to _ affine ( self ) : x, y, z = self. x, self. y, self. inverse ( self. z ) return ( ( x * z * * 2 ) % p, ( y * z * * 3 ) % p )
[ -0.23135383427143097, -0.32289040088653564, 0.4947194457054138, -0.2950576841831207, 0.29996147751808167, 0.36765530705451965, -0.9444853067398071, 0.004219176713377237, -0.17986416816711426, 0.27376702427864075, -0.7575019001960754, -0.05616730451583862, -1.0707521438598633, -0.7400593161...
def reset _ msg _ timer ( self ) : self. _ msg _ timer = self. _ initial _ msg _ timer
[ 0.1625654697418213, -0.06053340435028076, 0.2792605757713318, -0.67917400598526, 0.2922928035259247, -0.0968305692076683, -0.10708986967802048, 0.047871608287096024, -1.487086534500122, 0.43642711639404297, -0.32208433747291565, 2.066409111022949, -1.1269546747207642, 1.0816785097122192, ...
def voxelize ( grid, object, corners = none, include _ ga = false ) : # include _ ga is whether to include grid - adjacent voxels in the surface, even if entirely within the surface yes _ voxels = set ( ) checked = set ( ) surface = { } if corners is not none : for i in range ( 4 ) : x0, y0, z0 = corners [ i ] [ 0 ], c...
[ 0.7777801752090454, 0.10015016794204712, 1.0687695741653442, -0.18254005908966064, -0.5138559341430664, -0.5357510447502136, 0.6768566370010376, -0.1787099689245224, 0.03140456601977348, 0.46582144498825073, 0.3050726056098938, 0.6480943560600281, -0.3231833577156067, 0.23552027344703674, ...
def reset ( self ) : self. ptr = self. root
[ 0.12868712842464447, -0.7098089456558228, 0.18442140519618988, -0.39317628741264343, 0.22600163519382477, 0.14034703373908997, 1.2310523986816406, -0.5418464541435242, -0.07446028292179108, 0.11708826571702957, 0.19714932143688202, 2.482255697250366, -1.0263160467147827, -0.115268550813198...
def _ mwc ( self, number ) : return self. _ mwc _ a * ( number & ( self. _ uint32 _ max - 1 ) ) + ( number > > 32 )
[ -0.5746482014656067, 0.4486611783504486, 0.5670122504234314, -0.7847368121147156, -1.070184588432312, -0.47739332914352417, 0.4518429934978485, -1.0720158815383911, 0.8270781636238098, -0.7612216472625732, 0.7406426072120667, 0.7118450999259949, 0.07723245024681091, 0.10697051137685776, ...
def ridge _ regression ( y, tx, lambda _ ) : reg = 2 * tx. shape [ 0 ] * lambda _ * np. identity ( tx. shape [ 1 ] ) xtx = np. dot ( tx. t, tx ) + reg xty = np. dot ( tx. t, y ) w = np. linalg. solve ( xtx, xty ) loss = compute _ mse _ loss ( y, tx, w ) return w, loss
[ 0.2868799865245819, -0.007649939972907305, 0.5780423879623413, -1.1453919410705566, 0.1079249158501625, -1.0762920379638672, -0.3632993996143341, -0.01416415348649025, -0.9719763398170471, 0.632895290851593, -0.7635016441345215, 0.2412940114736557, -0.06847340613603592, 0.13987679779529572...
def bip32key ( self ) - > bip32privatekey : return self. m _ priv _ key
[ 0.03925086930394173, 0.05350126698613167, 0.5161412954330444, 0.042471665889024734, 0.519852340221405, 0.9583753943443298, 0.11868706345558167, -0.7773182988166809, -0.17635339498519897, 0.030463648959994316, -0.42971378564834595, 1.0014967918395996, -0.6764916777610779, -0.521269857883453...
def test ( dataset ) : print ( " running 4 _ improve _ street _ types. py " ) st _ types = defaultdict ( set ) # run against the sample or the full data? if dataset = = " sample " : st _ types = audit ( sample _ path ) else : st _ types = audit ( data _ path ) os. makedirs ( os. path. dirname ( output _ file ), exist _...
[ 0.4180275499820709, 0.13169719278812408, 0.8131422400474548, -0.2261526733636856, -0.22067797183990479, -0.07526759803295135, 1.1047214269638062, 0.09796229749917984, -0.3484486937522888, -0.30890515446662903, -0.4169926643371582, 0.6982769966125488, 0.2558174729347229, 0.46226829290390015...
def is _ variable ( arg ) : return isinstance ( arg, str ) and arg [ : 1 ]. isalpha ( ) and arg [ : 1 ]. islower ( )
[ -0.7300136685371399, -0.6382721662521362, 0.5791202783584595, -0.34258416295051575, -0.18496090173721313, 0.3402004837989807, -0.3698951005935669, 0.06296419352293015, 0.4367944598197937, 0.5250244736671448, -0.6974809765815735, 1.0490634441375732, -1.2015674114227295, 0.3988496661186218, ...
def _ select _ action ( self ) : if self. eval _ mode is not true : epsilon = self. epsilon _ fn ( self. epsilon _ decay _ period, self. training _ steps, self. min _ replay _ history, self. epsilon _ train ) if random. random ( ) < = epsilon : # choose a random action with probability epsilon. return random. randint (...
[ -0.531577467918396, -0.8531404137611389, 0.5416832566261292, 0.03083156980574131, 0.8137791752815247, -0.17773598432540894, 0.050977833569049835, -0.2190103381872177, 0.7147871255874634, -0.1577271968126297, 0.8334906697273254, 0.7323960065841675, 0.19293855130672455, -0.5276222825050354, ...
def shortest _ maze _ traversal ( start, end, maze ) : queue = collections. deque ( [ start ] ) path _ dict = { start : none } curr = none while queue : curr = queue. popleft ( ) if curr = = end : # path found : return it return _ path _ from _ path _ dict ( path _ dict, start, end ) for pos in [ coordinate ( curr. x +...
[ 0.7840791344642639, -0.9049587845802307, 0.8316696286201477, 0.34873735904693604, -0.7666881084442139, -0.17867834866046906, 1.0312588214874268, 0.2722545266151428, -0.4497849941253662, 0.3566732704639435, -0.251753568649292, -0.16405268013477325, -0.7051577568054199, 0.04010877385735512, ...
def status _ tuple ( line ) : return is _ status _ line ( line ) and tuple ( line. split ( none, ( status _ field _ count - 1 ) ) )
[ -0.6899905800819397, -0.07120193541049957, 0.43414992094039917, 0.3841845691204071, 0.6473636627197266, -0.4370467960834503, -0.550510585308075, 0.569999098777771, -0.6253019571304321, 0.43215101957321167, -1.1239489316940308, -1.2423992156982422, -0.5981442332267761, -0.39847439527511597,...
def _ table ( * rows : sequence ) - > str : return'\ n '. join ( ['| '. join ( ['', * [ str ( cell or'' ) for cell in row ],'' ] ) for row in rows ] )
[ 0.2334885150194168, 0.1311325877904892, 0.6825718879699707, -0.08167532086372375, -0.5999380946159363, -0.7421419024467468, -1.0656143426895142, 0.093226857483387, -0.7270742058753967, 0.38586172461509705, 0.4715059995651245, -0.6845275163650513, 0.7911814451217651, 0.22750066220760345, ...
def test _ check _ config _ params _ bugfix _ keywords _ wrong _ type ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture config _ params [ " bugfix _ keywords " ] = [ 1, 2 ] with pytest. raises ( systemexit ) : gitdelver. _ chec...
[ 0.18518318235874176, 0.09489042311906815, 0.2747034728527069, 0.8126001358032227, 0.20990552008152008, 0.3461439907550812, -0.49545323848724365, 0.06032222509384155, -0.5809551477432251, 0.7662381529808044, -0.8911356925964355, 0.40717563033103943, -0.5193136930465698, 1.701053261756897, ...
def create _ ap _ files ( cls ) : cls. _ create _ routing _ slip _ refund _ file ( ) cls. _ create _ non _ gov _ disbursement _ file ( )
[ 0.06211914122104645, 0.01699971780180931, 0.5322744846343994, 0.24345755577087402, 0.9844123125076294, 1.1219624280929565, 0.282675176858902, -0.304718941450119, 1.1888408660888672, 0.12632878124713898, 0.3001810610294342, -0.9477128982543945, 0.8750903606414795, 0.8799523115158081, 0.95...
def get _ outputs ( self ) : outputs = [ ] phase = none if self. generation _ context : phase = self. generation _ context. phase for rel in self. get _ relations ( ) : outrefs = rel. get _ set _ refs ( ) for ref in outrefs : outputs. append ( plugin. generationoutput ( ref, rel, type ='ref ', phase = phase ) ) return ...
[ -0.6284916400909424, -0.792234480381012, 0.47815948724746704, -0.2563037574291229, 0.7380182147026062, -0.41022899746894836, 0.7959864735603333, -0.5421662926673889, -0.5602337718009949, -0.08959250152111053, 0.07173290103673935, 0.15694324672222137, -0.7306619882583618, 0.9507328867912292...
def _ _ resolve _ hostname _ and _ target ( self ) : if'http _ host'not in os. environ : logging. warning ('the http _ host environment variable was not set, but is required'' to determine the correct value for the ` task. target \'property.'' please update your unit tests to specify a correct value for this'' environm...
[ -0.4429490566253662, -0.7935824990272522, 0.7393491864204407, 0.14248643815517426, 0.35873493552207947, -0.1260712742805481, -0.18679089844226837, 0.5789316892623901, -1.326694369316101, -0.26319894194602966, 0.6623646020889282, 0.7692157030105591, 0.2667261064052582, 0.2883596122264862, ...
def maximum _ bytes _ per _ session ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " maximum _ bytes _ per _ session " )
[ 0.33810552954673767, -0.11791267991065979, 0.7040175795555115, 0.6164107918739319, 0.23619718849658966, 1.1064505577087402, 0.4293214976787567, -0.5490359663963318, 1.9389373064041138, -0.5875127911567688, -0.011251182295382023, 0.41839599609375, -0.417953222990036, -0.9187547564506531, ...
def remove ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.23682628571987152, -0.2562797963619232, 0.416306734085083, 0.6518963575363159, -0.0877314954996109, -0.19906888902187347, 0.5693804621696472, 0.6453570127487183, 0.05176779255270958, -0.37863677740097046, -0.9868420362472534, -0.12596403062343597, -1.1057735681533813, 0.0291625596582889...
def _ _ iter _ _ ( self ) : for item in self. _ items : yield item
[ -0.6214278936386108, -1.191703200340271, 0.19003385305404663, -0.5724557042121887, 0.754522442817688, 0.8768815398216248, -0.2536516785621643, -0.32231342792510986, -0.9488223791122437, -0.8239184617996216, 0.2450319230556488, -0.13439211249351501, 0.15761058032512665, -0.4432085454463959,...
def test _ etcd _ client _ creation ( minion _ opts, profile _ name ) : etcdclient ( minion _ opts, profile = profile _ name )
[ 0.9508970379829407, 0.04946513473987579, 0.07203458249568939, -0.4973945617675781, 0.1919684112071991, 1.0232089757919312, -0.4119321405887604, -0.32246869802474976, -0.5049569010734558, -0.28004026412963867, -0.21150656044483185, 0.052264824509620667, 0.20510786771774292, -1.1836977005004...
def custom _ loop ( self, train _ dist _ dataset, test _ dist _ dataset, strategy ) : def distributed _ train _ epoch ( train _ iterator ) : per _ replica _ steps = tf. cast ( 0, tf. float64 ) for one _ batch in train _ iterator : per _ replica _ steps = strategy. run ( self. train _ step, args = ( one _ batch, per _ r...
[ -0.19485509395599365, 0.15708516538143158, 0.5290768146514893, -0.1396830826997757, 0.3829016089439392, 0.3483671247959137, 1.3661303520202637, 0.33452308177948, -0.2682333290576935, 0.7743554711341858, 0.22960425913333893, 0.5858759880065918, 0.9199792742729187, 0.4640071392059326, 0.52...
def process _ csv ( filepath : str ) : conn, cursor = setup _ db ( ) os. makedirs ( images _ folder ) clean _ rows = clean _ data ( filepath ) with threadpoolexecutor ( max _ threads ) as pool : for batch in read _ batch ( clean _ rows ) : data _ batch = [ data for data, img _ url in batch ] images _ batch = [ img _ ur...
[ -0.27275994420051575, 0.38997891545295715, 0.7066236138343811, 0.13963179290294647, 0.6129035949707031, -0.25383272767066956, 0.4591779112815857, 0.3759933412075043, -0.2241331785917282, 0.3213040828704834, 0.2832442820072174, -0.11697692424058914, 0.34786349534988403, 0.7290862798690796, ...
def compute _ rigid _ transform ( points _ 1, points _ 2 ) : a = np. array ( [ [ points _ 1 [ 0, 0 ], - points _ 1 [ 0, 1 ], 1, 0 ], [ points _ 1 [ 0, 1 ], points _ 1 [ 0, 0 ], 0, 1 ], [ points _ 1 [ 1, 0 ], - points _ 1 [ 1, 1 ], 1, 0 ], [ points _ 1 [ 1, 1 ], points _ 1 [ 1, 0 ], 0, 1 ] ] ) y = points _ 2. reshape ( ...
[ 0.3968084454536438, -0.366464227437973, 0.8753519058227539, -0.2032022476196289, 0.5264774560928345, -0.7420951724052429, -0.7397710084915161, -0.2863478660583496, -0.25293007493019104, 1.0634765625, -0.5229605436325073, 0.2780184745788574, 0.07183177024126053, -1.0182987451553345, 0.525...
def create _ submission _ script ( ) : template = get _ file _ as _ list ( script _ name, raw = true ) nlines = [ ] for line in template : # add current line to new bash script nlines. append ( line. strip ( ) ) # add new info to bash script if'# jobname'in line : nlines. append ('job = { } '. format ( job ) ) elif'# p...
[ -0.019992917776107788, -0.8145548701286316, 0.9113683104515076, -0.5781393647193909, -0.46560564637184143, -0.09302270412445068, -0.6968182325363159, -0.04023785889148712, -0.9215024709701538, 0.29333868622779846, -0.47931990027427673, 0.21046137809753418, 0.5553427338600159, 1.07535219192...
def filename ( file, include _ extension ) : if include _ extension : # file. ext return os. path. basename ( file ) else : # file filename _, file _ extension _ = os. path. splitext ( file ) return os. path. basename ( filename _ )
[ 1.1600182056427002, -0.8612070679664612, 0.8182268142700195, 0.883853554725647, -1.0400457382202148, 0.6683387756347656, 0.9113215804100037, 2.0322468280792236, -0.20427006483078003, 0.9552708864212036, 1.0352916717529297, -0.12155014276504517, 0.1678849756717682, -0.5366779565811157, 0....
def _ dict _ merge ( merge _ dict : dict, into _ dict : dict ) - > none : for k, v in merge _ dict. items ( ) : if k not in into _ dict : into _ dict [ k ] = v continue current _ val = into _ dict [ k ] if isinstance ( v, dict ) and isinstance ( current _ val, dict ) : _ dict _ merge ( v, current _ val ) continue # oth...
[ -0.7078579664230347, 0.33936628699302673, 0.8394739031791687, -0.17186857759952545, -0.4150214195251465, -0.07948121428489685, -0.8819919228553772, 0.8054208755493164, -0.041669946163892746, -0.452028751373291, 0.22363734245300293, 0.03830362856388092, -0.5752794742584229, 0.87771856784820...
def _ _ get _ pixel _ aspect ( self ) : if self. _ _ rop is not none and self. _ _ cam is not none : if self. _ _ rop. parm ( " override _ camerares " ). eval ( ) : return self. _ _ rop. parm ( " aspect _ override " ). eval ( ) else : return self. _ _ cam. parm ( " aspect " ). eval ( )
[ -0.37033209204673767, -1.1742092370986938, 1.0070329904556274, 0.11940617859363556, 0.1355404257774353, -0.06901352852582932, 0.04507817327976227, -0.5902994871139526, 0.8905192613601685, -0.6339762210845947, 0.7963172197341919, 0.21890945732593536, -1.420258641242981, 1.079959511756897, ...
def main ( arg _ list = none ) : parser = get _ parser ( ) args = parser. parse _ args ( arg _ list ) if args. work _ dir : backups _ root = args. work _ dir else : backups _ root = none backup _ man = backupmanager ( args. data _ dir, backups _ root = backups _ root ) if not backup _ man. get _ backup ( args. backup _...
[ 0.5767984390258789, 0.3816523849964142, 0.9588378071784973, 0.6693845391273499, 0.990446925163269, 0.04485206678509712, -0.3632314205169678, 1.2012765407562256, -0.2206399291753769, -0.26519185304641724, -0.567109227180481, -0.33113279938697815, -0.23077048361301422, 0.23186171054840088, ...
def _ translatecoordinates ( self, x, y ) : return x - self. xc, self. yc - y
[ 0.13447481393814087, -0.7008239030838013, 0.5747130513191223, -1.3773987293243408, 0.06689611822366714, 0.06466798484325409, -1.2003785371780396, -0.8459867835044861, -0.034495797008275986, 0.05883023515343666, -0.742272675037384, -0.16071884334087372, 0.31757012009620667, -1.5067708492279...
def mv _ indexes ( self, mv _ dir : str, to _ dir : str, mkdir : bool = false, only _ cp : bool = false ) - > int : mv _ dir, to _ dir = p. abspath ( mv _ dir ), p. abspath ( to _ dir ) if not p. isdir ( to _ dir ) and mkdir : os. mkdir ( to _ dir ) moving _ indexes = self. find _ indexes ( mv _ dir ) n _ vect = 0 for ...
[ -0.9817492961883545, 0.5025258660316467, 0.6933712959289551, 0.5415076613426208, -0.08320112526416779, -0.31917592883110046, 0.8957471251487732, 0.9664751291275024, 0.1470794379711151, 1.1067317724227905, -0.16765747964382172, 1.049307942390442, 0.49363815784454346, 0.06438075006008148, ...
def get _ variables ( project ='cmip5') : variables = [ ] c = sddb. conn. cursor ( ) c. execute ( " select file. project, file. model, file. dataset _ id, dataset. path, file. variable from file, dataset where dataset. project =? and file. dataset _ id = dataset. dataset _ id group by file. project, file. model, file. ...
[ -0.36914780735969543, 0.4511534571647644, 0.3246380388736725, -0.3287649154663086, -0.06448404490947723, -0.022300750017166138, -0.2489197701215744, -0.05258209630846977, -1.2175681591033936, 0.10480073094367981, -0.2984040379524231, 0.06803563237190247, -0.27770310640335083, 0.26344522833...
def _ _ eq _ _ ( self, other ) : if isinstance ( other, imagesize ) : return self. width = = other. width and \ self. height = = other. height return false
[ -0.8958510756492615, -0.6476275324821472, 0.6602756977081299, -0.14745569229125977, -0.6481614708900452, 0.07896554470062256, -0.04473118111491203, -0.8689966201782227, 1.2007461786270142, -0.4121648669242859, -0.24993832409381866, -0.08298078924417496, -0.4444831311702728, 1.1938856840133...
def generate _ trajectory _ and _ map _ from _ config ( config ) : static _ map = costmap2d. create _ empty ( world _ size = config. size, resolution = config. resolution, world _ origin = config. origin ) for obs in config. obstacles : static _ map = obs. render ( static _ map ) return config. trajectory, static _ map
[ -0.2481716126203537, -0.6058777570724487, 0.5824383497238159, -0.09451860934495926, -0.3550686538219452, 1.1191515922546387, 0.07007960230112076, 0.5841874480247498, -0.20319965481758118, 0.6128308176994324, -0.660172700881958, -0.40134531259536743, 1.099970817565918, 0.63387131690979, 0...
def element _ columns ( dataframe ) : for i in range ( 0, 2 ) : for j in range ( 0, 2 ) : dataframe ['r _'+ str ( i + 1 ) + str ( j + 1 ) ] = list ( map ( lambda r : r [ i ] [ j ], dataframe ['r'] ) ) return dataframe
[ -1.1797033548355103, 0.15052247047424316, 0.3770332634449005, -0.4456850588321686, 0.20834119617938995, -0.2382541447877884, 0.6351869106292725, 0.047319844365119934, 0.02200116030871868, 0.4601645767688751, -0.9438643455505371, 0.09538237005472183, 0.746202826499939, -0.8677595853805542, ...
def get _ one _ hot _ decoder ( dataset : dataset ) - > callable : label _ list = label. objects. filter ( dataset _ id = dataset. id ). order _ by ( " id " ) def decoder ( array : list [ int ] ) - > label : # print ( " dec ", array ) max _ value = array [ 0 ] matched _ label = label _ list [ 0 ] for array _ value, lab...
[ -0.5355690121650696, -0.7828782200813293, 0.5018378496170044, -0.2003018856048584, -0.25507813692092896, -0.43023741245269775, -0.7810329794883728, 0.11870276927947998, 0.9187606573104858, -0.2751220166683197, 0.29329556226730347, 0.23053954541683197, 1.117244005203247, 0.8101911544799805,...
def get _ rotate _ function _ all _ in _ one ( input _ shape : collection [ union [ int ] ], dz _ stage : float = 0. 299 _ 401, xypixelsize : float = 0. 1040, angle : float = 31. 8, interp _ order : int = 1, ) - > callable : dz = np. sin ( angle * np. pi / 180. 0 ) * dz _ stage dx = xypixelsize deskewfactor = np. cos (...
[ -0.5698226690292358, -0.15280620753765106, 0.6956744194030762, -0.0722629651427269, 0.37300097942352295, -1.1260955333709717, 0.6598598957061768, -0.3800284266471863, 0.3506890535354614, -0.05251692235469818, 0.27666333317756653, -0.21838438510894775, -0.08611301332712173, 0.21397615969181...
def execute _ query ( connection, query ) : cursor = connection. cursor ( ) try : cursor. execute ( query ) connection. commit ( ) except error as err : raise dberror ('query { 0 } failed '. format ( query ) ) from err
[ 0.4609827995300293, 0.2557917535305023, 0.35500669479370117, 0.43625789880752563, 0.8720604777336121, 0.4646097719669342, -1.502416729927063, 0.25329941511154175, -0.1307830512523651, 0.7563125491142273, 0.5955734252929688, -0.6219533681869507, -0.21815423667430878, -0.30297157168388367, ...
def run ( layname, pac, ghosts, ngames = 1, name ='games ', verbose = true ) : if grader. fatalerror : return {'time': 65536,'wins': 0,'games': none,'scores': [ 0 ] * ngames,'timeouts': ngames } starttime = time. time ( ) lay = layout. getlayout ( layname, 3 ) disp = textdisplay. nullgraphics ( ) if verbose : print ('*...
[ -0.6071591377258301, 0.64488685131073, 0.7908585071563721, -0.9206068515777588, -0.212114617228508, -0.10272497683763504, 0.015295080840587616, -1.0604654550552368, -0.834850013256073, 0.8601163625717163, -0.21235421299934387, -0.09616849571466446, -0.39885416626930237, 0.6609291434288025,...
def str _ or _ none ( value ) : if value is none : return none else : return str ( value )
[ -0.058225348591804504, -0.8215391635894775, 0.23799148201942444, -0.7624852061271667, -0.3097756803035736, -0.9990425705909729, -0.8227118253707886, -0.8645392060279846, 0.3157458007335663, 0.5356576442718506, 1.4936250448226929, -0.1840645670890808, -0.07504933327436447, -0.31349724531173...
def chunks ( l, n ) : # specific to mobility g ( r ) code " " " small modification such that first and last chunk are of same size. middle chunk is messed up " " " size = len ( l ) / / n lst = [ size for i in range ( n ) ] leftover = len ( l ) - size * n mid = n / / 2 lst [ mid ] + = leftover " " " if leftover < size /...
[ 0.14559559524059296, -0.07031379640102386, 0.8679981827735901, -0.07863283902406693, -0.4386344850063324, 0.025267567485570908, -0.24025285243988037, -0.22203032672405243, -0.07658907026052475, -0.13522984087467194, -0.31472843885421753, -0.6139532923698425, -0.4766853153705597, 0.66088080...
async def common _ completed _ games ( self, ctx : ctx, username : str = none ) : other = self. bot. client. get _ user ( username = username ) games = ctx. session. get _ common _ completed _ games ( other ) await paginator ( ctx, games, format _ completed _ game, f'{ username } and { ctx. session. user. username } \'...
[ -0.009192414581775665, 0.12677821516990662, 0.8015822768211365, 0.6660755276679993, 0.01100742258131504, 0.36060646176338196, 0.690718948841095, -0.5763905048370361, -0.4642658829689026, 0.5847099423408508, -0.21167828142642975, 0.07416069507598877, -0.6048162579536438, 0.6519896388053894,...
def get _ params _ as _ array ( self ) : return np. array ( [ self. amplitude, self. mean, self. stddev ] )
[ -0.49152228236198425, -0.706831693649292, 0.4202601909637451, -0.33756789565086365, 0.659679651260376, 0.584670901298523, -0.3161943554878235, -0.9185128211975098, -0.9488756656646729, 0.7390856742858887, 0.03964362293481827, 1.771409511566162, -0.2816787660121918, 1.0009045600891113, 0....
def main ( ) : for container in events : try : container _ stop = false if " start " in container [ " status " ] : try : container _ event _ id = container [ " actor " ] [ " id " ] container _ inspect = client. inspect _ container ( container _ event _ id ) container _ id = container _ inspect [ " id " ] container _ na...
[ -0.018376680091023445, -0.9697092175483704, 1.0293159484863281, 0.30408966541290283, 0.618743896484375, -0.24228036403656006, 0.21965938806533813, -0.12240970879793167, -0.3760971426963806, 0.3831401765346527, -0.1911567598581314, 0.8064214587211609, 0.1462738811969757, 0.7340025901794434,...
def is _ checked ( self ) : return self. _ widget. ischecked ( )
[ -0.3265751898288727, 0.25628477334976196, 0.33246517181396484, 1.0943834781646729, 0.6537961363792419, 0.13337405025959015, 0.3210682272911072, 0.7412532567977905, 0.0036260068882256746, 0.14796225726604462, -0.23715528845787048, 0.4817820191383362, -0.5470355153083801, 0.3278859257698059,...
def _ should _ republish ( metrics, threshold _ seconds, logger ) : if metrics. serialized _ at is not none : now = get _ now ( ) serialized _ at = get _ datetime _ from _ timestamp _ string ( metrics. serialized _ at, metrics. timestamp _ format ) delta = timedelta _ total _ seconds ( now - serialized _ at ) logger. d...
[ 0.3413732051849365, 0.061114005744457245, 0.5841547250747681, -0.1102781668305397, -0.22612862288951874, -0.06411771476268768, -0.5425588488578796, 0.08864151686429977, -0.45103031396865845, -0.3509925305843353, 0.33781859278678894, 0.4521923065185547, 0.6753185987472534, -0.74418407678604...
def test _ update _ score ( self, test _ client, login _ response ) : quote _ id = " " while quote _ id! = " ea9d502e - a9b6 - 4d67 - ab35 - 5cae050af38b " : quote _ id = json. loads ( test _ client. get ( " / quote " ). data. decode ( " utf - 8 " ) ) [ " quote _ id " ] highscore _ response = test _ client. post ( " / ...
[ 0.2652517259120941, 0.13423646986484528, 0.6154348850250244, 0.0319766029715538, 1.2064123153686523, -0.4206424057483673, -0.0949116125702858, -0.4246412217617035, -0.2075093537569046, 0.4396069347858429, -0.7309558391571045, 0.4778505563735962, -0.9289177656173706, -0.5579491853713989, ...
def test _ packages ( self ) : self. asserttrue ( self. check _ package _ output ( " python - - version ", " python 3. 7. " ) ) self. asserttrue ( self. is _ package _ present ( " pip " ) )
[ -0.07645224034786224, 0.4294940233230591, 0.41859638690948486, 0.3934504985809326, 0.8130309581756592, 1.2728890180587769, -0.4697176218032837, 0.5050337314605713, 0.5395554900169373, -0.23740360140800476, -0.44376340508461, -0.34203752875328064, 0.42769768834114075, 0.5812293887138367, ...
def is _ known _ menu _ context ( self, context ) : for menu _ id, data in self. main _ menu _ items. iteritems ( ) : if data ['lolomo _ known'] : if data ['contexts'] [ 0 ] = = context : return true return false
[ -0.6804361343383789, -0.23066362738609314, 0.5782957077026367, 0.016833040863275528, -0.49388110637664795, -0.30472737550735474, -1.0186090469360352, 0.14010600745677948, 0.5032155513763428, 0.22902996838092804, -0.6030481457710266, 0.49672096967697144, -0.17012090981006622, 0.314479082822...
def run ( fold, model _ name ) : # load the data file into memory train _ data = pd. read _ csv ( config. training _ file ) # extract features from the dataframe features = [ feat for feat in train _ data. columns if feat not in ['id ','target ','kfold'] ] # fill nan values in features with " none " for col in features...
[ 0.27691033482551575, 0.46466925740242004, 0.8652448058128357, 0.3893173933029175, 0.3747236728668213, -0.11885592341423035, 0.2501462697982788, 0.690291166305542, -0.407909095287323, -0.11817329376935959, -0.6373075842857361, 0.4233318269252777, 0.666283369064331, 0.40704604983329773, 0....
def populate ( ) : db = connect ( ) collection = db ['schema'] with open ('schema'+ os. sep +'backend _ 2 _ frontend _ schema. json ','r') as f : data = json. load ( f ) data _ list = [ ] for layer in data. keys ( ) : name = layer value = data. get ( name, { } ) value ['name'] = name data _ list. append ( value ) colle...
[ -0.719388484954834, 0.2666289806365967, 0.6531925201416016, -0.6168281435966492, 1.5974127054214478, 0.052805352956056595, -0.5469510555267334, 0.1461624801158905, -1.308354139328003, 0.7789822220802307, -0.9736096262931824, -0.2414112538099289, 0.30822473764419556, 0.11270579695701599, ...
def test _ singletimetiffpathprocessor _ setup ( self ) : pp = self. config. path _ processor _ class pp. setup ( self. config. get _ path _ processor _ params ( ) ) assert pp. parameters [ " z _ 0 " ] = = os. path. join ( resource _ filename ( " ingestclient ", " test / data " ), " test _ multipage. tif " ) assert pp....
[ 0.35626861453056335, 0.16857172548770905, 0.5372569561004639, -0.08577659726142883, 0.5231795310974121, 0.5681506395339966, 1.0499329566955566, 0.762032687664032, 0.22233662009239197, 1.0842223167419434, 0.24216775596141815, -0.23107801377773285, -0.4475325345993042, 1.1148591041564941, ...
def ecdf _ simple ( waits, t, pad _ left _ at _ x = 0 ) : ts, counts = np. unique ( waits, return _ counts = true ) i = np. argsort ( ts ) ts = ts [ i ] counts = counts [ i ] weights = t / ( t - ts ) return np. insert ( ts, 0, pad _ left _ at _ x ), \ np. insert ( np. cumsum ( counts * weights ), 0, 0 ) / len ( weights...
[ 0.05275508016347885, 0.6704559922218323, 0.6122723817825317, -0.6071311831474304, 0.04311215505003929, 0.7189249396324158, 0.057136036455631256, 0.1604701429605484, -0.8075302243232727, 0.2840813398361206, -0.7130812406539917, -0.7771859765052795, 0.6123546957969666, 0.39043089747428894, ...
def _ matchlambda ( func, line ) : from dill. detect import code as getcode from dill. detect import freevars, globalvars, varnames dummy = lambda :'_ _ this _ is _ a _ big _ dummy _ function _ _'# process the line ( removing leading whitespace, etc ) lhs, rhs = line. split ('lambda ', 1 ) [ - 1 ]. split ( " : ", 1 ) #...
[ -0.08345849812030792, -0.4118407666683197, 1.0215694904327393, -0.23136375844478607, -0.2750716507434845, -0.13683687150478363, 0.3746631145477295, 0.16176225244998932, -0.3008732199668884, -0.16594868898391724, -0.6252893805503845, 0.5738499164581299, -0.3375735282897949, 0.62742483615875...
def _ filter ( config _ file, output _ file, indices, fields, show _ config = false ) : cfg = load _ data ( config _ file ) jobs = cfg [ " jobs " ] if not jobs : print ( " the configuration has no jobs ", file = sys. stderr ) sys. exit ( 1 ) if output _ file is none : handle, new _ config _ file = tempfile. mkstemp ( s...
[ -0.5339698791503906, -0.3758206367492676, 0.9002026319503784, -0.387209951877594, -0.6033348441123962, -0.7537808418273926, 0.5020115375518799, 0.20225991308689117, -0.8518907427787781, 0.8399133682250977, -0.4654880464076996, -0.07337787002325058, -0.11581481993198395, -0.2866248488426208...
def testnonflatlcdm ( self ) : w0 = - 1. 0 wa = 0. 0 h0 = 77. 0 for om0 in numpy. arange ( start = 0. 15, stop = 0. 96, step = 0. 4 ) : for ok0 in numpy. arange ( start = - 0. 1, stop = 0. 11, step = 0. 2 ) : universe = cosmologyobject ( h0 = h0, om0 = om0, ok0 = ok0, w0 = w0, wa = wa ) og0 = universe. omegaphotons ( r...
[ 0.08947154134511948, -0.4771294891834259, 0.7937747836112976, -0.5383108258247375, -0.059937234967947006, 0.6464167833328247, 0.4949612021446228, -0.20635147392749786, 0.26476410031318665, -0.8181735277175903, -0.4632556140422821, -0.5438844561576843, -0.20385944843292236, 1.63133382797241...
def run _ cosmic _ mc ( particles, dt, nsteps ) : stopped _ particles = [ ] for step _ i in range ( nsteps ) : updated _ particles = [ ] for particle in particles : # unpack particle tuple ( name, p _ x, p _ y, traj _ x, traj _ y ) = particle ( beta _ x, beta _ y ) = momentum _ to _ velocity ( particle _ mass ( name ),...
[ -0.1430441439151764, -0.36330655217170715, 0.8655409812927246, 0.330460786819458, 0.6082545518875122, -0.027566049247980118, -0.08016020804643631, -0.6986751556396484, -0.7462790012359619, 0.4848860800266266, 0.44987624883651733, -0.2811613082885742, -0.36329492926597595, 0.861014544963836...
def generate _ ui _ hints ( entity, context, type _ weights ) : schema = { } meta = meta _ module. aggregate _ meta ( entity, context ) for cls _ name, schema _ prop, meta _ prop in ( ('io. murano. metadata. title ','title ','text'), ('io. murano. metadata. description ','description ','text'), ('io. murano. metadata. ...
[ -0.5402898192405701, 0.00928554031997919, 0.8416443467140198, -0.36793720722198486, 0.17342256009578705, 0.3692655563354492, -0.016238408163189888, -0.5610032677650452, -0.48823434114456177, 0.40014883875846863, 0.009608609601855278, -0.03726396709680557, 0.6864202618598938, 0.508507966995...
def read _ input ( ) : global prg, job, vrs, inp, out, wrk, scr, bsh, nox, nov, mail, slur, time, nodes, partition try : if sys. argv [ 1 ] in ['- h ','- - help'] : show _ usage ( ) elif sys. argv [ 1 ] = = ('- - avail') : avail _ progs ( ) sys. exit ( ) elif sys. argv [ 1 ] = = ('- - inp') : print _ input ( ) sys. exi...
[ 0.040387798100709915, -0.5634248852729797, 1.1487025022506714, 0.0920988917350769, 0.14821530878543854, 0.919195294380188, 0.05693446844816208, 0.5339751839637756, -1.184828281402588, -0.19760963320732117, 0.6296046376228333, 0.6654534339904785, -0.5676800012588501, 0.16066531836986542, ...
def _ _ camera _ changed ( self, output = none ) : if output is none : output = self. output return \ output. ui. camera and self. _ _ camera _ combo _ box. item _ text ( output. ui. camera )! = output. origin _ cam _ path
[ -0.10970386862754822, -1.244118571281433, 0.45347583293914795, 1.4732706546783447, -0.8495856523513794, -0.15222617983818054, 0.7317264676094055, -0.00266046985052526, 0.5267555713653564, 0.34642553329467773, -0.5012216567993164, -0.06127043813467026, -1.0225650072097778, 1.059287548065185...
def video _ stream ( ) : global frame global time _ now _, frame = video _ capture. read ( ) small _ frame = cv2. resize ( frame, ( 0, 0 ), fx = 0. 25, fy = 0. 25 ) rgb _ small _ frame = small _ frame [ :, :, : : - 1 ] height, width, channels = frame. shape centerx = int ( width / 2 ) centery = int ( height / 2 ) first...
[ 0.042594533413648605, -0.27741387486457825, 0.828701376914978, 0.6988405585289001, -0.5054353475570679, -0.6299148797988892, 0.43406394124031067, -0.21172426640987396, 0.4329618513584137, -0.18119777739048004, -0.3016729950904846, 0.6171506643295288, 0.6452420353889465, 0.8184758424758911,...
def testdeletevaluesforquerywithsearch ( self ) : self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. deletevaluesforquery ( session, u'has fluiddb / id ', [ u'username / unknown'] ) yield self. assertfailure ( deferred, tparseerror )
[ 0.058413296937942505, 0.6237808465957642, 0.35187828540802, 0.07749787718057632, 0.3550507426261902, 0.6708464026451111, -0.2472793310880661, -0.14793694019317627, 0.09101023524999619, -1.1152315139770508, -0.01712523214519024, -0.7602817416191101, 0.32307150959968567, 0.7032203674316406, ...
def test _ reversevideo ( self ) : self. assertequal ( text. assembleformattedtext ( a. reversevideo ['hello, world.'] ),'\ x1b [ 7mhello, world.')
[ 0.17836083471775055, -0.9282455444335938, 0.5141366124153137, 0.43262410163879395, 0.3465254008769989, -0.025225641205906868, -0.5782458782196045, 0.12065807729959488, 0.534200131893158, 0.38276058435440063, -0.7840321660041809, 1.2271642684936523, -1.4712104797363281, -0.10275519639253616...
def parse _ td ( raw : str ) - > datetime. timedelta : lengths = {'w': 60 * 60 * 24 * 7,'d': 60 * 60 * 24,'h': 60 * 60,'m': 60,'s': 1 } parts = [ ] part ='' for i in raw : part + = i if i in lengths : parts. append ( part ) part ='' seconds = 0 for part in parts : try : value = int ( part [ : - 1 ] ) except valueerror ...
[ 0.24022844433784485, -0.04153725132346153, 0.806875467300415, -0.4428805708885193, -1.1200995445251465, -0.6058676838874817, -0.012112362310290337, -0.8628406524658203, -0.20715181529521942, 0.09486155211925507, -0.34032395482063293, -0.668225884437561, 0.220558762550354, -0.50770306587219...
def test _ object _ attributes ( self, create _ beverages ) : assert create _ beverages. time _ to _ prepare _ beverage = = 0
[ -1.0167325735092163, 0.1514226794242859, 0.4137168228626251, 0.36037978529930115, 1.1551984548568726, 1.1206141710281372, 0.12932375073432922, 0.46003392338752747, -0.4140928089618683, 0.6647216081619263, -0.4473516643047333, -0.8544766902923584, 0.18300993740558624, 0.21227866411209106, ...
def close _ all _ browsers ( self ) : self. seleniumlib. close _ all _ browsers ( )
[ -0.38416430354118347, -1.142490267753601, 0.31880342960357666, 1.9413577318191528, 0.30695709586143494, 1.0668026208877563, 0.3682578206062317, -0.2619430422782898, 0.5086830854415894, 0.3766515552997589, 0.18627920746803284, 0.12064414471387863, -0.2535337805747986, 1.572605013847351, 0...
def _ get _ arg _ count ( method ) : if not method : return 0 arg _ spec = inspect. getfullargspec ( method ) return len ( arg _ spec [ 0 ] )
[ -0.7895165085792542, 1.1533623933792114, 0.5604389309883118, -0.7869264483451843, 0.8228753209114075, -0.6536761522293091, 0.7101233005523682, 0.9805227518081665, -0.3988284170627594, 0.6458229422569275, 0.258613258600235, 0.5362313985824585, 0.4805808663368225, 0.8852946162223816, 0.869...
def should _ compare _ to _ previous ( ) : conf _ path = os. path. join ( cuckoo _ root, " conf ", " memoryanalysis. conf " ) voptions = config ( conf _ path ) return voptions. basic. compare _ to _ previous _ dump
[ 0.3443143963813782, 0.7718274593353271, 0.5935673713684082, -0.02331293374300003, -0.0012932103127241135, -0.05326586961746216, 0.8346151113510132, -0.2623370885848999, -0.4932791292667389, 0.3513871729373932, -0.31221652030944824, 0.49206873774528503, -0.5949805974960327, 0.68459206819534...
def get _ timestamp ( cls ) - > int : return int ( time. time ( ) * cls. timestamp _ seconds _ to _ unit _ conversion )
[ -0.19731995463371277, 0.8687320351600647, 0.5467705726623535, 0.0006292227189987898, 0.5654653310775757, -0.4295206665992737, 0.13190308213233948, -0.0627821832895279, 0.3148460388183594, 0.0859043151140213, -0.23291511833667755, -0.3589339256286621, 0.6815333962440491, -0.2536748349666595...
def dft ( self, starting _ vertex ) : stack = [ ] visited = [ false for x in range ( len ( self. vertices ) ) ] stack. append ( starting _ vertex ) while len ( stack ) > 0 : v = stack. pop ( - 1 ) if not visited [ v - 1 ] : visited [ v - 1 ] = true print ( v ) for neighbor in self. get _ neighbors ( v ) : stack. append...
[ 0.07356473058462143, 1.0950323343276978, 0.68962562084198, 0.47799059748649597, -0.08015090227127075, -0.19694745540618896, 0.5575475692749023, -0.37792813777923584, -0.36934131383895874, 0.23644210398197174, -0.816913902759552, 0.7755844593048096, -0.7202539443969727, 0.36742550134658813,...
def set _ parameters ( self, params ) : quickbotsupervisor. set _ parameters ( self, params ) self. gtg. set _ parameters ( self. parameters )
[ -0.7034729719161987, 0.7075966596603394, 0.04435526952147484, -0.3841591477394104, 0.5732105374336243, 0.36286601424217224, 0.1403622329235077, 0.8575407266616821, -0.6815330386161804, 0.12787781655788422, -0.5695034265518188, 0.5343070030212402, -0.42636075615882874, 1.196913719177246, ...
def _ plant _ trees ( self ) : raise notimplementederror
[ -0.6880213618278503, 0.17870694398880005, 0.4942321181297302, 0.21887147426605225, 0.49552613496780396, -0.028314288705587387, 0.17666339874267578, 0.5346770882606506, -0.19634859263896942, 0.5395615100860596, -0.2135271430015564, -0.7572752833366394, 0.22292761504650116, 0.546555995941162...
def checkunsyncedhistograms ( inputs ) : all _ xmls _ set = set ( histogram _ paths. all _ xmls ) inputs _ set = set ( os. path. abspath ( input ) for input in inputs ) to _ add, to _ remove = all _ xmls _ set - inputs _ set, inputs _ set - all _ xmls _ set return to _ add, to _ remove
[ -0.22823303937911987, 0.10012217611074448, 0.5620802044868469, 0.2529537081718445, 0.41988375782966614, 0.008838547393679619, 1.1036932468414307, -0.16126716136932373, 0.1257818192243576, 0.14458882808685303, 0.30316561460494995, -0.5903529524803162, -0.13230501115322113, 1.02318274974823,...
def do _ update ( self, node _ id ) : _ error _ code, _ msg = ramstkdatamodel. do _ update ( self, node _ id ) if _ error _ code! = 0 : _ error _ code = 2006 _ msg ='ramstk error : attempted to save non - existent'\'nswc record id { 0 : d }. '. format ( node _ id ) return _ error _ code, _ msg
[ -0.2750408351421356, -0.0688047707080841, 0.6181162595748901, -0.31823399662971497, 0.7288153171539307, -0.5038096904754639, 0.24211588501930237, -0.25996899604797363, -0.46306511759757996, 1.1531362533569336, -0.3921959400177002, 0.42315301299095154, -0.45241889357566833, 0.42412993311882...
def image _ layers ( ) - > list : return [ " sha256 : 94b2db70f7476c98f4c4a1b7a922136e0c5600d2d74905407ad364dcca2bf852 ", " sha256 : 22426f366c51f26105aa9a6c6c9aea9fff0f21b7aabfc97870727577edaa3260 ", ]
[ -0.08216214179992676, -0.923931360244751, 0.6825741529464722, -0.38185548782348633, 0.5490125417709351, -0.01942054182291031, -0.5504664182662964, -0.39325767755508423, 0.39324456453323364, 0.3151101768016815, -1.2036519050598145, -0.2467162311077118, 0.30380627512931824, 0.553237318992614...
def _ prepare ( self ) : logger. info ( " preparing objects, sources, lumped elements,... " ) for obj in self. objects : obj. attach _ to _ grid ( ) for bc in self. boundaries : bc. attach _ to _ grid ( ) self. _ calculate _ material _ components _ simple ( ) for obj in self. objects : if isinstance ( obj, brick ) : ob...
[ 0.1011786088347435, -0.566463828086853, 0.5780215859413147, -0.03331068530678749, 0.5204800963401794, -0.2947414517402649, 0.8278135657310486, -0.5805267095565796, 0.25040727853775024, -0.3919714391231537, -0.345450222492218, -0.11990152299404144, 0.36823776364326477, 1.0102999210357666, ...
def _ _ commandtotarget ( self, cmd ) : deps = " " if cmd. stage ( ) > 1 : deps = " stage % s " % ( cmd. stage ( ) - 1 ) self. _ fileout. write ( " id % s : % s \ n " % ( cmd. jobid ( ), deps ) ) self. _ fileout. write ( " \ t @ echo target % s \ n " % cmd. name ( ) ) winargs = " " if os. sep = ='\ \': winargs = " / d ...
[ -0.4708375036716461, -0.8866007328033447, 0.6092487573623657, -0.9994363784790039, 0.2591742277145386, 0.5544533133506775, 0.4468229115009308, 0.07215608656406403, -0.6935206055641174, -0.6710380911827087, 0.4981706738471985, 0.9679417014122009, 0.7769989967346191, 0.7217363119125366, 0....
def _ _ init _ _ ( self, existing _ object = none ) : if isinstance ( existing _ object, dict ) : for key, value in existing _ object. items ( ) : if isinstance ( value, dict ) : self. set ( key, encase ( value ) ) elif isinstance ( value, list ) : self. set ( key, self. _ convert _ list ( value ) ) else : self. set ( ...
[ -0.912921130657196, -0.3688993752002716, 0.6916614770889282, 0.38532012701034546, -0.35555028915405273, -0.0390843041241169, -0.5577458739280701, 0.4874728322029114, 0.318836510181427, 0.6212401390075684, -0.25944197177886963, 0.2652888596057892, 0.29164785146713257, 0.8555871248245239, ...
def test _ create _ multiple _ alumno _ curso _ instituciones _ distinta _ con _ curso _ anio _ lectivo ( self, ) : self. client. force _ authenticate ( user = self. user _ admin ) alumno _ 1 = alumno. objects. get ( apellido = " 1 " ). pk alumno _ 2 = alumno. objects. get ( apellido = " 5 " ). pk curso _ 1 = curso. ob...
[ -0.07657314836978912, -0.308381587266922, 0.7835310101509094, -0.17243646085262299, 0.9206291437149048, 1.1814879179000854, -0.17942145466804504, -0.09020476788282394, -0.5269884467124939, 0.11870725452899933, -1.125785231590271, -0.12410072237253189, 0.9033761024475098, 0.1621880680322647...
def getfilelocationdp ( self, email, uid, shac ) : dir = os. path. join ( self. dps _ dir, self. _ getdir ( email ) ) if not os. path. isdir ( dir ) : os. makedirs ( dir, 0700 ) return os. path. join ( dir, shac. encode ( " hex " ) + ". img " )
[ 0.23686876893043518, 0.7806188464164734, 0.6303605437278748, -0.6172038316726685, 0.22648978233337402, 0.5802119374275208, 0.4272647202014923, 0.3914077877998352, 0.540462076663971, -0.4733654260635376, 1.7234320640563965, -0.14578159153461456, 0.4524155557155609, -0.6604235768318176, -0...
def datetime _ range ( timeframe _ from : int, timeframe _ to : int ) - > list [ datetime ] : today = datetime. now ( ). date ( ) from _ days _ ago = today - timedelta ( days = int ( timeframe _ from ) - 1 ) to _ days _ ago = today - timedelta ( days = int ( timeframe _ to ) ) from _ days _ ago _ datetime = datetime ( ...
[ -1.1720948219299316, 0.5875959992408752, 0.8618502020835876, -0.17213402688503265, 0.22171278297901154, -0.33905792236328125, -0.7176221013069153, 0.482133686542511, -0.6481784582138062, 1.0750683546066284, -0.30866384506225586, -0.30228134989738464, 0.5333152413368225, -0.0328641943633556...
def petit ( self ) : self. _ taille - = 0. 05
[ 1.399525761604309, -0.6029801368713379, 0.46097803115844727, -1.5671820640563965, 0.41061854362487793, 1.2465184926986694, 0.8659300804138184, -0.7255626916885376, -1.7033934593200684, -0.0027429498732089996, -0.956612229347229, 0.195016011595726, -0.9816926121711731, -0.052502356469631195...
def cleanup _ prefixed _ entries ( etcd _ client, prefix ) : try : assert etcd _ client. get ( prefix, recurse = true ) is none yield finally : etcd _ client. delete ( prefix, recursive = true )
[ 0.7610368132591248, 0.21236950159072876, 0.3267463743686676, -0.9148163795471191, -0.40413907170295715, -0.5098134279251099, -0.8351266384124756, -0.06573596596717834, 0.4048548936843872, -0.2628079950809479, 0.4289274513721466, 0.12016443908214569, 0.41012823581695557, 0.6642405390739441,...
def get _ pad _ size ( data : bytearray, block _ size : int ) - > int : if len ( data ) < block _ size : result = block _ size - len ( data ) elif len ( data ) % block _ size = = 0 : result = 0 else : result = block _ size - len ( data ) % block _ size return result
[ 0.6892118453979492, 0.16445526480674744, 0.8135775327682495, -0.2152651995420456, -0.4286002218723297, -0.2845000922679901, -0.26233482360839844, 0.07872119545936584, 0.334276407957077, -0.10022217035293579, 0.07167305052280426, 0.3491937518119812, -1.1695239543914795, 1.381126046180725, ...
def get _ incoming _ transfers ( self, transfer _ type = " all " ) : cmd = { " method " : " incoming _ transfers ", " params " : { " transfer _ type " : transfer _ type } } r = utils. curl ( cmd ) if r and " transfers " in r : tx _ list = r [ " transfers " ] for t in tx _ list : transfer = transfer ( * * t ) if transfe...
[ -0.5466303825378418, 0.06287034600973129, 0.7162991166114807, -0.2139902561903, 0.12802566587924957, 0.21075539290905, -0.8000009655952454, -0.715355634689331, 0.16789424419403076, 0.2974965274333954, -0.38573160767555237, 0.5896530747413635, -0.8772797584533691, 1.0848771333694458, 0.86...
def _ mgui _ get _ count ( self ) - > int : return len ( self. _ btn _ group. buttons ( ) )
[ -0.2517697215080261, 0.1895180493593216, 0.5917872786521912, -0.24248537421226501, -0.04371897503733635, 0.3325013518333435, 0.23482394218444824, -0.26054903864860535, -0.5145120620727539, -0.6403871774673462, -0.9851674437522888, 0.10028728097677231, -0.04287285730242729, 0.09721866250038...
def basc _ field _ result ( self, log, field _ name ) : # pylint : disable = too - many - branches agent = self. basc _ agent hostname = agent. bea _ host. sh _ hostname ret = 0 if field _ name = = barrele _ constant. barrele _ field _ host : result = hostname elif field _ name = = barrele _ constant. barrele _ field _...
[ -0.17725956439971924, -0.31437772512435913, 0.8136273622512817, -0.5402257442474365, 0.3458833396434784, 0.424900621175766, 0.57807856798172, -0.23109444975852966, -1.3246787786483765, 0.578154444694519, -0.014735626056790352, 0.38463523983955383, 0.043386731296777725, 0.4836649000644684, ...
def indent _ lines ( text : str ) - > str : lines = text. splitlines ( ) indented _ lines = [ f'{ line }'for line in lines ] return'\ n '. join ( indented _ lines )
[ 0.4491356313228607, -0.48343828320503235, 0.2611980140209198, -0.34834524989128113, -0.2021041065454483, 0.18178510665893555, -0.8908291459083557, 0.28707388043403625, -0.19390642642974854, 0.044979944825172424, 0.39915716648101807, -0.16943901777267456, -0.27988287806510925, -0.1958221793...
def create _ database ( self, db _ name ) : sql = " create database if not exists { } ". format ( db _ name ) self. exe _ sql ( sql )
[ 0.25615209341049194, 0.3771267533302307, 0.3010072112083435, 1.136574149131775, 0.896165132522583, 0.7522516250610352, -0.26889723539352417, -0.05294863507151604, -0.2435798943042755, -0.05383332446217537, -0.09213504940271378, -0.5689009428024292, -0.6184947490692139, 1.2171273231506348, ...
def _ check _ and _ create ( self, thumb _ url, img _ path, size, crop, bg, quality ) : if self. _ thumb _ exists ( thumb _ url ) is false : # get original image and transform to thumbail self. _ create _ thumb ( thumb _ url, img _ path, size, crop, bg, quality ) # store thumbnail and return url return
[ -0.6391230225563049, 0.17397911846637726, 0.5096855759620667, 0.3403557538986206, 0.5114648938179016, 0.04787714034318924, 0.35723528265953064, 0.31183260679244995, 0.6222327947616577, 0.20832675695419312, -0.07236599177122116, -0.6557992696762085, 0.3503256142139435, -0.18622341752052307,...
def evaluate _ policy ( mdp, policy, criterion ='discounted ', n _ episodes = 1, initial _ states = none, n _ threads = 1, mul _ env = false ) : # n _ days = 13 assert criterion = ='average'or criterion = ='discounted'from contextlib import contextmanager import time @ contextmanager def timed ( msg ) : print ( msg ) t...
[ 0.25175973773002625, 0.5157523155212402, 0.9853965640068054, -0.07493129372596741, 0.4532831013202667, 0.11781401187181473, 0.037674423307180405, 0.351270854473114, 0.2060120850801468, 0.7255260944366455, 0.674396276473999, 0.8045775294303894, -0.03425639867782593, 0.33133676648139954, -...
def subscriptions ( self ) - > pulumi. input [ sequence [ pulumi. input [ str ] ] ] : return pulumi. get ( self, " subscriptions " )
[ 0.21662943065166473, 0.2559185028076172, 0.42260852456092834, 0.829441249370575, 1.0439609289169312, 0.6298131942749023, 0.11395423859357834, -0.22266586124897003, 0.8189815282821655, 0.09828602522611618, -1.0525140762329102, 0.4788273274898529, 0.4212629795074463, -0.5972397327423096, -...
def least _ squares _ gd _ adapt _ step ( y, tx, initial _ w, max _ iters, gamma, computeloss = true ) : w = initial _ w grad = compute _ gradient ( y, tx, w ) for n _ iter in range ( max _ iters ) : w1 = w - gamma * grad grad1 = compute _ gradient ( y, tx, w1 ) gamma = ( ( grad - grad1 ). t. dot ( w - w1 ) ) / ( ( gra...
[ 0.15898765623569489, -0.1665303111076355, 0.7006595730781555, -0.7466878890991211, -1.15401291847229, -0.35442546010017395, 0.3126753568649292, -0.12633177638053894, -0.7240728735923767, 0.6341251134872437, 0.6129991412162781, 0.9233822226524353, 0.37196335196495056, 1.0476057529449463, ...
async def turn _ off ( self, device _ id : str, * * kwargs ) : await self. set _ value ( device _ id, 0, * * kwargs )
[ -0.6148611307144165, 0.650092363357544, 0.11588344722986221, 0.4973177909851074, 0.405023455619812, 0.347947895526886, -0.26011115312576294, 0.5129534602165222, -0.08067996799945831, -0.5095254778862, -0.21750383079051971, 1.3504222631454468, -0.6080005764961243, 0.5727589726448059, 0.26...
def prefix _ selector _ code ( self ) : for t in self. _ prefixed _ types ( ) : yield " if ( % s ( t ) ) \ n \ treturn % s _ prefix ; " % ( t. macro _ check ( ), t. name )
[ 0.12330525368452072, -0.6566137075424194, 0.3671085238456726, 0.026139283552765846, -0.06254701316356659, -0.44585058093070984, 0.2537340223789215, -0.44444161653518677, 0.10487668216228485, 0.2920438051223755, -0.040984947234392166, 0.5315231680870056, 0.3746700584888458, 0.90348422527313...
def flatten _ interface _ methods ( dat, i ) : yield from i. methods for i2 in flatten _ interfaces ( dat, i ) : yield from i2. methods
[ -0.6947138905525208, 0.6913338899612427, 0.3259572982788086, 0.477034330368042, -0.6616787910461426, -0.20799534022808075, 0.9849278330802917, -1.2596628665924072, -0.11737852543592453, -0.6941608786582947, -0.5801345705986023, -0.7118295431137085, -0.9268186688423157, 0.13996735215187073,...
def test _ delete _ alumno _ docente ( self ) : self. client. force _ authenticate ( user = self. user _ docente ) id _ alumno = alumno. objects. get ( dni = 2 ). id response = self. client. delete ( f " / api / alumnos / { id _ alumno } / " ) self. assertequal ( response. status _ code, status. http _ 403 _ forbidden ...
[ 0.7188017964363098, 0.8803055882453918, 0.5654414892196655, 0.6012365818023682, -0.10204561799764633, 1.0546430349349976, 0.18460075557231903, -0.1478007435798645, 0.5892230868339539, -0.21169470250606537, 0.07826393097639084, 0.9760150909423828, 1.419260025024414, -0.9686979055404663, 1...
def _ _ setattr _ _ ( self, * args, * * kwargs ) :...
[ -0.7688559889793396, -1.2221102714538574, 0.43634432554244995, -0.5254586935043335, -0.10783229023218155, -0.34830817580223083, 0.524644672870636, -0.7353217601776123, -0.39729100465774536, -0.028155608102679253, -0.44784271717071533, 0.6193311214447021, 0.6495472192764282, 0.5254507660865...