text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def editmenuitem ( rest _ id, menu _ id ) : menuitemobj = session. query ( menuitem ). filter _ by ( id = menu _ id ). one ( ) restobj = session. query ( restaurant ). filter _ by ( id = rest _ id ). one ( ) if restobj. user _ id! = login _ session ['user _ id'] : flash ('you are not authorized to edit this menu item.'... | [
-0.4880077838897705,
-0.38444969058036804,
0.8646759390830994,
1.5685073137283325,
-0.200076624751091,
0.5279250144958496,
0.31076690554618835,
0.7101632952690125,
-0.22850766777992249,
-0.25893840193748474,
-0.29331234097480774,
-0.3702009618282318,
-0.633858323097229,
-0.0006238339119590... |
def zscore _ input ( infile, type ) : indat = np. loadtxt ( infile ) if type = ='zrange': normed = stats. zscore ( indat ) elif type = ='ones': normed = ( ( ( indat - np. min ( indat ) ) / ( np. max ( indat ) - np. min ( indat ) ) * 2 ) - 1 ) return normed | [
-0.7740928530693054,
-1.134366750717163,
0.3924597203731537,
-0.05260593444108963,
-0.7342195510864258,
0.380246639251709,
0.3412666320800781,
-0.31961217522621155,
0.04666897654533386,
0.07305930554866791,
0.12414814531803131,
0.4730369746685028,
-1.0805771350860596,
-0.2724263370037079,
... |
def inverse _ log _ det _ jacobian ( self, z ) : raise - self. forward _ log _ det _ jacobian ( self. inverse ( z ) ) | [
0.12122014909982681,
-0.41541391611099243,
0.2965274751186371,
-0.05829225108027458,
-0.8629018664360046,
0.07880375534296036,
0.797845184803009,
-0.16577887535095215,
0.03116014413535595,
0.03420133516192436,
-0.32630378007888794,
0.6814523935317993,
-0.7220356464385986,
0.497476369142532... |
def one _ hot _ embedding ( labels, num _ classes ) : y = torch. eye ( num _ classes ) return y [ labels ] | [
-0.6963796019554138,
0.20403212308883667,
0.2625621557235718,
0.5651369094848633,
0.060349736362695694,
0.8493896126747131,
-0.18312008678913116,
-0.09060055762529373,
1.1635991334915161,
0.3907623589038849,
0.6036680340766907,
-0.07356581836938858,
-0.10939091444015503,
-0.766464233398437... |
def create _ connection ( db _ file ) : conn = none try : conn = sqlite3. connect ( db _ file ) except error as e : print ( e ) return conn | [
0.6054193377494812,
-0.19393101334571838,
0.38588839769363403,
0.12699997425079346,
0.4666750431060791,
0.6191307902336121,
-0.40106311440467834,
0.04506145045161247,
-0.9879727363586426,
0.06833163648843765,
0.6059792041778564,
-0.9093747735023499,
-0.9066213965415955,
-0.1971496939659118... |
def fit _ transform ( self, train _ df, out _ model _ filename, out _ scaler _ filename ) : # add technical indicators train _ df ['sma _ 10'] = train _ df ['open']. shift ( 1 ). rolling ( 10 ). mean ( ) train _ df ['sma _ 20'] = train _ df ['open']. shift ( 1 ). rolling ( 20 ). mean ( ) train _ df ['sma _ 50'] = train... | [
-0.9103133678436279,
0.12782739102840424,
0.8320272564888,
-0.10455366224050522,
-0.431844562292099,
-0.4321538507938385,
0.20357495546340942,
0.10223735868930817,
-0.6807124018669128,
0.7233099341392517,
-0.17768506705760956,
0.6331667900085449,
0.7193413972854614,
-0.003439171938225627,
... |
def test _ isremindoremindoresult ( rclient ) : results = rclient. list _ results ( recipe _ ids = 2335 ) r = results [ 0 ] assert r. subscription _ id = = 31531 assert r. user _ id = = 4522 assert r. user _ code = = " " assert r. cluster _ ids is list ( ) assert r. area _ feedback = = " " assert r. area _ name = = " o... | [
-0.024962397292256355,
-0.25085434317588806,
0.7081241607666016,
-0.6514478921890259,
0.34615564346313477,
0.16322849690914154,
0.3004319965839386,
-0.6006131768226624,
0.512927770614624,
-0.4754177927970886,
-0.3934027850627899,
-0.17234861850738525,
-1.0668798685073853,
0.109963364899158... |
def validate _ request ( request, json _ config ) : if not isinstance ( request, utils. dicttype ) : # invalid request type fault = fault ( - 32600,'request must be a dict, not { 0 } '. format ( type ( request ). _ _ name _ _ ), config = json _ config ) _ logger. warning ( " invalid request content : % s ", fault ) ret... | [
-1.173502802848816,
0.0901695117354393,
0.8309891819953918,
-0.1853620558977127,
0.08459712564945221,
0.11288571357727051,
-0.5779309868812561,
-0.9697648286819458,
0.18556217849254608,
0.09970023483037949,
0.03732107952237129,
0.08342587947845459,
-0.7435750961303711,
0.38626083731651306,... |
def process _ section ( config, section, config _ path, verbose = false, gpg _ home = none ) : # extract fields from the section ( and write - back any missing ). if not config. has _ option ( section, src _ key ) : config. set ( section, src _ key, section ) pipeline _ src = resolve _ relative _ path ( config. get ( s... | [
-0.17975428700447083,
0.1324435919523239,
0.8451371788978577,
-0.09814039617776871,
-0.11791109293699265,
-0.3542616665363312,
0.6639341115951538,
0.15530700981616974,
-0.12307319045066833,
1.0702322721481323,
0.043619927018880844,
-0.5624681711196899,
0.8290657997131348,
0.106216639280319... |
def create _ version _ entry _ if _ needed ( volume, cfr _ part ) : version _ id = _ version _ id ( volume. year, cfr _ part ) version _ dir = entry. finalversion ( volume. title, cfr _ part ) if version _ id not in [ c. path [ - 1 ] for c in version _ dir. sub _ entries ( ) ] : ( version _ dir / version _ id ). write ... | [
0.3687456250190735,
-0.7806854248046875,
0.4284956753253937,
-0.26858240365982056,
0.8758116364479065,
0.6181760430335999,
0.2531875967979431,
-0.12217146903276443,
-0.25758597254753113,
0.35756444931030273,
-0.13940434157848358,
-0.727143406867981,
-0.34290269017219543,
0.8874940276145935... |
def make _ distribution _ plots ( f0, f1 ) : fig, axes = plt. subplots ( 2, figsize = ( 10, 8 ) ) axes [ 0 ]. set _ title ( " original distributions " ) axes [ 0 ]. plot ( f0, lw = 2, label = r " $ f _ 0 $ " ) axes [ 0 ]. plot ( f1, lw = 2, label = r " $ f _ 1 $ " ) axes [ 1 ]. set _ title ( " mixtures " ) for p in 0. ... | [
0.9277114272117615,
0.011107771657407284,
0.679414689540863,
-0.5281947255134583,
-0.7239378690719604,
0.7398499846458435,
0.5889862775802612,
0.7835289835929871,
-0.8056240677833557,
-0.7741660475730896,
0.691657543182373,
0.08069457113742828,
0.8747506737709045,
0.15275000035762787,
0.... |
def train ( self, choice1 = 0 ) : if choice1 = = 0 : # best params for synthea _ data _ train _ v1. csv clf = tree. decisiontreeclassifier ( criterion ='gini ', max _ depth = 6, min _ samples _ split = 150 ) elif choice1 = = 1 : # best params for synthea _ data _ train. csv clf = tree. decisiontreeclassifier ( criterio... | [
-0.4189704954624176,
-0.022057736292481422,
0.6051622629165649,
0.48437631130218506,
0.6462976932525635,
-0.42353329062461853,
0.4521889090538025,
0.9488424062728882,
-0.9691104292869568,
-0.08094960451126099,
-0.29087141156196594,
1.2493951320648193,
0.20824286341667175,
0.285337984561920... |
def validate _ samples _ in _ context _ of _ spec ( self ) : if not self. sample : return to _ python _ type = catalogueitem. column _ type _ to _ python _ type col _ name _ to _ type = { column _ spec ['name'] : to _ python _ type [ column _ spec ['type'] ] for column _ spec in self. spec } col _ is _ nullable = { col... | [
0.449396550655365,
-0.7499834299087524,
0.5585489273071289,
-0.1905367225408554,
0.35794615745544434,
-0.2491205334663391,
0.7026599645614624,
-0.5204094052314758,
-0.4740908443927765,
0.4253038465976715,
-0.12002457678318024,
0.42455118894577026,
0.013544272631406784,
0.5265897512435913,
... |
def _ deindex ( self, element _ name, key, value ) : # todo type check type, eid = element _ name. split (':') [ 1 : ] self. redis. srem ('{ } : i : { } : { } '. format ( self. name, type, key ), eid ) self. redis. srem ('{ } : i : { } : { } : { } '. format ( self. name, type, key, value ), eid ) | [
-0.8738318085670471,
-0.06177139654755592,
0.5756567716598511,
-0.7461225986480713,
-0.6389842629432678,
0.3578038811683655,
-0.5629528760910034,
0.438834547996521,
0.28113898634910583,
0.5709729790687561,
-0.640399158000946,
-0.029381398111581802,
-0.3638877272605896,
-0.424346387386322,
... |
def releaser _ page _ app ( self, releaserurl, output _ to _ file = false, filepath = none, releaser _ page _ num _ max = 40, output _ to _ es _ raw = false, output _ to _ es _ register = false, push _ to _ redis = false, es _ index = none, doc _ type = none, fetchfavoritecommnt = true, proxies _ num = none ) : pid = o... | [
-0.5109104514122009,
-0.1071016937494278,
1.2608704566955566,
0.7046490907669067,
0.07231797277927399,
-0.23098237812519073,
-0.01762993074953556,
-0.09287703782320023,
0.39917197823524475,
0.6451414227485657,
-0.021608004346489906,
-0.24847616255283356,
-0.17347325384616852,
0.75636309385... |
def test _ class _ inequality ( ) : test _ obj = uvtest ( ) assert test _ obj! = test _ obj. _ floatarr | [
-0.4226248860359192,
-0.3159615993499756,
0.34132474660873413,
1.1631312370300293,
0.7353344559669495,
1.2289127111434937,
1.1935721635818481,
-0.7345123291015625,
0.7947148680686951,
-1.1214134693145752,
-0.43379151821136475,
-0.3335961699485779,
-0.5345070958137512,
1.2221269607543945,
... |
def dynamic _ coin _ change1 ( denom, change ) : change + = 1 # 0 index offset result = [ [ none for i in range ( change ) ] for j in range ( len ( denom ) ) ] for j in range ( change ) : result [ len ( denom ) - 1 ] [ j ] = j # initialize lowest denom value to to require same amt of coins as value of change. for i in ... | [
-0.8206188678741455,
0.036155566573143005,
0.8500781059265137,
0.10425937920808792,
-0.2361336648464203,
-1.3584721088409424,
1.006276249885559,
-0.6873007416725159,
-0.4699193239212036,
0.3034535050392151,
-0.10160168260335922,
1.1227580308914185,
0.22718137502670288,
-0.04897589981555939... |
def setloglevel ( level ) : logconfig. default _ loglevel = level for logger in logconfig. active _ loggers. values ( ) : logger. setlevel ( level ) | [
-0.1498512625694275,
-0.5738928318023682,
0.40331998467445374,
0.6599793434143066,
0.8275941014289856,
0.02999921143054962,
-0.4227319061756134,
0.1856539100408554,
-0.6973827481269836,
0.42068198323249817,
-1.9432321786880493,
0.4503311216831207,
-0.4558030068874359,
0.7866008281707764,
... |
def index ( request ) : return render ( request, template _ name = " index. html " ) | [
0.019518669694662094,
-0.08931984752416611,
0.12591096758842468,
0.320843905210495,
-0.013103405945003033,
0.8015103936195374,
0.4040002226829529,
0.8383083343505859,
-0.5181150436401367,
-0.2517617642879486,
0.5656025409698486,
-0.3931495249271393,
0.11668714880943298,
-0.5715842247009277... |
def query _ target _ count ( self, target ) : reply = nvctrlquerytargetcountreplyrequest ( display = self. display, opcode = self. display. get _ extension _ major ( extname ), target _ type = target. type ( ) ) return int ( reply. _ data. get ('count') ) | [
-1.0741156339645386,
-0.029867224395275116,
0.6685585379600525,
-0.4875772297382355,
-0.16033543646335602,
-0.03779657557606697,
-0.025204071775078773,
-1.0482115745544434,
0.5176159143447876,
-0.20718882977962494,
-0.27364158630371094,
0.6937265396118164,
-0.47696608304977417,
-0.03363486... |
def newgeneration6 ( self ) : # print ( " printing child after iteration : { } ". format ( self. iteration ) ) for i in range ( 0, len ( self. population ) ) : " " " depending of your experiment you need to use the most suitable algorithms for : 1. select two candidates 2. apply crossover 3. apply mutation " " " ia, ib... | [
-0.4189203381538391,
-0.1716838777065277,
0.5822886228561401,
0.9298003315925598,
-0.03381010890007019,
0.8162946105003357,
1.2782188653945923,
-0.19910652935504913,
-0.1235463097691536,
0.6790496110916138,
-1.1039891242980957,
-0.11764001846313477,
-0.38659968972206116,
0.0492971725761890... |
def clear ( self ) : self. _ widget. clear ( ) self. _ items = [ ] | [
-0.3447017967700958,
-0.22670435905456543,
0.16518445312976837,
-0.6238617300987244,
0.2014685720205307,
0.2601715922355652,
-0.19624699652194977,
-0.025965917855501175,
-0.4272501766681671,
-0.5529946088790894,
-0.9540391564369202,
0.5072189569473267,
0.7738247513771057,
0.425560593605041... |
def reload ( bot : any ) - > optional [ exception ] : bot. plugin _ files = set ( bot. plugin _ dir. glob ('*. py') ) mtimes : dict [ str, dict [ str, float ] ] = bot. plugin _ mtimes for plug in bot. plugin _ files : new _ mtime = plug. stat ( ). st _ mtime plugin _ mtime : dict [ str, float ] try : plugin _ mtime = m... | [
-0.2653675675392151,
-0.8755342364311218,
0.6134831309318542,
-0.2710129916667938,
0.15091955661773682,
-1.027182698249817,
-0.08552432060241699,
-0.7716561555862427,
0.5159807801246643,
0.9951013922691345,
-0.6741841435432434,
0.6273606419563293,
-0.4850175380706787,
0.3815952241420746,
... |
def peek _ front ( self ) : if self. is _ empty ( ) : return self. head return self. head. data | [
-0.043664224445819855,
0.7089728116989136,
0.7516101598739624,
-0.3812713325023651,
-0.124308742582798,
-0.08355716615915298,
-0.6470675468444824,
-1.1581934690475464,
0.39130711555480957,
-0.5524188876152039,
0.32166239619255066,
1.685711145401001,
0.04942689090967178,
0.5925107598304749,... |
def logistic _ regression _ helper ( y, tx, w ) : pred = sigmoid ( tx. dot ( w ) ) return calculate _ loss ( y, tx, w, pred ), calculate _ gradient ( y, tx, w, pred ), calculate _ hessian ( y, tx, w, pred ) | [
0.45470020174980164,
0.10038039833307266,
0.3469984531402588,
-0.9714916944503784,
-0.18804380297660828,
-0.8393359184265137,
-0.5486119985580444,
-0.7740510702133179,
-0.5830746293067932,
0.5508450269699097,
-0.22502778470516205,
0.048538513481616974,
0.07006435841321945,
-0.7246567606925... |
def make _ uid _ domain _ name ( length : int = 3 ) : quote = " piglet was so excited at the idea of being useful that he forgot to be frightened any more, and when rabbit went on to say that kangas were only fierce during the winter months, being at other times of an affectionate disposition, he could hardly sit still... | [
-0.22407588362693787,
0.1777321696281433,
0.6700623035430908,
-1.1566523313522339,
-0.7845367789268494,
0.6761865019798279,
0.022308964282274246,
0.28406447172164917,
1.3644859790802002,
-0.025477714836597443,
-0.19989800453186035,
0.7663218379020691,
-0.4092736840248108,
-0.14802359044551... |
def rotate _ left ( self ) : self. body. angle + = radians ( 2 ) | [
0.6869028806686401,
0.5123263001441956,
0.3610473871231079,
-0.9793879389762878,
1.2664988040924072,
0.7871705889701843,
-0.7803797125816345,
-0.7489041686058044,
0.520021915435791,
-0.43525174260139465,
-0.9466229677200317,
0.24769601225852966,
-0.4960363507270813,
0.04061749204993248,
... |
def pjax ( cls = none, * pjax _ args ) : return classdecorator ( pjax, cls = cls, * pjax _ args ) | [
-0.5430628657341003,
-0.07408960163593292,
0.3800520896911621,
0.4390020966529846,
-0.19101034104824066,
0.25550344586372375,
-0.36123692989349365,
0.6598113775253296,
0.5936192870140076,
-1.1227481365203857,
-0.005330091342329979,
-0.012527703307569027,
0.5930356979370117,
0.1914520114660... |
def run _ on _ schedule ( self, schedule ) : payload = { " enabled " : true, " schedule " : to _ api ( schedule ), } return self. from _ server _ data ( self. _ client. patch ( " { } { } ". format ( self. _ path, self. id ), data = payload ). json ( ) ) | [
-0.6966258883476257,
-0.6207355856895447,
0.5096344947814941,
-0.056702740490436554,
-0.6157535910606384,
-0.6281939148902893,
-1.1299972534179688,
0.27190637588500977,
0.6060465574264526,
0.47076109051704407,
-1.2529919147491455,
0.5849226713180542,
-0.8744696378707886,
-0.325071483850479... |
def random _ connections ( width, height, points ) : px = [ ] for i in range ( points ) : x = random. uniform ( 0, width ) y = random. uniform ( 0, height ) px. append ( ( x, y, 0 ) ) lines = [ ] for i, p in enumerate ( px ) : connections = px [ i + 1 : ] for c in connections : line = ( p, c ) lines. append ( line ) fo... | [
-0.8283765316009521,
-0.22123566269874573,
0.6884634494781494,
-0.5998519062995911,
0.10893042385578156,
0.2230861485004425,
-0.08707454055547714,
-0.2535345256328583,
0.7368442416191101,
0.03651869297027588,
0.31761434674263,
-0.4646131098270416,
-0.3712773621082306,
-0.13293226063251495,... |
def z _ score _ from _ pvalue ( p _ value, direction ) : global scipy if scipy is none : import scipy import scipy. stats return - scipy. stats. norm. ppf ( p _ value / 2 ) * sign ( direction ) | [
0.02962561696767807,
-0.7285841703414917,
0.2938541769981384,
0.12288880348205566,
0.1164938360452652,
0.37910234928131104,
0.26038190722465515,
0.0679330974817276,
0.6160982251167297,
0.11969031393527985,
0.9469882249832153,
0.13982611894607544,
-0.2579875886440277,
-0.49798935651779175,
... |
def accuracy ( output, target, topk = ( 1, ), istrain = false, output _ modes = " classification " ) : if output _ modes = = " classification " : maxk = max ( topk ) batch _ size = target. size ( 0 ) _, out _ classes = output. max ( dim = 1 ) correct = ( out _ classes = = target ). sum ( ) correct = correct. float ( ) ... | [
-0.1581386774778366,
-0.811947762966156,
0.8033937811851501,
0.5893214344978333,
-0.6612377762794495,
-0.13881820440292358,
0.8710598349571228,
0.3825779855251312,
-0.3947300314903259,
0.608204185962677,
0.8194932341575623,
0.7058377861976624,
0.035265080630779266,
-0.09786038100719452,
... |
def info ( self, text, verbose = 2 ) : self. output. info ( text, verbose ) | [
0.8551155924797058,
-0.22372370958328247,
0.30436837673187256,
0.6888329386711121,
-0.007943332195281982,
-0.008191774599254131,
0.08891510963439941,
0.31720423698425293,
-1.3570514917373657,
0.4034406244754791,
-0.08089832961559296,
0.3729219436645508,
0.09541638940572739,
0.4633869230747... |
async def download ( self, path, accept _ url = false, version = none, range = none, * * kwargs ) : if not path. is _ file : raise exceptions. downloaderror ('no file specified for download ', code = 400 ) # if kwargs. get ('displayname') : # response _ headers = {'response - content - disposition':'attachment ; filena... | [
-0.12163078784942627,
-0.31156930327415466,
0.9603185057640076,
0.35762766003608704,
-0.9739753603935242,
0.06667054444551468,
-0.11601375043392181,
-0.7476140260696411,
-0.10397754609584808,
0.19265317916870117,
-0.4000374674797058,
0.5009449124336243,
-0.46489742398262024,
-0.11049298197... |
def retrieve _ spec _ info ( ) : base _ url ='http : / / vuz. edunetwork. ru / specs /'r = requests. get ( base _ url ) soup = beautifulsoup ( r. text,'html. parser') with open ('specialities. csv ','w ', encoding ='utf - 8') as f : # header for the csv f. write ( " id, specialization, description, perspectives \ n " )... | [
0.05156061425805092,
-0.282332181930542,
0.49301451444625854,
-0.913277804851532,
0.517910897731781,
-0.11610271036624908,
-0.1340864598751068,
0.4891801178455353,
-0.06655015796422958,
-0.2290203869342804,
0.07001855969429016,
0.7966365218162537,
0.5404214859008789,
-0.0016500254860147834... |
def pretty _ print _ dictionary ( dictionary ) : dict _ as _ str = { key : str ( val ) for key, val in dictionary. items ( ) } return json. dumps ( dict _ as _ str, indent = 2 ) | [
-0.6737487316131592,
-0.5714678168296814,
0.62568598985672,
-1.1997382640838623,
-1.07671320438385,
0.08763213455677032,
-0.8298090696334839,
-0.7385637164115906,
-0.0997229814529419,
0.07381512969732285,
0.45499294996261597,
0.5133821964263916,
0.644385576248169,
0.3358078598976135,
0.7... |
def ndgc _ err ( predicted _ rank _ vector, original _ rank _ vector, k = none ) : # number of documents r = predicted _ rank _ vector. normalize ( ties ='ceiling'). integers ( ) l = original _ rank _ vector. normalize ( ties ='ceiling'). integers ( ) n = len ( l ) # if user doesn't specify k, set equal to the ranking ... | [
-0.18494713306427002,
0.771767795085907,
0.6303980946540833,
0.02945471741259098,
-1.1151165962219238,
-0.40261784195899963,
0.20972329378128052,
0.33075395226478577,
-0.6867578029632568,
1.0327478647232056,
0.16094765067100525,
0.3704191744327545,
-0.4267244338989258,
0.940891444683075,
... |
def settriggermode ( mode ) : return none | [
-0.19920440018177032,
-0.08975440263748169,
0.46130093932151794,
-0.15927931666374207,
0.9230054020881653,
0.5606573224067688,
0.0988301932811737,
0.5543277859687805,
0.11741787195205688,
-0.8857059478759766,
-1.8229289054870605,
-0.4792921543121338,
-0.5674721598625183,
-0.903276741504669... |
def update _ property _ node ( node _ to _ insert, field _ uri ) : root = t. setitemfield ( t. fielduri ( fielduri = field _ uri ), t. calendaritem ( node _ to _ insert ) ) return root | [
-0.44253605604171753,
0.4903109669685364,
0.43144822120666504,
-0.8167271614074707,
-0.12564623355865479,
0.47934821248054504,
-0.6110609769821167,
0.6938400268554688,
-0.33351463079452515,
0.3542799651622772,
0.7018768787384033,
0.14451518654823303,
-0.9929963946342468,
-1.906919002532959... |
def load ( namefile ) : a = [ ] with open ( namefile ) as f : for line in f : a. append ( line. strip ( ) ) return a | [
-0.20120887458324432,
-0.8411619067192078,
0.6470533013343811,
-1.2257330417633057,
-0.618685245513916,
0.8562541007995605,
-0.9187137484550476,
0.22989416122436523,
-0.43826937675476074,
0.3208479881286621,
-1.3103054761886597,
-0.1957986056804657,
-0.21968039870262146,
0.4493928849697113... |
def format ( self, pelaaja : dict ) : pisteet = pelaaja ['goals'] + pelaaja ['assists'] return f " { pelaaja ['name'] : 20 } { pelaaja ['team'] } { pelaaja ['goals'] : 2 } + { pelaaja ['assists'] : 2 } = { pisteet : 3 } " | [
0.24182575941085815,
-0.1630750298500061,
0.42418375611305237,
-2.1148195266723633,
-0.9199192523956299,
0.564828634262085,
-0.3854025602340698,
-0.47890836000442505,
0.31445375084877014,
1.0874148607254028,
0.5605074763298035,
-0.9380296468734741,
1.2590250968933105,
0.8864557147026062,
... |
def pairs ( a ) : return [ x for x in list ( itertools. product ( a, a ) ) if x [ 0 ]! = x [ 1 ] ] | [
-0.9785891175270081,
0.09995315223932266,
0.6936880350112915,
0.7693536877632141,
-0.00548866530880332,
0.24217921495437622,
0.47781041264533997,
0.6349768042564392,
1.0237985849380493,
0.5072958469390869,
-0.46272093057632446,
-0.09028356522321701,
-0.3085140883922577,
0.21546712517738342... |
def test _ parse _ machine _ type ( self ) : self. assertequal ( ct. machinetype. standard _ 8, ct. parse _ machine _ type ( " n1 - standard - 8 " ) ) with self. assertraises ( argumenttypeerror ) : ct. parse _ machine _ type ( " random - string " ) | [
-0.05078454315662384,
0.7407687902450562,
0.15101420879364014,
0.5874537229537964,
0.31575846672058105,
1.1704729795455933,
-0.14464713633060455,
-0.33924600481987,
-0.7766555547714233,
0.04544662684202194,
-0.5513721704483032,
-0.013554325327277184,
-0.2826653718948364,
0.6045984625816345... |
def set _ log _ file ( log _ file ) : fh = logging. filehandler ( log _ file ) fh. setlevel ( logging. debug ) fh. setformatter ( _ get _ formatter ( ) ) log. addhandler ( fh ) | [
0.39083313941955566,
-0.693590521812439,
0.3542011082172394,
-0.07515519112348557,
0.5124536752700806,
0.7557495832443237,
-0.07274821400642395,
0.6300384998321533,
-1.0409157276153564,
-1.5374681949615479,
-0.43310320377349854,
-0.012723676860332489,
0.7645639181137085,
0.9595950841903687... |
def create _ dummy _ computation _ selection ( ) : source, source _ type = create _ dummy _ computation _ tuple ( ) type _ signature = source _ type [ 0 ] value = pb. computation ( type = type _ serialization. serialize _ type ( type _ signature ), selection = pb. selection ( source = source, index = 0 ) ) return value... | [
-1.0361647605895996,
-0.22384029626846313,
0.4271988570690155,
-0.09871997684240341,
0.5947085618972778,
-0.3853228986263275,
0.8164753913879395,
-0.7049017548561096,
0.1916949301958084,
0.2677551507949829,
-0.9055898189544678,
0.6880265474319458,
-0.5498160123825073,
0.030984699726104736,... |
def validate _ client _ id ( self, client _ id ) : return oauthclient. find ( client _ id ) is not none | [
0.8486033082008362,
-0.5313889384269714,
0.27586033940315247,
-0.3170347511768341,
0.24113427102565765,
0.31761953234672546,
-0.19341517984867096,
-0.5625850558280945,
0.34353241324424744,
-0.10241846740245819,
0.7127609252929688,
0.9705278873443604,
-0.667278528213501,
0.3682577610015869,... |
def read _ neurone _ events _ hdf5 ( fpath ) : # read the protocol protocol = read _ neurone _ protocol ( fpath ) # read the signal data data = read _ neurone _ data ( fpath, session _ phase = 1, protocol = protocol ) # read the events events = read _ neurone _ events ( fpath, session _ phase = 1, sampling _ rate = flo... | [
0.11916035413742065,
-0.14140799641609192,
0.482563853263855,
0.6861992478370667,
-0.050365373492240906,
-0.2556515634059906,
0.2991599440574646,
-0.16863009333610535,
-0.42946842312812805,
0.7520087957382202,
0.21827355027198792,
-0.6000524163246155,
-0.681364119052887,
-0.000636150420177... |
def provider _ name ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " provider _ name " ) | [
-0.018166434019804,
0.07039816677570343,
0.3278588652610779,
0.24942226707935333,
-0.600313663482666,
1.2334098815917969,
-0.05308380722999573,
0.055937908589839935,
0.7388105988502502,
0.8561007380485535,
0.4156111776828766,
0.4657726585865021,
0.5648775696754456,
-1.0841643810272217,
-... |
def build _ person ( first _ name, last _ name, age = none ) : person = {'first': first _ name,'last': last _ name } if age : person ['age'] = age return person | [
-0.549606204032898,
-1.0027347803115845,
0.574851393699646,
-0.9669143557548523,
-0.5380712747573853,
0.16695697605609894,
-1.532446265220642,
1.1812489032745361,
-0.5332487225532532,
-0.30978095531463623,
-0.7392684817314148,
-0.549415111541748,
0.027545198798179626,
0.11655541509389877,
... |
def get _ devices ( self ) - > dict [ str, dict ] : return self. devices | [
-1.449988603591919,
-0.11386056244373322,
0.3606868386268616,
-0.043707579374313354,
-0.5191336274147034,
-0.4299333393573761,
-0.4418031573295593,
-0.16362364590168,
-0.13618269562721252,
-0.11326869577169418,
-0.461635559797287,
-0.1450308859348297,
0.2601509988307953,
0.7875779271125793... |
def solve _ captcha ( session _ id ) : cookie = {'phpsessid': session _ id } response = requests. get ( securimage _ endpoint, cookies = cookie, stream = true ) path = " files / captcha / { }. png ". format ( session _ id ) if response. status _ code = = 200 : with open ( path,'wb') as f : response. raw. decode _ conte... | [
-0.32412317395210266,
-1.0865269899368286,
0.6048687696456909,
0.5259053111076355,
-0.21173784136772156,
-0.5763918161392212,
0.07263652235269547,
-0.20199646055698395,
0.4835035800933838,
-0.1441141813993454,
-1.0865098237991333,
-0.5865871906280518,
0.6181614995002747,
-0.649533867835998... |
def settext ( self, text ) : self. _ main. send ( " settextsplashscreen ", [ text ] ) pass | [
0.2503407597541809,
0.1739974021911621,
0.3040207624435425,
0.6345906853675842,
-0.45606061816215515,
1.3908965587615967,
0.05593203753232956,
0.08292699605226517,
0.7054988145828247,
0.03446176275610924,
-1.409725308418274,
0.00946100428700447,
-0.9139136075973511,
0.722426176071167,
-1... |
def getddgstepmode ( ) : andor _ solis. getddgstepmode. restype = ctypes. c _ uint mode = ctypes. c _ ulong ( ) result = andor _ solis. getddgstepmode ( ctypes. byref ( mode ) ) check _ status ( result ) return int ( mode. value ) | [
-1.4274966716766357,
0.9055427312850952,
0.4933900833129883,
0.45710089802742004,
-0.19199584424495697,
-0.3012029528617859,
0.08638981729745865,
0.3097314238548279,
-0.04694225639104843,
-0.5406470894813538,
-0.8547621965408325,
-0.7166084051132202,
-0.29970914125442505,
0.056052584201097... |
def _ _ init _ _ ( self, symbol ) : # open the file for the given symbol data = open ('{ } \ { }. csv '. format ( data _ path, symbol ),'r') # build dataset from file self. data = [ marketdatapoint ( line ) for line in data ] self. close = [ dp. close for dp in self. data ] self. symbol = symbol data. close ( ) | [
-0.3285020887851715,
-0.3144386410713196,
0.290126234292984,
-0.33182746171951294,
-0.19250962138175964,
0.45220524072647095,
0.25262972712516785,
0.5695147514343262,
0.002500629285350442,
-0.6667001843452454,
0.5038759112358093,
0.9088829755783081,
0.5876639485359192,
-0.03090080618858337... |
def write _ raster ( myarray, myraster, geo, fmt, nodata ) : # available data types : if fmt = = " byte " : ofmt = gdal. gdt _ byte elif fmt = = " float32 " : ofmt = gdal. gdt _ float32 elif fmt = = " float64 " : ofmt = gdal. gdt _ float64 elif fmt = = " int16 " : ofmt = gdal. gdt _ int16 elif fmt = = " int32 " : ofmt ... | [
-0.34549036622047424,
-0.2467161864042282,
0.6325570344924927,
-0.5207926034927368,
-0.2140747308731079,
0.4167499244213104,
0.13733448088169098,
-0.6872119903564453,
0.42200616002082825,
-0.09403496980667114,
-0.22316156327724457,
0.15967842936515808,
-0.9656346440315247,
0.88202369213104... |
def init _ app ( testing = false ) : app = flask ( _ _ name _ _, instance _ relative _ config = true ) if testing : app. config. from _ pyfile ( " config _ testing. py " ) else : app. config. from _ pyfile ( " config. py " ) app. url _ rule _ class = lambda path, * * options : rule ( " / products - api " + path, * * op... | [
0.27105095982551575,
-0.004357691388577223,
0.6592128872871399,
0.5566003322601318,
0.8738560080528259,
0.5976754426956177,
0.6857043504714966,
-0.3089621663093567,
0.7001554369926453,
0.5420240163803101,
-0.4086827039718628,
0.20973831415176392,
0.09666690975427628,
0.4819611608982086,
... |
def test _ request _ partial _ failure ( self ) : d = self. cleanup _ d ( self. client. request ('get ', path ='/ my - path') ) lb1 _ request = yield self. requests. get ( ) self. assertthat ( lb1 _ request, hasrequestproperties ( method ='get ', url ='http : / / lb1 : 9090 / my - path') ) lb2 _ request = yield self. r... | [
-0.4876277446746826,
-0.8466710448265076,
0.916379988193512,
-0.0786559134721756,
0.11796930432319641,
0.44233056902885437,
-0.27729952335357666,
-1.2800945043563843,
-0.2770448625087738,
-1.2037640810012817,
-0.10193954408168793,
0.009352277033030987,
-0.2950962781906128,
-0.0357518084347... |
def test _ 404 _ update _ task _ deleted ( self ) : self. task. is _ removed = true self. task. save ( ) self. url = reverse ( " tasks : update _ task ", kwargs = { " pk " : self. task. pk } ) response = self. client. post ( self. url, { } ) self. assertequal ( response. status _ code, 404 ) | [
0.45161622762680054,
0.04253159463405609,
0.745642364025116,
0.6748793125152588,
1.1468791961669922,
0.9257723689079285,
0.47842279076576233,
0.9788406491279602,
0.5280119180679321,
0.18310198187828064,
-1.0211784839630127,
0.5876102447509766,
-0.11652103811502457,
0.3056604266166687,
-0... |
def add _ band ( self, path, src _ bidx = 1, vrt _ bidx = none, validate = true, * * band _ kwds ) : # handle non - specified vrt _ bidx n _ band = len ( self. bands ) if self. separate : vrt _ bidx = n _ band + 1 if vrt _ bidx is none else vrt _ bidx else : if vrt _ bidx is not none and vrt _ bidx! = 1 : raise valueer... | [
-0.6487547755241394,
0.5528096556663513,
0.6890971064567566,
0.4722561836242676,
-0.3502194285392761,
0.9083269238471985,
-0.07723895460367203,
-0.2884276807308197,
0.2660690248012543,
-0.3089529573917389,
-0.8274838924407959,
0.5981531739234924,
-0.8834356665611267,
-0.28863590955734253,
... |
def _ arraylike _ copy ( arr ) : if type ( arr )! = numpy. ndarray : return numpy. array ( arr ) else : return arr. copy ( ) | [
-0.09393535554409027,
-0.8441910147666931,
0.4819273054599762,
0.5173912048339844,
-1.5276051759719849,
0.9582340121269226,
-0.1732354313135147,
-0.9235903024673462,
0.9646404385566711,
1.1574585437774658,
1.3153988122940063,
0.7396135926246643,
-0.12323503941297531,
0.41888394951820374,
... |
def new _ fh ( i, uid ) : if not isinstance ( i, i ) : raise typeerror ( " { } is not an i, is a { } ". format ( i, type ( i ) ) ) global fhs fh = 0 while fh in fhs : fh + = 1 fhs [ fh ] = ( i, user ( uid ) ) return fh | [
-0.8090478777885437,
0.17039470374584198,
0.21336513757705688,
0.03586266189813614,
-0.5801709294319153,
-0.05451207607984543,
0.5537568926811218,
-0.31628209352493286,
0.03848886117339134,
-0.4460415840148926,
-0.585682213306427,
-0.014244233258068562,
-1.0416929721832275,
-0.147898808121... |
def test _ request _ success ( self ) : d = self. cleanup _ d ( self. client. request ('get ', path ='/ my - path') ) for lb in ['lb1 ','lb2'] : request = yield self. requests. get ( ) self. assertthat ( request, hasrequestproperties ( method ='get ', url ='http : / / % s : 9090 / my - path'% ( lb, ) ) ) request. setre... | [
-0.4604296386241913,
-0.17384473979473114,
0.775114119052887,
0.35396212339401245,
0.7560381889343262,
0.5842522382736206,
-0.6694586873054504,
-0.2635176479816437,
-0.2580161690711975,
-1.1512975692749023,
-0.09356814622879028,
-0.6372913718223572,
0.2694658041000366,
-0.05821212753653526... |
def test _ delete _ all _ parameters ( self ) : pass | [
0.4796988368034363,
0.04849300906062126,
0.5753078460693359,
1.2708165645599365,
0.8973733186721802,
0.520630955696106,
0.3345200717449188,
0.3356643319129944,
0.06782948225736618,
-0.4341737926006317,
-0.2546148896217346,
0.3359411060810089,
-0.8422722220420837,
1.390647292137146,
-0.76... |
def _ postprocess ( self ) : logging. info ( " processing original image " ) fobj = self. _ img _ orig _ fobj ( ) exif, byterange = _ read _ exif ( fobj ) logging. info ( byterange ) self. exif = pickle. dumps ( exif ) logging. info ( " got exif : \ n % s " % exif ) lat = 0 try : lat = _ ios _ coord _ to _ decimal ( ex... | [
-0.3800058662891388,
-0.14278367161750793,
0.8265776038169861,
0.13047002255916595,
0.49052032828330994,
0.0061919204890728,
0.23479610681533813,
0.8666728734970093,
-0.511445939540863,
-0.12234589457511902,
-0.28198668360710144,
-1.2070618867874146,
0.7172427773475647,
0.48300814628601074... |
def is _ positive ( self, a ) : return a. val < self. mod / 2 | [
-0.6058136820793152,
-0.3439236581325531,
0.5509483218193054,
0.7332584857940674,
-0.7870510816574097,
0.5624285936355591,
-0.7657960653305054,
-0.8201587796211243,
0.46820569038391113,
-0.0796867161989212,
0.3375723958015442,
-0.14281009137630463,
0.14407853782176971,
0.829446017742157,
... |
def check _ login ( username, password ) : base _ url ='http : / / report. aldel. org / student _ page. php'with requests. session ( ) as s : r = s. get ( base _ url ) session _ id = str ( r. cookies. get ('phpsessid') ) # get sessionid captcha _ answer = solve _ captcha ( session _ id ) # solve the captcha payload = {... | [
-0.2638378441333771,
-0.21361775696277618,
0.7331866025924683,
-0.089124895632267,
-0.6488456130027771,
0.46758708357810974,
-0.5672645568847656,
0.4444262683391571,
0.2535414397716522,
0.4401286244392395,
-0.3863222301006317,
0.12308167666196823,
-0.3560328781604767,
-0.44008752703666687,... |
def install ( self ) : db = self. boilerplate. db auth = self. boilerplate. auth t = current. t request = current. request db. define _ table ( self. table _ comments, field ('id ','id'), field ('tablename ', required = true, notnull = true, writable = false, readable = false ), field ('record _ id ','integer ', requir... | [
0.6310477256774902,
0.049081869423389435,
1.2815024852752686,
-0.07458556443452835,
0.8941096663475037,
-0.31693196296691895,
0.7355214357376099,
-0.12295165657997131,
-0.5772189497947693,
0.3986872434616089,
-0.359065979719162,
-0.03743446245789528,
-0.41279324889183044,
0.559936642646789... |
def update ( self, instance : film, validated _ data ) : instance. film _ name = validated _ data. get ('film _ name ', instance. film _ name ) instance. film _ length = validated _ data. get ('film _ length ', instance. film _ length ) instance. price = validated _ data. get ('price ', instance. price ) instance. id =... | [
-1.1837667226791382,
-1.2876225709915161,
0.5476464033126831,
-0.3615611791610718,
-1.2725902795791626,
0.9485985636711121,
-0.6789571642875671,
0.47962987422943115,
0.6733149290084839,
-0.0653485655784607,
-1.4831589460372925,
0.46943899989128113,
-0.7068776488304138,
-0.19113901257514954... |
def test _ captured _ payment _ with _ captured _ date _ gets _ updated ( self, mock _ send _ email ) : govuk _ payment _ data = {'payment _ id': payment _ data ['processor _ id'],'reference': payment _ data ['uuid'],'state': {'status':'capturable'},'email':'success _ sender @ outside. local ', } with responses. reques... | [
-0.16563338041305542,
0.04935607686638832,
0.8233453631401062,
0.022610006853938103,
-0.014672206714749336,
0.16690470278263092,
-0.6598509550094604,
-0.13460683822631836,
0.42090725898742676,
0.09122827649116516,
-0.5529340505599976,
0.9839181900024414,
0.7112090587615967,
0.4774653613567... |
def plotting ( ) : # series ts = pd. series ( np. random. randn ( 1000 ), index = pd. date _ range ('1 / 1 / 2000 ', periods = 1000 ) ) ts = ts. cumsum ( ) # 和 ts. plot ( ) plt. show ( ) # dataframe df = pd. dataframe ( np. random. randn ( 1000, 4 ), index = ts. index, columns = [ " a ", " b ", " c ", " d " ] ) df = df... | [
0.791670560836792,
1.3751022815704346,
0.8805622458457947,
0.16769787669181824,
0.04294254258275032,
0.08960503339767456,
1.0172396898269653,
-0.043683022260665894,
0.6074856519699097,
-0.7337321639060974,
-0.3224007785320282,
1.126958966255188,
1.3526166677474976,
-0.15310730040073395,
... |
def _ gen _ neg _ data ( mapping, neg _ path ) : xacc, yacc = [ ], [ ] for brickid, label in neg _ mapping. iteritems ( ) : print " computing for { } ". format ( brickid ) img _ dir = os. path. join ( neg _ path, str ( brickid ) +'_ syn') x = preprocess ( img _ dir,'info. dat') y = label * np. ones ( x. shape [ 0 ] ) p... | [
-1.1586791276931763,
-0.38985055685043335,
0.5215772390365601,
-0.3874697685241699,
0.4672185778617859,
0.0529928058385849,
-0.19179949164390564,
0.6875184774398804,
-0.8386957049369812,
0.16782012581825256,
0.09250090271234512,
0.052617646753787994,
0.8415896892547607,
0.28903064131736755... |
def test ( ctx ) : build ( ctx ) os. system ( " hexo server - s " ) | [
0.6087592840194702,
0.1763908416032791,
0.24544364213943481,
0.4473167061805725,
0.9960748553276062,
0.9196984171867371,
0.4053800106048584,
1.0410264730453491,
0.29728811979293823,
-1.5940436124801636,
-0.7209741473197937,
0.7685797214508057,
-0.09183625131845474,
0.3383454978466034,
-0... |
def create _ volume _ from _ snapshot ( self, volume, snapshot ) : # nyi ( rdl : the v6000's 5. x. x platform does not support data # management features ) # raise notimplementederror | [
0.1962442398071289,
-0.3038569688796997,
0.32399722933769226,
-0.04603872075676918,
-0.5987072587013245,
-0.3522334694862366,
-0.8490548133850098,
-0.20168869197368622,
0.6268252730369568,
-0.9542075395584106,
-0.12997862696647644,
-0.2670874297618866,
0.6064270734786987,
-0.25217846035957... |
def _ read _ file ( self, filename ) : def get _ node _ list ( nodes ) : " " " build a list containing the nodes numbers. given the string passed as parameter, this method builds a list of node numbers, comprehensive of ranges in the string. arguments : nodes { str } - - string containing the numbers of nodes declared ... | [
-0.5101838111877441,
0.4609570801258087,
0.6969582438468933,
-0.32335713505744934,
-0.5674781203269958,
-0.20683600008487701,
0.8206549286842346,
0.6417959332466125,
-1.9829412698745728,
0.17740407586097717,
-0.053424425423145294,
0.227640300989151,
0.4229491949081421,
0.5582215785980225,
... |
def loadabstractsentences ( dirname ) : abstractlengths = { } for file in os. listdir ( dirname ) : sentsizes = [ ] if file. endswith ( ". crp " ) : curid = file. split ( ". crp " ) [ 0 ]. split ( ". " ) [ 1 ] f = open ( dirname + file, " r " ) lnb = 0 nextlnb = 1 sentcnt = 0 for line in f. readlines ( ) : if lnb = = n... | [
0.47385334968566895,
-0.4883001446723938,
0.7540673613548279,
-1.5704766511917114,
-0.856823205947876,
-0.3066088855266571,
0.5563348531723022,
-0.021879049018025398,
-0.6824763417243958,
1.1298573017120361,
-0.6426927447319031,
-0.0759856328368187,
0.18995340168476105,
1.4638116359710693,... |
def test _ missing _ nonce ( self ) : data = {'client _ id': self. client. client _ id,'response _ type': next ( self. client. response _ type _ values ( ) ),'redirect _ uri': self. client. default _ redirect _ uri,'scope':'openid email ','state': self. state, } response = self. _ auth _ request ('get ', data, is _ use... | [
-0.3493586480617523,
0.09363102912902832,
0.7233090996742249,
0.20520642399787903,
0.2842368483543396,
0.5419495701789856,
-0.04732920601963997,
-0.5116354823112488,
0.867479145526886,
-0.9084182381629944,
-0.02686341479420662,
0.14617472887039185,
-0.33236339688301086,
-0.4556846022605896... |
def new _ activation ( self, user ) : now = int ( time. time ( ) ) # generate random activation key hash _ id = utils. random _ string ( 64 ) act = activation ( self. db, user. id ) act. set ( user _ id = user. id, activation _ id = hash _ id, created = now ) act. save ( ) return act | [
-0.8795948028564453,
-0.3290841579437256,
0.2613588869571686,
0.8102064728736877,
-0.7134271860122681,
0.4640614092350006,
0.7050156593322754,
-0.1288771629333496,
0.2752324342727661,
0.273771733045578,
-0.8543147444725037,
-0.2621205747127533,
-0.24554938077926636,
-0.1878424733877182,
... |
def get _ ranked _ global _ names ( self, top _ k = none ) : if self. _ ranked _ global _ names is none and self. _ features is not none : self. _ ranked _ global _ names = _ sort _ feature _ list _ single ( self. _ features, self. _ global _ importance _ rank ) if self. _ ranked _ global _ names is not none : ranked _... | [
-0.19729308784008026,
0.49387726187705994,
0.8438137769699097,
0.40062597393989563,
0.6821086406707764,
0.8184416890144348,
-0.14435796439647675,
0.16464923322200775,
-0.2826046347618103,
0.6391296982765198,
-0.5476275086402893,
1.0772089958190918,
-0.5070226192474365,
0.6613174676895142,
... |
def handler _ send _ errors _ to _ admins ( update : update, context : callbackcontext ) : # this traceback is created with accessing the traceback object from the sys. exc _ info, which is returned as the # third value of the returned tuple. then we use the traceback. format _ tb to get the traceback as a string, whic... | [
0.03751817345619202,
0.03492242470383644,
0.7882364988327026,
0.11077753454446793,
0.059449102729558945,
0.04550185799598694,
-0.785961389541626,
-0.6336482167243958,
0.21426992118358612,
0.1314181685447693,
0.041204750537872314,
0.4889548718929291,
0.1617061048746109,
0.6579222083091736,
... |
def defaultablepayoffpct ( self, origvalue, newvalue, age ) : factor = self. mortgagebalancecurve. iloc [ age ] origloanbalance = origvalue * self. oltv currentloanbalance = origloanbalance * factor equity = newvalue - currentloanbalance # un - scale the normal payoff to put it in home price terms owetosotw = self. inv... | [
0.8439229130744934,
0.19421859085559845,
0.4850136935710907,
-0.5992990136146545,
-0.6146495342254639,
0.4149850904941559,
-0.04812777787446976,
-0.18469533324241638,
0.00005655775748891756,
0.6813255548477173,
0.19784139096736908,
-0.5007692575454712,
-1.3978650569915771,
0.75302523374557... |
def scoreevent ( self, eventtype, pfields, absp2mode = false ) : self. pt. scoreevent ( absp2mode, eventtype, pfields ) | [
-0.6174330711364746,
-0.4266355037689209,
0.6837445497512817,
0.7730587720870972,
0.6923527717590332,
1.4465465545654297,
0.016089769080281258,
-0.5368508100509644,
-0.6829348206520081,
1.0505640506744385,
-0.20970235764980316,
-0.20086851716041565,
-0.010569106787443161,
0.093475349247455... |
def validate _ scope ( self, client _ id, scope ) : # todo : validate scope return true | [
-0.314157634973526,
-0.5793895125389099,
0.5281444191932678,
-0.21802668273448944,
-0.06586111336946487,
0.6958301663398743,
0.19438529014587402,
-0.12433791160583496,
0.1409187763929367,
0.508230984210968,
0.2525431215763092,
0.8705687522888184,
-1.1081005334854126,
0.18862539529800415,
... |
def game _ 1 ( ) : print ( " \ f " ) print ( " * " * 80 ) print ( f " " " now you are back in the office holding the safebox in your hand. it requires a 4 digit number pin to open. \ n you now have 2 chances to guess the pin of the safebox. once you hit the limit of guesses and still did not get it right, the safebox w... | [
-0.1437048465013504,
0.27997568249702454,
0.8524458408355713,
0.7428744435310364,
-0.0005167970666661859,
1.0168160200119019,
0.8540171384811401,
-0.13941052556037903,
-0.14939992129802704,
-0.29520246386528015,
-0.11910093575716019,
0.6033270359039307,
-0.2976980209350586,
-0.214298889040... |
def _ _ init _ _ ( self, config _ entry : config _ entries. configentry ) - > none : self. entry = config _ entry | [
0.4920756220817566,
-0.6148529052734375,
0.060831375420093536,
0.1526300460100174,
0.3002690374851227,
-0.3443811237812042,
0.07904380559921265,
0.9592666625976562,
0.6589428782463074,
0.6536402702331543,
-0.001649168087169528,
0.09617454558610916,
0.6395331621170044,
0.786715030670166,
... |
def load _ state ( self, filename ) : pass | [
-0.8014680743217468,
-0.7901098132133484,
0.2650248110294342,
0.220039963722229,
-0.5979768633842468,
0.4264303147792816,
0.3143674433231354,
0.6337351202964783,
-0.4883478581905365,
-0.10661429911851883,
-0.2988142967224121,
-0.477115273475647,
-0.09816216677427292,
0.01709684170782566,
... |
def generate _ period _ string ( ) : t = datetime. datetime. now ( ) year = t. year month = t. month if month < = 4 : third = ( month - 4 ) % 12 if ( month - 4 ) < 0 else 12 if ( month - 4 ) = = 0 else ( month - 4 ) second = ( month - 3 ) % 12 if ( month - 3 ) < 0 else 12 if ( month - 3 ) = = 0 else ( month - 3 ) first... | [
0.14131352305412292,
-0.6613489389419556,
1.2391116619110107,
-0.2465980350971222,
-0.5835450291633606,
0.8477718234062195,
-0.38041800260543823,
-0.07944288849830627,
0.13046975433826447,
0.5016719698905945,
0.41579219698905945,
0.1324683427810669,
-0.275747150182724,
-0.9123144149780273,... |
def _ update _ precision ( self, minimum = none, maximum = none, step = none ) : orig = self. _ precision if minimum is not none or maximum is not none : _ min = minimum or self. _ mgui _ get _ min ( ) _ max = maximum or self. _ mgui _ get _ max ( ) # make sure val * precision is within int32 overflow limit for qt val ... | [
-0.6159145832061768,
-0.4122380316257477,
0.9423327445983887,
-0.023748939856886864,
-1.0640486478805542,
0.16841092705726624,
-0.5126857161521912,
-0.5011640787124634,
-0.5477960109710693,
-0.6214627623558044,
0.357906699180603,
-0.14992214739322662,
-0.022051449865102768,
0.8070369362831... |
def create _ aux _ operators ( self ) : logs. log _ info ( " creating auxiliary operators... " ) # exterior derivative operator for tri mesh operating on edges to return faces : delta _ tri _ 1 = np. zeros ( ( self. n _ tcell, self. n _ tedges ) ) tedge _ tree = ckdtree ( self. tri _ edges ) for ic, vertis _ o in enume... | [
0.5809628963470459,
-0.13925784826278687,
0.7900195121765137,
-0.06184179335832596,
-0.37475258111953735,
0.6954019069671631,
0.7477251887321472,
0.1514640599489212,
-0.5555472373962402,
0.04816098138689995,
-0.364210844039917,
0.3748437166213989,
-0.05955755338072777,
0.5295324921607971,
... |
def page _ not _ found ( e ) : return'sorry, nothing at this url. ', 404 | [
-0.5250890254974365,
-0.6634703278541565,
0.2769848108291626,
-0.7079537510871887,
0.8187170624732971,
0.32265225052833557,
-0.37257716059684753,
0.29386836290359497,
0.09814257174730301,
0.00805417075753212,
0.22586071491241455,
-0.20309273898601532,
0.4975530505180359,
0.3213329613208771... |
def instance _ num ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " instance _ num " ) | [
-0.004404009319841862,
-0.06119920313358307,
0.6227608919143677,
-0.18245813250541687,
0.03765125945210457,
0.9930591583251953,
1.146960735321045,
1.1398615837097168,
-0.2661552131175995,
-0.33496224880218506,
-0.32208946347236633,
0.9641825556755066,
0.25606000423431396,
-1.36916399002075... |
def get _ extend ( x, y ) : return [ x [ 0 ], x [ - 1 ], y [ 0 ], y [ - 1 ] ] | [
-0.2639816999435425,
0.5155868530273438,
0.7586616277694702,
0.47476935386657715,
0.5409228801727295,
-0.14004099369049072,
-2.33585262298584,
-0.46065017580986023,
-0.30385375022888184,
0.7154915928840637,
-0.8361456394195557,
1.023983120918274,
-0.03282696381211281,
-0.7636743783950806,
... |
def show ( self ) : self. _ main. send ( " showcontactlistwidget ", [ ] ) pass | [
0.6044947504997253,
-0.14764124155044556,
-0.00037721075932495296,
-0.32670897245407104,
-0.036179736256599426,
0.20518754422664642,
0.9686392545700073,
1.6028317213058472,
0.6792635321617126,
-0.13453418016433716,
-0.40088677406311035,
0.7253416776657104,
-0.18611103296279907,
0.598673284... |
async def handle ( self, context : requestcontext, responder : baseresponder ) : self. _ logger. debug ( f " credentialofferhandler called with context { context } " ) assert isinstance ( context. message, credentialoffer ) self. _ logger. info ( " received credential offer : % s ", context. message. offer _ json ) if ... | [
0.26450788974761963,
-0.12029401957988739,
0.7445407509803772,
0.07804203033447266,
-0.04465721175074577,
0.3688802421092987,
0.0704861581325531,
0.1987629234790802,
0.019495593383908272,
-0.09309418499469757,
-0.08059510588645935,
0.6708754301071167,
-0.3584291338920593,
0.217323824763298... |
def getemccdgain ( ) : andor _ solis. getemccdgain. restype = ctypes. c _ uint gain = ctypes. c _ int ( ) result = andor _ solis. getemccdgain ( ctypes. byref ( gain ) ) check _ status ( result ) return int ( gain. value ) | [
-0.11956650018692017,
-0.47237828373908997,
0.7270469665527344,
-0.31621742248535156,
-0.5351455211639404,
-0.39244475960731506,
0.8465743064880371,
-0.06150057166814804,
0.10028634965419769,
-0.8168133497238159,
0.0462472103536129,
0.6386666893959045,
-0.4232276380062103,
0.50221061706542... |
def item _ enabled ( self, item ) : self. _ verify _ enabled ( ) el = self. item _ element ( item ) li = self. browser. element ( ".. ", parent = el ) return " disabled " not in self. browser. classes ( li ) | [
-0.5759539604187012,
0.1080484688282013,
0.5492646098136902,
1.3056718111038208,
-0.18503804504871368,
0.6232691407203674,
-0.3635317385196686,
0.7225015759468079,
1.4566245079040527,
0.4065248668193817,
-1.2718408107757568,
-0.7817992568016052,
-0.8602580428123474,
0.16919389367103577,
... |
def train ( self ) : while self. epoch < self. n _ epochs : self. epoch + = 1 self. policy. train ( ) self. v. train ( ) state = self. env. reset ( ) states, next _ states, actions, log _ probs, covs, rewards, values, dones = [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ] for step in range ( self. n _ steps ) : action, log _ p... | [
-0.29369232058525085,
0.41251301765441895,
0.9097578525543213,
-0.26077592372894287,
-0.2544859051704407,
-0.3616769313812256,
0.21073222160339355,
-0.1329294741153717,
-0.194415882229805,
0.6634489893913269,
-0.0685679093003273,
-0.042385395616292953,
0.3291245996952057,
0.099959157407283... |
def json _ bytes ( request ) - > bytes : return get _ test _ data ( request, _ _ name _ _, " config. json " ) | [
-1.2095279693603516,
0.12163461744785309,
0.44741758704185486,
-0.4677876830101013,
-0.2705266773700714,
-0.2239244282245636,
-0.1615350991487503,
-1.0598413944244385,
0.10747934877872467,
0.2678107023239136,
-0.8299987316131592,
0.5145823359489441,
-0.07956665009260178,
0.1141256764531135... |
def freeinternalmemory ( ) : return none | [
0.7552312016487122,
-0.6160100698471069,
0.6227450966835022,
-0.6879923939704895,
-1.060529112815857,
0.3072405755519867,
0.3190465271472931,
-1.320298671722412,
0.3671688735485077,
-0.9988672733306885,
-0.1534208357334137,
0.652532160282135,
-1.3555699586868286,
-0.3930256962776184,
0.1... |
def find _ clicked _ circle ( click _ point, list _ of _ circles ) : for i in range ( len ( list _ of _ circles ) ) : if ( is _ click _ in _ circle ( click _ point, list _ of _ circles [ i ] ) ) : return i return none | [
-0.0603967159986496,
-0.4979935586452484,
0.5556361079216003,
-0.23692971467971802,
-0.5021512508392334,
-1.2723388671875,
0.9849774837493896,
-0.41901442408561707,
0.04274548217654228,
0.2926884889602661,
-0.10526248812675476,
0.21979056298732758,
-0.8648536205291748,
-0.14320941269397736... |
def request _ qpx ( departure _ airport, destination _ airport, input _ departure _ date, input _ return _ date ) : # the url to send request api _ key = os. environ ['qpx _ key'] url = " https : / / www. googleapis. com / qpxexpress / v1 / trips / search? key = % s " % ( api _ key ) # the search parameters to pass int... | [
-1.566825270652771,
-0.16778860986232758,
1.0164953470230103,
-0.37734517455101013,
-0.5785813927650452,
0.3482624292373657,
-1.0700528621673584,
-0.9914984703063965,
-1.0508456230163574,
-0.4527799189090729,
-0.6777082085609436,
0.05923707038164139,
-0.36601385474205017,
0.217066377401351... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.