text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def pdf _ link ( self, link _ f, y, y _ metadata = none ) : assert np. atleast _ 1d ( link _ f ). shape = = np. atleast _ 1d ( y ). shape return np. exp ( self. logpdf _ link ( link _ f, y, y _ metadata ) ) # return np. prod ( stats. poisson. pmf ( y, link _ f ) ) | [
0.08785413950681686,
-0.6893900632858276,
0.5248327255249023,
-0.2993839681148529,
0.711511492729187,
-0.5742391347885132,
-0.022887645289301872,
0.4505779445171356,
0.11624017357826233,
-0.8296471238136292,
0.9522501826286316,
0.9601020812988281,
-0.17991766333580017,
-0.47571423649787903... |
def connect _ orientcns ( self ) : refarray = self. settings [ " rotrefarray " ] if refarray : ref _ names = refarray. split ( ", " ) if len ( ref _ names ) = = 1 : ref = self. rig. findrelative ( ref _ names [ 0 ] ) pm. parent ( self. ik _ cns, ref ) else : ref = [ ] for ref _ name in ref _ names : ref. append ( self.... | [
-0.1745169311761856,
-0.3622053563594818,
0.7808709740638733,
-0.5348264575004578,
-0.07013753056526184,
-0.04362114146351814,
1.35624361038208,
-1.117500901222229,
-0.37030819058418274,
0.417301207780838,
0.5048385858535767,
-0.5494867563247681,
-0.3183901011943817,
0.250133752822876,
-... |
def upload _ yaml ( ) : user _ id = session ['uid'] project _ id = request. form ['pid'] yaml _ data = request. form [ " yaml " ] project _ meta = dict ( ) project _ config _ path = get _ project _ config _ path ( user _ id, project _ id ) project = project ( project _ config _ path ) data _ file _ name, sheet _ name =... | [
0.24180155992507935,
-0.1250351220369339,
0.9492952823638916,
-0.08722378313541412,
0.9440639019012451,
0.28464099764823914,
0.22384385764598846,
0.735673725605011,
-0.8339537382125854,
0.5298405289649963,
-0.3795614540576935,
-0.22391913831233978,
-0.0967637300491333,
0.7931619882583618,
... |
async def get _ message _ out _ with _ id ( self, msg _ id _ match, timeout = none ) - > message : while true : self. logger. debug ('wait for message : msg _ id { } '. format ( msg _ id _ match ) ) item = await self. get _ message _ out ( timeout ) if not hasattr ( item,'re _ msg _ id') or item. re _ msg _ id! = msg _... | [
0.3221365511417389,
-0.3213261067867279,
0.5061690807342529,
-0.13890378177165985,
-0.3295189142227173,
-0.5963138937950134,
-0.2414485663175583,
-0.4302397668361664,
0.06934381276369095,
-0.18963460624217987,
0.832053005695343,
0.04130392149090767,
-1.1694719791412354,
-0.2627913057804107... |
def parse _ address ( place ) : address = place [ " vicinity " ]. split ( " < br / > " ) if len ( address ) > 1 : street = address [ 0 ] city, state _ zip = address [ 1 ]. split ( ", " ) state, zipcode = state _ zip. split ( ) return ( street, city, state, zipcode ) if len ( address ) = = 1 : address = address [ 0 ]. s... | [
-0.6372093558311462,
0.26037395000457764,
0.795723557472229,
-0.29426074028015137,
0.15455986559391022,
-0.7813219428062439,
-0.009359979070723057,
0.8838486075401306,
0.9324392676353455,
0.6888427138328552,
-0.6988734006881714,
-0.208493173122406,
-0.4017806947231293,
0.00785862747579813,... |
def _ _ parse _ prototype _ params ( self ) - > list [ str ] : self. _ _ try _ eat _ tok ( tokentype. operator, expected _ value = " ( " ) #'('# read the list of argument names params : list [ str ] = [ ] while self. curr _ tok. type = = tokentype. identifier : params. append ( self. curr _ tok. value ) self. _ _ eat _... | [
-1.3615745306015015,
-0.09982875734567642,
0.5975300669670105,
-0.19418202340602875,
-0.008511959575116634,
-0.6033830642700195,
-1.0751571655273438,
0.5634803771972656,
-0.5301650762557983,
0.8348483443260193,
-0.140958771109581,
-0.5889583826065063,
-0.332040011882782,
1.084295630455017,... |
def get _ video _ parts ( self, video _ path ) : parts = video _ path. split ('/') filename = parts [ - 1 ] dir = parts [ 1 ] return filename, dir | [
-0.456055611371994,
-1.346670150756836,
0.44707486033439636,
0.8692448735237122,
0.2109338343143463,
-0.5494868755340576,
0.4090265929698944,
0.46620887517929077,
0.7848539352416992,
0.16663110256195068,
-0.1787687987089157,
0.7270535230636597,
0.06585901230573654,
0.07556448131799698,
0... |
def test _ delete _ multiple _ alumno _ curso _ admin ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) alumno _ 1 = alumno. objects. get ( apellido = " 1 " ). pk curso _ 1 = curso. objects. get ( nombre = " curso1 " ). pk anio _ lectivo _ 1 = aniolectivo. objects. get ( nombre = " 2019 " ). p... | [
0.3911985456943512,
-0.38514360785484314,
0.7131912112236023,
0.02972511388361454,
0.4470623731613159,
0.8886252641677856,
-0.1672404557466507,
-0.00614218320697546,
-0.07797641307115555,
0.5275496244430542,
-1.3451995849609375,
0.41888609528541565,
0.5582702159881592,
-0.05677760392427444... |
def _ _ eq _ _ ( self, other ) : return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.6778805255889893,
-1.1012346744537354,
0.7477346658706665,
-0.4689524173736572,
-0.06940117478370667,
0.3150198459625244,
-0.04707660526037216,
-0.44794416427612305,
0.6671794056892395,
-0.21894675493240356,
-1.0724396705627441,
0.12544500827789307,
0.312974214553833,
-0.226686894893646... |
def delete _ txt _ record ( args ) : domain _ name = args [ 0 ] fqdn _ tuple = extract ( domain _ name ) base _ domain _ name = ". ". join ( [ fqdn _ tuple. domain, fqdn _ tuple. suffix ] ) b = requests. session ( ) b. verify = false b. headers. update ( { u'content - type': u'application / json ', u'api - username': a... | [
0.5101521015167236,
-0.04802392050623894,
0.7128987312316895,
-0.7582576274871826,
0.143326073884964,
0.008009389974176884,
-0.2158161699771881,
0.35396674275398254,
-0.3791545629501343,
1.0267279148101807,
-0.31225958466529846,
0.9624980092048645,
-0.36102086305618286,
0.11538101732730865... |
def unique ( list ) : if type ( list ) is not type ( [ ] ) : raise typeerror ( " please input a list. " ) lst = [ ] for i in list : if i not in lst : lst. append ( i ) return lst | [
-0.7679420113563538,
0.24233944714069366,
0.2722119092941284,
0.811008632183075,
0.48608461022377014,
1.5274317264556885,
0.020082810893654823,
0.3810568153858185,
1.2577763795852661,
-0.037424858659505844,
-1.387474536895752,
0.3421150743961334,
-1.0582901239395142,
0.5701277256011963,
... |
def _ _ init _ _ ( self, map _ path : str ) : self. _ map = np. loadtxt ( map _ path ) | [
0.09235666692256927,
-1.5471307039260864,
0.2958429455757141,
-0.49406930804252625,
-1.0470972061157227,
0.8732365369796753,
-0.2629534900188446,
1.0504395961761475,
-0.15323278307914734,
0.07896095514297485,
0.1853344440460205,
0.028839988633990288,
0.25732624530792236,
-0.284741938114166... |
def _ marksinglepolygon ( self, polygon ) : # oznaci stranice contours = polygon. getcontours ( ) for cnt in contours : cv2. drawcontours ( self. _ image, [ cnt ], 0, green _ bgr, 2 ) # oznaci vrhove vertices = polygon. getvertices ( ) for vertex in vertices : x, y = self. _ reversecoordinates ( vertex [ 0 ], vertex [ ... | [
-0.33571767807006836,
-0.22415561974048615,
0.6435569524765015,
-0.20601508021354675,
1.178314447402954,
0.24280548095703125,
0.608343243598938,
0.054560597985982895,
0.941240131855011,
0.218887060880661,
-0.8655474185943604,
0.49355652928352356,
0.4846203327178955,
-0.41564714908599854,
... |
def get _ group _ ideas ( self, group _ id, start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : kwargs ['_ return _ http _ data _ only'] = true if kwargs. get ('callback') : return self. get _ group _ ideas _ with _ http _ info ( group _ id, start, end, logged _ in _ user _ id, access _ ... | [
-1.0823757648468018,
0.19692246615886688,
0.6227132081985474,
0.5846631526947021,
-0.207224041223526,
-0.09280084818601608,
-0.136662095785141,
-1.018143892288208,
-0.4814510643482208,
0.04442571848630905,
0.7391020059585571,
1.5172557830810547,
-0.7902136445045471,
0.5180560350418091,
0... |
async def recheckrole ( self, ctx, *, user : discord. member = none ) : author = ctx. message. author server = ctx. message. server channel = ctx. message. channel isadmin = author. permissions _ in ( channel ). administrator # only allow admins to change server stats if not isadmin : await self. bot. send _ message ( ... | [
0.09749574214220047,
0.124681755900383,
0.7248029112815857,
0.564345121383667,
-0.055971648544073105,
0.6547768115997314,
-0.4161047041416168,
-0.04871034994721413,
0.24634923040866852,
0.014367329888045788,
0.32989808917045593,
1.8018425703048706,
-0.617666482925415,
0.7701907753944397,
... |
def getnumbervsspeeds ( ) : andor _ solis. getnumbervsspeeds. restype = ctypes. c _ uint speeds = ctypes. c _ int ( ) result = andor _ solis. getnumbervsspeeds ( ctypes. byref ( speeds ) ) check _ status ( result ) return int ( speeds. value ) | [
0.2614422142505646,
0.6457459926605225,
0.46816375851631165,
0.8868632912635803,
-0.31249377131462097,
-0.9028651714324951,
0.854156494140625,
0.006127066910266876,
0.6080008149147034,
0.0843869000673294,
-0.6711273789405823,
0.35913556814193726,
-0.9646809697151184,
0.0015958452131599188,... |
def target _ image _ folder _ id ( self ) : return self. _ target _ image _ folder _ id | [
-0.7967578768730164,
-1.0451384782791138,
0.21423938870429993,
0.03643246740102768,
0.42528077960014343,
0.5516224503517151,
0.9003952741622925,
0.209811732172966,
0.3477969765663147,
-0.09756247699260712,
0.18388721346855164,
1.3397022485733032,
0.3558277487754822,
0.690338671207428,
-0... |
async def _ load _ occupancy _ groups ( self ) : _ log. debug ( " loading occupancy groups from the smart bridge " ) occgroup _ json = await self. _ request ( " readrequest ", " / occupancygroup " ) if occgroup _ json. body is none : return occgroups = occgroup _ json. body. get ( " occupancygroups ", { } ) for occgrou... | [
-0.8084256649017334,
1.006086826324463,
0.38627880811691284,
-0.21594829857349396,
-0.19731783866882324,
-0.6641743183135986,
-0.6013400554656982,
-0.3752548396587372,
0.08656150847673416,
0.24108301103115082,
0.41913920640945435,
-0.31681838631629944,
-0.24002230167388916,
0.0490620918571... |
def create _ dummy _ value _ at _ server ( ) : value = 10. 0 type _ signature = type _ factory. at _ server ( tf. float32 ) return value, type _ signature | [
-0.044817037880420685,
0.151300311088562,
0.42561525106430054,
-0.6098964214324951,
1.3373136520385742,
0.20208245515823364,
0.3704162836074829,
-0.9827574491500854,
-0.9832002520561218,
-0.010449385270476341,
-1.467783808708191,
0.5202584266662598,
-0.07283958047628403,
0.7838062047958374... |
def disconnectcallback ( self, signal ) : if signal in self. _ connectionmap. getsignalnames ( ) : connections = self. _ connectionmap. getconnectionsbysignalname ( signal ) for conndef in connections : if conndef. callbacktype = = _ connectiontype. viewport : mxs. unregisterredrawviewscallback ( getattr ( mxs,'blurfn ... | [
0.30183809995651245,
-0.1897439807653427,
0.7759210467338562,
0.3297409117221832,
-0.49492931365966797,
-0.1578376442193985,
0.08894851058721542,
-0.16112960875034332,
1.0221201181411743,
0.020532643422484398,
-0.7701800465583801,
-0.4247165024280548,
-0.2596464455127716,
0.831941723823547... |
def after _ stopped ( self ) : raise notimplementederror | [
-0.47256550192832947,
-1.2429020404815674,
0.4401216506958008,
-0.11654699593782425,
-0.6829177141189575,
1.172103762626648,
0.5694178342819214,
0.17284075915813446,
-0.2273866832256317,
-0.25099581480026245,
-1.1702637672424316,
-0.0761958584189415,
0.20978720486164093,
-0.154953569173812... |
def _ _ end _ element ( self, tag ) : text =''. join ( self. _ _ tlist ) if tag = = " code " : if self. _ _ temple _ codes. get ( self. _ _ current _ temple ) is none : self. _ _ temple _ codes [ self. _ _ current _ temple ] = text self. _ _ temple _ to _ abrev [ text ] = self. _ _ current _ temple | [
-1.0346593856811523,
0.37892138957977295,
0.4964818060398102,
-0.9572112560272217,
-0.08823420852422714,
0.17405439913272858,
0.5340050458908081,
0.3836565911769867,
0.3047748804092407,
1.3768402338027954,
-0.8438802361488342,
-0.2058129757642746,
-0.6094133853912354,
1.1958037614822388,
... |
def input _ fn ( serialized _ input _ data, content _ type ) : if content _ type = = content _ type : stream = bytesio ( serialized _ input _ data ) return np. load ( stream ) raise exception ('requested unsupported contenttype in content _ type :'+ content _ type ) | [
0.2183619737625122,
-0.9662461876869202,
0.3992158770561218,
0.019503245130181313,
-0.2490330934524536,
-0.017643116414546967,
0.31173357367515564,
-0.721727192401886,
0.07934372872114182,
-0.47079944610595703,
0.18481524288654327,
1.4146921634674072,
-0.358029842376709,
-0.890859484672546... |
def execute ( self ) : if self. dbobj is none or not self. addressdetails : raise mandatoryfieldmissing self. confidence = 0 " " " gnaf is millions of records to best to filter the data " " " self. base _ set ( ) if self. gnafrecs. empty : return none if self. addressdetails. number _ first : found = self. filter _ rec... | [
0.4627155363559723,
-0.33715319633483887,
0.7081792950630188,
-0.6929684281349182,
0.18734003603458405,
-0.26066187024116516,
0.0965857282280922,
-0.11119705438613892,
-0.2992449998855591,
0.039039496332407,
0.39587679505348206,
0.2888302803039551,
-0.9150828719139099,
0.040257588028907776... |
def search ( query, order ='desc') : query = re. sub ( u " [ \ s \. \ \ \ / \! \ @ \ # \ $ \ % \ ^ \ & \ * \ ( \ ) \ _ \ - \ + \ ~ \ ` ] + ",'', query ) if not query : return none if len ( query ) < = 3 : q _ search = " " " select w. word as ` word `, w. length as ` length `, 1 / w. length as ` score ` from word w wher... | [
0.5882766246795654,
0.7823941111564636,
1.0015584230422974,
0.11344920098781586,
-0.4841168522834778,
-0.5251362919807434,
-0.45820924639701843,
-0.9761778712272644,
0.19653257727622986,
0.7399538159370422,
0.10327848047018051,
-0.26770174503326416,
-0.9856415390968323,
0.6164655089378357,... |
def flatten _ class _ methods ( classes, c ) : for c1 in flatten _ classes ( classes, c ) : yield from c1. methods | [
-0.5331938862800598,
-0.394511878490448,
0.40585505962371826,
0.4114445745944977,
-0.28597167134284973,
0.01788226328790188,
0.2295098453760147,
-0.9375382661819458,
0.1454392373561859,
-0.21761450171470642,
-0.3315565288066864,
-0.5488189458847046,
-0.5286267399787903,
0.444027841091156,
... |
def run _ con _ fibstr _ cattiva ( n, s ) : nseed ( s ) rseed ( s ) print n alphabet = set ( " qwertyuiopasdfghjklzxcvbnm " ) x = choice ( list ( alphabet ) ) alphabet. remove ( x ) y = choice ( list ( alphabet ) ) fibs = fibonacci ( n ) fiblen = randrange ( 3, len ( fibs ) ) before = randint ( 0, n - fibs [ fiblen ] )... | [
0.29826363921165466,
-0.1686023622751236,
0.5613006353378296,
0.5270959138870239,
-0.5313155055046082,
-0.18343979120254517,
0.4256378412246704,
-0.6866487860679626,
-0.1381710171699524,
0.09693952649831772,
-0.28204354643821716,
0.9765461087226868,
-0.18533045053482056,
-0.000722032855264... |
def _ _ init _ _ ( self, theta ) : super ( ). _ _ init _ _ ('crx ', 2, [ theta ], num _ ctrl _ qubits = 1 ) self. base _ gate = rxgate ( theta ) | [
0.8389379382133484,
0.1694304645061493,
0.4645991325378418,
0.7554634213447571,
-0.11932825297117233,
-0.2519856095314026,
-0.4657057225704193,
-0.3237929940223694,
-0.2034541815519333,
-0.3497791588306427,
-0.6211909055709839,
0.4783724248409271,
-0.6893035769462585,
0.4381521940231323,
... |
def census2gdf ( geojson _ path ) : # load census data from geojson and calculate area nbh _ geojson = gpd. read _ file ( geojson _ path, driver ='geojson') nbh _ gdf = geodataframe ( nbh _ geojson, crs = {'init':'epsg : 4326'}, geometry = nbh _ geojson ['geometry'] ) nbh _ gdf ['area _ km2'] = nbh _ gdf. to _ crs ( {'... | [
1.0728983879089355,
-0.489936888217926,
0.5252230763435364,
-0.22893324494361877,
-0.46567103266716003,
0.7570047974586487,
-0.25767022371292114,
0.4219195544719696,
-0.24987368285655975,
0.2806333899497986,
-0.0626579150557518,
0.4839397966861725,
0.19668932259082794,
0.454988956451416,
... |
def puzzle ( self ) - > program : return self. source | [
-0.051042500883340836,
-0.013368203304708004,
0.2279144823551178,
-0.021888311952352524,
-0.520399808883667,
0.6344795227050781,
1.6456780433654785,
-0.28726983070373535,
1.9252794981002808,
-0.8439978957176208,
-0.4097970426082611,
0.4591003656387329,
0.10778975486755371,
-1.0560858249664... |
def test _ api _ video _ initiate _ upload _ anonymous _ user ( self ) : video = factories. videofactory ( ) response = self. client. post ( f " / api / videos / { video. id } / initiate - upload / ", { " filename " : " video _ file ", " mimetype " : " ", " size " : 100 }, ) self. assertequal ( response. status _ code,... | [
-0.6163702011108398,
0.1693882793188095,
0.5061132907867432,
0.6214268207550049,
0.06265243887901306,
0.4673151671886444,
-0.3120410740375519,
0.11442113667726517,
0.24927185475826263,
-0.26425090432167053,
-1.2552180290222168,
1.218276023864746,
-0.30009931325912476,
0.40635937452316284,
... |
def load _ from _ pickle ( filename, n _ jets ) : jets = [ ] fd = open ( filename, " rb " ) for i in range ( n _ jets ) : jet = pickle. load ( fd ) jets. append ( jet ) fd. close ( ) return jets | [
-0.2167021781206131,
-0.5037446618080139,
0.4302397072315216,
-0.6778793334960938,
-0.2868916094303131,
0.15453214943408966,
-1.6851394176483154,
0.08437208831310272,
-0.9863625168800354,
0.13503369688987732,
-0.8748105764389038,
-0.8234455585479736,
0.4074959456920624,
-0.2893290817737579... |
def timestamp ( ) : return datetime. now ( ). strftime ('% y % m % d % h % m % s') | [
0.11081413924694061,
-0.6064186096191406,
0.9442521333694458,
-1.0020780563354492,
0.036347564309835434,
0.5160565972328186,
-0.9718995094299316,
0.08734805136919022,
-0.20793116092681885,
0.6770697236061096,
-0.28174033761024475,
0.11217756569385529,
0.7344021797180176,
-0.491450071334838... |
def testsettaginstancewithboolvalue ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) tag = gettags ( paths = [ u'username / bar'] ). one ( ) objectid = uuid4 ( ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createthriftva... | [
-0.11828114092350006,
0.5420241951942444,
0.41060131788253784,
-0.3197283148765564,
0.19549614191055298,
0.9398788809776306,
0.06614354252815247,
-0.2700153589248657,
-0.6160438656806946,
0.12262682616710663,
-0.8910039067268372,
-0.3216716945171356,
0.1475907862186432,
0.4201807677745819,... |
def visit _ augassign ( self, new _ body, node ) : assign _ id = self. create _ ast _ component ( node, component. aug _ assign ) self. create _ composition ( assign _ id, * self. composition _ edge ) mode ='{ } _ assign '. format ( type ( node. op ). _ _ name _ _. lower ( ) ) self. composition _ edge = ( assign _ id, ... | [
-1.3067072629928589,
-0.9166823029518127,
0.8690429925918579,
0.028156263753771782,
-0.12894465029239655,
-0.8119023442268372,
0.29400017857551575,
0.020737841725349426,
0.547893762588501,
0.724148154258728,
-0.18782609701156616,
0.9478537440299988,
0.7042025327682495,
0.7999916672706604,
... |
def test _ valid _ slug _ handling ( self ) : response = self. client. get ( reverse ('validate - slug - view ', kwargs = {'slug':'eric - the - fish ','pk': 1, } ) ) self. assertcontains ( response, " allright " ) | [
0.4647237956523895,
0.4613439738750458,
0.39679715037345886,
0.5039650797843933,
0.15445049107074738,
0.5659521818161011,
-0.3123622536659241,
0.7220823764801025,
0.5526229739189148,
-1.844703197479248,
0.357090026140213,
-0.13465899229049683,
-0.1695130616426468,
0.6434873938560486,
-0.... |
def add _ dep ( self, name ) : self. deps. append ( self. project. find _ part ( name ) ) | [
-0.33174315094947815,
-0.2993072271347046,
0.6004821062088013,
-0.4899246096611023,
-0.17711493372917175,
1.4196120500564575,
-0.694594144821167,
-0.6421274542808533,
0.17260994017124176,
-0.24883487820625305,
-0.9459270238876343,
-0.7363184690475464,
-0.31207433342933655,
0.45612171292304... |
def _ lcg ( self, number ) : return ( self. _ lgc _ a * number + self. _ lgc _ c ) % self. _ lgc _ m | [
0.6055535674095154,
0.9047684073448181,
0.4195989966392517,
-1.980893611907959,
-0.7207280993461609,
-0.03674453869462013,
-0.176885724067688,
-0.3014512062072754,
0.015540813095867634,
0.09229875355958939,
0.3107044994831085,
-0.7877507209777832,
-0.9241531491279602,
0.1052490621805191,
... |
def get _ self _ requested _ by ( self ) : url = self. client. me +'/ requested - by'return self. client. get ( url, bucket = _ func _ ( ) ) | [
-1.6188286542892456,
0.03146631643176079,
0.585864245891571,
0.9565418362617493,
-0.2861636281013489,
-1.3250104188919067,
0.14711782336235046,
-0.5124494433403015,
-0.9153353571891785,
-1.7046889066696167,
-0.17592772841453552,
0.9052552580833435,
-0.4569675922393799,
-0.8749643564224243,... |
def heap _ sort ( arr ) : create _ max _ heap ( arr ) heap _ size = len ( arr ) # swap the max value in heap with the end of the array and decrease the size of the heap by 1 # call max heapify on the 0th index of the array while heap _ size > 1 : arr [ heap _ size - 1 ], arr [ 0 ] = arr [ 0 ], arr [ heap _ size - 1 ] h... | [
0.2516959309577942,
-0.18595047295093536,
0.6608024835586548,
0.6896388530731201,
-0.6961404085159302,
-0.12404859811067581,
-0.46854883432388306,
-0.30758076906204224,
0.2434731125831604,
-0.5290432572364807,
-0.10175596922636032,
0.686496376991272,
-0.23530437052249908,
1.434739232063293... |
def get _ data _ log ( self ) : return self. _ _ data _ log | [
-0.19665388762950897,
0.3239051103591919,
0.16731616854667664,
-0.12337961792945862,
-0.8414521813392639,
1.167813777923584,
-0.5798043012619019,
-0.38613757491111755,
-0.5086095929145813,
-0.9756885170936584,
-0.611495852470398,
0.9974534511566162,
0.8262853622436523,
-0.3525623679161072,... |
def uninstall ( self ) : db = self. boilerplate. db tables = [ self. table _ comments, self. table _ profiles, self. table _ notifications, self. table _ votes, self. table _ flags ] for table in tables : try : db [ table ]. drop ( ) except keyerror : query ='drop table % s ;'% table db. executesql ( query ) | [
-0.0761408880352974,
0.5122701525688171,
0.4347844421863556,
0.5003898739814758,
0.8136584758758545,
0.22937990725040436,
0.5230979323387146,
0.6822541356086731,
-0.6205005049705505,
0.2834705412387848,
-0.4670569598674774,
-0.6416017413139343,
-0.813523530960083,
1.0896482467651367,
-0.... |
def input _ press _ to _ continue ( optional _ message ='' ) : print ( optional _ message ) input ('press the [ enter ] key to continue.') | [
1.239733338356018,
0.05256625637412071,
0.35594719648361206,
0.7318077087402344,
0.041842956095933914,
0.39998728036880493,
0.5381792783737183,
-0.3650899827480316,
-0.2569348216056824,
0.11026230454444885,
0.6161019206047058,
0.9096335172653198,
-1.6077953577041626,
-1.0864577293395996,
... |
def chroma _ matrix _ horizontal _ size ( self, chroma _ matrix _ horizontal _ size ) : # type : ( int ) - > none if chroma _ matrix _ horizontal _ size is not none : if not isinstance ( chroma _ matrix _ horizontal _ size, int ) : raise typeerror ( " invalid type for ` chroma _ matrix _ horizontal _ size `, type has t... | [
0.38753408193588257,
-0.1884603053331375,
-0.2156154066324234,
0.22531379759311676,
-0.2586739659309387,
1.3795466423034668,
0.1945182979106903,
0.669905424118042,
-0.45228472352027893,
-0.5528905391693115,
-0.9295008182525635,
-0.7117794752120972,
-0.9146410226821899,
0.482394814491272,
... |
def pslist ( self ) : log. debug ( " executing volatility pslist plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = taskmods. pslist ( self. config ) calc1, calc2 = itertools. tee ( command. calculate ( ) ) # create pid : process _ name mapping names = { } for process in calc... | [
-0.26387304067611694,
-1.1312869787216187,
0.7277075052261353,
-0.9536980986595154,
-0.09409396350383759,
-0.45382192730903625,
-0.14102888107299805,
0.07003416866064072,
0.021344972774386406,
0.9546587467193604,
-0.8597811460494995,
-0.22098901867866516,
-0.03472498804330826,
0.8576312661... |
def test _ ipv6 _ ok ( self ) : paste _ conf = self. _ paste _ config ('keystone') # verify admin with appserver. appserver ( paste _ conf, appserver. admin, host = " : : 1 " ) : conn = environment. httplib. httpconnection (': : 1 ', conf. admin _ port ) conn. request ('get ','/') resp = conn. getresponse ( ) self. ass... | [
0.10562398284673691,
0.6503835916519165,
0.5207149982452393,
0.3957737982273102,
0.21196021139621735,
0.9606018662452698,
-0.8373029828071594,
-0.1327965259552002,
-0.2246629297733307,
0.43689677119255066,
-0.6924947500228882,
0.5572216510772705,
-0.2695387005805969,
0.028390442952513695,
... |
def remove _ time _ trace _ level ( self ) : self. time _ trace _ level - = 2 | [
0.22936253249645233,
-0.2573830783367157,
0.5342716574668884,
0.08738002181053162,
0.39068785309791565,
1.0245440006256104,
0.7452589273452759,
0.02880134992301464,
-0.5881142020225525,
0.8933243155479431,
-0.8450120687484741,
-0.43039700388908386,
-0.5696410536766052,
0.46654441952705383,... |
def visit _ interactive ( self, node ) : # pylint : disable = invalid - name return self. visit _ module ( node, cls = ast. interactive ) | [
-0.4276176393032074,
0.1515217423439026,
0.494755357503891,
-0.6220220327377319,
-0.6014078259468079,
-0.13773426413536072,
0.642639696598053,
-0.43404141068458557,
-0.3366798460483551,
0.7682689428329468,
0.03648633137345314,
0.6584531664848328,
-0.2682029902935028,
-0.5851795077323914,
... |
def _ checkcalledfromgeneratedfile ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.005099968984723091,
-0.7725226283073425,
0.5250271558761597,
0.4845086336135864,
0.6897518038749695,
1.2822874784469604,
0.22556506097316742,
-0.16600728034973145,
-0.9339867830276489,
-0.5705789923667908,
-0.23307879269123077,
-0.2569531500339508,
-0.07643816620111465,
0.87866902351379... |
def _ darwinunmountdmg ( self, fignoreerror ) : smountpath = self. _ darwindmgpath ( ) ; if not os. path. exists ( smountpath ) : return true ; # unmount. frc = self. _ executesync ( ['hdiutil ','detach ', smountpath ] ) ; if not frc and not fignoreerror : reporter. error ('failed to unmount dmg at % s'% smountpath ) ;... | [
-0.5803165435791016,
1.1275911331176758,
0.6533825993537903,
-0.6960922479629517,
-0.7547188997268677,
-0.4907398819923401,
0.07903192937374115,
-0.0607011653482914,
-0.17585021257400513,
-0.15386463701725006,
-0.185989111661911,
-0.5444039702415466,
0.057187873870134354,
0.198745071887969... |
def dotproductattention ( query, key, value, mask, dropout, mode, rng ) : depth = jnp. shape ( query ) [ - 1 ] dots = jnp. matmul ( query, jnp. swapaxes ( key, - 1, - 2 ) ) / jnp. sqrt ( depth ) if mask is not none : # todo ( kitaev ) : workaround for https : / / github. com / google / jax / issues / 850 # we must ensu... | [
-0.29619425535202026,
0.231076180934906,
0.6483336687088013,
-0.30719485878944397,
-0.6481932401657104,
-0.3385395407676697,
0.8221345543861389,
-0.43179062008857727,
1.1135411262512207,
0.4813498556613922,
0.6680010557174683,
0.6263493299484253,
0.5817871689796448,
-0.5836787819862366,
... |
def grouped ( iterable : iterable [ t ], n = 2 ) - > iterable [ tuple [ t,... ] ] : return zip ( * [ iter ( iterable ) ] * n ) | [
-1.440783143043518,
0.7523968815803528,
0.49983352422714233,
0.573025107383728,
0.32282504439353943,
-0.29682448506355286,
0.21123431622982025,
-0.19275106489658356,
-0.5745561122894287,
0.3368465304374695,
-0.26409098505973816,
-0.7315616011619568,
0.21539358794689178,
0.32056450843811035... |
def test _ attempt _ json _ write ( ) : with patch ('builtins. open') : result = writer. attempt _ json _ write ('fake ', { } ) assert result is none | [
-1.1469582319259644,
-0.5012366771697998,
0.3570381999015808,
-0.5470860004425049,
0.12552568316459656,
-0.3786051869392395,
0.3085865378379822,
-0.5540605783462524,
-0.2162444293498993,
-0.5033888220787048,
-0.8945353031158447,
-0.10945222526788712,
-0.256935179233551,
-0.5643912553787231... |
def test _ s3md5 ( self ) : test _ checksum ='fakemd5'mock _ item1 = magicmock ( ) mock _ item1. md5 = test _ checksum mock _ item2 = magicmock ( ) mock _ item2. md5 = none mock _ item2. etag = test _ checksum mock _ item3 = magicmock ( ) mock _ item3. md5 = none mock _ item3. etag ='" { } " '. format ( test _ checksum... | [
0.1494138240814209,
-0.22480079531669617,
0.5840601921081543,
0.2439112812280655,
0.8334118723869324,
0.16487227380275726,
0.14182962477207184,
0.0968092530965805,
0.28542301058769226,
0.42333853244781494,
-1.2727590799331665,
-0.24719147384166718,
0.2103286236524582,
-0.35012292861938477,... |
def edit _ post ( post _ id ) : post _ d = mongo. db. posts. find _ one ( post _ id ) if post _ d is none : abort ( 404 ) form = posteditform. from _ json ( request. json, skip _ unknown _ keys = false ) if form. validate ( ) : post = post ( bson = post _ d ) post. update ( form. data ) query = {'_ id': post _ id } mon... | [
-0.48364773392677307,
-0.41031408309936523,
0.599925696849823,
0.3686046004295349,
0.47257229685783386,
-0.28221815824508667,
-0.7317700982093811,
0.574317455291748,
0.10353697836399078,
-0.07949893176555634,
-0.27729737758636475,
-0.19975663721561432,
-0.06812392920255661,
0.1972583979368... |
def _ prune _ ps _ map ( ps _ map ) : if not ps _ map : return none ret = { } for k, v in ps _ map. items ( ) : if re. search ( " _ [ acgt ] + $ | _ noindex $ ", k ) : ret [ k ] = v return ret | [
-0.9056262373924255,
-0.4219481945037842,
0.46015074849128723,
-0.660379946231842,
-1.2981711626052856,
-0.6833696961402893,
-0.32200172543525696,
-0.23599006235599518,
-0.3947082459926605,
0.4038448631763458,
0.40517091751098633,
-0.2694953382015228,
-0.1818782240152359,
-0.56054216623306... |
def edits1 ( word ) : " all edits that are one edit away from ` word `. " letters ='abcdefghijklmnopqrstuvwxyz'splits = [ ( word [ : i ], word [ i : ] ) for i in range ( len ( word ) + 1 ) ] deletes = [ l + r [ 1 : ] for l, r in splits if r ] transposes = [ l + r [ 1 ] + r [ 0 ] + r [ 2 : ] for l, r in splits if len ( ... | [
-0.2655867040157318,
0.6237361431121826,
0.645810067653656,
-1.0999351739883423,
-0.9262930154800415,
-0.4129175543785095,
0.9785571098327637,
-0.33687737584114075,
0.8401222229003906,
0.260037362575531,
-0.9997991323471069,
1.0941880941390991,
-0.6190863847732544,
-0.6485695838928223,
0... |
def font ( text, * * kwargs ) : return wrap _ html ( text, " font ", * * kwargs ) | [
0.2063625305891037,
0.25392964482307434,
0.23543885350227356,
0.9849485158920288,
-0.8373022675514221,
-0.5423895120620728,
-0.5106205940246582,
0.4323214292526245,
0.5047841668128967,
-0.23870763182640076,
0.3968067169189453,
0.6559329628944397,
0.1599033921957016,
0.14945097267627716,
... |
def computea ( diameter ) : radius = diameter / 2. 0 return np. pi * ( radius * * 2 ) | [
-0.7104771137237549,
-0.7436332702636719,
0.5632500052452087,
-0.4493558406829834,
-0.3579855263233185,
-0.6195552945137024,
0.9509943127632141,
0.1571686714887619,
1.0677542686462402,
0.45963993668556213,
0.5614797472953796,
0.42335188388824463,
0.2053166776895523,
0.49748489260673523,
... |
def get _ queryset ( self ) : # question. objects. filter ( pub _ date _ _ lte = timezone. now ( ) ) returns a queryset containing questions # whose pub _ date is less than or equal to - that is, earlier than or equal to - timezone. now. return question. objects. filter ( pub _ date _ _ lte = timezone. now ( ) ). order... | [
0.43532946705818176,
-0.6473236680030823,
0.5254309177398682,
0.4263024628162384,
-0.06135313957929611,
0.5331891179084778,
0.1537669152021408,
-0.7072904706001282,
-0.8197516798973083,
-0.5046722292900085,
0.3212798237800598,
0.1900978684425354,
-0.022726166993379593,
0.26661378145217896,... |
def capitalize _ names ( input ) : return [ str. capitalize ( e ) for e in input ] | [
-0.9548852443695068,
-1.131481647491455,
0.5085708498954773,
0.28199315071105957,
0.4482419490814209,
0.44329145550727844,
-1.1292978525161743,
0.27697786688804626,
0.13767774403095245,
0.8233098983764648,
-0.45673108100891113,
-0.3825889527797699,
-0.2231094092130661,
1.4015116691589355,
... |
def test _ pre _ process _ request _ sync _ skipped _ for _ invalid _ connector ( self ) : self. env. config. set ('repositories ','repos. dir ','/ some / path') self. env. config. set ('repositories ','repos. type ','invalid') self. env. config. set ('repositories ','repos. sync _ per _ request ', true ) req = mockreq... | [
-0.4174555540084839,
0.4056295156478882,
0.6357271671295166,
0.21978385746479034,
0.340364009141922,
1.073675274848938,
0.1562681645154953,
-0.47801363468170166,
0.14879077672958374,
-0.6101694703102112,
0.05233694985508919,
-0.06918463110923767,
0.004741565324366093,
0.4982222318649292,
... |
def whichoneof ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.03675292432308197,
-0.4254486560821533,
0.4006858766078949,
0.6975286602973938,
0.6403366923332214,
-0.5629039406776428,
0.7091535329818726,
-0.9538438320159912,
-0.13880108296871185,
-0.7264447212219238,
-0.3603857159614563,
0.15033529698848724,
-0.7030418515205383,
-0.0278934855014085... |
def extract ( self, file _ name, output _ path ) : self. zip. extract ( file _ name, path = output _ path ) | [
0.18102914094924927,
-1.110763669013977,
0.35660520195961,
0.6209338903427124,
-0.7053263187408447,
-0.7536824345588684,
0.2531139552593231,
0.8201946020126343,
-0.6280338168144226,
0.2576000392436981,
0.10373694449663162,
-0.6822497248649597,
-0.08870959281921387,
-0.8225696086883545,
-... |
def test _ gf _ write _ tag _ with _ given _ identation ( disabled _ colors, capsys, mocker ) : # given tag = mocker. magicmock ( spec = tag ) tag. name = " tag - a " indentation = " " * 4 # when write _ tagline ( tag, indentation ) # then stdout = capsys. readouterr ( ). out assert stdout = = " @ tag - a \ n " | [
-0.027419015765190125,
-0.5212000012397766,
0.2945123612880707,
0.20552383363246918,
1.3692638874053955,
-0.26980602741241455,
-0.04559731483459473,
-0.5451008081436157,
-0.5223305821418762,
-0.3843344748020172,
-0.14111416041851044,
-0.8518717885017395,
0.1702296882867813,
0.5347229838371... |
def tile _ image _ from _ url ( requests _ session, url, timeout = 10 ) : try : resp = requests _ session. get ( url, timeout = timeout ) resp. raise _ for _ status ( ) image = np. fromstring ( io. bytesio ( resp. content ). read ( ), np. uint8 ) return cv2. cvtcolor ( cv2. imdecode ( image, cv2. imread _ anycolor ), c... | [
-0.09779734909534454,
-0.5562121272087097,
0.6342998743057251,
0.0734914094209671,
-0.11005335301160812,
-0.35234808921813965,
-0.4806092381477356,
-0.3074103593826294,
0.6476499438285828,
0.6788740754127502,
0.06117856875061989,
0.7957051992416382,
-0.20353659987449646,
-0.280577898025512... |
def load _ sql _ file ( filename ) : path = join ( test _ folder, " data ", filename ) with open ( path, " r " ) as handle : sh. psql ( " postgres ", " - - no - psqlrc ", host = " localhost ", port = " 5432 ", username = " postgres ", _ in = handle, ) | [
0.9716714024543762,
0.49374741315841675,
0.6261540651321411,
-0.49054694175720215,
-0.44838747382164,
0.5303263664245605,
-0.06108551844954491,
0.5163852572441101,
-1.4634106159210205,
-0.278298556804657,
-0.3303619921207428,
0.5267802476882935,
-0.6089341044425964,
0.018060993403196335,
... |
def getbaseschema ( self ) : mydir = self. mydir return dict ( rng = f " { mydir } / tei / tei _ all. rng ", xsd = f " { mydir } / tei / tei _ all. xsd " ) | [
-1.1423296928405762,
-0.6947318315505981,
0.48032888770103455,
-0.35931962728500366,
-0.36386141180992126,
0.11829663813114166,
0.20890989899635315,
0.6706117987632751,
0.09320761263370514,
-0.34534430503845215,
-0.2597230076789856,
-0.501190185546875,
0.34552016854286194,
1.01092565059661... |
def to _ output ( self, value ) : return json. loads ( resolwe _ runtime _ utils. save ( self. name, str ( value ) ) ) | [
-1.2870205640792847,
-0.8404967188835144,
0.4576736390590668,
-1.1803297996520996,
-0.9605014324188232,
-0.9914601445198059,
-0.2810586392879486,
-1.6440067291259766,
-0.03551434352993965,
0.8318210244178772,
-1.4110568761825562,
-0.4399368166923523,
-0.46405676007270813,
-0.63398772478103... |
def cachevalues ( self ) : temp = [ ] for key in self. keys ( ) : if self. ttl ( key ) > 0 : temp. append ( ( key, self. _ _ getitem _ _ ( key ) [ 0 ] ) ) return temp | [
-1.7116525173187256,
-0.2936843931674957,
0.542736291885376,
0.09450817108154297,
-0.34539082646369934,
-0.037285175174474716,
-1.0714191198349,
0.43663743138313293,
-0.33305594325065613,
1.1661676168441772,
-0.6933087706565857,
-0.7287698984146118,
0.08360341191291809,
1.2305248975753784,... |
async def save _ event _ manager _ app ( self, message _ id : int, event _ manager _ id : int ) - > none : mycursor, db = await the _ database ( ) await mycursor. execute ('''insert into eventmanagerapplication ( message _ id, event _ manager _ id ) values ( % s, % s )'' ', ( message _ id, event _ manager _ id ) ) awai... | [
0.3527725636959076,
-0.5472471714019775,
0.5009916424751282,
-0.19857865571975708,
0.5980713963508606,
0.3169308602809906,
-0.14527031779289246,
0.016086751595139503,
-0.3828192353248596,
0.9307572841644287,
-0.28186270594596863,
0.15234766900539398,
-0.9402186274528503,
1.004747986793518,... |
def find _ by _ date _ str ( self, date : str, category ) : eventdocs = self. eventcollectionref. where ( " localdatestring ", " = = ", date ). get ( ) events = dict ( ) # loop through each riderequest for doc in eventdocs : eventdict = doc. to _ dict ( ) if eventdict [ " eventcategory " ]! = category : continue # do n... | [
0.43501991033554077,
-0.41184937953948975,
0.5358366370201111,
0.003945445641875267,
-0.3070300817489624,
-0.5547768473625183,
-0.2376776933670044,
-0.940300703048706,
-0.7530421614646912,
0.6861523985862732,
0.8879655003547668,
0.08661382645368576,
-0.3482937812805176,
0.4251203238964081,... |
def split _ data _ bert ( dataset, ratio = 0. 95 ) : # calculate the number of samples to include in each set. train _ size = int ( ratio * len ( dataset ) ) val _ size = len ( dataset ) - train _ size # divide the dataset by randomly selecting samples. train _ tweets, val _ tweets = random _ split ( dataset, [ train _... | [
-0.41567787528038025,
0.8176359534263611,
0.3556525409221649,
-0.20324450731277466,
-0.2633744776248932,
0.03527037799358368,
0.6263061165809631,
0.12875255942344666,
-0.11440650373697281,
-0.35672253370285034,
0.09847234934568405,
-0.20763030648231506,
0.42093098163604736,
0.0113944308832... |
def _ internal _ poll ( self, _ deadstate = none ) : if self. returncode is none : try : pid, sts = os. waitpid ( self. pid, os. wnohang ) if pid = = self. pid : self. _ handle _ exitstatus ( sts ) except os. error : if _ deadstate is not none : self. returncode = _ deadstate return self. returncode | [
-0.8334999084472656,
-0.39085814356803894,
0.6648562550544739,
-0.3922478258609772,
-0.7064158320426941,
0.4209567606449127,
-0.19776900112628937,
-0.01169385015964508,
0.0692858174443245,
0.23454773426055908,
0.9779798984527588,
-0.6381813883781433,
-0.33295708894729614,
-0.09579544514417... |
def test _ is _ ending _ soon _ with _ completed _ project ( self ) : completed _ project = project ( end _ date = timezone. now ( ) - datetime. timedelta ( days = 1 ), is _ completed = true ) self. assertequal ( completed _ project. is _ ending _ soon ( ), false, " it seems to think a completed project is ending soon.... | [
-0.4987587630748749,
0.12213277071714401,
0.061229534447193146,
0.4241589307785034,
0.4131509065628052,
0.6927812695503235,
-0.5027239918708801,
0.0816662460565567,
-0.5522040724754333,
-0.12806345522403717,
-0.24406608939170837,
-0.6143149733543396,
-0.40411221981048584,
1.080766201019287... |
def delete ( self ) : return self. _ finalize ( ) | [
-0.0883578211069107,
0.06077257916331291,
0.43884512782096863,
-0.0870480164885521,
-0.4255380928516388,
-0.633033812046051,
0.4171994626522064,
0.233824223279953,
0.2669329047203064,
-0.20845618844032288,
0.010952732525765896,
-0.04174331575632095,
-0.9558591842651367,
-0.5653731822967529... |
def propose _ displacement ( cls, displacement _ sigma, original _ positions, mc _ atoms ) : positions _ unit = original _ positions. unit displacement _ vector = unit. quantity ( np. random. randn ( 3 ) * ( displacement _ sigma / positions _ unit ), positions _ unit ) perturbed _ positions = copy. deepcopy ( original ... | [
0.08552160859107971,
0.18618735671043396,
0.4519232213497162,
0.0034665281418710947,
-0.4098339378833771,
0.11730651557445526,
0.4637029469013214,
0.8544729351997375,
0.589849591255188,
0.6310320496559143,
0.36380255222320557,
-0.0904504656791687,
0.19592274725437164,
-0.4561772346496582,
... |
def demosaicimage ( ) : # todo : # probably needs to set the info _ fields _, # e. g. " info. ialgorithm = arg _ example " info = colordemosaicinfo ( ) andor _ solis. demosaicimage. restype = ctypes. c _ uint result = andor _ solis. demosaicimage ( ctypes. wintypes. word ( grey ), ctypes. wintypes. word ( red ), ctypes... | [
0.31304916739463806,
0.4732916057109833,
0.1888538897037506,
-0.44831761717796326,
-0.5827581286430359,
-0.5609775185585022,
0.9212628602981567,
-0.314565509557724,
0.6326584219932556,
-0.13786636292934418,
0.4424258768558502,
0.09991776198148727,
0.49451741576194763,
0.28231120109558105,
... |
def unroll _ circuit _ op _ greedy _ frontier ( circuit : circuit _ type, *, tags _ to _ check = ( mapped _ circuit _ op _ tag, ) ) - > circuit _ type : unrolled _ circuit = circuit. unfreeze ( copy = true ) frontier : dict ['cirq. qid ', int ] = defaultdict ( lambda : 0 ) for idx, op in circuit. findall _ operations (... | [
-0.006766192615032196,
0.8918140530586243,
0.6659823656082153,
-0.23305265605449677,
-0.019396578893065453,
-0.5719703435897827,
0.7550857067108154,
0.15387044847011566,
0.006250444799661636,
-0.0025424687191843987,
-0.20846831798553467,
-0.3293609023094177,
-0.5274865031242371,
-0.3840696... |
def generate _ public _ key ( self ) : private _ key = int ( self. private _ key, 16 ) if private _ key > = self. n : raise exception ('invalid private key.') g = jacobianpoint ( self. gx, self. gy, 1 ) public _ key = g * private _ key x _ hex ='{ 0 : 0 { 1 } x } '. format ( public _ key. x, 64 ) y _ hex ='{ 0 : 0 { 1 ... | [
-0.045497480779886246,
0.6824455261230469,
0.6022279858589172,
-0.5672804713249207,
0.12431669980287552,
0.379212886095047,
-0.1548483669757843,
-0.38223958015441895,
-0.6030960083007812,
0.04338601976633072,
-0.44439560174942017,
0.02999928966164589,
0.34711578488349915,
0.602064311504364... |
def getdimrandomvector ( proj _ matrix, proj _ dim, dim ) : # import pdb ; pdb. set _ trace ( ) if dim in proj _ matrix : # print'using random vector : % 4d'% dim vector = proj _ matrix. get ( dim ) else : # print'generating random vector : % 4d'% dim random. seed ( ) # use default source for seed vector = [ ] index = ... | [
-0.18641433119773865,
0.08746964484453201,
0.5325095057487488,
0.37478503584861755,
0.4739132523536682,
0.6522597670555115,
0.21927140653133392,
0.5334563851356506,
0.3521628975868225,
0.4809495210647583,
1.0553555488586426,
0.8188999891281128,
-0.5372946858406067,
-0.07016552239656448,
... |
def testgetvaluesforquerywithunknowntaginreturntags ( self ) : securetagvalueapi ( self. user ). set ( { uuid4 ( ) : { u'username / tag': 12 } } ) rundataimporthandler ( self. client. url ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : result = yield self. facade. getvalues... | [
-0.1783675253391266,
0.517878532409668,
0.36632025241851807,
-0.025522887706756592,
0.8962738513946533,
0.1692540943622589,
-0.6118425130844116,
-0.6575673818588257,
-0.4540441930294037,
-1.2784693241119385,
-0.829185962677002,
-0.42023399472236633,
-0.036613982170820236,
0.266617387533187... |
def execute ( self, robot _ info, dt ) : if not self. at _ goal ( ) : output = supervisor. execute ( self, robot _ info, dt ) # print ( output ) return self. ensure _ w ( self. uni2diff ( output ) ) # return output else : return 0, 0 | [
-0.7854077816009521,
-0.12066406011581421,
0.4507981538772583,
0.8007727265357971,
-0.2576216459274292,
0.3464581072330475,
-0.34971535205841064,
-1.0313336849212646,
-1.2702248096466064,
-0.14724747836589813,
0.23310476541519165,
-0.5226489901542664,
-0.45980167388916016,
0.45970836281776... |
def ping ( port, message = " ping " ) : sock = socket. socket ( socket. af _ inet, socket. sock _ dgram ) try : sock. sendto ( message. encode ( " utf - 8 " ), ( " 127. 0. 0. 1 ", port ) ) finally : sock. close ( ) | [
-0.46496742963790894,
1.126824975013733,
0.5694032311439514,
-0.6547130346298218,
-0.007114973850548267,
0.061859678477048874,
-0.03335597366094589,
-0.5374722480773926,
-0.303735613822937,
0.7826055288314819,
0.3931202292442322,
-0.07465839385986328,
-1.0057817697525024,
-0.08671365678310... |
def get _ device _ by _ id ( self, device _ id : str ) - > dict : return self. devices [ device _ id ] | [
-0.47585099935531616,
0.10032668709754944,
-0.043496888130903244,
0.16601380705833435,
-0.13859611749649048,
-0.3844999372959137,
-0.20942126214504242,
-0.6002242565155029,
0.03939075767993927,
-0.3116828203201294,
0.2766583561897278,
0.8320437669754028,
0.2583698630332947,
0.6433506011962... |
def setupfields ( self, nodeformat ) : if not self. tmpfieldname : self. tmpfieldname = self. field. name self. field = nodeformat. findfield ( self. tmpfieldname ) if self. field : self. value = self. field. sortvalue ( { self. field. name : self. valuestr } ) self. tmpfieldname ='' | [
-0.4554547965526581,
-0.09884868562221527,
0.3544811010360718,
-1.3002128601074219,
-0.4102568030357361,
-0.4477744400501251,
0.2602856755256653,
-0.9657717943191528,
-0.07810954749584198,
-0.4317799210548401,
-0.010286247357726097,
-0.7851701378822327,
0.009721892885863781,
0.767428815364... |
def form _ invalid ( self, form ) : print ( " invalid form " ) if not self. request. user. id : form. errors ['user'] = ['not autheticated, you need to login first!'] # import pdb ; pdb. set _ trace ( ) return self. render _ to _ response ( self. get _ context _ data ( form = form ) ) | [
-0.4508773684501648,
-0.20086531341075897,
0.4343433082103729,
0.3378116488456726,
0.23020991683006287,
0.6591185927391052,
-0.28475913405418396,
0.42233988642692566,
0.6727992296218872,
-0.9397491216659546,
0.7470750212669373,
0.24027381837368011,
-0.08164255321025848,
-0.0016552426386624... |
def filter _ setaveragingframecount ( frames ) : return none | [
-0.2690100371837616,
-0.33701464533805847,
0.32491424679756165,
-0.15501856803894043,
-0.33774247765541077,
-0.04096757620573044,
0.8135080337524414,
-0.739093005657196,
0.44340041279792786,
0.5452373623847961,
-0.27982863783836365,
0.3245305120944977,
-0.3480095863342285,
0.97774022817611... |
def parse _ saml _ metadata ( source : bytesio, opts : resourceopts, base _ url = none, validation _ errors : optional [ dict [ str, any ] ] = none, ) : if validation _ errors is none : validation _ errors = dict ( ) try : t = parse _ xml ( source, base _ url = base _ url ) if config. xinclude : t. xinclude ( ) expire ... | [
0.37719741463661194,
-0.28950080275535583,
0.6654962301254272,
-0.09476982057094574,
-0.4676028788089752,
-0.4110803008079529,
-0.8238968253135681,
0.2921818792819977,
0.4378037452697754,
0.6346480250358582,
-0.09565956145524979,
0.38293159008026123,
0.19199872016906738,
0.0805576220154762... |
def extractall ( self, output _ path ) : self. zip. extractall ( output _ path ) | [
-0.1714695394039154,
-1.2436550855636597,
0.2604987919330597,
0.9074762463569641,
-0.3304309546947479,
-0.8308517932891846,
0.1404634714126587,
0.41225025057792664,
0.08469823002815247,
-0.04162232577800751,
-0.10622475296258926,
-0.8115808963775635,
-0.03503672778606415,
-0.16088165342807... |
async def room _ close ( self, ctx ) : if not await self. bot. has _ perm ( ctx, ignored _ rooms = true ) : return message = ctx. message author = message. author. id channel = ctx. channel # check if this channel is a temp channel db _ entry = self. bot. get _ temp _ room ( room _ id = channel. id ) if not db _ entry ... | [
-0.16847024857997894,
0.39651745557785034,
0.8474289178848267,
-0.20598694682121277,
0.11590774357318878,
0.34332647919654846,
-0.2510280907154083,
0.2676381766796112,
0.2138359099626541,
0.2555520236492157,
0.5210013389587402,
0.6974889039993286,
-1.0142815113067627,
0.6685156226158142,
... |
def _ trim _ axis ( x : union [ undefinedprimal, shapedarray, np. ndarray ], axis : union [ int, tuple [ int,... ] ], ) - > union [ undefinedprimal, shapedarray ] : if isinstance ( axis, int ) : axis = ( axis, ) if isinstance ( x, undefinedprimal ) : return undefinedprimal ( _ trim _ axis ( x. aval, axis ) ) if isinsta... | [
0.053710948675870895,
-0.22684262692928314,
0.5522671341896057,
0.26022788882255554,
0.5099605321884155,
0.7042654156684875,
-0.008220875635743141,
-0.5819758772850037,
0.7320391535758972,
0.09259591996669769,
-0.10749541223049164,
1.3175067901611328,
-0.11191493272781372,
-0.2747988998889... |
def _ merger ( shared _ array, level, num, proc, verbose = false ) : lbound = proc * num rbound = proc * ( num + 1 ) if verbose : print ('upper worker'+ str ( num ) +'' + str ( lbound ) +'' + str ( rbound ) ) for i in range ( lbound + 2 * * level, rbound, 2 * * ( level + 1 ) ) : # left list : [ i - 2 * * level, i - 1 ]... | [
-0.8402231335639954,
0.1732386350631714,
0.9724045991897583,
0.38287031650543213,
0.1394481360912323,
0.20349515974521637,
1.014813780784607,
-0.18382182717323303,
-0.15246732532978058,
-0.24038346111774445,
-0.791639506816864,
0.2938977777957916,
-1.1152011156082153,
0.45398759841918945,
... |
async def _ async _ create _ entities ( hass, config ) : fans = [ ] for object _ id, entity _ config in config [ conf _ fans ]. items ( ) : entity _ config = rewrite _ common _ legacy _ to _ modern _ conf ( entity _ config ) unique _ id = entity _ config. get ( conf _ unique _ id ) fans. append ( templatefan ( hass, ob... | [
-0.5283194184303284,
-0.05701647698879242,
0.384356290102005,
0.7101022005081177,
0.9920951724052429,
0.05020049586892128,
0.08544673025608063,
0.8430431485176086,
-0.27385252714157104,
0.4494166970252991,
-0.8288950324058533,
-0.4889785945415497,
0.780586838722229,
0.6694427132606506,
0... |
def handle _ button _ press ( button _ state, mqtt _ client, button _ name ) : if button _ state : print ( " { } button was pressed ". format ( button _ name ) ) # todo : 4. send a message using mqtt that will : # - - call the method called " button _ pressed " on the delegate at the other end of the pipe. # - - pass t... | [
0.932977020740509,
-0.17035594582557678,
0.6661362648010254,
-0.5222740173339844,
0.27781444787979126,
0.1998293399810791,
-0.5715648531913757,
0.42977163195610046,
0.059500791132450104,
0.21299609541893005,
-0.7399240732192993,
0.5442549586296082,
0.1377817690372467,
0.4039291739463806,
... |
def test _ join _ topk ( ) : limit = 5 query _ plan = queryplan ( ) # query plan ts1 = query _ plan. add _ operator ( sqltablescan ('supplier. csv ','select * from s3object ; ', false,'ts1 ', query _ plan, false ) ) ts1 _ project = query _ plan. add _ operator ( project ( [ projectexpression ( lambda t _ : t _ ['_ 3'],... | [
0.3836469054222107,
0.7147783041000366,
0.769527792930603,
0.2908480167388916,
-0.09136238694190979,
0.5733064413070679,
0.38892027735710144,
-0.31557223200798035,
-0.6019694209098816,
0.15686242282390594,
-0.7032316327095032,
-0.40398505330085754,
-0.24070009589195251,
-0.6905352473258972... |
def _ _ repr _ _ ( self ) : return self. to _ str ( ) | [
-0.5736950635910034,
-1.5629445314407349,
0.4195917248725891,
-1.3908827304840088,
-0.17763900756835938,
0.7235296368598938,
-0.19694273173809052,
-0.22184345126152039,
0.5806519985198975,
0.27171874046325684,
0.410837322473526,
0.8436735272407532,
0.33078640699386597,
-0.9162222743034363,... |
def jobid ( self ) : return self. _ id | [
1.1817562580108643,
-0.6180132031440735,
0.1588917374610901,
0.6895976066589355,
0.12727883458137512,
1.6538463830947876,
0.62789386510849,
0.8378071784973145,
0.8350074887275696,
-1.4845800399780273,
0.3080718517303467,
0.4474520683288574,
-0.7791106104850769,
-0.1499294638633728,
-0.37... |
def evaluate ( self, script ) : if webengine : return self. dom. runjavascript ( " { } ". format ( script ) ) else : return self. dom. evaluatejavascript ( " { } ". format ( script ) ) | [
-0.5252090096473694,
-0.6047002673149109,
0.6226800680160522,
-0.5033558011054993,
-1.0091612339019775,
-0.34900811314582825,
0.051451846957206726,
-0.535326361656189,
0.794005811214447,
0.11543846130371094,
0.2111290991306305,
0.6479751467704773,
-0.4631025791168213,
0.799444854259491,
... |
def _ _ ignore _ mbl _ changed ( self ) : return self. _ _ motion _ blur _ check _ box. is _ checked ( ) | [
-0.3087676167488098,
0.3175024688243866,
0.6279814839363098,
1.0152870416641235,
-0.6556137204170227,
0.9466427564620972,
0.2822994291782379,
-0.1273912638425827,
0.09546294063329697,
0.13253533840179443,
-0.5549517869949341,
-0.04266270622611046,
-0.9745045304298401,
0.6384626626968384,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.