text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ positive _ region ( metadata, candidate _ angles ) : # choose a random voice voice _ keys = [ x for x in metadata if " voice " in x ] random _ key = random. choice ( voice _ keys ) voice _ pos = metadata [ random _ key ] [ " position " ] voice _ pos = np. array ( voice _ pos ) voice _ angle = np. arctan2 ( vo... | [
-0.529107391834259,
-1.1540682315826416,
0.6951979398727417,
-1.079293131828308,
-0.3021717369556427,
0.4076830744743347,
-0.8121607899665833,
-0.2137567102909088,
-0.136112779378891,
0.7708114981651306,
0.8848326206207275,
0.46817952394485474,
0.05836465582251549,
-0.8021668195724487,
0... |
def calclinearforce ( self ) : return self. calcforcedistribution ( ) | [
1.2762655019760132,
-0.750297486782074,
0.1462477445602417,
-0.028771042823791504,
0.5108089447021484,
0.04475681856274605,
-0.32796111702919006,
-0.23427435755729675,
0.4604299068450928,
-1.2198272943496704,
-0.0020729701500386,
-0.7876141667366028,
-0.9491685032844543,
0.3532203733921051... |
def callgpu ( self, gpuarray, globaltimestep ) : # uppyramid of swept step self. gfunction ( gpuarray, numpy. int32 ( globaltimestep ), self. start, grid = self. grid, block = self. blocksize ) | [
-0.7704819440841675,
0.6068278551101685,
0.5674999356269836,
0.9365987181663513,
0.025166453793644905,
0.680413007736206,
0.33505940437316895,
-0.5239629745483398,
-0.09397096931934357,
1.044255256652832,
0.22845959663391113,
0.7949946522712708,
-0.7938410043716431,
0.8851567506790161,
0... |
def unload _ level ( self, preserve : list = [ ] ) - > none : logger. info ( " engine : unloading current level " ) for sp in self. sprites : if sp not in preserve : sp. kill ( ) | [
-0.5887734889984131,
-0.7714515328407288,
0.47943970561027527,
-0.2798616290092468,
0.7748163938522339,
0.46834835410118103,
0.18321381509304047,
0.2215433120727539,
-0.8970118761062622,
0.8588497638702393,
-0.5036765336990356,
0.6282811760902405,
-0.9178677797317505,
0.26556405425071716,
... |
def merge _ cycle _ index _ mod _ p ( cycle _ index _ 1, cycle _ index _ 2, mod ) : cycle _ index _ 3 = { } for term1, c1 in cycle _ index _ 1 : for term2, c2 in cycle _ index _ 2 : term = { } for l1, e1 in term1 : for l2, e2 in term2 : g = gcd ( l1, l2 ) l = l1 * l2 / / g e = e1 * e2 * g if l in term : term [ l ] + = ... | [
-0.48137715458869934,
-0.23594088852405548,
0.8247643709182739,
-0.672306478023529,
-0.1863037496805191,
0.7096239328384399,
0.1719905287027359,
-0.5644763708114624,
-0.10464941710233688,
0.23882053792476654,
-0.17421843111515045,
0.7143411636352539,
-1.098990797996521,
-1.278631329536438,... |
async def listen _ for _ new _ files ( self, callback _ function = none, timeout = none ) : url = " { } { } : { } / ws / files / new / current _ operation ". format ( self. _ ws, self. _ server _ ip, self. _ server _ port ) if callback _ function : task = await self. stream _ output ( url, callback _ function, timeout ... | [
0.21259593963623047,
0.0352630615234375,
0.627465546131134,
0.10763577371835709,
-0.44675412774086,
-0.7430450916290283,
0.6116818189620972,
-0.036938589066267014,
-0.6500104665756226,
-0.029773741960525513,
0.18626675009727478,
0.33929774165153503,
-0.4008703827857971,
0.7594892382621765,... |
def linked _ transaction ( self, linked _ transaction ) : self. _ linked _ transaction = linked _ transaction | [
0.6758358478546143,
-0.9631832242012024,
-0.09417995810508728,
0.13103531301021576,
0.11478812992572784,
0.9956992864608765,
-0.2857653498649597,
0.17405065894126892,
0.2501054108142853,
-0.7064104080200195,
-1.0826524496078491,
-0.5682433843612671,
-0.20413880050182343,
-0.208344683051109... |
def test _ us _ gdp _ presidents ( ) : test _ path = tempfile. mkdtemp ( ) x _ train, metadata = us _ gdp _ presidents ( test _ path ) try : assert x _ train. shape = = ( 259, 12 ) except : shutil. rmtree ( test _ path ) raise ( ) | [
0.1726386547088623,
1.1242270469665527,
0.4110383689403534,
0.0734248012304306,
0.5487098097801208,
1.3542354106903076,
0.41177570819854736,
0.1930801123380661,
0.14675527811050415,
-0.12854191660881042,
-0.8759397268295288,
-0.12580634653568268,
-0.06817600131034851,
-0.7437065243721008,
... |
def test _ comoving _ vol _ to _ uniform ( comoving _ vol _ converter ) : d = 1000 grid = mock ( ) comoving _ vol _ converter. interp _ dl2dc = grid comoving _ vol _ converter. scale = 100 with patch ( " nessai. gw. utils. interpolate. splev ", return _ value = 200 ) as interp _ mock : du, lj = comovingdistanceconverte... | [
-0.593826413154602,
0.09743063151836395,
0.6048301458358765,
-0.3993116617202759,
0.759833037853241,
0.34412574768066406,
-0.10898175835609436,
0.3927842080593109,
0.8817228674888611,
0.3612300157546997,
-0.7479040622711182,
0.12835805118083954,
0.19541102647781372,
0.3504819869995117,
0... |
def verify ( self, item _ check _ callable = none, receiver _ email = none ) : self. response = self. _ postback ( ) self. _ verify _ postback ( ) if not self. flag : if self. is _ transaction ( ) : if self. payment _ status not in self. payment _ status _ choices : self. set _ flag ( " invalid payment _ status. ( % s ... | [
0.175137460231781,
0.15907920897006989,
0.5095903873443604,
0.6168230175971985,
0.7334461212158203,
-0.5610465407371521,
0.5169930458068848,
0.15983420610427856,
0.4804394245147705,
-0.591532826423645,
-0.47734692692756653,
0.13628950715065002,
-0.6280408501625061,
-0.33014920353889465,
... |
def _ adjust _ ownership ( self, owner : str, change : int ) : if owner! = self. owner : self. ownership _ level - = change else : self. ownership _ level + = change if self. ownership _ level < 0 : self. owner = owner | [
-0.5808940529823303,
-0.0999293252825737,
0.5348340272903442,
0.8704471588134766,
-0.4020470678806305,
0.4607708156108856,
0.009600750170648098,
-0.34204384684562683,
0.1212553083896637,
-0.854677677154541,
0.7293786406517029,
0.41855016350746155,
-0.13671047985553741,
0.3114067018032074,
... |
def loss _ fn ( logits, ytokens, yweights ) : eps = 0. 0000000001 # used to not divide on zero # todo : # print ( logits. shape ) _, _, v _ size = logits. shape # * yweights. view ( - 1 ) [ :, none ] # * yweights. long ( ). view ( - 1 ) sumloss = torch. sum ( f. cross _ entropy ( input = logits. view ( - 1, v _ size ),... | [
-0.4070047438144684,
-0.3597707748413086,
0.5673648118972778,
-1.1255818605422974,
0.05875515192747116,
-0.6173705458641052,
0.2353377491235733,
0.43086621165275574,
0.11083516478538513,
0.15037542581558228,
-0.23652499914169312,
0.26544225215911865,
0.7942800521850586,
-0.0422320961952209... |
def getloginurl ( self ) : url = _ orig _ getloginurl ( self ) if url : url = url. replace ('/ zport / acl _ users ', getcseconf ( ). get ('virtualroot ','' ) +'/ zport / acl _ users') return url | [
0.6593142151832581,
-0.27630069851875305,
0.45102956891059875,
1.0926896333694458,
-0.6349238753318787,
0.29214003682136536,
0.5490557551383972,
0.7450556755065918,
0.568458080291748,
0.1204957515001297,
0.4359530806541443,
0.8371159434318542,
-0.1922418475151062,
-0.5044389963150024,
0.... |
def update _ x ( x, bound _ delete = bound _ delete, bound _ change = bound _ change ) : ind _ delete, ind _ change = clean _ data ( x, bound _ delete, bound _ change ) # [ 0, 4, 5, 6, 23, 26 ], [ 12, 24, 25, 27, 28 ] x = update _ outliers ( x, [ 0, 4, 5, 6, 23, 26 ], [ 12, 24, 25, 27, 28 ] ) # x = np. delete ( x, ind ... | [
-0.505842924118042,
-0.921108603477478,
0.6257035732269287,
-0.20092129707336426,
-0.4753708839416504,
0.6285507678985596,
-0.583416223526001,
0.26996639370918274,
0.4798109531402588,
0.3852701187133789,
0.04914392530918121,
1.7733124494552612,
-0.12793682515621185,
-0.8192124366760254,
... |
def _ pan _ cb ( self, settings, pan _ pos ) : # check to avoid circular callback situation if not ( self. _ panning _ x or self. _ scaling _ x or self. _ scaling _ y or self. _ adjusting ) : self. adjust _ view ( ) | [
0.09312834590673447,
-0.09565453231334686,
0.510511577129364,
-0.06613291800022125,
-0.7036468386650085,
-0.12434404343366623,
0.4725792109966278,
-0.6656821370124817,
0.4435882568359375,
0.12356697767972946,
0.5575726628303528,
-0.33518514037132263,
-0.4872339367866516,
0.4795031249523163... |
def standard _ deviation ( list ) : return variance ( list ) * *. 5 | [
0.5310564637184143,
-0.3555176556110382,
0.13895288109779358,
0.674734890460968,
-0.5394061803817749,
0.6389636993408203,
0.24527870118618011,
0.19747577607631683,
0.9063621759414673,
0.10318458825349808,
-1.7828761339187622,
0.14997778832912445,
-0.6659679412841797,
1.1895848512649536,
... |
def ask _ average _ inflation ( supers, products, prices ) : enter _ loop = true while enter _ loop : try : start = ask _ and _ convert ( prices, start ) end = ask _ and _ convert ( prices, end ) print ('\ ninflacion general promedio : { :. 2f } % '. format ( get _ average _ inflation ( start, end, products, prices, su... | [
-0.6649630665779114,
0.3160555362701416,
0.5191192626953125,
0.9027134776115417,
-0.3544514775276184,
0.8763178586959839,
0.6041764616966248,
-0.727344810962677,
-0.9613256454467773,
0.7045356035232544,
0.5119073987007141,
1.617539644241333,
-0.9082128405570984,
-0.3724577724933624,
0.88... |
def fit ( self, x : np. array, t : np. array, y : np. array, weights : optional [ np. array ] = none, ) - > none : assert ( t is not none and y is not none ), " treatment and factual outcomes are required to fit causal forest " if weights is not none : assert len ( weights ) = = len ( t ), " weights must match the numb... | [
0.6928495764732361,
-1.0450698137283325,
0.4990098774433136,
0.24862928688526154,
0.3096333146095276,
-0.012242212891578674,
-0.45959094166755676,
0.551292359828949,
-1.596253752708435,
-0.2465166598558426,
-0.0154851283878088,
0.5193938612937927,
0.3611316978931427,
0.7384799122810364,
... |
def find _ all ( a _ str, sub ) : start = 0 while true : start = a _ str. find ( sub, start ) if start = = - 1 : return yield start start + = 1 | [
0.6420366168022156,
-0.28364020586013794,
0.7388498783111572,
0.49407586455345154,
-0.6179677844047546,
-0.08747606724500656,
-0.18344365060329437,
-0.3798646628856659,
-0.48442110419273376,
-0.14737290143966675,
0.4709860682487488,
0.7313985228538513,
-0.23897860944271088,
0.0248906295746... |
def _ _ init _ _ ( self, level : int, colour : optional [ tuple [ int, int, int ] ] = none, children : optional [ list ['block'] ] = none ) - > none : self. position = ( 0, 0 ) self. size = 0 self. level = level self. max _ depth = 0 self. highlighted = false self. parent = none # attributes that depend on whether or n... | [
-0.0756186842918396,
0.13897381722927094,
0.7113290429115295,
-0.09435370564460754,
-0.10464060306549072,
-0.09061592817306519,
0.44669458270072937,
0.23304957151412964,
-0.3482009470462799,
-0.667253851890564,
-0.8676699995994568,
-0.25200027227401733,
-0.41680780053138733,
1.125880599021... |
def setup ( self, led _ mode = 0x03 ) : # intr setting # 0xc0 : a _ full _ en and ppg _ rdy _ en = interrupt will be triggered when # fifo almost full & new fifo data ready self. bus. write _ i2c _ block _ data ( self. address, reg _ intr _ enable _ 1, [ 0xc0 ] ) self. bus. write _ i2c _ block _ data ( self. address, r... | [
-0.2195948213338852,
-0.19755467772483826,
0.7738609313964844,
-0.09316497296094894,
0.2661161422729492,
-0.1284179538488388,
1.1432766914367676,
0.6024608016014099,
0.23816312849521637,
0.18699291348457336,
-0.4556792378425598,
0.1481972336769104,
-0.6464739441871643,
0.9098937511444092,
... |
def fmri _ qc ( fpath, qchtml, cur ) : # if the number of trs is too little, we skip the pipeline ntrs = check _ n _ trs ( fpath ) if ntrs < 20 : qchtml. write ( " < p > this is a truncated scan. number of trs : { } < / p > ". format ( ntrs ) ) return qchtml # # check the header add _ headercompare _ note ( headerlog, ... | [
1.1722967624664307,
0.08824926614761353,
0.7661553025245667,
0.4466831088066101,
-0.7644939422607422,
-0.1772099733352661,
0.7517940402030945,
-0.6565770506858826,
0.056891489773988724,
-0.2772717773914337,
0.6322730779647827,
-0.4652305245399475,
-0.14643548429012299,
0.17275208234786987,... |
def print _ graphs ( curr _ doc : currentdoc, functions, x, l _ list, knot _ list ) : out _ vis. plot _ output _ functions ( curr _ doc, functions, knot _ list, x, l _ list ) | [
0.19361276924610138,
-0.10680804401636124,
0.20394974946975708,
0.27365967631340027,
-0.7770804166793823,
-0.0046519129537045956,
0.5101107954978943,
0.24206174910068512,
-0.17025086283683777,
0.006649719551205635,
-0.039555858820676804,
1.7438679933547974,
-0.5318945050239563,
0.068757928... |
def _ merge _ with _ binary _ search ( list _ 1, list _ 2, output _ size ) : merged _ list = [ none ] * output _ size for i in range ( len ( list _ 1 ) ) : # binary search rank _ 2 = bisect. bisect _ left ( list _ 2, list _ 1 [ i ] ) merged _ list [ i + rank _ 2 ] = list _ 1 [ i ] # probably this is not ok to have loop... | [
-0.29588258266448975,
-0.3763882517814636,
0.8045927286148071,
0.5887094736099243,
0.18458488583564758,
-0.7614012956619263,
-0.7847252488136292,
-0.16133220493793488,
-0.32613804936408997,
0.47912490367889404,
-0.8902627825737,
0.5493999123573303,
-0.874771773815155,
0.9839295148849487,
... |
def uniquevaluesforcourseavailability ( self ) : portal _ catalog = gettoolbyname ( self,'portal _ catalog') course _ availability = portal _ catalog. uniquevaluesfor ( " getcourseavailability " ) return course _ availability | [
-0.6281572580337524,
-1.4113950729370117,
0.3936634957790375,
-0.3337554335594177,
0.7138671875,
1.0515005588531494,
0.16504642367362976,
0.3506930470466614,
0.07838164269924164,
0.7356932163238525,
-0.4357582926750183,
0.30416616797447205,
1.122511386871338,
-0.2845773696899414,
-0.1436... |
def _ _ call _ _ ( self, * * inputs ) : return self. trigger ( * * inputs ) | [
-0.622169554233551,
-0.1976318359375,
0.22089646756649017,
0.3962123990058899,
0.3138699233531952,
-0.24328909814357758,
-0.5148412585258484,
0.07463598996400833,
-0.6814541816711426,
-1.1979042291641235,
-0.41128242015838623,
-0.12797346711158752,
-0.5499067902565002,
-0.6456165909767151,... |
def refine _ nom _ gr ( nominal _ group ) : idx = len ( nominal _ group ) - 1 # case of the end of the sentence if nominal _ group [ idx ] in [ '? ', '! ', '.'] : return nominal _ group [ : idx ] # case of after we have a indirect complement if nominal _ group [ idx ] in resourcepool ( ). proposals : return nominal _ g... | [
0.18138639628887177,
0.27397680282592773,
0.43657952547073364,
-0.52107173204422,
-1.0392305850982666,
-0.28808292746543884,
-0.6093485951423645,
-1.3563339710235596,
-0.39650779962539673,
0.9632652401924133,
1.1957671642303467,
0.5838186144828796,
-1.1963924169540405,
0.8061073422431946,
... |
def rendercontentandpage ( handler, pathtocontent, contentfilename, contenttemplatevalues, pagetemplatevalues ) : # render the content with its template values content = getrenderedtemplate ( pathtocontent, contentfilename, contenttemplatevalues ) # render the page with its template values pagetemplatevalues ['content'... | [
-0.26699748635292053,
-0.7036372423171997,
0.2831169068813324,
-0.4929344058036804,
-0.011181873269379139,
0.3452642560005188,
0.14458833634853363,
0.890683114528656,
-1.069830060005188,
0.010321208275854588,
0.06949222832918167,
-0.7764014005661011,
-0.04416055232286453,
0.202386364340782... |
def initlogger ( levelname ='info') : format ='% ( name ) s % ( levelname ) - 5s % ( message ) s'logging. basicconfig ( format = format ) logger = logging. getlogger ('profile') logger. addhandler ( logging. nullhandler ( ) ) logger. setlevel ( logging. getlevelname ( levelname ) ) logging. getlogger ('elasticsearch').... | [
-0.05888153240084648,
-0.6558544635772705,
0.7464531660079956,
0.07035349309444427,
0.15496553480625153,
0.05843125283718109,
-0.5079354643821716,
-0.46377065777778625,
-0.378166139125824,
-0.23921361565589905,
-0.7095122337341309,
0.08738594502210617,
-0.575577974319458,
1.050149440765380... |
def profile ( user _ id ) : # show all past saves from that current user. past _ saves = result. query. filter _ by ( user _ id = user _ id ). all ( ) return render _ template ( " user. html ", saved _ mixes = past _ saves ) | [
0.6373503804206848,
0.6093220114707947,
0.35470157861709595,
0.6849398016929626,
0.0024592524860054255,
-0.44698163866996765,
0.917938232421875,
-0.11397843062877655,
0.19315873086452484,
-0.13448044657707214,
-0.5748024582862854,
-0.5448994040489197,
0.5978503823280334,
0.7768139243125916... |
def test _ get _ arrangement _ before _ creation ( self ) : # creating an order for testing created _ order = self. create _ test _ order ( " will " ) url = reverse ( " lastrites : arrangements - lastrites ", kwargs = { " order _ pk " : created _ order. id } ) r = self. client. get ( url, authorization = f " bearer { s... | [
-0.19600121676921844,
0.30855345726013184,
0.6899654865264893,
-0.3620421290397644,
0.9262710213661194,
-0.073384590446949,
0.29175907373428345,
-0.8930145502090454,
0.20147542655467987,
-0.27586275339126587,
0.11066629737615585,
0.3825075030326843,
0.48398149013519287,
0.49545958638191223... |
def process ( self, file _ path, x _ index, y _ index, z _ index, t _ index = none ) : return open ( file _ path,'rb') | [
0.6332790851593018,
-0.5831952095031738,
0.43621590733528137,
-0.6824727058410645,
0.46796533465385437,
0.02139231562614441,
0.689568281173706,
0.09736175835132599,
-1.162876009941101,
0.11946845799684525,
0.5288816690444946,
-0.025708027184009552,
0.1727043241262436,
-1.9648947715759277,
... |
def _ model _ to _ dict ( obj ) : result = _ properties _ model _ to _ dict ( obj. properties ) for attribute in ( " metadata ", " snapshot " ) : try : value = getattr ( obj, attribute ) except attributeerror : continue if value : result [ attribute ] = value return result | [
-0.8308107852935791,
-0.5385034084320068,
0.3301692008972168,
-0.7333929538726807,
-1.304621696472168,
-0.3598015606403351,
-0.11434878408908844,
-0.23026537895202637,
-0.31735360622406006,
-0.021953225135803223,
-0.966389000415802,
-0.5151088833808899,
1.3807001113891602,
-0.0411063022911... |
def respond ( self ) : response = self. req. server. wsgi _ app ( self. env, self. start _ response ) try : for chunk in filter ( none, response ) : if not isinstance ( chunk, bytes ) : raise valueerror ('wsgi applications must yield bytes') self. write ( chunk ) finally : # send headers if not already sent self. req. ... | [
-0.5329826474189758,
-0.8984605073928833,
0.6189637780189514,
0.474250465631485,
0.3349491059780121,
0.2435985952615738,
0.8773128986358643,
-0.9346925020217896,
-0.045674052089452744,
0.22302725911140442,
0.35647523403167725,
-0.2630225419998169,
-1.080697774887085,
0.48441120982170105,
... |
def player _ page ( self, content, profile _ id ) : soup = beautifulsoup ( content, " lxml " ) player = { " status " : " active " } # gsis id and esb id are buried in the comments for c in soup. find _ all ( string = lambda text : isinstance ( text, comment ) ) : if " gsis " in c : parts = [ part. strip ( ) for part in... | [
0.24185067415237427,
-0.6391918659210205,
0.9820643067359924,
-0.7190209627151489,
-0.22160303592681885,
-0.6741249561309814,
0.06143650412559509,
-1.2097651958465576,
-0.14547733962535858,
0.5317683219909668,
-0.5018179416656494,
-0.600470781326294,
-0.2580559253692627,
-0.060748793184757... |
def aggregate _ get ( context, aggregate _ id ) : return impl. aggregate _ get ( context, aggregate _ id ) | [
0.058681026101112366,
0.2863796055316925,
0.30876028537750244,
-0.3220786452293396,
0.7337127327919006,
-1.4943299293518066,
-0.6149155497550964,
-1.083174467086792,
-0.4135236144065857,
0.1575552523136139,
1.2622220516204834,
0.9927091598510742,
-0.09068283438682556,
-0.2670632600784302,
... |
def test _ event _ before _ append ( self ) : html _ code = f " " " < html > < head > < / head > < body > < script > var btn = document. createelement ( " button " ) ; btn. onclick = " { self. event _ code } " ; btn. setattribute ( " { reachable _ att _ name } ", true ) ; document. body. appendchild ( btn ) ; < / scrip... | [
0.41676416993141174,
0.7764273881912231,
0.985823929309845,
0.013752822764217854,
-0.10822807252407074,
-0.05040920153260231,
-0.03636637330055237,
0.05960823968052864,
0.7201975584030151,
-0.1652681827545166,
-0.33003297448158264,
-0.022607846185564995,
0.5344393253326416,
0.9665222167968... |
def plot _ tweets _ by _ class ( self, cinema _ run = false ) : # get tweets and group them by sentiment tweets = self. get _ geotweets _ by _ dates ( ) if cinema _ run else database _ helper. select _ geo _ tweets ( self. movieid ) class _ freq = tweets. groupby ('senti _ class'). size ( ). reset _ index ( name ='coun... | [
0.04708652198314667,
0.2186942994594574,
0.5148580074310303,
-0.6329384446144104,
-0.0618678517639637,
0.5451089143753052,
0.8880782127380371,
0.015199252404272556,
-0.8311038613319397,
0.6202171444892883,
0.7386162281036377,
0.7727442979812622,
-0.04758536443114281,
0.9347561001777649,
... |
def log ( self, txt, dt = none, force = false ) : if self. params. verbose or force : dt = dt or self. datas [ 0 ]. datetime. date ( 0 ) print ('% s, % s'% ( dt. isoformat ( ), txt ) ) | [
-0.10299248993396759,
0.4331551194190979,
0.8040380477905273,
0.050519008189439774,
0.09922125190496445,
0.9038546085357666,
-1.2126845121383667,
-0.018467988818883896,
-0.6851819753646851,
0.35339856147766113,
0.47981005907058716,
1.2898871898651123,
-0.05568932741880417,
0.40244072675704... |
def kadmin _ factory ( self, principal ) : realm = kadmin. guess _ realm ( principal ) try : # instantantiate proper kadmin class with config return globals ( ) [ self. config [ " realm " ] [ realm ] [ " type " ] ] ( \ realm, self. config [ " realm " ] [ realm ] [ " keytab " ], self. config [ " realm " ] [ realm ] [ " ... | [
-0.4819349944591522,
-0.5732511878013611,
0.49807238578796387,
0.07711953669786453,
-1.1616765260696411,
0.9132600426673889,
-0.5536032319068909,
-0.9948764443397522,
0.04299889877438545,
0.3741486966609955,
-0.03282247483730316,
0.48084554076194763,
-0.5426559448242188,
0.3663856089115143... |
def testexpireddatadiscardedafterrestartforfileversionlessthan2 ( self ) : warnings = [ ] self. stubs. set ( logger, " warning ", warnings. append ) gen = _ eventgenerator ( self ) acc = self. _ make _ accumulator ( gen ) gen. addevent ( event _ pb2. event ( wall _ time = 0, step = 0, file _ version = " brain. event : ... | [
0.7759535908699036,
-0.37301570177078247,
0.7049098014831543,
0.050745222717523575,
-0.26243460178375244,
0.7449207901954651,
0.14847548305988312,
0.022121015936136246,
-0.5109817981719971,
-0.1276320219039917,
-0.8442881107330322,
0.24525171518325806,
0.4396013915538788,
0.406805247068405... |
def _ _ init _ _ ( self, tm, start = none, inputs = none, goto = none, outputs = none, directions = none ) : # our turing machine self. tm = tm # state machine is in before transition self. start _ state = start # symbol on each tape under read / write head in tape order self. inputs = inputs # state machine goes to se... | [
-0.20556852221488953,
-0.2644338607788086,
0.5486809611320496,
-0.2179795205593109,
-0.2663925290107727,
-0.37230560183525085,
0.14657795429229736,
0.4105282425880432,
-0.10163675993680954,
0.151381716132164,
-0.8137112259864807,
-0.354229211807251,
0.5744930505752563,
0.16577988862991333,... |
def import _ prior _ pb _ winners _ csv ( ) - > pd. dataframe : pb _ df = pd. read _ csv ( pb _ prior _ winners _ data _ path, header = none ) return pb _ df | [
-0.05734150484204292,
0.06199733912944794,
0.4787445664405823,
0.910060465335846,
-0.39567530155181885,
1.5123000144958496,
0.9430117607116699,
-0.1146315485239029,
0.5286353826522827,
-0.5364266037940979,
0.4017089903354645,
1.0241087675094604,
-1.0186529159545898,
-1.1539380550384521,
... |
def _ _ str _ _ ( self ) - > str : output = " " output + = " device name : " + self. dev _ name + " \ n " for reg in self. registers : output + = str ( reg ) + " \ n " return output | [
-0.1317334622144699,
-0.5588614344596863,
0.6466752290725708,
-0.4357183575630188,
-0.40075385570526123,
0.33877652883529663,
0.06452170014381409,
-0.6096060276031494,
-0.21792636811733246,
-0.6858265995979309,
0.44342079758644104,
0.3503063917160034,
-0.03706718236207962,
0.46963626146316... |
def main ( ) : argument _ parser = argparse. argumentparser ( description = ('extracts windows event log providers from the windows registry.') ) argument _ parser. add _ argument ('- d ','- - debug ', dest ='debug ', action ='store _ true ', default = false, help ='enable debug output.') argument _ parser. add _ argum... | [
0.1283150315284729,
0.4139358699321747,
0.8643749952316284,
0.27860796451568604,
0.06965098530054092,
-0.49449270963668823,
0.0023982604034245014,
0.461852490901947,
-0.3278071880340576,
0.3453689217567444,
-0.17632991075515747,
-0.05490861088037491,
-0.019322780892252922,
0.05805377662181... |
def version _ schema ( script _ location : str ) : # add it to alembic table alembic _ cfg = alembicconfig ( configuration. alembix _ ini ) alembic _ cfg. set _ main _ option ( " script _ location ", script _ location ) alembic _ command. stamp ( alembic _ cfg, " head " ) | [
0.11485446244478226,
-0.7389835715293884,
0.5808972716331482,
0.3466775417327881,
0.9822419285774231,
0.22695216536521912,
-0.003313116729259491,
1.1095679998397827,
-0.180356964468956,
1.4687398672103882,
-0.6638172268867493,
0.5398935079574585,
0.046784862875938416,
-0.7007375955581665,
... |
def _ sparseupdate ( variable, gradients, accum, linear, base _ lr, lr _ power, l1, l2 ) : assert isinstance ( gradients, ops. indexedslices ) with ops. name _ scope ( " sparse _ update _ " + variable. op. name ) as scope : dtype = variable. dtype. base _ dtype base _ lr = ops. convert _ to _ tensor ( base _ lr, dtype ... | [
0.7587337493896484,
-0.8654199838638306,
0.7527804374694824,
0.011785006150603294,
-0.9960230588912964,
-0.2772294580936432,
-0.01300490740686655,
0.14511866867542267,
0.4507529139518738,
0.693334698677063,
0.03350451588630676,
0.8215110898017883,
0.28000128269195557,
-0.8069442510604858,
... |
def lineformat ( text ) : ( mac, ns, msg ) = text. split ( " ", 2 ) if not msg or " " in msg : raise valueerror if len ( mac )! = 12 : raise valueerror if not mac = = " cc50e35d6a90 " : logging. info ( " received msg from foreign mac " ) raise valueerror line = " { }, mac = { } { } { } ". format ( flux _ measure, mac, ... | [
1.4813765287399292,
-0.21837633848190308,
0.39992472529411316,
-0.29809027910232544,
0.11102011799812317,
-0.10990489274263382,
-0.35330310463905334,
-0.34733957052230835,
-0.03136785700917244,
-0.6766539812088013,
0.6460852026939392,
0.276413232088089,
-0.9316640496253967,
1.2903414964675... |
def welcome ( ) : return ( f " available routes : < br / > " f " / api / v1. 0 / precipitation < br / > " f " / api / v1. 0 / stations < br / > " f " / api / v1. 0 / tobs < br / > " f " / api / v1. 0 / & lt ; start & gt ; < br / > " f " / api / v1. 0 / & lt ; start & gt / & lt ; end & gt " ) | [
-0.20988883078098297,
-0.6695683002471924,
0.704231321811676,
-0.9030923843383789,
0.024972228333353996,
-0.11163153499364853,
-1.4222520589828491,
0.2966160774230957,
-0.5607560276985168,
0.9056562781333923,
-0.20727132260799408,
0.6352009773254395,
0.05554354190826416,
0.3939112424850464... |
def find _ hypothetical _ pairs ( dist _ vec, distances, prop _ constant, cut _ off ) : hypothetical _ pair = { } index _ list = np. asarray ( np. where ( distances ['timestep _ 0'] < cut _ off ) ) hypothetical _ pair [ 0 ] = np. take ( dist _ vec ['timestep _ 0'], index _ list, axis = 0 ) initial _ distribution = hypo... | [
-0.4653134346008301,
-0.03133928030729294,
0.7065519690513611,
-0.36578604578971863,
-0.8400658369064331,
0.18313679099082947,
0.19747832417488098,
1.2962920665740967,
-0.8029152154922485,
0.6940717101097107,
0.04815474525094032,
-0.4736386239528656,
-0.04674392193555832,
0.934602141380310... |
def _ update _ primary _ header ( self, primary _ header ) : # adding cutout specific headers primary _ header ['creator'] = ('astrocut ','software used to produce this file') primary _ header ['procver'] = ( _ _ version _ _,'software version') primary _ header ['ffi _ type'] = ( self. product,'the ffi type used to mak... | [
-0.042868416756391525,
-0.934986412525177,
0.42809078097343445,
-0.7960615754127502,
-0.16310538351535797,
-0.35599783062934875,
-0.433283269405365,
-0.13218536972999573,
-0.31512174010276794,
0.2641158103942871,
0.12271241843700409,
0.07312186807394028,
-0.03265928477048874,
0.76876896619... |
def emptycopied ( self, * args ) : return _ topods. topods _ shape _ emptycopied ( self, * args ) | [
-0.7579287886619568,
-0.152325838804245,
0.6145080327987671,
0.0709778293967247,
-0.01904400996863842,
1.3084248304367065,
0.7488083839416504,
-1.0390739440917969,
0.15385138988494873,
0.05879414454102516,
-0.49620896577835083,
0.4407673180103302,
-0.3996637463569641,
-0.6502599716186523,
... |
def createreport ( tb, comment ='', filecontent ='' ) : userhash = create _ hash ( ) osname = os. name tb = cleantb ( tb ) j = json. dumps ( {'userhash': userhash,'os': osname,'tb': tb,'comment': comment,'file': filecontent } ) mhash = hashlib. md5 ( j ). hexdigest ( ) return'{ } * * * { } '. format ( j, mhash ) | [
0.8749706149101257,
-0.1797865927219391,
0.47761547565460205,
-0.0854475125670433,
-0.09089497476816177,
0.4877287447452545,
0.230948343873024,
-0.25549212098121643,
-1.3345036506652832,
0.3588869273662567,
-0.2163921594619751,
-0.5491177439689636,
-0.5755772590637207,
-0.30954423546791077... |
def lane _ type ( lane _ attributes : object ) - > str : type _ lane = none try : type _ lane _ text = lane _ attributes. find ('vehicle'). text type _ lane ='vehicle'except : try : type _ lane _ text = lane _ attributes. find ('bikelane'). text type _ lane ='bikelane'except : try : type _ lane _ text = lane _ attribut... | [
0.11280141770839691,
-0.8561475872993469,
0.6001145839691162,
-0.7891433238983154,
0.972055971622467,
0.0046660094521939754,
-0.1957893967628479,
0.11729847639799118,
0.026600487530231476,
1.0649491548538208,
0.8202272057533264,
-0.35120993852615356,
-0.4202703535556793,
0.1726627498865127... |
def put _ link ( self, resource, params ) : self. _ check _ endpoint _ params ('put - link ', params ) return self. _ request ('put ','links / % d'% resource, params ) | [
-1.3360649347305298,
0.15351876616477966,
0.16805800795555115,
-0.26357603073120117,
1.1169109344482422,
0.3382466733455658,
0.10300979763269424,
0.04662695527076721,
-0.3454093337059021,
-0.1364779770374298,
-0.4135040044784546,
0.8558756113052368,
-1.1684985160827637,
-0.6306864023208618... |
def ranking _ key ( chain ) : bp _ nt = 0. 0 if chain ['bp'] : bp _ nt = float ( chain ['bp'] ) / float ( chain ['length'] ) name = list ( ord ( c ) for c in chain ['name'] ) return ( - 1 * bp _ nt, - 1 * chain ['length'], name ) | [
-0.6137281060218811,
-0.25166046619415283,
0.4001094102859497,
-1.0960264205932617,
0.5505778789520264,
-0.42957523465156555,
-0.8806535601615906,
-0.9024664163589478,
-1.1427134275436401,
1.2854424715042114,
-0.8637776970863342,
0.8489741683006287,
-1.0663434267044067,
0.19132941961288452... |
def get _ callback _ url ( self ) : return url _ for ('oauth. callback ', provider = self. name, _ external = true ) | [
0.18445545434951782,
0.6908621191978455,
0.5472159385681152,
0.35178524255752563,
0.2723406255245209,
0.4590426981449127,
0.007022886071354151,
0.7159611582756042,
0.7438533306121826,
0.15386497974395752,
0.6785955429077148,
0.5248534083366394,
0.22834710776805878,
0.3376758098602295,
0.... |
def credential _ type ( self ) : return self. _ tower. get _ credential _ type _ by _ id ( self. _ data. get ('credential _ type') ) | [
0.6758789420127869,
0.405452698469162,
0.11607014387845993,
0.8661201596260071,
1.2603719234466553,
0.020642494782805443,
0.13931025564670563,
0.02015267126262188,
0.7876438498497009,
-0.18820758163928986,
-0.12429321557283401,
0.887447714805603,
-0.4600414037704468,
0.32647016644477844,
... |
def anntomask ( self, ann, height, width ) : rle = self. anntorle ( ann, height, width ) m = maskutils. decode ( rle ) return m | [
-0.18036171793937683,
-0.3404368460178375,
0.21944645047187805,
0.5045903921127319,
-0.6379066109657288,
-0.4279899597167969,
0.3051460087299347,
-0.9341011643409729,
0.883305013179779,
0.2726621627807617,
-0.7567249536514282,
0.21091671288013458,
0.6092371344566345,
-0.5398260354995728,
... |
def test _ mac _ vendor _ lookup _ on _ see ( self ) : mac ='b8 : 27 : eb : 00 : 00 : 00'vendor _ string ='raspberry pi foundation'tracker = device _ tracker. devicetracker ( self. hass, timedelta ( seconds = 60 ), 0, [ ] ) with mock _ aiohttp _ client ( ) as aioclient _ mock : aioclient _ mock. get ('http : / / api. m... | [
-0.17955051362514496,
0.14894752204418182,
0.4745098054409027,
-0.2635931372642517,
0.1425938755273819,
0.04993574321269989,
0.044587451964616776,
-0.1022019237279892,
0.22438926994800568,
0.08530807495117188,
0.18071794509887695,
0.4484104812145233,
0.2341574877500534,
0.36792460083961487... |
def plot _ confusion _ matrix ( cm, classes, normalize = false, title ='confusion matrix ', cmap = plt. cm. blues ) : if normalize : cm = cm. astype ('float') / cm. sum ( axis = 1 ) [ :, np. newaxis ] print ( " normalized confusion matrix " ) else : print ('confusion matrix') print ( cm ) plt. imshow ( cm, interpolatio... | [
0.043393805623054504,
0.25680452585220337,
0.6342864036560059,
0.015020681545138359,
-0.8140704035758972,
0.028542006388306618,
1.0983643531799316,
0.0709666907787323,
0.4009785056114197,
0.37765732407569885,
1.0538948774337769,
0.5204721689224243,
-0.16686095297336578,
0.12210292369127274... |
def user _ stories _ gql ( self, user _ ids : list [ int ] = none ) - > list [ storyqueue ] : self. public. cookies. update ( self. private. cookies ) def _ userid _ chunks ( ) : assert user _ ids is not none user _ ids _ per _ query = 50 for i in range ( 0, len ( user _ ids ), user _ ids _ per _ query ) : yield user _... | [
0.13443192839622498,
-0.35826173424720764,
0.4436897337436676,
0.7831153273582458,
-0.21397969126701355,
-0.09895262122154236,
0.36772584915161133,
-0.8435127139091492,
-0.4948168396949768,
0.06414291262626648,
0.03499605134129524,
0.3161209225654602,
0.062489286065101624,
0.35358810424804... |
def find _ decorrelation _ pairs _ distances ( simname, coords _ loc = [ 3, 6 ] ) : coord, bs = extract. extract _ unwrapped ( simname, boxsize _ whole = true ) all _ distances = { } for key in coord : current _ timestep = coord [ key ] type2 = current _ timestep [ current _ timestep ['type'] = = 2 ]. iloc [ :, coords ... | [
-0.3856843113899231,
0.016586147248744965,
0.7278688549995422,
-0.5251350998878479,
-0.15555007755756378,
-0.41427186131477356,
0.33968448638916016,
0.11151056736707687,
-0.5152400135993958,
0.6254929900169373,
-0.4013206958770752,
-0.2839595377445221,
-0.10636424273252487,
0.4911946356296... |
def insert ( self, index, data ) : if index > = self. size or index < 0 : raise indexerror ( " index out of range. " ) if index = = 0 : self. push _ front ( data ) else : node = doublylinkedlistnode ( data ) current = self. head for num in range ( index ) : current = current. next current. prev. next = node node. prev ... | [
-0.8200944066047668,
1.6535032987594604,
0.4141939580440521,
-0.6662889122962952,
0.6768665313720703,
0.0778517946600914,
0.3847615122795105,
0.4838091731071472,
0.4735943078994751,
-0.14559955894947052,
-0.8024882674217224,
0.6724777817726135,
-1.2506417036056519,
-0.00006302605470409617,... |
def submaxtrix ( matrix, i, j ) : return np. array ( [ [ matrix [ i ] [ i ], matrix [ i ] [ j ] ], [ matrix [ j ] [ i ], matrix [ j ] [ j ] ] ] ) | [
0.05767182260751724,
-0.6740761399269104,
0.31723660230636597,
0.052122391760349274,
-0.7990126609802246,
-0.32973188161849976,
-0.548430860042572,
-0.1403907984495163,
0.17807655036449432,
0.6273761987686157,
-0.21373167634010315,
0.8779730796813965,
-0.37108591198921204,
-1.2992165088653... |
def test _ get _ between ( self, basic _ logfile ) : matcher = logmatcher ( log _ path = basic _ logfile ) matcher. match ( regex = re. compile ( r " second " ), timeout = 0. 5 ) matcher. mark ( " start " ) matcher. match ( regex = re. compile ( r " fourth " ), timeout = 0. 5 ) matcher. mark ( " end " ) content = match... | [
0.635671079158783,
-0.4857664406299591,
0.9772406816482544,
0.040501851588487625,
0.7097448110580444,
-0.32427164912223816,
-0.533993661403656,
-0.7340444326400757,
-1.188665509223938,
-1.364375352859497,
-0.4566405713558197,
-0.0752723217010498,
-0.7638614773750305,
-0.4128122329711914,
... |
def mol _ to _ idx _ smi ( m ) : for a in m. getatoms ( ) : a. setmapidx ( a. getidx ( ) + 1 ) return oechem. oemoltosmiles ( m ) | [
-0.6275668740272522,
-0.8429112434387207,
0.4386492371559143,
-0.25532230734825134,
-0.09670699387788773,
-0.4935842454433441,
-0.3844049274921417,
-0.4370553195476532,
0.6983728408813477,
0.2522220015525818,
-0.06362071633338928,
-0.2000599205493927,
-0.5391595363616943,
-0.83084797859191... |
def quit ( self ) : self. _ update _ fps _ timer. cancel ( ) ; | [
0.7404546737670898,
-0.6342993974685669,
0.3385860323905945,
-0.1930740624666214,
-0.4713287353515625,
1.0493406057357788,
0.3252970576286316,
-0.935258686542511,
-0.790197491645813,
0.19293448328971863,
-0.25403499603271484,
0.09792570769786835,
-1.2794109582901,
0.923753559589386,
0.02... |
def verify _ email ( request, verification _ code ) : data = { } try : verify = verificationqueue. objects. get ( verification _ code = verification _ code, verified = false, verification _ type = verificationqueue. verification _ choices [ 2 ] [ 0 ] ) old _ email = verify. user. email user = verify. user user. email =... | [
0.35927698016166687,
-0.0812208503484726,
0.4602252244949341,
0.4525465667247772,
0.4494292736053467,
-0.25222837924957275,
0.3067411482334137,
0.4550402760505676,
-0.06589474529027939,
0.578967273235321,
-0.5455215573310852,
1.0818846225738525,
0.36378684639930725,
0.5610395073890686,
0... |
def countquery ( self, query ) : params = dict ( self. params ) params ['api'] ='countquery'params ['query'] = query params ['type'] ='exe'params ['begin'] ='' params ['end'] ='' params ['content - type'] = self. ctype data = urllib2. urlopen ( self. url, urllib. urlencode ( params, doseq = true ) ). read ( ) error = p... | [
-0.3106847405433655,
-0.20214657485485077,
0.7533467411994934,
0.3509369492530823,
-0.30382418632507324,
0.3892703056335449,
-0.6526439189910889,
-0.1935165524482727,
-0.1449139416217804,
-0.13860830664634705,
0.0944656953215599,
0.796624481678009,
-1.2408101558685303,
1.064250111579895,
... |
def ignore _ env _ var _ and _ set _ tmp _ default _ home _ dir ( tmp _ directory, ignore _ ploomber _ stats _ enabled _ env _ var, monkeypatch ) : monkeypatch. setattr ( telemetry, " default _ home _ dir ", ". " ) | [
0.023929361253976822,
0.3667326867580414,
0.36157602071762085,
0.7390293478965759,
0.8396459221839905,
1.1096436977386475,
0.914659857749939,
0.1678047478199005,
0.5586178302764893,
-0.07052107155323029,
-0.6034919023513794,
-0.26762619614601135,
-0.3676773011684418,
1.095629334449768,
0... |
def eliminate ( solution, square, value ) : pass | [
-0.02293352037668228,
-0.01845194585621357,
0.07808464765548706,
1.599636197090149,
-0.40662261843681335,
-1.1019012928009033,
1.0540865659713745,
-0.17794886231422424,
0.4067348539829254,
0.6918683648109436,
-1.3149497509002686,
-0.23042401671409607,
0.10890590399503708,
0.115900807082653... |
def test _ set _ guidelines _ duplicates ( ufo _ module ) : _ run _ guideline _ test ( [ { " position " : ( 1, 2 ), " angle " : 90 }, { " position " : ( 1, 2 ), " angle " : 90 } ], [ { " x " : 1, " y " : 2, " angle " : 90 }, { " x " : 1, " y " : 2, " angle " : 90 } ], ufo _ module, ) | [
-1.0007165670394897,
0.61761474609375,
0.4062581956386566,
-0.31506723165512085,
1.159958839416504,
0.48247525095939636,
0.5085116028785706,
-0.3850274682044983,
-0.10564650595188141,
1.496921420097351,
-1.5194140672683716,
-0.08255352824926376,
0.23905086517333984,
-0.002588519360870123,
... |
def _ _ call _ _ ( self, * args, * * kwargs ) : wait _ for = kwargs. pop ( " wait _ for ", none ) # { { { run control key _ bits = kwargs. pop ( " key _ bits ", none ) if key _ bits is none : key _ bits = int ( np. iinfo ( self. key _ dtype ). bits ) n = len ( args [ self. first _ array _ arg _ idx ] ) allocator = kwar... | [
-0.4485934376716614,
0.12565527856349945,
1.030301570892334,
0.4428980350494385,
-0.06235012412071228,
-0.4473101794719696,
-0.4552648663520813,
-0.8899338841438293,
-0.34908527135849,
0.5738982558250427,
0.23977559804916382,
0.4450252950191498,
-0.1147698312997818,
1.3005976676940918,
-... |
def _ _ recursively _ load _ dict _ contents _ from _ group _ _ ( cls, h5file, path ) : import h5py ans = dict ( ) for key, item in h5file [ path ]. items ( ) : if key. endswith ( " _ < class'list'> " ) : tmp = cls. _ _ recursively _ load _ dict _ contents _ from _ group _ _ ( h5file, path + key +'/') ans [ key [ : - l... | [
-1.2127697467803955,
-0.3555349111557007,
0.6287289261817932,
-0.6049764156341553,
-1.8062764406204224,
-0.8611094951629639,
0.16183115541934967,
-1.0735039710998535,
-0.9046180248260498,
-0.013529093004763126,
-0.22470036149024963,
-0.33663812279701233,
-0.1403021663427353,
0.953912317752... |
def update _ variable _ by _ id ( variable _ id ) : " " " example variable _ id = 3409643000002275025 " " " # get instance of variablesoperations class variables _ operations = variablesoperations ( ) # get instance of bodywrapper class that will contain the request body request = bodywrapper ( ) # list to hold variabl... | [
-0.1974819302558899,
-0.9535629153251648,
0.9282656908035278,
-0.12860725820064545,
0.8023854494094849,
-0.4432748258113861,
0.18207237124443054,
-0.24244073033332825,
0.21620549261569977,
0.35924628376960754,
-0.6251826286315918,
0.8258991241455078,
-0.8489835858345032,
0.1807869821786880... |
def _ test _ permissions ( self, dbus _ method, args, permissions ) : _ permissions _ flag = false euid = os. geteuid ( ) if euid! = _ root : raise runtimeerror ( " this process should be running as root, but the current euid is % d. " % euid ) os. seteuid ( _ non _ root ) stratisdbus. reconnect ( ) try : dbus _ method... | [
-0.6737821102142334,
0.8204153180122375,
0.5096328854560852,
-0.2857622504234314,
0.34264275431632996,
-0.45915308594703674,
0.6972271203994751,
-0.06440354883670807,
0.050950534641742706,
-0.5543110966682434,
1.1092562675476074,
0.29381105303764343,
-0.9270890355110168,
0.1226217150688171... |
def concat _ main ( args ) : # get files directly if args. input _ filepaths is not none : files = args. input _ filepaths # or find them else : files = get _ file _ list ( args. file _ wildcard ) # no files found if len ( files ) = = 0 : msg = " no files were found. args. file _ wildcard : { } ". format ( args. file _... | [
0.8589296936988831,
0.11205601692199707,
1.003989338874817,
0.969936192035675,
0.5781994462013245,
0.14555034041404724,
0.4509459137916565,
0.11737681925296783,
-1.23600172996521,
0.32389435172080994,
0.585388720035553,
0.02822347730398178,
0.16726398468017578,
0.5012314319610596,
-0.590... |
def test _ repr ( self ) : expected = ( " < errorholder description ='description'" " error = { } > ". format ( repr ( self. holder. error [ 1 ] ) ) ) self. assertequal ( repr ( self. holder ), expected ) | [
-0.09733407199382782,
-0.26579800248146057,
0.1376650482416153,
-0.6629794836044312,
0.06435462832450867,
1.0042060613632202,
-0.25973811745643616,
0.5089881420135498,
0.7900053262710571,
-0.6121866106987,
0.5615345239639282,
0.9975090026855469,
0.12249428778886795,
-0.5671010613441467,
... |
def test _ personsecurity ( self ) : # sale division self. login ( user _ name = sale _ login _ id ) # try to acceed the person module through restrictedtraverse # this will test the security of the module person _ module _ id = self. portal. getdefaultmoduleid ( portal _ type ='person') person _ module = self. portal.... | [
0.4577685296535492,
-0.3052419424057007,
0.670921802520752,
0.7134736776351929,
0.4008200764656067,
0.7959962487220764,
0.841992974281311,
-0.0005638977745547891,
0.6323078274726868,
-0.6585951447486877,
-0.1831148862838745,
-0.20731963217258453,
-0.9201323986053467,
-0.00832495465874672,
... |
def get _ net ( self ) : return self. net | [
-0.9005396366119385,
-0.5635313987731934,
0.1476159393787384,
0.435795396566391,
0.5263590812683105,
0.4270921051502228,
0.04922652244567871,
-1.1097784042358398,
-0.33372703194618225,
-1.8766659498214722,
0.0072778984904289246,
0.6167004108428955,
0.055729687213897705,
0.21398477256298065... |
def modified _ fields ( self, other ) : # type : ( udmofficeobject ) - > list [ str ] result = [ ] fieldls = list ( set ( list ( self. udm _ object _ reference. keys ( ) ) ) and set ( list ( other. udm _ object _ reference. keys ( ) ) ) ) # todo review if it's an addition or subtraction for field in fieldls : own _ val... | [
-0.6956391334533691,
-0.12685082852840424,
0.8866187930107117,
-0.09994913637638092,
0.4102400541305542,
-0.3060232996940613,
0.00467768544331193,
-1.0664056539535522,
0.35125699639320374,
0.17149414122104645,
-0.7046921253204346,
-0.0324934646487236,
-0.28576478362083435,
0.12811227142810... |
def login ( cli _ context, cluster _ name, ec2 _ region, ec2 _ identity _ file ) : if cli _ context. obj ['provider'] = ='ec2': login _ ec2 ( cluster _ name = cluster _ name, region = ec2 _ region, identity _ file = ec2 _ identity _ file ) else : # todo : create unsupportedproviderexception. (? ) raise exception ( " th... | [
-0.8405193090438843,
0.07683992385864258,
0.5262070298194885,
0.5492744445800781,
0.3963265120983124,
0.5862842798233032,
-0.6062521934509277,
-0.29298457503318787,
0.537784218788147,
0.5708714723587036,
-0.020994240418076515,
1.0280100107192993,
-0.01496173720806837,
-0.7371314764022827,
... |
def test _ binary _ match _ not _ found ( self, basic _ logfile ) : matcher = logmatcher ( log _ path = basic _ logfile ) regex _ exp = re. compile ( b " bob " ) with pytest. raises ( timing. timeoutexception ) : matcher. match ( regex = regex _ exp, timeout = 0. 5 ) | [
0.5712676048278809,
0.20289991796016693,
0.6280975937843323,
0.4373354911804199,
0.20725508034229279,
0.936825692653656,
0.05077330023050308,
0.5322680473327637,
-0.7595283389091492,
-0.3692777752876282,
-0.8584051132202148,
-0.45613980293273926,
-0.5711069703102112,
0.35553014278411865,
... |
def test _ get _ team ( self ) : pass | [
0.6982285976409912,
0.6990750432014465,
0.07600864768028259,
1.6338353157043457,
1.6019436120986938,
-0.1645505726337433,
0.9765533208847046,
-0.3018822968006134,
-0.49618834257125854,
-1.2072631120681763,
-0.6705563068389893,
0.18380384147167206,
-0.8456616997718811,
-0.8670702576637268,
... |
def sample ( self, * args ) : self. model. eval ( ) self. model. to ('cpu ', non _ blocking = true ) self. sample _ func ( * args ) self. model. to ( self. device, non _ blocking = true ) self. model. train ( ) | [
-0.366407573223114,
0.6810318827629089,
0.402667760848999,
0.8362025022506714,
-0.10328921675682068,
0.3995271623134613,
1.029700517654419,
0.1484997719526291,
-1.0163946151733398,
0.051463451236486435,
-0.1937427669763565,
0.29835599660873413,
-0.059928592294454575,
-0.237261101603508,
... |
def callstandardcpu ( self, sharedarray, blocks, globaltimestep ) : # uppyramid of swept step for block in blocks : writeblock, readblock = block self. cpuarray [ :, :, :, : ] = sharedarray [ readblock ] self. cpu. step ( self. cpuarray, self. sets, self. start, globaltimestep ) sharedarray [ writeblock ] = self. cpuar... | [
-0.4397345781326294,
0.0014450494199991226,
0.5670793652534485,
0.3961962163448334,
-0.11077319085597992,
0.18981990218162537,
1.0997734069824219,
0.06583327054977417,
-0.6117162704467773,
0.665899395942688,
0.12481284141540527,
0.21134954690933228,
-0.9550940990447998,
0.3387615382671356,... |
def func _ tf1 _ print ( self, arg _ frame _ 1, arg _ frame _ 2 ) : try : trans = self. _ tfbuffer. lookup _ transform ( arg _ frame _ 1, arg _ frame _ 2, rospy. time ( ) ) l = [ ] l. append ('true') l. append ( trans. transform. translation. x ) l. append ( trans. transform. translation. y ) l. append ( trans. transfo... | [
-0.6400921940803528,
-0.6356470584869385,
0.6280964612960815,
-0.5536563396453857,
0.3005139231681824,
0.149699866771698,
-0.4241166114807129,
-0.3750428259372711,
-0.381474107503891,
0.9843811988830566,
-0.145350843667984,
0.3205356299877167,
-0.34505119919776917,
-0.19934812188148499,
... |
def google _ disconnect ( ) : access _ token = flask. session. get ('access _ token') if access _ token is none : response = flask. make _ response ( json. dumps ('current user not connected'), 401 ) response. headers ['content - type'] ='application / json'return response url = ('https : / / accounts. google. com / o ... | [
-0.07833372056484222,
-0.7491686344146729,
1.007939100265503,
0.23886257410049438,
0.26752549409866333,
-0.10490530729293823,
0.37332552671432495,
-0.19624777138233185,
0.6189277768135071,
0.048366133123636246,
0.4567950367927551,
0.4693625271320343,
0.14899230003356934,
-0.459288567304611... |
def format _ node ( self, node ) : if'leaf'in node : inner _ js ='return { leaf } ; '. format ( * * node ) else : if self. fnames : stmt ='<'val = node ['split _ condition'] if self. categoricals : for cat in categoricals : if cat in node ['split'] : val = node ['split']. replace ( cat,'' ) node ['split'] = cat stmt = ... | [
-0.6455538272857666,
-0.2515087425708771,
0.5679262280464172,
-0.8280867338180542,
-0.602838933467865,
-1.1154295206069946,
-0.2626420259475708,
0.45974451303482056,
-0.3396443724632263,
0.47662079334259033,
0.7682247757911682,
0.6135440468788147,
1.001602053642273,
0.5932936668395996,
0... |
def evaluate _ action ( calculator, unit ) : try : # get function name func = getattr ( calculator, f " { unit } _ since _ birth " ) # execute function and store result result = func ( ) # print result print ( f " it has been { result } { unit } since your birth! \ n " ) except attributeerror : print ( f " method calle... | [
-0.26625651121139526,
-0.13578525185585022,
0.5834736824035645,
0.2963360548019409,
0.28959470987319946,
0.3157808482646942,
0.8913552761077881,
-0.5650086998939514,
-0.6293827891349792,
-0.403836727142334,
0.19476738572120667,
0.7009033560752869,
0.2794013023376465,
0.28140589594841003,
... |
def check _ patient _ permission ( patient _ id ) : if current _ user. is _ patient _ user ( ) and not current _ user. is _ current _ patient ( patient _ id ) : abort ( 403 ) return | [
0.5444376468658447,
0.10393831878900528,
0.6003496050834656,
1.035111904144287,
-0.26612916588783264,
0.8820322155952454,
0.13140985369682312,
-0.4017936885356903,
-0.03358259052038193,
0.43225231766700745,
1.5463117361068726,
1.3764190673828125,
-0.0035318871960043907,
0.09033194184303284... |
def vote ( self, vote ) : operator = vote. get _ operator _ for _ delegate ( self. _ _ segment. delegate ) if operator = ='-': self. _ _ voting = false if operator = ='+': self. _ _ voting = true | [
-0.3840678036212921,
0.40632978081703186,
0.5893516540527344,
-0.1578892171382904,
0.0763949528336525,
0.880469024181366,
-0.39041611552238464,
0.19618211686611176,
0.0893973559141159,
-0.23024068772792816,
-0.6692737936973572,
0.04370585456490517,
-0.6839994192123413,
0.34013432264328003,... |
def _ calculate _ max _ noise _ std ( self ) - > float : max _ noise _ std = 1 pld _ epsilon = self. _ total _ epsilon + 1 while pld _ epsilon > self. _ total _ epsilon : max _ noise _ std * = 2 pld = self. _ compose _ distributions ( max _ noise _ std ) pld _ epsilon = pld. get _ epsilon _ for _ delta ( self. _ total ... | [
0.6775236129760742,
0.04857873171567917,
0.7079644799232483,
-0.1748834103345871,
-0.27627453207969666,
0.39320266246795654,
-0.07531704753637314,
0.4459677040576935,
-0.15122857689857483,
-0.13215084373950958,
-0.9135188460350037,
0.38533270359039307,
0.0849936455488205,
0.052478078752756... |
def _ calculate _ probabilities ( self ) - > cube : multiplier = self. _ get _ multiplier ( ) thresh _ name = self. thresh _ coord. name ( ) cubelist = iris. cube. cubelist ( [ ] ) for ( lower _ cube, upper _ cube ) in self. cube _ slices : # construct difference cube between _ thresholds _ data = ( lower _ cube. data ... | [
-0.04079282283782959,
-0.28075721859931946,
0.9036909937858582,
0.06120423600077629,
-0.6696520447731018,
0.033879753202199936,
0.48356640338897705,
0.10838115960359573,
-0.43217697739601135,
0.8903668522834778,
-0.5614621043205261,
-0.11771418899297714,
-0.16577781736850739,
-0.5621598958... |
def bleu _ score ( candidate, references, n, brevity = false ) : candidate _ n = to _ ngram ( candidate, n ) n = len ( candidate _ n ) references _ n = list ( ) for reference in references : references _ n. append ( to _ ngram ( reference, n ) ) c = 0 for ngram in candidate _ n : j = 0 flag = false while j! = len ( ref... | [
-0.015528375282883644,
0.07140859961509705,
0.7832157611846924,
-0.1781318634748459,
0.2509785294532776,
-0.5133124589920044,
0.018931085243821144,
0.4649867117404938,
-0.1267116814851761,
0.8268333673477173,
0.28722575306892395,
0.5030350089073181,
-0.8923804759979248,
0.14577098190784454... |
def set _ both _ leds ( self, r, g, b ) : self. _ set _ led ( self. command _ set _ leds, r, g, b ) | [
-0.6442846655845642,
-0.64640873670578,
0.4104885160923004,
0.009539091028273106,
1.0471093654632568,
0.6116195917129517,
-0.24534298479557037,
-0.4817557632923126,
-0.2914848327636719,
0.05025342106819153,
-0.8621206283569336,
1.4249120950698853,
-1.0518730878829956,
0.8335392475128174,
... |
def metadata _ and _ language _ from _ option _ line ( self, line ) : if self. start _ code _ re. match ( line ) : self. language, self. metadata = \ self. options _ to _ metadata ( self. start _ code _ re. findall ( line ) [ 0 ] ) | [
-0.0029848399572074413,
-0.3769617974758148,
0.3988054394721985,
-0.14770565927028656,
1.0645040273666382,
-0.05412329360842705,
-0.040670305490493774,
0.5923877954483032,
-0.24902845919132233,
0.9620776772499084,
-0.45906516909599304,
0.42818593978881836,
0.30063676834106445,
-0.110272593... |
def product _ options ( ) : opts = productoption. objects. all ( ) return opts | [
0.17798291146755219,
-0.3781948983669281,
0.36354780197143555,
1.418737769126892,
1.0900943279266357,
-0.22120952606201172,
-0.23296232521533966,
-0.8681744933128357,
-0.13270486891269684,
1.6285961866378784,
-0.6437391638755798,
0.22613269090652466,
0.9608805179595947,
-0.3535711765289306... |
async def test _ missing _ property ( caplog, v3 _ server, v3 _ subscriptions _ response ) : v3 _ server. get ( ( f " https : / / api. simplisafe. com / v1 / users / { test _ user _ id } " " / subscriptions? activeonly = true " ), status = 200, body = v3 _ subscriptions _ response, ) async with aiohttp. clientsession (... | [
0.5514669418334961,
-0.5530821084976196,
0.5024142265319824,
-0.03785528987646103,
0.5100139379501343,
1.2050284147262573,
-0.33904221653938293,
-0.16627299785614014,
1.0053045749664307,
-0.6954743266105652,
-0.15732839703559875,
0.049719978123903275,
-0.4031706750392914,
-0.50927501916885... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.