text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ init _ _ ( self, ni, nh, no, regression = false ) : self. regression = regression # number of input, hidden and output nodes. self. ni = ni + 1 # + 1 for bias node self. nh = nh + 1 # + 1 for bias node self. no = no # activations for nodes self. ai = [ complex ( 1. 0, 1. 0 ) ] * self. ni self. ah = [ complex ( ... | [
0.1320466250181198,
0.23332221806049347,
0.7627580165863037,
-0.3036319315433502,
-0.17707359790802002,
-0.2499709129333496,
1.5027014017105103,
-0.2839837968349457,
-0.23691393435001373,
0.16620494425296783,
0.0754752829670906,
0.2393757402896881,
-0.29326996207237244,
0.182041198015213,
... |
def calcanglesplane ( frame, offset = 2, natoms = 6 ) : angles = np. zeros ( natoms ) for i in xrange ( natoms ) : if np. any ( frame. atoms [ i ]. dipole ) : norm = frame. planenormal ( i, ( i + offset ) % natoms, ( i + 2 * offset ) % natoms ) angles [ i ] = planeangles. anglebetweenvectors ( frame. atoms [ i ]. dipol... | [
-0.5252378582954407,
0.2942103147506714,
0.6295275092124939,
-0.3060370683670044,
-0.7510861158370972,
1.0688279867172241,
-0.13582322001457214,
0.321247935295105,
0.4452994167804718,
0.5548848509788513,
-0.368344247341156,
0.0023619045969098806,
-0.8666892647743225,
0.033315300941467285,
... |
def created _ by _ type ( self ) - > optional [ str ] : return pulumi. get ( self, " created _ by _ type " ) | [
1.2077821493148804,
0.21033430099487305,
0.48384958505630493,
1.1668367385864258,
1.698240876197815,
1.1870660781860352,
0.7969208359718323,
-1.2664004564285278,
-0.08559176325798035,
-0.04095980152487755,
0.01405412144958973,
0.8859175443649292,
0.6263142824172974,
-0.8399716019630432,
... |
def adjust _ toas ( self, delta ) : col = self. table ['mjd'] if type ( delta )! = time. timedelta : raise valueerror ('type of argument must be timedelta') if delta. shape! = col. shape : raise valueerror ('shape of mjd column and delta must be compatible') for ii in range ( len ( col ) ) : col [ ii ] + = delta [ ii ]... | [
-0.6167830228805542,
-0.15786312520503998,
0.7759794592857361,
0.3070545196533203,
-0.5298312306404114,
0.571264386177063,
0.9255079030990601,
-0.202912375330925,
0.009961629286408424,
0.11477609723806381,
0.1435050368309021,
0.14819355309009552,
0.20058220624923706,
0.9864698648452759,
... |
def graphviz ( self, f, config = configuration ( ) ) : cmsisdsp. sdf. scheduler. graphviz. gengraph ( self, f, config ) | [
-0.6292086243629456,
1.1695358753204346,
0.2813057005405426,
0.5649413466453552,
-1.143513560295105,
0.3869676887989044,
0.5679309964179993,
1.1450152397155762,
-0.09498175978660583,
-0.8277749419212341,
0.12612582743167877,
0.3959122598171234,
1.3141655921936035,
-0.1525171846151352,
0.... |
def call ( self, wager2 ) : bet = wager2 - self. wager self. funds - = bet self. wager = wager2 self. isturn = false | [
-0.6848481297492981,
-0.4776988923549652,
0.5700693130493164,
0.46055975556373596,
-0.8210030794143677,
1.2418632507324219,
-0.23860545456409454,
-0.25201889872550964,
-0.5204288363456726,
0.0021213889122009277,
-0.4532112181186676,
0.6533790230751038,
-0.6604379415512085,
0.85675460100173... |
async def delete _ async ( self ) - > bool : return await self. _ proxy. delete _ async ( ) | [
-0.2577378749847412,
1.051401138305664,
0.664501428604126,
0.14359644055366516,
0.5110605359077454,
-1.094059944152832,
-0.44914713501930237,
0.20663107931613922,
0.6304734349250793,
0.4186954200267792,
0.22156772017478943,
0.2335972934961319,
-0.4353472888469696,
-0.3414044976234436,
-0... |
def list _ to _ bitstring ( list ) : bitstring = 2 # to keep leading zeros start with 0b10 and later strip # off the 1 # take each list element perform bitwise or and perform left shift for i, b in enumerate ( list ) : bitstring = bitstring | b if i < len ( list ) - 1 : bitstring < < = 1 return bin ( bitstring ) [ 3 : ... | [
-0.6686840057373047,
-0.058791469782590866,
0.6392624378204346,
0.8128914833068848,
0.313493937253952,
0.9988911747932434,
-0.35852187871932983,
-0.18044382333755493,
0.7381883263587952,
0.1597217172384262,
-0.4941606819629669,
-0.13638390600681305,
-0.5759483575820923,
0.8367388844490051,... |
def options ( self, url, expected _ response = none, auth = none, * * kwargs ) : pnote ( " perform a http options ", " info " ) try : response = self. req. options ( url, auth = auth, * * kwargs ) except exception as e : status, response = self. catch _ expection _ return _ error ( e, url ) else : status = self. report... | [
-0.9696927666664124,
-0.13479724526405334,
0.6756176948547363,
-0.040879763662815094,
1.0314823389053345,
-0.04186664894223213,
-0.059629764407873154,
-0.09762326627969742,
0.734595775604248,
-0.26257699728012085,
0.4312334358692169,
-0.056636080145835876,
-0.49482160806655884,
-0.08896583... |
def test _ patch _ survey _ package _ instance _ success ( self, client, all _ survey _ package _ instances ) : package = client. single _ survey _ package _ instance ( " 23b4fd48 - ba41 - 4c9b - baef - d5c3dd5f8e5c " ) old _ status = package [ " locked " ] target _ status = not old _ status client. patch _ survey _ pa... | [
-0.2754600942134857,
0.037209488451480865,
0.5529860854148865,
-0.6198011040687561,
-0.4182353913784027,
1.481590747833252,
0.023354684934020042,
0.6610573530197144,
0.7835716009140015,
0.34601983428001404,
-0.31568223237991333,
0.04291219636797905,
-0.5630020499229431,
-0.7748603820800781... |
def function ( f ) : return makefunction ( f. _ _ name _ _, f ) ( ) | [
-0.02358078397810459,
0.2823490500450134,
0.19622930884361267,
0.3722761869430542,
-0.36208251118659973,
-0.5345343947410583,
0.5469166040420532,
0.026225058361887932,
-0.17479963600635529,
-0.9001336097717285,
-0.41389983892440796,
-0.04546263813972473,
1.441515326499939,
-1.3265852928161... |
def mod _ sigmoid ( z, scope ='', reuse = none ) : with tf. variable _ scope ('mod _ sigmoid _'+ scope, reuse = reuse ) : alpha = tf. get _ variable ('alpha ', [ ], dtype = tf. float32, initializer = tf. constant _ initializer ( 0. 0 ) ) alpha _ norm = tf. nn. sigmoid ( alpha ) pre _ act = alpha _ norm * tf. real ( z )... | [
-0.9702260494232178,
-1.0329564809799194,
0.4293733835220337,
0.06744745373725891,
-0.8033287525177002,
-0.43690070509910583,
1.7439796924591064,
0.8582277894020081,
1.2798629999160767,
0.07723633199930191,
-0.11759531497955322,
0.1602388471364975,
-0.27210649847984314,
-0.2588785290718078... |
def com _ similarity ( self, x ) : aux = abs ( self. l - x ) + abs ( self. lambd - x ) + abs ( self. lambd - x ) + abs ( self. l - x ) return aux | [
0.545035719871521,
-0.2252141535282135,
0.7021880745887756,
-0.5756532549858093,
-0.5044336318969727,
1.0275819301605225,
-0.7021142840385437,
-0.7139620184898376,
0.7710204124450684,
0.5633125901222229,
-0.4515514075756073,
0.43674206733703613,
-0.6984679102897644,
0.31194978952407837,
... |
def sensor _ name ( self ) : if self. sensors : return self. sensors. sensor return none | [
-0.2230519950389862,
-1.4043095111846924,
0.37585338950157166,
-0.12380313873291016,
-0.15560723841190338,
-0.1990695744752884,
-0.30128014087677,
-0.8928754925727844,
1.4403339624404907,
0.43325895071029663,
0.0732622742652893,
-0.1310352087020874,
-0.28146597743034363,
0.2384744435548782... |
def message _ factory ( msg ) : def message ( ) : print ( msg ) return message | [
0.011662714183330536,
-0.052082519978284836,
0.1256343573331833,
-0.05702338367700577,
-0.22360125184059143,
-0.5223963260650635,
0.13519194722175598,
-0.861324667930603,
-0.5144997835159302,
-1.1439518928527832,
0.5881708264350891,
0.5149270296096802,
-0.016358081251382828,
0.711097419261... |
def mm _ log ( n, a ) : if a < = - 1 : raise valueerror ('parameter a must be greater than - 1') prod = lambda z : reduce ( lambda x, y : x * y, z, 1 ) mm = np. zeros ( n ) c = 1 for n in range ( n ) : if isinstance ( a, int ) and a < n : p = range ( n - a, n + a + 2 ) mm [ n ] = ( - 1 ) * * ( n - a ) / prod ( p ) mm [... | [
-0.4163835346698761,
-0.021633291617035866,
0.540955126285553,
-0.5478429794311523,
-0.834429919719696,
-0.2552109956741333,
-0.14811134338378906,
0.008069817908108234,
1.3604389429092407,
0.9003036022186279,
0.2947317361831665,
0.9580587148666382,
-0.21236653625965118,
0.9526419639587402,... |
def get ( self, book _ id ) : book = guestbook. query. filter _ by ( guestbookid = book _ id ). first _ or _ 404 ( ) content = jsonify ( { " guestbook " : [ { " id " : book. guestbookid, " name " : book. author, " message " : book. message, " isguest " : book. userid = = 1, " admincomment " : book. admincomment, " crea... | [
-1.1015533208847046,
-0.8132098913192749,
0.6236692070960999,
0.981666088104248,
0.5524226427078247,
0.0806584507226944,
-0.390732079744339,
-0.29799288511276245,
-0.7319510579109192,
0.7745625376701355,
-0.7573636174201965,
0.5357581973075867,
-0.8796972632408142,
0.9475045800209045,
-1... |
def context _ key _ color ( self ) : return [ style. dim + fore. white, style. dim + fore. lightwhite _ ex, fore. lightblue _ ex, fore. yellow, fore. lightred _ ex, fore. red, ] [ int ( self. value ) ] | [
-0.8428101539611816,
-0.3128218352794647,
0.5184699892997742,
-0.46557846665382385,
0.3172799348831177,
0.09995137155056,
-0.17579112946987152,
0.1346711814403534,
0.3736956715583801,
0.6768447756767273,
-0.04677383601665497,
1.1216362714767456,
0.21112102270126343,
0.8114393353462219,
-... |
def play _ card ( self, a _ card ) : self. _ cards. append ( a _ card ) self. _ top _ card = a _ card | [
-0.9695219397544861,
-0.1527787148952484,
0.4721232056617737,
-0.6373642086982727,
0.5781794786453247,
-0.04970777779817581,
0.2707222104072571,
0.4147966802120209,
0.9788607358932495,
-0.44462117552757263,
-0.14402732253074646,
0.7961229681968689,
0.5814093947410583,
0.23374396562576294,
... |
def enabled ( self ) - > pulumi. output [ bool ] : return pulumi. get ( self, " enabled " ) | [
0.8823171257972717,
0.2817239761352539,
0.3209725618362427,
0.8768268823623657,
0.5958676934242249,
0.9983522891998291,
-0.05053878575563431,
1.165993571281433,
0.3692925274372101,
0.05402010679244995,
-0.5585501194000244,
0.6267658472061157,
-1.0234894752502441,
-0.8609464168548584,
-0.... |
def render _ object _ full _ size ( o, size ) : triangles = np. asarray ( list ( o. get _ triangles ( ) ), dtype = np. float32 ) return topdownview. render _ object _ full _ size _ helper ( triangles, size ) | [
0.852395236492157,
0.020512858405709267,
0.5438190698623657,
-0.6279186606407166,
-1.2289221286773682,
0.22204752266407013,
0.7435216903686523,
-0.6200426816940308,
1.1239022016525269,
-0.4198785126209259,
-0.056879691779613495,
-0.12613415718078613,
0.4065563678741455,
-0.3712941706180572... |
def _ _ pow _ _ ( self, other ) : if isinstance ( other, array ) : assert self. shape = = other. shape result = self. _ new _ like _ me ( _ get _ common _ dtype ( self, other, self. queue ) ) self. _ pow _ array ( result, self, other ) else : result = self. _ new _ like _ me ( _ get _ common _ dtype ( self, other, self... | [
0.1406233310699463,
-0.01292722299695015,
0.9471447467803955,
0.7894213199615479,
-0.39157259464263916,
-0.35016950964927673,
-0.09557768702507019,
-0.8375300765037537,
0.5706120133399963,
0.2383466213941574,
-0.02678207866847515,
0.47796374559402466,
-0.24704325199127197,
0.37548136711120... |
def rotation ( rotor, i ) : return rotor [ - i : ] + rotor [ : len ( rotor ) - i ] | [
-0.7417480945587158,
0.06456966698169708,
0.31755030155181885,
-0.06199846789240837,
0.3140125572681427,
0.206900492310524,
0.40322113037109375,
-0.654543936252594,
-0.09126508235931396,
0.4259093701839447,
-0.5952439904212952,
-0.4636247754096985,
-1.8126633167266846,
-1.9610105752944946,... |
def do _ send _ keys ( self, args ) : args = self. process _ args ( args ) try : if not self. config [ " actions " ] : self. locate _ element ( ) self. element. send _ keys ( args ) except : self. handle _ exception ( ) | [
-1.1718043088912964,
0.40915846824645996,
0.45962220430374146,
0.798058032989502,
0.9993836879730225,
-0.028450652956962585,
0.5587712526321411,
-0.9103490114212036,
-0.2067900151014328,
1.1193158626556396,
-0.011998530477285385,
0.7108408808708191,
-0.6585968732833862,
0.6466860175132751,... |
def callback _ query ( self, bot : bot, update : update ) - > none : answer _ re = re. compile ( r'^ answer _ ( \ d + ) $') answer _ match = answer _ re. match ( update. callback _ query. data ) if update. callback _ query. data = = " ignore " : self. callback _ query _ ignore ( bot, update ) elif update. callback _ qu... | [
-0.279947966337204,
-0.5342562198638916,
0.7248224020004272,
0.27506762742996216,
-0.7982328534126282,
-0.17372697591781616,
0.29598093032836914,
-0.16055099666118622,
0.8494748473167419,
0.1361703723669052,
0.3734772801399231,
-0.39120203256607056,
-0.6357706189155579,
-0.2377064973115921... |
def outer ( self, a, b ) : a1 = _ makemaskedarg ( a ) b1 = _ makemaskedarg ( b ) maresult = self. mafunc. outer ( a1, b1 ) return transientvariable ( maresult ) | [
-0.15013550221920013,
0.3760887086391449,
0.5407007932662964,
-0.5106400847434998,
-0.7844322323799133,
-0.7390630841255188,
0.2769094705581665,
-0.526633620262146,
-1.0791434049606323,
0.13256607949733734,
0.4483642578125,
1.2298558950424194,
-0.16313853859901428,
-1.062746286392212,
-0... |
def update ( self ) : if self. ship. y _ pos + self. ship. height > self. game _ window _ height : # ship falls self. end _ game = true self. ship. move ( ) if not self. ship. goforward : self. bg. move ( ) self. hourglass. move ( ) for pipe in self. pipes : pipe. move ( ) self. updatescore ( ) # if self. ship. collisi... | [
-0.2771339416503906,
-1.0637192726135254,
0.653612494468689,
-0.29493167996406555,
0.6485456228256226,
0.24735409021377563,
-0.15034009516239166,
-0.551414430141449,
-0.48716139793395996,
0.676305890083313,
0.2865878641605377,
-0.302660197019577,
-0.30507102608680725,
0.4905538856983185,
... |
def set ( key, value ) : assert _ profile ( ) settings. setvalue ( key, value ) | [
-0.38117969036102295,
1.0938917398452759,
0.3780896067619324,
0.5039743185043335,
0.3829532265663147,
0.18782441318035126,
0.11367443203926086,
-1.5770565271377563,
-0.25516605377197266,
0.7658299207687378,
-0.6741066575050354,
0.04935108497738838,
-0.11505241692066193,
-0.1098589673638343... |
def guessos ( searcher ) : find _ specs = [ file _ system _ searcher. findspec ( location = u'/ etc ', case _ sensitive = false ), file _ system _ searcher. findspec ( location = u'/ system / library ', case _ sensitive = false ), file _ system _ searcher. findspec ( location = u'/ windows / system32 ', case _ sensitiv... | [
-0.4914226233959198,
-0.5343053936958313,
0.8794419765472412,
0.08908198773860931,
-0.5394109487533569,
0.12441573292016983,
0.6356003284454346,
0.09512388706207275,
-0.19591912627220154,
-0.11724669486284256,
0.28415703773498535,
-0.7195473313331604,
-0.22179736196994781,
1.09298765659332... |
def _ _ closerequested ( self, index ) : if index > = 0 : self. vm. closeeditorwindow ( self. widget ( index ). geteditor ( ) ) | [
-1.1596596240997314,
-0.14942465722560883,
0.727050244808197,
-0.08388180285692215,
-0.4963848888874054,
0.4198889434337616,
0.31057512760162354,
-0.7781711220741272,
-0.22041377425193787,
-0.5342164635658264,
1.3297066688537598,
-0.0695040300488472,
-0.9871727228164673,
0.5765078067779541... |
def blog _ authors ( * args ) : blog _ posts = blogpost. objects. published ( ) return list ( user. objects. filter ( blogposts _ _ in = blog _ posts ). annotate ( post _ count = count ( " blogposts " ) ) ) | [
0.9271817207336426,
-0.2205592542886734,
0.19823132455348969,
0.9811263680458069,
-0.2897595167160034,
0.1964828372001648,
-0.028547514230012894,
1.1695082187652588,
-0.5030674934387207,
0.5843467116355896,
-0.1374807208776474,
0.13583408296108246,
0.4835605323314667,
0.07397930324077606,
... |
def media _ type ( self ) - > str : return pulumi. get ( self, " media _ type " ) | [
0.7114584445953369,
0.3848798871040344,
0.33959633111953735,
0.4146557152271271,
1.0907437801361084,
0.8171805143356323,
-0.027693500742316246,
-0.25182080268859863,
0.8491303324699402,
0.025592518970370293,
0.9927753806114197,
1.2471346855163574,
-0.24270956218242645,
-0.24780213832855225... |
def search ( self, x ) : temp = self. head. next i = 0 f = false while temp! = none : if temp. value = = x : f = true return temp. key i = i + 1 temp = temp. next if f = = false : return none | [
-0.6003102660179138,
0.6343351602554321,
0.577327311038971,
-0.12436814606189728,
-0.9858956933021545,
-0.37169936299324036,
-0.49487870931625366,
-1.147746205329895,
-0.5203733444213867,
-0.028318481519818306,
-0.9126370549201965,
0.20589271187782288,
-1.2997486591339111,
0.21720236539840... |
def post _ song ( ) : file = request. json. get ('file') if not file : data = {'message':'could not load data'} return response ( json. dumps ( data ), 404, mimetype = mimetype ) new _ file = file ( filename = file. get ('name') ). save ( ) song = song ( file _ id = new _ file. id ). save ( ) return response ( json. du... | [
-0.5421457290649414,
-0.30820024013519287,
0.7964982390403748,
0.1939251869916916,
0.22698818147182465,
0.8062744736671448,
-0.5977316498756409,
0.1566164791584015,
-0.7298736572265625,
0.11762570589780807,
-0.8662703037261963,
-0.4160504937171936,
-0.888589084148407,
0.19314223527908325,
... |
def sample _ precision ( self ) : pass | [
0.6654560565948486,
-1.3032879829406738,
0.49296876788139343,
0.7080549597740173,
-0.25353139638900757,
-0.10396241396665573,
0.2721971273422241,
0.2229342758655548,
0.5063328742980957,
-0.4022276699542999,
0.06813894212245941,
-0.240526020526886,
0.021934907883405685,
-0.16375859081745148... |
def validatemeta ( self ) : self. meta. date = pd. to _ datetime ( self. meta. date ) self. meta. enrolldate = pd. to _ datetime ( self. meta. enrolldate ) # add burnin from enrolldate if not already supplied self. meta ['burnin'] = self. meta. apply ( lambda x : x ['enrolldate'] + pd. dateoffset ( months = self. burni... | [
-0.1842469722032547,
0.1567656248807907,
0.5711825489997864,
0.5358566045761108,
-0.2978937327861786,
0.6944453716278076,
-0.5300455093383789,
0.15271137654781342,
-0.25984251499176025,
0.014589784666895866,
0.7572711110115051,
1.9770543575286865,
0.5608353018760681,
0.649849534034729,
0... |
def _ _ init _ _ ( self, owner, index, value ) : py _ typecheck. check _ type ( owner, tracingexecutor ) py _ typecheck. check _ type ( index, int ) py _ typecheck. check _ type ( value, executor _ value _ base. executorvalue ) self. _ owner = owner self. _ index = index self. _ value = value | [
0.09451326727867126,
0.9423773884773254,
0.5310109853744507,
0.9445434212684631,
0.019593361765146255,
-0.4699285924434662,
0.7128632664680481,
-0.6775169968605042,
0.6429532766342163,
-0.3602136969566345,
-0.27039164304733276,
0.3325697183609009,
0.22801369428634644,
0.09631745517253876,
... |
def fit ( self, x1, x2, vx1 = none, vx2 = none, tx1 = none, tx2 = none, checkpoint ='checkpoint. model') : x1. to ( self. device ) x2. to ( self. device ) data _ size = x1. size ( 0 ) if vx1 is not none and vx2 is not none : best _ val _ loss = 0 vx1. to ( self. device ) vx2. to ( self. device ) if tx1 is not none and ... | [
0.07515085488557816,
0.03026081807911396,
0.8438680768013,
0.745665967464447,
0.5052593946456909,
-0.3597402572631836,
-0.5395910143852234,
-0.2858409881591797,
-0.7493998408317566,
0.31992918252944946,
-0.1917467564344406,
0.5649141073226929,
0.5542529821395874,
-0.32839760184288025,
-0... |
def showlogin ( ) : state =''. join ( random. choice ( string. ascii _ uppercase + string. digits ) for x in xrange ( 32 ) ) client _ id = json. loads ( open ('client _ secrets. json ','r'). read ( ) ) ['web'] ['client _ id'] login _ session ['state'] = state return render _ template ('login. html ', state = state, g _... | [
0.1383121758699417,
-0.14270207285881042,
0.5510029196739197,
-0.9761298298835754,
-0.6151279211044312,
0.5386186838150024,
-0.03789719566702843,
0.17033587396144867,
0.392128586769104,
0.41994091868400574,
0.04924533888697624,
0.400456041097641,
0.3423997163772583,
-0.33832821249961853,
... |
def unregister ( self, events ) : events [ events. extractstart ]. remove ( self ) events [ events. listfeatures ]. remove ( self ) | [
-0.6537470817565918,
-0.07907988876104355,
0.47966620326042175,
0.09206245094537735,
0.3376504182815552,
-0.4613092243671417,
0.674577534198761,
1.6251322031021118,
-0.032962847501039505,
-0.18304479122161865,
-1.268906831741333,
0.4683288335800171,
-0.2548812925815582,
-0.0209515877068042... |
def _ cache _ website _ data ( ) : try : page = requests. get ( source _ url ) except exception : # if we can't get a page, we won't be updating any cache. pass else : tree = html. fromstring ( page. content ) # last updated : next sibling of the element with id page - top. last _ updated = tree. get _ element _ by _ i... | [
-0.13439467549324036,
0.9336929321289062,
0.540779709815979,
0.04301755875349045,
-0.2952786386013031,
0.2978806793689728,
-0.0677567645907402,
-0.12238844484090805,
-0.22868256270885468,
-0.06817823648452759,
0.23641346395015717,
0.037789054214954376,
0.7542943954467773,
0.585542798042297... |
def get _ webpage ( url ) : req = request ( url, headers = {'accept - charset':'utf - 8 ','accept - language':'zh - tw, en - us ; q = 0. 5'} ) with urlopen ( req ) as rsq : _, _, charset = rsq. headers ['content - type']. partition ('charset =') if not charset : charset ='utf - 8'htmlbytes = rsq. readall ( ) charset = ... | [
-0.2093387246131897,
0.2212885171175003,
0.6022548675537109,
-0.13816450536251068,
-0.6325835585594177,
-0.024948501959443092,
0.18564413487911224,
-0.0034980266354978085,
0.05497612804174423,
0.17425279319286346,
0.23746678233146667,
0.5826799273490906,
-0.5852078199386597,
0.082175359129... |
def test _ add _ to _ args ( self ) : self. assertequal ( self. job _ 1. args, {'block': { },'keyword': { },'trsh': { } } ) self. job _ 1. add _ to _ args ( val ='val _ tst _ 1') self. job _ 1. add _ to _ args ( val ='val _ tst _ 2') self. job _ 1. add _ to _ args ( val ='val _ tst _ 3 ', separator ='' ) self. job _ 1.... | [
0.07313235104084015,
-0.32723766565322876,
0.7784579396247864,
-0.24878405034542084,
0.28402790427207947,
0.5212778449058533,
-0.296071857213974,
-0.3198932111263275,
-0.8455146551132202,
0.15604713559150696,
-0.0033426827285438776,
0.5888676643371582,
-0.013268629088997841,
0.380403012037... |
def get _ delta ( wh, beta, xmat ) : # print ( " before betax " ) # print ( np. quantile ( beta, [ 0,. 1,. 25,. 5,. 75,. 9, 1 ] ) ) # import pickle # save _ list = [ beta, xmat ] # save _ name ='/ home / donboyd / documents / beta _ xmat. pkl'# open _ file = open ( save _ name, " wb " ) # pickle. dump ( save _ list, op... | [
0.4478006660938263,
-0.882219135761261,
0.7302111983299255,
-0.413006067276001,
0.15772613883018494,
0.7806779146194458,
-0.030014289543032646,
-0.4695035219192505,
-1.0010653734207153,
0.14649488031864166,
-0.706152081489563,
0.24818548560142517,
-0.3712443709373474,
-0.003649458521977067... |
def main ( ) : parser = argparse. argumentparser ( description ='extract a copy of python27 - minimal') group _ out = parser. add _ argument _ group ('output options') group _ out. add _ argument ('- d ','- - directory ', metavar ='dir ', default = '. ', help ='set a destination directory, a subdirectory name ( see - -... | [
0.1831403374671936,
0.10074556618928909,
1.0531083345413208,
0.12917689979076385,
-0.5554956793785095,
-0.3169603645801544,
0.3495168387889862,
-0.14232182502746582,
0.44871556758880615,
0.7003995776176453,
0.657036304473877,
0.4082299768924713,
0.2662876844406128,
-0.6194136738777161,
0... |
def size ( a, b = 0, nargout = 1 ) : s = np. asarray ( a ). shape # if s = = ( ) : # return 1 if b else ( 1, ) * nargout # a is not a scalar try : if b : return s [ b - 1 ] else : return matlabarray ( s ) if nargout < = 1 else s except indexerror : return 1 | [
0.1428554207086563,
0.41243040561676025,
0.6109291315078735,
0.42505791783332825,
-0.6193128228187561,
0.09122323244810104,
0.9833000302314758,
0.2841939330101013,
0.7507886290550232,
0.2790546715259552,
0.7381117343902588,
0.35835298895835876,
-0.7872596979141235,
0.12771186232566833,
0... |
def parsekey ( self, key, key _ name ) : value = key. get ( key _ name, none ) if not value : raise errors. preprocessfail ( u'value of key : { 0 : s } not found. '. format ( key _ name ) ) return value | [
0.4677458703517914,
-0.22027327120304108,
0.39753976464271545,
0.21344462037086487,
-0.20941877365112305,
-0.13985060155391693,
-0.9318442344665527,
-0.35513079166412354,
-0.4545258581638336,
0.8093078136444092,
0.6061342358589172,
0.2500343918800354,
0.059760868549346924,
0.11831438541412... |
def test _ post _ _ empty ( self ) - > none : self. client. force _ login ( self. user ) response : httpresponse = self. client. post ( self. path ) assert httpstatus. ok = = response. status _ code assert self. asserttemplateused ('buza / question _ form. html') assert self. question = = response. context ['question']... | [
-0.6784719228744507,
0.31611424684524536,
0.5689067840576172,
0.12477587163448334,
0.6887853145599365,
1.3194905519485474,
-0.03599672019481659,
-0.6548057198524475,
-0.23115123808383942,
-1.067840814590454,
-0.9289075136184692,
-0.08908863365650177,
0.09371979534626007,
-0.014949812553822... |
def url _ path _ join ( * parts ) : schemes, netlocs, paths, queries, fragments = zip ( * ( urlsplit ( part. strip ( ) ) for part in parts ) ) scheme = first ( schemes ) netloc = first ( netlocs ) path = " / ". join ( x. strip ( " / " ) for x in paths if x ) query = first ( queries ) fragment = first ( fragments ) retu... | [
0.4216119349002838,
0.14573845267295837,
0.4207388758659363,
-0.2966320812702179,
0.17514067888259888,
0.7278565168380737,
0.16607238352298737,
0.708720862865448,
-0.15050265192985535,
-0.15189649164676666,
-0.16164442896842957,
-1.6324752569198608,
-0.8229738473892212,
-0.5241451859474182... |
def _ insert _ rows ( self, table : str, instance _ name : str, number : int, update _ stream _ table : bool = true, ) - > none : def _ insert ( txn : loggingtransaction ) - > none : for _ in range ( number ) : txn. execute ( " insert into % s values ( nextval ('foobar _ seq'),? ) " % ( table, ), ( instance _ name, ), ... | [
-0.4755123555660248,
1.423092246055603,
0.7680620551109314,
-0.28782567381858826,
0.16790281236171722,
-0.49574148654937744,
0.14821231365203857,
0.050199244171381,
-0.6379829049110413,
0.8327309489250183,
-0.7721247673034668,
-0.6883320212364197,
-0.8446556329727173,
0.3337886333465576,
... |
def addchatwidget ( self, chat _ widget ) : self. _ main. send ( " addchatwidget ", [ self. _ uid, chat _ widget. _ uid ] ) | [
-0.1918010264635086,
-0.22723940014839172,
0.24615928530693054,
-0.005404573865234852,
-0.05108607932925224,
1.3013988733291626,
-0.2558037340641022,
0.24162276089191437,
0.1405312865972519,
-0.6325358152389526,
-0.571045458316803,
0.6911478042602539,
-0.5941085815429688,
0.693737328052520... |
def listen ( self ) : for item in self. adapter. event _ gen ( ) : # break out of generator if sick _ ftp _ test stopped if not self. _ listening : break # ignore none events. they can't be ignored or the generator # will indefinitely block in between file events if item is none : continue ( _, type _ names, path, file... | [
0.2670925259590149,
-0.6916112303733826,
0.6747477650642395,
-0.662304162979126,
0.7260156869888306,
0.2527986168861389,
0.47434696555137634,
0.03544917330145836,
-0.6123342514038086,
-1.0223661661148071,
0.3903276324272156,
0.004903552588075399,
-0.33426034450531006,
0.17239108681678772,
... |
def to _ gray ( color _ img ) : gray = cv2. cvtcolor ( color _ img, cv2. color _ bgr2gray ) return gray | [
-0.5545915365219116,
0.1549447774887085,
0.27186378836631775,
0.020828047767281532,
1.1823787689208984,
0.08542751520872116,
-0.2533813416957855,
0.23452959954738617,
-0.037440355867147446,
0.40417879819869995,
-0.7797399759292603,
0.5412532687187195,
0.18860387802124023,
0.900841951370239... |
def montage ( image, name, filename, qchtml, cmaptype ='grey ', mode ='3d ', minval = none, maxval = none, box = none ) : image = str ( image ) # input checks opath = os. path. dirname ( image ) # grab the image folder output = str ( image ) image = nib. load ( image ). get _ data ( ) # load in the daterbytes basefpath... | [
0.4936906099319458,
0.41871607303619385,
1.0348304510116577,
0.659062385559082,
-0.6218424439430237,
0.03386344760656357,
0.40535059571266174,
-0.37003788352012634,
0.44995179772377014,
0.8994864225387573,
0.7906040549278259,
0.05615606904029846,
-0.257284015417099,
0.6430604457855225,
0... |
def close ( self ) : return asyncio. async ( self. _ conn. close ( ), loop = self. _ loop ) | [
-0.5655356645584106,
-0.06339617073535919,
0.5220592021942139,
-0.23002387583255768,
-0.6040148735046387,
-0.2906009554862976,
-0.37079858779907227,
0.11122773587703705,
-0.7678494453430176,
-0.5661107301712036,
0.5550777912139893,
0.011236622929573059,
-0.6989403367042542,
-0.487948954105... |
def del _ edge ( self, edge ) : if type ( edge ) is edge : edge _ obj = edge edge = edge. id else : edge = str ( edge ) edge _ obj = edge ( self, edge ) if not self. redis. sismember ( self. edges _ key, edge ) : raise valueerror ( edge ) parent = self. redis. get ('{ } : e : { } : in '. format ( self. name, edge ) ) c... | [
-0.4635249376296997,
0.02831895276904106,
0.893623948097229,
-0.6918236613273621,
-0.15242671966552734,
-0.29818055033683777,
-0.7880266308784485,
0.675301194190979,
0.6108472943305969,
0.4370388388633728,
-0.5646283626556396,
-0.2742815315723419,
-0.6774778962135315,
0.3280881345272064,
... |
def multipartitions ( tree ) : representations = list ( ) taxons = set ( tree. get _ terminals ( ) ) for clade in tree. get _ nonterminals ( ) : clade _ repr = multipartition ( clade, taxons ) representations. append ( clade _ repr ) return representations | [
-0.803594708442688,
-0.47419339418411255,
0.6187682151794434,
-0.5350368618965149,
-0.3458841145038605,
-0.13576459884643555,
-0.9598826169967651,
-0.09390298277139664,
0.24359779059886932,
0.6346279978752136,
-0.18836845457553864,
-0.49368616938591003,
-0.31720244884490967,
1.113227128982... |
def print ( self, experiment _ name : str, meta _ data : metadata, learner : learner, current _ fold : int, num _ folds : int ) : model = learner. model _ text = self. _ format _ model ( meta _ data, model ) for output in self. outputs : output. write _ model ( experiment _ name, text, num _ folds, current _ fold if nu... | [
-0.15493397414684296,
-0.6011583805084229,
0.3936147093772888,
0.4020100235939026,
0.0032376504968851805,
-0.02306688390672207,
0.07994815707206726,
0.05068269744515419,
-0.3808666169643402,
0.21654848754405975,
0.7626007795333862,
0.3007481098175049,
0.20567727088928223,
0.592778146266937... |
def sub _ packages ( self ) - > set [ str ] : if not self. _ recipebook : raise packageerror ( " cannot determine sub - packages because no " " recipe book is associated with this package " ) return self. _ sub _ packages | [
0.2787649929523468,
0.6717566847801208,
0.4152957499027252,
0.8423911333084106,
-0.19684547185897827,
0.6527164578437805,
-0.03888430818915367,
-0.11546217650175095,
0.14460031688213348,
-0.3987317979335785,
-0.6795685291290283,
0.3474670648574829,
-0.05040033161640167,
-0.3978703916072845... |
def capacity _ rebalance ( self ) - > optional [ pulumi. input ['spotfleetrequestspotmaintenancestrategiescapacityrebalanceargs'] ] : return pulumi. get ( self, " capacity _ rebalance " ) | [
0.21961067616939545,
-0.5238167643547058,
0.516183078289032,
0.5077052712440491,
1.4175713062286377,
0.30156293511390686,
0.2698306739330292,
-0.02775740996003151,
0.39555445313453674,
-0.5419309139251709,
0.7011208534240723,
-0.19849370419979095,
0.7304379940032959,
-0.7112771272659302,
... |
def _ nonetype _ to _ gbase ( self, value ) : return none | [
-0.6884283423423767,
-0.02948182448744774,
0.40738996863365173,
-0.34974849224090576,
0.5359760522842407,
0.15847183763980865,
-0.2445126473903656,
-1.6171903610229492,
0.5072959065437317,
0.46618640422821045,
-0.21328593790531158,
0.45692023634910583,
-1.3370888233184814,
0.94867169857025... |
def load ( cls, path : union [ str, pathlib. path, io. bufferediobase ], env : optional [ gymenv ] = none, device : union [ th. device, str ] = " auto ", custom _ objects : optional [ dict [ str, any ] ] = none, * * kwargs, ) - > " basealgorithm " : data, params, pytorch _ variables = load _ from _ zip _ file ( path, d... | [
-0.2850746512413025,
-0.38668182492256165,
0.8516479730606079,
0.4580604135990143,
-0.15590503811836243,
0.1269998550415039,
0.2424795925617218,
-0.3638394773006439,
-0.17735955119132996,
0.6172088980674744,
0.0024305409751832485,
0.9399703741073608,
0.6279098391532898,
0.3093883991241455,... |
def _ setflags ( self ) : self. iacy = 0 if self. iopt < 0 : self. iacy = abs ( self. iopt ) self. iopt = 0 if self. iacy = = 0 : self. ftol = 1e - 15 self. xtol = 1e - 28 else : self. ftol = 10 * * ( self. iacy ) self. xtol = self. ftol self. ipf = ['r ','p ','d ','l']. index ( self. pfit ) self. iorig = 1 if self. ip... | [
-0.5824500918388367,
-0.29821324348449707,
0.6911861896514893,
-0.531610906124115,
0.6030783653259277,
0.40810027718544006,
0.3659164011478424,
-0.5707377791404724,
-0.6924334168434143,
-0.3415982127189636,
0.10831734538078308,
0.4536083936691284,
-1.1145163774490356,
1.0573617219924927,
... |
def radixsortstates ( ) : global listofstates def radixsortstatesact ( listofstates, digitsplacetoacton ) : # digits place here is 1, 10, 100, etc. " " " internal function. for a given digits place ( parameter digitsplacetoacton ), sorts input list of state ( parameter listofstates ) into 10 piles based on digits in gi... | [
0.2948778569698334,
-0.1745559275150299,
0.7742910385131836,
-0.4593113958835602,
-0.31984153389930725,
-0.040537029504776,
1.1234654188156128,
0.292831689119339,
0.7662363052368164,
-0.39648306369781494,
0.03167741000652313,
0.15948854386806488,
0.28274762630462646,
0.09887577593326569,
... |
def _ _ init _ _ ( self, element ) : if not isinstance ( element, xml4h. nodes. element ) : raise valueerror ( " builder can only be created with an % s. % s instance, not % s " % ( xml4h. nodes. element. _ _ module _ _, xml4h. nodes. element. _ _ name _ _, element ) ) self. _ element = element | [
-0.17095698416233063,
0.6060899496078491,
0.31942126154899597,
0.7505306005477905,
-0.39205625653266907,
0.5794326663017273,
0.08111539483070374,
0.2713080644607544,
0.8483313918113708,
-0.6588677167892456,
-0.2720907926559448,
0.12422806024551392,
-0.4426437020301819,
0.9135264158248901,
... |
def _ _ repr _ _ ( self ) : return ('model relationship < object _ id = { }, subject _ id = { }, predicate = { } > '. format ( self. object _ id, self. subject _ id, self. predicate ) ) | [
0.40144187211990356,
-1.421461582183838,
0.6278042793273926,
-0.7015151977539062,
-0.00778520293533802,
1.1687036752700806,
-0.3083970546722412,
0.2977721691131592,
-0.27570486068725586,
0.14737656712532043,
0.5846638083457947,
0.5057785511016846,
0.26395270228385925,
-0.36887726187705994,... |
def asn ( self, asn ) : if asn is not none and asn > 4294967295 : # noqa : e501 raise valueerror ( " invalid value for ` asn `, must be a value less than or equal to ` 4294967295 ` " ) # noqa : e501 if asn is not none and asn < 1 : # noqa : e501 raise valueerror ( " invalid value for ` asn `, must be a value greater th... | [
-0.4743662178516388,
-0.2989543080329895,
-0.023429937660694122,
0.49925896525382996,
-0.13033661246299744,
-0.10050123929977417,
0.11104506999254227,
0.26508617401123047,
0.5493907332420349,
-0.4755058288574219,
-1.1372936964035034,
-0.05812009051442146,
0.6365359425544739,
0.292281776666... |
def extractpairedsingleendfrom ( folder, sep ='- ', namepos = 2 ) : single = [ ] paired = { } for val in os. listdir ( folder ) : if ". fastq " in val or ". fq " in val : if'r1'in val : name = val. split ( sep ) [ namepos ] paired [ name ] = {'r1': val } elif'r2'in val : name = val. split ( sep ) [ namepos ] paired [ n... | [
-0.6756889224052429,
-0.32170477509498596,
0.47597092390060425,
0.3924159109592438,
-0.5987119674682617,
-0.31701427698135376,
0.2865513861179352,
0.7400588989257812,
-0.7483327984809875,
-0.37282809615135193,
-0.4702868163585663,
-0.2702244818210602,
-0.2890421450138092,
0.618939876556396... |
def set _ model ( self, model ) : def _ set _ model ( path ) : tmp _ model _ name ='tmp _ model'paths = save _ model ( model, path, tmp _ model _ name, for _ stat _ collection = true ) self. _ set _ model _ from _ files ( paths ) self. _ nx _ model = model stdout _ redirect ( _ set _ model, self. _ tmp _ dir. name ) | [
-0.7136145234107971,
0.3544619679450989,
0.33764079213142395,
0.7032352685928345,
0.558398962020874,
0.8199138045310974,
1.0014135837554932,
-0.9167289137840271,
0.05300379917025566,
-0.15437883138656616,
-1.162916898727417,
-0.609016478061676,
0.6049903035163879,
0.7443845272064209,
-0.... |
def koch _ snowflake ( tortoise : turtle. turtle ( ), order : int, size : int ) - > none : tortoise. hideturtle ( ) for angle in [ - 120, - 120, - 120 ] : koch ( tortoise, order, size ) tortoise. left ( angle ) | [
0.1048700213432312,
1.5394800901412964,
0.3314804136753082,
0.286223828792572,
-0.09710506349802017,
-0.32753291726112366,
0.15846854448318481,
-0.5142714381217957,
-0.32785385847091675,
0.4369240999221802,
-0.9504268169403076,
-0.24002903699874878,
0.4794033467769623,
0.31205591559410095,... |
def local _ dateformat ( dt ) : if formats : try : return formats. localize ( dt, use _ l10n = true ) except typeerror : # django 1. 2 return formats. localize ( dt ) return dateformat. format ( dt, get _ date _ formats ( ) [ 1 ] ) | [
0.7182730436325073,
-0.21737153828144073,
0.5983989834785461,
-0.19770096242427826,
-0.8754504919052124,
-0.17170977592468262,
-0.486589640378952,
-0.8510626554489136,
0.7562865614891052,
-0.2674619257450104,
0.46922236680984497,
0.21179373562335968,
0.9196228981018066,
0.6205712556838989,... |
def _ format _ text ( text ) : if text : return _ wikilink _ parse ( text ) return [ ] | [
-0.2888404130935669,
-0.7091267108917236,
0.3030734956264496,
-0.08617591857910156,
0.09383121877908707,
-1.0236461162567139,
-0.7768869996070862,
0.9249993562698364,
0.8764630556106567,
-0.22852696478366852,
0.3309364914894104,
0.15981967747211456,
-0.7126078009605408,
0.9761332869529724,... |
def name ( self, name ) : if name is none : raise valueerror ( " invalid value for ` name `, must not be ` none ` " ) # noqa : e501 if name is not none and len ( name ) > 50 : raise valueerror ( " invalid value for ` name `, length must be less than or equal to ` 50 ` " ) # noqa : e501 if name is not none and len ( nam... | [
-0.7300260066986084,
0.12350372970104218,
0.006763498764485121,
-0.0020760393235832453,
-0.7085065245628357,
-0.014308524318039417,
0.3326002061367035,
-0.1721816509962082,
0.5330101251602173,
0.9997556209564209,
-1.1231803894042969,
-0.4033253788948059,
0.17847909033298492,
0.668862998485... |
def m ( n : int ) - > tuple : lst = [ ] if n = = 1 : lst. append ( ( 1, 0 ) ) else : for i in range ( 1, n ) : lst. append ( ( 2 * m ( n - i ) [ 0 ] + 2 * * i - 1, i ) ) return min ( lst ) | [
-1.7501883506774902,
0.2872755527496338,
0.29100269079208374,
0.6042536497116089,
-0.5182932615280151,
-0.48336002230644226,
0.004016696009784937,
-0.2068268358707428,
0.283020555973053,
-0.39174884557724,
-0.7038801908493042,
-1.1755073070526123,
-0.8317975997924805,
0.9072549343109131,
... |
def load ( path ) : # noinspection pytypechecker r = seqdataset ( none, none, none ) r. data = torch. load ( path ) return r | [
0.12070630490779877,
-0.31764692068099976,
0.17157961428165436,
-0.6146727204322815,
-1.3743078708648682,
-0.4007270932197571,
0.22313158214092255,
0.34403863549232483,
0.2420588880777359,
-0.9524071216583252,
-0.2657025158405304,
-0.02231210097670555,
-0.7772979736328125,
-0.7361264824867... |
def delete _ flight ( flight _ id : str ) - > tuple [ str, int ] : with db as tx : flight = tx. flights. pop ( flight _ id, none ) if flight is none : return ( flask. jsonify ( deleteflightresponse ( result = deleteflightresult. failed, notes = " flight { } does not exist ". format ( flight _ id ), ) ), 200, ) # delete... | [
-0.4916253387928009,
-0.3334132730960846,
0.7298480868339539,
0.2437392771244049,
-0.20764578878879547,
-0.5931779146194458,
0.23488837480545044,
0.34450095891952515,
0.692952036857605,
-0.04876398295164108,
0.6861426830291748,
-0.04380541294813156,
-0.2617530822753906,
0.828437089920044,
... |
def _ _ init _ _ ( self, num _ units, forget _ bias = 1. 0 ) : self. _ num _ units = num _ units self. _ forget _ bias = forget _ bias | [
0.789389431476593,
0.43640202283859253,
0.46142059564590454,
0.23634232580661774,
0.5046745538711548,
-0.07773900777101517,
0.6454094052314758,
0.24599477648735046,
-0.1280076652765274,
0.1466667503118515,
-0.38085123896598816,
0.0952291265130043,
-0.2117776870727539,
-0.07887961715459824,... |
def test _ large _ payload ( self ) : self. skiptest ( " see if there's a way to do this without the ram usage. " ) valid _ payload = " # " * singlerequestmessage. payload _ max _ length message = singlerequestmessage ( request _ id = " 0001 ", operation = " echo ", payload = valid _ payload ) # this shouldn't raise an... | [
0.0032243782188743353,
1.4605727195739746,
0.5097643733024597,
-0.24953687191009521,
0.010110621340572834,
0.28834208846092224,
-0.3264838755130768,
-0.09126920253038406,
0.6711406111717224,
-0.5818648338317871,
0.06776344031095505,
-0.30701225996017456,
-0.027347475290298462,
0.3805745840... |
def pde ( self, ht, hs, pack, mul = 2. 0, grid ='cn') : if not isinstance ( ht, float ) or ht < = 0. 0 : raise valueerror ('time mesh must be positive float.') if not isinstance ( hs, float ) or hs < = 0. 0 : raise valueerror ('price mesh must be positive float.') if not isinstance ( mul, float ) or mul < = 1. 0 : rais... | [
-0.33324819803237915,
0.6622926592826843,
0.8935697078704834,
0.1402231603860855,
0.5873165726661682,
0.42135921120643616,
0.49835506081581116,
-0.45872762799263,
-0.2743818759918213,
0.3568093776702881,
-0.08115161210298538,
0.19289404153823853,
-0.20628096163272858,
0.18564562499523163,
... |
def get ( self, key, lang = none ) : if lang is not none : default = none for o in self. graph. objects ( self. asnode ( ), key ) : default = o if o. language = = lang : return o return default else : for o in self. graph. objects ( self. asnode ( ), key ) : return o | [
0.14877071976661682,
0.3897310197353363,
0.3617725968360901,
0.3001611828804016,
0.024550091475248337,
-0.7885518074035645,
-0.6346353888511658,
-0.6986293792724609,
-0.2947729527950287,
0.6458203196525574,
-0.24488632380962372,
-0.20588521659374237,
-0.9683293104171753,
-0.235191300511360... |
def print _ first _ point ( filename ) : # print city name for reference city = filename. split ('-') [ 0 ]. split ('/') [ - 1 ] print ('\ ncity : { } '. format ( city ) ) with open ( filename,'r') as f _ in : # # todo : use the csv library to set up a dictreader object. # # # # see https : / / docs. python. org / 3 / ... | [
0.37133798003196716,
-1.1676015853881836,
0.7612468004226685,
-1.1215585470199585,
-0.26096710562705994,
0.5155432820320129,
-0.1325427144765854,
0.4982300400733948,
-0.5341415405273438,
0.16444149613380432,
-0.14157788455486298,
0.44200581312179565,
0.41370758414268494,
0.4070254564285278... |
def registercyclehandler ( self, handler ) : if handler not in self. _ cyclehandlers : self. _ cyclehandlers. append ( handler ) | [
-0.738690972328186,
0.5016403198242188,
0.3143238127231598,
0.44830137491226196,
-0.11642058938741684,
1.0622189044952393,
0.1889062523841858,
-1.1155601739883423,
-0.11739657819271088,
-0.9779043793678284,
-1.023581862449646,
0.45139241218566895,
-0.7397538423538208,
0.782584011554718,
... |
def _ is _ component _ enabled ( self, node : node, component _ name : str, kit _ name : str ='base') - > bool : for component in node. softwareprofile. components : if component. name = = component _ name and \ component. kit. name = = kit _ name : return true return false | [
0.5480680465698242,
-0.3416842520236969,
0.4734446108341217,
0.18856902420520782,
-0.035599589347839355,
-0.18931648135185242,
-0.9670405983924866,
0.9812158346176147,
0.10484021157026291,
0.35223624110221863,
0.027848465368151665,
-0.11087505519390106,
-0.4450429379940033,
0.6693954467773... |
def sort _ set _ by _ list ( s, l, keep _ duplicates = true ) : if keep _ duplicates : return [ e for e in l if e in s ] else : res = [ ] s = s. copy ( ) for e in l : if e in s : res. append ( e ) s. remove ( e ) return res | [
0.005680988542735577,
0.02735157683491707,
0.6318266987800598,
0.2750946283340454,
-0.9857345223426819,
-0.2867428660392761,
-0.6042590737342834,
-0.41613703966140747,
0.44158270955085754,
0.9079862236976624,
-0.6113402247428894,
0.614008903503418,
0.3563426434993744,
-0.0809561014175415,
... |
def othernumber ( self, n ) : newn = 0 if n = = 1 : newn = 2 elif n = = 2 : newn = 1 return newn | [
-1.4249913692474365,
-0.1779649406671524,
0.624061107635498,
0.8913993835449219,
0.29493895173072815,
0.09950415790081024,
0.6387010812759399,
-0.3502143621444702,
0.24413079023361206,
-0.7637239694595337,
-0.753266453742981,
0.38691383600234985,
-0.5976206660270691,
1.7051349878311157,
... |
def show _ hbnb _ filters ( ) : data = storage. all ('state') states = [ v for k, v in data. items ( ) ] data = storage. all ('amenity') amenities = [ v for k, v in data. items ( ) ] return render _ template ('10 - hbnb _ filters. html ', states = states, amenities = amenities ) | [
-0.09231197834014893,
0.2519106864929199,
0.5349013805389404,
-0.34714004397392273,
0.2893992066383362,
0.4915207028388977,
-0.5712293386459351,
0.6057057976722717,
-0.35143548250198364,
0.6435809135437012,
0.3209323585033417,
0.2950550317764282,
0.2803264856338501,
0.3603474497795105,
-... |
def kahan _ sum ( list _ of _ floating _ point _ numbers ) : suma = 0. 0 c = 0. 0 for i in range ( 0, len ( list _ of _ floating _ point _ numbers ) ) : y = list _ of _ floating _ point _ numbers [ i ] - c t = suma + y c = ( t - suma ) - y suma = t return suma | [
0.6113090515136719,
-0.20498637855052948,
0.5611403584480286,
0.9153217077255249,
-0.02377629280090332,
0.48897188901901245,
1.004292607307434,
-0.04284005984663963,
-0.3184153437614441,
0.45292624831199646,
-1.076886773109436,
-0.3827263116836548,
-0.30174529552459717,
1.100068211555481,
... |
def _ _ contextmenusaveas ( self ) : if self. contextmenueditor : self. vm. saveaseditored ( self. contextmenueditor ) | [
-0.3539734482765198,
-0.2766682207584381,
0.4571119546890259,
0.23248291015625,
0.06497956812381744,
-0.4188762605190277,
0.09472636878490448,
0.3715251386165619,
-0.053182173520326614,
0.490846186876297,
0.2300053834915161,
0.25616174936294556,
-0.7147943377494812,
-0.18834008276462555,
... |
def _ clicked ( self, event ) : self. _ user _ key ( int ( event. objectname ( ) [ 11 ] ) ) | [
-0.3252178132534027,
-0.012585212476551533,
0.26006487011909485,
-0.22693520784378052,
-0.08121786266565323,
-0.10825895518064499,
1.2943683862686157,
-0.6205131411552429,
0.2866087853908539,
0.6914433240890503,
-0.8763769865036011,
0.36232686042785645,
0.8421115875244141,
-0.6532654762268... |
def process _ ipfuzzing _ octal ( self, text ) : ips = re. findall ( " \ d { 1, 3 } \. \ d { 1, 3 } \. \ d { 1, 3 } \. \ d { 1, 3 } ", text ) for ip in ips : text = text. replace ( ip, str ( self. _ ipoctalencode ( ip ) ) ) return text | [
-0.5729824900627136,
-0.6379574537277222,
0.5701059699058533,
-0.17660096287727356,
-0.7602851986885071,
-0.6448296904563904,
-0.10189954936504364,
0.3944120705127716,
0.28668344020843506,
0.40157008171081543,
0.13692526519298553,
-0.9357571005821228,
-0.2679700255393982,
-0.91413074731826... |
def staff _ sum _ list ( cls, current _ page, is _ split = true, * * search _ info ) : date _ min = search _ info ['begin _ time'] date _ max = search _ info ['end _ time'] flag = false if'new _ protect'in search _ info : flag = true new _ protect = search _ info. pop ('new _ protect') measure _ staff _ qs = cls. searc... | [
-0.5967702269554138,
-0.045277200639247894,
0.9676439762115479,
0.3459570109844208,
-0.08562813699245453,
0.5147616267204285,
-0.217362180352211,
-0.2048310488462448,
-0.028759028762578964,
0.6777349710464478,
-0.20483754575252533,
-0.5561354160308838,
-0.17680679261684418,
0.8264619112014... |
def log _ normal _ pdf ( xs, mu, sigma ) : alpha = ( xs - mu ) * np. reciprocal ( sigma ) return ( log _ inv _ sqrt _ 2pi - np. log ( sigma ) + ( - 0. 5 * alpha * alpha ) ) | [
0.39413145184516907,
-0.6532472968101501,
0.49989053606987,
-0.5298211574554443,
-1.4601348638534546,
-0.6736152768135071,
-1.0478595495224,
0.7737464308738708,
0.1392471343278885,
0.16078555583953857,
0.7313694357872009,
0.7775726318359375,
-0.3268906772136688,
-1.4196900129318237,
-0.1... |
def test _ empty ( self ) - > none : id _ gen = self. _ create _ id _ generator ( ) # the table is empty so we expect an empty map for positions self. assertequal ( id _ gen. get _ positions ( ), { } ) | [
-0.9870197176933289,
0.06112121418118477,
0.12199190258979797,
-0.7522333860397339,
0.7700461149215698,
0.8250046968460083,
0.059264734387397766,
0.0557313933968544,
-0.8279851675033569,
-1.096053123474121,
-0.603683590888977,
-1.3320168256759644,
0.1603911817073822,
0.05510228872299194,
... |
def hyperparam _ evaluation ( model : callable, x _ in, y _ in, hyperparams : dict, other _ kwds : dict = dict ( ), fit _ predict _ kwds : dict = dict ( ), fit _ predict _ evaluate _ kwds : dict = dict ( ) ) - > pd. dataframe : # ordered to make sure we preserve the naming when returning the parameter combinations hype... | [
-0.16090063750743866,
0.038093943148851395,
0.7597970962524414,
0.7888476252555847,
-0.006748114246875048,
-0.043274663388729095,
-0.6251816749572754,
0.3314334750175476,
-0.7768768072128296,
0.37063050270080566,
0.014341642148792744,
0.4195815622806549,
0.17315208911895752,
-0.03631395474... |
def test _ cant _ update _ branch _ invalid _ id ( self ) : json _ response = api _ call ( self, " put ",'/ branch / update ', dict ( id = 257, capacity = 25 ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 404 ) self. assertequal ( json _ response [ " message " ], " branch not found " ) | [
-0.5794286727905273,
-0.31501975655555725,
0.6204226613044739,
0.31915611028671265,
0.2870621085166931,
1.400546669960022,
-0.6735012531280518,
0.27294814586639404,
-0.1733706146478653,
-0.26056158542633057,
-0.9984111189842224,
0.5032156109809875,
-0.9858173727989197,
0.1692037284374237,
... |
def type ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " type " ) | [
0.9004611372947693,
0.39422792196273804,
0.352120041847229,
0.5082957148551941,
0.798453688621521,
0.6544904112815857,
0.31385141611099243,
-0.36475086212158203,
0.48763349652290344,
0.060487788170576096,
0.4900969862937927,
0.80482417345047,
-0.28954213857650757,
-0.9427587985992432,
-0... |
def isvector ( a ) : try : return a. ndim - a. shape. count ( 1 ) = = 1 except : return false | [
-0.907219409942627,
0.5748854875564575,
0.7436140179634094,
0.6625123620033264,
0.396901398897171,
0.1851852536201477,
0.9116073250770569,
0.3592187762260437,
1.3829084634780884,
0.5599877238273621,
0.24230904877185822,
0.2912403345108032,
0.008233028464019299,
1.073222279548645,
-0.5100... |
def add _ list _ item ( shoppinglist _ id ) : # check that user is logged in if check _ if _ user _ logged _ in ( ) : form = createlistform ( ) user = session ['user _ email'] # post method : handle login form submission if form. validate _ on _ submit ( ) : try : # find the list we want to add items to mylist = shoppi... | [
-0.4040011763572693,
0.5331541299819946,
0.4080490469932556,
0.41620028018951416,
0.8013489246368408,
0.7032185196876526,
-0.5000723600387573,
0.6215193271636963,
0.7946388721466064,
-0.02466416358947754,
-0.39039286971092224,
-0.7871503829956055,
0.13307622075080872,
0.9988695383071899,
... |
def mode ( self ) - > optional [ str ] : return self. _ _ mode | [
-0.02962651289999485,
-0.029049236327409744,
0.3160775899887085,
-0.09808910638093948,
0.548726499080658,
1.5326926708221436,
-0.5550217032432556,
-0.2246972918510437,
0.562635064125061,
-0.2075081616640091,
0.6608365178108215,
-0.6668344736099243,
-0.1914268285036087,
-0.534904956817627,
... |
def split _ by _ species ( self, group ) : species = coll. defaultdict ( list ) for entry in group : name = entry ['species'] if name is none or name = = synthenic _ species _ id : name = synthenic _ species _ id species [ name ]. append ( entry ) self. logger. debug ( " found groups based on species : % s ", ', '. joi... | [
-0.3291945159435272,
0.4420265555381775,
0.5609604120254517,
-0.26930928230285645,
0.0040662167593836784,
-0.3209054470062256,
-0.27795520424842834,
-0.4822172522544861,
-0.8399725556373596,
0.15541723370552063,
-0.1529316008090973,
-0.3075169324874878,
-0.39787280559539795,
0.533560395240... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.