text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def set _ value ( self, value : scalartype ) - > none : if isinstance ( value, bool ) : value _ str ='true'if value else'false'else : value _ str = str ( value ) start _ mark = self. yaml _ node. start _ mark end _ mark = self. yaml _ node. end _ mark # if we're of a class type, then we want to keep that tag so that th... | [
-0.1739024668931961,
-0.005149038974195719,
0.3876758813858032,
-0.2789860665798187,
0.2961795926094055,
-0.1507982611656189,
-0.1309492290019989,
0.5242357850074768,
-0.23958995938301086,
-0.037048760801553726,
-0.26527878642082214,
1.5881365537643433,
0.5816894769668579,
1.00631737709045... |
def add _ user ( username : str, email : str, password : str ) - > int : with db _ session ( ) as session : user = user ( username, email, user. generate _ hash ( password ) ) session. add ( user ) session. commit ( ) return user. id | [
-0.41405487060546875,
0.6735522150993347,
0.7934398055076599,
0.47779884934425354,
0.24960730969905853,
0.8002292513847351,
0.22132520377635956,
-0.1708938628435135,
0.0008839991642162204,
-0.24464428424835205,
-0.8869723677635193,
-1.1273472309112549,
-0.9362732768058777,
-0.4988861680030... |
def validatemaf ( filepath ) : print ( " validating maf file " ) first _ header = ['chromosome ','hugo _ symbol ','tumor _ sample _ barcode'] correct _ column _ headers = ['chromosome ','start _ position ','reference _ allele ','tumor _ sample _ barcode ','t _ alt _ count ','t _ depth'] # t _ ref _ count + t _ alt _ co... | [
0.2233773022890091,
-0.9323896169662476,
0.8240715265274048,
0.0646466612815857,
-0.07222091406583786,
0.4191147983074188,
0.7166730165481567,
0.1436932235956192,
-0.9382587671279907,
0.2214038074016571,
0.37281090021133423,
0.19506414234638214,
0.3570997714996338,
0.15039603412151337,
0... |
def tensorflow ( self ) : import tensorflow as tf def np _ to _ tf ( types ) : if isinstance ( types, list ) : return [ np _ to _ tf ( item ) for item in types ] if isinstance ( types, tuple ) : return tuple ( np _ to _ tf ( item ) for item in types ) if isinstance ( types, dict ) : return { key : np _ to _ tf ( types ... | [
-0.12305835634469986,
-0.00845824833959341,
0.3733712434768677,
-0.7072662711143494,
0.11336443573236465,
-0.25448325276374817,
-0.11458460241556168,
-0.4760796129703522,
-0.27909862995147705,
-1.0725430250167847,
0.10484626889228821,
0.5176265835762024,
-0.22901533544063568,
-0.6942627429... |
def access _ key ( self, value ) : self. _ update _ values ('username ', value, parent _ attribute ='inputs') | [
-0.7792371511459351,
0.32990849018096924,
0.45343902707099915,
-0.24783802032470703,
-0.5291994214057922,
0.41478437185287476,
1.822799801826477,
-0.26805174350738525,
-0.032355714589357376,
-0.01908187009394169,
-0.044362422078847885,
0.23792877793312073,
0.4061715304851532,
0.51592874526... |
def test _ verify _ fail ( vasp _ calc, vasp _ inputs ) : inputs = vasp _ inputs ( ) inputs. pop ('kpoints') with pytest. raises ( valueerror ) : vasp _ calc ( inputs = inputs ) | [
1.3162305355072021,
0.8060094118118286,
0.20537155866622925,
1.1538622379302979,
0.7108334302902222,
0.7884541153907776,
-0.6297703981399536,
-0.36534395813941956,
0.6902484893798828,
-0.25177428126335144,
-0.21498820185661316,
-0.24241134524345398,
-0.12004426121711731,
0.4364770650863647... |
def run ( self ) : # type : ( ) - > optional [ bool ] pass | [
-0.2799887955188751,
0.05138801410794258,
0.5478677749633789,
1.4667505025863647,
0.5161228179931641,
1.2238706350326538,
0.029437297955155373,
0.48054182529449463,
0.131614089012146,
-0.8087138533592224,
-0.8496131896972656,
0.5313084721565247,
-0.6344946622848511,
-0.7406435608863831,
... |
def drop _ privileges _ forever ( setenv = true ) : return _ set _ uids ( false, true, setenv = setenv ) | [
-1.1302058696746826,
0.2593579888343811,
0.531571626663208,
0.6047617197036743,
-0.03209240734577179,
0.9540366530418396,
-0.5038500428199768,
0.08826444298028946,
-0.4103943109512329,
-0.1734277606010437,
-0.09611071646213531,
0.44364553689956665,
-1.2820945978164673,
0.31704023480415344,... |
def _ generate _ reparameterizers ( self ) : # build the base reparameterizers reparam _ list = [ reparameterizers. get _ reparameterizer ( reparam ) ( config = self. config ) for reparam in self. reparam _ strs ] # tack on dense networks between them input _ size = reparam _ list [ 0 ]. output _ size for i in range ( ... | [
-1.2241301536560059,
0.3906099498271942,
0.6348851323127747,
-0.35840174555778503,
0.5996838808059692,
0.27297255396842957,
-0.2622931897640228,
0.5703829526901245,
-0.21696652472019196,
0.5022070407867432,
-0.34972622990608215,
0.11300424486398697,
-1.1661713123321533,
-0.1727867126464843... |
def fild _ all _ files ( path ) : for root, dirs, files in os. walk ( path ) : yield root for f in files : yield os. path. join ( root, f ) | [
0.980848491191864,
0.6477542519569397,
0.72605961561203,
0.7475747466087341,
-0.278108149766922,
0.08810818940401077,
0.5939985513687134,
-0.762625515460968,
0.1880805343389511,
-0.9274001717567444,
-0.17173145711421967,
-0.09249058365821838,
-0.7119619250297546,
1.0731769800186157,
-1.7... |
def read _ data ( self, frame : int, fps : int, num _ frames : int ) : if not self. hdf5 _ path : raise filenotfounderror ('hdf5 filepath is missing') if not self. dataset _ id : raise filenotfounderror ('dataset id is missing') stride = self. fps / / fps read _ frames = [ ] for i in range ( num _ frames ) : num _ fram... | [
0.02427523396909237,
0.22714297473430634,
0.6643783450126648,
0.22538430988788605,
0.6080246567726135,
-0.7706262469291687,
0.14908994734287262,
-0.8392873406410217,
0.0912458747625351,
0.24386967718601227,
0.3210926949977875,
0.24820354580879211,
-0.7421995997428894,
-0.27475497126579285,... |
def list _ tags ( self, repo ) : logging. info ('listing tags in repository : % ( repo ) s ', dict ( repo = repo ) ) ref _ url = " % s / % s / git / refs / tags " % ( self. git _ api _ repos, repo ) response = requests. get ( ref _ url, auth = self. _ credentials, timeout = self. git _ request _ timeout ) response. rai... | [
-0.10919687896966934,
0.24788124859333038,
0.5180233120918274,
-0.5995330810546875,
0.9878725409507751,
-0.4848942160606384,
-1.419282078742981,
-0.27692005038261414,
0.2936369776725769,
1.3024553060531616,
-0.9161953330039978,
0.884397566318512,
-0.7297994494438171,
1.0427043437957764,
... |
def get _ network _ input _ shape ( self, network ) : # 0 - detection network, 1 - localization network if ( network = = 0 ) : if len ( self. detection _ neural _ network. input _ shape ) = = 1 : return self. detection _ neural _ network. input _ shape [ 0 ] return self. detection _ neural _ network. input _ shape elif... | [
-0.3131474256515503,
-0.35985660552978516,
0.4396161139011383,
0.7915158271789551,
0.5573566555976868,
1.036630392074585,
0.7866691946983337,
0.2761510908603668,
0.6382333636283875,
-0.04879823327064514,
0.24489770829677582,
-0.14646847546100616,
-0.5852153897285461,
0.49178189039230347,
... |
def test _ delete _ parameter ( self ) : pass | [
-0.2571333348751068,
0.3146490752696991,
0.2734682559967041,
0.7979729175567627,
0.8228527903556824,
0.6205443739891052,
1.5195032358169556,
0.21885447204113007,
0.571641206741333,
-0.36417141556739807,
-0.13682010769844055,
0.9023808836936951,
-1.2463006973266602,
0.4176967144012451,
-0... |
def zone ( self ) - > list [ zoneinfo ] : return self. _ zone | [
-0.09903603792190552,
-0.720771312713623,
0.10885415226221085,
0.7973202466964722,
1.2045592069625854,
0.5936989784240723,
0.5686007142066956,
0.11764827370643616,
1.0682711601257324,
-1.0201804637908936,
-0.7957863807678223,
0.11891739070415497,
0.04415122792124748,
0.6204990744590759,
... |
def test _ create _ from _ spectral _ coord ( observer, target ) : spec _ coord1 = spectralcoord ( [ 100, 200, 300 ] * u. nm, observer = observer, target = target, radial _ velocity = u. quantity ( 1000,'km / s'), doppler _ convention ='optical ', doppler _ rest = 6000 * u. aa ) spec _ coord2 = spectralcoord ( spec _ c... | [
0.6670971512794495,
-0.4747583270072937,
0.5182362794876099,
-0.44103237986564636,
-0.23615820705890656,
0.6220904588699341,
-0.6865048408508301,
-0.4325956702232361,
0.1690390706062317,
-0.535707414150238,
-0.4448608458042145,
0.3786529302597046,
0.6301125288009644,
-0.20925070345401764,
... |
def cal _ dsc _ binary ( gt _ npy, seg _ npy ) : isinstance ( gt _ npy, np. ndarray ) isinstance ( seg _ npy, np. ndarray ) # convert gt and seg to binary mask gt _ npy [ gt _ npy < 1 ] = 0 gt _ npy [ gt _ npy > 1 ] = 1 seg _ npy [ seg _ npy < 1 ] = 0 seg _ npy [ seg _ npy > 1 ] = 1 # determine the type min _ threshold... | [
-0.05526353046298027,
-0.45889541506767273,
1.0594643354415894,
-0.7679498791694641,
0.5704058408737183,
-0.6514121294021606,
0.4830230474472046,
-0.5825616717338562,
-0.2385725975036621,
0.12842798233032227,
0.26770925521850586,
0.3359053432941437,
0.6080940365791321,
0.07724613696336746,... |
def setdb ( self, db, name = none ) : if isinstance ( db, feresult ) : self. db = db else : self. db = none | [
-0.4533163607120514,
1.1406985521316528,
0.27474045753479004,
1.0760374069213867,
-0.22087723016738892,
-0.513654887676239,
-0.05410687252879143,
-0.3141646087169647,
0.8636769652366638,
-0.7712789177894592,
-0.9472448825836182,
-0.1610645353794098,
-1.121359944343567,
1.598044991493225,
... |
def inverse ( self ) : if self. av is not none : new _ av = - self. _ rots. apply ( self. av ) else : new _ av = none return timedependentrotation ( self. _ rots. inv ( ). as _ quat ( ), self. times, self. dest, self. source, av = new _ av ) | [
-0.5641950964927673,
0.6886983513832092,
0.6911214590072632,
-0.7516294717788696,
-0.9857337474822998,
0.3300008475780487,
0.5170294642448425,
-0.18627239763736725,
-0.053037017583847046,
0.6250914931297302,
-0.32200878858566284,
0.01719912327826023,
-0.7264025807380676,
-1.021729111671447... |
def enableroc ( self, column = none, columns = none, row = none, rows = none, trim = 15 ) : if column is none and columns is none : columns = range ( 52 ) elif columns is none : columns = [ column ] if row is none and rows is none : rows = range ( 80 ) elif rows is none : rows = [ row ] for col in columns : self. roc _... | [
0.7070659399032593,
0.7471209764480591,
0.6413275599479675,
-0.4900885820388794,
1.1342443227767944,
-0.2535671889781952,
0.538753092288971,
0.25668346881866455,
0.4991670250892639,
-0.06420346349477768,
-0.3878788650035858,
0.31529849767684937,
0.02411123551428318,
-0.10642414540052414,
... |
def max _ age ( self ) - > optional [ int ] : return pulumi. get ( self, " max _ age " ) | [
0.49727609753608704,
0.5490483045578003,
0.5037446618080139,
0.6493158936500549,
0.856695294380188,
0.989026665687561,
-0.7053216099739075,
0.24001817405223846,
0.6120336055755615,
0.10693288594484329,
0.5307518243789673,
0.2619347870349884,
-0.044650185853242874,
-0.8605870604515076,
-0... |
def post ( org _ id ) : request _ json = request. get _ json ( ) login _ option _ val = request _ json. get ('loginoption') # todo may be add validation here try : login _ option = orgservice. add _ login _ option ( org _ id, login _ option _ val ) response, status = jsonify ( {'login _ option': login _ option. login _... | [
-1.0044630765914917,
-0.10336702316999435,
0.7190195918083191,
0.5316055417060852,
0.35913729667663574,
0.5909594297409058,
-0.32094424962997437,
-0.0713501125574112,
1.11137056350708,
0.3234748840332031,
-0.8715531826019287,
0.21698114275932312,
-0.4718128442764282,
-0.2080507129430771,
... |
def get _ available _ backends ( configured _ only = false ) : available _ backends = { } for key in backend _ classes. keys ( ) : module _ name = get _ module _ and _ class _ name ( backend _ classes [ key ] ) [ 0 ] class _ instance = get _ class _ instance _ by _ key ( key ) module = sys. modules [ module _ name ] tr... | [
-0.39189720153808594,
-0.19579273462295532,
0.5917668342590332,
0.12017931044101715,
0.20752039551734924,
-0.19963589310646057,
-0.29545971751213074,
0.251603364944458,
-0.7877573370933533,
1.5044718980789185,
0.08496307581663132,
0.694488525390625,
0.4468580186367035,
0.8515685796737671,
... |
def data2b _ res ( mol ='', data _ file ='', property ='b ', quiet = 0 ) : b _ dict = residue _ data _ extract ( data _ file ) quiet = int ( quiet ) = = 1 def b _ lookup ( chain, resi, name, b ) : try : if chain in b _ dict : b = b _ dict [ chain ] [ resi ] [ 0 ] else : b = b _ dict ['' ] [ resi ] [ 0 ] if not quiet : ... | [
0.5428478121757507,
-0.5998706221580505,
0.5725430250167847,
-0.22379040718078613,
0.8326959013938904,
-0.5091809630393982,
0.10469228774309158,
0.020770812407135963,
0.08199014514684677,
-0.5889526605606079,
-0.22687850892543793,
0.7950676083564758,
-0.7774563431739807,
-1.150697827339172... |
def get _ ipython _ version ( ) : v = none try : try : v = ipython. release. version except exception : try : v = ipython. release. version except exception : pass except exception : pass return v | [
-0.7297401428222656,
-0.492023766040802,
0.36150428652763367,
0.050955887883901596,
0.43928155303001404,
-0.13541895151138306,
0.03999090567231178,
-0.7294323444366455,
-0.20243141055107117,
0.2521594166755676,
0.15453475713729858,
0.7743968367576599,
-0.8821948766708374,
-1.20111966133117... |
def restricted _ orbitals ( basis, labels, coords, charge = 0, spin = 0, niter = 100, ethresh = 1e - 12, rthresh = 1e - 9 ) : molecule = pyscf. gto. mole ( atom = zip ( labels, coords ), unit = " bohr ", basis = basis, charge = charge, spin = spin ) molecule. build ( ) rhf = pyscf. scf. rhf ( molecule ) rhf. max _ cycl... | [
0.25840553641319275,
0.1476317048072815,
0.5896503329277039,
-0.11030010133981705,
0.007084590848535299,
-0.02658119611442089,
-0.41676726937294006,
-0.2095266878604889,
-0.48042577505111694,
-0.17078179121017456,
0.05454640090465546,
0.13840211927890778,
-0.24577368795871735,
-0.884370267... |
def is _ special ( self ) : return self. _ path = = " special " | [
0.45373767614364624,
0.34274157881736755,
0.3278540372848511,
1.5631632804870605,
0.37127912044525146,
0.5067955255508423,
-0.1807836890220642,
1.3039387464523315,
0.9482188820838928,
-0.961735725402832,
-0.4963093400001526,
0.7603468298912048,
-0.010073314420878887,
-0.2397998720407486,
... |
def img _ to _ matrix ( filename, verbose = false ) : img = image. open ( filename ) if verbose = = true : print " changing size from % s to % s " % ( str ( img. size ), str ( standard _ size ) ) img = img. resize ( standard _ size ) img = np. array ( img ) # img = list ( img. getdata ( ) ) # img = map ( str, img ) # i... | [
-1.2198035717010498,
-0.6297977566719055,
0.5237560868263245,
-0.4685298204421997,
0.02073000557720661,
-0.4020595848560333,
0.22792275249958038,
1.2064805030822754,
0.3505842089653015,
0.5955096483230591,
0.07190963625907898,
0.3452341854572296,
0.11177138984203339,
0.30970844626426697,
... |
def collect ( self, default _ dtype = np. float32, verbose : bool = false ) : if not verbose : return make _ batch ( list ( self ), default _ dtype = default _ dtype ) else : return make _ batch ( list ( tqdm ( self ) ), default _ dtype = default _ dtype ) | [
-0.16290181875228882,
0.9257853031158447,
0.5113493800163269,
0.8987929224967957,
0.599938154220581,
0.6623064279556274,
-0.8114275336265564,
-0.5083878636360168,
-0.2742946743965149,
0.44991403818130493,
0.337039589881897,
0.477338045835495,
-0.19671031832695007,
0.8683972358703613,
-1.... |
def get _ free _ space ( self, device _ name, partitions ) : if device _ name = = none : return [ ] blivet _ device = self. storage. devicetree. getdevicebyname ( device _ name ) if blivet _ device. isdisk and blivet _ device. format. type! = none : free _ space = partitioning. getfreeregions ( [ blivet _ device ] ) pa... | [
0.29511022567749023,
0.2516358494758606,
1.0711708068847656,
0.29454895853996277,
-1.2830381393432617,
-0.3090267479419708,
-0.12831522524356842,
-0.41842755675315857,
0.7974697947502136,
-0.20738941431045532,
-0.2562946677207947,
-0.43412941694259644,
-0.20914337038993835,
0.2730997204780... |
def test _ 02 _ readfile ( self ) : l _ node = config _ tools. yaml ( self. m _ pyhouse _ obj ). read _ yaml ( config _ file _ name ) l _ yaml = l _ node. yaml l _ yamlsched = l _ yaml ['schedules'] # print ( prettyformatany. form ( l _ node,'f1 - 02 - a - node') ) # print ( prettyformatany. form ( l _ yaml,'f1 - 02 - ... | [
0.021593160927295685,
-0.6800505518913269,
0.6750993728637695,
-0.1402529627084732,
0.43951112031936646,
0.20967906713485718,
-0.2122802883386612,
1.024711012840271,
-0.693625807762146,
-0.3039886951446533,
0.04721001908183098,
0.20307126641273499,
0.8844631314277649,
0.3104495406150818,
... |
def visible ( self ) : return self. _ _ visible | [
-0.2649485170841217,
-0.7646047472953796,
0.521078884601593,
-0.5618748068809509,
-0.8274648785591125,
1.2255349159240723,
0.5424156188964844,
-0.18830762803554535,
0.04101230204105377,
0.3484513759613037,
-0.8021442294120789,
0.7758497595787048,
-0.11798369884490967,
-0.3821078836917877,
... |
def precision ( y _ true, y _ prediction ) : true _ positives = k. sum ( k. round ( k. clip ( y _ true * y _ prediction, 0, 1 ) ) ) predicted _ positives = k. sum ( k. round ( k. clip ( y _ prediction, 0, 1 ) ) ) ret _ precision = true _ positives / ( predicted _ positives + k. epsilon ( ) ) return ret _ precision | [
0.9499520659446716,
-0.9953581094741821,
0.7557166814804077,
0.4778555631637573,
-0.24323944747447968,
0.09874263405799866,
-0.7056498527526855,
0.843448281288147,
-0.8185655474662781,
1.0833327770233154,
0.6378567814826965,
-0.379250705242157,
0.6008982062339783,
-0.15099674463272095,
1... |
def feed _ into _ layer ( self, x, layer ) : return self. layers ( ) [ layer ]. feed ( x ) | [
0.13913507759571075,
0.05697491392493248,
0.33997637033462524,
-0.17650270462036133,
0.1443505436182022,
0.18148119747638702,
-0.953900933265686,
-1.2554994821548462,
-0.5264183878898621,
-0.6246830821037292,
-0.7901488542556763,
1.571555733680725,
-0.3095851242542267,
0.04964138939976692,... |
def get _ computed _ fields ( self, device : str ) - > dict [ str, dict [ str, str ] ] : inverted _ regs = self. config [ " devices " ] [ device ] [ " computed _ fields " ] return inverted _ regs | [
-1.2071707248687744,
1.2562071084976196,
0.3640975058078766,
-0.7254729270935059,
-0.3461321294307709,
0.16155394911766052,
0.3014964163303375,
-0.2413623332977295,
-0.9585487842559814,
-0.3975156247615814,
-1.860830545425415,
0.13981567323207855,
-0.22054854035377502,
-0.23725290596485138... |
def check _ if _ user _ logged _ in ( ) : # check if current user has a logged in session if " user _ email " in session : return true return false | [
0.38836872577667236,
-0.8467816710472107,
0.4350823163986206,
1.0090090036392212,
0.04204528406262398,
-0.08165447413921356,
0.7871269583702087,
0.5010016560554504,
0.08772996068000793,
-0.27439817786216736,
-0.34747442603111267,
0.5036844611167908,
-0.011158127337694168,
-0.84492564201354... |
def best9items ( values ) : negvalues = [ - x for x in values ] order = np. argsort ( negvalues ) highest9 = order [ : 9 ] return [ index + 1 for index in highest9 ] | [
-0.2238977551460266,
0.04540078714489937,
0.621300220489502,
0.8773400783538818,
0.17081832885742188,
0.9493035078048706,
-0.14891937375068665,
0.2744440734386444,
0.37034669518470764,
-0.48977065086364746,
-0.3849511742591858,
0.1122182086110115,
0.18569517135620117,
0.048917319625616074,... |
def find _ diversity _ score ( house _ colour, neighbour _ dict ) : b = neighbour _ dict. get ( blu, emp ) r = neighbour _ dict. get ( red, emp ) if house _ colour = = blu : ds = r / 8 elif house _ colour = = red : ds = b / 8 else : raise valueerror return ds | [
-0.17260126769542694,
0.2580103278160095,
0.5840049386024475,
-0.4242520332336426,
1.200168251991272,
0.1974407434463501,
-0.17655985057353973,
0.14900515973567963,
0.07925921678543091,
0.13947325944900513,
0.9580761194229126,
0.5277820229530334,
0.04236714169383049,
1.656003713607788,
0... |
def test _ noobaa _ service _ mon _ after _ ocs _ upgrade ( ) : ocs _ version = version. get _ ocs _ version _ from _ csv ( only _ major _ minor = false, ignore _ pre _ release = true ) if ocs _ version < = version. get _ semantic _ version ( " 4. 7. 4 " ) : pytest. skip ( " the test is not supported on version less th... | [
-0.3482540547847748,
-0.3509923219680786,
0.6788922548294067,
0.15093059837818146,
1.1629019975662231,
0.6622397303581238,
-0.22034689784049988,
-1.465909481048584,
0.5302659869194031,
0.05468421429395676,
-0.21370908617973328,
-0.01637352630496025,
-0.481107234954834,
0.23070822656154633,... |
async def mark _ service _ for _ removal ( self, node _ uuid : nodeid, can _ save : optional [ bool ] ) - > none : async with self. _ lock : if node _ uuid not in self. _ inverse _ search _ mapping : raise dynamicsidecarnotfounderror ( node _ uuid ) service _ name = self. _ inverse _ search _ mapping [ node _ uuid ] if... | [
-1.0617982149124146,
0.06554608047008514,
0.5344944000244141,
-0.5305548906326294,
0.2149123251438141,
-0.24407242238521576,
-0.13604435324668884,
0.21135739982128143,
-0.3631111681461334,
0.5246094465255737,
0.044441159814596176,
0.8316633105278015,
-0.23394350707530975,
0.036893855780363... |
def create ( env _ dir, system _ site _ packages = false, clear = false, symlinks = false, with _ pip = false, prompt = none, ) : builder = extendedenvbuilder ( system _ site _ packages = system _ site _ packages, clear = clear, symlinks = symlinks, with _ pip = with _ pip, prompt = prompt, ) builder. create ( env _ di... | [
0.25792691111564636,
0.6707271933555603,
0.5052962899208069,
0.8944302797317505,
-0.41152361035346985,
0.311472088098526,
0.20645159482955933,
0.4002799689769745,
1.2525509595870972,
-0.33546602725982666,
-0.6387605667114258,
0.11655092984437943,
-0.013941948302090168,
0.6353645920753479,
... |
def process _ record ( self, record, archive ) : # get the full record by querying the database... _ full _ record = self. get _ record ( record, archive ) #... convert to us if necessary... _ us _ record = weewx. units. to _ us ( _ full _ record ) #... get the login and packet strings... _ tnc _ packet = self. get _ t... | [
-0.188162699341774,
0.50718092918396,
0.5362935066223145,
-0.19737356901168823,
0.22289717197418213,
-0.7711321711540222,
-0.6134058833122253,
0.07092604786157608,
0.7313454151153564,
-0.17538684606552124,
-0.47182467579841614,
0.5156709551811218,
0.5333377718925476,
0.2995440363883972,
... |
def get _ raw _ space _ domain ( self ) : return self. space _ domain | [
-0.3980199694633484,
-0.06483626365661621,
0.2145785540342331,
0.0698651373386383,
-0.6698517203330994,
0.8902920484542847,
-0.25961336493492126,
-0.3202870786190033,
1.051885962486267,
-1.4162815809249878,
-0.2516215145587921,
2.174158811569214,
0.680063009262085,
0.19336944818496704,
-... |
def test _ 404 _ update _ task _ of _ other _ people ( self ) : team2 = teamfactory ( name = " other _ team " ) profile2 = profilefactory ( team = team2 ) task2 = taskfactory ( creator = profile2. user ) self. url = reverse ( " tasks : update _ task ", kwargs = { " pk " : task2. pk } ) response = self. client. post ( s... | [
0.04296423867344856,
0.2563389241695404,
0.9371172189712524,
1.1842503547668457,
0.08350095897912979,
1.2695486545562744,
1.2345954179763794,
-0.4676394462585449,
-0.775273859500885,
0.18355369567871094,
-1.0146698951721191,
0.09913899004459381,
0.21549175679683685,
0.07359791547060013,
... |
def _ _ str _ _ ( self ) : return str ( self. _ _ dict _ _ ) | [
-0.40144872665405273,
-1.8444989919662476,
0.6255778670310974,
-1.6419473886489868,
-0.9026045799255371,
0.7143185138702393,
-0.4099767208099365,
-0.3990103006362915,
0.3118273913860321,
-0.28203001618385315,
0.7452816963195801,
0.7628031373023987,
0.592696487903595,
-0.43232521414756775,
... |
def unique _ groups ( ) : ugroup = [ ] for chan, stats in chanstats. items ( ) : if not stats ['group'] in ugroup : ugroup. append ( stats ['group'] ) return ugroup | [
-0.136137917637825,
0.6730901002883911,
0.33138027787208557,
-0.5339379906654358,
0.29830658435821533,
-0.08959956467151642,
0.02301633730530739,
-0.8178922533988953,
0.6439112424850464,
-0.18095840513706207,
-0.2405206263065338,
0.8504902124404907,
-0.223410502076149,
0.3511638939380646,
... |
def optimizer ( self ) : if self. _ optimizer is none : self. _ optimizer = tf. train. gradientdescentoptimizer ( learning _ rate = self. lr ) return self. _ optimizer | [
1.0331034660339355,
0.5813822746276855,
0.5131918787956238,
-0.45260539650917053,
0.5366234183311462,
-0.15393342077732086,
-0.27428704500198364,
0.19350683689117432,
-0.24784022569656372,
-0.9433582425117493,
0.126295268535614,
0.26042652130126953,
-0.6683562397956848,
-0.3069261312484741... |
def get _ data ( url, ext ) : url _ hash = hashlib. sha224 ( url. encode ( ) ). hexdigest ( ) filename = url _ hash [ : 7 ] + '.'+ ext try : if os. path. exists ( filename ) : print ('file already present') return filename else : print ('downloading ', filename ) request. urlretrieve ( url, filename ) # for data that i... | [
0.2537056505680084,
-0.7518244981765747,
1.0111702680587769,
0.46393850445747375,
-0.14786383509635925,
-0.47551390528678894,
-0.34587419033050537,
0.5153847932815552,
0.5906036496162415,
-0.2884312570095062,
-0.1398630142211914,
-0.3458419144153595,
-0.036199185997247696,
0.07636402547359... |
def test _ holder ( self ) : self. assertequal ( self. holder. id ( ), self. description ) self. assertequal ( self. holder. shortdescription ( ), self. description ) | [
0.4718022346496582,
-0.9827658534049988,
0.10513213276863098,
-0.13719922304153442,
0.8715346455574036,
1.5276297330856323,
-0.4301377832889557,
0.13598687946796417,
0.4092429578304291,
-1.2361323833465576,
0.31496477127075195,
0.8925539255142212,
-0.11188728362321854,
0.5406756401062012,
... |
def get _ silos ( slave _ name ) : if not slave _ name : return none for silos _ name in slave _ silos : for pat in slave _ silos [ silos _ name ] : if pat. match ( slave _ name ) : return silos _ name return none | [
0.6009824275970459,
-1.0152065753936768,
0.5571500062942505,
0.3135852515697479,
-1.030892014503479,
-0.3862038850784302,
0.590886652469635,
-0.06779836118221283,
0.3475813567638397,
0.6774682402610779,
-0.6961299180984497,
0.31847381591796875,
0.2420032024383545,
-0.02428770624101162,
0... |
def generate _ stat _ indices ( stat, num _ sets, nstats = none ) : if stat = = " f2 " : indices = random _ filtered _ samples ( lambda x : x [ 0 ] < x [ 1 ], x = range ( num _ sets ), k = 2, n = nstats, replace = false ) elif stat = = " f3 " : indices = random _ filtered _ samples ( lambda x : x [ 1 ] < x [ 2 ], x = r... | [
-0.4466908872127533,
0.28999966382980347,
0.7006453275680542,
0.024530595168471336,
-1.2545924186706543,
0.19415049254894257,
0.8736661672592163,
-0.9189764857292175,
0.6787144541740417,
-0.010071267373859882,
-0.053397469222545624,
0.2928106486797333,
0.6935339570045471,
-0.15886068344116... |
def is _ signature _ valid ( self, other _ signature ) : expected _ signature = self. sign _ data ( ) return constant _ time _ compare ( expected _ signature, other _ signature ) | [
-0.5582466125488281,
-0.012540748342871666,
0.594915509223938,
0.9969791173934937,
-0.21298475563526154,
0.21768951416015625,
-0.3595339357852936,
-0.27785491943359375,
-0.05499757453799248,
0.8494510650634766,
-0.6660100221633911,
-0.3499356806278229,
-0.00851660780608654,
0.5491660237312... |
def forward ( self, x ) : m1, w1, w2, b2 = self. weights x _ shape = x. shape x = jnp. reshape ( x, [ - 1, x _ shape [ - 1 ] ] ) # easier to operate on flattened x. # q : check if we need bias and / or put relu after the m1 dot? mask _ logits = jnp. dot ( x, m1 ) # softmax. mask _ logsumexp = fastmath. logsumexp ( mask... | [
0.10109399259090424,
-0.02803182415664196,
0.8658727407455444,
0.35888707637786865,
-0.6599255800247192,
0.13181084394454956,
0.4497676491737366,
-0.3807188868522644,
0.5680904388427734,
-0.3490905165672302,
0.09405015408992767,
0.7017807960510254,
0.5840016007423401,
0.14329777657985687,
... |
def get _ temp _ settings ( self ) : msg = self. device. send ( " get - tr - settings " ) if msg. iserror ( ) : raise exception ( msg. geterror ( ) ) return { " temp _ set " : msg. getdoubleparam ( 0 ), " temp _ min " : msg. getdoubleparam ( 1 ), " temp _ max " : msg. getdoubleparam ( 2 ), " state " : msg. getboolparam... | [
-1.0034635066986084,
0.9143502116203308,
0.46177759766578674,
-0.39000633358955383,
-0.24943646788597107,
-0.8421846628189087,
-0.35808101296424866,
-1.1921638250350952,
-0.8368919491767883,
1.0642526149749756,
-1.6384367942810059,
-0.15634045004844666,
-0.4107545018196106,
-0.193851411342... |
def getsubkeybyname ( self, name ) : if not self. _ registry _ key and self. _ registry : self. _ getkeyfromregistry ( ) return self. _ subkeys. get ( name. upper ( ), none ) | [
-0.20623227953910828,
0.29924124479293823,
0.4087603986263275,
0.45746928453445435,
-0.6252054572105408,
-0.0050409575924277306,
0.5561801195144653,
-1.022059679031372,
-0.07832307368516922,
0.45196396112442017,
-1.2227751016616821,
1.0958082675933838,
-0.8852501511573792,
-0.2588416934013... |
def set _ fill _ encoding _ da ( da ) : if'_ fillvalue'in da. encoding : if'missing _ value'in da. encoding : da. encoding ['missing _ value'] = da. encoding ['_ fillvalue'] else : da. encoding ['_ fillvalue'] = none return da | [
-0.5879898071289062,
0.5542680025100708,
0.3612075448036194,
-1.2280502319335938,
-1.0203803777694702,
0.13568538427352905,
0.46398404240608215,
0.028976334258913994,
0.45314663648605347,
-0.5390273928642273,
-0.4811539053916931,
0.5423039197921753,
1.6699492931365967,
0.860501229763031,
... |
def forward ( self, oc _ 1, oc _ 2, oc _ 3, os _ 1, os _ 2, os _ 3, f _ 1, f _ 2, f _ 3, b _ u, i _ t, lives, hidden, prev _ action, agent ) : # state _ dict = variable ( torch. longtensor ( state _ dict ) ) oc _ 1 = variable ( torch. longtensor ( oc _ 1 ) ) oc _ 2 = variable ( torch. longtensor ( oc _ 2 ) ) oc _ 3 = v... | [
0.0633547231554985,
0.44305646419525146,
0.8297190070152283,
-0.13360260426998138,
0.4650248885154724,
0.09702032059431076,
1.8079161643981934,
-0.14446666836738586,
0.12635007500648499,
-0.05030045658349991,
-0.4324987530708313,
-0.10674628615379333,
0.38363662362098694,
-0.40929719805717... |
def remain _ days ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " remain _ days " ) | [
0.7428736090660095,
-0.07974725216627121,
0.5664563775062561,
-0.6544724106788635,
0.4395484924316406,
1.2958396673202515,
-0.050604961812496185,
-0.5719455480575562,
0.7225258350372314,
-0.3216741979122162,
-0.1333010196685791,
0.2575078308582306,
-0.15293382108211517,
-0.774294912815094,... |
def parse _ xml ( xml ) : classes = dict ( ) ifaces = dict ( ) root = et. fromstring ( xml ) for iface in root. find ( " interfaces " ) : name = iface. attrib ['name'] implements = [ a. text for a in iface. find ( " implements " ) ] methods = [ a. text for a in iface. find ( " methods " ) ] ifaces [ name ] = iface ( na... | [
-0.41778823733329773,
-0.16185230016708374,
0.892155110836029,
-1.0352157354354858,
-1.365716814994812,
0.5104985237121582,
0.7381588816642761,
-0.39204171299934387,
1.0001009702682495,
-0.4476570188999176,
-0.21103206276893616,
-0.5945799946784973,
-0.31797024607658386,
0.0348001569509506... |
def update ( self, instance : film _ schedule, validated _ data ) : instance. id = validated _ data. get ('id ', instance. id ) instance. film _ id = validated _ data. get ('film _ id ', instance. film _ id ) instance. hall _ id = validated _ data. get ('hall _ id ', instance. hall _ id ) # instance. price = validated ... | [
-1.0142194032669067,
-1.3248182535171509,
0.7243008017539978,
-0.5360100269317627,
-1.0422754287719727,
0.45392829179763794,
-0.523052990436554,
0.4210333824157715,
0.4971482753753662,
0.5666901469230652,
-1.2917574644088745,
0.07039917260408401,
-0.5426421761512756,
-0.41032978892326355,
... |
def test _ delete _ alumno _ admin ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) id _ alumno = self. alumno _ 2. pk response = self. client. delete ( f " / api / alumnos / { id _ alumno } / " ) self. assertequal ( response. status _ code, status. http _ 200 _ ok ) | [
0.6015117168426514,
-0.0732601135969162,
0.3358944058418274,
0.4705562889575958,
0.688439667224884,
1.1795498132705688,
-0.07673057913780212,
-0.18815426528453827,
0.4749659299850464,
-0.08264057338237762,
-0.8253365159034729,
1.8492447137832642,
0.8244204521179199,
-0.4089231789112091,
... |
def parsecontenttype ( value ) : try : if isinstance ( value, unicode ) : value. encode ('us - ascii') else : value. decode ('us - ascii') except ( attributeerror, unicodeerror ) : return none try : typere, pairre, stripre = parsecontenttype. _ regexps except attributeerror : import re # a bit more lenient than rfc 204... | [
0.9423447847366333,
-1.2536988258361816,
0.8937191367149353,
-0.9683820009231567,
-1.34562349319458,
-1.434489369392395,
0.2170240879058838,
-0.8278355002403259,
-0.09895283728837967,
0.47636401653289795,
-0.4534251391887665,
0.002369123976677656,
-0.7433574199676514,
0.06967997550964355,
... |
def clear _ first _ arg _ caches ( ) : for cache in _ first _ arg _ dependent _ caches : cache. clear ( ) | [
-0.13264426589012146,
0.14321240782737732,
0.38110828399658203,
0.8085089921951294,
0.6463268995285034,
0.8839614391326904,
0.5466063022613525,
-1.0106842517852783,
-0.7653788924217224,
0.716995894908905,
-0.34272846579551697,
0.3734196722507477,
0.44774752855300903,
1.259521245956421,
-... |
def was _ domain _ created _ after ( domain, checkpoint ) : from corehq. apps. domain. models import domain domain _ obj = domain. get _ by _ name ( domain ) return ( domain _ obj is not none and domain _ obj. date _ created is not none and domain _ obj. date _ created > checkpoint ) | [
0.7602056860923767,
0.6098722219467163,
0.3395005762577057,
1.1802394390106201,
0.46134042739868164,
0.589368999004364,
0.28808143734931946,
-0.4059191644191742,
-0.10675268620252609,
-0.8447592258453369,
-0.5880679488182068,
-0.2912779450416565,
1.1319433450698853,
0.7494421601295471,
-... |
def _ load _ task ( self, files ) : # from 3xk to kx3 left _ files = files [ 0 ] right _ files = files [ 1 ] gt _ files = files [ 2 ] # read images left _ task _ samples = tf. map _ fn ( read _ image _ from _ disc, left _ files, dtype = tf. float32, parallel _ iterations = self. _ sequence _ length ) left _ task _ samp... | [
-0.5620716214179993,
-0.04027881845831871,
0.9433022737503052,
-0.1428709179162979,
-0.33346647024154663,
0.3264610469341278,
0.3701380789279938,
0.1088968962430954,
-0.33933910727500916,
0.9415326714515686,
-0.23593862354755402,
-0.4998391568660736,
0.8792030215263367,
0.501289963722229,
... |
def users _ delete ( user _ id ) : users = storage. get ( " user ", user _ id ) if users is none : abort ( 404 ) storage. delete ( users ) storage. save ( ) return ( jsonify ( { } ) ) | [
-0.6298431158065796,
-0.34621235728263855,
0.40364786982536316,
0.7240070104598999,
0.43928802013397217,
-0.986503541469574,
0.44895461201667786,
-0.19757892191410065,
0.6855649352073669,
0.479628324508667,
-0.7858086228370667,
0.13025224208831787,
0.2077653408050537,
0.6468085646629333,
... |
def aff _ hellinger ( means, covars ) : aff _ table = np. empty ( [ means. shape [ 0 ], means. shape [ 0 ] ] ) # iterate through the components for i, ( mean _ 1, covar _ 1 ) in enumerate ( zip ( means, covars ) ) : # find the probability for every mean point in the current component for j, ( mean _ 2, covar _ 2 ) in e... | [
0.013241579756140709,
-0.21570663154125214,
0.6832876801490784,
-0.19890126585960388,
0.4146650731563568,
-0.07803619652986526,
0.2038835734128952,
0.43090346455574036,
-1.110229730606079,
1.4704726934432983,
0.9515010714530945,
0.8975471258163452,
0.4371088445186615,
0.5732842087745667,
... |
def edit _ menu _ option ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': stylist _ option = stylistmenu. objects. get ( pk = request. post. get ('stylist _ option _ pk') ) # todo : why did i do this? if stylist _ option. modified _ global _ id > = 1 : stylist _ option. price = reque... | [
-1.095875859260559,
-0.31596657633781433,
0.5243730545043945,
0.9086188077926636,
-0.14320853352546692,
0.18538640439510345,
0.06275773793458939,
0.676691472530365,
0.09792614728212357,
0.7912358641624451,
-0.3696376383304596,
-0.03220149129629135,
-0.1757989227771759,
0.49813249707221985,... |
def get _ file _ samples ( file _ ids ) : assert isinstance ( file _ ids, iterable ) # query tcga api to get sample barcodes associated with file ids payload = { " filters " : json. dumps ( { " op " : " in ", " content " : { " field " : " files. file _ id ", " value " : list ( file _ ids ), } } ), " fields " : " file _... | [
0.2129039615392685,
-0.04583873972296715,
0.2932136058807373,
-0.6003199219703674,
0.22697845101356506,
-0.7274035215377808,
-0.005787378177046776,
-0.26428189873695374,
-1.0913281440734863,
0.007474224548786879,
0.4087110459804535,
0.4889506697654724,
-0.568326473236084,
1.128592610359192... |
def inputs ( train = none, batch _ size = none, num _ epochs = none, \ use _ train = true, use _ ivar = false ) : if not num _ epochs : num _ epochs = none if use _ train : if use _ ivar : filenames = [ os. path. join ( flags. data _ dir,'train _ 3k _ ivar. tfrecords') ] else : filenames = [ os. path. join ( flags. dat... | [
-0.13033242523670197,
0.7778661847114563,
0.7018125057220459,
0.3007791340351105,
0.22432933747768402,
0.0387030765414238,
0.7478306293487549,
0.3336203396320343,
-0.358930766582489,
0.6690689325332642,
-0.0014552135253325105,
0.06315018981695175,
0.21694402396678925,
-0.2987949550151825,
... |
def deploy ( ctx ) : build ( ctx ) os. system ( " hexo deploy " ) | [
0.36831381916999817,
-0.36109429597854614,
0.311912477016449,
0.7023144364356995,
1.0085464715957642,
1.2335840463638306,
0.0016863086493685842,
1.5613418817520142,
-0.7454297542572021,
-0.46282368898391724,
-0.4357268214225769,
0.2604126036167145,
0.22308677434921265,
0.7801520228385925,
... |
def escape _ chars ( string, chars, escape ='\ \') : for ch in chars : string = string. replace ( ch, escape + ch ) return string | [
-0.22297526895999908,
-0.152272567152977,
-0.04152488335967064,
-0.12214488536119461,
-0.2400330752134323,
-0.7418122887611389,
-0.838750958442688,
0.2655990421772003,
-0.8337880373001099,
0.3051745593547821,
-0.9186485409736633,
0.7175101041793823,
-0.058777857571840286,
-1.27152431011199... |
def _ _ init _ _ ( self, behavior _ activity, activity _ definition = 0, predefined _ problem = none, robot _ type = behaviorrobot, robot _ config = { }, ) : super ( ). _ _ init _ _ ( behavior _ activity, activity _ definition = activity _ definition, scene _ path = os. path. join ( igibson. ig _ dataset _ path, " scen... | [
0.5581621527671814,
0.3085610866546631,
0.4225037693977356,
0.6046136021614075,
0.4775335192680359,
0.14747579395771027,
0.3723430037498474,
0.2069173902273178,
0.33507680892944336,
0.09162652492523193,
0.18159376084804535,
0.8800743818283081,
-0.29371562600135803,
0.15683729946613312,
0... |
def divmod _ njit ( df ) : @ njit def _ fix _ time ( mtime ) : time _ out = np. empty ( mtime. shape ) for i in range ( mtime. shape [ 0 ] ) : aux, cent = divmod ( mtime [ i ], 100 ) aux, seconds = divmod ( aux, 100 ) hours, minutes = divmod ( aux, 100 ) time _ out [ i ] = 10 * ( cent + 100 * ( seconds + 60 * ( minutes... | [
-0.6166144609451294,
0.4860638678073883,
0.7418597936630249,
-0.37803250551223755,
-0.26487287878990173,
-0.3801182210445404,
-0.06214895471930504,
-0.47250357270240784,
-0.16987912356853485,
0.7439684271812439,
-0.07195636630058289,
0.2787701189517975,
0.736015260219574,
0.990516543388366... |
def _ request ( self, method, endpoint, params, verify _ certs = true ) : encoded _ token = jwt. encode ( {'iat': calendar. timegm ( time. gmtime ( ) ) }, self. secret, algorithm ='hs512 ', ) headers = {'authorization':'bearer % s'% encoded _ token } endpoint _ uri ='% s / api / v % d / % s'% ( self. uri, self. version... | [
-0.6404282450675964,
-0.07190307229757309,
0.6330068111419678,
0.5963621735572815,
0.7077141404151917,
-0.6399836540222168,
-1.2413591146469116,
-0.6363570690155029,
0.1808764487504959,
0.30480700731277466,
0.5932639837265015,
0.7640291452407837,
-0.2046583592891693,
-0.24797558784484863,
... |
def check _ plot _ existance ( msid, catg, dtype, mtype, ptype ) : if ptype = ='static': ppart ='_ static _'else : ppart ='_ inter _'cfile = web _ dir + catg +'/'+ msid. capitalize ( ) +'/'+ msid +'_'+ mtype cfile = cfile + ppart + dtype +'_ plot. html'if os. path. isfile ( cfile ) : return cfile else : return false | [
0.48325371742248535,
-0.16078683733940125,
0.5209755897521973,
-0.54179847240448,
-0.4746014475822449,
1.0178828239440918,
0.8408970832824707,
0.22722558677196503,
-0.7896643280982971,
0.5589819550514221,
0.830961287021637,
0.6044133305549622,
-0.26830458641052246,
0.3823997676372528,
0.... |
def material _ spec ( self, material _ spec ) : self. _ material _ spec = material _ spec | [
0.5302305817604065,
-0.9555099010467529,
-0.11714553087949753,
-0.2511039972305298,
0.180933877825737,
0.9412760138511658,
-0.3252183496952057,
1.0880780220031738,
-0.5478820204734802,
0.2065700888633728,
0.023942016065120697,
-0.20562401413917542,
0.8906912207603455,
0.7862437963485718,
... |
def _ populatetable ( self ) : # sorting needs to be disabled here or bad things happen when loading a new har file self. app. entries _ table. setsortingenabled ( false ) column _ details = self. app. config. getconfig ('table _ columns') column _ details = sorted ( column _ details. items ( ), key = lambda column : c... | [
0.231048122048378,
0.4453854560852051,
0.6756859421730042,
-0.48915132880210876,
0.6358866691589355,
0.41517555713653564,
0.09905035048723221,
-0.05954738333821297,
-1.0480536222457886,
-0.09434129297733307,
0.7093883752822876,
-0.7551008462905884,
0.8759599328041077,
0.9066030979156494,
... |
def solve _ poisson ( den ) : # integrate forward from 0 + eps to rmax with y ( t ) = w ( r ) = r * v _ h ( r ) sol = solve _ ivp ( lambda t, y : poisson ( t, y, den ), [ tmin, tmax ], # use initial value w ( 0 ) = 0 and w'( r ) = ( 2r + 1 ) * e ^ ( - 2r ) - - > w'( 0 ) = 1 [ 0, 1 ], t _ eval = np. linspace ( tmin, tma... | [
-0.028876371681690216,
0.042220212519168854,
0.6929550170898438,
-0.4273451864719391,
-0.11151210963726044,
-0.38361430168151855,
-0.06806141883134842,
-0.11177538335323334,
-0.596032440662384,
0.6656524538993835,
-0.22728851437568665,
-0.3602046072483063,
-0.8110835552215576,
-0.871727705... |
def extend ( self, routes : typing. list [ baseroute ] ) - > none : # type : ignore return superclass ( routeregistermixin, self ). extend ( routes ) | [
-0.5629563927650452,
1.1089744567871094,
0.5151997804641724,
1.1002748012542725,
1.281240701675415,
0.17141619324684143,
-1.0745165348052979,
1.2150987386703491,
1.205673098564148,
-0.9276989698410034,
-1.016148567199707,
0.08825688064098358,
-0.2873932421207428,
1.1886231899261475,
-0.0... |
def _ _ init _ _ ( self, cell ) : if not isinstance ( cell, rnncell ) : raise typeerror ( " the parameter cell is not a rnncell. " ) self. _ cell = cell | [
-0.18765991926193237,
1.2626765966415405,
0.22680801153182983,
0.41850486397743225,
-0.04929554462432861,
0.043229494243860245,
0.9340412616729736,
-0.708111047744751,
0.649796724319458,
0.04611137509346008,
-0.285241961479187,
0.47455716133117676,
-0.21111664175987244,
1.2442299127578735,... |
def test _ connection ( self ) : connection _ data = {'user _ id': str ( self. user. id ) } response = self. client. post ( self. url, connection _ data ) self. assertequal ( 201, response. status _ code ) | [
0.11667576432228088,
0.08682165294885635,
0.3950157165527344,
1.0071498155593872,
0.5611254572868347,
1.1205718517303467,
-0.8618286848068237,
0.2207426130771637,
-0.34422391653060913,
-0.7264498472213745,
-0.29777151346206665,
-0.2066788375377655,
-0.3108295202255249,
-0.11618456989526749... |
def client _ id ( self ) - > optional [ str ] : return pulumi. get ( self, " client _ id " ) | [
1.329727292060852,
-0.12725406885147095,
0.16704580187797546,
0.3146606981754303,
1.1898093223571777,
1.2516266107559204,
0.35955607891082764,
-0.3506942689418793,
0.7989603877067566,
-0.21780438721179962,
0.517254114151001,
1.3138121366500854,
0.17771105468273163,
-1.2489089965820312,
-... |
def distance _ from ( self, x1, y1, z1 ) : return sqrt ( ( self. x - x1 ) * * 2 + ( self. y - y1 ) * * 2 + ( self. z - z1 ) * * 2 ) | [
0.5726334452629089,
-0.9688688516616821,
0.5943363308906555,
0.29021722078323364,
-0.13267478346824646,
0.8727602362632751,
0.03251742944121361,
0.379805326461792,
-0.017184099182486534,
0.3271382749080658,
-0.6499513387680054,
0.16344277560710907,
-0.8016393780708313,
-0.820448100566864,
... |
def interactive _ arguments ( self, args : namespace ) : pass | [
-0.2306874543428421,
-0.39466241002082825,
0.07021705061197281,
0.1663343459367752,
1.3219468593597412,
-0.14980019629001617,
0.43344438076019287,
-0.5231992602348328,
-0.11319314688444138,
0.047080494463443756,
-0.23928330838680267,
1.1263470649719238,
-0.6970970034599304,
0.1702795326709... |
def ispointinbetween ( self, pntfirst, pntsecond, pnttest ) : if ( pntfirst. getx ( ) = = pnttest. getx ( ) or pntsecond. getx ( ) = = pnttest. getx ( ) ) : return true line _ slope = abs ( ( pntsecond. gety ( ) - pntfirst. gety ( ) ) / ( pntsecond. getx ( ) - pntfirst. getx ( ) ) ) test _ slope _ start = abs ( ( pntfi... | [
0.5729484558105469,
-1.3662314414978027,
0.9098765254020691,
-0.052575159817934036,
0.16448067128658295,
1.0999329090118408,
-0.04394593834877014,
-1.0106264352798462,
-0.8775153160095215,
-0.7225819826126099,
-0.23865389823913574,
-0.08640563488006592,
-0.9528003931045532,
-0.229706510901... |
def added _ members ( self, target ) : # type : ( udmofficegroup ) - > set [ str ] added, _ = self. members _ changes ( target ) return added | [
-0.9201958179473877,
0.023951327428221703,
0.35579821467399597,
-0.8241431713104248,
0.2766849398612976,
-0.6227560639381409,
-1.0748767852783203,
-0.9972888827323914,
0.10429677367210388,
-0.11271796375513077,
-0.5024561285972595,
0.7972063422203064,
-0.42525339126586914,
-0.1078271195292... |
def is _ cache _ valid ( self ) : if os. path. isfile ( self. cache _ path _ cache ) : mod _ time = os. path. getmtime ( self. cache _ path _ cache ) current _ time = time ( ) if ( mod _ time + self. cache _ max _ age ) > current _ time : if os. path. isfile ( self. cache _ path _ inventory ) : return true return false | [
-1.2105671167373657,
-0.5369666218757629,
0.8312310576438904,
0.7718507647514343,
-0.5374897122383118,
1.0905494689941406,
-0.5487608909606934,
0.6215808391571045,
-0.2683621048927307,
0.5406255722045898,
0.48583492636680603,
0.11551950126886368,
-0.21977901458740234,
0.3158162832260132,
... |
def unload _ model ( self, model _ name : str, headers : dict [ str, t. any ] =..., unload _ dependents : bool =..., ) - > none : | [
-1.2359899282455444,
0.32430917024612427,
0.5419076085090637,
-0.6746386885643005,
-0.8176815509796143,
-0.05078921094536781,
-0.2628755271434784,
-0.16581247746944427,
-1.0394240617752075,
0.25637897849082947,
-0.7676661014556885,
-0.32876718044281006,
0.5279011726379395,
-0.8287883996963... |
def _ map _ single ( self, function : optional [ callable ] = none, with _ indices : bool = false, input _ columns : optional [ union [ str, list [ str ] ] ] = none, batched : bool = false, batch _ size : optional [ int ] = 1000, drop _ last _ batch : bool = false, remove _ columns : optional [ list [ str ] ] = none, k... | [
-0.42557206749916077,
0.46418946981430054,
0.9742467403411865,
0.02117735892534256,
-0.7523912787437439,
-0.23767639696598053,
0.1966574639081955,
0.7509555220603943,
-0.10872884094715118,
0.024771636351943016,
0.5185415148735046,
0.5478160381317139,
0.43118777871131897,
-0.412137389183044... |
def test _ missing _ date ( self ) : # do not provide an ` ` end _ date ` ` value form = self. form _ data ( start _ date = " 2020 - 06 - 27 ", end _ date = " ", note = " some note content from test ", slack _ channel = " # slack ", project _ type = self. project _ type. pk, client = self. client. pk, ) errors = form [... | [
-0.09540630131959915,
0.7267217636108398,
0.415771484375,
-0.6246020197868347,
0.9854230880737305,
1.278743863105774,
-0.543928861618042,
0.20271441340446472,
-0.8298075199127197,
-0.4887772798538208,
-0.5994130969047546,
0.6354091167449951,
0.026395659893751144,
0.9511919021606445,
0.02... |
def to _ string ( self ) : # from ykdef. h : # # / / frame structure # # define slot _ data _ size 64 # typedef struct { # unsigned char payload [ slot _ data _ size ] ; # unsigned char slot ; # unsigned short crc ; # unsigned char filler [ 3 ] ; # } ykframe ; filler ='' return struct. pack ('< 64sbh3s ', self. payload... | [
0.941387951374054,
0.09853851050138474,
0.5805224776268005,
-0.2252221703529358,
-0.36018070578575134,
-0.05282432585954666,
-0.3391677439212799,
-0.9056712985038757,
0.4148833155632019,
-0.5325932502746582,
-0.02303021028637886,
0.42337244749069214,
-0.08303792774677277,
0.197710856795310... |
def set _ cache _ only ( self, cache _ only ) : self. cache _ only = cache _ only | [
0.1554352194070816,
0.035873014479875565,
0.23538805544376373,
0.8850522041320801,
-0.41016751527786255,
1.4088972806930542,
0.1189316138625145,
1.361199140548706,
0.11591347306966782,
-0.17269843816757202,
-0.4353327453136444,
0.7185680270195007,
0.05591301992535591,
1.1569583415985107,
... |
async def test _ set _ percent ( self ) : xknx = xknx ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", group _ address = " 1 / 2 / 3 ", value _ type = " percent " ) await expose _ sensor. set ( 75 ) assert xknx. telegrams. qsize ( ) = = 1 telegram = xknx. telegrams. get _ nowait ( ) assert telegram = = telegr... | [
0.008806858211755753,
1.2720253467559814,
0.5400075316429138,
0.16902703046798706,
-0.18511909246444702,
0.567236065864563,
-0.21656551957130432,
-0.9579327702522278,
0.2288256734609604,
0.16475707292556763,
-0.15637485682964325,
-0.33894282579421997,
-0.31083783507347107,
-0.2497637420892... |
def test _ create _ follow _ notification _ via _ signal ( self ) : self. follow. save ( ) self. assertequal ( notification. objects. count ( ), 1 ) self. assertequal ( str ( notification. objects. get ( ) ), f'{ self. user. display _ name } is now following you') | [
0.5678721070289612,
-0.06422539055347443,
0.26652422547340393,
0.9519692659378052,
0.3665075898170471,
1.351978063583374,
0.3930508494377136,
-0.6932728886604309,
-0.14763027429580688,
-0.06151484698057175,
-2.349924325942993,
-0.20555292069911957,
0.278653621673584,
0.7060785293579102,
... |
def get _ page ( src : pdffilereader, page _ num : int ) - > str : page = src. getpage ( page _ num ) return page. extracttext ( ) | [
0.09718476235866547,
-0.4061453342437744,
0.6271005272865295,
-0.2613394260406494,
-0.24614010751247406,
-1.0134148597717285,
-0.6558949947357178,
-0.12612469494342804,
0.03549248352646828,
0.199951171875,
1.4304242134094238,
-0.6916982531547546,
-0.09961912035942078,
-0.8432786464691162,
... |
def _ usage _ and _ exit ( status = none ) : if status : stream = sys. stderr else : stream = sys. stdout print ('usage : \ n'' { } api - key [ [ - o | - - overwrite ] directory... ] '. format ( sys. argv [ 0 ] ), file = stream ) sys. exit ( status ) | [
-0.5003946423530579,
-0.4423821270465851,
0.7269733548164368,
-0.19706761837005615,
0.10809120535850525,
-0.5699755549430847,
0.45701876282691956,
0.5225521922111511,
-0.1617618054151535,
0.25842344760894775,
0.7860694527626038,
0.3766207695007324,
0.1472516804933548,
1.1959949731826782,
... |
def is _ mapping ( self ) - > bool : return isinstance ( self. yaml _ node, yaml. mappingnode ) | [
-0.5897384285926819,
0.6146484017372131,
0.6485196948051453,
0.5791705846786499,
-0.5939124822616577,
-0.1261570304632187,
-0.01702183671295643,
0.8168882727622986,
1.4143637418746948,
0.036733802407979965,
0.17192019522190094,
0.9554256200790405,
0.1330733448266983,
0.3965599238872528,
... |
def favor ( d _ feature, n _ heads = 1, n _ random _ features = 256, dropout = 0. 0, numerical _ stabilizer = 0. 001, use _ approximate _ softmax = false, scale _ by _ norm = 0, normalize _ data = false, epsilon = 0. 0001, mode ='train') : del dropout # not implemented yet but needed in the api return tl. configurablea... | [
-0.33757203817367554,
0.5291704535484314,
0.623932421207428,
0.06981109827756882,
-0.5414913892745972,
-0.5018238425254822,
0.25571805238723755,
-0.04439695551991463,
-0.10012665390968323,
0.5487017035484314,
0.02107572741806507,
0.16917434334754944,
0.8035268783569336,
0.12297197431325912... |
def _ label _ encoder ( self ) : cleanup _ nums = { " education " : {'basic': 0,'2n cycle': 1,'graduation': 2,'master': 3,'phd': 4 }, " marital _ status " : {'married': 0,'together': 1,'divorced': 2,'widow': 3,'single': 4 } } self. rm _ df. replace ( cleanup _ nums, inplace = true ) | [
-1.3054267168045044,
0.03612141311168671,
0.4324129521846771,
-0.6379902958869934,
0.13661891222000122,
0.3046081066131592,
0.5078963041305542,
0.9296454787254333,
0.2722436487674713,
0.6033443808555603,
-0.4976809024810791,
0.17205598950386047,
0.1968848705291748,
0.09238353371620178,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.