query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Send a trial or pending email based on the club
def send_email(self, to_address, subject, body, cc_recipients=[]): # Build and send message msg = Message( account=self.account, folder=self.account.sent, subject=subject, body= HTMLBody(body), to_recipients=[Mailbox(email_address=to_address)]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_send_email_on_invite(self):\n\n league = self.create_league()\n\n season = self.create_season(league)\n team = self.create_team(season)\n\n player = self.create_player()\n\n send_user_email_on_join(player, team.id)\n\n self.assertEqual(len(mail.outbox), 1)\n\n ...
[ "0.66048986", "0.62515956", "0.61995184", "0.61718476", "0.6158043", "0.61158085", "0.6014718", "0.60091215", "0.6007965", "0.59723735", "0.59673417", "0.5942985", "0.59383017", "0.59346205", "0.58835375", "0.58632773", "0.5842447", "0.5835515", "0.5826343", "0.581003", "0.58...
0.0
-1
Returns a list of durations
def get_dur(self): return [char.get_dur() for char in self.string]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDurations(self):\n return self.durations", "def durations_per_type(self):\n pass", "def getDuration(self):\n return (self._get_int('duration'), self._attributes.getDivisions())", "def get_duration(self):\n duration = 0\n\n for entry in self.entries:\n dura...
[ "0.81575495", "0.726394", "0.6876918", "0.676946", "0.6652773", "0.65874827", "0.65300137", "0.64949", "0.6487036", "0.6487036", "0.64002234", "0.6309793", "0.6307618", "0.630678", "0.62959886", "0.62911266", "0.6283895", "0.62529457", "0.6236019", "0.6182811", "0.6182114", ...
0.74434316
1
Returns the index of the closing bracket
def index(self, sub, start=0): br = "([{"[")]}".index(sub)] count = 0 for i in range(start, len(self.string)): char = self.string[i] if char == br: count += 1 elif char == sub: if count > 0: count -= 1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_next_bracket(self) -> int:\n return 0", "def _match_brackets(text: str, index_of_open_bracket: int) -> int:\n if text[index_of_open_bracket] != \"[\":\n raise SyntaxError(\n \"Index {} in 'text' is not an open bracket '['. It is {}\".format(\n index_of_open_bra...
[ "0.76493204", "0.72793096", "0.70370746", "0.6890851", "0.67595214", "0.669932", "0.65149295", "0.6315805", "0.6248002", "0.62295926", "0.6165225", "0.6110622", "0.60899574", "0.5998586", "0.5968843", "0.59331805", "0.58660525", "0.58644426", "0.5845861", "0.5836592", "0.5825...
0.66420686
6
My new constructor, which makes sure that the ``FRAME_TOOL_WINDOW`` style is not passed through to the ``AuiFloatingFrame`` constructor
def __init__(self, *args, **kwargs): if 'style' in kwargs: style = kwargs['style'] # This is the default style, as defined # in the AuiFloatingFrame constructor else: style = (wx.FRAME_TOOL_WINDOW | wx.FRAME_FLOAT_ON_PARENT | ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _AuiDockingGuide_init(self, *args, **kwargs):\n\n if 'style' in kwargs:\n style = kwargs['style']\n\n # This is the default style, as defined\n # in the AuiDockingGuide constructor\n else:\n style = (wx.FRAME_TOOL_WINDOW |\n wx.FRAME_STAY_ON_TOP |\n wx....
[ "0.70367366", "0.6843715", "0.6642154", "0.6578007", "0.654084", "0.6410062", "0.6291096", "0.62042177", "0.594362", "0.59111077", "0.5909552", "0.5876681", "0.57657516", "0.56834096", "0.56624097", "0.564891", "0.56267667", "0.56264985", "0.5610823", "0.55926937", "0.5591156...
0.8233745
0
Make sure that floated toolbars are sized correctly.
def SetPaneWindow(self, pane): super().SetPaneWindow(pane) if isinstance(pane.window, ctrlpanel.ControlToolBar): size = self.GetBestSize() self.SetMaxSize(size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetupToolBar( self ):\n tb = self.CreateToolBar( self.TBFLAGS )\n tsize = (24,24)\n tb.ToolBitmapSize = tsize\n open_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR, tsize)\n tb.AddLabelTool(ID_OPEN, \"Open\", open_bmp, shortHelp=\"Open\", longHelp=\"Open a (c...
[ "0.583352", "0.57793653", "0.567812", "0.56693625", "0.5571273", "0.5571242", "0.55684173", "0.55528355", "0.5537721", "0.54817885", "0.5481143", "0.547402", "0.54617256", "0.5432742", "0.53973013", "0.5397043", "0.53700334", "0.5356548", "0.5326376", "0.53054124", "0.5301002...
0.4969444
45
I am also monkeypatching the ``wx.lib.agw.aui.AuiDockingGuide.__init__`` method, because in this instance, when running over SSH/X11, the ``wx.FRAME_TOOL_WINDOW`` style seems to result in the docking guide frames being given title bars, which is quite undesirable. I cannot patch the entire class in the aui package, bec...
def _AuiDockingGuide_init(self, *args, **kwargs): if 'style' in kwargs: style = kwargs['style'] # This is the default style, as defined # in the AuiDockingGuide constructor else: style = (wx.FRAME_TOOL_WINDOW | wx.FRAME_STAY_ON_TOP | wx.FRAME_NO_TASKBA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, parent, direction=0):\r\n\r\n self._direction = direction\r\n\r\n style = wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP | \\\r\n wx.FRAME_NO_TASKBAR | wx.NO_BORDER\r\n\r\n # Use of FRAME_SHAPED on wxMac causes the frame to be visible\r\n # breaking the docking ...
[ "0.78029877", "0.76468927", "0.75003105", "0.67746687", "0.67715925", "0.65943986", "0.65633965", "0.652213", "0.63551587", "0.6119899", "0.5991007", "0.5870099", "0.58692646", "0.5821341", "0.5789795", "0.57829094", "0.57701516", "0.5749214", "0.5741523", "0.572504", "0.5701...
0.8088298
0
Return the current time
def __call__(self): return self.timer()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_current_time():\n return datetime.now()", "def get_current_time(self):\n return self.time", "def current_time():\n return time.time()", "def get_current_time():\n return datetime.datetime.now()", "def current_time():\n now = datetime.now().strftime(\"%Y/%m/%d %H:%M:%S.%f\...
[ "0.91090846", "0.8938994", "0.8924459", "0.8898811", "0.8718447", "0.8692051", "0.86573684", "0.8637508", "0.8637508", "0.85989535", "0.85689193", "0.8556552", "0.855324", "0.8514291", "0.8509144", "0.8491041", "0.84882253", "0.84862834", "0.84286696", "0.84121054", "0.840319...
0.0
-1
Set the start time
def __enter__(self): print(self.msg) self.start = self() return self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_start_time():\n __start = current_time_milli()", "def start_time(self, start_time):\n self._start_time = start_time", "def start_time(self, start_time):\n self._start_time = start_time", "def start_time(self, value):\n self._start_time = value", "def start_time(self, start_t...
[ "0.89116937", "0.88895166", "0.88895166", "0.87901247", "0.8763855", "0.8763855", "0.8763855", "0.8763855", "0.8763855", "0.8243607", "0.82389045", "0.8199109", "0.8085605", "0.80413425", "0.80317485", "0.8027956", "0.79049337", "0.78746533", "0.78022283", "0.7797179", "0.776...
0.0
-1
Set the end time
def __exit__(self, exc_type, exc_value, exc_traceback): self.end = self() print(str(self))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def end_time(self, end_time):\n self._end_time = end_time", "def end_time(self, end_time):\n self._end_time = end_time", "def end_time(self, end_time):\n\n self._end_time = end_time", "def end_time(self, end_time):\n\n self._end_time = end_time", "def end_time(self, end_time):\n...
[ "0.8896623", "0.8896623", "0.8753845", "0.8753845", "0.8753845", "0.808294", "0.80729717", "0.78966063", "0.7880066", "0.782719", "0.7651829", "0.7645895", "0.7642337", "0.7366842", "0.73140603", "0.7286351", "0.71829134", "0.7159503", "0.7158022", "0.7158022", "0.7158022", ...
0.0
-1
Evaluate TF model by running env.loss and env.acc.
def evaluate(env, X_data, y_data, batch_size=1): print('\nEvaluating') n_sample = X_data.shape[0] n_batch = int((n_sample+batch_size-1) / batch_size) loss, acc = 0, 0 for batch in range(n_batch): print(' batch {0}/{1}'.format(batch + 1, n_batch)) print('\r') start = batch * b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eval_model(env, obs_placeholder, epsilon_placeholder, stochastic_placeholder,\n output_actions, sess, samples=1000):\n sum_reward = 0\n for _ in range(samples):\n obs, done = env.reset(), False\n episode_rew = 0\n count = 0\n while not done:\n count +=...
[ "0.6935031", "0.6915326", "0.69065195", "0.69065195", "0.67899394", "0.6761708", "0.6721589", "0.6687247", "0.66440594", "0.6602138", "0.65989417", "0.6597125", "0.65928626", "0.6590844", "0.65823996", "0.65762794", "0.6558227", "0.6505144", "0.64601713", "0.6459019", "0.6456...
0.6787678
5
Train a TF model by running env.train_op.
def train(env, X_data, y_data, X_valid=None, y_valid=None, epochs=50, learning_rate=0.1, load=False, shuffle=True, batch_size=1, name='model'): if load: if not hasattr(env, 'saver'): print('\nError: cannot find saver op') return print('\nLoading saved model') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def train(self, sess):\n assert self.mode == tf.contrib.learn.ModeKeys.TRAIN\n return sess.run([self.update,\n self.train_loss,\n self.global_step,\n self.train_summary])", "def train(self):\n p = self._params\n i...
[ "0.72928804", "0.70643955", "0.69183844", "0.6874432", "0.6849718", "0.67872006", "0.67453223", "0.6709638", "0.6687018", "0.66779387", "0.66700673", "0.6667802", "0.6649366", "0.66173327", "0.6596081", "0.6582747", "0.6565333", "0.65643585", "0.65432745", "0.65432745", "0.65...
0.6653173
12
Do inference by running env.ybar.
def predict(env, X_data, batch_size=1): print('\nPredicting') n_classes = env.ybar.get_shape().as_list()[1] n_sample = X_data.shape[0] n_batch = int((n_sample+batch_size-1) / batch_size) yval = np.empty((n_sample, n_classes)) for batch in range(n_batch): print(' batch {0}/{1}'.format(bat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inference(self):\n raise NotImplementedError", "def do_inference(self, output_file = None):\n return", "def inference(model, data, diagnostics, seed, extra_fitting_args):\n pass", "def infer(self, example, model):\n asp_input = model + '\\n\\n' + example + '\\n\\n' + inference_pro...
[ "0.591146", "0.574195", "0.56979394", "0.5695342", "0.56022125", "0.56021285", "0.5457862", "0.5328876", "0.53248787", "0.5279016", "0.5271845", "0.5252902", "0.52335507", "0.5188373", "0.5176532", "0.5174673", "0.5171958", "0.5163961", "0.5153938", "0.51461893", "0.5144177",...
0.48024768
50
Generate adversarial via CW optimization.
def make_cw(env, X_data, epochs=50, eps=0.1, batch_size=1): print('\nMaking adversarials via CW') n_sample = X_data.shape[0] n_batch = int((n_sample + batch_size - 1) / batch_size) X_adv = np.empty_like(X_data) for batch in range(n_batch): with Timer('Batch {0}/{1} '.format(batch + 1, n_ba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def optimize(w, b, X, Y, num_iterations,learning_rate,print_cost = False):\n costs = []\n for i in range(num_iterations):\n\n # Cost and gradient calculation (≈ 1-4 lines of code)\n ### START CODE HERE ###\n grads,cost = propagate(w,b,X,Y)\n ### END CODE HERE ###\n\n # Retr...
[ "0.6353723", "0.6047894", "0.6027479", "0.59312564", "0.5912963", "0.5872055", "0.58629537", "0.584317", "0.58246624", "0.5762034", "0.5742786", "0.5726614", "0.5690474", "0.56794494", "0.5674205", "0.56507385", "0.564974", "0.5638503", "0.56237", "0.5580002", "0.5579754", ...
0.67412966
0
Compute orbit positions for the general two body problem from the initial orbital elements with a deterministic mathematical model. Factory function that returns a functional model.
def make_position_model_g2b_math(traj_size = 731): num_particles = 2 space_dims = 3 t = keras.Input(shape=(traj_size,), name='t') q0 = keras.Input(shape=(num_particles, space_dims,), name='q0') v0 = keras.Input(shape=(num_particles, space_dims,), name='v0') m = keras.Input(shape=(num_particles,)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_physics_model_r2bc_math(position_model: keras.Model, traj_size: int):\n # Create input layers\n t = keras.Input(shape=(traj_size,), name='t')\n q0 = keras.Input(shape=(2,), name='q0')\n v0 = keras.Input(shape=(2,), name='v0')\n mu = keras.Input(shape=(1,), name='mu')\n # The combined inp...
[ "0.60584325", "0.5861145", "0.56984997", "0.5582579", "0.5571899", "0.5571185", "0.55394447", "0.55196565", "0.5519342", "0.5471972", "0.54458904", "0.5429235", "0.5407269", "0.5400973", "0.53884035", "0.5383207", "0.535556", "0.5349774", "0.53446734", "0.5344", "0.5325683", ...
0.6602906
0
Create a math model for the restricted two body circular problem; wrapper for entire work flow
def make_model_g2b_math(traj_size: int = 731): # Build the position model position_model = make_position_model_g2b_math(traj_size=traj_size) # Build the model with this position layer and the input trajectory size return make_physics_model_g2b(position_model=position_model, traj_size=traj_size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_physics_model_r2bc_math(position_model: keras.Model, traj_size: int):\n # Create input layers\n t = keras.Input(shape=(traj_size,), name='t')\n q0 = keras.Input(shape=(2,), name='q0')\n v0 = keras.Input(shape=(2,), name='v0')\n mu = keras.Input(shape=(1,), name='mu')\n # The combined inp...
[ "0.64146066", "0.60338265", "0.5854683", "0.5805191", "0.5791876", "0.57256913", "0.5676458", "0.5617935", "0.5617745", "0.5609882", "0.5601845", "0.54806656", "0.5478359", "0.54775006", "0.54757315", "0.54681814", "0.5455708", "0.54532695", "0.5449585", "0.5435806", "0.54284...
0.55044067
11
A modulelevel function that is used by the engine to obtain information about adapter. It is designed to be used in automated configuration tools that wish to query the user for database and connection information.
def descriptor(): return { 'name': 'db2', 'description': 'SQLAlchemy support for IBM Data Servers', 'arguments': [ ('database', 'Database Name', None), ('schema', 'Schema name', None), ('host', 'Host name', None), ('po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_adapter_config(self):\n proxy = self.core.get_proxy('/')\n try:\n config = proxy.get('/adapters/' + self.adapter_name)\n return config\n except KeyError:\n return None", "def get_adapter_name(self):\n\t\treturn call_sdk_function('PrlVirtNet_GetAdapte...
[ "0.6578521", "0.606215", "0.5941572", "0.591089", "0.5862202", "0.5835867", "0.5823187", "0.58058596", "0.57616323", "0.57564956", "0.5740886", "0.5683709", "0.5683709", "0.5669521", "0.56624603", "0.5657003", "0.5584844", "0.5563278", "0.55260736", "0.550705", "0.5501028", ...
0.57178193
11
Return a shellescaped version of the string `s`.
def _sh_quote(s): if not s: return b"" if _find_unsafe(s) is None: return s # use single quotes, and put single quotes into double quotes # the string $'b is then quoted as '$'"'"'b' return b"'" + s.replace(b"'", b"'\"'\"'") + b"'"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_str(s, line=0, col=0):\n str_ = ast.Str()\n\n str_.s = s\n str_.lineno = line\n str_.col_offset = col\n\n return str_", "def one_pass(self, s: str) -> str:\n alpha_map = {\n '1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e', '6': 'f', '7': 'g',\n '8': 'h', '9': 'i', '10': 'j...
[ "0.54112583", "0.5362775", "0.5359313", "0.5336982", "0.5308384", "0.53065896", "0.52880746", "0.5262904", "0.5259826", "0.5244179", "0.52178675", "0.52063286", "0.51872236", "0.5177749", "0.51235527", "0.50960195", "0.5082803", "0.5063249", "0.5044826", "0.50434613", "0.5034...
0.0
-1
Turns unicode into bytes, if needed. Assumes UTF8.
def asbytes(s): if isinstance(s, bytes): return s else: return s.encode('utf-8')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def str_to_bytes(data):\n u_type = type(b''.decode('utf8'))\n if isinstance(data, u_type):\n return data.encode('utf8')\n return data", "def _as_bytes(s):\n if isinstance(s, bytes):\n return s\n return bytes(s, encoding='latin_1')", "def to_bytes(data):\n if ...
[ "0.7645312", "0.7617884", "0.75509197", "0.75476927", "0.7262509", "0.72417694", "0.7219238", "0.7205173", "0.7201864", "0.7165998", "0.71641016", "0.71378076", "0.7127739", "0.7048951", "0.7035448", "0.70284414", "0.701449", "0.70024306", "0.6993095", "0.69862777", "0.697220...
0.7495033
4
Turns bytes into unicode, if needed. Uses UTF8.
def asunicode(s): if isinstance(s, bytes): return s.decode('utf-8', 'replace') else: return s
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_unicode(data):\n if isinstance(data, bytes):\n return data.decode('utf-8')\n else:\n return data", "def utf8tounicode(arg):\n\n try:\n if isinstance(arg, unicode):\n return arg.decode('utf-8')\n except NameError:\n pass # Python 3\n re...
[ "0.7771352", "0.7608568", "0.760092", "0.7586902", "0.75841767", "0.75071144", "0.7426475", "0.7411024", "0.73730016", "0.7314761", "0.7290108", "0.723653", "0.7233475", "0.72172374", "0.7215756", "0.7209994", "0.719679", "0.7185164", "0.71597666", "0.71575105", "0.7137322", ...
0.7844327
0
Turns bytes into unicode, if needed.
def asunicode_win(s): if isinstance(s, bytes): return s.decode(locale.getpreferredencoding()) else: return s
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def asunicode(s):\n if isinstance(s, bytes):\n return s.decode('utf-8', 'replace')\n else:\n return s", "def to_unicode(data):\n if isinstance(data, bytes):\n return data.decode('utf-8')\n else:\n return data", "def _force_unicode(data):\n try:\n data...
[ "0.7776503", "0.7750357", "0.7712421", "0.7590276", "0.7534307", "0.7445099", "0.7434296", "0.7369244", "0.7362918", "0.72458327", "0.7245558", "0.7220495", "0.71380717", "0.7137823", "0.7132113", "0.7120568", "0.7104084", "0.70992374", "0.70992374", "0.7098032", "0.7059886",...
0.6493746
85
Create an scp1 client.
def __init__(self, transport, buff_size=16384, socket_timeout=5.0, progress=None, sanitize=_sh_quote): self.transport = transport self.buff_size = buff_size self.socket_timeout = socket_timeout self.channel = None self.preserve_times = False self._progres...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_client():\n hostname = \"localhost\"\n username = \"she393\"\n password = os.getenv(\"PASSWORD\")\n\n client = paramiko.SSHClient()\n client.set_missing_host_key_policy(paramiko.AutoAddPolicy())\n client.connect(hostname=hostname, username=username, password=password)\n return clien...
[ "0.63903797", "0.6025849", "0.5866134", "0.58654594", "0.56653655", "0.5633485", "0.53917134", "0.533735", "0.53128964", "0.5219319", "0.51465446", "0.512816", "0.5121389", "0.50681365", "0.49846", "0.49832225", "0.4966712", "0.49589762", "0.49456254", "0.49358943", "0.492269...
0.0
-1
Transfer files to remote host.
def put(self, files, remote_path=b'.', recursive=False, preserve_times=False): self.preserve_times = preserve_times self.channel = self._open() self._pushed = 0 self.channel.settimeout(self.socket_timeout) scp_command = (b'scp -t ', b'scp -r -t ')[recursive] s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def put(host, username, localpath, remotepath=None, port=22):\n log = logging.getLogger('device.remotecall')\n log.info('sending file from local:%s -> %s', localpath, remotepath)\n if not remotepath:\n remotepath = os.path.split(localpath)[1]\n cmd = 'scp -P %s %s %s@%s:%s' %...
[ "0.7275549", "0.72601163", "0.7130771", "0.7098392", "0.70800555", "0.707", "0.694646", "0.6923375", "0.6913393", "0.688498", "0.68777055", "0.6872219", "0.68157995", "0.67939514", "0.67911154", "0.6788431", "0.6747316", "0.6741278", "0.67216235", "0.6712353", "0.6706477", ...
0.663614
22
Transfer files from remote host to localhost
def get(self, remote_path, local_path='', recursive=False, preserve_times=False): if not isinstance(remote_path, (list, tuple)): remote_path = [remote_path] remote_path = [self.sanitize(asbytes(r)) for r in remote_path] self._recv_dir = local_path or os.getcwd() s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy(self, source_host, dest_host, filename):", "def put(host, username, localpath, remotepath=None, port=22):\n log = logging.getLogger('device.remotecall')\n log.info('sending file from local:%s -> %s', localpath, remotepath)\n if not remotepath:\n remotepath = os.path.split...
[ "0.7318303", "0.73060524", "0.7291414", "0.7096798", "0.70247304", "0.6908516", "0.68596476", "0.6788707", "0.6778763", "0.673152", "0.6661156", "0.6652579", "0.6647116", "0.6644621", "0.66430664", "0.6633491", "0.66334426", "0.66075844", "0.660345", "0.6602142", "0.6586251",...
0.0
-1
open a scp channel
def _open(self): if self.channel is None: self.channel = self.transport.open_session() return self.channel
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __spawn_scp(self,scp_cmd,password):\n print \"SCP:\"+scp_cmd\n p = pexpect.spawn(scp_cmd)\n time.sleep(0.5)\n ssh_newkey = 'Are you sure you want to continue connecting'\n i = p.expect([ssh_newkey, '[pP]assword', \"# \", pexpect.EOF,\n pexpect.TIMEOUT], 1...
[ "0.7025173", "0.6581629", "0.65086514", "0.6448194", "0.62524426", "0.62035555", "0.61674416", "0.61537814", "0.61195207", "0.6035388", "0.6025352", "0.5994432", "0.59675145", "0.59600556", "0.5945636", "0.582155", "0.5819305", "0.5773938", "0.5768472", "0.57662743", "0.57479...
0.5705224
21
return just the file stats needed for scp
def _read_stats(self, name): if os.name == 'nt': name = asunicode(name) stats = os.stat(name) mode = oct(stats.st_mode)[-4:] size = stats.st_size atime = int(stats.st_atime) mtime = int(stats.st_mtime) return (mode, size, mtime, atime)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_local_output_files_stats():\n print \"\\n\\nFILES CREATED:\"\n for filename in os.listdir('../output'):\n filesize = os.path.getsize('../output/' + filename)\n print str(filesize) + \"\\t\" + filename\n print \"\\n\"", "def get_file_stat(host, fqpath):\n st...
[ "0.6308832", "0.5980531", "0.59700406", "0.58744437", "0.5765214", "0.5739316", "0.5678019", "0.5640619", "0.56233877", "0.55511975", "0.55400366", "0.5529338", "0.55213046", "0.5504219", "0.54706717", "0.5459708", "0.5436317", "0.539303", "0.53823876", "0.53718084", "0.53422...
0.5355709
20
This keyword download a file from Ftp server to local of test case running.
def download_from_ftp_to_local_SCP(host,port,ftp_path, local_file, mode = 'bin', user = 'root', password = 'root'): try: scp_obj = SCP(host, port, user, password) scp_obj.connect() except Exception: scp_obj = SCP(host, port, user, password) if os.path.isdir(local_file): prin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main(url, localfile):\n ph.download_file(url, localfile)", "def download_file(self, remote_file):\n remote_file.download()", "def test_download(self):\n pass", "def test_download_host(self):\n pass", "def download(self,filename,localfolder):\n\n self.status = 0\n\n\n ...
[ "0.723841", "0.6985436", "0.67837477", "0.670808", "0.661014", "0.65205437", "0.6497471", "0.6452105", "0.64511096", "0.6447432", "0.64288276", "0.6417075", "0.6398979", "0.63842875", "0.63807", "0.63789034", "0.6357496", "0.63568294", "0.6354328", "0.6336628", "0.6335168", ...
0.69121647
2
load_ticker Retrieves market data from external data source (in this case Bloomberg)
def load_ticker(self, time_series_request): time_series_request_vendor = self.construct_vendor_time_series_request(time_series_request) data_frame = None self.logger.info("Request Bloomberg data") # do we need daily or intraday data? if (time_series_request.freq in ['daily', '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data(self):\n try:\n df = self.live_quote_arg_func(self.tickers)\n for index, ticker in enumerate(self.tickers):\n ticker_info = df.loc[index]\n self.ticker_dict[ticker].append(ticker_info['price'],\n ...
[ "0.7115917", "0.6569476", "0.64997846", "0.641512", "0.63950694", "0.63743776", "0.63675433", "0.6357785", "0.6351763", "0.6344594", "0.634049", "0.6279552", "0.62463516", "0.6239634", "0.6233006", "0.61905515", "0.6186492", "0.6181986", "0.6160244", "0.61591166", "0.60775226...
0.6994034
1
Here, I use the cvxopt to solve the convex function of lambda then get the solve of lambda, the constraints will be explained in PDF.
def svmfit(itr,C): train_x, train_y, valid_x, valid_y=get_next_train_valid(itr) train_y=train_y.reshape(len(train_y),1) n = len(train_y) P = matrix(np.dot(train_x,train_x.T) * np.outer(train_y,train_y)) q = matrix(-np.ones([n, 1], np.float64)) G = matrix(np.vstack((-np.eye((n)), np.eye(n))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cvxpy_solver(self, verbose=False):\n self.gamma = self._gamma_from_drawdown_control()\n\n objective = 0\n constr = []\n\n # weights variable depends on whether there is a risk-free asset in data\n if self.rf_included is True:\n # variable with shape h+1 predictions...
[ "0.64485794", "0.6222406", "0.6062647", "0.6016901", "0.59754467", "0.5928778", "0.58314073", "0.5803851", "0.5779148", "0.57719207", "0.5738039", "0.56900346", "0.56822157", "0.5635415", "0.56209046", "0.561125", "0.5598581", "0.55825484", "0.5579932", "0.55699277", "0.55699...
0.5254791
57
This function is used to predict labels.
def predict(x,w,bb): return 2*((x.dot(w)+bb)>0)-1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def predict_label(self, src): # real signature unknown; restored from __doc__\n pass", "def predict(self, X):", "def predict(self, X):", "def predict(self, X):\n ...", "def predict(self, X):\n ...", "def predict(self, X):\n ...", "def predict(self, X): \n # Check is f...
[ "0.83656716", "0.7819628", "0.7819628", "0.7751367", "0.7751367", "0.7751367", "0.76594716", "0.76234955", "0.7593714", "0.7548564", "0.7522402", "0.7522402", "0.7522402", "0.74675715", "0.74675715", "0.7456503", "0.74501675", "0.7441235", "0.7401342", "0.7376691", "0.7364645...
0.0
-1
First get the predict labels of train data and compare them with true labels, then get the accuracy.
def trainaccurary(C): acc=np.zeros((nFolds)) for i in range(0,nFolds): train_x, train_y, valid_x, valid_y=get_next_train_valid(i) w,b=svmfit(i,C) y_predict=predict(train_x,w,b) train_y=train_y.reshape(len(train_y),1) k=np.sum(np.absolute(y_predict-train_y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def accuracy(preds, labels):\n correct = preds == labels\n return correct.sum().float() / correct.shape[0]", "def accuracy(predictions, labels):\n return (100.0 * np.sum(np.argmax(predictions, 1) == np.argmax(labels, 1)) / predictions.shape[0])", "def accuracy(predictions, labels):\n predic...
[ "0.81251127", "0.7844688", "0.7838726", "0.78342134", "0.7731869", "0.770613", "0.76706076", "0.76564795", "0.76120675", "0.7514372", "0.7473171", "0.7454328", "0.7435551", "0.74198264", "0.7414972", "0.7397112", "0.7393953", "0.73836416", "0.7366236", "0.7327344", "0.7317455...
0.0
-1
First get the predict labels of valid data and compare them with true labels, then get the accuracy.
def validaccurary(C): acc=np.zeros((nFolds)) for i in range(0,nFolds): train_x, train_y, valid_x, valid_y=get_next_train_valid(i) w,b=svmfit(i,C) y_predict=predict(valid_x,w,b) valid_y=valid_y.reshape(len(valid_y),1) k=np.sum(np.absolute(y_predict-valid_y...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def accuracy(preds, labels):\n correct = preds == labels\n return correct.sum().float() / correct.shape[0]", "def accuracy(predictions, labels):\n return (100.0 * np.sum(np.argmax(predictions, 1) == np.argmax(labels, 1)) / predictions.shape[0])", "def accuracy(labels, preds):\n\tassert labels....
[ "0.789505", "0.76515675", "0.7560528", "0.7535523", "0.751631", "0.7512759", "0.74677944", "0.7458111", "0.7371566", "0.7366773", "0.7331763", "0.73305213", "0.7278432", "0.72667116", "0.7242942", "0.72084904", "0.7193115", "0.7191824", "0.71722233", "0.7152112", "0.7151536",...
0.0
-1
First get the predict labels of test data and compare them with true labels, then get the accuracy.
def testaccurary(C): acc=np.zeros((nFolds)) for i in range(0,nFolds): w,b=svmfit(i,C) y_predict=predict(test_x,w,b) k=np.sum(np.absolute(y_predict-test_y))/2 n=len(test_y) acc[i]=1-k/n accurary=np.mean(acc) return accurary
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def evaluate(y_test, pred_labels):\n \n # Converts one-hot code to a label (the index of 1)\n y_test_labels = np.argmax(y_test, axis=1)\n \n # Compare test labels to predicted labels\n score = accuracy_score(y_test_labels, pred_labels)\n \n return y_test_labels, score", "def accuracy(pred...
[ "0.78083247", "0.776717", "0.77285784", "0.77226895", "0.7703197", "0.76690745", "0.7531693", "0.75088376", "0.74806464", "0.7442332", "0.7410306", "0.7404153", "0.73952955", "0.7392966", "0.7381638", "0.7373239", "0.73603016", "0.73513645", "0.732625", "0.7310962", "0.727528...
0.0
-1
Downloads a blob from the bucket.
def download_blob(bucket_name, source_blob_name, destination_file_name): storage_client = storage.Client() bucket = storage_client.get_bucket(bucket_name) blob = bucket.blob(source_blob_name) blob.download_to_filename(destination_file_name) print('Blob {} downloaded to {}.'.format( source_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def download_blob(bucket_name, source_blob_name):\n\n storage_client = storage.Client()\n bucket = storage_client.bucket(bucket_name)\n blob = bucket.blob(source_blob_name)\n\n return blob", "def blob_download(blob_url):\n blob = storage.Object.from_url(blob_url)\n blobc = blob.download()\n ...
[ "0.8135342", "0.8125911", "0.78897315", "0.7834108", "0.77213085", "0.77190185", "0.7650273", "0.7573154", "0.7502587", "0.7457528", "0.73454875", "0.7343923", "0.7278197", "0.72137046", "0.71286523", "0.708186", "0.70657223", "0.6937438", "0.6928341", "0.6895048", "0.6828916...
0.7473543
9
Changes the Enigma Machine configuration. This method does not check if the arguments are valid, so be careful.
def set(self, plugboard=None, rotors=None, reflector=None, offsets=None, rings=None): if plugboard is not None: self.plugboard = map(plugboard) if rotors is not None: self.rotors = get_rotors(rotors) self.n_rotors = len(rotors) self.rotors_n = [r.strip().upper() for r in rotors] if reflecto...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configure(args):\n\n emu = Emulator(args,\n cpu='68030',\n frequency=24 * 1000 * 1000)\n # initially only the EEPROM exists; aliased at 0 all the way up to 0xfe000000\n # we only map the low and high aliases, as the intermediates aren't interesting\n emu.add_memo...
[ "0.6174243", "0.59896517", "0.5906765", "0.584169", "0.56751543", "0.55548394", "0.5487469", "0.54526305", "0.5439338", "0.5373398", "0.536084", "0.534737", "0.5340776", "0.53404063", "0.5322564", "0.5250517", "0.52350414", "0.5225029", "0.5205927", "0.5172226", "0.51714396",...
0.0
-1
Resets the machine to the starting configuration, so it can be used to decrypt the messages
def reset(self): self.offsets = self.start_off.copy()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self) -> None:\n\n self.host.reset()", "def reset(self):\n\n\t\tself._send_message(\"RESET\", \"\\x00\")", "def restore_config(self):\n self._clear_previous_windows_assigment()\n self._restart_i3_config()", "def reset_config():\r\n # TODO implement configuration reset\r\n ...
[ "0.6918687", "0.6814756", "0.6770983", "0.67010367", "0.66994166", "0.6650878", "0.662105", "0.6590315", "0.6565454", "0.65495473", "0.65404516", "0.6514154", "0.6507873", "0.6507414", "0.6496437", "0.649635", "0.64932585", "0.64861643", "0.64782023", "0.64782023", "0.6478202...
0.0
-1
Gets a message represented by a list of integers ranging from 0 to 25 and applies a substituition cypher.
def _enc_plugboard(self, message_num): return [self.plugboard[l] for l in message_num]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def leet_converter(message, Sub):\n\n for s in Sub:\n vcar = s[0]\n ncar = s[1]\n message = message.replace(vcar,ncar)\n \n message_crypt = message\n print(\"I leave the leet_converter function.\")\n return(message_crypt)", "def encode():\n result = \"\"\n alphabet =...
[ "0.5918688", "0.5528841", "0.53191257", "0.5311584", "0.52971774", "0.5292128", "0.52407837", "0.5206231", "0.51723075", "0.51711327", "0.5157436", "0.5131256", "0.5130054", "0.51000094", "0.5090566", "0.5073154", "0.50389224", "0.50366086", "0.50173724", "0.5006414", "0.4993...
0.45667142
90
Always turns the right (fast) rotor and accounts to multiple rotations when the letter shown by the second rotor from the right is the notch letter.
def _turn_rotors(self): if self.dble_turn: self.offsets[-2] = (self.offsets[-2] + 1) % len(ALPHABET) self.offsets[-3] = (self.offsets[-3] + 1) % len(ALPHABET) self.dble_turn = False for i in range(-1, -4, -1): if POS2L[self.offsets[i]] not in TURNS[self.rotors_n[i]]: self.offsets[i] = (self.offsets...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def turn_right(self):\n pass", "def startRotatingRight(self,event):\n self.isRotatingRight=True", "def right():\n Robot.rotate(\"RIGHT\")", "def turn_right(self):\n self.direction_mod_offset += 1\n self.calculate_offset_mapping()\n direction_num = self.direction_mod_offs...
[ "0.7400568", "0.72875404", "0.7258727", "0.7189021", "0.7034871", "0.7020737", "0.6937498", "0.68840283", "0.6870038", "0.68393517", "0.6836182", "0.6831608", "0.6724594", "0.66672915", "0.6631121", "0.6578184", "0.6555393", "0.6493899", "0.64934593", "0.6477726", "0.64638543...
0.67735666
12
Applies a substituition cypher done by the rotor from right to left input_letter > integer that represents the letter rotor > rotor as a list of integers
def _rotor_right2left(rotor, input_letter, offset, ring): alpha_size = len(ALPHABET) return (rotor[(input_letter + offset - ring) % alpha_size] - offset +\ ring) % alpha_size
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _rotor_left2right(rotor, input_letter, offset, ring):\n\t\tletter = (input_letter + offset - ring) % len(ALPHABET)\n\t\treturn (rotor.index(letter) - offset + ring) % len(ALPHABET)", "def scramble(r_letters, s_letters):\r\n if len(r_letters) == 0:\r\n # Base case: All letters used\r\n print(...
[ "0.63908404", "0.61391145", "0.6079742", "0.6025106", "0.59956324", "0.5960136", "0.5949024", "0.5942177", "0.5936276", "0.5896446", "0.5841828", "0.58261704", "0.58245915", "0.5823976", "0.5818802", "0.5812918", "0.5809682", "0.5798197", "0.5780767", "0.5763846", "0.5762415"...
0.6469157
0
Given a reflector dictionary and an integer representation of the input letter, returns the reflected letter as an integer
def _reflect(reflector, input_letter): return reflector[input_letter]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def letter_to_num(self, string, dict_):\n #dict_= {'A': '0', 'C': '1', 'D': '2', 'E': '3', 'F': '4', 'G': '5', 'H': '6', 'I': '7', 'K': '8', 'L': '9', 'M': '10', 'N': '11', 'P': '12', 'Q': '13', 'R': '14', 'S': '15', 'T': '16', 'V': '17', 'W': '18', 'Y': '19'}\n patt = re.compile('[' + ''.join(dict_....
[ "0.7187203", "0.70348746", "0.69608444", "0.63441765", "0.63083297", "0.63083297", "0.6244012", "0.62102985", "0.61951643", "0.61534154", "0.611438", "0.6108727", "0.60911995", "0.600833", "0.5983733", "0.59672374", "0.5949515", "0.5943043", "0.5933528", "0.59278053", "0.5902...
0.65641934
3
Applies a substituition cypher done by the rotor from left to right input_letter > integer that represents the letter rotor > rotor as a list of integers
def _rotor_left2right(rotor, input_letter, offset, ring): letter = (input_letter + offset - ring) % len(ALPHABET) return (rotor.index(letter) - offset + ring) % len(ALPHABET)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _rotor_right2left(rotor, input_letter, offset, ring):\n\t\talpha_size = len(ALPHABET)\n\t\treturn (rotor[(input_letter + offset - ring) % alpha_size] - offset +\\\n\t\t\t\t\tring) % alpha_size", "def rotate_character(char, rot):\n if type(char) != type(''):\n return char\n if type(rot) != type(1...
[ "0.6404293", "0.61947584", "0.614188", "0.60083866", "0.6000814", "0.59757674", "0.59642", "0.5956721", "0.5927695", "0.5915064", "0.5900568", "0.5884531", "0.58663297", "0.5865185", "0.58637923", "0.58486325", "0.58378184", "0.582674", "0.582506", "0.582498", "0.58215237", ...
0.6343704
1
Executes a forward pass through all the rotors from right to left Returns the encrypted letter as an integer
def _forward(self, letter): self._turn_rotors() l = letter for i in range(-1, -self.n_rotors - 1, -1): l = self._rotor_right2left(self.rotors[i], l, self.offsets[i], self.rings[i]) return l
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encryptionRotate(text):\n s = text\n transformedChar = \"\"\n transformedChar = s[-1] + s[:-1]\n\n print(\"Single Rotation Encrypted text : \" )\n return transformedChar", "def rotate_letter(c, num):\n return chr(((ord(c) - 97) + num) % 26 + 97)", "def incrementRotor(self):\n self....
[ "0.66399425", "0.6564686", "0.65551734", "0.6526592", "0.6486069", "0.6390609", "0.63876545", "0.63511467", "0.63508856", "0.6246106", "0.6229571", "0.618497", "0.61506116", "0.6106474", "0.6098463", "0.60835016", "0.60799736", "0.6076406", "0.60617894", "0.60591775", "0.6045...
0.6679923
0
Given the letter returned by the reflector, executes a backward pass, cyphering the input letter in all rotors from left to right Returns the output letter as an integer
def _backwards(self, letter): l = letter for i in range(self.n_rotors): l = self._rotor_left2right(self.rotors[i], l, self.offsets[i], self.rings[i]) return l
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _forward(self, letter):\n\t\tself._turn_rotors()\n\t\tl = letter\n\t\tfor i in range(-1, -self.n_rotors - 1, -1):\n\t\t\tl = self._rotor_right2left(self.rotors[i], l, self.offsets[i],\n\t\t\t\t\t\t\t\t\tself.rings[i])\n\t\treturn l", "def cipherFromReflector(self, char):\n inputCharNum = self.GetNumBy...
[ "0.6735222", "0.6486761", "0.6389943", "0.6337723", "0.6333011", "0.6282108", "0.6205114", "0.61938417", "0.6165998", "0.61477476", "0.6132617", "0.6115616", "0.6112447", "0.60500765", "0.60370743", "0.60039794", "0.5961587", "0.59385735", "0.5931577", "0.5929782", "0.5909112...
0.66574705
1
Preprocess text, executes a forward, reflection and backward pass and outputs the encrypted text as a string of capital letters
def encrypt(self, text): clean_text = message2num(text) encrypted = [] plug = self._enc_plugboard(clean_text) for letter in plug: l = self._forward(letter) l = self._reflect(self.reflector, l) l = self._backwards(l) encrypted.append(l) encrypted = self._enc_plugboard(encrypted) encrypted = ""....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encryptionSelfMadeFunction(text,index):\n s = text\n transformedChar = \"\"\n\n transformedChar = s[0:index] + s[index+1:] +s[index]\n\n print(\"Encrypted Transformed text : \" )\n return transformedChar", "def preprocess(text):\n return text.lower()", "def _transliterate_text(self, _text...
[ "0.6172042", "0.61386615", "0.6013001", "0.6007167", "0.6003645", "0.5999545", "0.5973213", "0.5943066", "0.5935106", "0.5923482", "0.59233654", "0.59201294", "0.5909137", "0.58709353", "0.5832069", "0.5817809", "0.58004427", "0.5791834", "0.5772216", "0.5759488", "0.5742981"...
0.60748583
2
Decrypts text. The configuration should be the same as the initial configuration used by the machine for encryption. Use the reset method to reset the offsets if necessary.
def decrypt(self, text): if self.offsets != self.start_off: raise Exception("Current offset != starting offset. Use the reset"+\ " method before decrypting.") return self.encrypt(text)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decrypt(text, offset):\r\n return format_text(text, -offset)", "def decrypt(self, text):\n return self.encrypt(text)", "def decrypt(text,key):\r\n aes = pyaes.AESModeOfOperationCTR(key)\r\n decrypted = aes.decrypt(text)\r\n return decrypted", "def decrypt(text, ...
[ "0.7697106", "0.7482718", "0.7030502", "0.6725311", "0.66860723", "0.6614009", "0.65919447", "0.6583637", "0.65643156", "0.65093535", "0.64935434", "0.6470546", "0.6464969", "0.64432144", "0.6407435", "0.64009774", "0.63371176", "0.6336156", "0.63166344", "0.63100886", "0.625...
0.8522153
0
Sets the learning rate to the initial LR decayed by 10 at every specified step
def adjust_learning_rate(optimizer, gamma, step): lr = args.lr * (0.8 ** step) print(lr) for param_group in optimizer.param_groups: param_group['lr'] = lr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def adjust_learning_rate(optimizer, lr, step, args):\n # decay = 0.1**(sum(epoch >= np.array(lr_steps)))\n lr = lr * (0.95**(step//args.lr_decay_every))\n print(\"current learning rate: {:.6f}\".format(lr))\n param_group = optimizer.param_groups\n for i in range(len(param_group)):\n param_gro...
[ "0.7677445", "0.7677331", "0.75425225", "0.7532502", "0.7501904", "0.7474184", "0.74659353", "0.7463364", "0.7447536", "0.7445412", "0.7445412", "0.74243855", "0.74243855", "0.7419049", "0.7414735", "0.739953", "0.73903084", "0.73876435", "0.7374959", "0.7369073", "0.7358724"...
0.7550103
2
FindFile(file) Attempts to locate file in any of the mods folders. If file is a full path, it will attempt to use the GetFile() function to split the folder and file from the full path. Returns a tuple of (folder, file) in either case. If the file is not a full path and can't be found, it will raise FileNotFoundError, ...
def FindFile(seeker): for folder in var.MOD_LOCATION: for file in os.listdir(folder): if file.lower() == seeker.lower(): if not folder.endswith(("/", "\\")): folder = folder + "\\" return folder, file if True in [slash in seeker for slash...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def recursively_find_file(folder, file_name):\n # TODO: print a hint when not founding file_name", "def checkFilePath(self, filename, searchpath=[]):\n\t\tif filename is None:\n\t\t\treturn None\n\t\telif os.path.isfile(filename):\n\t\t\treturn filename\n\t\telse:\n\t\t\t# Append current dir to searchpath and...
[ "0.63258296", "0.61334497", "0.5949965", "0.5717448", "0.57132846", "0.56921214", "0.56921214", "0.5606734", "0.55925655", "0.5592373", "0.5583398", "0.5573338", "0.5568939", "0.55592126", "0.5536514", "0.55215186", "0.5459383", "0.5438104", "0.53975683", "0.53717285", "0.536...
0.7348206
0
ExecuteFile(file, params) Runs an executable file located in (one of) the Mods location. Returns the process' return code.
def ExecuteFile(*args): # the docstring lies about parameters folder, file = FindFile(args[0]) params = args[1:] log.logger("PARS_EXEC_FILE", format=[file, folder[:-1], params], display=False) process = subprocess.Popen([folder + file] + list(params)) process.communicate() return process.retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_file(file_path, globals_, script_dir=SCRIPT_DIR):\n fix_sys_path()\n script_name = os.path.basename(file_path)\n script_name = SCRIPT_EXCEPTIONS.get(script_name, script_name)\n script_path = os.path.join(script_dir, script_name)\n print script_path\n execfile(script_path, globals_)", "def run_execu...
[ "0.698795", "0.69709724", "0.6680755", "0.6648183", "0.6581526", "0.64158064", "0.6392396", "0.62397593", "0.6199557", "0.60507655", "0.601007", "0.5984262", "0.5943254", "0.5921672", "0.59054035", "0.58133644", "0.5799649", "0.57672405", "0.5734077", "0.5714152", "0.5699595"...
0.7974937
0
GetFile(file) Splits the folder and file from a full path. Returns a tuple of (folder, file).
def GetFile(file): file = file.replace("/", "\\").strip("\\") new = list(file) new.reverse() if "\\" not in new: return None, file # Don't raise an error, but there isn't any folder indx = new.index("\\") return file[:-indx], file[-indx:] # Full path and file name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_file_path(file_path):\n\n file_name = os.path.basename(file_path)\n\n cutoff = len(file_path) - len(file_name)\n\n folder_path = file_path[:cutoff]\n\n return folder_path, file_name", "def parse_file_path(file_path):\n\n file_name = os.path.basename(file_path)\n\n cutoff = len(file_pa...
[ "0.6762138", "0.6762138", "0.60875225", "0.60354054", "0.6009469", "0.59130657", "0.5769223", "0.56438655", "0.56382656", "0.56349343", "0.5631418", "0.56203586", "0.5578579", "0.5524074", "0.55204046", "0.5500459", "0.5481047", "0.5479951", "0.546729", "0.5453095", "0.544330...
0.7454542
0
GetName(file) Removes the extension from a file. Returns a tuple of (file, extension).
def GetName(file): new = list(file) new.reverse() if not "." in new: return file, None indx = new.index(".") return file[:indx], file[indx+1:]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_file_name(file):\n return os.path.splitext(os.path.basename(file))[0]", "def strip_extension(filename):\n return filename.rsplit('.',1)[-2]", "def clean_filename(file):\r\n\r\n return file.split('.')[0]", "def filename_strip_ext(filename):\n base = os.path.basename(filename)\n # Strip ...
[ "0.7797421", "0.764361", "0.7595781", "0.7406331", "0.73140264", "0.73013836", "0.7253444", "0.7126977", "0.70709264", "0.70426506", "0.70114875", "0.70114875", "0.6961699", "0.6955039", "0.6952459", "0.69364023", "0.6926961", "0.69201946", "0.6907538", "0.6902184", "0.683716...
0.7339357
4
ExtractFile(file, dst=None, pw=None) Extracts an archive into the temp folder. Specify a file, a destination and a password. If 'file' is not an archive, it will simply copy it over. If 'dst' is not specified, it will use the file's name. Returns the location of the resulting files.
def ExtractFile(file, dst=None, pw=None): path, file = FindFile(file) if file.endswith(".rar"): type = "rar" elif file.endswith((".zip", ".7z")): type = "zip" else: type = None if dst is None: dst = file if not dst.endswith(("/", "\\")): dst = dst + "\\...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extractfile(file, passwd):\n try:\n zipf = zipfile.ZipFile(file)\n zipf.extractall(path=os.path.join(file[:-4]), pwd=str.encode(passwd))\n print('Password: {}'.format(passwd))\n except:\n pass", "def ExtractFile(self, dest_dir):\n self.__get_packed_xwalk_app_template(dest...
[ "0.65115666", "0.5753972", "0.56500095", "0.5603992", "0.5527236", "0.5507701", "0.5500255", "0.54809153", "0.5445222", "0.53783196", "0.53759146", "0.5262364", "0.5165045", "0.51642126", "0.51533556", "0.5140736", "0.5131286", "0.5126001", "0.508101", "0.5036791", "0.5029284...
0.773322
0
ExtractMod(mod, dst=None, pw=None, range=None, overwrite=True) Checks for a mod's existence and installs it if it exists. 'dst' will be the final location. Defaults to the temp folder if unspecified. 'pw' will be fed as the password to the ExtractFile function. 'range' will be the range for which to check files; it's a...
def ExtractMod(mod, dst=None, pw=None, range=None, overwrite=True): file = getattr(fl, mod) if dst is None: dst = var.BOOTLEG_TEMP + mod try: if range is None: FindFile(file) else: # explicit override of the range function - yay __builtins__ :D for num in __...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ExtractFile(file, dst=None, pw=None):\n\n path, file = FindFile(file)\n\n if file.endswith(\".rar\"):\n type = \"rar\"\n elif file.endswith((\".zip\", \".7z\")):\n type = \"zip\"\n else:\n type = None\n\n if dst is None:\n dst = file\n if not dst.endswith((\"/\", \...
[ "0.5237817", "0.5110865", "0.47217962", "0.47020456", "0.46294928", "0.45337695", "0.44764635", "0.44509658", "0.44130152", "0.43863454", "0.43481404", "0.4293722", "0.42685872", "0.42552644", "0.4250608", "0.423482", "0.42136598", "0.42102575", "0.42053008", "0.41918778", "0...
0.8552399
0
ExtractFolder(path) Extracts all the archives from a folder into that same folder. Returns a tuple of all the resulting folders' names.
def ExtractFolder(path): if not path.endswith(("/", "\\")): path = path + "\\" folders = [] files = [] for file in os.listdir(path): files.append(path + file) _file, ext = GetName(file) folder = ExtractFile(path + file) CopyFolder(folder, path + _file) fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _extract_archive(path: str, extracted_dir_path: str) -> str:\n logging.info('extracting %s to %s', path, extracted_dir_path)\n with tarfile.open(path) as tar:\n tar.extractall(path=extracted_dir_path)\n extracted_items = os.listdir(extracted_dir_path)\n if len(extracted_items) != 1:\n ...
[ "0.6846293", "0.6732933", "0.61467665", "0.60470045", "0.60425836", "0.5991757", "0.5988355", "0.5841082", "0.5742796", "0.5741708", "0.56827486", "0.5606064", "0.5600333", "0.5590889", "0.55497", "0.5535603", "0.5427062", "0.53971833", "0.5387293", "0.531985", "0.5301058", ...
0.78496677
0
ExtractLGP(file, dir=None) Extracts the contents of a LGP archive in a folder. Returns the resulting directory.
def ExtractLGP(file, dir=None): if dir is None: p, f = GetFile(file) dir = var.BOOTLEG_TEMP + f subprocess.Popen([var.ULGP_LOCATION, "-x", file, "-C", dir]) return dir
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RepackLGP(dir, file=None):\n\n if file is None:\n p, f = GetFile(dir)\n if f.endswith((\"/\", \"\\\\\")):\n f = f[:-1]\n file = var.BOOTLEG_TEMP + f + \".lgp\"\n subprocess.Popen([var.ULGP_LOCATION, \"-c\", file, \"-C\", dir])\n return file", "def download_extract(nam...
[ "0.6670236", "0.5393562", "0.5357665", "0.5296923", "0.5217785", "0.5009716", "0.49887457", "0.48910058", "0.48338923", "0.47894818", "0.47348577", "0.46446905", "0.4632599", "0.46304503", "0.4612503", "0.4566002", "0.45542613", "0.4552373", "0.45423222", "0.4542051", "0.4519...
0.7894865
0
RepackLGP(dir, file=None) Packs the contents of a folder into a LGP archive. Returns the resulting file.
def RepackLGP(dir, file=None): if file is None: p, f = GetFile(dir) if f.endswith(("/", "\\")): f = f[:-1] file = var.BOOTLEG_TEMP + f + ".lgp" subprocess.Popen([var.ULGP_LOCATION, "-c", file, "-C", dir]) return file
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ExtractLGP(file, dir=None):\n\n if dir is None:\n p, f = GetFile(file)\n dir = var.BOOTLEG_TEMP + f\n subprocess.Popen([var.ULGP_LOCATION, \"-x\", file, \"-C\", dir])\n return dir", "def pack(file_path, extension):\n package_dir = file_path.split('.')[0] + '.' + extension\n print...
[ "0.59195614", "0.5775735", "0.5496996", "0.5278678", "0.51489365", "0.5020867", "0.49108347", "0.49014816", "0.48940563", "0.48889828", "0.4886973", "0.48255393", "0.48208666", "0.48069724", "0.47919792", "0.46869788", "0.46493793", "0.4645264", "0.464379", "0.46393862", "0.4...
0.7751973
0
LaunchFile(file, params) Runs a raw executable file. The parameters are to feed to the process. Can be multiple parameters. Returns the process' return code.
def LaunchFile(*params): file = subprocess.Popen(params) file.communicate() return file.returncode
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ExecuteFile(*args): # the docstring lies about parameters\n\n folder, file = FindFile(args[0])\n params = args[1:]\n\n log.logger(\"PARS_EXEC_FILE\", format=[file, folder[:-1], params], display=False)\n process = subprocess.Popen([folder + file] + list(params))\n process.communicate()\n retur...
[ "0.7223708", "0.68104553", "0.633585", "0.6269134", "0.6211025", "0.6098034", "0.60761744", "0.5994176", "0.5913522", "0.5878413", "0.5876325", "0.5871793", "0.567408", "0.566498", "0.5593275", "0.557758", "0.5562519", "0.5535439", "0.5529694", "0.5520267", "0.5504367", "0....
0.81206
0
CopyFolder(src, dst, overwrite=True) Copies the content of 'src' into 'dst'. The destination may or may not exist. The 'overwrite' parameter will tell the function whether to overwrite files. This supports nested folders. Always returns 0.
def CopyFolder(src, dst, overwrite=True): if not src.endswith(("/", "\\")): src = src + "\\" if not dst.endswith(("/", "\\")): dst = dst + "\\" os.makedirs(dst, exist_ok=True) for file in os.listdir(src): if not overwrite and os.path.isfile(dst + file): continue ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy_folder(src: str, dest: str) -> None:\n\tuux.show_info(\"Copying folder \" + src + \" => \" + dest)\n\n\tif not os.path.exists(src):\n\t\tuux.show_error(\"Unable to copy, '\" + src + \"' does not exist.\")\n\t\treturn\n\n\tmkdir(dest)\n\n\tfor fn in os.listdir(src):\n\t\tif os.path.isfile(src + fn):\n\t\t\...
[ "0.75916386", "0.6912031", "0.6744624", "0.6506837", "0.64595366", "0.64063305", "0.62938625", "0.6196626", "0.6196626", "0.61707675", "0.6094042", "0.6064407", "0.60359025", "0.6029565", "0.6015132", "0.60149294", "0.5964577", "0.59552974", "0.59481025", "0.5929881", "0.5926...
0.80914754
0
CopyFile(path, file, new) Creates of copy of 'file' with name 'new' in 'path'. Always returns 0.
def CopyFile(path, file, new): if not path.endswith(("/", "\\")): path = path + "\\" shutil.copy(path + file, path + new) return 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy_file(file_name, new_file_name):\n\n import os\n\n if not os.path.exists(file_name):\n raise FileNotFoundError\n\n with open(str(file_name), 'rb') as infile:\n with open(str(new_file_name), 'wb') as outfile:\n while True:\n buff =...
[ "0.7342367", "0.7062944", "0.6988448", "0.6937015", "0.6923848", "0.686875", "0.67582273", "0.6685474", "0.66165555", "0.6615056", "0.6586806", "0.65143555", "0.6512323", "0.646609", "0.6458299", "0.6458299", "0.6458299", "0.64416116", "0.64161277", "0.6405297", "0.6394165", ...
0.82788193
0
DeleteFile(path) Deletes all files and folders given. Always returns 0.
def DeleteFile(*path): for line in path: if os.path.isdir(line): shutil.rmtree(line) if os.path.isfile(line): os.remove(line) return 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_file(path):\n return files.delete_file(path)", "def file_delete(self, path):\n params = {'root': self.session.root, 'path': format_path(path)}\n\n url, params, headers = self.request(\"/fileops/delete\", params)\n\n return self.rest_client.POST(url, params, headers)", "def de...
[ "0.7869286", "0.76546806", "0.7388755", "0.72415155", "0.72076136", "0.72005427", "0.7192144", "0.7170887", "0.7170887", "0.7164125", "0.70655143", "0.69983995", "0.6865429", "0.68378466", "0.67944336", "0.6735856", "0.6728706", "0.67129046", "0.67129046", "0.67070305", "0.66...
0.80297625
0
RenameFile(path, org, new) Renames item x of 'org' to item x of 'new' in path. Returns 0 if all items could be renamed. Returns more than 0 if there were more items in 'org' than 'new' Returns less than 0 if there were more items in 'new' than 'org'
def RenameFile(path, org, new): cont = zip(org, new) if not path.endswith(("/", "\\")): path = path + "\\" for file in cont: if os.path.isfile(path + file[0]): os.rename(path + file[0], path + file[1]) return len(org) - len(new)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rename(self,oldItem,newItem):\r\n raise AbstractError\r\n return False", "def rename(old, new):", "def rename(old, new):", "def projectFileRenamed(self, oldfn, newfn):\n editor = self.getOpenEditor(oldfn)\n if editor:\n editor.fileRenamed(newfn)", "def rename(oldn...
[ "0.6143776", "0.60080373", "0.60080373", "0.58179", "0.57596266", "0.5529786", "0.5525997", "0.55170435", "0.5496105", "0.5486858", "0.546561", "0.5431416", "0.54079854", "0.5389883", "0.53634936", "0.53631765", "0.52538437", "0.52488685", "0.52396923", "0.52350086", "0.52344...
0.80195767
0
AttribFile(file, attr="R S H I", params) Sets Windows file and folders attributes. Default attribute change is to remove all unwanted attributes. Parameters are optional, it's mainly to touch folders as well. Returns 0 if it completed successfully.
def AttribFile(file, attr="-R -S -H -I", *params): params = " ".join(params).split() # handle tuples and multispaced items if isinstance(attr, (tuple, list, set)): attr = " ".join(attr) lines = attr.split() + [file] + params attrib = subprocess.Popen(["C:\\Windows\\System32\\attrib.exe"] + line...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetAttributes(self, attr):\r\n \r\n if self._ownsAttr:\r\n del self._attr\r\n \r\n self._attr = attr\r\n self._ownsAttr = False", "def set_file_attr(self):\n if self.resolution == 1000:\n satellite_type = ['AQUA', 'TERRA']\n if self...
[ "0.5261392", "0.49339035", "0.4924765", "0.4917284", "0.49015188", "0.48957682", "0.48640934", "0.48483077", "0.46952525", "0.46852258", "0.4674856", "0.4672482", "0.4654802", "0.46223906", "0.46107024", "0.46076995", "0.45837176", "0.45700586", "0.45637625", "0.45579827", "0...
0.7758203
0
StripAttribute(path) Removes all unwanted attributes from files in path.
def StripAttributes(path): if not path.endswith(("/", "\\")): path += "\\" folders = [path] allf = [] while folders: folder = folders.pop(0) allf.append(folder) for lister in os.listdir(folder): if os.path.isdir(folder + lister): folders.appen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_attributes(cube, field, filename):\n cube.attributes = None", "def strip_attributes(arff_file):\r\n start = arff_file.find('% filename')\r\n new_arff = arff_file[start:]\r\n return new_arff", "def remove_attributes(self, remove_attrs):\n remove = []\n for attr in self.data:...
[ "0.63845766", "0.6220756", "0.6163511", "0.6163511", "0.6080287", "0.5801426", "0.5746101", "0.57427835", "0.57427835", "0.57427835", "0.5729805", "0.5704866", "0.5638217", "0.5624947", "0.5587875", "0.5585241", "0.5573176", "0.55374366", "0.5532499", "0.5501856", "0.5465265"...
0.6896639
0
StripFolder(path) Brings all files within all subfolders to the root ('path'). Deletes all subfolders of the main path. Returns a tuple of all the subfolders that were copied over.
def StripFolder(path): if not path.endswith(("/", "\\")): path = path + "\\" folders = [path] allf = [] while folders: folder = folders.pop(0) allf.append(folder) for lister in os.listdir(folder): if os.path.isdir(folder + lister): folders.app...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ExtractFolder(path):\n\n if not path.endswith((\"/\", \"\\\\\")):\n path = path + \"\\\\\"\n folders = []\n files = []\n for file in os.listdir(path):\n files.append(path + file)\n _file, ext = GetName(file)\n folder = ExtractFile(path + file)\n CopyFolder(folder,...
[ "0.7029333", "0.60177916", "0.59128374", "0.5911949", "0.5794489", "0.57633936", "0.57363594", "0.57268214", "0.5675963", "0.56686217", "0.5616837", "0.55706525", "0.5567647", "0.5564295", "0.5555438", "0.55062664", "0.5492872", "0.5459668", "0.5448241", "0.54460824", "0.5433...
0.8126114
0
CallSkipMod(mod) Prints a missing mod warning using 'mod' as the missing file. Always returns 0.
def CallSkipMod(mod): if len(var.MOD_LOCATION) == 1: iner = "ONE_IN" else: iner = "MULT_IN_ONE" file = getattr(fl, mod) if "{0}" in file: file = file.format(1) # make sure it does say *something* log.logger("PARS_SKIP", format=[mod, file, iner, "', '".join(var.MOD_LOCATION)]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shall_skip(module):\n # skip it, if there is nothing (or just \\n or \\r\\n) in the file\n return path.getsize(module) < 3", "def skipped (func):\n try:\n from nose.plugins.skip import SkipTest\n\n def skipme (*a, **k):\n raise SkipTest()\n\n skipme.__name__ = func.__...
[ "0.5755264", "0.56256", "0.5601252", "0.5555863", "0.5437181", "0.5423412", "0.5353894", "0.5249999", "0.5243704", "0.52432823", "0.5241218", "0.5223273", "0.5221188", "0.5192148", "0.51250154", "0.5081649", "0.5074118", "0.50586987", "0.50229686", "0.5008486", "0.50062305", ...
0.8526851
0
Returns dictionary of digestable database information Infostr is a string summary of all the stats. Prints infostr in addition to returning locals
def get_dbinfo( ibs, verbose=True, with_imgsize=True, with_bytes=True, with_contrib=True, with_agesex=True, with_header=True, with_reviews=True, with_ggr=False, with_ca=False, with_map=False, short=False, tag='dbinfo', aid_list=None, aids=None, gmt_offset=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def basic_stats(db):\n rps = len(list(db['rp'].keys()))\n users = len(list(db['users'].keys()))\n logins = db['logins']\n return {\"rps\": rps, \"users\": users, \"logins\": logins}", "def get_short_infostr(ibs):\n dbname = ibs.get_dbname()\n # workdir = ut.unixpath(ibs.get_workdir())\n num_...
[ "0.64910334", "0.6471775", "0.6396424", "0.638558", "0.6369618", "0.6366094", "0.63437855", "0.62883836", "0.62811905", "0.61956847", "0.61536646", "0.61418754", "0.6110703", "0.610692", "0.6051924", "0.6017827", "0.59878695", "0.5974636", "0.5961399", "0.5928489", "0.5925965...
0.0
-1
Returns printable database information
def get_short_infostr(ibs): dbname = ibs.get_dbname() # workdir = ut.unixpath(ibs.get_workdir()) num_images = ibs.get_num_images() num_annotations = ibs.get_num_annotations() num_names = ibs.get_num_names() # workdir = %r infostr = ut.codeblock( """ dbname = %s num_images = %...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_database(self):\n table_names = self.catalog\n for table_name in table_names:\n table = self.parse_table(table_name)\n if not table:\n continue\n print(f'TABLE NAME: {table_name}\\r\\n')\n print(tabulate(table, headers=\"keys\"))\n ...
[ "0.7660168", "0.7269708", "0.72388893", "0.7237485", "0.69978166", "0.6960126", "0.689007", "0.6879551", "0.68743145", "0.6741814", "0.6728879", "0.67238057", "0.6701398", "0.67008716", "0.6698224", "0.6648464", "0.6569515", "0.64923555", "0.64861715", "0.64844584", "0.647281...
0.0
-1
r""" Lincoln Petersen Index The LincolnPeterson index is a method used to estimate the total number of individuals in a population given two independent sets observations. The likelihood of a population size is a hypergeometric distribution given by assuming a uniform sampling distribution.
def sight_resight_count(nvisit1, nvisit2, resight): import math try: nvisit1 = float(nvisit1) nvisit2 = float(nvisit2) resight = float(resight) pl_index = int(math.ceil((nvisit1 * nvisit2) / resight)) pl_error_num = float((nvisit1 ** 2) * nvisit2 * (nvisit2 - resight)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_inv_index(people):\n pass", "def index(i, j):\n return i * N + j", "def omission_index(n, sample_size):\n \n \"randomly pick some subset of sample_size agents\"\n index = np.sort(np.random.choice(n,sample_size,replace=False))\n \"double up index to choose x and y positions colum...
[ "0.6661927", "0.54868066", "0.5465935", "0.5376383", "0.53248876", "0.5225149", "0.52180547", "0.5190466", "0.5129243", "0.51200336", "0.5096346", "0.50647396", "0.5063527", "0.50398695", "0.496617", "0.49622437", "0.49560425", "0.4955799", "0.49468455", "0.49429235", "0.4920...
0.0
-1
Send a GET request to URL.
def _get(url): url = urlparse(url) conn = HTTPConnection(url.hostname, url.port) conn.request('GET', url.path+url.query) return conn.getresponse().fp.read()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def do_GET(self):\n self.http_method = 'GET'\n self.response()", "def do_GET(self):\r\n self._send_handler_response('GET')", "def get(self, url):\n return self._request('GET', url)", "def get(url, to_error=_default_to_error, **kwargs):\n\n return request('get', url, to_error=to...
[ "0.7747273", "0.77357435", "0.7733875", "0.75415117", "0.7522533", "0.7502433", "0.7478077", "0.74447596", "0.7346277", "0.7308088", "0.73020315", "0.730139", "0.7295266", "0.72436553", "0.72308594", "0.72035056", "0.71842176", "0.7170036", "0.7167351", "0.7145897", "0.713437...
0.6880557
35
The set of arguments for constructing a Service resource.
def __init__(__self__, *, service_name: pulumi.Input[str], source_configuration: pulumi.Input['ServiceSourceConfigurationArgs'], auto_scaling_configuration_arn: Optional[pulumi.Input[str]] = None, encryption_configuration: Optional[pulumi.Input['Servic...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n args: ServiceArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def __init__(__self__,\n resource_name: str,\n args: ServiceArgs,\n opts: Optional[pu...
[ "0.7099585", "0.7099585", "0.6431372", "0.6303985", "0.6283253", "0.6239377", "0.61508375", "0.6140378", "0.60760033", "0.6009948", "0.60059226", "0.59639823", "0.59285754", "0.592254", "0.5920332", "0.5915397", "0.5895189", "0.5888014", "0.58868355", "0.5882188", "0.5871778"...
0.61474043
7
Name of the service.
def service_name(self) -> pulumi.Input[str]: return pulumi.get(self, "service_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_name(self) -> str:\n return pulumi.get(self, \"service_name\")", "def service_name(self) -> str:\n return pulumi.get(self, \"service_name\")", "def service_name(self):\n return self._service_name", "def service_name(self) -> pulumi.Output[str]:\n return pulumi.get(self...
[ "0.90985924", "0.90985924", "0.89885104", "0.87708855", "0.87708855", "0.87708855", "0.832409", "0.832409", "0.832409", "0.82325894", "0.8127267", "0.785057", "0.7743876", "0.76368743", "0.7590222", "0.75873625", "0.7544445", "0.73286045", "0.7316036", "0.7237534", "0.7237534...
0.8632549
7
The source to deploy to the App Runner service. Can be a code or an image repository. See Source Configuration below for more details.
def source_configuration(self) -> pulumi.Input['ServiceSourceConfigurationArgs']: return pulumi.get(self, "source_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def source_repository(self) -> Optional['outputs.CodeRepositoryResponse']:\n return pulumi.get(self, \"source_repository\")", "def _create_source_stage(\n self, stage_name: str, output: codepipeline.Artifact):\n secret_token = ''\n repo = ''\n owner = ''\n github_act...
[ "0.66399777", "0.62668455", "0.6238873", "0.6238873", "0.6238873", "0.6238873", "0.6238873", "0.6238873", "0.62323636", "0.62184614", "0.62184614", "0.62184614", "0.62184614", "0.616811", "0.6158358", "0.6127942", "0.60938025", "0.60862446", "0.60485876", "0.60106725", "0.599...
0.5922823
25
ARN of an App Runner automatic scaling configuration resource that you want to associate with your service. If not provided, App Runner associates the latest revision of a default auto scaling configuration.
def auto_scaling_configuration_arn(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "auto_scaling_configuration_arn")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auto_scaling_configuration_arn(self) -> Optional[str]:\n return pulumi.get(self, \"auto_scaling_configuration_arn\")", "def auto_scaling_configuration_arn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"auto_scaling_configuration_arn\")", "def autoscaling(self) -> Optional[pulumi.Inp...
[ "0.7602388", "0.73555046", "0.6526771", "0.6416983", "0.6149178", "0.6127391", "0.5787056", "0.55833757", "0.55405587", "0.5494746", "0.54689515", "0.5468072", "0.5468072", "0.5468072", "0.5468072", "0.5468072", "0.5468072", "0.5468072", "0.54050505", "0.5402634", "0.53579885...
0.7562741
1
An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an AWS managed CMK. See Encryption Configuration below for more details.
def encryption_configuration(self) -> Optional[pulumi.Input['ServiceEncryptionConfigurationArgs']]: return pulumi.get(self, "encryption_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encryption_key(self) -> typing.Optional[aws_cdk.aws_kms.IKey]:\n ...", "def encryption_key(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"encryption_key\")", "def encryption_key(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"encryption_key\")", "...
[ "0.6602962", "0.63203305", "0.63203305", "0.62475926", "0.6122903", "0.6089424", "0.6087436", "0.6050842", "0.6022416", "0.6022416", "0.59793943", "0.5969819", "0.5958181", "0.59497225", "0.5939462", "0.59387326", "0.5866183", "0.5856553", "0.5856553", "0.5787128", "0.5782294...
0.56328404
31
Settings of the health check that AWS App Runner performs to monitor the health of your service. See Health Check Configuration below for more details.
def health_check_configuration(self) -> Optional[pulumi.Input['ServiceHealthCheckConfigurationArgs']]: return pulumi.get(self, "health_check_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def health_check_configuration(self) -> pulumi.Output['outputs.ServiceHealthCheckConfiguration']:\n return pulumi.get(self, \"health_check_configuration\")", "def healthcheck(parameters): \n\n print(\"In healthcheck module\")", "def health_check():\n app.logger.info(\"Health Check!\")\n return ...
[ "0.68419075", "0.6347665", "0.62836397", "0.61189044", "0.6003582", "0.58736956", "0.5865395", "0.5828682", "0.58054304", "0.58054304", "0.5802205", "0.57770216", "0.5776012", "0.5757377", "0.57560873", "0.57560873", "0.5734575", "0.57197356", "0.5709717", "0.5709717", "0.570...
0.67506576
1
The runtime configuration of instances (scaling units) of the App Runner service. See Instance Configuration below for more details.
def instance_configuration(self) -> Optional[pulumi.Input['ServiceInstanceConfigurationArgs']]: return pulumi.get(self, "instance_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auto_scaling(self):\n return self.container['auto_scaling']", "def instance_configuration(self) -> pulumi.Output['outputs.ServiceInstanceConfiguration']:\n return pulumi.get(self, \"instance_configuration\")", "def runtime_config(self) -> str:\n return self._node[\"app_data\"].get(\"ru...
[ "0.66013867", "0.6486373", "0.6452556", "0.60827935", "0.5838682", "0.5779563", "0.5749885", "0.5667441", "0.5536789", "0.5519415", "0.55087906", "0.5460052", "0.5460052", "0.5430617", "0.5427294", "0.54234636", "0.5421823", "0.5376923", "0.5346382", "0.533685", "0.52938914",...
0.650554
2
Configuration settings related to network traffic of the web application that the App Runner service runs. See Network Configuration below for more details.
def network_configuration(self) -> Optional[pulumi.Input['ServiceNetworkConfigurationArgs']]: return pulumi.get(self, "network_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_settings(self): # type: () -> t.Dict[str, t.Any]\n return self.inspection['NetworkSettings']", "def network_configuration(self) -> pulumi.Output['outputs.ServiceNetworkConfiguration']:\n return pulumi.get(self, \"network_configuration\")", "def network_config(self) -> 'outputs.Networ...
[ "0.6015695", "0.59456706", "0.5870308", "0.5870308", "0.5752671", "0.5752671", "0.56932443", "0.5645092", "0.5629313", "0.5614321", "0.5545634", "0.55261374", "0.5504293", "0.5500942", "0.54950154", "0.54877526", "0.54553556", "0.5371222", "0.5335917", "0.5307572", "0.5297308...
0.6002301
1
The observability configuration of your service. See Observability Configuration below for more details.
def observability_configuration(self) -> Optional[pulumi.Input['ServiceObservabilityConfigurationArgs']]: return pulumi.get(self, "observability_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def observability_configuration(self) -> pulumi.Output[Optional['outputs.ServiceObservabilityConfiguration']]:\n return pulumi.get(self, \"observability_configuration\")", "def fleetobservability(self) -> Optional['outputs.FeatureSpecFleetobservability']:\n return pulumi.get(self, \"fleetobservabil...
[ "0.7956246", "0.56444937", "0.531778", "0.52681047", "0.52177036", "0.51991004", "0.5184514", "0.51248384", "0.51248384", "0.51227665", "0.51139295", "0.5072489", "0.5047751", "0.49704665", "0.49501875", "0.4946865", "0.4931813", "0.49101347", "0.48935717", "0.48596627", "0.4...
0.81733936
0
Keyvalue map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the providerlevel.
def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: return pulumi.get(self, "tags")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, str]:\n return pulumi....
[ "0.62630427", "0.62630427", "0.62630427", "0.62630427", "0.62515557", "0.6199379", "0.6197303", "0.6197303", "0.6171081", "0.60235703", "0.59087926", "0.58788806", "0.586093", "0.586093", "0.5852339", "0.57716066", "0.57523805", "0.5746529", "0.5728116", "0.5700934", "0.57009...
0.56223136
100
Input properties used for looking up and filtering Service resources.
def __init__(__self__, *, arn: Optional[pulumi.Input[str]] = None, auto_scaling_configuration_arn: Optional[pulumi.Input[str]] = None, encryption_configuration: Optional[pulumi.Input['ServiceEncryptionConfigurationArgs']] = None, health_check_configura...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_resource_query(self):\n pass", "def get_resource_query(self):\n pass", "def services(**kwargs):\n pass", "def getServices(self):\n pass", "def properties(self):\n return {\n \"customAnnotatorClass.{}\".format(self.name): \"edu.stanford.nlp.pipeline.GenericW...
[ "0.56376886", "0.56376886", "0.5608638", "0.55467165", "0.5507294", "0.5495629", "0.54802436", "0.5460371", "0.54552716", "0.54329723", "0.53915566", "0.5334275", "0.53074646", "0.526806", "0.52328527", "0.52222544", "0.5182431", "0.51724124", "0.51722324", "0.5166351", "0.51...
0.55635124
3
ARN of the App Runner service.
def arn(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "arn")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_service(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"app_service\")", "def invoke_arn(self) -> str:\n return pulumi.get(self, \"invoke_arn\")", "def service(self) -> str:\n return pulumi.get(self, \"service\")", "def service_name(self) -> pulumi.Output[str]:...
[ "0.64479035", "0.62479824", "0.6121296", "0.60471237", "0.60471237", "0.60471237", "0.60307676", "0.60307676", "0.6026896", "0.6026896", "0.595133", "0.58155525", "0.58155525", "0.58155525", "0.5814132", "0.5803242", "0.5799869", "0.56959033", "0.5651628", "0.5651628", "0.565...
0.0
-1
ARN of an App Runner automatic scaling configuration resource that you want to associate with your service. If not provided, App Runner associates the latest revision of a default auto scaling configuration.
def auto_scaling_configuration_arn(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "auto_scaling_configuration_arn")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auto_scaling_configuration_arn(self) -> Optional[str]:\n return pulumi.get(self, \"auto_scaling_configuration_arn\")", "def auto_scaling_configuration_arn(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"auto_scaling_configuration_arn\")", "def autoscaling(self) -> Optional[pulumi.Inp...
[ "0.7602245", "0.735489", "0.6525766", "0.64176255", "0.6146565", "0.61262655", "0.57852095", "0.5583138", "0.55412686", "0.5495257", "0.5469104", "0.54688543", "0.54688543", "0.54688543", "0.54688543", "0.54688543", "0.54688543", "0.54688543", "0.54052836", "0.54015535", "0.5...
0.75626993
2
An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an AWS managed CMK. See Encryption Configuration below for more details.
def encryption_configuration(self) -> Optional[pulumi.Input['ServiceEncryptionConfigurationArgs']]: return pulumi.get(self, "encryption_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encryption_key(self) -> typing.Optional[aws_cdk.aws_kms.IKey]:\n ...", "def encryption_key(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"encryption_key\")", "def encryption_key(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"encryption_key\")", "...
[ "0.6603485", "0.63210297", "0.63210297", "0.6248023", "0.61226416", "0.6090516", "0.60879356", "0.6052522", "0.6023005", "0.6023005", "0.59804034", "0.59697306", "0.59581405", "0.5949356", "0.5940023", "0.59386003", "0.5866179", "0.58576727", "0.58576727", "0.5788798", "0.578...
0.5632989
30
Settings of the health check that AWS App Runner performs to monitor the health of your service. See Health Check Configuration below for more details.
def health_check_configuration(self) -> Optional[pulumi.Input['ServiceHealthCheckConfigurationArgs']]: return pulumi.get(self, "health_check_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def health_check_configuration(self) -> pulumi.Output['outputs.ServiceHealthCheckConfiguration']:\n return pulumi.get(self, \"health_check_configuration\")", "def healthcheck(parameters): \n\n print(\"In healthcheck module\")", "def health_check():\n app.logger.info(\"Health Check!\")\n return ...
[ "0.68419075", "0.6347665", "0.62836397", "0.61189044", "0.6003582", "0.58736956", "0.5865395", "0.5828682", "0.58054304", "0.58054304", "0.5802205", "0.57770216", "0.5776012", "0.5757377", "0.57560873", "0.57560873", "0.5734575", "0.57197356", "0.5709717", "0.5709717", "0.570...
0.67506576
2
The runtime configuration of instances (scaling units) of the App Runner service. See Instance Configuration below for more details.
def instance_configuration(self) -> Optional[pulumi.Input['ServiceInstanceConfigurationArgs']]: return pulumi.get(self, "instance_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auto_scaling(self):\n return self.container['auto_scaling']", "def instance_configuration(self) -> pulumi.Output['outputs.ServiceInstanceConfiguration']:\n return pulumi.get(self, \"instance_configuration\")", "def runtime_config(self) -> str:\n return self._node[\"app_data\"].get(\"ru...
[ "0.6600584", "0.6487364", "0.64526594", "0.6082388", "0.583839", "0.5779044", "0.57518584", "0.5666383", "0.5536144", "0.5521754", "0.5508416", "0.54588073", "0.54588073", "0.5430509", "0.5426012", "0.5424304", "0.54210854", "0.53770417", "0.53453577", "0.5336255", "0.5292929...
0.65064335
1
Configuration settings related to network traffic of the web application that the App Runner service runs. See Network Configuration below for more details.
def network_configuration(self) -> Optional[pulumi.Input['ServiceNetworkConfigurationArgs']]: return pulumi.get(self, "network_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_settings(self): # type: () -> t.Dict[str, t.Any]\n return self.inspection['NetworkSettings']", "def network_configuration(self) -> pulumi.Output['outputs.ServiceNetworkConfiguration']:\n return pulumi.get(self, \"network_configuration\")", "def network_config(self) -> 'outputs.Networ...
[ "0.6014977", "0.59457046", "0.58708346", "0.58708346", "0.5752704", "0.5752704", "0.56926703", "0.564471", "0.5629467", "0.5614626", "0.5545953", "0.5524497", "0.5503924", "0.54991037", "0.54951817", "0.54869", "0.5455583", "0.53719604", "0.53355825", "0.53077865", "0.5297745...
0.60021174
2
The observability configuration of your service. See Observability Configuration below for more details.
def observability_configuration(self) -> Optional[pulumi.Input['ServiceObservabilityConfigurationArgs']]: return pulumi.get(self, "observability_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def observability_configuration(self) -> pulumi.Output[Optional['outputs.ServiceObservabilityConfiguration']]:\n return pulumi.get(self, \"observability_configuration\")", "def fleetobservability(self) -> Optional['outputs.FeatureSpecFleetobservability']:\n return pulumi.get(self, \"fleetobservabil...
[ "0.79563946", "0.56439465", "0.53201985", "0.5269377", "0.521966", "0.52014226", "0.518629", "0.5127047", "0.5127047", "0.5122262", "0.5114975", "0.5073362", "0.5050198", "0.49730882", "0.49526307", "0.49493897", "0.4934082", "0.49124867", "0.48943686", "0.4861345", "0.484888...
0.8173864
1
An alphanumeric ID that App Runner generated for this service. Unique within the AWS Region.
def service_id(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "service_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_id(self) -> str:\n return pulumi.get(self, \"service_id\")", "def aws_external_id(self) -> str:\n return pulumi.get(self, \"aws_external_id\")", "def unique_identifier(self) -> str:\n return pulumi.get(self, \"unique_identifier\")", "def _app_id(self):\n return '{}-{}'...
[ "0.69505966", "0.6839909", "0.6826575", "0.67593884", "0.6737102", "0.6737102", "0.6711312", "0.6688661", "0.6661894", "0.6650952", "0.6644211", "0.66398597", "0.6597219", "0.6552976", "0.6484562", "0.6476735", "0.644897", "0.64473784", "0.64415365", "0.64402026", "0.64263177...
0.6240273
54
Name of the service.
def service_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "service_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_name(self) -> str:\n return pulumi.get(self, \"service_name\")", "def service_name(self) -> str:\n return pulumi.get(self, \"service_name\")", "def service_name(self):\n return self._service_name", "def service_name(self) -> pulumi.Output[str]:\n return pulumi.get(self...
[ "0.90985924", "0.90985924", "0.89885104", "0.87708855", "0.87708855", "0.87708855", "0.8632549", "0.8632549", "0.8632549", "0.82325894", "0.8127267", "0.785057", "0.7743876", "0.76368743", "0.7590222", "0.75873625", "0.7544445", "0.73286045", "0.7316036", "0.7237534", "0.7237...
0.832409
11
Subdomain URL that App Runner generated for this service. You can use this URL to access your service web application.
def service_url(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "service_url")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_url(self):\n return \"http://{0}:{1}/app\".format(self.host, self.port)", "def service_url(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_url\")", "def public_rest_url(path_url: str, domain: str = CONSTANTS.DEFAULT_DOMAIN) -> str:\n return CONSTANTS.FTX_BASE_URL + pa...
[ "0.6825268", "0.6818818", "0.6681981", "0.6672954", "0.66055006", "0.65520775", "0.6501978", "0.6468163", "0.645716", "0.64221776", "0.63958496", "0.6383245", "0.632051", "0.6272633", "0.62499744", "0.62295246", "0.62133217", "0.62115973", "0.62011343", "0.619546", "0.6185604...
0.62457585
16
The source to deploy to the App Runner service. Can be a code or an image repository. See Source Configuration below for more details.
def source_configuration(self) -> Optional[pulumi.Input['ServiceSourceConfigurationArgs']]: return pulumi.get(self, "source_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def source_repository(self) -> Optional['outputs.CodeRepositoryResponse']:\n return pulumi.get(self, \"source_repository\")", "def _create_source_stage(\n self, stage_name: str, output: codepipeline.Artifact):\n secret_token = ''\n repo = ''\n owner = ''\n github_act...
[ "0.66399777", "0.62668455", "0.6238873", "0.6238873", "0.6238873", "0.6238873", "0.6238873", "0.6238873", "0.62323636", "0.62184614", "0.62184614", "0.62184614", "0.62184614", "0.616811", "0.6158358", "0.6127942", "0.60938025", "0.60862446", "0.60485876", "0.60106725", "0.599...
0.59445643
24
Current state of the App Runner service.
def status(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "status")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_state(self):\n return self._env.get_state()", "def running(self):\n info = self.info()\n return info['running']", "def status(self):\n if self.app_id:\n return self.yarn_api.apps_info(self.app_id)\n else:\n raise KnitException(\"Cannot get status...
[ "0.68262595", "0.6792812", "0.67527646", "0.67260224", "0.66270804", "0.6615319", "0.6562786", "0.6559686", "0.6556301", "0.6546062", "0.6480879", "0.64766324", "0.64340585", "0.6432745", "0.6425858", "0.6401064", "0.6361489", "0.63612664", "0.6340973", "0.6334077", "0.632901...
0.0
-1
Keyvalue map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the providerlevel.
def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: return pulumi.get(self, "tags")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, str]:\n return pulumi....
[ "0.62645555", "0.62645555", "0.62645555", "0.62645555", "0.62532693", "0.62005436", "0.6198661", "0.6198661", "0.61729014", "0.60247535", "0.5909744", "0.5876319", "0.5861676", "0.5861676", "0.58533055", "0.5772612", "0.5753324", "0.5748929", "0.5728648", "0.5701927", "0.5701...
0.56234
96
Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: return pulumi.get(self, "tags_all")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, Any]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, str]:\n return pulumi.get(self, \"tags\")", "def tags(self) -> Mapping[str, str]:\n return pulumi....
[ "0.7480712", "0.7480712", "0.744961", "0.744961", "0.744961", "0.744961", "0.7183903", "0.70735323", "0.7072765", "0.7040842", "0.70165676", "0.6993755", "0.6991922", "0.69025457", "0.6863047", "0.6807731", "0.6757412", "0.6757412", "0.6757412", "0.6757412", "0.6757412", "0...
0.0
-1
Manages an App Runner Service. Example Usage Service with a Code Repository Source ```python import pulumi import pulumi_aws as aws example = aws.apprunner.Service("example", service_name="example", source_configuration=aws.apprunner.ServiceSourceConfigurationArgs( authentication_configuration=aws.apprunner.ServiceSour...
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, auto_scaling_configuration_arn: Optional[pulumi.Input[str]] = None, encryption_configuration: Optional[pulumi.Input[pulumi.InputType['ServiceEncryptionConfigurati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cli(ctx, verbose, services):\n\n if verbose:\n logging.basicConfig(level=logging.DEBUG)\n click.echo('Verbose mode is ON')\n else:\n logging.basicConfig(level=logging.WARNING)\n\n if verbose:\n click.echo(\"Using services:\")\n click.echo(pformat(services))\n\n # ...
[ "0.62318724", "0.60974777", "0.6093839", "0.6049308", "0.59320545", "0.5772411", "0.5713583", "0.56731117", "0.5621312", "0.5546225", "0.55414534", "0.5525141", "0.55079293", "0.5501251", "0.54921556", "0.54609096", "0.5449174", "0.5441595", "0.53952175", "0.5384533", "0.5375...
0.0
-1
Manages an App Runner Service. Example Usage Service with a Code Repository Source ```python import pulumi import pulumi_aws as aws example = aws.apprunner.Service("example", service_name="example", source_configuration=aws.apprunner.ServiceSourceConfigurationArgs( authentication_configuration=aws.apprunner.ServiceSour...
def __init__(__self__, resource_name: str, args: ServiceArgs, opts: Optional[pulumi.ResourceOptions] = None): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cli(ctx, verbose, services):\n\n if verbose:\n logging.basicConfig(level=logging.DEBUG)\n click.echo('Verbose mode is ON')\n else:\n logging.basicConfig(level=logging.WARNING)\n\n if verbose:\n click.echo(\"Using services:\")\n click.echo(pformat(services))\n\n # ...
[ "0.62318724", "0.60974777", "0.6093839", "0.6049308", "0.59320545", "0.5772411", "0.5713583", "0.56731117", "0.5621312", "0.5546225", "0.55414534", "0.5525141", "0.55079293", "0.5501251", "0.54921556", "0.54609096", "0.5449174", "0.5441595", "0.53952175", "0.5384533", "0.5375...
0.5020991
81
Get an existing Service resource's state with the given name, id, and optional extra properties used to qualify the lookup.
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, arn: Optional[pulumi.Input[str]] = None, auto_scaling_configuration_arn: Optional[pulumi.Input[str]] = None, encryption_configuration: Optional[pulumi.Input[pulum...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(resource_name: str,\n id: pulumi.Input[str],\n opts: Optional[pulumi.ResourceOptions] = None) -> 'Service':\n opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))\n\n __props__ = ServiceArgs.__new__(ServiceArgs)\n\n __props__.__dict__[\"correla...
[ "0.6462436", "0.6262246", "0.5981988", "0.5969614", "0.5956969", "0.59401536", "0.5937153", "0.59308213", "0.59026575", "0.5882669", "0.5830883", "0.58301145", "0.5791222", "0.57855755", "0.57324743", "0.5667298", "0.56250405", "0.5620358", "0.559672", "0.5583968", "0.5560769...
0.70002896
0
ARN of the App Runner service.
def arn(self) -> pulumi.Output[str]: return pulumi.get(self, "arn")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_service(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"app_service\")", "def invoke_arn(self) -> str:\n return pulumi.get(self, \"invoke_arn\")", "def service(self) -> str:\n return pulumi.get(self, \"service\")", "def service_name(self) -> pulumi.Output[str]:...
[ "0.64479035", "0.62479824", "0.6121296", "0.60471237", "0.60471237", "0.60471237", "0.60307676", "0.60307676", "0.6026896", "0.6026896", "0.595133", "0.58155525", "0.58155525", "0.58155525", "0.5814132", "0.5803242", "0.5799869", "0.56959033", "0.5651628", "0.5651628", "0.565...
0.56471735
39
ARN of an App Runner automatic scaling configuration resource that you want to associate with your service. If not provided, App Runner associates the latest revision of a default auto scaling configuration.
def auto_scaling_configuration_arn(self) -> pulumi.Output[str]: return pulumi.get(self, "auto_scaling_configuration_arn")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auto_scaling_configuration_arn(self) -> Optional[str]:\n return pulumi.get(self, \"auto_scaling_configuration_arn\")", "def auto_scaling_configuration_arn(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"auto_scaling_configuration_arn\")", "def auto_scaling_configuration_arn(...
[ "0.76024085", "0.7562809", "0.7562809", "0.6525481", "0.6417855", "0.6147875", "0.6126936", "0.5785499", "0.5585611", "0.55428", "0.54970145", "0.5470329", "0.5470329", "0.5470329", "0.5470329", "0.5470329", "0.5470329", "0.5470329", "0.54684174", "0.5407366", "0.5401369", ...
0.7355564
3
An optional custom encryption key that App Runner uses to encrypt the copy of your source repository that it maintains and your service logs. By default, App Runner uses an AWS managed CMK. See Encryption Configuration below for more details.
def encryption_configuration(self) -> pulumi.Output[Optional['outputs.ServiceEncryptionConfiguration']]: return pulumi.get(self, "encryption_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encryption_key(self) -> typing.Optional[aws_cdk.aws_kms.IKey]:\n ...", "def encryption_key(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"encryption_key\")", "def encryption_key(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"encryption_key\")", "...
[ "0.6603485", "0.63210297", "0.63210297", "0.6248023", "0.61226416", "0.6090516", "0.60879356", "0.6052522", "0.6023005", "0.6023005", "0.59804034", "0.59697306", "0.59581405", "0.5949356", "0.5940023", "0.59386003", "0.5866179", "0.58576727", "0.58576727", "0.5788798", "0.578...
0.5192013
86
Settings of the health check that AWS App Runner performs to monitor the health of your service. See Health Check Configuration below for more details.
def health_check_configuration(self) -> pulumi.Output['outputs.ServiceHealthCheckConfiguration']: return pulumi.get(self, "health_check_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def health_check_configuration(self) -> Optional[pulumi.Input['ServiceHealthCheckConfigurationArgs']]:\n return pulumi.get(self, \"health_check_configuration\")", "def health_check_configuration(self) -> Optional[pulumi.Input['ServiceHealthCheckConfigurationArgs']]:\n return pulumi.get(self, \"heal...
[ "0.67506087", "0.67506087", "0.6347388", "0.6283836", "0.61198914", "0.6003206", "0.5874187", "0.5865065", "0.5828394", "0.58038205", "0.58038205", "0.58012503", "0.57780075", "0.5776028", "0.57574344", "0.5757239", "0.5757239", "0.5735045", "0.57179314", "0.57096285", "0.570...
0.6842051
0
The runtime configuration of instances (scaling units) of the App Runner service. See Instance Configuration below for more details.
def instance_configuration(self) -> pulumi.Output['outputs.ServiceInstanceConfiguration']: return pulumi.get(self, "instance_configuration")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auto_scaling(self):\n return self.container['auto_scaling']", "def instance_configuration(self) -> Optional[pulumi.Input['ServiceInstanceConfigurationArgs']]:\n return pulumi.get(self, \"instance_configuration\")", "def instance_configuration(self) -> Optional[pulumi.Input['ServiceInstanceCon...
[ "0.6601029", "0.650845", "0.650845", "0.6454463", "0.60821944", "0.5838985", "0.5778436", "0.57514274", "0.5667499", "0.55361843", "0.55216545", "0.5507072", "0.54606104", "0.54606104", "0.54302657", "0.54274255", "0.54233086", "0.54219836", "0.53761894", "0.5344997", "0.5337...
0.6489328
3