text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def read _ annotation ( self, annotation _ type = false ) : if not annotation _ type : annotation _ type = detect _ type ( self. path ) if annotation _ type = = " asap " : parsed = parsers. asapannotation ( self. path ) elif annotation _ type = = " wsidissector " : parsed = parsers. wsidissectorannotation ( self. path ... | [
-0.526189386844635,
-1.3092440366744995,
0.6350002884864807,
0.11780847609043121,
0.28928694128990173,
-0.014020655304193497,
0.46859002113342285,
-0.013856732286512852,
0.1637994647026062,
-0.3712306618690491,
-0.2591192424297333,
0.544762134552002,
0.24607731401920319,
0.2926722764968872... |
def find _ recent _ bias ( redd, fname, destdir ) : # default return value ret = false # make sure the file doesn't already exist in destdir local _ file = glob. glob ( os. path. join ( destdir, fname ) ) if len ( local _ file ) = = 1 : print ( " % s already exists in % s " % ( fname, destdir ) ) ret = true # search in... | [
0.03994893282651901,
0.5438252687454224,
0.9883095026016235,
-0.669589638710022,
-0.1191018596291542,
-0.03298017010092735,
0.6818087100982666,
0.8592065572738647,
-0.0373796746134758,
-0.10695142298936844,
0.2442174255847931,
-0.09473316371440887,
-0.4469577968120575,
0.8869212865829468,
... |
def _ generate _ random _ path ( self ) : particle _ path, time _ path = self. path _ generator. generate _ random _ path ( ) return particle _ path, time _ path | [
-0.7003094553947449,
-0.5483238101005554,
0.46285516023635864,
-0.20389413833618164,
0.031099895015358925,
0.9827747344970703,
0.3112834393978119,
0.5807390213012695,
-0.17907238006591797,
-0.11388851702213287,
-0.2328452318906784,
-0.7472305297851562,
-0.4652535915374756,
0.64534831047058... |
def _ filter _ exclude _ indices ( categorical _ indices _ set : indicestype, numerical _ indices _ set : indicestype, exclude : union [ none, str, int, list [ union [ str, int ] ] ], all _ indices : indicestype ) - > tuple [ indicestype, indicestype ] : assert isinstance ( categorical _ indices _ set, set ),'this has ... | [
-0.48245367407798767,
0.18625424802303314,
0.7178206443786621,
-0.1118282824754715,
-0.9061790704727173,
0.38992881774902344,
-0.10914996266365051,
0.05451027303934097,
-0.07517511397600174,
0.3710387647151947,
0.875771164894104,
1.017797827720642,
-0.40660911798477173,
-0.4850295186042785... |
def read _ file ( path ) : with open ( path, " r ", encoding = " utf - 8 ", errors ='ignore') as f : general _ list = [ ] for line in f : general _ list. append ( line. strip ( ). split ( " \ t " ) ) general _ list = general _ list [ 14 : ] return general _ list | [
0.034849103540182114,
-0.18096108734607697,
0.4749686121940613,
-0.8595177531242371,
0.0804012268781662,
0.8470583558082581,
-0.7434880137443542,
0.5996724367141724,
-1.0599417686462402,
0.6408351063728333,
-0.11837366968393326,
0.22567488253116608,
0.9417222142219543,
-0.2203419804573059,... |
def interpret ( self, data ) : if " disconnected " in data : raise systemexit ( " disconnected from server " ) if self. state = = " initial " : # if this is the first iteration, we need to ask the guesser to rank the options. self. guesser. new _ guess ( data ) # get the most likely object ( guess _ id, guess _ x, gues... | [
0.02747265063226223,
-0.6332956552505493,
0.6660939455032349,
0.8000141978263855,
0.6014539003372192,
-0.03561736270785332,
0.27993401885032654,
0.7278444766998291,
-0.1966400146484375,
-0.3729022443294525,
-0.1333727389574051,
0.23223890364170074,
-0.3699154257774353,
0.326564222574234,
... |
def process _ cmd ( self, data ) : _ = self. dim if data. startswith ('/') : cmd, * args = data. split ( none, 1 ) # prepare output buffer for command output, only a carriage return # followed by a clear _ eol sequence is displayed on empty string. self. display _ text ('' ) return self. command ( cmd [ 1 : ], * args )... | [
-0.22115543484687805,
0.12893234193325043,
0.6460084319114685,
-0.14379243552684784,
-0.6314966082572937,
-0.523260772228241,
0.43953558802604675,
-0.7051547169685364,
0.25068560242652893,
-0.5466760993003845,
0.745352029800415,
0.030188998207449913,
-0.24210993945598602,
0.640607535839080... |
def get _ index ( ) : series _ list = [ ] data = fetch _ url ( config. index _ url ) data = data. replace ('\ n ','' ) token = re. findall ( r " <! - - body content - - > (. * ) <! - - / / body content - - > ", data ) [ 0 ] token2 = re. findall ( r'< div class = " bd " id = " atoz " > (. * ) < / div > ', token ) [ 0 ] ... | [
-1.2145124673843384,
-0.055109020322561264,
0.5222532153129578,
-0.15071316063404083,
0.5566473603248596,
-0.051996130496263504,
-0.4047892093658447,
0.23903557658195496,
0.3427031338214874,
-0.05926986783742905,
-0.6779696345329285,
0.7734159231185913,
0.4667496979236603,
-0.4285735487937... |
def advance _ to _ year ( self, year ) : iteration = year - self. current _ year if iteration < 0 : raise valueerror ('new current year must be'+'greater than current year!') for _ in range ( iteration ) : self. increment _ year ( ) assert self. current _ year = = year | [
-0.50203537940979,
-0.24316541850566864,
0.5677492618560791,
0.13353963196277618,
0.2444869726896286,
1.3394955396652222,
0.44161298871040344,
-0.38787642121315,
0.18432316184043884,
-0.22303730249404907,
0.27683472633361816,
0.35408416390419006,
-0.42060545086860657,
0.7721318602561951,
... |
def filter ( self, text ='' ) : logger. log ( 5, " filter table with ` % s `. ", text ) self. eval _ js ('table. filter _ ( " { } ", true ) ; '. format ( text ) ) | [
0.37542402744293213,
0.78448885679245,
0.16263437271118164,
0.46108949184417725,
-1.278262972831726,
-0.831169843673706,
0.5035626292228699,
0.3065508008003235,
-0.7403542399406433,
0.7051892876625061,
-0.615677535533905,
0.4874666929244995,
0.313675194978714,
-0.06818316131830215,
-0.80... |
def seek ( self, size = 1 ) : self. ptrread + = size if ( self. ptrread > = self. len ) and ( self. ptrpush < 0 ) : # empty buffer self. empty ( ) | [
-0.11381889134645462,
0.6114146709442139,
0.7533223628997803,
-0.4740159213542938,
0.05164666473865509,
0.8641940951347351,
0.7454460263252258,
-1.3414654731750488,
0.3089815676212311,
-1.410133957862854,
-0.06919495761394501,
0.46984511613845825,
-1.3154977560043335,
-0.36625686287879944,... |
def unambiguous _ words ( self ) : # work here!! | [
0.22248035669326782,
-0.1232316642999649,
0.22063863277435303,
-0.09098882973194122,
0.8067387342453003,
0.5776185989379883,
0.9925060272216797,
0.7789638042449951,
0.1957460641860962,
1.0117745399475098,
-0.11855743825435638,
-0.2530643343925476,
-0.6809248328208923,
1.2374061346054077,
... |
def panel _ entry ( self ) - > panelentry | none : return self. _ panel _ entry | [
1.3993808031082153,
-0.5815458297729492,
0.19951695203781128,
-0.22723208367824554,
0.44824036955833435,
0.2853028476238251,
0.7664157748222351,
-0.8236590027809143,
-0.07759174704551697,
-0.29875949025154114,
0.7670720815658569,
0.9295843243598938,
-0.6879873275756836,
0.03659120574593544... |
def merge ( self, nums1, m, nums2, n ) : p1 = m - 1 p2 = n - 1 p3 = m + n - 1 while p1 > = 0 and p2 > = 0 : if nums2 [ p2 ] > = nums1 [ p1 ] : nums1 [ p3 ] = nums2 [ p2 ] p2 - = 1 else : nums1 [ p3 ] = nums1 [ p1 ] p1 - = 1 p3 - = 1 if p1 < 0 : nums1 [ 0 : p3 + 1 ] = nums2 [ 0 : p2 + 1 ] | [
-0.27318552136421204,
-0.08848197013139725,
0.639651358127594,
0.845701277256012,
-0.1981201469898224,
1.0015684366226196,
-0.7713274359703064,
0.2654036283493042,
-0.41417407989501953,
-0.1617058962583542,
-0.6035665273666382,
0.40884894132614136,
-0.4066694378852844,
0.05116644874215126,... |
def test _ delete _ key ( self ) : self. api. delete _ key ( id = " 8486fea1 - b334 - 4c5d - 8eed - 8745bf04dcb1 " ) pass | [
-0.2579536736011505,
0.12411648035049438,
0.08430644869804382,
0.302494615316391,
0.5377632975578308,
0.1222931519150734,
-0.24645893275737762,
-0.06841326504945755,
0.20537841320037842,
-0.2143096923828125,
-0.23595324158668518,
0.3446163237094879,
-0.7439426183700562,
0.26114270091056824... |
def f7 ( seq ) : seen = set ( ) seen _ add = seen. add return [ x for x in seq if x not in seen and not seen _ add ( x ) ] | [
0.13500365614891052,
-0.5128459930419922,
0.4577491879463196,
0.12290254980325699,
-0.5897961258888245,
-0.14157238602638245,
0.14116936922073364,
-0.03494923934340477,
0.9866121411323547,
0.8892489671707153,
-1.0277420282363892,
-0.25467196106910706,
0.8021214604377747,
0.5932216644287109... |
def test _ stairs _ at _ location ( self ) : lvl = level ( 1, 10, 10, none ) lvl. add _ room ( 0, room ( pos ( 0, 0 ), pos ( 7, 7 ) ) ) lvl. add _ stairs ( pos ( 5, 5 ) ) assert lvl. is _ stairs ( pos ( 5, 5 ) ) assert not lvl. is _ stairs ( pos ( 0, 0 ) ) self. asserttrue ( true ) | [
0.5122888684272766,
-0.5615894198417664,
0.46069762110710144,
-0.30183538794517517,
0.6243171691894531,
0.994616687297821,
0.24642780423164368,
0.15584157407283783,
-0.29427939653396606,
-0.17135344445705414,
-1.1390552520751953,
-0.4374751150608063,
-0.11081104725599289,
0.940255343914032... |
def clear ( self ) : self. _ write _ command ( [ lcdbackpack. clear _ display ] ) | [
0.6174615025520325,
0.7752545475959778,
0.28960660099983215,
0.43986383080482483,
0.03736414015293121,
0.6988463997840881,
0.8273968696594238,
-0.8733585476875305,
0.42957833409309387,
-0.578327476978302,
0.4842575192451477,
1.3283923864364624,
-0.8287631869316101,
-0.061859410256147385,
... |
def current ( self ) : return self. _ current | [
-0.4743591547012329,
-1.6281605958938599,
0.3843855857849121,
-0.12533608078956604,
0.4232957065105438,
1.5438988208770752,
1.5899932384490967,
-0.48274174332618713,
-0.7167954444885254,
-0.7519290447235107,
0.5815200805664062,
1.0769771337509155,
-0.43700650334358215,
-1.0239989757537842,... |
def send _ update _ message ( peer _ ip ) : log. debug ('try to send update message to peer % s ', peer _ ip ) json _ request = flask. request. get _ json ( ) attr = json _ request. get ('attr') nlri = json _ request. get ('nlri') withdraw = json _ request. get ('withdraw') if attr : attr = { int ( k ) : v for k, v in ... | [
-1.2463468313217163,
-0.12198878824710846,
0.6853369474411011,
-0.3537887930870056,
0.21044443547725677,
-0.4975038468837738,
-0.2607215642929077,
-1.2591801881790161,
-0.08172376453876495,
0.5157424211502075,
0.3941156566143036,
-0.7450589537620544,
-0.7753851413726807,
0.5687728524208069... |
def user _ has _ get _ permission ( self, batch _ id, conn ) : from jdma _ control. models import migration # groupworkspace permission gws _ permission = backend. _ user _ has _ get _ permission ( self, conn. jdma _ user, conn. jdma _ workspace. workspace ) # get the batch name and try to change to that directory migr... | [
0.03451172634959221,
0.6053962707519531,
0.5806894302368164,
0.4717419743537903,
-0.4276083707809448,
0.09812644124031067,
-0.3184235394001007,
-0.782066822052002,
-0.1458035707473755,
-0.004299221560359001,
0.28893232345581055,
0.9379660487174988,
-0.2183215618133545,
0.8121711015701294,
... |
def definestyle ( odrawdoc, cstylefamily, cstylename, cparentstylename = none ) : ostylefamily = odrawdoc. getstylefamilies ( ). getbyname ( cstylefamily ) # does the style already exist? if ostylefamily. hasbyname ( cstylename ) : # then get it so we can return it. ostyle = ostylefamily. getbyname ( cstylename ) else ... | [
0.18435510993003845,
-0.05322149395942688,
0.5754293203353882,
0.35761138796806335,
-0.6891507506370544,
-0.2143833339214325,
-0.4089747369289398,
-0.41756927967071533,
0.07728148251771927,
-0.29057183861732483,
0.15660634636878967,
-0.2886790931224823,
-0.5949886441230774,
-0.183380246162... |
def txt _ to _ csv ( self ) : _ conll _ to _ csv ( txt _ file _ path = self. _ in _ data _ dir + " / train. txt ", out _ dir = self. _ out _ train _ dir ) _ conll _ to _ csv ( txt _ file _ path = self. _ in _ data _ dir + " / test. txt ", out _ dir = self. _ out _ test _ dir ) _ conll _ to _ csv ( txt _ file _ path = s... | [
0.149363711476326,
-0.03861801326274872,
0.4200281798839569,
0.1502116322517395,
-0.04408154636621475,
0.4758930504322052,
0.3143281936645508,
1.0516921281814575,
-1.2231031656265259,
0.18729448318481445,
-0.03291689604520798,
0.24197916686534882,
0.16690360009670258,
0.20384551584720612,
... |
def sample ( self, inpt = [ ], n _ step _ mc = 1, p _ 0 = 0. 5, p _ 1 = 0. 5 ) : if len ( inpt ) = = 0 : # inpt = tf. constant ( np. random. randint ( 2, size = self. _ v _ dim ), tf. float32 ) inpt = tf. constant ( np. random. choice ( [ 0, 1 ], size = self. _ v _ dim, p = [ p _ 0, p _ 1 ] ), tf. float64 ) hidden _ pr... | [
-0.08308133482933044,
0.15076835453510284,
0.6145315766334534,
0.23126450181007385,
-0.622108519077301,
0.1655092090368271,
0.6535608768463135,
0.39766591787338257,
0.22830019891262054,
1.0639299154281616,
-0.3975907862186432,
0.45736396312713623,
-0.2772729694843292,
0.5748964548110962,
... |
def _ _ repr _ _ ( self ) - > str : return " graphqlnonnull ( gql _ type = {! r } ) ". format ( self. gql _ type ) | [
0.8776465654373169,
-1.3893426656723022,
0.3173007071018219,
-1.1925820112228394,
-0.34051522612571716,
0.13354617357254028,
-0.5072181820869446,
-0.9542747735977173,
0.43850335478782654,
1.0353999137878418,
0.1861598640680313,
1.0287797451019287,
-0.006334652192890644,
0.11359674483537674... |
def mm _ move ( board, player ) : winner = board. check _ win ( ) move = ( ) score = 0 empty _ board = board. get _ empty _ squares ( ) best _ move = ( ) if winner! = none : if winner = = provided. playerx : score = scores [ provided. playerx ] if winner = = provided. playero : score = scores [ provided. playero ] if w... | [
-0.2303948700428009,
-0.5435483455657959,
1.0265252590179443,
1.22648286819458,
-0.7204753160476685,
-0.45589736104011536,
0.316928893327713,
-0.13996228575706482,
0.5740959048271179,
0.7149508595466614,
-0.08246611058712006,
0.6253824234008789,
-0.36494433879852295,
-0.05909416079521179,
... |
def getstartstate ( self ) : # a state is a list of stacks state = [ ] for i in range ( self. stacknum ) : state. append ( [ ] ) # select tiles to put in blocks for elem in range ( self. count ) : stack _ index = int ( random. random ( ) * self. stacknum ) state [ stack _ index ]. append ( elem ) # print " start at : "... | [
-0.4778709411621094,
0.24057820439338684,
0.7029174566268921,
0.24248753488063812,
-0.2960740029811859,
-0.2021815925836563,
0.8213307857513428,
-0.4180845022201538,
1.0077052116394043,
-0.15492814779281616,
-1.0391783714294434,
-0.03751778230071068,
-0.42561081051826477,
0.176619306206703... |
def get _ census _ variables ( year, dataset, geography, area, variables, variable _ labels = none ) : base _ url ='https : / / api. census. gov / data / { } / { } '. format ( year, dataset ) # define parameters get _ parameter = ', '. join ( ['name'] + variables ) for _ parameter ='{ } : * '. format ( geography ) in _... | [
-0.4918210208415985,
-0.28744587302207947,
0.6161682605743408,
-0.5549810528755188,
-0.22158882021903992,
-0.4645622968673706,
-0.8776466846466064,
-0.15577587485313416,
-0.1767417937517166,
0.9116661548614502,
0.6056444644927979,
1.0698375701904297,
-0.19292794167995453,
0.079641632735729... |
def fill _ diago ( m, v ) : for i in range ( m. shape [ 0 ] ) : m [ i, i ] = v return m | [
-0.3990699350833893,
0.4333589971065521,
0.6065265536308289,
-0.36728987097740173,
0.3365594744682312,
-0.10990513116121292,
-0.04874417185783386,
0.6533841490745544,
-0.13502861559391022,
0.6513679027557373,
-0.18620584905147552,
0.4750402569770813,
0.323848158121109,
-0.2921728193759918,... |
def token _ databases _ parser ( ) - > argparse. argumentparser : parser = argparse. argumentparser ( add _ help = false ) parser. add _ argument ('databases ', metavar ='elf _ or _ token _ database ', nargs ='+ ', action = _ loadtokendatabases, help = ('elf or token database files from which to read strings and'' toke... | [
0.16456033289432526,
-0.07844799757003784,
0.4895930588245392,
-1.1159783601760864,
-0.37151777744293213,
0.14843901991844177,
-0.31128251552581787,
0.6685690879821777,
-0.14862793684005737,
-0.2659645676612854,
0.42128607630729675,
0.39808520674705505,
-0.393216609954834,
0.23753315210342... |
def _ _ contains _ _ ( self, word ) : result = self. _ _ binary _ search ( word ) if result! = - 1 : return true return false | [
-0.5426364541053772,
0.35897648334503174,
0.478279173374176,
0.737453043460846,
-0.6837643384933472,
0.6096471548080444,
0.05926070734858513,
-0.4573114216327667,
-0.3920164704322815,
-0.7578603029251099,
-0.3415312170982361,
-0.2287905067205429,
-1.4707731008529663,
0.6039098501205444,
... |
def test _ evaluateexpression ( self ) : # case a script is successfully evaluated - should return true account = cryptoaccount ( ) # the test account used # create the transaction hash and the signature transactionhash = tlcutilities. getdoublehash256asstring ('transaction content') signature = tlcutilities. gethashsi... | [
0.2911570072174072,
0.1137276440858841,
0.5742803812026978,
-0.5888131260871887,
-0.2564450204372406,
-0.29945680499076843,
-0.07928472012281418,
0.5410507917404175,
0.3344196379184723,
0.5870092511177063,
-0.6893126368522644,
0.3308785855770111,
-0.5953715443611145,
0.1159457415342331,
... |
def get _ revision ( ) : vcs, revision, tag = none, none, none gitdir = os. path. join ( basedir, '.. ', '. git') if os. path. isdir ( gitdir ) : vcs ='git'# for now, we are not bothering with revision and tag. vcs _ info = ( vcs, ( revision, tag ) ) return revision, vcs _ info | [
0.4984178841114044,
-0.7053304314613342,
0.45681607723236084,
0.07915827631950378,
0.12400257587432861,
-0.5939714908599854,
-0.30024614930152893,
0.16372595727443695,
-0.40033555030822754,
-0.11492814123630524,
-0.5037862062454224,
-0.3025514483451843,
0.09163044393062592,
0.1992066502571... |
def count _ types ( corpus ) : list _ type = [ ] for sentence in corpus : for word in sentence : if word not in list _ type : list _ type. append ( word ) return len ( list _ type ) | [
0.49218448996543884,
0.10906034708023071,
0.7304914593696594,
-0.22206181287765503,
0.8754644393920898,
0.14768345654010773,
-0.07647356390953064,
1.1114968061447144,
-0.016367048025131226,
1.0618783235549927,
-1.5820590257644653,
-0.20046000182628632,
-0.9575660228729248,
2.01172327995300... |
def test _ correct _ failure _ and _ errors ( self ) : reporter = yield self. get _ reporter _ with _ suite _ run ( ) fail _ assert _ result = self. get _ result _ by _ test _ name ( reporter. failures,'statustest _ fail _ assert') self. asserttrue ('failure ', fail _ assert _ result [ 0 ] ) self. assertequals ( fail _... | [
-0.08778369426727295,
-0.21169447898864746,
0.47668248414993286,
0.26758459210395813,
0.607704222202301,
0.11911190301179886,
-0.20339101552963257,
0.731819748878479,
0.10536232590675354,
-0.3672243654727936,
-0.11325468122959137,
-0.483946293592453,
-0.6031323075294495,
0.7976537942886353... |
def _ get _ port _ definitions ( app ) : if'portdefinitions'in app : return app ['portdefinitions'] # in the worst case try use the old ` ports ` array # only useful on very old marathons if'ports'in app : return app ['ports'] return none | [
1.519417643547058,
0.20621854066848755,
0.3228340148925781,
0.514080822467804,
0.4284477233886719,
-0.7540966272354126,
-0.40587669610977173,
-0.743351399898529,
0.6220709681510925,
0.15721739828586578,
0.3732866644859314,
0.27676936984062195,
0.6881893277168274,
0.7209085822105408,
0.46... |
def merge _ tags ( one, two ) : # keep tag with the non - uppercase name if one. name. isupper ( ) : one, two = two, one elif not two. name. isupper ( ) : if len ( one. name ) < len ( two. name ) : one, two = two, one one. club _ set. add ( * two. club _ set. all ( ) ) two. delete ( ) return one | [
-0.359210729598999,
0.1763545572757721,
0.8377993106842041,
0.40288230776786804,
0.4113299548625946,
0.22104795277118683,
-0.7403537034988403,
-0.6373279690742493,
-0.8662604689598083,
-0.10883325338363647,
-0.7130961418151855,
-0.1007661372423172,
-0.5778101682662964,
-0.28234463930130005... |
def _ init _ shared _ data ( self, spark _ context ) : model = cfc. parse _ pnml ('models / model1') self. initialize _ broadcast _ variable ( spark _ context, name ='model1 ', value = model ) | [
-0.2585870325565338,
0.5737889409065247,
0.2508833706378937,
0.7336039543151855,
0.30691495537757874,
0.23306547105312347,
0.7956212759017944,
0.318306565284729,
-0.3427611291408539,
-0.5180419683456421,
-1.0974524021148682,
0.6632717847824097,
0.046678297221660614,
0.7201172113418579,
-... |
def masknllloss ( input, target, mask ) : s = mask. sum ( ) crossentropy = - torch. log ( torch. gather ( input, 1, target. view ( - 1, 1 ) ). squeeze ( 1 ) ) loss = crossentropy. masked _ select ( mask ). mean ( ) loss = loss. to ( config. device ) return loss, s. item ( ) | [
-0.09686227142810822,
-0.7738392353057861,
0.4326913058757782,
0.35951149463653564,
-0.6202595233917236,
-0.32707884907722473,
-0.22265082597732544,
-0.49777767062187195,
0.8534508347511292,
0.3533913791179657,
-0.13679879903793335,
0.7148985862731934,
0.6294832825660706,
-0.49503973126411... |
def _ update _ type _ references ( self, namespace, name ) : if isinstance ( name, ast. typedef ) : self. _ update _ type _ references ( name. namespace, name. type ) elif isinstance ( name, ast. primitivetype ) : pass elif isinstance ( name, ast. complextype ) : self. _ update _ complextype _ references ( name ) elif ... | [
-1.3351889848709106,
-0.5960791110992432,
0.9262698292732239,
-0.8720138072967529,
-0.3059414327144623,
-0.8833932280540466,
0.22745229303836823,
-1.1066467761993408,
0.08989929407835007,
0.7554545998573303,
-0.30638083815574646,
0.3895527422428131,
-0.5704957842826843,
1.1693793535232544,... |
def tang ( x, y ) : tag = np. divide ( y, x ) return tag | [
0.5561227798461914,
-0.26772812008857727,
0.1702655553817749,
-0.37049785256385803,
0.7110483646392822,
-0.05132061243057251,
-0.6747872829437256,
-1.3713405132293701,
-0.7633554339408875,
0.6398177146911621,
0.19634178280830383,
-0.663089394569397,
0.7279131412506104,
-1.028578758239746,
... |
def forward ( self, x, available _ actions = none, deterministic = false, n _ actions = 0 ) : action _ logits = self. action _ out ( x, available _ actions ) if deterministic : actions = action _ logits. mode ( ) elif n _ actions > 0 : actions = action _ logits. sample ( sample _ shape = ( n _ actions, ) ) else : actio... | [
-0.11907009780406952,
-0.22155021131038666,
0.5953952670097351,
0.2506677508354187,
-0.45055440068244934,
0.19346219301223755,
-0.3097442388534546,
-0.2703580856323242,
0.6925516724586487,
0.2258438616991043,
-0.10021062940359116,
0.7769815921783447,
0.8202545046806335,
-0.3417680561542511... |
def upsample _ to _ repetitions ( sequence _ feature, repeats ) : device = infer _ device ( sequence _ feature ) batch _ size = sequence _ feature. shape [ 0 ] max _ seq _ len = sequence _ feature. shape [ 1 ] feat _ dim = sequence _ feature. shape [ 2 ] repeated _ lens = torch. sum ( repeats, dim = 1 ) max _ repeated ... | [
-0.529890239238739,
0.27003777027130127,
0.8160226345062256,
0.42583468556404114,
-0.17714904248714447,
-0.7638787031173706,
0.18118217587471008,
0.504332423210144,
0.3328459560871124,
0.3149277865886688,
-0.9835226535797119,
0.586690366268158,
0.4498651623725891,
-0.8445262312889099,
0.... |
def find _ requires ( ) - > list [ str ] : dir _ path = os. path. dirname ( os. path. realpath ( _ _ file _ _ ) ) reqs _ path = os. path. join ( dir _ path, " requirements. txt " ) with open ( reqs _ path,'r') as reqs : requirements = reqs. readlines ( ) return requirements | [
-0.43439459800720215,
-1.170900821685791,
0.8120379447937012,
-0.05939585343003273,
0.39050665497779846,
0.5272383093833923,
-0.15399037301540375,
0.2473737895488739,
-0.2546907961368561,
0.735776960849762,
-0.004802580922842026,
-0.27390027046203613,
0.13133254647254944,
1.147390246391296... |
def testemptyproperty ( self ) : conf = xml _ configuration. configuration. emptyconfiguration ( ) # empty string is considered a valid property value ( even though the xml # dom would return none as the text node of the property element. conf. setproperty ('key ','' ) self. assertequal ('', conf. getpropertyvalue ('ke... | [
-0.0045756078325212,
-0.14170198142528534,
0.21036456525325775,
-0.2689928710460663,
0.4588376581668854,
0.6713346242904663,
-0.4446646571159363,
0.023562798276543617,
-0.0374063141644001,
-0.29684415459632874,
0.09352128207683563,
-0.10456569492816925,
-0.2404661774635315,
-0.735029518604... |
def unzip ( source _ filename, dest _ dir ) : with zipfile. zipfile ( source _ filename ) as zf : for member in zf. infolist ( ) : # path traversal defense copied from # http : / / hg. python. org / cpython / file / tip / lib / http / server. py # l789 words = member. filename. split ('/') if words [ 0 ] = ='_ _ macosx... | [
0.2909274399280548,
0.10686319321393967,
0.4484546482563019,
0.024339614436030388,
-0.0618211105465889,
-0.9009055495262146,
0.317201167345047,
0.8840023279190063,
-0.36925700306892395,
0.13563871383666992,
0.009465738199651241,
-0.20050106942653656,
-0.06230435147881508,
0.165332511067390... |
def _ parse _ args ( ) : parser = argparse. argumentparser ( description ='optimization. py') parser. add _ argument ('- - func ', type = str, default ='quad ', help ='function to optimize ( quad or nn )') parser. add _ argument ('- - lr ', type = float, default = 1., help ='learning rate') parser. add _ argument ('- -... | [
0.1252833902835846,
0.5271883606910706,
0.4858943521976471,
-0.21880310773849487,
0.9776781797409058,
-0.25049227476119995,
-0.7310847043991089,
-0.31263846158981323,
-0.9131563901901245,
0.401503324508667,
-0.5903509259223938,
-0.18888252973556519,
0.12599638104438782,
0.5490365028381348,... |
def process ( self ) : self. refwell = well ( self. r [ 0 ], self. msevents, self. targets, self. parameters, self. corrections, self. gauss, self. ionmass ) self. refwell. process ( ) self. parameters ['minor peak detection threshold'] = 0. 001 if self. expt _ type! ='integrate': first _ step = true for d, a in zip ( ... | [
0.9152504205703735,
0.23770596086978912,
0.6211342811584473,
0.2696528434753418,
0.6997007131576538,
0.5069966316223145,
0.7423859238624573,
-0.24871458113193512,
0.7857786417007446,
0.4414811432361603,
0.17257019877433777,
0.34933409094810486,
-0.3908435106277466,
1.9028784036636353,
-0... |
def prepare _ refresh _ body ( self, body ='', refresh _ token = none, scope = none, * * kwargs ) : refresh _ token = refresh _ token or self. refresh _ token return prepare _ token _ request ('refresh _ token ', body = body, scope = scope, refresh _ token = refresh _ token, * * kwargs ) | [
-0.07701573520898819,
-0.14324036240577698,
0.566082239151001,
0.7177314162254333,
0.05475287139415741,
-0.9621552228927612,
-1.4068574905395508,
-1.3571356534957886,
1.2990531921386719,
0.27130356431007385,
-0.3952818214893341,
1.3872970342636108,
0.493895947933197,
0.24362967908382416,
... |
def test _ list _ decimal _ pattern _ 3 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 4. xsd ", instance = " nistdata / list / decimal / sc... | [
-0.4646930694580078,
0.23655061423778534,
0.6521320343017578,
0.4486415684223175,
0.1498931646347046,
0.02597409300506115,
-0.37906455993652344,
0.44673293828964233,
1.2429816722869873,
0.13157634437084198,
-0.908779501914978,
-1.033020257949829,
-0.19058269262313843,
0.014800077304244041,... |
def test _ platform _ map ( self ) : # create static mapping plugin _ settings [ " platform _ map " ] = { " cisco _ ios " : " ios ", " arista _ eos " : " eos ", " cisco _ nxos " : " cisco - nxos " } onboarding _ kwargs = { " netdev _ hostname " : " device1 ", " netdev _ nb _ role _ slug " : plugin _ settings [ " defaul... | [
-0.10000763833522797,
0.2344910204410553,
0.355734646320343,
0.809080958366394,
0.9480698704719543,
0.4999043345451355,
0.46798592805862427,
-0.32750803232192993,
0.050788428634405136,
-0.4759431779384613,
-1.1849470138549805,
-0.9177970290184021,
0.20328748226165771,
0.7822891473770142,
... |
def multiply _ no _ nan ( x, y, name = none ) : with ops. name _ scope ( name, " multiply _ no _ nan ", [ x, y ] ) as name : x = ops. convert _ to _ tensor ( x, name = " x " ) y = ops. convert _ to _ tensor ( y, name = " y ", dtype = x. dtype. base _ dtype ) x _ dtype = x. dtype. base _ dtype y _ dtype = y. dtype. base... | [
-0.6968948245048523,
0.5584079623222351,
0.9093459248542786,
0.046512871980667114,
-0.656948983669281,
0.09114295989274979,
-0.5408003330230713,
-0.842907726764679,
-0.4270585775375366,
0.5077990293502808,
-0.6952419281005859,
0.43946418166160583,
0.9073317050933838,
-0.4112533628940582,
... |
def grand _ total ( self ) : return self. _ grand _ total | [
-0.39678606390953064,
0.4702290892601013,
0.32369181513786316,
-0.7211450934410095,
0.9254114627838135,
1.4919273853302002,
0.1796524077653885,
-0.5498103499412537,
-0.37102368474006653,
0.04380731284618378,
-0.7440895438194275,
0.2070150524377823,
0.6586838960647583,
-1.0683434009552002,
... |
def set _ ffn _ input _ size ( self ) : if ( self. merge _ mode = = " add " ) : return self. cnn _ rnn _ class _ num if ( self. merge _ mode = = " substract " ) : return self. cnn _ rnn _ class _ num if ( self. merge _ mode = = " multiply " ) : return self. cnn _ rnn _ class _ num if ( self. merge _ mode = = " concat "... | [
-1.003686547279358,
0.29938817024230957,
1.051310658454895,
0.23199528455734253,
-0.07996781170368195,
0.09196072071790695,
1.0936944484710693,
-0.17686675488948822,
0.49937576055526733,
-0.9239610433578491,
-0.8172028064727783,
-0.18399575352668762,
-0.05374090000987053,
1.274568438529968... |
def get _ global _ link _ rotation _ function ( self, link : str, n : int = 1, numpy _ output : bool = false ) - > cs. function : return self. make _ function ( " r ", link, self. get _ global _ link _ rotation, n = n, numpy _ output = numpy _ output ) | [
-0.7419797778129578,
0.7720592617988586,
0.30818817019462585,
0.4979628622531891,
0.195719912648201,
-1.0157709121704102,
1.4498573541641235,
-0.5865170359611511,
0.09445560723543167,
-0.16796156764030457,
-0.35442468523979187,
1.2706893682479858,
-0.7775267362594604,
-0.8214579820632935,
... |
def updatedevicelocation ( self, typeid, deviceid, devicelocation ) : deviceurl = apiclient. deviceurllocation % ( self. host, typeid, deviceid ) r = requests. put ( deviceurl, auth = self. credentials, data = json. dumps ( devicelocation ), headers = {'content - type':'application / json'}, verify = self. verify ) sta... | [
-2.40270733833313,
-1.147768259048462,
0.5811286568641663,
-0.07856719940900803,
-0.5873020887374878,
-0.3084257245063782,
0.8245360255241394,
-0.6146710515022278,
0.1665663868188858,
0.8162896037101746,
-0.08465055376291275,
0.44200843572616577,
-1.0480345487594604,
-0.4859885573387146,
... |
def handle _ raw _ inbound _ message ( self, session _ id, linkid, inbound _ message ) : log. info ('receiving ussd via parlayx : % r : % r'% ( session _ id, inbound _ message, ) ) session _ event = self. determine _ session _ event ( inbound _ message. msgtype ) # send close message # # if session _ event = = transpor... | [
0.29467055201530457,
-0.3976163864135742,
0.9020410776138306,
-0.4638001620769501,
-0.6561998724937439,
0.19588877260684967,
-0.06800268590450287,
0.11624974012374878,
1.1445647478103638,
-0.4639762043952942,
0.05241371691226959,
0.9836975336074829,
0.22795036435127258,
-0.0754471346735954... |
def traverse _ tree _ level _ order ( self ) - > generator : position = self. get _ root ( ) if position is not none : for i in self. traverse _ subtree _ level _ order ( position ) : yield i | [
-0.05060722306370735,
-0.041014689952135086,
0.6377472281455994,
0.7887492775917053,
-0.2361326813697815,
-0.2413766086101532,
-0.5870275497436523,
-0.49581006169319153,
-0.900774359703064,
-0.32627686858177185,
-0.3551904261112213,
0.05989300459623337,
-0.23430486023426056,
0.727084696292... |
def add _ border ( frame : np. ndarray, color : tuple [ int, int, int ], pixel _ width : int ) : # set number of pixels of insets on respective side top, bottom, left, right = pixel _ width, pixel _ width, pixel _ width, pixel _ width image = cv2. copymakeborder ( frame [ top : - bottom, left : - right, : ], top, botto... | [
-0.029629075899720192,
0.48260220885276794,
0.6516198515892029,
0.3164137303829193,
0.20821180939674377,
0.34305503964424133,
-0.19531166553497314,
-1.1164946556091309,
0.9256324172019958,
0.017571335658431053,
-0.03457352891564369,
0.9889935255050659,
-0.669983983039856,
0.451305687427520... |
def vector _ to _ parameter _ list ( vec, parameters ) : # ensure vec of type tensor if not isinstance ( vec, torch. tensor ) : raise typeerror ('expected torch. tensor, but got : { } '. format ( torch. typename ( vec ) ) ) # flag for the device where the parameter is located param _ device = none params _ new = [ ] # ... | [
-0.4111892282962799,
-0.6451935768127441,
0.398739218711853,
0.021709658205509186,
0.4838731586933136,
-0.06038057059049606,
-0.05997901409864426,
0.4258041977882385,
-0.0020802400540560484,
1.5015207529067993,
-0.7093580365180969,
0.6741575598716736,
-0.0817389115691185,
0.108448006212711... |
def encodeasenglish ( data ) : # first, convert the string to a hex representation hexstring = binascii. hexlify ( data ) # and convert the hex representation into words stringy = [ ] for char in hexstring : stringy. append ( lookup _ table [ int ( char, 16 ) ] ) return stringy | [
0.006942702457308769,
0.08302006870508194,
0.4029524624347687,
-1.0399972200393677,
0.39658480882644653,
-0.28967177867889404,
-1.4429599046707153,
0.972646176815033,
0.6205023527145386,
0.9338505268096924,
-0.5764822959899902,
-0.0669773519039154,
-0.2364177703857422,
0.5454519391059875,
... |
def test _ atomic _ qname _ min _ length _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 1. xsd ", instance = " nistdata / atomic / qn... | [
0.32813674211502075,
-0.6717405915260315,
0.4233543276786804,
0.10797829926013947,
-0.5139608383178711,
0.27574366331100464,
-0.17404179275035858,
-0.6567528247833252,
1.0251836776733398,
0.3903953731060028,
-0.15612521767616272,
-0.02979782596230507,
-0.47074785828590393,
-0.0432116203010... |
def test _ atomic _ base64 _ binary _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 4. xsd ... | [
0.3319431245326996,
-0.0036956039257347584,
0.4608728885650635,
0.7265825867652893,
-0.008459100499749184,
0.09920300543308258,
-0.2840554118156433,
-0.4497522711753845,
0.5188577175140381,
0.10154096782207489,
-0.42739632725715637,
-0.28549277782440186,
-1.0373318195343018,
-0.26706066727... |
def values ( self, values = none ) : if values is not none : if len ( values )! = len ( self. pars ( ) ) : self. error ( " number of values! = number of parameters " ) return none free _ pars = self. free _ pars ( ) tied _ pars = self. list _ of _ pars ( " tied " ) untied _ pars = self. list _ of _ pars ( " untied " ) ... | [
-0.10442107170820236,
-0.4178699254989624,
0.7328314185142517,
-0.5711950659751892,
0.40591686964035034,
0.7466678023338318,
-0.4980148673057556,
-0.25768956542015076,
-0.5943125486373901,
-0.38785165548324585,
0.18080058693885803,
0.3753269612789154,
-0.8243087530136108,
1.348480343818664... |
def build _ ssl _ modified _ sequence ( seq, mods, ssl _ mods ) : pep = list ( seq ) for loc, name in zip ( mods. split ('|') [ : : 2 ], mods. split ('|') [ 1 : : 2 ] ) : # c - term mod if loc = ='- 1': pep [ - 1 ] = pep [ - 1 ] +'[ { } ] '. format ( ssl _ mods [ name ] ) # n - term mod elif loc = ='0': pep [ 0 ] = pep... | [
-1.0370241403579712,
-1.5724174976348877,
0.7266669273376465,
-0.5227622985839844,
-0.762945830821991,
-0.30996936559677124,
-0.7458513975143433,
0.4749890863895416,
0.3114393651485443,
1.4714317321777344,
-0.2039497345685959,
0.24948568642139435,
0.32434508204460144,
-0.1805112361907959,
... |
def resize _ mask ( self, mask, scale, padding, crop = none ) : # suppress warning from scipy 0. 13. 0, the output shape of zoom ( ) is # calculated with round ( ) instead of int ( ) with warnings. catch _ warnings ( ) : warnings. simplefilter ( " ignore " ) mask = scipy. ndimage. zoom ( mask, zoom = [ scale [ 0 ], sca... | [
-0.10115533322095871,
0.43152207136154175,
0.9143935441970825,
0.7404152154922485,
-0.5821272730827332,
-0.6239475607872009,
-0.8230323791503906,
-1.0531824827194214,
0.6778389811515808,
-0.18704454600811005,
0.5137621164321899,
0.08495423197746277,
0.3547438085079193,
-0.5853314399719238,... |
def tick ( self ) : self. _ current _ tick + = 1 log ( log. info, " game tick, tick number : { } ". format ( self. _ current _ tick ) ) self. update _ posts _ on _ tick ( ) self. update _ trains _ positions _ on _ tick ( ) self. handle _ trains _ collisions _ on _ tick ( ) self. process _ trains _ points _ on _ tick ( ... | [
-0.1801382601261139,
-0.1433142125606537,
0.5635426044464111,
0.3587954342365265,
0.8669002056121826,
0.37445494532585144,
0.6172134280204773,
-0.9638891816139221,
-1.14206862449646,
0.06299173086881638,
-0.8077982664108276,
-0.5978006720542908,
0.4580354392528534,
-0.24529097974300385,
... |
def login _ sov ( provider _ name ) : if'searchterm1'in request. form : searchterm1 = request. form ['searchterm1'] session ['searchterm1'] = searchterm1 if'searchterm2'in request. form : searchterm2 = request. form ['searchterm2'] session ['searchterm2'] = searchterm2 if'searchterm3'in request. form : searchterm3 = re... | [
-0.6917324066162109,
-0.1585373878479004,
0.7443132996559143,
0.4204966425895691,
0.4433898627758026,
-0.6914992332458496,
-0.20515210926532745,
-0.5645999908447266,
0.35217416286468506,
0.4264099597930908,
-0.41241416335105896,
0.3967999815940857,
-0.11800816655158997,
0.2848491668701172,... |
def show _ top ( go _ tree, term _ scores, n = none, descending = true ) : print ( " go _ term ", f " {'go _ name': < 50s } ", " scores ", " ic ", sep = " \ t " ) # sort order : term _ score desc, term _ ic desc, term _ id desc for k, v in sorted ( term _ scores. items ( ), key = lambda x : ( x [ 1 ], go _ tree [ x [ 0... | [
0.203386127948761,
-0.0004280841676518321,
0.8786529898643494,
-0.9634236097335815,
-0.16225665807724,
0.008747529238462448,
-0.8867522478103638,
-0.5614493489265442,
-1.3590455055236816,
1.0920052528381348,
0.4353516399860382,
0.8600473403930664,
0.21949821710586548,
0.20596864819526672,
... |
async def send _ cleverbot _ response ( self, message : str, author : union [ discord. member, discord. user ], ctx : commands. context ) - > none : await ctx. trigger _ typing ( ) try : response = await self. get _ response ( author, message ) except nocredentials : msg = _ ( " the owner needs to set the credentials f... | [
0.4123374819755554,
-0.21595153212547302,
0.4790061414241791,
0.3150894045829773,
0.09514487534761429,
-0.4781225323677063,
-0.37320271134376526,
-0.6097996234893799,
0.4455115795135498,
-0.46494388580322266,
-0.04823152348399162,
1.2172508239746094,
-0.7611362934112549,
-0.046222727745771... |
def begin _ custom _ environment _ action ( self, project _ name : str, environment _ name : str, body : io, user _ id : str = " me ", *, content _ type : str = " application / json ", * * kwargs : any ) - > lropoller [ none ] : | [
-0.01325160451233387,
-0.45409640669822693,
0.4862307906150818,
0.2117982804775238,
-0.26419249176979065,
0.6219642758369446,
0.5832463502883911,
-0.7876449227333069,
-0.020862801000475883,
0.5759176015853882,
-0.23643508553504944,
2.0386810302734375,
-0.12484095245599747,
0.33147042989730... |
def maximum _ object _ count ( self ) : return ( int ( self. ftp _ settings [ " object _ count " ] ) ) | [
0.2741246521472931,
-0.16770127415657043,
0.4977884292602539,
0.21703360974788666,
0.3483915627002716,
0.7773904204368591,
0.1309538036584854,
-0.16756941378116608,
-0.38071322441101074,
0.034068286418914795,
-0.5032744407653809,
0.12496543675661087,
-0.22948521375656128,
-0.54425573348999... |
def imconvert ( img : np. ndarray, src : str, dst : str ) - > np. ndarray : code = getattr ( cv2, f'color _ { src. upper ( ) } 2 { dst. upper ( ) }') out _ img = cv2. cvtcolor ( img, code ) return out _ img | [
-0.753484308719635,
-0.5554636120796204,
0.6371996998786926,
-0.3655317425727844,
-0.3507932722568512,
-0.11286092549562454,
-0.7279292941093445,
-0.19933435320854187,
-0.6695922017097473,
1.5482982397079468,
0.012565053068101406,
1.1452561616897583,
1.3309935331344604,
0.21509820222854614... |
def kneighborsclassifierrs ( size _ split ) : # read both files and merge them df = pd. read _ csv ('binaryapps _ ben. csv ', sep = ',') df2 = pd. read _ csv ('binaryapps _ mal. csv ', sep = ',') df = pd. concat ( [ df, df2 ] ) # we create the training and validation training dataset and the test and validation test da... | [
0.01887454278767109,
0.6715450286865234,
0.8569549918174744,
0.5709249973297119,
1.1871291399002075,
-0.10522830486297607,
0.10348957777023315,
0.2108919620513916,
-0.40740805864334106,
-0.3862048089504242,
0.02680942416191101,
0.43397507071495056,
-0.19676735997200012,
0.5223544239997864,... |
def listdishes ( self ) : count = 0 alldishes = list ( ) for day in self. days : if day. lunch. dish not in alldishes : alldishes. append ( day. lunch. dish ) self. dishes [ str ( count ) ] = day. lunch. dish count + = 1 if day. dinner. dish not in alldishes : alldishes. append ( day. dinner. dish ) self. dishes [ str ... | [
-0.5543360114097595,
0.12010867893695831,
0.7061884999275208,
-0.2869362235069275,
-0.09935919940471649,
-0.290478378534317,
0.21548616886138916,
0.9919878244400024,
1.1251269578933716,
-0.9672187566757202,
-0.5720943212509155,
0.45231565833091736,
0.8968884348869324,
1.8817135095596313,
... |
def forward _ backward _ pd ( x, f, g, l, h, tau, sigma, niter, callback = none, * * kwargs ) : # problem size m = len ( l ) # validate input if not all ( isinstance ( op, operator ) for op in l ) : raise valueerror ('` l ` not a sequence of operators') if not all ( op. is _ linear for op in l ) : raise valueerror ('no... | [
0.1305553913116455,
1.178381323814392,
0.952679455280304,
0.38320043683052063,
-0.16439326107501984,
-0.3041944205760956,
-0.02944537065923214,
-0.28467199206352234,
-0.4129195809364319,
0.27139702439308167,
-0.03213314712047577,
0.29711344838142395,
0.13106127083301544,
0.2349295765161514... |
def echo ( ) - > none : click. echo ( " hello, world! " ) | [
0.8924942016601562,
0.29027503728866577,
0.5564378499984741,
1.1676274538040161,
0.5793484449386597,
0.6102015376091003,
-0.32652318477630615,
-0.19661179184913635,
-0.723437488079071,
0.3230563998222351,
-0.028832579031586647,
1.3480066061019897,
0.09049210697412491,
-0.08252650499343872,... |
def reduce _ variance ( input _ tensor, axis = none, keepdims = false, name = none ) : name = name if name else " reduce _ variance " with ops. name _ scope ( name ) : input _ tensor = ops. convert _ to _ tensor ( input _ tensor ) means = reduce _ mean ( input _ tensor, axis = axis, keepdims = true ) if means. dtype. i... | [
-0.25425097346305847,
-0.06585799902677536,
0.9279577732086182,
0.7235321998596191,
-0.4634198248386383,
0.10654435306787491,
1.0471889972686768,
0.06342670321464539,
0.21489623188972473,
0.010178332217037678,
-0.4462791979312897,
0.7103328108787537,
0.45000866055488586,
-0.375638812780380... |
def joint _ names ( self ) - > list [ str ] : return [ jnt. name for jnt in self. urdf. joints ] | [
-0.326301246881485,
-0.35667720437049866,
0.3585030734539032,
0.25366926193237305,
0.320742666721344,
0.7642925977706909,
-0.6694359183311462,
0.3224354684352875,
-0.1258501261472702,
-0.06590486317873001,
0.09224983304738998,
0.5483913421630859,
-0.48450425267219543,
-0.5185990333557129,
... |
def load _ trajectory ( filename, showheader = false ) : traj = numpy. loadtxt ( filename ) if traj. shape. _ _ len _ _ ( ) = = 1 : traj = traj. reshape ( 1, traj. shape [ - 1 ] ) meta = _ read _ metadata ( filename, showheader = showheader ) # in case there are no values in the file if traj. size < 5 and traj. mean ( ... | [
0.3250887095928192,
-0.11139649897813797,
0.572665274143219,
0.4189007580280304,
-0.8197184205055237,
-0.1658470183610916,
0.37564343214035034,
0.4724416434764862,
-0.2616257965564728,
0.5857254862785339,
0.33456823229789734,
-0.3512609302997589,
-0.4379584491252899,
-0.055362582206726074,... |
def test _ atomic _ language _ length _ 2 _ nistxml _ sv _ iv _ atomic _ language _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 3. xsd ", instance = " nistdata / atomic / l... | [
0.5394555926322937,
-0.14124803245067596,
0.44362273812294006,
0.24124781787395477,
-0.29920318722724915,
0.45524856448173523,
-0.18034395575523376,
0.031566813588142395,
0.024771813303232193,
1.122874140739441,
-0.7971464991569519,
-0.20410335063934326,
0.16495326161384583,
0.022873118519... |
def _ fetch _ and _ process ( self ) : url = f " { splindexfile. base _ url }? page = { self. page _ number } " r = requests. get ( url, allow _ redirects = true ) try : dict _ data = xmltodict. parse ( r. content ) self. metadata = dict _ data [ " spls " ] [ " metadata " ] self. spls = dict _ data [ " spls " ] [ " spl... | [
0.31894350051879883,
-0.631817102432251,
0.48968449234962463,
-0.38187673687934875,
0.21680976450443268,
0.770861804485321,
-1.27682626247406,
0.39324983954429626,
-0.10368596017360687,
-0.08512543886899948,
0.04878499358892441,
0.4757589101791382,
0.6071567535400391,
-0.38206222653388977,... |
def _ _ init _ _ ( self, bus _ type, comp _ library, data _ width, addr _ width, ) : self. bus _ type = bus _ type self. comp _ library = comp _ library self. clk _ name = " clk " self. data _ width = data _ width self. addr _ width = addr _ width if self. bus _ type = ='axi': self. short _ name ='axi'self. in _ type =... | [
-0.1057123988866806,
-0.023514043539762497,
0.6433234810829163,
0.600762128829956,
0.047905333340168,
0.0006762986304238439,
0.7120202779769897,
-0.3768045902252197,
0.2603914439678192,
0.315327525138855,
-0.21258994936943054,
0.5473330020904541,
-0.24143631756305695,
-0.000834530219435691... |
def authenticate _ client _ id ( self, client _ id, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.') | [
-0.7656670212745667,
-0.6152780652046204,
0.4537569284439087,
0.5539331436157227,
-0.1443091630935669,
0.7686792016029358,
0.03424811363220215,
-0.8204948902130127,
0.32810690999031067,
0.11397071927785873,
-0.17698460817337036,
0.9463500380516052,
-0.16207078099250793,
-0.0424575358629226... |
def delete _ from _ dbs ( self, request, queryset ) : result = actions. delete _ selected ( self, request, queryset ) if request. post. get ( " post " ) : # the master copies ( default write db for the model ) have already # been deleted. we need to nuke the shadow copies. queryset. using ( " reviews - s " ). delete ( ... | [
-0.06850671768188477,
0.5040260553359985,
0.3630346655845642,
0.7773271203041077,
0.577495813369751,
-0.07061446458101273,
-0.022497126832604408,
0.1293763518333435,
0.534371018409729,
0.4942244589328766,
0.06377077102661133,
0.3707237243652344,
-0.3222643733024597,
-0.08950235694646835,
... |
def norm _ percolumn _ perday ( df, index _ ='datetime') : df _ = df. copy ( ) index _ values = df _ [ index _ ]. values. copy ( ) df _ [ index _ ] = [ i [ : 10 ] for i in df _ [ index _ ]. values ] df _ = df _. set _ index ( index _ ) for i in sorted ( list ( set ( df _. index. tolist ( ) ) ) ) : for j in df _. column... | [
-0.45310142636299133,
0.4723198413848877,
0.9261283874511719,
-0.1548307090997696,
-0.06851275265216827,
0.13137373328208923,
0.6138878464698792,
-0.0804944559931755,
-0.3309818506240845,
-0.04130877926945686,
0.6967609524726868,
-0.24627692997455597,
0.8103780150413513,
-0.516330242156982... |
def extract _ at _ mask ( self, outputs, batch ) : outputs = outputs [ paddle. where ( batch ['loss _ ids'] > 0 ) ] if outputs. shape [ 1 ] = = 1 : outputs = outputs. reshape ( [ outputs. shape [ 0 ], outputs. shape [ 2 ] ] ) return outputs | [
-0.6712576746940613,
-0.8228861689567566,
0.5572588443756104,
0.903808057308197,
0.06988385319709778,
-0.668687105178833,
0.4289311170578003,
-0.9242770671844482,
-0.14125312864780426,
0.5435144901275635,
0.5203127264976501,
0.11162026971578598,
0.4518648684024811,
-0.5720695853233337,
0... |
def roberts _ rgb ( image ) : return filters. roberts ( image ) | [
-0.23840074241161346,
-0.1717570424079895,
0.0924229770898819,
0.10212293267250061,
0.37510251998901367,
-0.49571871757507324,
0.6790962815284729,
-0.6626030802726746,
0.11843428760766983,
0.5571560263633728,
0.2147146463394165,
1.090973138809204,
0.08696942776441574,
0.7045161724090576,
... |
def main ( ) : pp = pprint. prettyprinter ( indent = 4 ) # stop words print ( colored ( " the list of stop words ",'blue') ) # download it if you have not done it yet # download ('stopwords') # have a look at the list of stop words provided by nltk en _ stopwords = stopwords. words ('english') #n't should be added en _... | [
-0.17044423520565033,
-0.6612034440040588,
1.0005468130111694,
-0.032935865223407745,
0.15884798765182495,
-0.048589933663606644,
0.042920880019664764,
-0.17191347479820251,
0.014198388904333115,
-0.05835895240306854,
-0.1365254819393158,
-0.21663261950016022,
-0.18350869417190552,
0.12010... |
def signal _ no ( self ) : return self. _ signal _ no | [
-0.5330868363380432,
0.09821043163537979,
0.3762076795101166,
0.8694169521331787,
-0.24439360201358795,
0.3455260097980499,
0.915466845035553,
0.3999389708042145,
-1.0613867044448853,
-0.7044808268547058,
-2.0590410232543945,
0.44956132769584656,
0.6310017108917236,
0.3826383948326111,
-... |
def compute _ dsw ( self, d _ ds, mx, my, h _ norm ) : if self. dtype = = np. complex128 : gemm = cublaszgemm else : gemm = cublascgemm d _ weight = parray. empty ( ( self. num _ neurons, self. num _ neurons ), self. dtype ) handle = la. cublashandle ( ) gemm ( handle. handle,'c ','n ', self. num _ neurons, self. num _... | [
-0.4946211576461792,
0.9863446950912476,
0.7126656174659729,
0.638152539730072,
-1.12321138381958,
-0.44068557024002075,
0.3281503915786743,
0.7199996113777161,
-0.01882774941623211,
-0.23619090020656586,
0.4802578389644623,
0.9127897024154663,
0.5251820087432861,
0.30338069796562195,
0.... |
def addmappingstothingtype ( self, thingtypeid, logicalinterfaceid, mappingsobject, notificationstrategy = " never " ) : req = apiclient. allthingtypemappingsurl % ( self. host, " / draft ", thingtypeid ) try : mappings = json. dumps ( { " logicalinterfaceid " : logicalinterfaceid, " notificationstrategy " : notificati... | [
-1.8345062732696533,
-0.13941769301891327,
0.6711385846138,
-0.4664008915424347,
-0.03505104035139084,
0.2020920068025589,
-0.6568689942359924,
-0.962428629398346,
0.2980588972568512,
0.38883617520332336,
-0.5713772773742676,
0.07410962134599686,
-0.6634947657585144,
0.41588857769966125,
... |
def add _ interval _ to _ other _ interval ( self, added _ interval, add _ to _ interval, with _ sign = 1 ) : x1 = self. get _ intersections _ with _ interval ( add _ to _ interval ) x2 = self. get _ intersections _ with _ interval ( added _ interval ) x1 + = with _ sign * x2 | [
-0.7757108807563782,
-0.5159842371940613,
0.8798760771751404,
1.2424012422561646,
0.06445187330245972,
0.31961092352867126,
-0.1198325902223587,
-0.5960093140602112,
-0.33236849308013916,
-0.03382475674152374,
-0.4063066244125366,
0.14756998419761658,
-0.40322765707969666,
-0.2118872553110... |
def with _ task ( self, task ) : b = self. _ copy ( ) b. config ['task'] = task return b | [
-0.09270858764648438,
0.5078432559967041,
0.46358025074005127,
1.2834112644195557,
-0.7495393753051758,
0.2089269906282425,
-0.04709533229470253,
-0.5123328566551208,
0.5770213603973389,
0.31173816323280334,
-0.9781152009963989,
-0.021044399589300156,
0.44791048765182495,
0.023719176650047... |
def check _ missing _ properties ( self, t : festim. temperature, derived _ quantities : list ) : if isinstance ( t, heattransferproblem ) : if self. materials [ 0 ]. thermal _ cond is none : raise valueerror ( " missing thermal _ cond in materials " ) if t. transient : if self. materials [ 0 ]. heat _ capacity is none... | [
0.6408463716506958,
-0.9952532052993774,
0.4839789569377899,
-0.34419289231300354,
0.6530212163925171,
1.0069130659103394,
-0.34813475608825684,
0.22386695444583893,
-1.5152060985565186,
-0.3418025076389313,
0.31995564699172974,
-0.1695283204317093,
0.40268445014953613,
1.183228611946106,
... |
def parse _ request _ body _ response ( self, * args, * * kwargs ) : | [
-0.9640344381332397,
-1.0147674083709717,
0.31493079662323,
0.5070844888687134,
0.564987063407898,
0.0023915767669677734,
-0.3502395451068878,
-0.36373332142829895,
0.41113653779029846,
-0.6194457411766052,
-0.4086693525314331,
-0.3143923282623291,
-0.6154198050498962,
-0.39805954694747925... |
def prepare _ start _ perf _ test ( self, xact _ info, action, ks _ path, msg ) : test _ id = len ( self. test _ results. test ) xpath = " o, / rw - dtsperfmgr : start - perf - test " response = rwdtsperfmgr. startperftestoutput ( test _ id = test _ id ) if msg. test _ type not in self. test _ handlers : xact _ info. r... | [
0.832233190536499,
-0.125321626663208,
0.6096959710121155,
-0.8838321566581726,
-0.6141085624694824,
-0.21566137671470642,
0.6839221715927124,
-0.6117069721221924,
0.25850945711135864,
-0.05724793300032616,
0.8551116585731506,
-0.23338229954242706,
-1.3462305068969727,
0.35144221782684326,... |
def angletosteps ( self, angle ) : # make sure there is a 1 : 1 mapping between angle and stepper angle target _ step _ angle = 8 * ( int ( angle / self. deg _ per _ step ) / 8 ) steps = target _ step _ angle - self. step _ angle steps = ( steps % self. steps _ per _ rev ) if steps > self. steps _ per _ rev / 2 : steps... | [
-1.0944257974624634,
0.04428373649716377,
0.42602604627609253,
-0.37320828437805176,
0.10943993926048279,
-0.11770308017730713,
0.6278256773948669,
-0.426020085811615,
0.46592846512794495,
-0.3194045424461365,
-0.18105387687683105,
-0.6756901144981384,
-0.07583624124526978,
0.5765004754066... |
def process _ urls ( self, original _ obj ) : pass | [
-0.3901676833629608,
-1.0056136846542358,
0.45819079875946045,
0.1254742443561554,
-0.6188517808914185,
0.4241931140422821,
0.6068286895751953,
1.016950249671936,
0.08420677483081818,
-0.5600233674049377,
-0.47068995237350464,
0.25910791754722595,
0.5760095119476318,
0.30009010434150696,
... |
def build _ nvic ( n _ ext ) : # ipr registers support 4 interrupts per word. n _ ipr = ( n _ ext + 3 ) > > 2 # other registers support 1 interrupt per bit n _ other = ( n _ ext + 31 ) > > 5 nvic _ info = ( ('ictr ', 0x004, none,'( r / ) interrupt controller type register'), ('iser ', 0x100, n _ other,'( r / w ) interr... | [
0.11023743450641632,
0.36801254749298096,
0.9775652885437012,
-0.1633814424276352,
-0.5944501161575317,
-0.23524075746536255,
-0.09832072257995605,
-1.0530803203582764,
0.6297310590744019,
-0.0861150473356247,
-0.42834675312042236,
-0.15257476270198822,
-1.222472906112671,
-1.1720075607299... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.