content
stringlengths
22
815k
id
int64
0
4.91M
def run_multistage_cu_hkust1(cp2k_code, cu_hkust1_structuredata): # pylint: disable=redefined-outer-name """Run Cp2kMultistageWorkChain on Cu-HKUST-1.""" # testing user change of parameters and protocol parameters = Dict(dict={'FORCE_EVAL': {'DFT': {'MGRID': {'CUTOFF': 250,}}}}) # Construct process b...
26,900
def get_spell_slots(pcClass, level): """Return a list containing the available spell slots for each spell level.""" spell_slots = [] if pcClass.casefold() == "Magic-User".casefold(): highest_spell_level = min(math.ceil(level / 2), 9) # MU_SPELL_SLOTS[level - 1] gives first level spell slots...
26,901
def determine_dates_to_query_on_matomo(dates_in_database): """ Determines which dates need to be queried on Matomo to update the dataset. """ from datetime import datetime, timedelta # determines which dates are missing from the database and could be queried on Matomo # NOTE: start date was se...
26,902
def handleMsg(msgJ): """Process the message in msgJ. Parameters: msgJ: dict Dictionary with command sent from client Returns: string JSON string with command response Commands are of the form: {'cmd' : 'getCCC', 'param0': 'param0val', ...} Response is a string of the ...
26,903
def calc_total_energy(electron_energy, atomic_distance, energy0): """ Calculates the total energy of H2 molecule from electron_energy by adding proton-proton Coulomb energy and defining the zero energy energy0. The formula: E = E_el + E_p - E_0 where e is the total energy, E_...
26,904
def k8s_stats_response(): """ Returns K8s /stats/summary endpoint output from microk8s on Jetson Nano. """ with open("tests/resources/k8s_response.json", "r") as response_file: response = response_file.read() return response
26,905
def test_crop(): """Test similarly cropping one image to another""" numpy.random.seed(0) image1 = numpy.random.uniform(size=(20, 20)) i1 = cellprofiler_core.image.Image(image1) crop_mask = numpy.zeros((20, 20), bool) crop_mask[5:16, 5:16] = True i2 = cellprofiler_core.image.Image(image1[5:16...
26,906
def test_coerce__no_value(value): """If the value fails a truthyness test, it should be returned.""" assert configure.coerce_to_expected(value, "foo", str) == value
26,907
def display_credentials(): """ Function to display saved credentials. """ return Credentials.display_credential()
26,908
def evaluate_absence_of_narrow_ranges( piece: Piece, min_size: int = 9, penalties: Optional[Dict[int, float]] = None ) -> float: """ Evaluate melodic fluency based on absence of narrow ranges. :param piece: `Piece` instance :param min_size: minimum size of narrow range (...
26,909
def collect_scalar_summands(cls, ops, kwargs): """Collect :class:`.ScalarValue` and :class:`.ScalarExpression` summands. Example:: >>> srepr(collect_scalar_summands(Scalar, (1, 2, 3), {})) 'ScalarValue(6)' >>> collect_scalar_summands(Scalar, (1, 1, -1), {}) One >>> colle...
26,910
def sge_submit( tasks, label, tmpdir, options="-q hep.q", dryrun=False, quiet=False, sleep=5, request_resubmission_options=True, return_files=False, dill_kw={"recurse": False}, ): """ Submit jobs to an SGE batch system. Return a list of the results of each job (i.e. the return values of the func...
26,911
def frames_per_second(): """Timer for computing frames per second""" from timeit import default_timer as timer last_time = timer() fps_prev = 0.0 while True: now = timer() dt = now - last_time last_time = now fps = 1.0 / dt s = np.clip(3 * dt, 0, 1) f...
26,912
def _is_domain_interval(val): """ Check if a value is representing a valid domain interval Args: val: Value to check Returns: True if value is a tuple representing an interval """ if not isinstance(val, tuple): return False if not (is_int(val[0]) and is_int(val[1]) and (...
26,913
def upgrade(): """ Changing the log table columns to use uuid to reference remote objects and log entries. Upgrade function. """ connection = op.get_bind() # Clean data export_and_clean_workflow_logs(connection) # Create the dbnode_id column and add the necessary index op.add_colum...
26,914
def rndcaps(n): """ Generates a string of random capital letters. Arguments: n: Length of the output string. Returns: A string of n random capital letters. """ return "".join([choice(_CAPS) for c in range(n)])
26,915
def cutByWords(text, chunkSize, overlap, lastProp): """ Cuts the text into equally sized chunks, where the segment size is measured by counts of words, with an option for an amount of overlap between chunks and a minim um proportion threshold for the last chunk. Args: text: The string with ...
26,916
def raise_business_exception(error_code, error_message=None, error_data=None): """抛出业务异常""" error_message = error_message if error_message else ERROR_PHRASES.get(error_code) raise BusinessException( error_code=error_code, error_message=error_message, error_data=error_data, er...
26,917
def dsu_sort2(list, index, reverse=False): """ This function sorts only based on the primary element, not on secondary elements in case of equality. """ for i, e in enumerate(list): list[i] = e[index] if reverse: list.sort(reverse=True) else: list.sort() for i, e ...
26,918
def roca_view(full, partial, **defaults): """ Render partal for XHR requests and full template otherwise """ templ = defaults.pop('template_func', template) def decorator(func): @functools.wraps(func) def wrapper(*args, **kwargs): if request.is_xhr: tpl_na...
26,919
async def _shuffle(s, workers, dfs_nparts, dfs_parts, column): """ Parameters ---------- s: dict Worker session state workers: set Set of ranks of all the participants dfs_nparts: list of dict List of dict that for each worker rank specifices the number of partiti...
26,920
def list_objects_or_buckets(client, args): """ Lists buckets or objects """ parser = argparse.ArgumentParser(PLUGIN_BASE+' ls') parser.add_argument('bucket', metavar='NAME', type=str, nargs='?', help="Optional. If not given, lists all buckets. If given, " ...
26,921
def test_compile_hourly_statistics_unavailable( hass_recorder, caplog, device_class, unit, value ): """Test compiling hourly statistics, with the sensor being unavailable.""" zero = dt_util.utcnow() hass = hass_recorder() recorder = hass.data[DATA_INSTANCE] setup_component(hass, "sensor", {}) ...
26,922
def play_game(board:GoBoard): """ Run a simulation game to the end fromt the current board """ while True: # play a random move for the current player color = board.current_player move = GoBoardUtil.generate_random_move(board,color) board.play_move(move, color) #...
26,923
def logical_array(ar): """Convert ndarray (int, float, bool) to array of 1 and 0's""" out = ar.copy() out[out!=0] = 1 return out
26,924
def otp_route( in_gdf, mode, date_time = datetime.now(), trip_name = '', ): """ Return a GeoDataFrame with detailed trip information for the best option. Parameters ---------- in_gdf : GeoDataFrame It should only contain two records, first record is origina and the s...
26,925
def add_ada_tab(nodes=None): """ Add an ada tab to a given list of nodes. The tab is the instructions for what Ada should do to this node. Args: nodes (list): List of nuke node objects (including root). """ if nodes is None: nodes = nuke.selectedNodes() elif not isinstance(nod...
26,926
def get_package_data(package): """ Return all files under the root package, that are not in a package themselves. """ walk = [(dirpath.replace(package + os.sep, '', 1), filenames) for dirpath, dirnames, filenames in os.walk(package) if not os.path.exists(os.path.join(dirpath,...
26,927
def tall_clutter(files, config, clutter_thresh_min=0.0002, clutter_thresh_max=0.25, radius=1, max_height=2000., write_radar=True, out_file=None, use_dask=False): """ Wind Farm Clutter Calculation Parameters ---------- files : list...
26,928
def serialize_bundle7(source_eid, destination_eid, payload, report_to_eid=None, crc_type_primary=CRCType.CRC32, creation_timestamp=None, sequence_number=None, lifetime=300, flags=BlockProcFlag.NONE, fragment_offset=None, total_adu_l...
26,929
def _get_chinese_week(localtime): """获取星期和提醒""" chinese_week = ["一", "二", "三", "四", "五", "六", "日"] tm_w_day = localtime.tm_wday extra_msg = "<green>当前正是周末啦~</green>" if tm_w_day in [5, 6] else "Other" if extra_msg == "Other": go_week = 4 - tm_w_day extra_msg = f"<yellow>还有 {go_week} ...
26,930
def resnext101_32x16d_swsl(cfg, progress=True, **kwargs): """Constructs a semi-weakly supervised ResNeXt-101 32x16 model pre-trained on 1B weakly supervised image dataset and finetuned on ImageNet. `"Billion-scale Semi-Supervised Learning for Image Classification" <https://arxiv.org/abs/1905.00546>`_ ...
26,931
def leaderboard(players=None, N=DEFAULTN, filename="leaderboard.txt"): """ Create a leaderboard, and optionally save it to a file """ logger.info("Generating a leaderboard for players: %r, N=%d", players, N) ratings, allgames, players = get_ratings(players, N) board, table = make_leaderboard(ratings, al...
26,932
def m_college_type(seq): """ 获取学校的类型信息 当学校的类型是985,211工程院校时: :param seq:【“985,211工程院校”,“本科”】 :return:“985工程院校” 当学校的类型是211工程院校时: :param seq:【“211工程院校”,“硕士”】 :return:“211工程院校” 当学校的类型是普通本科或者专科时: 如果获取的某人的学历信息是博士、硕士和本科时 输出的学校类型为普通本科 :param seq:【“****”,“...
26,933
def get_raster_wcs(coordinates, geographic=True, layer=None): """Return a subset of a raster image from the local GeoServer via WCS 2.0.1 protocol. For geoggraphic rasters, subsetting is based on WGS84 (Long, Lat) boundaries. If not geographic, subsetting based on projected coordinate system (Easting, Nort...
26,934
def del_local_name(*args): """ del_local_name(ea) -> bool """ return _ida_name.del_local_name(*args)
26,935
def solve_google_pdp(data): """Entry point of the program.""" # Create the routing index manager. manager = pywrapcp.RoutingIndexManager(len(data['distance_matrix']), data['num_vehicles'], data['depot']) # Create Routing Model. routing = pywrapcp.RoutingM...
26,936
def run (): """Run all clustering methods.""" _run('KMeans', 'k') _run('Hierarchical', 'merges')
26,937
def fetch_net(args: Any, num_tasks: int, num_cls: int, dropout: float = 0.3): """ Create a nearal network to train """ if "mnist" in args.dataset: inp_chan = 1 pool = 2 l_size = 80 elif args.dataset == "mini_imagenet": inp_cha...
26,938
def are_models_specified(api_spec: Dict) -> bool: """ Checks if models have been specified in the API spec (cortex.yaml). Args: api_spec: API configuration. """ predictor_type = predictor_type_from_api_spec(api_spec) if predictor_type == PythonPredictorType and api_spec["predictor"]["m...
26,939
def _progress_bar( current: Union[int, float], total: Union[int, float], width: int = 60 ) -> None: """ Custom progress bar for wget downloads. :param current: bytes downloaded so far :type current: Union[int, float] :param total: Total size of download in bytes or megabytes :type total: Un...
26,940
def projects( prospect_projects, assign_pm_projects, active_projects, verify_win_projects, won_projects, ): """A number of projects at different stages associated to an adviser.""" pass
26,941
def user_config(filename): """user-provided configuration file""" try: with open(filename) as file: return json.loads(file.read(None)) except FileNotFoundError as fnf: raise RuntimeError(f"File '{filename}' could not be found") from fnf except json.JSONDecodeError as jsond: ...
26,942
def _decomposed_dilated_conv2d(x, kernel_size, num_o, dilation_factor, name, top_scope, biased=False): """ Decomposed dilated conv2d without BN or relu. """ # padding so that the input dims are multiples of dilation_factor H = tf.shape(x)[1] W = tf.shape(x)[2] pad_bottom = (dilation_factor -...
26,943
def _sign_model(fout): """ Write signature of the file in Facebook's native fastText `.bin` format to the binary output stream `fout`. Signature includes magic bytes and version. Name mimics original C++ implementation, see [FastText::signModel](https://github.com/facebookresearch/fastText/bl...
26,944
def enable_traceback(): """ disables tracebacks from being added to exception raises """ tb_controls.enable_traceback()
26,945
async def post_autodaily(text_channel: TextChannel, latest_message_id: int, change_mode: bool, current_daily_message: str, current_daily_embed: Embed, utc_now: datetime.datetime) -> Tuple[bool, bool, Message]: """ Returns (posted, can_post, latest_message) """ posted = False if text_channel and curr...
26,946
def room_from_loc(env, loc): """ Get the room coordinates for a given location """ if loc == 'north': return (1, 0) if loc == 'south': return (1, 2) if loc == 'west': return (0, 1) if loc == 'east': return (2, 1) if loc == 'left': return (1, 0) ...
26,947
def count_encoder(df, cols): """count encoding Args: df: カテゴリ変換する対象のデータフレーム cols (list of str): カテゴリ変換する対象のカラムリスト Returns: pd.Dataframe: dfにカテゴリ変換したカラムを追加したデータフレーム """ out_df = pd.DataFrame() for c in cols: series = df[c] vc = series.value_counts(dropna=...
26,948
def main(): """ Run the script. Read config, create tasks for all sites using all search_for_files patterns, start threads, write out_file. """ args = parse_args() config = yaml.load(stream=args.config_file) for site in set(config['sites']): # ensure we don't check a site twice...
26,949
def wrap_response(response): """Wrap a tornado response as an open api response""" mimetype = response.headers.get('Content-Type') or 'application/json' return OpenAPIResponse( data=response.body, status_code=response.code, mimetype=mimetype, )
26,950
def shifted(x): """Shift x values to the range [-0.5, 0.5)""" return -0.5 + (x + 0.5) % 1
26,951
def computeAlignmentError(pP1, pP2, etype = 2, doPlot = False): """ Compute area-based alignment error. Assume that the warping paths are on the same grid :param pP1: Mx2 warping path 1 :param pP2: Nx2 warping path 2 :param etype: Error type. 1 (default) is area ratio. 2 is L1 Hausd...
26,952
def _cumulative_grad(grad_sum, grad): """Apply grad sum to cumulative gradient.""" add = ops.AssignAdd() return add(grad_sum, grad)
26,953
def run_node(node): """Python multiprocessing works strangely in windows. The pool function needed to be defined globally Args: node (Node): Node to be called Returns: rslts: Node's call output """ return node.run_with_loaded_inputs()
26,954
def getitimer(space, which): """getitimer(which) Returns current value of given itimer. """ with lltype.scoped_alloc(itimervalP.TO, 1) as old: c_getitimer(which, old) return itimer_retval(space, old[0])
26,955
def substitute_T_and_RH_for_interpolated_dataset(dataset): """ Input : dataset : Dataset interpolated along height Output : dataset : Original dataset with new T and RH Function to remove interoplated values of T and RH in the original dataset and replace with new values of T and R...
26,956
def get_base_required_fields(): """ Get required fields for base asset from UI. Fields required for update only: 'id', 'uid', ['lastModifiedTimestamp', 'location', 'events', 'calibration'] Present in input, not required for output: 'coordinates', 'hasDeploymentEvent', 'augmented', 'deployment_number...
26,957
def reg_tab_ext(*model): """ Performs weighted linear regression for various models building upon the model specified in section 4, while additionally including education levels of a council candidate (university degree, doctoral/PhD degree) A single model (i.e. function argument) takes on the form:...
26,958
def load_pdf(filename: str) -> pd.DataFrame: """ Read PDF dataset to pandas dataframe """ tables = tabula.read_pdf(basedir + '\\' + filename, pages="all") merged_tables = pd.concat(tables[1:]) merged_tables.head() return merged_tables
26,959
def he_xavier(in_size: int, out_size: int, init_only=False): """ Xavier initialization according to Kaiming He in: *Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification (https://arxiv.org/abs/1502.01852) """ stddev = tf.cast(tf.sqrt(2 / in_size), tf.float32) W = tf.random_...
26,960
def critical(message): """ Shorthand for logging a message with kCritical severity. """ log(message, kCritical)
26,961
def GET_v1_keyboards_build_log(): """Returns a dictionary of keyboard/layout pairs. Each entry is a dictionary with the following keys: * `works`: Boolean indicating whether the compile was successful * `message`: The compile output for failed builds """ json_data = qmk_redis.get('qmk_api_configura...
26,962
def logprod(lst): """Computes the product of a list of numbers""" return sum(log(i) for i in lst)
26,963
def train(cfg_file: str) -> None: """ Main training function. After training, also test on test data if given. :param cfg_file: path to configuration yaml file """ cfg = load_config(cfg_file) # set the random seed set_seed(seed=cfg["training"].get("random_seed", 42)) # get model archi...
26,964
def nms(dets, iou_thr, device_id=None): """Dispatch to either CPU or GPU NMS implementations. The input can be either a torch tensor or numpy array. GPU NMS will be used if the input is a gpu tensor or device_id is specified, otherwise CPU NMS will be used. The returned type will always be the same as ...
26,965
def render_template(template_name_or_list, **context): """Renders a template from the template folder with the given context. :param template_name_or_list: the name of the template to be rendered, or an iterable with template names the firs...
26,966
def extract_spec(outfile, evtfile, region, clobber=False): """ Extract the spectrum within region from the event file. """ clobber = "yes" if clobber else "no" subprocess.check_call(["punlearn", "dmextract"]) subprocess.check_call([ "dmextract", "infile=%s[sky=%s][bin pi]" % (evtfile, re...
26,967
def test_FN121Readonly_list(api_client, project): """when we access the readonly endpoint for FN121 objects, it should return a paginated list of net sets that includes all of the FN121 objects in the database (ie. unfiltered). """ url = reverse("fn_portal_api:netset_list") response = api_clie...
26,968
def _ReplaceUrlWithPlaceholder(results): """Fix a bug by replacing domain names with placeholders There was a bug in early dogfood versions of the survey extension in which URLs were included in questions where they were supposed to have a placeholder. The fix was to replace text like "Proceed to www.example...
26,969
def XCL(code, error, mag=0.0167, propagation='random', NEV=True, **kwargs): """ Dummy function to manage the ISCWSA workbook not correctly defining the weighting functions. """ tortuosity = kwargs['tortuosity'] if code == "XCLA": return XCLA( code, error, mag=mag, propagation...
26,970
def to_bgr(image): """Convert image to BGR format Args: image: Numpy array of uint8 Returns: bgr: Numpy array of uint8 """ # gray scale image if image.ndim == 2: bgr = cv2.cvtColor(image, cv2.COLOR_GRAY2BGR) return bgr # BGRA format if image.shape[2] == 4: bgr = cv2.cvtColor...
26,971
def main() -> None: """Run bot.""" # Create the Updater and pass it your bot's token. updater = Updater(BOT_SETTING.TOKEN) # bot = Bot(TOKEN) dispatcher = updater.dispatcher # on different commands - answer in Telegram dispatcher.add_handler(CommandHandler("start", start)) dispatcher.ad...
26,972
def load(path: pathlib.Path) -> dict: """Load a YAML file, returning its contents. :raises: RuntimeError """ with path.open() as handle: try: return yaml.safe_load(handle) except scanner.ScannerError as error: LOGGER.critical('Failed to parse YAML from %s: %s', ...
26,973
def find_package(dir): """ Given a directory, finds the equivalent package name. If it is directly in sys.path, returns ''. """ dir = os.path.abspath(dir) orig_dir = dir path = map(os.path.abspath, sys.path) packages = [] last_dir = None while 1: if dir in path: ...
26,974
def set_plate_material_iso(uid, propnum, value, propname='modulus'): """sets desired material data to isotropic plate. defaults to modulus""" data = (ctypes.c_double*8)() chkErr(St7GetPlateIsotropicMaterial(uid, propnum, data)) data[plateIsoMaterialData[propname]] = value chkErr(St7SetPlateIsotropic...
26,975
def _install(): """Run `npm install`.""" print 'Running `npm install`...' subprocess.call(['npm', 'install'])
26,976
async def test_discovery_data_bucket( hass: HomeAssistantType, mock_bridge: Generator[None, Any, None] ) -> None: """Test the event send with the updated device.""" assert await async_setup_component(hass, DOMAIN, MANDATORY_CONFIGURATION) await hass.async_block_till_done() device = hass.data[DOMAI...
26,977
def main(controlFile, trajName, reportName, folder, top, outputFilename, nProcessors, output_folder, format_str, new_report, trajs_to_select): """ Calculate the corrected rmsd values of conformation taking into account molecule symmetries :param controlFile: Control file :type contr...
26,978
def validate_settings(raw_settings): """Return cleaned settings using schemas collected from INSTALLED_APPS.""" # Perform early validation on Django's INSTALLED_APPS. installed_apps = raw_settings['INSTALLED_APPS'] schemas_mapping = raw_settings.get('CONFIT_SCHEMAS', {}) # Create schema instance usi...
26,979
def is_autocast_module_decorated(module: nn.Module): """ Return `True` if a nn.Module.forward was decorated with torch.cuda.amp.autocast """ try: from torch.cuda.amp import autocast decorators = _get_decorators(module.forward) for d in decorators: if isinstance(d,...
26,980
def timestamp_format_is_valid(timestamp: str) -> bool: """ Determines if the supplied timestamp is valid for usage with Graylog. :param timestamp: timestamp that is to be checked :return: whether the timestamp is valid (True) or invalid (False) """ try: get_datetime_from_timestamp(times...
26,981
def detect_prediction_results(pred_dir, img_dir, radius, prob_thresh, hasHeader): """Detect mitoses from probability maps through an iterative procedure. This will read csv prediction files, and output csv prediction files containing coordinates of the predicted mitoses centers. Args: pred_dir: Director...
26,982
def indices(n, dtype): """Indices of each element in upper/lower triangle of test matrix.""" size = tri.tri_n(n - 1) return np.arange(size, dtype=dtype)
26,983
def _sample(n, k): """ Select k number out of n without replacement unless k is greater than n """ if k > n: return np.random.choice(n, k, replace=True) else: return np.random.choice(n, k, replace=False)
26,984
def set_price_filter(request, category_slug): """Saves the given price filter to session. Redirects to the category with given slug. """ req = request.POST if request.method == 'POST' else request.GET try: min_val = lfs.core.utils.atof(req.get("min", "0")) except (ValueError): mi...
26,985
def _get_config(): """Returns a dictionary with server parameters, or ask them to the user""" # tries to figure if we can authenticate using a configuration file data = read_config() # this does some sort of validation for the "webdav" data... if "webdav" in data: if ( "server"...
26,986
def test_system(): """Runs few tests to check if npm and peerflix is installed on the system.""" if os.system('npm --version') != 0: print('NPM not installed installed, please read the Readme file for more information.') exit() if os.system('peerflix --version') != 0: print('Peerflix...
26,987
def lastfmcompare(text, nick, bot,): """[user] ([user] optional) - displays the now playing (or last played) track of LastFM user [user]""" api_key = bot.config.get("api_keys", {}).get("lastfm") if not api_key: return "No last.fm API key set." if not text: return "please specify a lastfm...
26,988
def fourier_ellipsoid(inp, size, n=-1, axis=-1, output=None): """ Multidimensional ellipsoid Fourier filter. The array is multiplied with the fourier transform of a ellipsoid of given sizes. Parameters ---------- inp : array_like The inp array. size : float or sequence ...
26,989
def gaussian1D(x: np.ndarray, amplitude: Number, center: Number, stdev: Number) -> np.ndarray: """A one dimensional gaussian distribution. = amplitude * exp(-0.5 (x - center)**2 / stdev**2) """ return amplitude * np.exp(-0.5 * (x - center)**2 / stdev**2)
26,990
def BuildImportLibs(flags, inputs_by_part, deffiles): """Runs the linker to generate an import library.""" import_libs = [] Log('building import libs') for i, (inputs, deffile) in enumerate(zip(inputs_by_part, deffiles)): libfile = 'part%d.lib' % i flags_with_implib_and_deffile = flags + ['/IMPLIB:%s' %...
26,991
def test_rename_file(bucket): """Test rename file.""" bucket = bucket() efs = EFS(storage="s3") RANDOM_DATA.seek(0) efs.upload(TEST_FILE, RANDOM_DATA) key = bucket.Object(TEST_FILE) assert key efs.rename(TEST_FILE, "new_test_file.txt") key = bucket.Object(TEST_FILE) with pytest...
26,992
def gather_sparse(a, indices, axis=0, mask=None): """ SparseTensor equivalent to tf.gather, assuming indices are sorted. :param a: SparseTensor of rank k and nnz non-zeros. :param indices: rank-1 int Tensor, rows or columns to keep. :param axis: int axis to apply gather to. :param mask: boolean ...
26,993
def Window(node, size=-1, full_only=False): """Lazy wrapper to collect a window of values. If a node is executed 3 times, returning 1, 2, 3, then the window node will collect those values in a list. Arguments: node (node): input node size (int): size of windows to use full_only (boo...
26,994
def fixed_rate_loan(amount, nrate, life, start, freq='A', grace=0, dispoints=0, orgpoints=0, prepmt=None, balloonpmt=None): """Fixed rate loan. Args: amount (float): Loan amount. nrate (float): nominal interest rate per year. life (float): life of the loan. s...
26,995
def main(): """ """ print("finito {}".format(datetime.datetime.now()))
26,996
def get_results(): """ Returns the scraped results for a set of inputs. Inputs: The URL, the type of content to scrap and class/id name. This comes from the get_results() function in script.js Output: Returns a JSON list of the results """ # Decode the json data and turn it into...
26,997
def _mocked_presets(*args, **kwargs): """Return a list of mocked presets.""" return [MockPreset("1")]
26,998
def play(context, songpos=None): """ *musicpd.org, playback section:* ``play [SONGPOS]`` Begins playing the playlist at song number ``SONGPOS``. The original MPD server resumes from the paused state on ``play`` without arguments. *Clarifications:* - ``play "-1"`` when playin...
26,999