text
stringlengths
25
2.19k
embedding
listlengths
768
768
def load ( self, resource _ name, value ) : self. _ img. release ( ) if ( resource _ name = ='file') : self. _ img = nsimage. alloc ( ). initwithcontentsoffile _ ( str ( value ) )
[ 0.13720300793647766, 0.2750934660434723, 0.34566569328308105, -0.6355061531066895, -1.2622051239013672, 0.26281076669692993, -0.6140437126159668, -0.7577687501907349, -0.14864258468151093, -0.07826420664787292, 0.12385542690753937, 0.10775856673717499, 0.5264889001846313, 0.870658993721008...
def target _ design _ member ( self ) : return self. _ target _ design _ member
[ -0.08709470182657242, 0.2364559918642044, 0.2739185690879822, 0.22197657823562622, 0.10232555121183395, 0.9713596701622009, 0.12423919141292572, -0.43891486525535583, 0.6929926872253418, -1.2066389322280884, 0.07239478826522827, 1.1171760559082031, 0.9441977143287659, -1.3921570777893066, ...
def note _ list _ incremental _ offset ( self, min _ offset ) : pure _ notes = [ ] urls _ index = 0 for score, path in zip ( self. scores, self. paths ) : for part in score. getelementsbyclass ( stream. part ) : counter = 0 while counter < score. highesttime - min _ offset : stuff _ at _ offset = part. flat. getelement...
[ -0.7377705574035645, -0.9762214422225952, 0.9652478694915771, -0.18360635638237, -0.21796560287475586, 1.0381640195846558, 0.29972565174102783, -0.2816048562526703, 0.5678035616874695, -0.08861641585826874, -0.7089070677757263, 0.4054271876811981, -0.00486534321680665, -0.09201622754335403...
def inspectsymmetrical3cell ( self, cell ) : if cell. reqsides = = 3 and not cell. isfullyset ( memoize = true ) : sidelinks = cell. getunsetsidelinks ( simple = false ) for sidelink in sidelinks : # if a sidelink with len of 3 exists, if len ( sidelink ) = = 3 : # get the limbs at the two endpoints limb1 = cell. getli...
[ 0.3215330243110657, 0.30804455280303955, 0.7111615538597107, -0.2918599843978882, 0.39880895614624023, -0.2217620313167572, 0.4289264380931854, 0.3468444049358368, 0.21398651599884033, 0.3637202978134155, -0.28778842091560364, 0.9898802042007446, -0.256603866815567, -0.43646836280822754, ...
def test _ aborts _ on _ password _ prompt _ with _ abort _ on _ prompt ( self ) : env. password = none env. abort _ on _ prompts = true with password _ response ( passwords [ env. user ], times _ called = 1 ) : cache = hostconnectioncache ( ) cache [ env. host _ string ]
[ 0.2065964639186859, -0.7155129313468933, 0.45361682772636414, 0.9572156667709351, -0.12653414905071259, 0.9050743579864502, 0.15505968034267426, -0.5878432393074036, 0.6286766529083252, 0.495880126953125, 0.32293158769607544, 0.19972410798072815, -0.23703481256961823, 0.19024553894996643, ...
def demo _ bc _ plug ( c = 1, nx = 40, t = 4 ) : action = plotandstoresolution ('plug ', - 1. 3, 1. 3, skip _ frame = 1, title ='u ( 0, t ) = 0, du ( l, t ) / dn = 0. ', filename ='tmpdata') # scaled problem : l = 1, c = 1, max i = 1 l = 1. dt = ( l / nx ) / c # choose the stability limit with given nx cpu, hashed _ in...
[ -0.1552661955356598, 0.462655246257782, 0.7322529554367065, 0.6843581199645996, 0.2815217971801758, 0.35298794507980347, 0.07695005089044571, 0.0875324010848999, -0.08044341206550598, -0.36252298951148987, -1.0208749771118164, 0.4766410291194916, -0.44070038199424744, -0.08902696520090103,...
def callback ( self, callback ) : if callable ( callback ) : self. _ default _ callback = callback return callback elif isinstance ( callback, str ) : def decorator ( fn ) : self. add _ callback ( callback, fn ) return fn return decorator else : raise typeerror ( " str expected { } given ". format ( type ( callback ) )...
[ -0.5397753715515137, 0.18430708348751068, 0.388216108083725, 0.3335096836090088, -0.20154237747192383, 0.002080979524180293, -0.05236132815480232, -0.07150140404701233, 1.4340367317199707, -0.22338545322418213, 0.7860879898071289, 0.03475423529744148, -0.7994161248207092, 0.533963143825531...
def test _ exception _ criteria ( ) : foo _ with _ exception = retry. retry ( exceptions = ( arithmeticerror, ) ) ( foo ) with pytest. raises ( arithmeticerror ) as exc _ info : foo _ with _ exception ( - 1 ) assert exception _ message in str ( exc _ info. value )
[ 1.0405807495117188, 0.5594432950019836, 0.4134233891963959, 0.2501656413078308, 0.5586198568344116, 0.5688961744308472, -0.8624428510665894, 0.4934679865837097, -0.1568220853805542, 0.4393008351325989, 0.6408577561378479, 0.0831681489944458, 0.12258868664503098, 0.07696811854839325, 0.72...
def format _ keywords ( options ) : grouped _ options = collections. defaultdict ( dict ) for group _ key, val in options. items ( ) : nesting = group _ key. split ('_ _') if len ( nesting ) = = 1 : group, key ='aaaglobal ', nesting [ 0 ] elif len ( nesting ) = = 2 : group, key = nesting else : print ( nesting ) raise ...
[ 0.5438820719718933, -0.13880310952663422, 0.8177934288978577, -0.4660956561565399, -0.28981080651283264, -0.06739835441112518, -0.09310010075569153, -0.9426901936531067, -0.4275099039077759, 0.8525376915931702, 1.2679082155227661, 0.8190436959266663, -0.41237133741378784, 0.864036262035369...
def processirtimelapse ( inputfile, rotation, exportpath, date, starttime, endtime, numberofframes, dorotation = true, dorenaming = true ) : filename = os. path. basename ( os. path. normpath ( inputfile ) ) foldername = os. path. normpath ( inputfile ). split ( " / " ) [ - 2 ] prefix = " ir _ export _ " + date + " _ "...
[ -0.4959932863712311, 0.10246365517377853, 1.062146544456482, 0.35462838411331177, -0.22884336113929749, -0.004718387965112925, 0.7162929773330688, 0.005147951655089855, -0.11846457421779633, 1.0233362913131714, 0.10010893642902374, -0.5387799143791199, -0.4012824594974518, 1.06826162338256...
def view _ bpr _ menuitem _ for _ mt699 ( self, acm _ obj, submenu ) : external _ object _ for _ 699 = fswiftmlutils. fswiftexternalobject. get _ external _ object ( acm _ obj = acm _ obj, integration _ type ='outgoing ', msg _ typ ='mt699') if external _ object _ for _ 699 : submenu. additem ( self. show _ bpr, extern...
[ 1.3633254766464233, 0.34757521748542786, 0.5896726250648499, -0.203628808259964, -0.9332093596458435, 0.19426517188549042, 0.47782158851623535, -0.26014405488967896, 0.22332267463207245, -0.7989051342010498, 0.39853209257125854, 1.3140347003936768, -0.5189464688301086, -0.00269401771947741...
def generate _ field _ mappings ( fields, data ) : mapping = { } fields = [ f. replace ('','' ). lower ( ) for f in fields ] for index, field in enumerate ( data ) : field _ lower = field. replace ('','' ). lower ( ) if field _ lower in fields : # index = field _ to _ match. index ( field _ lower ) mapping [ field _ lo...
[ -0.7913669347763062, 0.045368775725364685, 0.4802761673927307, -1.2547025680541992, -0.2975442707538605, 0.17692804336547852, 0.14822879433631897, 0.8667300343513489, -0.1592852920293808, -0.3392864167690277, -0.8458483219146729, -0.7344114184379578, -0.5899957418441772, -0.725151717662811...
def serialize ( self ) : return {'name': self. name,'description': self. description,'id': self. trail _ id,'difficulty': self. difficulty,'city': self. city, }
[ -0.4037846028804779, -1.5154603719711304, 0.5156707167625427, -0.9410995244979858, -0.8441115021705627, 0.760604202747345, -0.6678341627120972, 0.13672803342342377, -0.16767515242099762, 0.07945479452610016, -2.118952751159668, -0.43675553798675537, -0.29815569519996643, 0.3898589909076690...
def bind ( self, target = none ) : if target is none : target = self. target self. ctx. glbindbuffer ( target, self. id )
[ -0.13273634016513824, -0.7529283761978149, 0.5887537598609924, 0.22743861377239227, 0.5235231518745422, 0.7710363268852234, -0.14733946323394775, -0.5637682676315308, 0.9701141119003296, -1.1575392484664917, -0.5708611011505127, 1.504367709159851, -1.0217152833938599, 0.00573047436773777, ...
def _ search _ rule ( self, route _ ids, product _ id, warehouse _ id, domain ) : if warehouse _ id : domain = expression. and ( [ ['| ', ('warehouse _ id ','= ', warehouse _ id. id ), ('warehouse _ id ','= ', false ) ], domain ] ) rule = self. env ['stock. rule'] res = self. env ['stock. rule'] stock _ quant = self. e...
[ -0.10998302698135376, -0.5083811283111572, 0.8921877145767212, 0.18548421561717987, 0.9770437479019165, -0.328004390001297, 0.17166054248809814, 0.22073166072368622, -0.004781864583492279, 0.6373046636581421, 1.2000962495803833, 1.1739999055862427, -0.10077208280563354, 0.5775295495986938,...
def reshelf ( self ) : if self. last _ shelf is not none : self. enshelf ( self. last _ shelf ) else : print ( " cannot reshelf : no previous shelf on record. " )
[ 1.4270936250686646, 0.5206658244132996, 0.4296574592590332, 0.21687309443950653, 0.9240999817848206, 0.1469266414642334, 1.308401346206665, 0.015820765867829323, -0.4602401554584503, 0.2235179841518402, -0.1285151094198227, 0.4857603907585144, -0.572798490524292, 0.800537645816803, 1.153...
def get _ truncated _ repr ( self, maxlen ) : return notimplemented
[ -0.23188400268554688, 0.3193972706794739, 0.41594427824020386, -0.934037983417511, -0.39676031470298767, 0.4640958905220032, -0.5876951217651367, -0.34057849645614624, 0.9033516645431519, 0.2324821650981903, -0.7016493678092957, 0.6316958665847778, -0.5184077024459839, -0.6528180837631226,...
def ui _ deployment _ conditions ( ) : platform = config. env _ data [ " platform " ] ocp _ version = get _ ocp _ version ( ) ocs _ version = config. env _ data. get ( " ocs _ version " ) is _ arbiter = config. deployment. get ( " arbiter _ deployment " ) is _ lso = config. deployment. get ( " local _ storage " ) is _ ...
[ -0.903100311756134, -0.40649285912513733, 0.8545722365379333, -0.3723391592502594, -0.14266934990882874, 0.9364644289016724, -0.34971460700035095, -0.4202935993671417, -0.30796927213668823, 0.4192131757736206, 0.37064167857170105, -0.23496614396572113, -0.4454646706581116, 0.05859678238630...
def issymbolic ( self ) : return self. _ impl. issymbolic ( )
[ 0.07201339304447174, 1.245517373085022, 0.5227141976356506, 0.6306880712509155, 0.5455754399299622, -0.37070441246032715, 0.2200181484222412, -0.22068698704242706, 0.10332083702087402, -0.20389588177204132, -0.7122750878334045, 0.7779768705368042, 0.21189264953136444, 0.23399683833122253, ...
def set _ floor _ tiles ( self ) : for tile in self. floor : tile. set _ type ( tiletypes. floor )
[ 0.08703523129224777, -0.08918929100036621, 0.4429384469985962, 0.5427824258804321, 0.8538215160369873, 0.20270994305610657, 0.663536787033081, -0.6067379713058472, 0.019404875114560127, -0.5368151664733887, -0.9028751254081726, 0.026979364454746246, -0.40489834547042847, 2.557541847229004,...
def _ get _ checksum ( self ) : return self. _ _ checksum
[ 0.13925254344940186, -0.6402974724769592, 0.3650059998035431, -0.2955275774002075, 0.27620723843574524, -0.1852138489484787, 0.49569544196128845, -0.18385228514671326, 0.3835236132144928, -1.3012464046478271, 0.43245697021484375, 0.13860714435577393, 0.1855757087469101, -0.5460901856422424...
def bonded _ beads _ distance _ whole _ sidechain ( simname, coord _ loc = [ 3, 6 ], save = false ) : bonded _ beads _ distance _ list = [ ] df, boxsize _ whole = extract. extract _ unwrapped ( simname, boxsize _ whole = true ) for key in df : coord = df [ key ] coord. sort _ values ( by = ['id'], inplace = true ) chai...
[ 0.035961560904979706, -0.47681909799575806, 0.8648017048835754, -0.27548423409461975, 0.3895282447338104, 0.17624694108963013, 0.7982819080352783, -0.14296160638332367, 0.2013399302959442, 0.4531635344028473, -0.93048095703125, 0.35600054264068604, -0.9892953634262085, 0.5470142960548401, ...
def set _ name ( self, name ) : assert ( name is none ) or is _ string ( name ), " argument'name'should be a string or none, not'{ }'of type { } ". format ( name, type ( name ) ) if name is not none : name = make _ unicode ( name ) self. name = name return self
[ -1.1196237802505493, -0.07747692614793777, 0.6052212119102478, -0.6082987785339355, -0.6159220933914185, -0.3282598555088043, 0.214552104473114, 0.23585718870162964, 0.20206283032894135, 0.5192772150039673, -1.009932518005371, -0.09713087975978851, -0.10969335585832596, -0.0159538257867097...
def open ( cls, file ) : return cls. from _ bytes ( read _ file ( file ) )
[ 0.24698776006698608, -0.4483947455883026, 0.181923970580101, -0.2208096981048584, -0.4756970703601837, 1.2095646858215332, -0.05497219040989876, 0.8751063942909241, -0.529399573802948, -0.7716260552406311, 0.2277546375989914, -0.35262131690979004, -0.05649193003773689, -0.6273855566978455,...
def gethandle ( self ) : return _ dico. dico _ stackitemofdictionaryoftransient _ gethandle ( self )
[ 0.48917484283447266, 0.29431527853012085, 0.1880117803812027, -0.3281509280204773, 1.0668449401855469, 0.030914846807718277, 0.1659393310546875, -0.4361107349395752, -0.44900965690612793, -0.31572532653808594, 0.11135266721248627, -1.739311933517456, -0.47176438570022583, -0.69091659784317...
def http _ worker ( port, path ) : if ( port is none ) = = ( path is none ) : log. error ( " you must specify exactly one of - - path or - - port " ) sys. exit ( exitcode. usage ) try : cosmic _ ray. distribution. http. run _ worker ( port = port, path = path ) except valueerror as exc : log. error ( str ( exc ) ) sys....
[ -0.2833634316921234, -0.40333572030067444, 0.8631442189216614, 0.09101109951734543, 0.40743476152420044, 0.928051233291626, 0.1288921982049942, 0.03372674807906151, -0.9024501442909241, 0.10334666073322296, 0.04270702227950096, 0.08892237395048141, -0.40136873722076416, -0.0910204127430915...
def test _ add _ additional _ context ( self ) : self. old _ manifest. add _ additional _ context ( {'testme':'testyou'} ) assert'testme'in self. old _ manifest. additional _ context _ variables self. old _ manifest. add _ additional _ context ( {'testhim':'testher'} ) assert'testme'in self. old _ manifest. additional ...
[ 0.7216131687164307, -0.6173943877220154, 0.7782099843025208, 0.11593859642744064, -0.5665050148963928, 0.4531424641609192, -0.2684060037136078, 0.03899024426937103, 1.358536720275879, -0.3850589096546173, -0.446148157119751, 0.2543802559375763, 0.01723155938088894, 0.12014047056436539, -...
def tag ( self ) : return self. _ _ tag
[ 0.3659549951553345, -0.7223606705665588, 0.3081321716308594, -0.45999154448509216, 0.683563232421875, 1.500220775604248, 0.7448824048042297, 0.05408172681927681, -0.12758022546768188, -1.3550318479537964, -0.2285754233598709, 0.2626095116138458, -0.36503341794013977, 0.26103463768959045, ...
def end _ date ( self, end _ date ) : self. _ end _ date = end _ date
[ 0.42707589268684387, 0.22155839204788208, 0.14681893587112427, 0.565329372882843, 0.4963799715042114, 1.1886998414993286, -0.6292889714241028, 1.6774214506149292, -1.0904817581176758, -0.2134479582309723, -0.609112024307251, 0.6193667054176331, -0.040374238044023514, 1.340773105621338, 0...
def check _ deb _ installed ( pkg ) : try : run ('dpkg - query - w { } '. format ( pkg ), shell = true, check = true, stdout = devnull, stderr = devnull ) except calledprocesserror : return false return true
[ -0.7124102115631104, 0.8640182018280029, 0.5770975947380066, -0.08650824427604675, 0.17344218492507935, 0.23616613447666168, -0.45664727687835693, -0.03376726806163788, 0.3026005029678345, -0.41360971331596375, -0.11110197752714157, -0.8802244067192078, -0.13591289520263672, 0.811499059200...
def filter ( self, * args ) : with self. _ cm. session _ scope ( ) as session : objs = none try : objs = session. query ( self. _ model ). filter ( * args, ) except exception : raise finally : return objs
[ -0.8057026863098145, -0.20654428005218506, 0.39370810985565186, 0.6953356862068176, 0.14882399141788483, -0.2639300525188446, -0.0008068670867942274, -1.117432713508606, -0.38975006341934204, 0.3379799425601959, -0.05943526700139046, 0.0828448161482811, -0.6681643724441528, -0.433935850858...
def convert _ to _ cnf ( self ) : # eliminate implication if self. is _ implication : for idx in range ( len ( self. predicates ) - 1 ) : ~ self. predicates [ idx ]
[ -0.5561846494674683, -0.1127120852470398, 0.4172692596912384, 0.26348912715911865, -0.17968010902404785, -0.23201820254325867, 0.4561140835285187, 1.5442856550216675, -0.6006742715835571, 1.1688536405563354, -0.5937122702598572, 0.5217012763023376, -0.7514529824256897, -0.09820134937763214...
def writeurls ( properties ) : urlfile = " " " from django. conf. urls import include, patterns, url from django. contrib import admin admin. autodiscover ( ) urlpatterns = patterns ('', url ( r'^ admin / ', include ( admin. site. urls ) ), " " " for url in globs. urls : urlfile + = tabify ( url + ", ", 1 ) urlfile + =...
[ 0.41336318850517273, 0.4894457459449768, 0.3447114825248718, -0.05271994322538376, 0.8315505981445312, 0.7201783061027527, 0.452384352684021, 0.5761635303497314, -0.14492015540599823, 0.13750921189785004, -0.24488615989685059, 0.24976712465286255, -0.08221843838691711, 0.7924187183380127, ...
def discriminator ( images, reuse = false, net = { } ) : alpha = 0. 2 with tf. variable _ scope ('discriminator ', reuse = reuse ) : # using 4 layer network as in dcgan paper # conv 1 net ['conv1'] = tf. layers. conv2d ( images, 32, 5, 2,'same') net ['lrelu1'] = tf. maximum ( alpha * net ['conv1'], net ['conv1'] ) # co...
[ -0.30509769916534424, -0.21655534207820892, 0.7295755743980408, -0.17194586992263794, 0.008572676219046116, 0.07136429846286774, 0.37061014771461487, 0.8709586262702942, 0.41771313548088074, -0.2510250210762024, -0.553885281085968, -0.8934077024459839, 0.10898401588201523, 0.49177029728889...
def dead _ letter _ secret ( self ) - > optional [ str ] : return pulumi. get ( self, " dead _ letter _ secret " )
[ 0.0001240390120074153, -0.29986101388931274, 0.6062278747558594, 0.6588720679283142, 0.4589131474494934, 1.0057324171066284, -0.6155792474746704, -0.6596752405166626, 0.904672384262085, 0.1584967076778412, -0.5179088711738586, 1.10588800907135, 0.2839794456958771, -0.9048024415969849, -0...
def winbio _ winbioenrollbegin ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " subfactor ", " unitid " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.14758799970149994, -0.29898470640182495, 0.5425344705581665, 0.8523734211921692, -0.19433331489562988, 1.3809082508087158, 1.146094799041748, -0.24481201171875, 0.30876681208610535, 0.20394223928451538, -0.541425347328186, 1.5669113397598267, -0.7106101512908936, 0.5305511355400085, -...
def lint _ returns ( page _ info : parser. pageinfo ) - > optional [ api _ report _ pb2. returnlint ] : source = _ get _ source ( page _ info. py _ object ) if source is not none and'return'in source : for item in page _ info. doc. docstring _ parts : if isinstance ( item, parser. titleblock ) : if item. title. lower (...
[ 0.593608021736145, -0.9663036465644836, 0.6867125034332275, -0.2435850203037262, 0.16388987004756927, -0.010835478082299232, -0.6081239581108093, -0.942685604095459, -0.05482165887951851, 0.10903184115886688, 0.6794435381889343, -0.317826509475708, -1.6358776092529297, 0.3628568947315216, ...
def time _ stats ( df ) : print ('\ ncalculating the most frequent times of travel... \ n') start _ time = time. time ( ) # display the most common month if not'month'in filters : month = df. groupby ('month'). size ( ). sort _ values ( ascending = false ) print ('the most popular month was { } with { } trips. '. forma...
[ 0.49131911993026733, 0.8698115348815918, 0.9365728497505188, -0.2876191735267639, -0.0271441750228405, -0.5385477542877197, 0.7582113146781921, -0.6032956838607788, -0.5442283749580383, -0.05974854528903961, 0.16364546120166779, 0.17489221692085266, 0.8251450657844543, 0.8361459970474243, ...
def _ _ init _ _ ( self, parser, writable _ column _ types = none, experiment _ id _ column ='experiment _ id ', server _ name = none ) : assert isinstance ( writable _ column _ types, dict ), " writable _ column _ types has to be a dict " self. parser = parser self. experiment _ id _ column = experiment _ id _ column ...
[ -0.38807931542396545, -0.33344706892967224, 0.6929226517677307, 0.48660406470298767, 0.24225734174251556, -0.22159962356090546, -0.14705508947372437, 0.2200653851032257, -0.6943197846412659, -0.0673474371433258, -0.5912603735923767, 0.639176607131958, -0.3917478322982788, 0.347429782152175...
def get _ tweet _ peak _ events ( self ) : # get peak dates and counts peak _ dates _ count = self. get _ tweet _ peak _ dates ( ) self. trailers _ df [ " date " ] = self. trailers _ df. apply ( lambda row : row [ " publishdate " ]. date ( ), axis = 1 ). astype ('datetime64 [ ns ]') # include + 1 for trailer dates to t...
[ -0.399893194437027, 0.05472170561552048, 0.7225715517997742, -0.050620704889297485, 0.5969833135604858, -0.5589476227760315, -0.01712220162153244, 0.7385692596435547, -0.3030225932598114, 0.5859305262565613, 0.07077941298484802, 0.30503731966018677, -0.0662706196308136, 0.7427068948745728,...
def get _ or _ create ( self, tname, pexpr, kbldr, xbldr ) : # build normalized value key ( needed to check with previous value in case it has been changed ) try : kval = kbldr ( pexpr ) except typeerror : raise cpoexception ( " impossible to build a cp optimizer expression from value'{ }'of type'{ }'". format ( to _ s...
[ -0.6442779302597046, -0.02104516699910164, 0.6629467606544495, 0.15958943963050842, -1.147305965423584, 0.08588739484548569, 0.014306174591183662, -0.2785188853740692, -0.44923606514930725, 1.1260265111923218, -0.29418209195137024, -0.22744740545749664, -0.4626772999763489, 0.1139867529273...
async def received _ client _ receipt ( self, room _ id, receipt _ type, user _ id, event _ id ) : receipt = readreceipt ( room _ id = room _ id, receipt _ type = receipt _ type, user _ id = user _ id, event _ ids = [ event _ id ], data = { " ts " : int ( self. clock. time _ msec ( ) ) }, ) is _ new = await self. _ han...
[ 0.16703136265277863, -0.20686203241348267, 0.39912620186805725, 0.11648950725793839, 0.1630311757326126, -0.14491337537765503, -0.30633819103240967, -0.43077924847602844, 0.15997064113616943, 0.020871197804808617, -0.15720485150814056, 0.5205513834953308, 0.48348867893218994, -0.2762776911...
def find _ substrings ( a, n ) : result = [ ] i = 0 while ( i + n ) < len ( a ) + 1 : result. append ( a [ i : i + n ] ) i + = 1 return result
[ 0.36353838443756104, 0.6679894328117371, 0.2618190050125122, 0.10904556512832642, -0.248297318816185, -0.16605758666992188, 0.3919595181941986, -0.6759200096130371, 0.26606687903404236, 0.2131933569908142, -0.4363386034965515, 0.18055139482021332, -0.49962249398231506, 0.28718703985214233,...
def test _ trying _ to _ update _ block _ with _ no _ available _ block ( self, mock _ tz ) : mock _ tz. now. return _ value = datetime ( 2015, 1, 10, tzinfo = dt _ timezone. utc ) event _ type = baker. make _ recipe ('booking. event _ type _ pc') event _ type1 = baker. make _ recipe ('booking. event _ type _ pc') even...
[ -0.5111802220344543, 0.2797110676765442, 0.70728600025177, 0.9980903267860413, -0.1718016415834427, 0.7239938974380493, 0.215755894780159, -0.1317240297794342, -0.9263119101524353, 0.3196910321712494, -0.48095518350601196, 0.0379796177148819, -0.5526207685470581, 0.6574259996414185, 1.23...
def dict _ to _ model ( obj : object, * * data ) : obj. _ _ dict _ _. update ( data ) return obj
[ -1.4089769124984741, -0.9492382407188416, 0.4948827922344208, -0.8822913765907288, -0.23767241835594177, 0.9304901361465454, -0.7637712955474854, 0.16647784411907196, 0.3510827124118805, 0.40931227803230286, -1.0798490047454834, -0.16634495556354523, 1.064363718032837, -0.7458097338676453,...
def arabic ( self ) : return self. _ arabic
[ 0.7196638584136963, -0.8000406622886658, 0.142453134059906, -0.0311556626111269, -0.2978685200214386, 1.1928070783615112, 0.7927541136741638, -0.08493680506944656, 0.30149757862091064, -0.6419557332992554, 1.5790942907333374, 1.0407503843307495, 0.2397945523262024, -0.878438413143158, 0....
def set _ id ( self, id ) : if id is not none and not isinstance ( id, int ) : raise sdkexception ( constants. data _ type _ error,'key : id expected type : int ', none, none ) self. _ _ id = id self. _ _ key _ modified ['id'] = 1
[ -1.360551118850708, 0.3332587778568268, 0.22895856201648712, 0.1019023135304451, -0.0936715379357338, 0.40100622177124023, -0.25675708055496216, 0.15340711176395416, 0.6206218600273132, 0.6483283042907715, -0.6026663780212402, 0.5684593319892883, -0.4945487082004547, 1.0596927404403687, ...
def seed ( self, seed = none ) : seed = seed if seed else random. randint ( 0, sys. maxsize ) self. rand = random. random ( seed ) return seed
[ 0.5035228133201599, 0.4213463068008423, 0.3657703995704651, -0.23160874843597412, -0.08035961538553238, 0.10047267377376556, 0.37991705536842346, 0.8598816394805908, 1.2525981664657593, -1.6759989261627197, 0.028629101812839508, 0.5825066566467285, -1.1350759267807007, 0.791904091835022, ...
def adjust _ temp ( df : pd. dataframe, alt : int ) : # default temperature difference by 100 meters temp _ diff = 0. 6 # temperature - like columns temp _ like = ( " temp ", " dwpt ", " tavg ", " tmin ", " tmax " ) # adjust values for all temperature - like data for col _ name in temp _ like : if col _ name in df. col...
[ -0.4471491873264313, -0.15396270155906677, 0.527518093585968, -0.21599504351615906, -0.6102706789970398, 0.8359508514404297, -0.11380267143249512, 0.5974258184432983, -0.852330207824707, 0.4435633718967438, 0.3211505711078644, 0.058390289545059204, 0.947403609752655, 0.6224563121795654, ...
def _ _ init _ _ ( self, auto _ scaling _ group _ no = none, activity _ no = none, server _ instance _ no = none, zone _ code = none, action _ name = none, action _ status = none, action _ cause = none, action _ description = none, start _ time = none, end _ time = none ) : # noqa : e501 # noqa : e501 self. _ auto _ sc...
[ 0.10278330743312836, -0.1030256599187851, 0.5366673469543457, 0.1305273175239563, -0.36924678087234497, -0.37216055393218994, 0.5139297246932983, 0.12253115326166153, 0.14098921418190002, 0.5421321988105774, -0.5261431336402893, 1.3985648155212402, 0.05111469700932503, 0.4009086787700653, ...
def make _ list _ from _ csv ( inp ) : if isinstance ( inp, str ) : return map ( lambda x : x. strip ( ), inp. split ( ", " ) ) return make _ list ( inp )
[ -0.2839547097682953, -0.6312255263328552, 0.28719258308410645, 0.12383704632520676, -0.6111108064651489, 0.4726741909980774, -0.7979665398597717, 1.2896459102630615, 1.4147247076034546, -0.057351209223270416, -0.9494190812110901, 0.6620520353317261, 0.001244613085873425, -0.062192074954509...
def setup ( ) : server = pyo. server ( ). boot ( ) server. start ( ) return server
[ -0.13537241518497467, -0.7215263247489929, 0.4263891279697418, 0.40055903792381287, 0.4878315031528473, -0.4180738031864166, 0.056271135807037354, -0.715116024017334, 0.9086270332336426, -0.5346181988716125, -0.743401050567627, 0.23381412029266357, -0.8340392708778381, 0.4277377426624298, ...
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : optional [ launchtemplateargs ] = none, opts : optional [ pulumi. resourceoptions ] = none ) :...
[ 0.47522127628326416, -0.07271984964609146, 0.6086903214454651, -0.3329101800918579, -0.9137733578681946, -0.10648007690906525, -0.24360279738903046, 0.8904135823249817, 1.196965217590332, 0.24268469214439392, -0.5453030467033386, 0.3633851408958435, 0.3939564824104309, -0.5559048056602478,...
def adjust _ learning _ rate ( iter ) : # lr = args. lr * ( 0. 1 * * ( epoch / / 30 ) ) if iter = = 1 : return 5e - 3 elif iter > = 4 : return 1e - 4 else : return 1e - 3
[ -0.10214509069919586, 0.056424856185913086, 0.33197858929634094, -0.5790276527404785, -0.03106028400361538, 0.847661018371582, -0.47129541635513306, -0.05365047976374626, -0.14081595838069916, 0.001245961058884859, 1.299818992614746, 0.07743564248085022, -0.6344327330589294, 0.747602045536...
def _ _ call _ _ ( self, inc = true ) : with self. _ lock : if inc : self. _ value = self. _ value + 1 return self. _ value
[ -0.9007185101509094, 0.9119804501533508, 0.6641688346862793, 0.17390218377113342, -1.3876539468765259, 0.26298192143440247, 1.1708569526672363, -0.9661256074905396, -0.6023752093315125, -0.8335614204406738, 0.07024706900119781, 0.02804907225072384, -0.8588548302650452, -0.18651148676872253...
def fetchall ( self ) : records = [ ] record = self. fetchone ( ) while record is not none : records. append ( record ) record = self. fetchone ( ) return records
[ 0.32684326171875, -0.10160086303949356, 0.2668510973453522, 0.7502189874649048, 0.7459464073181152, -0.42813554406166077, -0.8088045716285706, -0.4093421399593353, -0.0013323937309905887, -0.570284366607666, -0.4763006567955017, -0.24303501844406128, -0.5251628160476685, 0.8557822704315186...
def before _ script ( self ) : self. return _ home ( )
[ 0.5352649092674255, -0.027582908049225807, 0.39618027210235596, 0.6885966658592224, 0.31869715452194214, -0.6907351016998291, 1.406303882598877, -0.4331910014152527, 0.7677827477455139, 0.5648212432861328, -0.23783276975154877, 1.0661695003509521, -0.38756611943244934, 0.29917609691619873,...
def test _ cant _ update _ car _ invalid _ parameters ( self ) : json _ response = api _ call ( self, " put ",'/ car / update ', dict ( id = 257, year = 2015 ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 404 ) self. assertequal ( json _ response [ " message " ], " car not found " ) json _ re...
[ -0.9222198724746704, -0.7591943144798279, 1.030515432357788, -0.08320853859186172, -0.001109108212403953, 0.6517968773841858, -0.2509070038795471, -0.2519203722476959, -0.7952445149421692, 0.22667595744132996, -0.8103194236755371, 0.026891661807894707, -0.5630782246589661, 0.35903313755989...
def get _ all ( ) : ret = set ( ) lines = glob. glob ( " / etc / init. d / * " ) for line in lines : service = line. split ( " / etc / init. d / " ) [ 1 ] # remove readme. if it's an enabled service, it will be added back in. if service! = " readme " : ret. add ( service ) return sorted ( ret | set ( get _ enabled ( ) ...
[ -0.029997099190950394, 0.0830053761601448, 0.4715127944946289, 0.7758431434631348, 0.3193903863430023, 0.15792979300022125, -0.9010672569274902, 0.2749096155166626, -0.5107907652854919, -0.09444606304168701, 0.22679097950458527, 0.33702486753463745, -0.6285221576690674, 0.4794035851955414,...
def str2int _ list ( str ) : return [ int ( s. strip ( ) ) for s in str [ 1 : - 1 ]. split ( ", " ) ]
[ -0.45297521352767944, -1.0775129795074463, 0.44033682346343994, -0.2718914747238159, 0.7274381518363953, 0.22944903373718262, -0.40388089418411255, 1.5276005268096924, 0.3033759593963623, 0.655678927898407, -0.9896885752677917, 0.6514142751693726, -0.5648846626281738, -0.4982512295246124, ...
def update _ sample ( self, idx ) : self. _ update _ common _ subjects ( idx ) self. x = self. x [ idx, : ] if self. y is not none : self. y = self. y [ idx ]
[ -0.8731086254119873, -0.6116903424263, 0.35351428389549255, -1.2705696821212769, -1.0159121751785278, -0.14307311177253723, 0.1791532188653946, -1.0090181827545166, 0.7869732975959778, 0.22723399102687836, 0.2646007537841797, 1.0732755661010742, -0.38495197892189026, -1.0309984683990479, ...
def create _ test _ user ( self, username, * * kwargs ) : return self. create _ user ( username, is _ active = true, * * kwargs )
[ 0.034004177898168564, -0.0694693922996521, 0.07594451308250427, 0.4703564941883087, 0.7010325193405151, 0.2278067022562027, 0.7793738842010498, -0.6933975219726562, 0.1068347617983818, -0.4551341235637665, -1.0464222431182861, -0.6970190405845642, -1.5766884088516235, -0.7005012631416321, ...
def test _ inf _ values ( ) : assert all ( np. isfinite ( test _ df. select _ dtypes ( include = ['float64 ','int64'] ) ) )
[ 0.40965715050697327, 1.327491044998169, 0.3088713586330414, 1.473642110824585, 0.9697653651237488, -0.13662058115005493, 0.013993024826049805, 0.2565993070602417, -0.5430077910423279, -0.321977436542511, -0.28453055024147034, 0.11673697084188461, -1.3926409482955933, 0.34399616718292236, ...
def test _ serve _ build _ with _ project ( self ) : pass
[ 0.13259370625019073, -0.06695134192705154, 0.2768637537956238, 1.6600472927093506, 0.12923739850521088, 1.7731515169143677, 1.746660590171814, -0.693292498588562, -0.5440589189529419, -0.5389063358306885, -0.5679681301116943, 0.839137077331543, -0.5927591919898987, 0.6555550694465637, -0...
def get _ user _ name _ password ( ip _ address, port, user _ name, password ) : cmd = f'gnome - terminal - - bash - c " sshpass - p { password } ssh { user _ name } @ { ip _ address } echo processing start ; { cmd _ list } echo processing end ; read line "'return cmd, version
[ -0.7053101658821106, -0.9823467135429382, 0.5476597547531128, 0.7053744196891785, -0.2819015085697174, 0.06886830180883408, -0.7705497741699219, 0.023316631093621254, -1.1671403646469116, 0.4211997091770172, -0.2578730285167694, 0.7240744829177856, 0.7598146200180054, -0.5253182649612427, ...
def fast _ compute _ naive ( initial _ register = [ 0 ] * 6 ) : r = initial _ register [ : ] # setup if r [ 0 ] = = 0 : r [ 1 ] = 900 else : r [ 1 ] = 10551300 for r5 in range ( 1, r [ 1 ] + 1 ) : r [ 5 ] = r5 for r4 in range ( 1, r [ 1 ] + 1 ) : r [ 4 ] = r4 if r [ 4 ] * r [ 5 ] = = r [ 1 ] : r [ 0 ] + = r [ 5 ] retur...
[ 0.32779207825660706, 0.382659912109375, 0.37668678164482117, 0.4504784047603607, 0.2092282623052597, -1.5005090236663818, 0.6541429758071899, -0.02378399483859539, 0.47599148750305176, -0.02503296360373497, -0.3823356032371521, 0.21482785046100616, -0.677268385887146, 0.562582790851593, ...
def ub ( self ) : return self. get _ domain _ max ( )
[ -0.14329373836517334, 1.0245980024337769, 0.6129160523414612, 1.231602430343628, 0.6728212833404541, 0.6949034333229065, 0.3478868007659912, 0.43352293968200684, 0.4388141632080078, -1.1471072435379028, -0.3784266412258148, 1.067577838897705, 0.04408515989780426, -0.3151066303253174, -0....
def print _ room _ info ( self ) : print ( " you're in room number { 0 }. { 1 } ". format ( self. current _ room ['number'], self. current _ room ['info'] ) ) print ( room _ ascii. get _ room _ art ( self. current _ room ['number'] ) )
[ -0.09204833209514618, -1.2488206624984741, 0.45238450169563293, 0.1647423803806305, -0.29223912954330444, 0.6071559190750122, 0.25281065702438354, 0.09460795670747757, -0.54942387342453, -0.10580407828092575, -0.1803314983844757, 1.4660362005233765, 0.042556215077638626, 0.0770468860864639...
def plotstdlimits ( self, ax, values, vmin, vmax, no _ std, line _ color, plot _ axis, plot _ upper, plot _ lower ) : if plot _ axis not in [ " x ", " y " ] : raise valueerror ( plot _ axis ) lower, upper = self. getupperandlowerlimit ( values, no _ std ) if plot _ upper : if plot _ axis = = " x " : ax. axhline ( y = u...
[ 0.7923768758773804, 0.26009950041770935, 0.6745114326477051, -0.07398974150419235, -0.5359049439430237, 0.9207584857940674, -0.5136907696723938, -0.213646799325943, -0.21708743274211884, -0.13714317977428436, 0.41491636633872986, 1.1999541521072388, 0.3166765868663788, -0.33281588554382324...
def factorial ( n ) : return ( reduce ( mult, range ( 1, n + 1 ) ) ) " " " applies the multiplication definition to the range of numbers from 1 to the input n and returns n! " " "
[ -0.26428669691085815, 0.6608288884162903, 0.27395087480545044, 1.2352932691574097, -0.16499799489974976, -0.5086399912834167, 0.5747330188751221, 0.2673313617706299, 0.5780037045478821, -1.0207579135894775, -0.6082075834274292, 0.5704614520072937, -0.0555584616959095, 0.8260421752929688, ...
async def test _ main _ new ( mocker : mockerfixture ) - > none : new = mocker. patch ( " nefelibata. console. new " ) new. run = mocker. asyncmock ( ) mocker. patch ( " nefelibata. console. docopt ", return _ value = { " - - loglevel " : " debug ", " init " : false, " new " : true, " build " : false, " publish " : fal...
[ -0.12715770304203033, 0.23406369984149933, 0.47356775403022766, 0.3389143645763397, 0.4991069734096527, 0.6139254570007324, -0.19204683601856232, -0.691938042640686, -0.6352427005767822, -0.20292526483535767, -0.2389022707939148, 0.31264567375183105, 0.10602955520153046, 0.6234250068664551...
def update _ entry ( self, entry _ id : int, entry _ text : str ) : self. entry _ id = entry _ id text _ links = self. master. linker. param _ entry _ text _ link ( self. entry _ id ) self. linked _ text = " " if text _ links and text _ links [ 0 ]. name and text _ links [ 0 ]. name! = entry _ text : self. linked _ tex...
[ -0.17443569004535675, -1.1902918815612793, 0.3764691650867462, -0.487017959356308, 0.0038547960575670004, 0.08192024379968643, -0.4442068040370941, 0.3351059854030609, 0.8407948017120361, 0.43455109000205994, 0.13897790014743805, 0.8708809018135071, -0.1362517923116684, 0.37924453616142273...
def _ _ create _ vm ( self, session, db _ session : session, node : node, custom _ data : optional [ union [ str, none ] ] = none, tags = none ) - > noreturn : vm _ name = get _ vm _ name ( node. name ) self. _ logger. debug ('_ _ create _ vm ( ) : vm _ name = [ % s ] ', vm _ name ) # create network interface nic = sel...
[ -0.4501246511936188, 0.947235107421875, 0.34207379817962646, -0.5572740435600281, 0.7556107640266418, -0.34286102652549744, -0.49994373321533203, -0.39736199378967285, -0.3466198444366455, 0.6216223835945129, -0.021533610299229622, -0.675518274307251, 0.014983284287154675, 0.02020511589944...
def draw _ callback ( self, event ) : # get the background self. background = self. canvas. copy _ from _ bbox ( self. axes ['main']. bbox ) # set the axis transform trans = mtransforms. blended _ transform _ factory ( self. axes ['main']. transdata, self. axes ['main']. transaxes ) self. draw _ fitregions ( trans ) se...
[ 1.0128262042999268, 0.00040435791015625, 0.4546135365962982, -0.5130783319473267, 0.5021679997444153, 0.689813494682312, 0.8480995893478394, -0.046912480145692825, 0.17317570745944977, -0.7496671080589294, 0.37645021080970764, 0.6154693961143494, 0.1759638488292694, -0.000431109219789505, ...
def _ default _ buttons ( self ) : # only show the close button if the dock widget is closable. if int ( self. features ( ) ) % 2 = = 1 : # close button. @ self. add _ button ( name ='close ', text ='' ) def on _ close ( e ) : # pragma : no cover if not self. confirm _ before _ close _ view or show _ box ( prompt ( " c...
[ -0.5961214303970337, 0.8867979049682617, 0.6977051496505737, 0.5718501210212708, 0.28440436720848083, 0.21107560396194458, 0.6091925501823425, 0.11472673714160919, 0.24965384602546692, -0.8073959946632385, -0.25726041197776794, -0.0792953297495842, 0.23827145993709564, 0.9569997191429138, ...
def with _ zeros ( self, x ) : return np. vstack ( ( x, np. array ( [ [ 0. 0, 0. 0, 0. 0, 1. 0 ] ] ) ) )
[ 0.047257158905267715, -0.37598443031311035, 0.5163198709487915, 0.30558621883392334, 0.4876517355442047, -0.06443660706281662, -0.9007853269577026, -0.7977873086929321, 0.5431201457977295, 0.23068557679653168, 0.01604628749191761, 0.5879929065704346, 0.029467426240444183, 0.983035206794738...
def test _ create _ survey _ package _ instance _ fail ( self, client ) : body = create _ survey _ package _ instance _ body ( " 000001 ", fake = true ) old _ amount = len ( client. all _ survey _ package _ instances ( record = " 000001 " ) ) with pytest. raises ( castorexception ) as e : client. create _ survey _ pack...
[ -0.8689086437225342, 0.6095288395881653, 0.49804869294166565, 0.05602620542049408, -0.359912633895874, 0.8659953474998474, -0.3106347620487213, -0.5285505056381226, 0.2894531488418579, 0.2631709575653076, -0.9271441102027893, -0.11181262135505676, -0.03374669328331947, 0.6967427730560303, ...
def render _ object ( o, xmin, ymin, xsize, ysize, img _ size ) : triangles = np. asarray ( list ( o. get _ triangles ( ) ), dtype = np. float32 ) return topdownview. render _ object _ helper ( triangles, xmin, ymin, xsize, ysize, img _ size )
[ 0.2042524814605713, -0.2543087303638458, 0.4977547526359558, -0.7082133889198303, -1.368575096130371, 0.1520203799009323, 0.40280312299728394, -0.844921350479126, 1.0232008695602417, -0.5091818571090698, 0.19334831833839417, 0.42941442131996155, 0.6150764226913452, -0.7996670007705688, -...
def igamc ( a : float, x : float ) - > float : return scipy _ special. gammaincc ( a, x )
[ 1.0781829357147217, -0.20105230808258057, 0.2814258933067322, -0.23482541739940643, -0.0515219122171402, -0.004956464748829603, 0.27174490690231323, -0.3483261466026306, -0.5225182771682739, 1.257523775100708, 0.6478679776191711, 1.3169232606887817, -0.19349178671836853, -0.826787352561950...
def merge _ dicts ( * dicts ) : res = { } for d in dicts : if d is not none : res. update ( d ) return res
[ -0.7854536771774292, 0.48701047897338867, 0.5171445608139038, -0.40002113580703735, -0.263496071100235, -1.1725842952728271, -0.8355199694633484, 0.27886343002319336, 0.06194585934281349, -0.3198994994163513, -0.3926314115524292, -1.3567947149276733, -0.529695987701416, 0.2735927700996399,...
def createcircuittask ( self, shots : int, backend : str, qbits : int, backendparam : list [ union [ str, enum ] ], modules : list [ tuple [ str, any ] ], notes : str, debug : optional [ str ] = none ) - > none : if notes is not none : if len ( notes ) < = 1 : notes = none elif len ( notes ) > define. maxnoteslen : pri...
[ 0.15248993039131165, -0.09188239276409149, 0.5894685387611389, 0.25270119309425354, 1.1008464097976685, -0.22933921217918396, -0.06721097230911255, -0.20793786644935608, -0.33223283290863037, 0.9518105387687683, -0.8682764768600464, 0.8739545345306396, -0.7611965537071228, 0.66391760110855...
def max _ inflight _ messages _ set ( self, inflight ) : if inflight < 0 : raise valueerror ('invalid inflight.') self. _ max _ inflight _ messages = inflight
[ -0.25420403480529785, -0.4310576319694519, 0.46772143244743347, 0.37861168384552, 0.01162760891020298, 1.1279600858688354, -0.6081857085227966, -0.3890717029571533, -0.06345698237419128, -0.06421828269958496, -0.3347756862640381, -0.2183801680803299, -1.0334652662277222, 0.4641931354999542...
def run ( cmd ) : print ('\ nrunning :'+ shlex. join ( cmd ) +'\ n') return subprocess. call ( cmd )
[ 0.2342362105846405, -0.17784759402275085, 0.5754650235176086, -0.177971750497818, -0.3609403669834137, 1.2448279857635498, -0.10319162905216217, 0.12284557521343231, -0.44466471672058105, -0.8694536685943604, 0.09953044354915619, 0.7431532144546509, -0.7474879622459412, -0.3768518269062042...
def get _ account ( self, account _ id ) : account = account _ profile. onedriveaccount ( self. config ['accounts'] [ account _ id ] ) return account. get _ account ( )
[ 0.49312451481819153, -0.1573769599199295, 0.13844700157642365, 0.8188560605049133, 1.1911258697509766, -1.0896495580673218, 0.7605228424072266, -0.333930641412735, 1.2823381423950195, -0.17199726402759552, 1.1491891145706177, 0.9934819340705872, -0.7230772972106934, 0.49384772777557373, ...
def insert ( self, index, item ) : return self. _ execute _ script ('insert ', self. key, index, self. client. encode ( item ) )
[ -0.9245985150337219, 0.9173416495323181, 0.2653384506702423, 0.0675307959318161, 0.38643020391464233, 0.2080439329147339, -0.37326812744140625, -0.8389906883239746, -0.23595097661018372, 0.6265162229537964, -1.3432945013046265, 0.15566930174827576, -2.1561079025268555, -1.6090606451034546,...
def update _ observation ( observation _ id : int, * * params ) - > listresponse : photos, sounds, _, params, kwargs = convert _ observation _ params ( params ) response = put ( url = f'{ api _ v0 } / observations / { observation _ id }. json ', json = {'observation': params }, * * kwargs, ) if photos : upload _ photos...
[ -1.4105525016784668, -0.7019786834716797, 0.5051908493041992, -0.33496713638305664, 0.5290849804878235, -0.4752334654331207, 0.07062716037034988, -0.448569655418396, 0.8535222411155701, 1.4159870147705078, -0.88667893409729, 0.1732034534215927, -0.4968101978302002, 0.7253894209861755, -0...
def test _ authors _ json ( self, filename ) : soup = parser. parse _ document ( sample _ xml ( filename ) ) self. assertnotequal ( parser. authors _ json ( soup ), none )
[ -0.6673277020454407, -0.8470631241798401, 0.2575218379497528, -0.7174992561340332, 0.011925599537789822, 0.3833208680152893, -0.39951473474502563, 0.27638182044029236, -0.09829835593700409, -0.5335400700569153, -0.4193422794342041, 0.008776797913014889, 0.1895335465669632, -0.0339929759502...
def create _ word _ cloud ( ) : user _ results = db. session. query ( result. keywords, result. block _ text ). filter ( result. user _ id = = session ['user _ id'] ). all ( ) corpus = " ". join ( [ keywords + " " + block _ text for keywords, block _ text in user _ results ] ) print type ( corpus ) wordcloud = wordclou...
[ 1.413548231124878, 1.0216174125671387, 0.4282624125480652, 0.26558730006217957, -0.7657088041305542, 0.09870739281177521, 0.3829309344291687, -0.3206126391887665, -0.4823762774467468, 0.22834590077400208, 0.7198954224586487, -0.008220404386520386, -0.1261366605758667, 0.7939465641975403, ...
def double _ memory _ gate ( self, h, x, scope, bias _ init = 4. 0 ) : with tf. variable _ scope ( scope, self. _ reuse ) : ghr = complex _ matmul ( h, int ( self. _ num _ units / 2. 0 ), scope ='ghr ', reuse = self. _ reuse ) gxr = complex _ matmul ( x, int ( self. _ num _ units / 2. 0 ), scope ='gxr ', reuse = self. ...
[ 0.029875382781028748, -0.48594334721565247, 0.6824938058853149, -0.5753069519996643, -0.6567298173904419, 0.0430988185107708, 0.27832362055778503, -0.2553164064884186, -0.35367029905319214, 0.7767542600631714, -0.8166188597679138, 1.3357157707214355, -0.7362279891967773, 0.8553223609924316...
def ui _ getrow ( self ) : out = [ ] for k in get _ columns ( self ) : i = k. lower ( ) if i in self. _ _ dict _ _ : if self. _ _ dict _ _ [ i ]. _ _ class _ _. _ _ name _ _ in ['int ','str ','ip ','list ','dict ','enumvalue ','bool'] : out + = [ str ( self. _ _ dict _ _ [ i ] ) ] elif hasattr ( self. _ _ dict _ _ [ i ...
[ -1.1160043478012085, -0.35898029804229736, 0.9450687766075134, 0.3311452567577362, -0.2943292260169983, -0.34016773104667664, -0.9922283887863159, -0.4065169095993042, -0.03518149256706238, -0.05476459115743637, 0.28792887926101685, -0.1714654415845871, 0.30858275294303894, 0.9694470763206...
def events _ count ( self, * args, * * kwargs ) : subscription = self. get _ object ( ) if not subscription : return response ( 0 ) organization = subscription. customer. subscriber event _ count = event. objects. filter ( issue _ _ project _ _ organization = organization, created _ _ gte = subscription. current _ peri...
[ 0.6679492592811584, -0.4832131266593933, 0.777258038520813, 0.7266142964363098, 0.5049293041229248, 0.40500104427337646, 0.3597060739994049, 0.08323408663272858, -0.35770803689956665, -0.587350606918335, 0.16295693814754486, 0.6167967319488525, 0.4459596276283264, -0.12437775731086731, 0...
def play _ development _ card ( self, development _ cards, game _ state ) : return
[ -1.1745185852050781, -0.5154073238372803, 0.23369503021240234, 0.6265764832496643, 0.7964962124824524, 0.7102118730545044, 0.34186896681785583, -0.7538356781005859, 0.5625211596488953, -0.41413745284080505, -0.20977453887462616, -0.25591444969177246, 0.8517650961875916, -0.3248410224914551...
def information ( option _ manager ) : return {'version': option _ manager. version,'plugins': plugins _ from ( option _ manager ),'dependencies': dependencies ( ),'platform': {'python _ implementation': platform. python _ implementation ( ),'python _ version': platform. python _ version ( ),'system': platform. system ...
[ -0.48066598176956177, -0.7303023934364319, 0.2832542359828949, -0.9764137864112854, -0.31382232904434204, -0.23718659579753876, -0.1687869429588318, -0.20432831346988678, -0.5500125885009766, 1.0585424900054932, -1.2990375757217407, -0.2023281455039978, -0.024310825392603874, 0.93641078472...
def validate _ elevator _ requests ( elevator _ requests, max _ floor ) : print ( elevator _ requests ) valid _ enteris = set ( ) invalid _ enteries = set ( ) elevator _ requests = map ( lambda x : x. strip ( ), elevator _ requests ) for i in elevator _ requests : try : if int ( i ) and ( 0 < = int ( i ) < = max _ floo...
[ -0.7231287360191345, -0.34133997559547424, 0.5489166975021362, 0.6300287842750549, -0.03821331635117531, 0.7008025646209717, -0.5861711502075195, 0.038567740470170975, -0.9968248009681702, -0.34570202231407166, 0.8489966988563538, -0.36346960067749023, -0.4451756775379181, 0.82784801721572...
def isoverlapping ( ap, al, bp, bl ) : if ap < bp : return ap + al > = bp - 1 # - 1 for not let 2 rooms join together if bp < ap : return bp + bl > = ap - 1
[ -0.1091940850019455, -0.11783993989229202, 0.7032262086868286, 1.2202577590942383, -1.049673318862915, 1.2551056146621704, -0.08417094498872757, 0.7998993396759033, 0.6003274917602539, 0.5875853300094604, 0.26627275347709656, -0.3004353642463684, -1.5541871786117554, 0.007150746416300535, ...
def hasantipairoppositedir ( cell, targetdir, activesides ) : vtx1, vtx2 = targetdir. opposite ( ). connectedvertexdirs ( ) antipairs = ( cell. getantipair ( vtx1 ), cell. getantipair ( vtx2 ) ) for antipair in antipairs : if antipair is not none : # test if both sides of the pair are not in the activesides sidesnotina...
[ -0.667860746383667, -0.8271304965019226, 0.7844949960708618, -0.4577047526836395, -0.6594097018241882, 0.41523146629333496, -0.004007712937891483, 0.3402818739414215, 0.2349468469619751, 0.3701034486293793, 0.676516056060791, -0.4779851734638214, -0.3731009364128113, -0.4044685363769531, ...
def consume ( self, char ) : if char = ='a': self. reward _ this _ turn + = 1 return'' else : return char
[ -0.24875600636005402, 0.0519128143787384, 0.48279866576194763, -0.4490222632884979, 0.4248054027557373, -0.707282543182373, 0.589497447013855, -0.3905183672904968, 1.2070978879928589, 0.2614116966724396, 0.43223142623901367, 0.41648462414741516, -0.2593107223510742, -0.3524657189846039, ...
def calculateitemvalue ( args _, newstates _ shared ) : model, itemid = args _ tmp = np. ctypeslib. as _ array ( newstates _ shared ) return list ( model. predict _ value ( tmp, np. array ( [ itemid ] * tmp. shape [ 0 ] ) ) )
[ -0.7048731446266174, -0.11719907820224762, 0.39051544666290283, 0.6715969443321228, 0.48828551173210144, -0.2886163890361786, -0.1111362874507904, 0.4319271743297577, -0.34190332889556885, 1.0287123918533325, -1.1184625625610352, -0.18398456275463104, 0.4039504826068878, -0.001505147316493...
def get _ step _ trip _ list ( path, step = 15, earliest _ step = 0, max _ steps = none, resize _ factor = 1 ) : # processed trip data ( list of trips ) is saved in a. npy file # for faster reading path _ npy = ( f " { path. split ( '.') [ 0 ] } _ " f " increment = { step : 03 } min _ " f " earlieststep = { earliest _ ...
[ -0.6926113367080688, -0.018281346186995506, 0.8077764511108398, 0.04991190880537033, -0.462708055973053, 0.15279878675937653, -0.056547828018665314, 0.11849555373191833, -0.5945315361022949, -0.15300019085407257, -0.19299593567848206, -0.16639122366905212, 1.0949809551239014, 0.18583026528...
def match _ templates _ load ( file, threshold, template _ path ) : in _ img = cv. imread ( file ) if in _ img is none : print ( f'file not found : { file }') exit ( 0 ) img _ gray = cv. cvtcolor ( in _ img, cv. color _ bgr2gray ) match _ templates ( img _ gray, threshold, get _ template ( template _ path ), in _ img )
[ -0.01434894185513258, -0.2517637610435486, 0.5688750743865967, 0.12017165124416351, -0.3240341544151306, -0.06974757462739944, 0.05917222797870636, 0.6726179718971252, -0.2083739936351776, 0.6011729836463928, -0.1372436136007309, -0.21947231888771057, 0.18357379734516144, 0.160638421773910...