text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def transcribe _ file _ with _ metadata ( ) - > speech. recognizeresponse : # [ start speech _ transcribe _ recognition _ metadata _ beta ] from google. cloud import speech _ v1p1beta1 as speech client = speech. speechclient ( ) speech _ file = " resources / commercial _ mono. wav " with open ( speech _ file, " rb " ) ... | [
0.527310311794281,
-0.6392435431480408,
0.9125540256500244,
-0.028411582112312317,
0.39118513464927673,
-0.21490953862667084,
-0.23686718940734863,
0.10499359667301178,
-0.5140056610107422,
1.087482213973999,
-1.0444915294647217,
0.3450378179550171,
-0.062418077141046524,
-0.25815820693969... |
def gradient ( self, params : ztyping. paramtypeinput = none ) - > list [ tf. tensor ] : params = self. _ input _ check _ params ( params ) numgrad = self. _ options [ " numgrad " ] params = { p. name : p for p in params } return self. _ gradient ( params = params, numgrad = numgrad ) | [
-1.6461094617843628,
0.37440189719200134,
0.6004192233085632,
0.3863472044467926,
1.1109589338302612,
0.10643503814935684,
0.8013909459114075,
-0.24223701655864716,
-0.5372573733329773,
0.7553969025611877,
-0.5279509425163269,
0.3917013108730316,
-0.6920145153999329,
0.698070228099823,
-... |
def task ( self ) : return self. _ task | [
-0.0541563481092453,
-0.24437493085861206,
0.2779902219772339,
0.6491332650184631,
-0.028514599427580833,
0.7472372651100159,
1.098099708557129,
-0.006108419504016638,
0.13787072896957397,
-0.6516087055206299,
-0.7184553742408752,
0.19487713277339935,
0.5946506857872009,
-0.654489874839782... |
def plotwccdistr _ pneanet ( * args ) : return _ snap. plotwccdistr _ pneanet ( * args ) | [
-0.8597562909126282,
0.13990440964698792,
0.1430703103542328,
-0.7584575414657593,
-0.6933656930923462,
0.14821948111057281,
-0.26538440585136414,
-0.30249854922294617,
-0.3625364899635315,
-0.2247476875782013,
-0.0012174774892628193,
0.05378182977437973,
-0.48254579305648804,
0.5846617817... |
def cleanse _ dataframe ( df : pd. dataframe, axis : list = none ) - > pd. dataframe : # check if axis has been specified if axis is none : axis = [ 0, 1 ] # clean rows if 0 in axis : df = df. dropna ( axis = 0, how ='all') # clean columns if 1 in axis : df = df. dropna ( axis = 1, how ='all') # return return df | [
-0.026179000735282898,
0.2608654201030731,
0.5817921161651611,
1.0508816242218018,
-0.2760402262210846,
-0.12040442228317261,
0.596544623374939,
0.6085329055786133,
-0.011907667852938175,
0.19463728368282318,
0.21090799570083618,
0.6796841025352478,
0.36188217997550964,
0.39508217573165894... |
def getnodesathops _ pneanet ( * args ) : return _ snap. getnodesathops _ pneanet ( * args ) | [
-1.4714897871017456,
0.7646479606628418,
0.5098288059234619,
0.32540830969810486,
0.6901171207427979,
0.2704315781593323,
0.15435267984867096,
-1.1964421272277832,
-0.49643853306770325,
-0.4728555679321289,
-0.1299711912870407,
-1.736228346824646,
0.13689877092838287,
0.16345898807048798,
... |
def splitonallch ( self, * args ) : return _ snap. tstr _ splitonallch ( self, * args ) | [
-0.2401627153158188,
0.15826928615570068,
0.2576788663864136,
-0.09140971302986145,
-0.289649099111557,
-0.14297452569007874,
0.7692712545394897,
0.18836456537246704,
-0.4762129485607147,
0.18480190634727478,
-0.5508825778961182,
-0.3190299868583679,
0.27406027913093567,
0.3947236835956573... |
def getintattrinddatn ( self, * args ) : return _ snap. pneanetmp _ getintattrinddatn ( self, * args ) | [
-1.0812853574752808,
-0.5843749046325684,
0.5065653920173645,
0.11800070106983185,
0.43552201986312866,
0.7366085648536682,
0.3348551094532013,
-0.7136483788490295,
-0.9739857912063599,
-1.1396732330322266,
-0.335537850856781,
-0.035022296011447906,
-1.4813750982284546,
0.5386450886726379,... |
def simplify _ geojson ( self, tol = 0. 001, buf = 0. 002 ) : for i, r in enumerate ( self. region ) : simplified _ poly = r. simplify ( tol, preserve _ topology = false ). buffer ( buf ) self. simplified _ geojson [ i ] ['geometry'] = mapping ( simplified _ poly ) | [
0.06030973047018051,
-0.41819581389427185,
0.4148183763027191,
-0.7097880840301514,
-0.6584274172782898,
0.5257417559623718,
0.46028757095336914,
-0.09575539827346802,
0.4490121006965637,
-0.2024293690919876,
-1.7281057834625244,
-0.12693555653095245,
0.5406706929206848,
-0.506253957748413... |
def time _ indication ( df _ option, time _ string ) : # check if the dataframe is defined df _ option. check _ type ( pd. core. frame. dataframe, inspect. stack ( ) [ 0 ] [ 3 ] ) df = df _ option. get ( ) # add the attribute'details'if df does not have it if not hasattr ( df,'details') : df = misc _ func. details _ in... | [
-0.20348595082759857,
0.7535786032676697,
0.4653991162776947,
-0.8464376926422119,
1.0807228088378906,
-0.8373482823371887,
-0.21983850002288818,
0.2716226875782013,
-0.4001369774341583,
0.6747642755508423,
0.3084539473056793,
0.17875085771083832,
0.14328309893608093,
0.22358928620815277,
... |
def size _ min ( self ) : return int ( self. get ('size _ min') ) | [
0.18541082739830017,
-0.09313645213842392,
0.17038674652576447,
0.262696236371994,
0.40553924441337585,
0.5555004477500916,
-0.03575040400028229,
-0.8783602118492126,
0.6415312886238098,
-0.9787575006484985,
-0.11897852271795273,
-0.3084692358970642,
-0.34494784474372864,
-0.36467024683952... |
def mt _ caption _ eval _ collate ( data ) : # separate source and target sequences src _ sent, att _ feats, img _ masks, box _ feats, img _ ids = list ( zip ( * data ) ) # t2i def generate _ inputs ( ) : # sent = np. array ( sent ) x _ img = torch. stack ( att _ feats, dim = 0 ) img _ loc = torch. stack ( box _ feats,... | [
-0.6351207494735718,
-0.891373872756958,
0.9554938077926636,
-0.4859411418437958,
-0.5567559599876404,
-0.3843420445919037,
0.18633870780467987,
-0.2992582619190216,
-0.24633608758449554,
0.7093008160591125,
-0.1537618190050125,
-0.31854331493377686,
0.726681649684906,
0.48944520950317383,... |
def positive _ pa ( pa : float ) : # require it be positive if pa < 0. : pa + = 360. # now the complement - - also require it be positive comp _ pa = pa - 180. if pa > 180. else pa + 180. # return return pa, comp _ pa | [
-0.8814996480941772,
-1.4367096424102783,
0.6379625797271729,
-0.3096117675304413,
-0.28705766797065735,
1.0682262182235718,
-0.4517933428287506,
-0.46298372745513916,
1.1330667734146118,
0.37266311049461365,
0.05977070331573486,
-1.1076011657714844,
-0.3284912109375,
-0.008950424380600452... |
def bsort ( self, * args ) : return _ snap. tintprv _ bsort ( self, * args ) | [
-1.082282304763794,
0.1827356070280075,
0.6267117261886597,
0.8699444532394409,
0.018359694629907608,
-0.19451096653938293,
0.2795155942440033,
-0.644092321395874,
-1.3288170099258423,
-0.6673203706741333,
-0.35665038228034973,
0.8142019510269165,
-2.5034570693969727,
0.7234699726104736,
... |
def ttable _ load ( * args ) : return _ snap. ttable _ load ( * args ) | [
-1.639811396598816,
0.7418199181556702,
0.5537433624267578,
0.16041326522827148,
-0.2924361824989319,
0.291408509016037,
0.6786358952522278,
-0.6858587265014648,
-1.3122243881225586,
0.8851638436317444,
-0.8871635794639587,
-1.4115638732910156,
0.007604449987411499,
-0.17723380029201508,
... |
def check _ if _ identifier _ exists ( self, native _ identifier _ sid ) : checkexistsdict = { } try : sys _ meta = self. client. getsystemmetadata ( native _ identifier _ sid ) except d1 _ common. types. exceptions. notfound : checkexistsdict ['outcome'] ='no'return checkexistsdict except exception, e : logging. error... | [
-1.2305092811584473,
-0.5811315774917603,
0.6313482522964478,
-0.6154243350028992,
0.036199238151311874,
0.5251492857933044,
-0.5116149187088013,
0.17887793481349945,
-0.2725273668766022,
0.9787660241127014,
-0.4621778726577759,
0.17915423214435577,
0.2837982773780823,
0.23306456208229065,... |
def matrix2sheet ( self, float _ row, float _ col ) : xoffset = float _ col * self. _ _ xstep if isinstance ( self. lbrt [ 0 ], datetime _ types ) : xoffset = np. timedelta64 ( int ( round ( xoffset ) ), self. _ time _ unit ) x = self. lbrt [ 0 ] + xoffset yoffset = float _ row * self. _ _ ystep if isinstance ( self. l... | [
0.060561154037714005,
-0.4719778001308441,
0.554799497127533,
-0.6069294214248657,
-0.13048617541790009,
0.3145083487033844,
-0.46915921568870544,
-0.7575638294219971,
-1.1081938743591309,
0.24902479350566864,
0.5171257257461548,
0.18143735826015472,
0.04719860106706619,
0.6832166314125061... |
def getimageforindex ( self, index : int ) - > optional [ str ] : if len ( self. _ overlayimages ) > index > = 0 : return self. _ overlayimages [ index ] else : return none | [
-0.33286282420158386,
0.14106404781341553,
0.5671815276145935,
-0.2944149374961853,
-0.12298775464296341,
0.052703503519296646,
0.19269230961799622,
-0.9590942859649658,
0.4285121560096741,
-0.346508651971817,
0.8433254957199097,
-0.2267693430185318,
-0.2649196684360504,
-0.414437055587768... |
def test _ can _ retrieve _ blocked _ community _ staff _ post ( self ) : user = make _ user ( ) community _ owner = make _ user ( ) community = make _ community ( creator = community _ owner ) headers = make _ authentication _ headers _ for _ user ( user ) post = community _ owner. create _ community _ post ( text = m... | [
1.185163974761963,
0.6106938719749451,
0.5508681535720825,
1.0330439805984497,
0.4822149872779846,
0.5221717953681946,
0.20756317675113678,
-1.0318045616149902,
-1.0658037662506104,
-0.8719781637191772,
-0.5623921751976013,
-0.3562979996204376,
-0.44887787103652954,
-0.2849610149860382,
... |
def _ get _ dataid ( self, * args, * * kwargs ) : raise notimplementederror | [
-0.171683669090271,
0.11946148425340652,
0.24396809935569763,
-0.524129331111908,
-0.08588089048862457,
0.9562587141990662,
-0.352741003036499,
0.034121811389923096,
-0.006647799629718065,
-0.22098782658576965,
-0.36417776346206665,
1.184865951538086,
0.262783944606781,
0.5932751893997192,... |
def _ _ init _ _ ( self, * args ) : _ snap. tuint64hi _ swiginit ( self, _ snap. new _ tuint64hi ( * args ) ) | [
-0.5849996209144592,
0.5873690247535706,
-0.12418104708194733,
1.3018927574157715,
-0.22412677109241486,
0.08568526059389114,
0.030433623120188713,
0.6274497509002686,
-1.8336808681488037,
0.1649780422449112,
-0.21316753327846527,
-1.388572335243225,
-0.2534187436103821,
0.2075498849153518... |
def merge _ sort ( _ list, begin, end ) : if begin < end : middle = divmod ( ( begin + end ), 2 ) [ 0 ] merge _ sort ( _ list, begin, middle ) merge _ sort ( _ list, middle + 1, end ) merge ( _ list, begin, middle, end ) | [
-0.6598149538040161,
0.16966713964939117,
0.5504929423332214,
0.797416090965271,
-0.897003173828125,
0.1656823456287384,
-0.6314378380775452,
0.3017737567424774,
0.1004420667886734,
-0.5285672545433044,
-1.1624090671539307,
0.290353387594223,
-1.2502226829528809,
0.4850814640522003,
-0.1... |
def _ _ str _ _ ( self ) : return self. simbolo | [
0.9385288953781128,
-0.9102340936660767,
0.49489542841911316,
-0.6313619017601013,
-0.28729385137557983,
0.6215342283248901,
0.08061592280864716,
0.21703925728797913,
0.2505507469177246,
-0.011419865302741528,
-0.9343861937522888,
0.9367594718933105,
0.1096690371632576,
-0.835345983505249,... |
def set _ logger _ config ( logger : logging. logger, main _ python _ file _ name : str, level : int = logging. info, format : str = " % ( asctime ) s - % ( name ) s - % ( levelname ) s - % ( message ) s ", log _ dir : optional [ str ] = none, ) : main _ python _ file _ name _ root = get _ file _ name _ root ( main _ p... | [
-0.17058177292346954,
-1.2080261707305908,
0.7328284978866577,
-0.6617177128791809,
-0.06873912364244461,
0.23100613057613373,
-0.3040338456630707,
0.7508749961853027,
-0.9656221270561218,
-0.4632595181465149,
-0.23537331819534302,
0.11597415804862976,
0.4225766956806183,
1.514214277267456... |
def select _ playlist ( ) : default = os. listdir ( ) print ( " enter the playlist you want to play : \ n " ) print ( " 0 : default playlist ( all songs ) \ n " ) print ( " 1 : current playlist \ n " ) print ( " 2 : favourite playlist \ n " ) lst _ id = int ( input ( " enter the id of the playlist to play : " ) ) if ls... | [
-0.20004478096961975,
-0.01439972035586834,
0.42477694153785706,
0.5420038104057312,
0.4998075067996979,
0.24052594602108002,
1.1005609035491943,
-0.4608128070831299,
0.9158331155776978,
-0.05708561837673187,
-0.5110180974006653,
0.35060814023017883,
-1.1453568935394287,
-0.035823859274387... |
def compute _ voi _ volume ( self, mode ='mb') : if mode = ='mb': return self. _ _ voi _ mb. sum ( ) * self. _ _ res _ 3 * nm3 _ to _ um3 elif mode = ='lm': return self. _ _ voi _ lm. sum ( ) * self. _ _ res _ 3 * nm3 _ to _ um3 elif mode = ='mb - lm': return ( self. _ _ voi _ mb. sum ( ) + self. _ _ voi _ lm. sum ( ) ... | [
-0.4753064513206482,
0.029587341472506523,
0.7504295706748962,
0.2550208866596222,
-0.3250049352645874,
0.3538452088832855,
0.2078561931848526,
-0.03288780897855759,
0.30986008048057556,
0.25434979796409607,
-0.16424840688705444,
-0.7753728032112122,
-0.8887475728988647,
-0.255762726068496... |
def get _ img _ item ( self, file _ name, image _ id, size ) : image = ordereddict ( ) image ['file _ name'] = file _ name image ['height'] = int ( size ['height'] ) image ['width'] = int ( size ['width'] ) image ['id'] = image _ id return image | [
-0.3261982202529907,
-0.3071475028991699,
0.2360551655292511,
-0.6478925943374634,
-0.46791213750839233,
-0.3817947804927826,
-1.511562705039978,
-0.038999173790216446,
-1.3435280323028564,
0.3255003094673157,
-0.41246601939201355,
-0.15376324951648712,
0.37393563985824585,
-0.100143596529... |
def sesames ( self ) : response = self. request ('get ', api _ sesame _ list _ endpoint ) if response is not none and response. status _ code = = 200 : return json. loads ( response. text ) ['sesames'] indigo. server. log ( message = " unable to get sesames ", iserror = true ) return [ ] | [
-0.7765663266181946,
0.4521957039833069,
0.4971050024032593,
-0.023425932973623276,
-0.4162711203098297,
0.024587158113718033,
-1.1493024826049805,
0.028371861204504967,
0.4567979872226715,
0.8185317516326904,
-0.6994290351867676,
1.4323405027389526,
-0.8418610692024231,
0.3268266916275024... |
def get _ data ( nrows = 10000, local = false, optimize = false, * * kwargs ) : # add client ( ) here client = storage. client ( ) if local : path = " data / data _ data _ 10mill. csv " else : path = " gs : / / { } / { } ". format ( bucket _ name, bucket _ train _ data _ path ) df = pd. read _ csv ( path, nrows = nrows... | [
-0.07433988898992538,
0.9956443309783936,
0.4400670528411865,
0.44339483976364136,
0.656342089176178,
0.15570135414600372,
-0.14577335119247437,
-0.004339610226452351,
-0.933513343334198,
-0.5320061445236206,
-0.2903400659561157,
1.0779019594192505,
-0.26354700326919556,
-1.084525108337402... |
def pair _ store ( store, fname, pairs ) : from itertools import combinations as comb totals = 10 * pairs print " pairing on store ", store print " positive pairs / negative pairs ", totals, totals store = get _ store ( fname = store ) inpts = store ['inpts'] lbls = store ['trgts'] positives = [ ] classes = { } # stl -... | [
-1.4381613731384277,
-0.2765952944755554,
0.9547983407974243,
-0.23828843235969543,
-0.19341827929019928,
0.6649181842803955,
0.513393759727478,
-0.03806717321276665,
0.3959016799926758,
0.3614148199558258,
0.27151793241500854,
-0.5699235796928406,
0.4952622652053833,
0.28461650013923645,
... |
def handleevent ( self, event ) : self. sprite. handle _ event ( event ) | [
0.1447700411081314,
0.4773702025413513,
0.2967355251312256,
0.06849809736013412,
0.6578079462051392,
0.8806899189949036,
0.5252808332443237,
0.7672094702720642,
0.2412026971578598,
-0.2431732416152954,
-1.1490284204483032,
-0.014485202729701996,
0.169766366481781,
0.1521214246749878,
0.1... |
def on _ clockwise _ rotate ( self ) : if not self. edit _ mode : self. curr _ action = ( self. curr _ action + 1 ) % self. len else : self. inc _ val ( ) self. update _ screen ( ) | [
-0.6540757417678833,
-0.21470652520656586,
0.4504782259464264,
0.3774082660675049,
0.3208126127719879,
0.11892179399728775,
0.9463145136833191,
-0.3268554210662842,
0.07083220034837723,
-0.26078370213508606,
-0.24329739809036255,
0.5891650915145874,
-0.6651118397712708,
-0.1589425802230835... |
def _ compute _ dqn _ loss ( self, samples : dict [ str, np. ndarray ], gamma : float = 0. 99 ) - > torch. tensor : gamma = self. gamma device = self. device state = torch. floattensor ( samples [ " obs " ] ). to ( device ) next _ state = torch. floattensor ( samples [ " next _ obs " ] ). to ( device ) action = torch. ... | [
-0.7583552598953247,
-0.1486556977033615,
0.5394619107246399,
-0.49138757586479187,
0.08838023990392685,
-0.1752244383096695,
0.4214494824409485,
-0.16409645974636078,
0.08916251361370087,
0.22552411258220673,
0.6989239454269409,
0.5671980381011963,
-0.003724152920767665,
-0.63666093349456... |
def compose ( self, other _ fst, new _ fst _ base ) : other _ fst. sort ( how = " ilabel " ) call = " fstcompose % s % s % s. fst " % ( self. fst _ fn, other _ fst. fst _ fn, new _ fst _ base ) subprocess. call ( [ call ], shell = true ) # postprocess new fst new _ fst = fst ( new _ fst _ base ) new _ fst. isymbols _ f... | [
-0.4815851151943207,
-1.1466825008392334,
0.7540604472160339,
-0.08901165425777435,
-0.1244191899895668,
-0.9553865790367126,
-0.4249890446662903,
-0.40919387340545654,
-0.28129106760025024,
-0.6412983536720276,
-0.6529502868652344,
-0.0560118742287159,
-0.43483608961105347,
0.294568568468... |
def _ _ getitem _ _ ( self, key ) : if self. households. has _ key ( key ) : return self. households [ key ] else : return none | [
-0.7874411344528198,
-0.061236266046762466,
0.5982365012168884,
0.11149118840694427,
0.08030913025140762,
-0.2957140803337097,
-0.913884162902832,
-0.5212053656578064,
0.008748868480324745,
-0.16368819773197174,
0.6727413535118103,
0.027361635118722916,
-0.3810443878173828,
-0.172389104962... |
def extract _ pano _ neural _ features ( nfov _ projector, im _ processor, pano _ np, heading _ angles, pitch _ angles ) : pano _ image _ features = [ ] for pitch in pitch _ angles : pitch _ features = [ ] for heading in heading _ angles : # normalize heading and pitch to [ 0, 1 ] interval. center _ point = np. array (... | [
-0.7176257371902466,
-0.18854404985904694,
0.5925923585891724,
0.6677172780036926,
-0.18659357726573944,
-0.2460257112979889,
0.10374324023723602,
0.15325579047203064,
-0.27749860286712646,
-0.08943262696266174,
-0.8250353932380676,
-0.2815675437450409,
-0.07042814046144485,
-0.18745619058... |
def _ _ gt _ _ ( self, other ) : if isinstance ( other, ( int, float ) ) : return np. greater ( self. val, other ) elif isinstance ( other, reverse ) : return np. greater ( self. val, other. val ) else : raise typeerror ( " please only compare reverse object with another reverse object or int or float. " ) | [
-0.993407130241394,
0.0705837681889534,
0.9638371467590332,
0.39224880933761597,
0.18432942032814026,
0.6458092927932739,
-0.4301888048648834,
-1.319040298461914,
-0.5778529644012451,
-0.32972627878189087,
0.57157963514328,
0.8099512457847595,
0.0011606552870944142,
0.35707470774650574,
... |
def write _ file ( text = " " ) : while ( true ) : print ( " \ t \ t \ t | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | " ) print ( " \ t \ t \ t | proceed file writing? | " ) print ( " \ t \ t \ t | yes ( y ) or no ( n ) | " ) print ( " \ t \ t \ t | - - - - - - - - - - - - - - - - - -... | [
0.1556219905614853,
0.05610194429755211,
1.2705446481704712,
0.13113462924957275,
-0.5091107487678528,
0.6939550638198853,
0.28582414984703064,
-0.6041604280471802,
-0.9081333875656128,
0.08452962338924408,
-0.5662624835968018,
-0.22544072568416595,
-1.2291632890701294,
0.3859136998653412,... |
def add ( self, card ) : self. cards. append ( card ) | [
-0.7995613813400269,
-0.10602670907974243,
0.186562180519104,
-0.5522255897521973,
0.8112101554870605,
1.0481081008911133,
-1.2576475143432617,
0.6324520111083984,
0.7538213133811951,
-0.7631750106811523,
-0.08997277915477753,
0.679291307926178,
-0.009344658814370632,
0.8066788911819458,
... |
def get _ selection _ values _ using _ baseline ( self, output _ filepath = none, temp _ data _ dirpath = none, group _ sel _ stats = false ) : if temp _ data _ dirpath = = none and output _ filepath = = none : print'both " temp _ data _ dirpath " and " output _ filepath " cannont equal none. aborting'return if not tem... | [
-0.48420199751853943,
-0.5225074887275696,
1.0586131811141968,
0.2609477937221527,
0.03255134075880051,
-0.15849357843399048,
0.5997519493103027,
0.03301733359694481,
-0.6177964210510254,
0.2011076956987381,
-0.052912306040525436,
0.5424686074256897,
-0.1918545812368393,
0.3918447494506836... |
def dom _ timestamp ( ts ) : k = list ( ) mon = - 1 doy = - 1 dom = 0 for t in ts : m = t. month if mon! = m : dom = 1 doy = t. dayofyear mon = m elif t. dayofyear! = doy : dom + = 1 doy = t. dayofyear k. append ( dom ) return np. array ( k ) | [
-1.2874233722686768,
-0.205396831035614,
1.036622166633606,
0.5876578688621521,
0.12848760187625885,
0.1539163440465927,
0.1747402399778366,
0.3299829661846161,
1.3452868461608887,
0.2818218469619751,
-0.3363153338432312,
-0.057977065443992615,
1.1261990070343018,
0.029540935531258583,
-... |
def discover _ structure ( self, sequences ) : _, _, event _ sequences = self. create _ ordered _ event _ sequences ( sequences ) event _ sequences, nodes = self. number _ event _ sequences ( event _ sequences ) self. data = self. get _ datastructure ( event _ sequences ) edges = self. discover _ structure _ from _ sta... | [
-0.2458612471818924,
-0.11842341721057892,
0.36897891759872437,
-0.37519359588623047,
-0.06592005491256714,
-1.0762286186218262,
0.4717022180557251,
-0.6749913096427917,
0.7781364917755127,
-0.23067356646060944,
-0.23983825743198395,
0.16623114049434662,
0.4653494358062744,
0.2293843924999... |
def handler ( self, f ) : self. add _ handler ( f, type ='all') return f | [
-0.035958196967840195,
-0.1853727102279663,
0.466983437538147,
0.5877752900123596,
-0.34648454189300537,
0.5628852248191833,
-0.11554031819105148,
0.9375190138816833,
0.11064291000366211,
-1.5901751518249512,
-0.12145974487066269,
0.03265560790896416,
0.41937944293022156,
0.343434482812881... |
def is _ boostworthy ( mastodon, post ) : relations = mastodon. account _ relationships ( post. account. id ) for r in relations : if r. id = = post. account. id and r. following and not post. reblogged : return true return false | [
1.7014267444610596,
0.46051713824272156,
0.5709035396575928,
1.2115956544876099,
-0.026373663917183876,
0.2821783721446991,
-0.028420714661478996,
-0.8960838317871094,
0.3268314301967621,
-0.08301524072885513,
-0.6320205926895142,
0.4950594902038574,
-0.6875530481338501,
0.9317034482955933... |
def put ( self, request ) : { { cookiecutter. panel } } = client. { { cookiecutter. panel } } _ create ( request, * * request. data ) return rest _ utils. createdresponse ('/ api / { { cookiecutter. api _ module } } / { { cookiecutter. panel } } / % s'% { { cookiecutter. panel } }. uuid, { { cookiecutter. panel } }. to... | [
-1.7847872972488403,
-0.5051576495170593,
0.3927362859249115,
-0.6842857599258423,
0.2240191251039505,
-0.21711426973342896,
0.11842723190784454,
0.08811882138252258,
-0.2842605412006378,
1.175331950187683,
-0.8269618153572083,
0.7859018445014954,
-1.3539609909057617,
-0.560089111328125,
... |
def seturl ( self, url ) : self. _ url = url | [
-0.3926209807395935,
0.2837112843990326,
0.037243619561195374,
0.12903963029384613,
0.0680348351597786,
1.0118250846862793,
0.19453169405460358,
0.8870110511779785,
-0.1549759954214096,
-0.13135921955108643,
-1.1859534978866577,
0.46722227334976196,
-0.39784693717956543,
0.592373788356781,... |
def tstrhashf _ djb _ getprimhashcd ( * args ) : return _ snap. tstrhashf _ djb _ getprimhashcd ( * args ) | [
1.2811059951782227,
0.44613945484161377,
0.3353944718837738,
0.09492886811494827,
-0.3813420236110687,
0.5574641823768616,
0.06489057093858719,
0.7570019364356995,
-0.24908564984798431,
-0.6357608437538147,
0.2180316299200058,
-0.4823604226112366,
-0.6056626439094543,
-0.2500058114528656,
... |
def test _ remove _ stop _ words _ no _ stop _ words ( self ) : expected = ['token1 ','token2'] actual = remove _ stop _ words ( ['token1 ','token2'], [ ] ) self. assertequal ( expected, actual ) | [
-0.9253298044204712,
-0.1268700808286667,
0.39727532863616943,
0.33910298347473145,
0.1029408872127533,
0.14199259877204895,
-0.8743605613708496,
0.7908583283424377,
-0.7254443168640137,
0.30070385336875916,
-1.3447240591049194,
-0.2897610366344452,
-0.6627888083457947,
-0.0451212823390960... |
def teardown ( self ) : with self. app. app _ context ( ) : classic. drop _ all ( ) | [
0.7084092497825623,
-0.05195803567767143,
0.4703110158443451,
0.6501502394676208,
1.0343940258026123,
1.395060420036316,
0.5088305473327637,
-0.40635010600090027,
0.4575634002685547,
0.46498164534568787,
0.2666095197200775,
0.12260191142559052,
0.0963134765625,
0.03943895921111107,
-0.43... |
def vgg11 _ bn _ imagenet ( pretrained = false, * * kwargs ) : model = vgg _ imagenet ( make _ layers ( cfg _ imagenet ['a'], batch _ norm = true ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg11 _ bn'] ) ) return model | [
-0.3884138762950897,
0.2752252519130707,
0.4168287217617035,
0.9899107813835144,
0.1550656110048294,
0.3111552596092224,
0.22282841801643372,
0.46750932931900024,
-0.1775044947862625,
0.4655234217643738,
-0.1443643569946289,
0.054566215723752975,
-0.16060152649879456,
0.3320540189743042,
... |
def make _ stems ( ) : x = numpy. zeros ( [ 2, self. peaks. mz. size ], dtype = " float " ) y = numpy. zeros ( x. shape ) x [ :, : ] = numpy. tile ( self. peaks. mz, ( 2, 1 ) ) y [ 1, : ] = self. peaks. intensities return x, y | [
0.07006891816854477,
-0.050801780074834824,
0.46275123953819275,
-0.48881256580352783,
0.06067409738898277,
-0.07665331661701202,
0.39997124671936035,
-0.17510032653808594,
0.21902650594711304,
0.26237303018569946,
-0.5107300281524658,
0.16133961081504822,
0.613166093826294,
-0.41476202011... |
def match ( self, text ) : results = [ ] for pattern in self. pattern _ action : res = pattern. search ( text ) if res : data = { } # create keyword arguments starting with the defaults. # deep copy is used here to avoid exposing the reference # outside the match function. data. update ( copy. deepcopy ( self. pattern ... | [
0.13436093926429749,
0.11888442933559418,
0.5184676647186279,
-0.017802180722355843,
-0.16503699123859406,
-0.4221656024456024,
-0.1445915699005127,
0.20486727356910706,
-0.10120998322963715,
0.3746028244495392,
-0.34519162774086,
0.0851336345076561,
-0.48628106713294983,
0.182427212595939... |
def is _ auto _ enabled ( * args ) : return _ ida _ auto. is _ auto _ enabled ( * args ) | [
-0.8255597352981567,
0.20734992623329163,
0.18226909637451172,
1.2451074123382568,
0.831453263759613,
-0.7912043333053589,
0.6624905467033386,
0.2670058310031891,
-0.6827592849731445,
-0.2922618091106415,
-1.525208830833435,
0.12045079469680786,
-0.8615737557411194,
-0.044246040284633636,
... |
def subtitles _ preprocessing ( args ) : subs = pysrt. open ( args. subtitles, encoding ='iso - 8859 - 1') subs _ text = [ ] subs _ time = [ ] for sub in subs : sub _ string = str ( sub ) sub _ time = sub _ string. split ('\ n') [ 1 ] sub _ text = sub _ string. split ('\ n') [ 2 ] subs _ text. append ( tokenizer ( sub ... | [
-0.34526267647743225,
-0.7965526580810547,
0.626342236995697,
-0.13716286420822144,
-0.7877886891365051,
-0.6626390814781189,
-1.0222827196121216,
0.9371638894081116,
-0.44697949290275574,
0.7095112204551697,
-0.624315083026886,
0.27443191409111023,
0.2608850300312042,
0.6625679135322571,
... |
def _ decode _ iq _ item ( self, encoded ) : try : item _ decoded = json. loads ( encoded. decode ( self. encoding ) ) except ( unicodedecodeerror, valueerror ) as exc : raise valueerror ( exc ) from exc if not isinstance ( item _ decoded, list ) or len ( item _ decoded )! = 2 : raise valueerror ( " must be an array of... | [
-0.9811173677444458,
-1.2482070922851562,
0.6599611043930054,
-1.0234650373458862,
-0.3711884617805481,
-0.34460026025772095,
-0.3392939269542694,
0.03302416950464249,
0.7266845703125,
-0.026669980958104134,
-0.6941985487937927,
0.6289660930633545,
-0.44874459505081177,
-1.1354976892471313... |
def getuploadpath ( self ) : return self. _ _ swift. getuploadpath ( ) | [
-0.2513127028942108,
0.116964191198349,
0.6680271625518799,
0.500117301940918,
0.5481832027435303,
0.7071518898010254,
0.7749305367469788,
-0.15329240262508392,
-0.8175421357154846,
0.01928994245827198,
0.493004709482193,
0.01320120319724083,
-1.4297561645507812,
0.2710113525390625,
0.37... |
def test _ initial ( self ) : field = omnifloatfield. _ meta. get _ field ('initial _ data') self. assertisinstance ( field, models. floatfield ) self. asserttrue ( field. blank ) self. asserttrue ( field. null ) | [
0.9861160516738892,
0.4906168282032013,
0.3631606996059418,
-0.2033918797969818,
1.122572898864746,
1.090872049331665,
0.05651208013296127,
0.21673808991909027,
0.2885809540748596,
-0.8205670714378357,
-0.5965307950973511,
0.03787428140640259,
-0.17295531928539276,
0.7151222825050354,
-0... |
def is _ equal ( array1, array2 ) : assert array1. size = = array2. size return all ( array2 = = array1 ) | [
0.09262736886739731,
-0.4941502809524536,
0.5879759192466736,
1.290008306503296,
0.6579257845878601,
0.6052002310752869,
-0.8598311543464661,
-0.2819255590438843,
0.4728180170059204,
0.853835940361023,
-0.8978198766708374,
1.32619309425354,
-0.49223068356513977,
0.4981643259525299,
0.075... |
def dipolar ( cls, spin _ particle1, spin _ particle2, dipolar _ matrix ) : return cls. mkh2 ( spin _ particle1, spin _ particle2, dipolar _ matrix ) | [
0.31307244300842285,
-0.5797020196914673,
0.3587910234928131,
0.35259026288986206,
-0.8019453883171082,
0.6797807216644287,
-1.3032125234603882,
0.36517977714538574,
-0.7276999354362488,
0.05280766636133194,
-0.011125301942229271,
0.21313215792179108,
-0.33115944266319275,
-0.9944955706596... |
def _ _ average _ matrix ( self ) : transitionmatrices = self. get _ matrices ( ) n = len ( transitionmatrices ) centroidmatrix = np. zeros ( transitionmatrices [ 0 ]. shape ) for tm in transitionmatrices : centroidmatrix + = tm centroidmatrix / = n return centroidmatrix | [
-0.4471430778503418,
-0.5958088636398315,
0.3231155276298523,
-0.2565684914588928,
0.09585236012935638,
-0.06237746402621269,
0.7046236991882324,
0.30963483452796936,
0.16223466396331787,
0.9592744708061218,
0.4791232645511627,
-0.0792718157172203,
-0.42981499433517456,
0.5470291972160339,... |
def can _ archive _ forum ( self, forum, user ) : return self. _ perform _ basic _ permission _ check ( forum, user, " can _ archive _ forum " ) | [
-0.5009323954582214,
0.3739926815032959,
0.36941981315612793,
1.986045002937317,
-0.5366425514221191,
-0.19967572391033173,
0.18033578991889954,
0.4133162200450897,
-0.6271293759346008,
-0.04821782186627388,
-0.18304355442523956,
0.9896286129951477,
-0.933262288570404,
0.37885817885398865,... |
def test _ intuit ( inp, fmt, exp ) : pytest. debug _ func ( ) later = nldt. moment ( inp, itz ='local') # payload assert later ( fmt ) = = exp | [
-0.033512238413095474,
-0.6659209728240967,
0.19429032504558563,
-0.20569466054439545,
0.3190404176712036,
0.9771811366081238,
-0.460440456867218,
-0.13463249802589417,
-0.046266116201877594,
-0.9639990329742432,
-0.17908471822738647,
-0.0997728630900383,
-0.6970895528793335,
0.75515639781... |
def addedge ( self, * args ) : return _ snap. pungraph _ addedge ( self, * args ) | [
-1.043656826019287,
1.09444260597229,
0.29731905460357666,
1.1897729635238647,
0.8054175972938538,
0.2516390085220337,
0.41837745904922485,
0.6921719312667847,
0.12145230174064636,
-1.0321526527404785,
-0.47824329137802124,
-0.9612371921539307,
-1.993378758430481,
0.6204172968864441,
0.7... |
def count ( self, * args ) : return _ snap. tcncomv _ count ( self, * args ) | [
-0.24434682726860046,
0.2694995701313019,
0.31105467677116394,
-0.4903554618358612,
1.051897644996643,
-0.10657006502151489,
0.9026527404785156,
0.14595508575439453,
-1.0420368909835815,
-0.09808269888162613,
-0.673768162727356,
-1.2224955558776855,
0.024576663970947266,
1.3593946695327759... |
def temperature _ smooth ( sampling _ probs, temperature ) : if not isinstance ( sampling _ probs, np. ndarray ) : raise typeerror ( " sampling _ probs must be numpy array. " ) if temperature < = 0 : raise valueerror ( " temperature must be positive. " ) if not np. isfinite ( temperature ) : raise valueerror ( " temper... | [
0.3366714417934418,
-0.6204892992973328,
0.5076216459274292,
0.4698685109615326,
-1.0503689050674438,
0.5284011960029602,
0.04015407711267471,
0.1867281049489975,
0.08021657913923264,
1.6223269701004028,
0.5978641510009766,
0.01593310758471489,
-0.4682757556438446,
-0.4314936101436615,
-... |
def _ test _ run _ tests _ 2 ( self ) : # todo test disabled until testrunner _ command can be injected to mock _ executor testrunner _ command ='sh - c " exit 1 "'executor = mock _ executor ( self. testrun, self. stand _ alone, self. responseclient, " hostname ", testrunner _ command ) executor. target = stub _ hardwa... | [
-0.24740789830684662,
0.4156130254268646,
0.5997952222824097,
0.4457876682281494,
1.2508108615875244,
0.34377509355545044,
1.4079614877700806,
0.5891900658607483,
-0.39604899287223816,
-0.7716967463493347,
-0.5800833106040955,
-0.5193184018135071,
-0.111053965985775,
0.7890908122062683,
... |
def load _ form ( self, req : flask. request, schema : ma. schema ) - > typing. any : return self. _ makeproxy ( req. form, schema ) | [
-0.7084782719612122,
0.42034319043159485,
0.5581122636795044,
-0.20928899943828583,
-0.41442185640335083,
-0.2778312563896179,
-0.640408992767334,
0.21588881313800812,
0.13996601104736328,
-1.047421932220459,
-0.16499003767967224,
-0.29430800676345825,
-0.560648500919342,
0.221621066331863... |
def test _ retrieves _ follower _ by _ name ( self ) : user = make _ user ( ) headers = make _ authentication _ headers _ for _ user ( user ) post _ creator = make _ user ( ) post = post _ creator. create _ public _ post ( text = make _ fake _ post _ text ( ) ) follower = make _ user ( ) follower. follow _ user ( user ... | [
0.47030991315841675,
0.12283031642436981,
0.6245498061180115,
0.6061188578605652,
0.022702788934111595,
0.40650537610054016,
-0.1179104670882225,
-0.8937968015670776,
-0.1956474930047989,
-0.7160177826881409,
-1.6206061840057373,
-0.5761791467666626,
-0.7519320249557495,
0.1136928945779800... |
def validate _ zone _ soa ( domain, master _ domain ) : if not domain : raise exception ( " you called this function wrong " ) if not domain. soa : return zone _ domains = domain. soa. domain _ set. all ( ) root _ domain = find _ root _ domain ( domain. soa ) if not root _ domain : # no one is using this domain. return... | [
0.09595529735088348,
-0.42259034514427185,
0.39572760462760925,
0.39133256673812866,
0.035147152841091156,
-0.6499475836753845,
1.4470492601394653,
0.19743618369102478,
0.8239021301269531,
-0.06363129615783691,
1.142436146736145,
1.216771125793457,
0.1892360895872116,
0.878646194934845,
... |
def fetch ( self ) : r = requests. get ( f'{ self. fetch _ url }? login _ challenge = { self. challenge _ id } ', timeout = self. timeout ) r. raise _ for _ status ( ) fetched _ data = r. json ( ) return fetched _ data ['subject'] if fetched _ data ['skip'] else none | [
-0.27315112948417664,
0.11521060764789581,
0.500629186630249,
0.16778014600276947,
-1.0117055177688599,
-0.0078066326677799225,
-1.17637038230896,
-1.2934651374816895,
0.4875113368034363,
0.2380554974079132,
0.18984389305114746,
0.572235107421875,
-0.17096452414989471,
-0.702511727809906,
... |
def simulate _ psdf _ cython ( ) : # input # norm = sim _ input ['norm'] dt = sim _ input ['dt'] psdpar = sim _ input ['psdpar'] inorm = 0 if norm = ='var'else 1 if norm = ='leahy'else 2 sims = [ ] for isim in range ( 1, args. nsim + 1 ) : az. misc. print _ progress ( isim, args. nsim + 1, isim = = args. nsim ) # simul... | [
0.32197317481040955,
0.5214231014251709,
0.8844561576843262,
-0.42757657170295715,
0.12621372938156128,
-0.04628521203994751,
0.25692909955978394,
-0.5713031888008118,
-0.36432182788848877,
-0.4352761507034302,
0.09535159170627594,
0.11209956556558609,
-0.3888669013977051,
0.49672016501426... |
def loadconnlist _ pneanet ( * args ) : return _ snap. loadconnlist _ pneanet ( * args ) | [
-2.1220452785491943,
0.10435063391923904,
0.384558767080307,
0.7773774862289429,
-0.010411511175334454,
-0.5489507913589478,
-1.1473886966705322,
-0.3037254810333252,
-0.23918047547340393,
-0.2864781618118286,
-1.3165898323059082,
-1.204298973083496,
-0.6217820048332214,
0.4630635976791382... |
def banner ( message, border ='*') : # print ( " enter a string " ) # response = input ( ) # take user input print ( border * len ( message ) ) print ( message ) print ( border * len ( message ) ) | [
1.028315544128418,
0.12589994072914124,
0.4340284764766693,
1.3987747430801392,
-0.49337467551231384,
1.0980308055877686,
0.8579003810882568,
-0.6758884787559509,
0.1744442880153656,
-1.336527705192566,
-1.0413256883621216,
0.7533619999885559,
-1.509348750114441,
0.6312657594680786,
0.87... |
def identity _ map ( cls, train _ track ) : # todo rewrite this tt = train _ track max _ num _ branches = tt. num _ branches _ if _ made _ trivalent ( ) assert len ( tt. branches ( ) ) < = max _ num _ branches # identity array of arbitrary - precision python ints. # keep in mind that we fill in ones also in the rows th... | [
-0.7564742565155029,
-0.17191287875175476,
0.9782576560974121,
-0.009277280420064926,
0.25108015537261963,
0.5076171159744263,
1.1551880836486816,
-0.3067876696586609,
-0.38105881214141846,
0.42784640192985535,
-0.2480224221944809,
-1.014677882194519,
0.3841797709465027,
-0.399728417396545... |
def fetch _ gevent ( url ) : try : result = urllib2. urlopen ( url ). read ( ) return except urllib2. httperror as e : if e. code = = 404 : logging. info ( " not fund " ) return url else : logging. warn ( " could not fetch the url % s " % url ) return'error ' | [
-0.39191821217536926,
-0.057292476296424866,
0.6092641353607178,
-0.004396356176584959,
-0.1327461302280426,
0.6407010555267334,
-0.434635728597641,
0.20290718972682953,
0.20944200456142426,
0.09440808743238449,
0.5421871542930603,
0.14148615300655365,
0.1087435781955719,
0.133780911564826... |
def test _ get _ form _ class _ name ( self ) : self. assertequal ('omniformtestmodel ', self. omniform. _ get _ form _ class _ name ( ) ) | [
-0.14911794662475586,
-0.524219810962677,
0.13503067195415497,
0.5930060744285583,
0.48887500166893005,
0.37587884068489075,
-0.20177625119686127,
-0.25532057881355286,
0.6445927023887634,
-0.9474717974662781,
-1.0480576753616333,
-1.0082731246948242,
0.5337642431259155,
0.6690866351127625... |
def breadthfirstsearch ( graph, root ) : # nodes we've visited. visited = set ( ) # nodes whose location we know, but we have yet to actually visit. queue = [ root ] while queue : next _ node = queue. pop ( ) if next _ node not in visited : visited. add ( next _ node ) queue. extend ( graph [ next _ node ] - visited ) ... | [
0.11592181026935577,
0.7499045729637146,
0.5735609531402588,
0.3659922182559967,
0.17556054890155792,
-1.0455585718154907,
0.029115205630660057,
-0.38012781739234924,
-0.23580968379974365,
0.10483722388744354,
-0.007647242397069931,
1.3138031959533691,
-0.3018985092639923,
0.00919368863105... |
def buffered _ bounded _ lemire _ uint8 ( bitgen, rng, bcnt, buf ) : # note : ` rng ` should not be 0xff. when this happens ` rng _ excl ` becomes # zero. rng _ excl = uint8 ( rng ) + uint8 ( 1 ) assert ( rng! = 0xff ) # generate a scaled random number. n, bcnt, buf = buffered _ uint8 ( bitgen, bcnt, buf ) m = uint16 (... | [
0.6378551721572876,
-0.10250642150640488,
0.6344448924064636,
-0.9702072143554688,
-0.24393707513809204,
0.4154358506202698,
-0.6012018322944641,
0.07600145787000656,
0.6527814269065857,
-0.3913889527320862,
-0.856676459312439,
0.3479149639606476,
-0.5500614047050476,
0.017871350049972534,... |
def is _ timeout ( ioerror ) : try : # all ioerrors returned by pyusb contain # msg, errno, and should be unpackable. err, msg = ioerror except valueerror : # but, sometimes we can't unpack. i don't # know what is raising theses ioerrors # just assume its a timeout, so operation # is retried return true else : return (... | [
-0.16769497096538544,
0.10253865271806717,
0.42953282594680786,
0.8033901453018188,
-0.3642956614494324,
-0.21550709009170532,
-0.17981363832950592,
0.5001109838485718,
1.0747535228729248,
0.6000410914421082,
0.1563229262828827,
-0.60692298412323,
-0.5444984436035156,
-0.5487959980964661,
... |
def alpha _ shape ( points, alpha ) : if len ( points ) < 4 : # when you have a triangle, there is no sense # in computing an alpha shape. return multipoint ( list ( points ) ). convex _ hull def add _ edge ( edges, edge _ points, coords, i, j ) : " " " add a line between the i - th and j - th points, if not in the lis... | [
0.5610959529876709,
-0.2013963758945465,
0.8792493343353271,
-0.19531814754009247,
-0.08088657259941101,
-0.1632407307624817,
0.49632325768470764,
1.1234252452850342,
0.9758037328720093,
0.8292503952980042,
-0.14826522767543793,
0.40617796778678894,
-0.24243700504302979,
0.0604401528835296... |
def getpoissondev ( self, * args ) : return _ snap. trnd _ getpoissondev ( self, * args ) | [
0.20889131724834442,
0.7969833612442017,
0.45904067158699036,
0.3878760039806366,
1.0459095239639282,
-0.04036784917116165,
0.8009564876556396,
0.12109769880771637,
-1.0641095638275146,
-1.563280701637268,
-0.1669699102640152,
0.051110852509737015,
-0.13631649315357208,
0.4622204303741455,... |
def onsearchfieldchanged ( self ) : # add ". * " to enable partial matching if self. searchregexcheckbox. ischecked ( ) : regex = qregexp ( ". * " + self. searchlineedit. text ( ) + ". * ", qt. caseinsensitive ) else : regex = qregexp ( self. searchlineedit. text ( ), qt. caseinsensitive ) for model in ( self. newproxy... | [
-0.6340410113334656,
-0.45314905047416687,
0.6452012658119202,
0.06331247091293335,
0.8363718390464783,
0.4426157772541046,
0.5477176904678345,
0.276767373085022,
-0.5119534134864807,
0.4647555351257324,
-0.8086305856704712,
-0.004831723868846893,
-0.531455934047699,
0.18340861797332764,
... |
def make _ likes ( max _ likes, min _ likes ) : if isinstance ( max _ likes, str ) and max _ likes. isnumeric ( ) : max _ likes = int ( max _ likes ) if not isinstance ( max _ likes, int ) : print ('max _ likes user is not integer or exist') return if isinstance ( min _ likes, str ) and min _ likes. isnumeric ( ) : min... | [
-0.520995020866394,
0.34671202301979065,
0.6893095970153809,
0.47129493951797485,
-0.10286401957273483,
1.4655269384384155,
-0.2843054234981537,
-0.39462777972221375,
-0.4502040147781372,
-0.28244832158088684,
-0.2928936183452606,
0.839826226234436,
-0.15407411754131317,
0.0776354521512985... |
def social _ connectivity ( filename, n ) : connectivity _ graf = unionfind ( n ) timestamp = 0 if connectivity _ graf. components < = 1 : return timestamp with open ( filename ) as f : for row in f : timestamp, friend1, friend2 = row. split ( ", " ) friend1, friend2 = int ( friend1 ), int ( friend2 ) connectivity _ gr... | [
-0.37217193841934204,
-0.22798098623752594,
0.4286891222000122,
0.46349576115608215,
0.24442337453365326,
-0.1935921013355255,
0.5044997334480286,
-0.059774674475193024,
-0.4144167900085449,
0.36159661412239075,
0.4617801904678345,
-1.1641526222229004,
-0.7008830904960632,
0.11729050427675... |
def spellcurrentitem ( self, itemstring ) : for character in itemstring : self. speakcharacter ( character ) | [
-0.941925048828125,
-1.924808144569397,
0.044808316975831985,
-0.18256047368049622,
0.2671681046485901,
0.269538938999176,
-0.06275976449251175,
-0.023710209876298904,
0.5288826823234558,
0.4602165222167969,
-0.0998712107539177,
0.1266789585351944,
-1.0945649147033691,
-0.8891955614089966,... |
def get _ global _ link _ rpy ( self, link : str, q : arraytype ) - > casadiarraytype : return quaternion. fromvec ( self. get _ global _ link _ quaternion ( link, q ) ). getrpy ( ) | [
-0.4809496998786926,
-0.40974533557891846,
0.28247731924057007,
-0.14982670545578003,
0.631418764591217,
0.09872789680957794,
-0.30811697244644165,
-0.7446541786193848,
0.5667228698730469,
-0.0536016970872879,
-0.01115352287888527,
1.6330114603042603,
-1.266418218612671,
-0.176106482744216... |
def export _ stock _ in _ shopify ( self, instance, product _ ids ) : common _ log _ line _ obj = self. env [ " common. log. lines. ept " ] product _ obj = self. env [ " product. product " ] log _ line _ array = [ ] model = " shopify. product. product. ept " model _ id = common _ log _ line _ obj. get _ model _ id ( mo... | [
-1.2500754594802856,
-0.49365440011024475,
0.8076101541519165,
0.270905077457428,
0.5653140544891357,
0.2667221426963806,
0.34958168864250183,
-0.7527914643287659,
0.9135652780532837,
1.0784382820129395,
-0.45681098103523254,
0.4851156175136566,
0.2144346833229065,
0.7248716950416565,
-0... |
def tokenize ( texts ) : max _ len = 512 splited _ texts = [ ] for text in texts : splited _ text = tokenizer. tokenize ( _ convert _ num _ half _ to _ full ( text. replace ('。 \ n ','\ n'). replace ('\ n ','。 \ n') ) ) if len ( splited _ text ) > ( max _ len - 2 ) : splited _ text = splited _ text [ : max _ len - 2 ] ... | [
-0.3729388117790222,
-0.6044096350669861,
0.6892406940460205,
0.8982803225517273,
-1.2320584058761597,
-1.1889609098434448,
-0.099822498857975,
0.7541357278823853,
0.2529798448085785,
-0.276454359292984,
-0.7229757308959961,
-0.2025385946035385,
-0.11519898474216461,
0.4826892614364624,
... |
def to _ entity ( self, item ) : return self. session. query ( entity ) \. filter _ by ( url = item. url, c4 = item. c4 ) \. options ( joinedload ('meta') ) \. one ( ) | [
-0.4386272728443146,
-0.21761369705200195,
0.3230244815349579,
-0.2325136959552765,
1.3388985395431519,
-0.2532198429107666,
0.19794489443302155,
-0.310089111328125,
1.032200813293457,
-0.08832815289497375,
-0.11873623728752136,
-0.10341008007526398,
0.10532504320144653,
-0.765360891819000... |
def start ( ) : global running running = true if len ( city _ f. get ( ) ) = = 0 or len ( unit. get ( ) ) = = 0 or len ( second. get ( ) ) = = 0 : tkinter. messagebox. showinfo ( " error ", " entry is empty " ) else : scanning ( ) tkinter. messagebox. showinfo ( " successful ", " process has been started! " ) | [
0.5070578455924988,
-0.3691823184490204,
0.5158004760742188,
0.04367128014564514,
-0.1009339690208435,
0.8473752737045288,
0.07399733364582062,
0.4461199641227722,
-0.44251999258995056,
-0.41138550639152527,
0.10186153650283813,
0.7732447385787964,
-0.7929262518882751,
0.8541969656944275,
... |
def _ _ init _ _ ( self ) : super ( ). _ _ init _ _ ( ) self. pillar _ sprite = pygame. sprite. group ( ) self. all _ sprite = pygame. sprite. group ( ) self. bird = bird ( ) self. all _ sprite. add ( self. bird ) self. speed = 0 self. g = 0. 5 pillar1, pillar2 = pillar ( ), pillar ( ) pillar1. rect. y = randint ( - 15... | [
-0.5232505202293396,
0.10067009925842285,
0.6922016143798828,
-0.44937247037887573,
0.6732625365257263,
0.4439573585987091,
0.49792560935020447,
-0.10684973746538162,
-0.21924155950546265,
0.48536521196365356,
-1.1806126832962036,
0.37428921461105347,
-1.1146844625473022,
0.760247468948364... |
def set _ args ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ( " - f ", " - - file _ path ", help = " specify path for the file you want to process ", dest ='file ', type = str, required = true, ) parser. add _ argument ( " - nf ", " - - new _ file _ path ", help = " specify name and path in which ... | [
0.06902100145816803,
-0.3676164746284485,
0.5399676561355591,
-0.45035219192504883,
1.122068166732788,
0.20939438045024872,
-0.48310136795043945,
0.6743915677070618,
-1.7494765520095825,
0.31681767106056213,
-0.005170836579054594,
0.055339597165584564,
-0.19984956085681915,
1.0457434654235... |
def _ _ init _ _ ( self, * args ) : _ snap. tintset _ swiginit ( self, _ snap. new _ tintset ( * args ) ) | [
-0.4405916929244995,
0.1749732941389084,
-0.022810770198702812,
0.46219655871391296,
-0.5816110372543335,
-0.6606947779655457,
0.9473357200622559,
-0.3284679651260376,
-0.48134374618530273,
-0.03335406631231308,
-0.11403456330299377,
0.4977118968963623,
-0.5382904410362244,
0.8054245114326... |
def to _ device ( tt : torch. tensor, device : optional [ types. device ] = " cpu ", non _ blocking : bool = false ) - > torch. tensor : return tt. to ( device, non _ blocking = non _ blocking ) | [
-0.18519210815429688,
1.4317095279693604,
0.2953442931175232,
0.4304051697254181,
-0.3564813435077667,
0.4049127697944641,
0.155607670545578,
-0.6006800532341003,
-0.41275086998939514,
1.00108802318573,
-0.31026771664619446,
0.25214317440986633,
-0.22228586673736572,
-1.0355576276779175,
... |
def fetch _ cnbc _ urls ( ) : tesla _ urls = [ ] response = requests. get ( base _ url ) with open ('cnbcbaseurl. xml ','wb') as file _ handler : file _ handler. write ( response. content ) df = pdx. read _ xml ( " cnbcbaseurl. xml ", ['sitemapindex'] ) xml _ url _ list = [ x ['loc'] for x in df. sitemap ] print ( xml ... | [
0.1882530301809311,
-0.055474914610385895,
0.49255311489105225,
0.17384427785873413,
0.6484801769256592,
0.12693649530410767,
-0.34571897983551025,
0.8611156940460205,
-0.06204935163259506,
0.190384641289711,
-0.44643524289131165,
0.4488055408000946,
0.5296686291694641,
0.5741708874702454,... |
def is _ ( self, state ) : translator = self. _ meta ['translator'] state = translator. translate ( state ) return self. actual _ state = = state | [
-0.3973419964313507,
-0.056689463555812836,
0.3312988877296448,
-0.1941404938697815,
-0.5265426635742188,
-0.22914204001426697,
-1.083943486213684,
0.1411665380001068,
1.2188440561294556,
0.15854087471961975,
-0.4952290654182434,
-0.1112271249294281,
0.866446852684021,
-0.707755446434021,
... |
def getnastri ( self, * args ) : return _ snap. pneanetmp _ getnastri ( self, * args ) | [
0.5594030618667603,
0.033219046890735626,
0.1992097944021225,
0.6061034798622131,
1.0343692302703857,
-0.12757496535778046,
0.009181976318359375,
-1.0531609058380127,
-0.5082491040229797,
-0.9614225625991821,
-0.8292136788368225,
-0.6806467175483704,
-0.7417831420898438,
0.5975632667541504... |
def plotoutdegdistr _ pungraph ( * args ) : return _ snap. plotoutdegdistr _ pungraph ( * args ) | [
-0.7806054353713989,
1.0242507457733154,
0.26355263590812683,
-0.5923810005187988,
-0.6286530494689941,
0.3503638505935669,
0.8091764450073242,
0.9318576455116272,
0.1875723898410797,
-0.19389311969280243,
-0.17331677675247192,
0.1125081405043602,
0.04267348721623421,
-0.2212091088294983,
... |
def addbacksorted ( self, * args ) : return _ snap. tfltv _ addbacksorted ( self, * args ) | [
-0.41917654871940613,
1.0290459394454956,
0.47657325863838196,
-0.02915760688483715,
1.0323259830474854,
-1.005090594291687,
0.7545496821403503,
-0.03438185527920723,
-1.0976407527923584,
-0.8791369795799255,
-0.31240618228912354,
-0.5239432454109192,
-1.2533900737762451,
1.087566137313842... |
def addintvattrdate ( self, * args ) : return _ snap. tneanet _ addintvattrdate ( self, * args ) | [
-0.271980345249176,
0.17251372337341309,
0.4481711685657501,
-1.0421321392059326,
0.5485615134239197,
0.6829387545585632,
-0.12274430692195892,
-0.5268376469612122,
-0.355258047580719,
0.37496018409729004,
0.7436266541481018,
-1.2548723220825195,
-0.704208493232727,
0.12696528434753418,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.