text
stringlengths
25
2.19k
embedding
listlengths
768
768
def matchestypes ( self, argtypes ) : if len ( argtypes ) = = len ( self. args ) and not any ( x. isstararg or x. iskwarg for x in self. args ) : for i in range ( len ( argtypes ) ) : if self. args [ i ]. typefilter is not none and not _ types. isbinarycompatible ( self. args [ i ]. typefilter, argtypes [ i ] ) : retur...
[ -1.1950957775115967, -0.005191132426261902, 0.6268444657325745, 0.6688125133514404, 0.3241485059261322, 0.38027793169021606, -0.46951428055763245, -0.34281760454177856, -0.9361764192581177, 0.541641354560852, 0.17982961237430573, -0.19215765595436096, -1.8321202993392944, 1.232079505920410...
def insert _ row ( self, layer _ name, field _ names, values ) : layer _ path = os. path. join ( self. path, layer _ name ) self. editor. startediting ( false, false ) with arcpy. da. insertcursor ( layer _ path, field _ names ) as cursor : oid = cursor. insertrow ( values ) self. editor. stopediting ( true ) return oi...
[ -0.4426521360874176, 1.086076259613037, 0.47185513377189636, -0.5140102505683899, 0.14185236394405365, 0.3312865197658539, 0.3468254506587982, -0.1650754064321518, -1.1077790260314941, -0.28534865379333496, -0.08734101057052612, -0.7716948390007019, -0.47460421919822693, 0.1687251925468444...
def get _ enum _ value ( self ) - > any : value = self. get _ value ( ) if len ( self. _ enums ) > 0 : for enum in self. _ enums : if enum. get _ value _ int ( ) = = value : return enum. name return int ( value )
[ -0.6381745934486389, -0.11834430694580078, 0.8632251024246216, -0.20604360103607178, -0.0873737633228302, -0.48563820123672485, 0.2819086015224457, -0.7477496862411499, 0.2763841450214386, 0.5125740170478821, 0.415750116109848, 0.6146916747093201, 0.2525894343852997, 0.4872995615005493, ...
def gethandle ( self ) : return _ topods. topods _ tedge _ gethandle ( self )
[ -0.13926950097084045, 0.9623609185218811, 0.3102456033229828, 0.4886151850223541, 1.2311981916427612, 1.2350720167160034, 0.5957478284835815, -0.7055991888046265, -0.5000980496406555, -1.2311650514602661, 0.5456146001815796, -0.8890339732170105, -0.7436531782150269, -0.39547961950302124, ...
def _ _ eq _ _ ( self, other ) : if isinstance ( other, callback ) : return self. _ id = = other. id return false
[ -0.32194212079048157, -0.7737285494804382, 0.5557602643966675, 0.5646729469299316, 0.23744207620620728, 0.5843387842178345, 0.3677084147930145, -1.1707580089569092, 1.5403169393539429, -0.4889901578426361, -0.9375708103179932, 0.2973812520503998, -1.0343235731124878, 0.6073514223098755, ...
def test _ collect ( self ) : pid = 10 pids = [ 1, 2, 10 ] cpu _ count = " dummy - cpu - count " cpu _ times = mock ( user = " user ", system = " system ", idle = " idle " ) cpu _ stats = mock ( ctx _ switches = " ctx _ switches ", interrupts = " interrupts ", soft _ interrupts = " soft _ interrupts ", syscalls = " sys...
[ 0.3222236931324005, 0.13481445610523224, 0.6080013513565063, -1.0862407684326172, 0.05567092075943947, -0.15476027131080627, -0.07168231159448624, -0.24300922453403473, -0.45739391446113586, -0.19948416948318481, -0.09197397530078888, -0.05981257185339928, 0.45242637395858765, 0.4529835879...
def unroll _ circuit _ op _ greedy _ earliest ( circuit : circuit _ type, *, tags _ to _ check = ( mapped _ circuit _ op _ tag, ) ) - > circuit _ type : batch _ removals = [ * circuit. findall _ operations ( lambda op : _ check _ circuit _ op ( op, tags _ to _ check ) ) ] batch _ inserts = [ ( i, protocols. decompose _...
[ 0.11165791004896164, 0.8017622828483582, 0.7862342000007629, -0.09530956298112869, 0.022246282547712326, -0.7839141488075256, 0.8521924018859863, -0.3714843690395355, -0.0568968690931797, -0.4451987147331238, -0.6755313277244568, 0.045377444475889206, -0.5355114340782166, -0.65090584754943...
def weight _ variable ( shape ) : initial = tf. random _ normal ( shape, mean = 0. 0, stddev = 0. 1 ) return tf. variable ( initial )
[ 0.15237168967723846, -0.31420040130615234, 0.44905295968055725, -0.5409164428710938, -0.6141877770423889, 0.7285315990447998, 0.45096445083618164, -0.44360294938087463, -0.37289223074913025, 0.1670316606760025, -0.3605635464191437, 1.1052190065383911, 0.10154828429222107, -0.36426082253456...
def from _ colors ( cls, * colors : color ) : return cls ( dict. fromkeys ( colors, 1 ) )
[ -0.2172432243824005, 0.4046798050403595, 0.23702171444892883, -0.1718469113111496, -0.21555502712726593, 0.3511255085468292, -0.5722428560256958, -0.332409530878067, -0.22191737592220306, -0.5546615719795227, -0.7449802160263062, -0.05635778605937958, 0.04221038892865181, -0.22507156431674...
def test _ register _ input _ and _ post _ and _ passwords _ bad _ short ( self, * _ ) : self. open ( base _ url +'/ logout') # go to main page self. open ( base _ url +'/ register') # validate that the user is taken to / login assert self. get _ current _ url ( ) = = base _ url +'/ register'self. type ('# email ','tes...
[ -0.2232007086277008, 0.42495250701904297, 0.4641731381416321, 0.8541415929794312, 0.08134280890226364, 0.6444091796875, -0.1672573983669281, -0.1314118653535843, -0.1459278166294098, -0.664539098739624, -0.6887254118919373, 0.6083383560180664, -0.15590688586235046, 0.7700228691101074, 0....
def shuffle _ by _ keys ( self, keys, hive _ data = none, npartitions = none ) : # make sure we are dealing with a list keys = [ keys ] if not isinstance ( keys, ( list, tuple ) ) else keys # start with default ddf ddf = self. to _ ddf ( ) if npartitions : npartitions = min ( ddf. npartitions, npartitions ) if hive _ d...
[ -1.4791791439056396, 0.5085480213165283, 0.7270495295524597, -0.3493161201477051, -0.2975001633167267, -0.3300512433052063, -0.16546200215816498, 0.43305298686027527, -0.40208858251571655, -0.23410873115062714, -0.21411171555519104, -0.4481613337993622, 0.5464048981666565, -0.2785974144935...
def edit _ profile ( request ) : if request. method = ='post': u _ form = userupdateform ( request. post, instance = request. user, prefix ='user') p _ form = profileupdateform ( request. post, request. files, instance = request. user. profile, prefix ='profile') if u _ form. is _ valid ( ) and p _ form. is _ valid ( )...
[ 0.1560341715812683, -0.35131192207336426, 0.8045080900192261, 0.5699040293693542, 0.23393754661083221, 0.40481898188591003, 0.6836062669754028, 0.5250088572502136, 0.31576409935951233, -0.05295972898602486, -0.0092155821621418, -0.6060860753059387, -0.06959643959999084, 0.0524662584066391,...
async def issue _ opened _ event ( event, gl, * args, * * kwargs ) : jsonstr = json. dumps ( event. _ _ dict _ _ ) await createissuegreeting ( gl, event ) ; title = ( json. loads ( jsonstr ) ) ['data'] ['object _ attributes'] ['title'] if ( not "! " in ( ( json. loads ( jsonstr ) ) ['data'] ['object _ attributes'] ['ti...
[ -0.46357953548431396, -0.1975564956665039, 0.6592599749565125, -0.28562816977500916, -0.34782132506370544, 0.33892080187797546, -0.26863786578178406, 0.4857901632785797, 0.49417075514793396, -0.06731373816728592, 0.35618776082992554, 0.36979034543037415, 0.41865435242652893, 0.252103120088...
def inverse ( self, n ) : if n = = 0 : return 0 lm, hm = 1, 0 low, high = n % self. p, self. p while low > 1 : r = high / / low nm, new = hm - lm * r, high - low * r lm, low, hm, high = nm, new, lm, low return lm % self. p
[ -0.8593599796295166, 0.11419281363487244, 0.31047821044921875, -0.12610773742198944, -0.13989198207855225, 0.09887229651212692, -0.5275148749351501, 0.1604141891002655, -0.35887908935546875, -0.5727586150169373, -0.7465034127235413, -0.270279198884964, -1.8353184461593628, 0.67437541484832...
def compute ( self, args ) : parser = argparse. argumentparser ( ) parser. add _ argument ('filenames ', nargs ='+') sourmash _ args. add _ moltype _ args ( parser, default _ dna = true ) parser. add _ argument ('- - input - is - protein ', action ='store _ true') parser. add _ argument ('- k ','- - ksizes ', default =...
[ 0.1105504184961319, 0.4913260042667389, 1.2559187412261963, 0.0927259773015976, 0.2826897203922272, 0.13205967843532562, 0.16035769879817963, 0.4613769054412842, -0.21860913932323456, 0.2260761559009552, -0.0009623929508961737, 0.4698427617549896, -0.13323573768138885, 0.5694102048873901, ...
def get _ length ( self ) : return self. length
[ 0.3276353180408478, -0.1174217090010643, 0.10571762174367905, -0.3370758295059204, 0.9281894564628601, 1.0447121858596802, 0.45074597001075745, 0.8251385688781738, 0.6654185652732849, -0.8788701891899109, -0.6304230093955994, 0.15652194619178772, -0.08761473745107651, -0.026073237881064415...
def _ act _ hint ( self ) : if type ( self. _ puzzle ) = = wordladderpuzzle : hint = hint _ by _ breadth ( self. _ puzzle ) else : hint = hint _ by _ depth ( self. _ puzzle ) return'try entering :'+ hint, false
[ 0.03566630929708481, 0.34293729066848755, 0.43582528829574585, -0.3041535019874573, 0.11692100018262863, 0.4955977499485016, 0.8786351084709167, -1.3610005378723145, -0.07552018016576767, 1.446399211883545, 0.7093060612678528, 1.5884379148483276, -0.8967410326004028, -0.4214573800563812, ...
def isallsuccess ( self ) : return self. isallsuccess
[ -0.20513033866882324, -0.37842729687690735, 0.6096973419189453, 1.7704170942306519, -0.40314286947250366, 0.48365429043769836, -0.5837886929512024, 0.6176945567131042, 0.4843687415122986, -0.20213492214679718, -0.6944403052330017, -0.10157827287912369, -0.02664639800786972, 0.6191264390945...
def readdata ( spreadsheet ) : # # # read in all parameters all = { } # dictionary for i, par in enumerate ( spreadsheet ['parameters']. loc [ :,'parameter'] ) : all [ par ] = spreadsheet ['parameters']. loc [ i,'value'] all ['experiments'] = len ( spreadsheet ['data'] ['experiment']. unique ( ) ) for exp _ name in spr...
[ -0.27321526408195496, 0.22121204435825348, 0.8498080372810364, -1.2452480792999268, -0.8254213929176331, 0.14891384541988373, -0.5936365723609924, 0.7991140484809875, 0.5149847865104675, 0.5699273347854614, -0.324161171913147, 0.138391375541687, 0.05443932116031647, 0.2043554037809372, 0...
def _ _ init _ _ ( self, coords : optional [ tuple [ int, int ] ] = none, player : str = " b " ) : self. player = player self. coords = coords
[ -0.24309444427490234, 0.03904888033866882, 0.35493239760398865, 0.012521997094154358, 0.2966349124908447, -0.03310272842645645, 0.09683919697999954, 0.30944550037384033, 0.3826175630092621, -0.23769676685333252, -0.054788779467344284, 0.04191107302904129, -0.4190859794616699, -0.5604641437...
def pick _ paragraphs ( self, evidence _ files : list [ list [ str ] ], question : str = none, answer _ texts : list [ str ] = none ) - > list [ str ] : paragraphs = [ ] for evidence _ file in evidence _ files : whole _ document = " ". join ( evidence _ file ) tokens = whole _ document. split ( " " ) paragraph = " ". j...
[ 0.35291481018066406, -0.6186732649803162, 0.5089758634567261, 0.04330941289663315, -0.016415422782301903, 0.5870141386985779, -0.38904809951782227, 0.9209359288215637, 0.38086026906967163, 1.3443623781204224, 0.3666466176509857, -0.47707468271255493, -0.9765726327896118, 0.0493241213262081...
def owned _ products ( token : optional [ str ] = header ( none ) ) : token _ decoded = decode _ token ( token ) if ( token _ decoded = = none ) : return {'msg':'token is required'} controller = productcontroller ( ) return controller. get _ products _ owned ( token _ decoded ['id'] )
[ -0.2272794246673584, -0.44111084938049316, 0.17602026462554932, 0.5612980723381042, 0.7557957172393799, -0.7291904091835022, 0.2237900048494339, -1.109624981880188, -0.3894619941711426, -0.5655014514923096, -0.6330623030662537, 0.7193441390991211, 0.07191956043243408, -0.7024878859519958, ...
def _ generate _ relation ( relation _ type, relation _ npartitions ) : if relation _ npartitions is not none and relation _ type is none : raise attributeerror ( " relation _ type should be set when relation _ npartition is not none. " ) if relation _ type is none and relation _ npartitions is none : return { } return...
[ -0.16230949759483337, 0.34581008553504944, 0.31637632846832275, -1.5395452976226807, 0.10280350595712662, -0.68572598695755, -0.46362218260765076, -0.0013708118349313736, 0.33486735820770264, 0.33607813715934753, 0.20734930038452148, -0.3171965777873993, -0.41436922550201416, 0.26855918765...
def show _ logo ( ) : logo = ( " _ _ _ \ n " " | | ( _ ) | \ n " " | | _ | | _ _ _ _ _ _ _ _ _ _ _ _ _ \ n " " | | | |'_ \ |'_ _ / _ ` |'_ _ | | | | \ n " " | | _ _ _ _ | | | _ ) | | | ( _ | | | | | _ | | \ n " " | _ _ _ _ _ _ | _ | _. _ _ / | _ | \ _ _, _ | _ | \ _ _, | \ n " " _ _ / | \ n " " | _ _ _ / \ n " ) print ...
[ 0.6157034635543823, -0.7181872725486755, 1.9049209356307983, -1.0332297086715698, -1.2647866010665894, 0.07492973655462265, -0.34560856223106384, -0.2746082544326782, -1.0566731691360474, 0.20313286781311035, -0.5741973519325256, 0.7933361530303955, 0.4344612658023834, 0.33273595571517944,...
def score _ from _ existing ( cls, batch _ prediction _ job _ id ) : batch _ job = super ( batchpredictionjob, cls ). get ( none, batch _ prediction _ job _ id ) job _ data = { " predictionjobid " : batch _ job. id } response = cls. _ client. post ( url = cls. _ from _ existing _ path ( ), json = job _ data ) job _ id ...
[ 0.15153352916240692, -0.553756594657898, 0.6046499013900757, 0.3794659674167633, 0.07822678983211517, 0.2988125681877136, -0.921227216720581, -0.40873995423316956, -0.9795117378234863, 0.503987729549408, -0.2845182716846466, 0.6028484106063843, -0.3113304376602173, 0.2164524495601654, -0...
def start _ display _ loop _ thread ( self ) : if self. running : return self. running = true thread ( target = terminaldisplayer. _ _ display _ loop, args = ( self, ) ). start ( )
[ -0.14831089973449707, -0.7845353484153748, 0.4816078841686249, 0.009147565811872482, -0.5447813868522644, 1.4117969274520874, 0.4869464039802551, -0.4280189573764801, -0.26205459237098694, -1.1410307884216309, 0.3585283160209656, 1.6621328592300415, -0.5940862894058228, 0.7304548621177673,...
def get _ default _ path ( ) : return get _ default _ path ( )
[ 0.16728731989860535, 0.11458227783441544, 0.09852894395589828, 1.5913175344467163, 0.9155611991882324, 0.24311625957489014, 0.9706717133522034, 0.35803836584091187, -0.8968423008918762, -0.9912163019180298, -0.1540871262550354, -0.0747852548956871, -0.7386093735694885, 0.2411763221025467, ...
def demo ( epd ) : # initially set all white background image = image. new ('1 ', epd. size, white ) # prepare for drawing draw = imagedraw. draw ( image ) # bouncing ball x = 0 y = 0 xd = 3 yd = 3 while true : for i in range ( 1, 10 ) : x = random. randint ( 0, 274 ) y = random. randint ( 0, 176 ) onoff = random. rand...
[ -0.12365911155939102, 0.7369725704193115, 0.8516297936439514, -1.2841304540634155, 0.038317304104566574, 1.3013931512832642, 0.5121585130691528, -0.5704355835914612, 1.0312892198562622, -0.2794845402240753, 0.16625835001468658, 0.09650281071662903, 0.3233547806739807, 0.7634173035621643, ...
def logical _ link _ to _ internal ( ll ) : ll _ internal = { } ll _ internal [ " id " ] = ll [ " llid " ] ll _ internal [ " capacity " ] = float ( ll [ " capacity " ] [ " total " ] ) ll _ internal [ " utilization " ] = float ( ll [ " capacity " ] [ " total " ] ) - float ( ll [ " capacity " ] [ " available " ] ) ll _ i...
[ -0.7889641523361206, -0.9820179343223572, 0.506628155708313, -2.11621356010437, -0.9572685956954956, 0.14114414155483246, -0.3050858676433563, 0.050704341381788254, 0.2346762865781784, -0.2107614427804947, -0.5660980343818665, 0.10616104304790497, 0.05720456689596176, 0.1668061763048172, ...
def get _ tetrode _ cluster _ id _ unit ( self, tetrode _ nr, tetrode _ cluster _ id ) : if tetrode _ nr in self. unit _ lookup _ table : if tetrode _ cluster _ id in self. unit _ lookup _ table [ tetrode _ nr ] : return self. units [ self. unit _ lookup _ table [ tetrode _ nr ] [ tetrode _ cluster _ id ] ]
[ -0.1514003872871399, -0.5392805337905884, 0.35039958357810974, -1.1495729684829712, 0.8397682905197144, -0.29360470175743103, -0.46767887473106384, -0.7019901275634766, 0.46274590492248535, 0.4905514717102051, 1.0134882926940918, 0.8528599739074707, -0.25946369767189026, -0.433455109596252...
def test _ register _ doctor _ user ( self, db, api _ client ) : response = api _ client. post ( self. url, data = self. data, format ='json') assert response. status _ code = = 201 assert user. objects. filter ( user _ type ='d'). count ( ) = = 1 assert doctor. objects. count ( ) = = 1 assert doctor. objects. first ( ...
[ -0.7589603066444397, 1.5211195945739746, 0.5573076605796814, 0.7317808866500854, 0.6470946073532104, 0.07895936071872711, 0.0671205148100853, 0.22510837018489838, -0.02178931050002575, -0.8371055126190186, -0.7035515308380127, 0.7112503051757812, 0.4440899193286896, 0.21174722909927368, ...
def load _ single _ unlabeled ( request ) : # read file ca = get _ mongo _ client ( uri ='mongodb : / / localhost : 27017 /') text = ca [ " annotation _ raw _ data " ]. find _ one ( { " labeled " : false } ) annotation _ data = annotationrawdata ( text = text. get ( " text " ), uuid = text. get ( " uuid " ) ) annotatio...
[ -1.2219549417495728, -0.6039713025093079, 0.6919841766357422, -0.7913699746131897, -0.6111598014831543, 0.7649202942848206, -0.07942668348550797, 0.7858463525772095, 0.2170911431312561, 0.6886413097381592, -0.12957040965557098, 0.19852906465530396, -0.5858492255210876, 0.11244866997003555,...
def test _ missing _ asset ( self ) : with self. assertraises ( volcorrcalibrationerror ) : bad _ inter _ asset _ correlation = { ( " ukpower _ base ", " nbp " ) : [ [ 0. 4, 0. 5 ], [ 0. 6, 0. 9 ] ] } multiassetvolcorrcalibration ( { " ukpower _ peak " : ukpower _ peak, " nbp " : nbp }, bad _ inter _ asset _ correlatio...
[ 0.7708024382591248, -0.37340518832206726, 0.4501289427280426, -0.22715997695922852, 0.649571418762207, 0.336780309677124, 0.1796754151582718, -0.18935906887054443, -0.5829132795333862, 0.3706614375114441, 0.19470489025115967, -0.16414007544517517, -0.811408281326294, -0.3932710289955139, ...
def select _ osm ( id = none ) : if id is none : # assume that there is only one osm registered nfvo _ list = list ( mongoutils. index ('nfvo') ) nfvo = nfvo _ list [ 0 ] return nfvo
[ -0.5475803017616272, 0.40762758255004883, 0.23487764596939087, 0.8125852346420288, 0.8028053641319275, -1.141108512878418, -0.18446722626686096, -0.7390298247337341, 0.1131773591041565, -0.46893298625946045, 0.07300946861505508, 0.20907649397850037, -0.5451033115386963, 0.5320132374763489,...
def teardown ( self ) : self. recipe. image. delete ( )
[ 0.7440760731697083, -0.06380309909582138, 0.17430438101291656, -0.7530578374862671, 0.5213683247566223, -0.05375807359814644, 1.2104406356811523, 1.1092660427093506, 0.4883965849876404, 0.17363077402114868, 0.5322739481925964, 0.5055112838745117, -0.4521953761577606, 0.9446234107017517, ...
def respond _ to _ bad _ main _ menu _ choice ( self, bad _ choice ) : print ( f " \ n'{ bad _ choice }'is an invalid response. " )
[ 0.23210632801055908, -1.3938547372817993, 0.27301904559135437, 0.21164265275001526, 0.1801997274160385, 0.8588184118270874, -0.20833814144134521, -0.2605929374694824, 1.0442078113555908, -0.15844391286373138, 0.8502508401870728, 0.5138270258903503, -0.36147674918174744, 0.2505109906196594,...
def getsingle ( self, xpath ) : xpath = self. _ applybase ( xpath ) results = self. context. xpatheval ( xpath ) if ( len ( results ) > 0 ) : return xmlfragment ( results [ 0 ] ) return none
[ -0.07034597545862198, 0.7913991808891296, 0.5429297089576721, -0.16498695313930511, -0.16612784564495087, -0.5930094122886658, -0.4766528308391571, -0.09697306156158447, 1.0900932550430298, -0.8018358945846558, 0.468122661113739, 0.19613583385944366, -0.7156913876533508, -0.563510656356811...
def vigenere _ ciphered _ english _ book ( ) : text _ file _ pathname = " cifra / tests / resources / english _ book. txt " ciphered _ book _ text = " " with open ( text _ file _ pathname ) as book : book _ text = book. read ( ) ciphered _ book _ text = cipher ( book _ text, test _ key ) yield ciphered _ book _ text
[ -0.5470549464225769, -1.219537615776062, 0.25661513209342957, 0.2772081792354584, 0.09042225033044815, 0.6187427639961243, -0.29072198271751404, 0.45328518748283386, -0.5788865685462952, 1.1578924655914307, -0.3212117552757263, -0.5671448707580566, -0.6230862140655518, -0.481292724609375, ...
def make _ license _ feed _ uri ( self, app _ id = none, params = none ) : parameters ='[ appid = % s ] [ domain = % s ]'% ( app _ id, self. domain ) uri = license _ feed _ template + urllib. parse. quote _ plus ( parameters ) if params : uri + ='&'+ urllib. parse. urlencode ( params ) return uri
[ 0.6889126300811768, -0.32541513442993164, 0.5201360583305359, -0.5142468810081482, -0.2653419077396393, 0.2081006020307541, -0.8558714389801025, 1.4608794450759888, -0.23232564330101013, -0.7235181927680969, 0.6867734789848328, 0.6982662677764893, -0.2605030834674835, 0.022174159064888954,...
def on _ key _ press ( self, key, modifiers ) : print ('key pressed!') if key = = arcade. key. up or key = = arcade. key. w : self. accel = max _ meters _ per _ sec _ sq elif key = = arcade. key. down or key = = arcade. key. s : self. accel = - max _ meters _ per _ sec _ sq elif key = = arcade. key. space : self. brake...
[ 0.1856309175491333, -0.10134690254926682, 0.8046706914901733, -0.07523009181022644, 0.15667524933815002, 0.12341560423374176, -0.42164671421051025, -0.3358366787433624, 0.13664205372333527, -0.08294021338224411, -0.022549396380782127, -0.16800017654895782, -0.04520116373896599, 0.178038462...
def generate _ sympy _ equations ( self ) : variables = set ( ) equations = [ ] for eqn in self. generate _ equations ( ) : equation = 0 lhs = eqn [ 0 ] rhs = eqn [ 1 ] for lhs _ link in lhs : variable = sympy. symbol ( lhs _ link. tail. pretty _ str ( ) ) variables. add ( variable ) link _ value = self. _ _ evaluate _...
[ -0.579887330532074, -0.6130223274230957, 0.5954667329788208, -1.049135446548462, 0.7246332168579102, -0.5351903438568115, 0.7155994176864624, 0.4427337348461151, -0.23847319185733795, -0.2567098140716553, -0.8230365514755249, -0.11922065913677216, -0.06005041301250458, 0.9592462182044983, ...
def rotate _ vector ( vec : np. ndarray, theta : float ) - > np. ndarray : c, s = np. cos ( theta ), np. sin ( theta ) affine _ rotation _ matrix = np. array ( [ [ c, - s, 0. 0 ], [ s, c, 0. 0 ], [ 0. 0, 0. 0, 1. 0 ] ] ) affine _ vec = np. append ( vec, 1. 0 ) dst = np. dot ( affine _ rotation _ matrix, affine _ vec ) ...
[ -0.14547929167747498, 0.1641375720500946, 0.4618038535118103, -0.44322720170021057, 0.7864497900009155, -0.3174252212047577, 0.14513321220874786, -0.3992825448513031, -0.257560133934021, 0.5632731914520264, 0.11909017711877823, 0.9461933374404907, 0.1595616489648819, -0.186804860830307, ...
def compose ( self, * args ) : return _ topods. topods _ shape _ compose ( self, * args )
[ -1.220544457435608, -0.36886945366859436, 0.31653231382369995, 0.25725847482681274, 0.5296376347541809, 0.05743597820401192, 0.7415186762809753, -0.9539825320243835, -0.6983610391616821, -0.14643943309783936, -0.06099947914481163, -0.8593140840530396, 0.060260288417339325, 0.18103015422821...
def get _ best _ category _ for _ sensor ( sensor _ types, priority _ category = none ) : # check if sensor _ types is a list of string or a list of sensortype # items if all ( isinstance ( item, str ) for item in sensor _ types ) : sensor _ types = [ default _ sensor _ types. get ( item, default _ sensor _ types [ " o...
[ 0.25364911556243896, 0.5045303106307983, 0.5111004710197449, 0.13524264097213745, 0.4413842558860779, -0.6008440852165222, -0.8244638442993164, -0.4317249059677124, 0.7037942409515381, -0.6493573784828186, 0.827947199344635, -0.2493501454591751, 0.16333800554275513, 1.0285472869873047, 0...
def apply _ jrf _ global _ updates ( online, jrf _ targets, admin _ user = none, admin _ pass = none, admin _ url = none, domain _ home = none ) : _ method _ name ='apply _ jrf _ global _ updates'_ logger. entering ( stringutils. stringforboolean ( online ), jrf _ targets, domain _ home, class _ name = _ class _ name, ...
[ -0.706665575504303, -0.03626484051346779, 0.6104586720466614, 1.1843818426132202, 0.3514001667499542, -0.008726120926439762, 0.47021543979644775, 0.552097737789154, 0.15808579325675964, 0.4505874514579773, -0.3641993999481201, 1.2004115581512451, -1.2501736879348755, 0.3641067445278168, ...
def _ verify _ platform _ id _ in _ response ( self, response ) : if not self. _ platform _ id in response : msg = " unexpected : response does not contain entry for % r " % self. _ platform _ id log. error ( msg ) raise platformexception ( msg = msg ) if response [ self. _ platform _ id ] = = invalidresponse. platform...
[ 1.6088711023330688, -0.3891623318195343, 0.40632835030555725, -0.11934678256511688, 0.292074590921402, 0.3285776674747467, 0.23947574198246002, -0.7054749131202698, 0.8761190176010132, -0.41607436537742615, 0.9341616034507751, 0.35992977023124695, -1.2319668531417847, 0.9436858892440796, ...
def is _ module ( name ) : for ext in code _ files : if name. endswith ( ext ) : return name [ : - len ( ext ) ]
[ 0.04955737665295601, 0.0626583993434906, 0.8359047174453735, 0.3676498532295227, 0.023831142112612724, 0.4855901300907135, -0.25158122181892395, -0.5392926931381226, 0.7234528064727783, 1.2058122158050537, -0.10296749323606491, 0.3989330232143402, -1.023000717163086, 0.19745707511901855, ...
def test _ vasp _ calc _ delete _ extra ( run _ vasp _ process ) : # let us add an additional object to the retrieve _ list ( which do not delete the object after parse ) # and check if it is actually there from aiida _ vasp. calcs. vasp import vaspcalculation retrieve _ list _ ref = ['_ scheduler - stdout. txt ','_ sc...
[ 0.6644110083580017, -0.3323069214820862, 0.5465579628944397, -0.2152923196554184, 0.06828302145004272, 0.34352293610572815, 0.08330266922712326, -0.2574349343776703, 1.0398833751678467, -0.5328256487846375, -0.51786208152771, -0.0240836963057518, 0.39673134684562683, 0.2456248700618744, ...
def getajaxarg ( sarg, sdefault = " " ) : data = uiglobals. web. data ( ) dic = json. loads ( data ) if dic. has _ key ( sarg ) : if dic [ sarg ] : return dic [ sarg ] else : return sdefault else : return sdefault
[ -0.30904045701026917, 0.3934310972690582, 0.5817613005638123, 0.027959009632468224, -0.7876858711242676, -0.15444611012935638, -0.5045061111450195, 0.18050558865070343, 0.29635122418403625, 0.5699712038040161, -0.2704556882381439, 0.4809800088405609, -0.20130637288093567, 0.637588262557983...
def generate _ df ( results ) : # loading the results table into a pandas dataframe results _ df = pd. dataframe ( results, columns = ['original _ gal ','oshear _ g1 ','oshear _ g2 ','true _ psf ','deconv _ psf ','reconv _ psf ','shear _ estimation _ psf ','cshear _ dg1 ','cshear _ dg2 ','shear _ estimator ','pixel _ s...
[ -0.20776452124118805, 0.39158567786216736, 0.39834585785865784, 0.2587537169456482, 0.01269117183983326, 0.41140615940093994, 0.6906959414482117, -0.4688766300678253, -0.3637598156929016, -0.529864490032196, -0.3077646791934967, -0.20916418731212616, 0.36965441703796387, -0.006282728165388...
async def lifespan ( self, scope : scope, receive : receive, send : send ) - > none : started = false app : typing. any = scope. get ( " app " ) await receive ( ) try : async with self. lifespan _ context ( app ) as maybe _ state : if maybe _ state is not none : if " state " not in scope : raise runtimeerror ('the serv...
[ -0.4379115402698517, -0.11367004364728928, 0.9827373027801514, -0.25864019989967346, 0.013838755898177624, -0.1316378265619278, -0.4251496195793152, 0.5529496669769287, 0.486568808555603, 1.2327241897583008, 0.13606178760528564, 0.5389782786369324, -0.02350722625851631, 0.506018340587616, ...
def create _ dummy _ computation _ tensorflow _ constant ( ) : value = 10. 0 type _ spec = tf. float32 value = tensorflow _ computation _ factory. create _ constant ( value, type _ spec ) type _ signature = computation _ types. functiontype ( none, type _ spec ) return value, type _ signature
[ 0.47972631454467773, 0.09456592798233032, 0.6184311509132385, -0.5967537760734558, 1.380869746208191, -0.09778854995965958, 0.9576737284660339, 0.003101553302258253, -0.9640437364578247, 0.29460200667381287, -1.061732530593872, 0.28071698546409607, 0.019839415326714516, 0.3172421455383301,...
def test _ set _ parameters _ 0 ( self ) : pass
[ -0.5756999254226685, -0.03588792309165001, 0.28190985321998596, 0.5852581858634949, 1.0356392860412598, 0.6778583526611328, 0.9610105752944946, 0.3221834599971771, -0.6692917346954346, -0.016513632610440254, -0.21859103441238403, 0.9370192289352417, -0.6759707927703857, 1.0233738422393799,...
def find _ vars ( self, txt ) : variables = re. findall ('\ $ \ { ( [ ^ \ } ] * ) \ } ', txt, re. multiline ) for n, v in enumerate ( variables ) : if self. variable _ seperator in v : variables [ n ] = v. split ( self. variable _ seperator, 1 ) [ 0 ] # removes doublettes variables = self. util. merge _ lists ( variabl...
[ -0.04804705083370209, -0.28555187582969666, 0.43551310896873474, -0.45206597447395325, -1.4793440103530884, -0.5911722183227539, -0.3399845361709595, 0.205510675907135, -0.9259352684020996, 0.4472983479499817, -0.779293954372406, -1.0466556549072266, -0.9512566328048706, 1.1232104301452637...
def _ on _ category _ selection ( self, event ) : logging. info ( " received category selection event " ) cat _ name = event. item. text self. _ update _ items _ view ( self. _ get _ items _ data ( cat _ name ) )
[ 0.177528515458107, -0.28584402799606323, 0.11848833411931992, -0.0012250638101249933, 0.09273355454206467, -0.6607823967933655, 0.20729248225688934, -0.15406998991966248, -0.0198330320417881, -0.17890235781669617, -0.17747089266777039, 0.0908394306898117, 1.5867053270339966, -0.09350801259...
def extract _ sonobat _ metadata ( fname ) : # parse the sonobat metadata itself from file with open ( fname,'rb') as infile : with closing ( mmap. mmap ( infile. fileno ( ), 0, access = mmap. access _ read ) ) as mmfile : md _ match = re. search ( sb _ md _ regex, mmfile ) if not md _ match : print ('no sonobat metada...
[ 0.01600661315023899, -0.26299139857292175, 0.6458072066307068, 0.26566219329833984, -0.1772443801164627, -0.20189553499221802, -0.2376413196325302, -0.12334530800580978, -0.2392261028289795, 0.2164006233215332, -0.3323708474636078, -0.06742176413536072, 0.008824232034385204, 0.065881803631...
def setup ( ) : for dir _ name in ('train ','test ','output ','evaluate') : new _ dir = join ( _ my _ dir, dir _ name ) if not exists ( new _ dir ) : os. makedirs ( new _ dir )
[ -0.3420766294002533, 0.6550319790840149, 0.6115434169769287, 0.4942057132720947, 0.333591103553772, 0.05804862827062607, 1.153395414352417, -0.3936043083667755, -0.07546579092741013, -0.677746057510376, -0.5445153117179871, -0.5063127875328064, -0.017882946878671646, 0.3354398012161255, ...
def _ check _ play _ button ( self, mouse _ pos ) : collision = self. play _ button. button _ rect. collidepoint ( mouse _ pos ) if collision : self. stats. game _ active = true self. stats. reset _ stats ( )
[ 0.9462145566940308, -0.954542875289917, 0.6915403604507446, 0.598698616027832, 0.768423318862915, 0.6681050658226013, 0.35530412197113037, -0.7343289256095886, 0.02160424366593361, 0.9215422868728638, -0.3335973024368286, -0.5119330883026123, 0.0723099485039711, -1.0675454139709473, 0.15...
def target _ team _ id ( self, target _ team _ id ) : self. _ target _ team _ id = target _ team _ id
[ -0.11191572993993759, -0.49969348311424255, -0.6652846932411194, 0.4162589907646179, 0.48735925555229187, 1.1265755891799927, 0.003911924548447132, 0.21516725420951843, -0.41000139713287354, 0.06684838235378265, 0.31699898838996887, 0.9338546991348267, 0.9887418150901794, 0.006112591363489...
def reap _ child _ proc ( pid ) : try : os. kill ( pid, signal. sigkill ) os. waitpid ( pid, 0 ) except oserror : pass
[ 1.1374845504760742, -1.2779978513717651, 0.6839118599891663, 0.07304111123085022, 0.20004115998744965, 1.087077021598816, -0.45083311200141907, -0.31039154529571533, 0.05318046733736992, 0.6408330798149109, -0.36070412397384644, -0.2757647931575775, 0.4652212858200073, -0.5312408208847046,...
def jsonresolver _ loader ( url _ map ) : from flask import current _ app from invenio _ jsonschemas import current _ jsonschemas from werkzeug. routing import rule url _ map. add ( rule ( " { 0 } / < path : path > ". format ( current _ app. config ['jsonschemas _ endpoint'] ), endpoint = current _ jsonschemas. get _ s...
[ -0.407646119594574, -0.4739728569984436, 0.6831043362617493, 0.09452458471059799, 0.5560723543167114, -0.1918114423751831, -0.0908672884106636, 0.846369206905365, -0.21851377189159393, 0.040096018463373184, -0.6927231550216675, 0.40898841619491577, 0.0689171850681305, 0.1253211796283722, ...
def add ( self, item = none ) : if item is none : new = self. _ current self. _ current + = 1 elif item not in self. _ map : new = self. _ map [ item ] = self. _ current self. _ current + = 1 else : new = self. _ map [ item ] return new
[ -1.4674416780471802, -0.598595142364502, 0.6418435573577881, -0.014791237190365791, -0.13902299106121063, 0.2426474392414093, 0.9584820866584778, 0.05494597554206848, 0.848770797252655, -0.8927661180496216, -0.17785081267356873, 0.2133343517780304, -1.1995381116867065, -0.3423849642276764,...
def load _ train _ data ( ) : # dataframe train _ data = pd. read _ csv ( train _ label _ dir ) train _ data [ " galaxyid " ] = train _ data [ " galaxyid " ]. apply ( append _ ext ) # generator generator = tf. keras. preprocessing. image. imagedatagenerator ( rescale = 1. / 255., validation _ split = 0. 05, rotation _ ...
[ -1.244667649269104, 0.12091634422540665, 0.6506243944168091, -0.1727445423603058, -0.023053331300616264, 0.4577171206474304, -0.10988719761371613, 0.6650675535202026, -0.4967094957828522, 0.06126729026436806, -0.08427802473306656, 0.367588073015213, 0.7502389550209045, 0.09826411306858063,...
def test _ decorated ( self ) : self. _ test ('test _ spam')
[ 0.9639385342597961, 1.3754616975784302, 0.22792181372642517, 0.29509201645851135, 1.2720615863800049, 0.7988407015800476, 0.2522229552268982, 0.7436968088150024, 1.5401064157485962, -0.3355429172515869, -0.7435920834541321, 1.6566085815429688, 0.10881553590297699, 0.05362354591488838, -0...
def version ( self ) : return self. _ version
[ 0.04248374328017235, -1.1403422355651855, -0.18352288007736206, 0.27563798427581787, 0.24628238379955292, 1.6756539344787598, 1.244970440864563, 0.011713757179677486, -0.008777439594268799, -0.4494609832763672, -0.779890775680542, 0.06880145519971848, -0.032964859157800674, -0.492713570594...
def ovs _ port _ deleted ( self, ovs _ port ) : ovs _ port = self. ovs _ ports. get ( ovs _ port. id ) if ovs _ port is none : return port _ type = ovs _ port. type if port _ type is constants. ovs _ bridge _ interface : port _ type = constants. ovs _ vm _ interface if port _ type not in self. ovs _ port _ type : log. ...
[ 0.632876992225647, -0.7342528104782104, 0.472324401140213, -0.3842219114303589, 0.31114041805267334, -0.07668552547693253, -0.1380224972963333, -0.3959997594356537, 1.5425708293914795, -0.2883243262767792, 0.37715449929237366, 0.3312819302082062, 0.3653699457645416, -0.288999080657959, 0...
def run _ test _ scripts ( self, env : str ) : test _ scripts = self. get _ test _ scripts ( ) failures = { } for script in test _ scripts : _, stderr, code = run _ command ( commands. run, " - n ", env, " / bin / bash ", script ) if code > 0 : failures [ script ] = stderr if failures : raise failedtesterror ( " { } "....
[ -0.7798272967338562, -0.11223533004522324, 0.36675363779067993, 0.11595229059457779, 0.6890679001808167, 0.04905049130320549, 0.22922736406326294, -0.9720685482025146, -0.506529688835144, -0.04100418835878372, -0.26239943504333496, 0.6260474920272827, -0.3356567323207855, 1.513927698135376...
def jinc ( x, normalize = true ) : # this is the interface function. the actual function is implemented in # _ jinc ( ) nfactor = 2. 0 if normalize else 1. 0 numpyarray = isinstance ( x, _ np. ndarray ) if not numpyarray : result = 0. 5 if x = = 0. 0 else _ sps. j1 ( x ) / ( x ) elif _ hasnumba and numpyarray and false...
[ 0.0941651314496994, 0.6958190202713013, 0.8456603288650513, 0.5976113677024841, -1.4000879526138306, -0.6926447153091431, 1.3365858793258667, -0.852486252784729, 0.39989224076271057, 0.4732263684272766, 0.48716285824775696, 0.48582786321640015, -0.23554673790931702, 0.5003064870834351, -...
def testgetvaluesforquerywithinvalidquery ( self ) : self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. getvaluesforquery ( session, u'username / bar 42 ', [ u'username / bar'] ) yield self. assertfailure ( deferred, tparseerror )
[ 0.3862758278846741, 0.9148825407028198, 0.34967100620269775, 0.16958129405975342, 0.007962031289935112, 0.8381127119064331, -1.008936882019043, -0.5496129989624023, -0.3164358139038086, -1.1002120971679688, 0.3597756624221802, -0.4309374690055847, 0.4332554042339325, 0.9011108875274658, ...
def calculate _ pd ( p _ newton _ new, p _ newton _ old, dt, delta _ y, n, alpha _ d, lambda _ d ) : pd = p _ newton _ old # calculate pd ( n - 1 ) rhs = 0 dp01 = ( p _ newton _ new [ 1 ] - p _ newton _ new [ 0 ] ) / delta _ y if dp01! = 0 : term1 = ( ( ( - 2 * p _ newton _ new [ n - 1 ] ) + p _ newton _ new [ n - 2 ] ...
[ -0.3522116243839264, -0.06323523819446564, 1.1612415313720703, -0.44899141788482666, -0.3822372853755951, 0.16610829532146454, 0.04302480071783066, -0.532262921333313, -0.7974018454551697, 0.022046638652682304, -0.027146486565470695, 0.05544327199459076, 0.5542945265769958, 0.5077157020568...
def do _ run ( self, action ) : command _ string = self. templatize ( action [ " run " ] ) for command in command _ string. splitlines ( ) : logger. debug ( f " running local command : { command } " ) run ( command, shell = true, check = true )
[ -0.5252671241760254, -1.1633121967315674, 0.5311204195022583, 0.30670246481895447, 1.1493881940841675, -0.44444164633750916, -0.03014829196035862, 0.2620202302932739, -0.03884291648864746, 0.5696348547935486, -0.5256670713424683, 0.8659769892692566, 0.38427969813346863, 0.4276418387889862,...
def expose _ headers ( self ) - > optional [ sequence [ str ] ] : return pulumi. get ( self, " expose _ headers " )
[ -0.2140500694513321, 0.301160603761673, 0.8084105253219604, 0.5415747165679932, 1.1329712867736816, 0.6957778930664062, 0.33226945996284485, -0.6679661870002747, 0.6298799514770508, 0.7043781280517578, -0.2589319050312042, 0.26295706629753113, -0.20488214492797852, -0.7724092602729797, 0...
def getnumberhsspeeds ( channel, typ ) : andor _ solis. getnumberhsspeeds. restype = ctypes. c _ uint speeds = ctypes. c _ int ( ) result = andor _ solis. getnumberhsspeeds ( ctypes. c _ int ( channel ), ctypes. c _ int ( typ ), ctypes. byref ( speeds ) ) check _ status ( result ) return int ( speeds. value )
[ 0.18697719275951385, 0.598233699798584, 0.6303357481956482, 0.15194985270500183, 0.7022022604942322, -0.14929915964603424, 0.5161839723587036, -0.5685673952102661, 0.2807817757129669, -0.1889258325099945, -0.8831504583358765, 0.6107568740844727, -1.322232961654663, 0.29528313875198364, 1...
def modified ( self, * args ) : return _ topods. topods _ shape _ modified ( self, * args )
[ -1.0584478378295898, -0.4404010772705078, 0.37609297037124634, -0.2981911599636078, 0.25438445806503296, 0.4571644365787506, 0.42236799001693726, -0.6237984299659729, 0.17611980438232422, -0.025752389803528786, -0.13319683074951172, -0.26509740948677063, -0.16289778053760529, 0.17931067943...
def _ _ init _ _ ( self, title = " ", author = " ", copy = 1, due = none, shelf = none, * * kwargs ) : self. title = title self. author = author self. copy = copy self. status = " checked in " self. due _ date = due self. shelf = shelf self. last _ shelf = shelf self. details = kwargs
[ 0.7420505881309509, -0.04381982982158661, 0.5674586892127991, 0.8507633209228516, -0.19919992983341217, 0.5743484497070312, -0.31671661138534546, 0.2031177133321762, -0.2990093231201172, -0.2889755070209503, 0.18736876547336578, -0.1790969967842102, -0.10139255225658417, 0.5094690918922424...
def mergesort ( _ list ) : _ len = len ( _ list ) if _ len < = 1 : return _ list mid = _ len / 2 ( a, b ) = ( mergesort ( _ list [ : mid ] ), mergesort ( _ list [ mid : ] ) ) merged = [ ] while len ( a ) > 0 and len ( b ) > 0 : a _ v = a [ 0 ] b _ v = b [ 0 ] if a _ v < b _ v : merged. append ( a _ v ) a. pop ( 0 ) els...
[ -0.38507309556007385, 0.30843326449394226, 0.6813333034515381, 0.5094353556632996, -0.14148066937923431, -0.24709157645702362, -0.3129868805408478, -0.05327768996357918, 0.9490125179290771, -0.27049434185028076, -1.2673887014389038, -0.2936450242996216, -0.930120050907135, 1.00730836391448...
def stream ( self, datalist, read _ all = true ) : q _ err = multiprocessing. queue ( ) q _ in = multiprocessing. queue ( ) q _ out = multiprocessing. queue ( ) proc1 = multiprocessing. process ( target = dump _ to _ stream, args = ( q _ err, q _ in, self. temp _ fifo, self. engine ) ) proc2 = multiprocessing. process ...
[ 0.5970914959907532, 0.09787950664758682, 0.8253088593482971, 0.08197323977947235, -0.24879467487335205, 0.3064786493778229, -0.6439904570579529, -0.17070282995700836, -0.23644204437732697, -0.36379459500312805, -0.8047938346862793, 0.5664381980895996, -0.13246530294418335, 0.89991074800491...
def find _ block ( self, blocks ) : for block in blocks : if self. match _ platform ( block ) and \ self. match _ arch ( block ) and \ self. match _ version ( block ) : return block return none
[ 0.4078846275806427, -0.3971391022205353, 0.6663382649421692, 0.955201268196106, -0.24623310565948486, 0.34420245885849, -0.04811054840683937, -1.2251850366592407, -0.6580858826637268, 0.263272225856781, 0.3393193185329437, 0.223258838057518, -1.8315547704696655, 0.6461079716682434, -0.21...
def tiles _ from _ slippy _ map ( root ) : root = os. path. expanduser ( root ) paths = glob. glob ( os. path. join ( root, " [ 0 - 9 ] * / [ 0 - 9 ] * / [ 0 - 9 ] *. * " ) ) for path in paths : tile = re. match ( os. path. join ( root, " (? p < z > [ 0 - 9 ] + ) / (? p < x > [ 0 - 9 ] + ) / (? p < y > [ 0 - 9 ] + ). +...
[ -0.12805618345737457, -0.6151779294013977, 0.6378570199012756, 0.1212235689163208, -1.0704689025878906, 0.1097465455532074, 0.7825744152069092, 0.071404367685318, 0.6988095641136169, -0.6663459539413452, -0.11552106589078903, -0.23648053407669067, 0.49425309896469116, 0.46383678913116455, ...
def fix _ nested _ namespaces ( self, args ) : group _ name _ keys = [ ] for key in args. _ _ dict _ _ : if '.'in key : group, name = key. split ( '.') group _ name _ keys. append ( ( group, name, key ) ) for group, name, key in group _ name _ keys : if group not in args : args. _ _ dict _ _ [ group ] = argparse. names...
[ -0.3244912028312683, -0.5631630420684814, 0.8215820789337158, -0.5082570910453796, -0.07152135670185089, 0.2895805239677429, 0.2587515711784363, 0.03262808546423912, -0.6911174654960632, -0.1826128363609314, -0.0963757112622261, 0.5921628475189209, -0.5146499872207642, 1.1402050256729126, ...
def is _ prime ( m ) : if ( m < = 1 ) : return false if ( m < = 3 ) : return true if ( m % 2 = = 0 or m % 3 = = 0 ) : return false i = 5 while ( i * i < = m ) : if ( m % i = = 0 or m % ( i + 2 ) = = 0 ) : return false i = i + 6 return true
[ -0.7528030276298523, 0.08103559166193008, 0.7337441444396973, 0.1934351772069931, -0.7195684909820557, -0.03887680545449257, -0.3894210755825043, -0.23762033879756927, 1.293204426765442, 0.1957099437713623, -0.74470454454422, -0.7516211867332458, -2.16046404838562, 0.2918267846107483, -0...
def bgr2gray ( im : np. ndarray ) - > np. ndarray : return cv. cvtcolor ( im, cv. color _ bgr2gray )
[ -0.06133246794342995, 0.30717068910598755, 0.6811650991439819, 0.24893347918987274, 1.1603790521621704, 0.2655843198299408, -0.25481340289115906, -0.6733604073524475, 0.00760746281594038, 1.179456353187561, 0.4574214220046997, 0.9414134621620178, -0.0914112776517868, 0.4801291525363922, ...
def test _ random _ sample _ count ( self ) : count = metrics. count. value with patch. object ( sqaprofilerinterface, " _ convert _ table _ to _ orm _ object ", return _ value = user ) : profiler = profiler ( count, profiler _ interface = sqaprofilerinterface ( profiler _ interface _ args = profilerinterfaceargs ( ser...
[ 0.5161120891571045, 0.4824943542480469, 0.4475935399532318, 0.20265984535217285, -0.20573808252811432, 0.5385050773620605, 0.8325054049491882, -1.2805304527282715, 0.1279377043247223, -0.47565457224845886, -0.07833562046289444, -0.7166073322296143, -0.20836740732192993, 0.11174514144659042...
def test _ step _ to _ same _ func ( ) : graph = create _ object _ graph ( " example ", testing = true ) def func ( graph ) : pass state _ machine = statemachine ( graph, initial _ state = func ) next _ func = state _ machine. step ( ) assert _ that ( next _ func, is _ ( equal _ to ( func ) ) )
[ -0.35247987508773804, 0.9036874175071716, 0.1814812272787094, 0.6899853348731995, 0.9009864330291748, -0.0033419104292988777, 0.866486132144928, -0.24145416915416718, -0.059242237359285355, -1.0965454578399658, -1.5395547151565552, 0.7414759993553162, 0.5938577055931091, -0.275934815406799...
def register _ hydra _ plugin ( plugin ) - > none : plugins. instance ( ). register ( plugin )
[ -0.4681183397769928, 0.38514429330825806, 0.2801804840564728, 0.08928042650222778, 1.4657173156738281, 0.20354093611240387, -0.03144213184714317, 1.2786145210266113, -0.17769649624824524, -1.1349717378616333, -1.9389433860778809, 1.3856489658355713, 0.0895698070526123, -0.2903043329715729,...
def _ _ init _ _ ( self, movie _ title, movie _ director, movie _ starring, poster _ image _ url, trailer _ youtube _ url ) : self. title = movie _ title self. director = movie _ director self. starring = movie _ starring self. poster _ image _ url = poster _ image _ url self. trailer _ youtube _ url = trailer _ youtub...
[ -0.6854169964790344, -0.370049387216568, 0.3467705547809601, 0.8854423761367798, 0.1297464519739151, 0.08575639873743057, -1.4546284675598145, 0.7781732082366943, -0.5705326199531555, 0.38250112533569336, -0.503282904624939, 0.9518689513206482, 0.2517704665660858, 1.2369886636734009, 0.4...
def randlist ( size, _ min, _ max ) : _ list = [ 0 ] * size return [ random. randint ( _ min, _ max ) for _ in _ list ]
[ -1.7124725580215454, -0.44184526801109314, 0.35610756278038025, -0.4386681020259857, 0.4238467812538147, 0.45184630155563354, -1.3142085075378418, 0.6485700607299805, 0.6276167631149292, 0.1359809935092926, -1.9519672393798828, 0.020817022770643234, 0.3709031343460083, -0.1778426170349121,...
def load _ all _ unlabeled ( request ) : offset = int ( request. get. get ( " offset ", 0 ) ) limit = int ( request. get. get ( " limit ", 10 ) ) ca = get _ mongo _ client ( uri ='mongodb : / / localhost : 27017 /') all _ unlabeled = ca [ " annotation _ raw _ data " ]. find ( { " labeled " : false } ) count = all _ unl...
[ -1.3685028553009033, -0.6878616809844971, 0.8095695376396179, -1.104820728302002, -0.3302898705005646, 0.690099835395813, -0.02583075873553753, 0.47012755274772644, 0.46761730313301086, 0.5254720449447632, -0.31304025650024414, 0.40598979592323303, -0.11976182460784912, 0.582067608833313, ...
def _ new _ uuid ( ) : return str ( uuid. uuid4 ( ) )
[ 0.012587043456733227, -1.3477078676223755, 0.3501664102077484, -0.7975360751152039, -0.9122983813285828, 0.26043274998664856, -0.39731407165527344, 0.7707954049110413, -0.39223381876945496, -0.5828603506088257, 0.7288719415664673, 0.029604172334074974, -0.30835655331611633, -1.344221591949...
def connection _ type ( self ) - > optional [ connectiontype ] : if self. _ transport is not none : return self. _ transport. connection _ type return none
[ 0.2990092635154724, -0.1672443151473999, 0.7371161580085754, 0.6391434669494629, 1.321757435798645, -0.25562596321105957, 0.17283932864665985, -0.6548611521720886, 0.7602729797363281, -0.4210088551044464, 0.5970423817634583, 0.4228101670742035, -0.9076434373855591, -0.05261581391096115, ...
def get _ bot _ help ( mapping : mapping [ optional [ commands. cog ], list [ commands. command ] ] ) - > discord. embed : out = discord. embed ( title = " help " ) # this might be able to be cleaned up. freestanding _ commands = [ ] for cog, cmds in mapping. items ( ) : if cog is none : freestanding _ commands. extend...
[ 0.42134520411491394, 0.5652803182601929, 0.564241886138916, 0.1296987384557724, -0.1113576591014862, 0.22945867478847504, -0.2875196039676666, -0.211069718003273, -1.02096688747406, 0.07949746400117874, 0.0639122724533081, 0.13306038081645966, 0.7456234693527222, -0.21162225306034088, 0....
def getbyid ( self, id _ cog _ source _ info : int ) : self. function + = str ( id _ cog ) +'/'result _ get = getrest ( function = self. function ). performrequest ( ) return result _ get
[ -0.6210471987724304, 0.3775314688682556, 0.40169990062713623, -0.23062796890735626, 0.242299884557724, -1.0948872566223145, -0.36662939190864563, -0.6959860324859619, -0.6182280778884888, -0.16887065768241882, -0.7323290109634399, 0.19209378957748413, -0.23234489560127258, -0.3563800156116...
def get _ input _ key ( ) : click. secho ( " no api key found! ", fg = " yellow ", bold = true ) click. secho ( " please visit { 0 } and get an api token. ". format ( base _ url ), fg = " yellow ", bold = true ) while true : confkey = click. prompt ( click. style ( " enter api key ", fg = " yellow ", bold = true ) ) if...
[ -0.6095053553581238, 0.44554826617240906, 0.6834665536880493, -0.17899805307388306, -0.05196467041969299, -0.03633475676178932, 0.22047777473926544, -0.12054304778575897, -0.7687499523162842, -0.1688365638256073, 0.2742765247821808, 0.3683187961578369, -1.0092718601226807, -0.0852466225624...
def write _ to _ file ( self, curr _ session ) : line = curr _ session. get _ write _ str ( ) self. out _ file. write ( line ) pass
[ -0.3437073528766632, -2.00642728805542, 0.09839337319135666, 0.08336463570594788, 1.1621723175048828, -0.11760527640581131, 0.6613247394561768, 0.11382339894771576, -0.5205880403518677, -0.09017513692378998, 0.55150306224823, 0.23447678983211517, 0.5467811226844788, -0.5902649760246277, ...
def _ _ init _ _ ( self, pb ) : self. _ sentences = [ annotatedsentence. from _ pb ( sent _ pb ) for sent _ pb in pb. sentence ] for sent in self. _ sentences : sent. document = self self. _ mentions = self. _ _ construct _ mentions ( pb )
[ 0.567686915397644, -0.5863550901412964, 0.42170220613479614, 0.2868516445159912, 0.18915608525276184, 0.7256925106048584, 0.4171074330806732, 0.16760368645191193, 0.11572141945362091, -0.13154953718185425, -0.2932641804218292, -0.3494737446308136, -0.9056650400161743, 1.2585527896881104, ...
def _ _ setstate _ _ ( self, state ) : self. log = logging. getlogger ( ) self. log. info ( _ _ name _ _ +':'+'def'+ self. _ _ init _ _. _ _ name _ _ +'( ) :'+ self. _ _ init _ _. _ _ doc _ _ ) self. _ _ x = state ['x'] self. _ _ y = state ['y'] self. font _ obj = none self. text _ surface _ obj = pygame. image. fromst...
[ -0.6141895651817322, -0.5556875467300415, 0.6646259427070618, -1.2856470346450806, -0.7270427942276001, -0.3920130431652069, 0.2786070704460144, -0.053185321390628815, 0.4101317822933197, -0.018240390345454216, -0.9006425738334656, 0.2415858507156372, 0.8743640184402466, 0.6347891688346863...
def add ( val, index, elem ) : diff = abs ( elem - val ) if scope is none : res. append ( ( index, elem ) ) elif diff < scope if strict else diff < = scope : res. append ( ( index, elem ) ) else : res. append ( ( none, none ) )
[ -0.4003460109233856, 0.00053134944755584, 0.6779029965400696, 0.4675580561161041, -0.049248453229665756, 0.2949892580509186, -0.4418908655643463, -0.7913323640823364, 1.162928819656372, -0.011935828253626823, 0.17597746849060059, 0.2453845590353012, -0.24114462733268738, -0.426260203123092...
def from _ fits ( cls, file _ path, quadrant _ letter ) : hdu = fits _ hdu _ from _ quadrant _ letter ( quadrant _ letter = quadrant _ letter ) exposure _ info = cls. exposure _ info _ from _ fits ( file _ path = file _ path, hdu = hdu ) array = cls. array _ converted _ to _ electrons _ from _ fits ( file _ path = file...
[ 0.7129591107368469, -1.277007818222046, 0.6191030144691467, -0.624623715877533, -0.3989887237548828, -0.03693630173802376, -0.9578886032104492, -0.06584884971380234, 0.56993168592453, -0.5968510508537292, 0.27908873558044434, 1.316210389137268, 0.6408582925796509, -0.23252363502979279, 0...
def get _ info ( self ) : return self. _ request ('get ','info ', { } )
[ -0.5305798053741455, 0.404041588306427, 0.3127807378768921, 0.9955737590789795, 0.7959733009338379, -0.6756999492645264, -1.139361023902893, -0.9752415418624878, -0.5389381647109985, -0.4596060812473297, -0.7660099267959595, 1.0984585285186768, -0.20113776624202728, -0.024727439507842064, ...
def request _ check _ error ( self, response ) : if response. status _ code / 100 = = 2 : return false msg ='' try : msg = f': [ { response. json ( ) } ]'except exception : try : msg = f': [ { response. content } ]'except exception : pass if response. status _ code = = 503 : if'retry - after'in response. headers : retr...
[ -0.5266033411026001, -0.788235604763031, 0.6806270480155945, 0.0019654284697026014, 0.02219313755631447, -0.4125833511352539, -0.3864547908306122, -0.2881283164024353, 0.08151882141828537, 0.19671013951301575, 0.44543159008026123, 0.3074813783168793, -0.4124201238155365, 0.3437025845050812...