text
stringlengths
232
16.3k
domain
stringclasses
1 value
difficulty
stringclasses
3 values
meta
dict
<|fim_suffix|> """ Receives path to keywords file and DUP flag. """ self.DUP = dup if not os.path.exists(fpath): raise FileNotFoundError(ENOENT, os.strerror(ENOENT), fpath) self.fpath = fpath<|fim_prefix|># repo: myegorov/schmerlin path: /autoload/parsers/parser.py im...
code_fim
easy
{ "lang": "python", "repo": "myegorov/schmerlin", "path": "/autoload/parsers/parser.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: peterhusisian/SUAS-Competition path: /PeterDev/ColorLayers.py from root.nested.Point import Point from math import sqrt from PIL import Image class ColorLayers: def __init__ (self, img, image): self.colorLayers = [] self.img = img self.image = image self.fillHo...
code_fim
hard
{ "lang": "python", "repo": "peterhusisian/SUAS-Competition", "path": "/PeterDev/ColorLayers.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> for i in range(0, len(self)): print(str(self.getDistanceToMidpoint(self[i].getColorLayerBoundsCorner()))) def getDistanceToMidpoint(self, pointIn): midpoint = self.getMidpoint() return sqrt((pointIn.getX() - midpoint.getX())**2 + (pointIn.getY() - midpoint.getY...
code_fim
hard
{ "lang": "python", "repo": "peterhusisian/SUAS-Competition", "path": "/PeterDev/ColorLayers.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: TCatshoek/lstar path: /util/savehypothesis.py from pathlib import Path from graphviz import Digraph from datetime import datetime from util.dotloader import load_mealy_dot, hyp_mealy_parser # Returns a handler function to save hypotheses in the given directory def savehypothesis(save_dir, save_pr...
code_fim
medium
{ "lang": "python", "repo": "TCatshoek/lstar", "path": "/util/savehypothesis.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> g = Digraph('G', filename=Path(cur_dir).joinpath(file_name)) g.attr(rankdir='LR') # Hacky way to draw start arrow pointing to first node # g.attr('node', shape='none') g.node('__start0', label='', _attributes={'height': '0', 'width': '0', 'shape': 'none'}) ...
code_fim
hard
{ "lang": "python", "repo": "TCatshoek/lstar", "path": "/util/savehypothesis.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: Sem8/dictionary-app path: /dict_application.py import json import sys # Method to add a word and it's definition: def add_word_definition(word, definition): add_to_dict = {word: {"definition": f'{definition}', "synonyms": []}} with open("dictionary.json", "r+") as outfile: d...
code_fim
hard
{ "lang": "python", "repo": "Sem8/dictionary-app", "path": "/dict_application.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> # Logic to add the synonym, split up the word and the synonym and input the appropriate values into the add_word_synonym function if action == 'addSynonym': add_word_synonyms(each_word, to_add) # Logic to get the word definition, get the word from input use...
code_fim
hard
{ "lang": "python", "repo": "Sem8/dictionary-app", "path": "/dict_application.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>#-------------------------------------------------------------------------- # Receive the calibration information #-------------------------------------------------------------------------- CalDat = Brd.BrdGetCalDat() print(calDat)<|fim_prefix|># repo: carterjgreen/undergrad-thesis path: /AN2...
code_fim
hard
{ "lang": "python", "repo": "carterjgreen/undergrad-thesis", "path": "/AN24_04.py", "mode": "spm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_prefix|># repo: carterjgreen/undergrad-thesis path: /AN24_04.py # AN24_04 -- Accessing Calibration Data import Class.Adf24Tx2Rx4 as Adf24Tx2Rx4 # (1) Connect to DemoRad: Check if Brd exists: Problem with USB driver # (2) Read Calibration Data # (3) Read Calibration Information <|fim_suffix|>#------------...
code_fim
hard
{ "lang": "python", "repo": "carterjgreen/undergrad-thesis", "path": "/AN24_04.py", "mode": "psm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_suffix|> # We set a custom property that we access in CommitRule, to prove we can add extra properties to the commit commit.custom_prop = u"foöbar" # We also ignore some extra rules, proving that we can modify the config config.ignore.append("B4") class ConfigurableCommitRule(Com...
code_fim
hard
{ "lang": "python", "repo": "l0nax/gitlint", "path": "/qa/samples/user_rules/extra/extra_rules.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: l0nax/gitlint path: /qa/samples/user_rules/extra/extra_rules.py # -*- coding: utf-8 -*- from gitlint.rules import CommitRule, RuleViolation, ConfigurationRule from gitlint.options import IntOption, StrOption, ListOption from gitlint.utils import sstr class GitContextRule(CommitRule): """ R...
code_fim
hard
{ "lang": "python", "repo": "l0nax/gitlint", "path": "/qa/samples/user_rules/extra/extra_rules.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> self.load_current = sum(self.load_current_list)/10 #print (self.load_current) def run(self): while True: self.update_cells() self.update_load_current() time.sleep(0.1)<|fim_prefix|># repo: brandonhanner/shedpi path: /ShedPi/modules/BlynkMo...
code_fim
hard
{ "lang": "python", "repo": "brandonhanner/shedpi", "path": "/ShedPi/modules/BlynkModule/bms.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> def update_load_current(self): #1.670 0 current voltage 3.3/2 = 1.65v raw = self.adc.read_channel(1) corrected = raw - self.adc_current_zero_offset diff = corrected - self.adc_tare_voltage amps = diff / .040 self.load_current_list.pop(0) self....
code_fim
hard
{ "lang": "python", "repo": "brandonhanner/shedpi", "path": "/ShedPi/modules/BlynkModule/bms.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: brandonhanner/shedpi path: /ShedPi/modules/BlynkModule/bms.py import threading import time class battery(object): def __init__(self,adc): self.adc=adc self.cell_voltages = [0,0,0,0] self.voltage = 0 self.load_current = 0 #set up the divider constants ...
code_fim
hard
{ "lang": "python", "repo": "brandonhanner/shedpi", "path": "/ShedPi/modules/BlynkModule/bms.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: jmbrooks/dbtea path: /dbtea/clients/bi/looker/base.py gger OUTPUT_TO_OPTIONS = {"stdout", "file"} LOOKML_DIMENSION = "dimension" LOOKML_DIMENSION_GROUP = "dimension_group" LOOKML_MEASURE = "measure" LOOKML_SET = "set" LOOKML_DIMENSION_GROUP_TYPES = {"duration", "time"} LOOKML_ZIPCODE_FIELD_NA...
code_fim
hard
{ "lang": "python", "repo": "jmbrooks/dbtea", "path": "/dbtea/clients/bi/looker/base.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: jmbrooks/dbtea path: /dbtea/clients/bi/looker/base.py lass LookmlProject: """""" def __init__(self, project_id: str, config_file_path: Optional[str] = None, config_section: str = "looker"): config_path = config_file_path if config_file_path \ else utils.assemble_path(...
code_fim
hard
{ "lang": "python", "repo": "jmbrooks/dbtea", "path": "/dbtea/clients/bi/looker/base.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> return self.lookml_data.get("sets") def create_lookml_model( model_name: str, output_to: str = "stdout", connection: str = None, label: str = None, includes: list = None, explores: List[dict] = None, access_grants: List[dict] = None, tests: List[dict] = None, ...
code_fim
hard
{ "lang": "python", "repo": "jmbrooks/dbtea", "path": "/dbtea/clients/bi/looker/base.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: NoSyu/VHUCM path: /src/utils/convert.py import torch def to_var(x, on_cpu=False, gpu_id=None, async_var=False): <|fim_suffix|> def to_tensor(x): if torch.cuda.is_available(): x = x.cpu() return x.data<|fim_middle|> if torch.cuda.is_available() and not on_cpu: x = x.cu...
code_fim
medium
{ "lang": "python", "repo": "NoSyu/VHUCM", "path": "/src/utils/convert.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> if torch.cuda.is_available(): x = x.cpu() return x.data<|fim_prefix|># repo: NoSyu/VHUCM path: /src/utils/convert.py import torch def to_var(x, on_cpu=False, gpu_id=None, async_var=False): if torch.cuda.is_available() and not on_cpu: x = x.cuda(gpu_id, async_var) return ...
code_fim
easy
{ "lang": "python", "repo": "NoSyu/VHUCM", "path": "/src/utils/convert.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: the-tale/the-tale path: /src/tt_bank/tt_bank/operations.py import logging import datetime from psycopg2.extras import Json as PGJson from tt_web import log from tt_web import postgresql as db from . import logic from . import objects from . import relations from . import exceptions async de...
code_fim
hard
{ "lang": "python", "repo": "the-tale/the-tale", "path": "/src/tt_bank/tt_bank/operations.py", "mode": "psm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_suffix|> async def _remove_transactions(execute, arguments): transactions_ids = arguments['transactions_ids'] await execute('DELETE FROM transactions WHERE id IN %(ids)s', {'ids': tuple(transactions_ids)}) await execute('DELETE FROM operations WHERE transaction IN %(ids)s', {'ids': tuple(transactions...
code_fim
hard
{ "lang": "python", "repo": "the-tale/the-tale", "path": "/src/tt_bank/tt_bank/operations.py", "mode": "spm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_prefix|># repo: bogdanvuk/pygears path: /docs/manual/gears/examples/fmap_queue.py from pygears.lib import drv, check, mul, fmap f<|fim_suffix|>p(f=mul(2)) \ | check(ref=[[0, 2, 4, 6, 8]])<|fim_middle|>rom pygears.typing import Queue, Uint drv(t=Queue[Uint[16]], seq=[[0, 1, 2, 3, 4]]) \ | fma
code_fim
medium
{ "lang": "python", "repo": "bogdanvuk/pygears", "path": "/docs/manual/gears/examples/fmap_queue.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>p(f=mul(2)) \ | check(ref=[[0, 2, 4, 6, 8]])<|fim_prefix|># repo: bogdanvuk/pygears path: /docs/manual/gears/examples/fmap_queue.py from pygears.lib import drv, check, mul, fmap f<|fim_middle|>rom pygears.typing import Queue, Uint drv(t=Queue[Uint[16]], seq=[[0, 1, 2, 3, 4]]) \ | fma
code_fim
medium
{ "lang": "python", "repo": "bogdanvuk/pygears", "path": "/docs/manual/gears/examples/fmap_queue.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: 50417/phd path: /util/me.db/spreadsheet.py import gspread import os from oauth2client.service_account import ServiceAccountCredentials from gspread.exceptions import WorksheetNotFound from typing import List def csv_to_worksheet(worksheet, list_of_lists): """ set worksheet values from list...
code_fim
hard
{ "lang": "python", "repo": "50417/phd", "path": "/util/me.db/spreadsheet.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive'] credentials = ServiceAccountCredentials.from_json_keyfile_name( os.path.expanduser(keypath), scope) return gspread.authorize(credentials)<|fim_prefix|># repo: 50417/phd path: /uti...
code_fim
hard
{ "lang": "python", "repo": "50417/phd", "path": "/util/me.db/spreadsheet.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|># Generate five translations with top-k sampling: fr_bin = en2fr.generate(en_bin, beam=5, sampling=True, sampling_topk=20) assert len(fr_bin) == 5 # Convert one of the samples to a string and detokenize fr_sample = fr_bin[0]['tokens'] fr_bpe = en2fr.string(fr_sample) fr_toks = en2fr.remove_bpe(fr_bpe) fr...
code_fim
medium
{ "lang": "python", "repo": "5l1v3r1/En_francais_si_vous_plait-", "path": "/translate-fr.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: 5l1v3r1/En_francais_si_vous_plait- path: /translate-fr.py # fairseq translation # using the model from the paper Scaling Neural Machine Translation: # https://pytorch.org/hub/pytorch_fairseq_translation/ <|fim_suffix|># Manually apply BPE: en_bpe = en2fr.apply_bpe(en_toks) assert en_bpe == 'H@@ ...
code_fim
hard
{ "lang": "python", "repo": "5l1v3r1/En_francais_si_vous_plait-", "path": "/translate-fr.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|># Translate with beam search: fr = en2fr.translate('Hello world!', beam=5) assert fr == 'Bonjour à tous !' # Manually tokenize: en_toks = en2fr.tokenize('Hello world!') assert en_toks == 'Hello world !' # Manually apply BPE: en_bpe = en2fr.apply_bpe(en_toks) assert en_bpe == 'H@@ ello world !' # Manual...
code_fim
hard
{ "lang": "python", "repo": "5l1v3r1/En_francais_si_vous_plait-", "path": "/translate-fr.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> # function: find all childcare service based on the postcode # input: [string] postcode # output: [QuerySet] a list of Childcare object lst = Childcare.objects.filter(postcode=postcode) return lst<|fim_prefix|># repo: sdsantosh86/Careforyou-Industry-Experience-Project path: /1.4 Sourc...
code_fim
medium
{ "lang": "python", "repo": "sdsantosh86/Careforyou-Industry-Experience-Project", "path": "/1.4 Source Code/careforyou-master/careforyou/API/search.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: sdsantosh86/Careforyou-Industry-Experience-Project path: /1.4 Source Code/careforyou-master/careforyou/API/search.py from careforyou.Model.models import Childcare from django.db.models import Q def get_childcare_by_suburb_and_language(suburb, language): # function: find all childcare servic...
code_fim
medium
{ "lang": "python", "repo": "sdsantosh86/Careforyou-Industry-Experience-Project", "path": "/1.4 Source Code/careforyou-master/careforyou/API/search.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> def reverse(self): ''' >>> for ins in MotexSegmentHelper(storage).reverse(): ... print str(ins) ... 0x04 <MotexSegment> seg 0x03 <MotexSegment> seg 0x02 <MotexSegment> seg 0x01 <MotexSegment> seg ''' curr = self._last ...
code_fim
hard
{ "lang": "python", "repo": "finixbit/motex", "path": "/motex/core/segment.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: finixbit/motex path: /motex/core/segment.py import motex.common.hextools as hextools from motex.common.constants import _DEFAULT_METADATA_KEY, _DEFAULT_SEGMENTS_KEY from motex.storage import MotexStorageTracker from motex.common.base import HelperBase class MotexSegment: next_ = None pr...
code_fim
hard
{ "lang": "python", "repo": "finixbit/motex", "path": "/motex/core/segment.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>if __name__ == "__main__": words = raw_input("input what you want ") freedom_word2(words)<|fim_prefix|># repo: xiashuijun/Projects-1 path: /Freedom_word2.py # -*- coding: utf-8 -*- def freedom_word2(words): contents = open("filtered_words.txt").read() contents = contents.split() for word in conten...
code_fim
hard
{ "lang": "python", "repo": "xiashuijun/Projects-1", "path": "/Freedom_word2.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: xiashuijun/Projects-1 path: /Freedom_word2.py # -*- coding: utf-8 -*- def freedom_word2(words): contents = open("filtered_words.txt").read() contents = contents.split() <|fim_suffix|> # 如果是敏感词中的英文 if word == "love" or word == "sex" or word == "jiangge": words = words.replace(word, '*...
code_fim
medium
{ "lang": "python", "repo": "xiashuijun/Projects-1", "path": "/Freedom_word2.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: dgstangel/sca-codeinsight-reports-spdx path: /report_artifacts.py ''' Copyright 2021 Flexera Software LLC See LICENSE.TXT for full license text SPDX-License-Identifier: MIT Author : sgeary Created On : Tue Apr 27 2021 File : report_artifacts.py ''' import logging from datetime import datetime...
code_fim
hard
{ "lang": "python", "repo": "dgstangel/sca-codeinsight-reports-spdx", "path": "/report_artifacts.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> report_ptr.write("Relationship: %s DESCRIBES %s\n" %("SPDXRef-DOCUMENT", packageData["SPDXID"] )) report_ptr.write("Relationship: %s DESCRIBED_BY %s\n" %(packageData["SPDXID"], "SPDXRef-DOCUMENT" )) for file in packageFiles: report_ptr.write("Relations...
code_fim
hard
{ "lang": "python", "repo": "dgstangel/sca-codeinsight-reports-spdx", "path": "/report_artifacts.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> summaryTextFile = projectNameForFile + "-" + topLevelProjectID + "-with-children-" + reportName.replace(" ", "_") + "-summary-" + fileNameTimeStamp + ".txt" logger.debug("summaryTextFile: %s" %summaryTextFile) try: report_ptr = open(summaryTextFile,"w") except: logger.erro...
code_fim
hard
{ "lang": "python", "repo": "dgstangel/sca-codeinsight-reports-spdx", "path": "/report_artifacts.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: noobpk/frida-ios-hook path: /frida-ios-hook/core/utils/dump-memory/utils.py import sys import string import logging import os import re # Progress bar function def printProgress(times, total, prefix='', suffix='', decimals=2, bar=100): filled = int(round(bar * times / float(total...
code_fim
medium
{ "lang": "python", "repo": "noobpk/frida-ios-hook", "path": "/frida-ios-hook/core/utils/dump-memory/utils.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|># Normalize thw namo of application works better on frida def normalize_app_name(appName: str): try: appName = int(appName) except ValueError: pass return appName<|fim_prefix|># repo: noobpk/frida-ios-hook path: /frida-ios-hook/core/utils/dump-memory/utils.py import sys ...
code_fim
hard
{ "lang": "python", "repo": "noobpk/frida-ios-hook", "path": "/frida-ios-hook/core/utils/dump-memory/utils.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: deepak-dt/contrail-controller path: /src/container/kube-manager/kube_manager/tests/vnc/test_vnc_kubernetes.py # # Copyright (c) 2017 Juniper Networks, Inc. All rights reserved. # <|fim_suffix|>class VncKubernetesTest(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
code_fim
medium
{ "lang": "python", "repo": "deepak-dt/contrail-controller", "path": "/src/container/kube-manager/kube_manager/tests/vnc/test_vnc_kubernetes.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|>class VncKubernetesTest(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_vnc_kubernetes_init(self): pass<|fim_prefix|># repo: deepak-dt/contrail-controller path: /src/container/kube-manager/kube_manager/tests/vnc/test_vnc_kubernetes.py # # ...
code_fim
medium
{ "lang": "python", "repo": "deepak-dt/contrail-controller", "path": "/src/container/kube-manager/kube_manager/tests/vnc/test_vnc_kubernetes.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> cfg = scene_id_to_cfg[scene_id] scene = cfg.build( class_config, self.tmp_dir, use_transformers=False) return scene # build and run each AnalyzerConfig for each scene group for a in self.config.analyzers: for group_name, grou...
code_fim
hard
{ "lang": "python", "repo": "azavea/raster-vision", "path": "/rastervision_core/rastervision/core/rv_pipeline/rv_pipeline.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: azavea/raster-vision path: /rastervision_core/rastervision/core/rv_pipeline/rv_pipeline.py import logging from os.path import join import tempfile import shutil from typing import TYPE_CHECKING, Optional, List from functools import lru_cache import click import numpy as np from tqdm.auto import ...
code_fim
hard
{ "lang": "python", "repo": "azavea/raster-vision", "path": "/rastervision_core/rastervision/core/rv_pipeline/rv_pipeline.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> def get_train_labels(self, window: Box, scene: Scene) -> Labels: """Return the training labels in a window for a scene. Returns: Labels that lie within window """ raise NotImplementedError() def chip(self, split_ind: int = 0, num_splits: int = 1): ...
code_fim
hard
{ "lang": "python", "repo": "azavea/raster-vision", "path": "/rastervision_core/rastervision/core/rv_pipeline/rv_pipeline.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: berz/lossebladjes path: /db_tool.py #!venv/bin/python import sys import os import imp from migrate.versioning import api from lossebladjes.database import db from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO if len(sys.argv) < 2 or sys.argv[1] not in ["migra...
code_fim
hard
{ "lang": "python", "repo": "berz/lossebladjes", "path": "/db_tool.py", "mode": "psm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_suffix|>elif sys.argv[1] == 'downgrade': v = api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) api.downgrade(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO, v - 1) print 'Current database version: ' + str(api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO)) elif sys.argv...
code_fim
hard
{ "lang": "python", "repo": "berz/lossebladjes", "path": "/db_tool.py", "mode": "spm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_suffix|> print('Shutting down Example module') # меняем название модуля для логов service = ExampleModule() service.Run()<|fim_prefix|># repo: ostis-apps/ostis-geography path: /templates/agents/py/services/ExampleModule/ExampleModule.py from common import ScModule, ScKeynodes, ScPythonEventType from Get...
code_fim
hard
{ "lang": "python", "repo": "ostis-apps/ostis-geography", "path": "/templates/agents/py/services/ExampleModule/ExampleModule.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: ostis-apps/ostis-geography path: /templates/agents/py/services/ExampleModule/ExampleModule.py from common import ScModule, ScKeynodes, ScPythonEventType from GetDefinitionAgent import GetDefinitionAgent # импорт агента from sc import * class ExampleModule(ScModule): def __init__(self): ...
code_fim
hard
{ "lang": "python", "repo": "ostis-apps/ostis-geography", "path": "/templates/agents/py/services/ExampleModule/ExampleModule.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: alaincoletta/pairtree path: /util/remove_high_vaf.py # Find variants whose maximum likelihood estimate of phi are implausibly # large (i.e., well over 1), indicating something is wrong with such variants. # Render these as garbage. import argparse import numpy as np import scipy.stats import jso...
code_fim
hard
{ "lang": "python", "repo": "alaincoletta/pairtree", "path": "/util/remove_high_vaf.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> # Note that SSMs are modified in-place. alpha0 = 1 beta0 = 1 # To flag only extreme cases, set this above 1.0 -- e.g., to 1.5. phi_mle_threshold = 1.0 bad = [] bad_count = 0 total_count = 0 for vid, V in ssms.items(): phi_alpha = alpha0 + V['var_reads'] phi_beta = beta0 + np.ma...
code_fim
hard
{ "lang": "python", "repo": "alaincoletta/pairtree", "path": "/util/remove_high_vaf.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> n = len(self.plane.points) # Partition into n/m partitions of size at most m grahams = [] for chunk in chunks(range(n), m): markers = [self.markers.addPointMarker(i, (0, 50, 200)) for i in chunk] yield subplane = Subplane(self.plane, ch...
code_fim
hard
{ "lang": "python", "repo": "dilliwal11/PyConvexHullDemo", "path": "/Algorithms/ChansAlgorithm.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: dilliwal11/PyConvexHullDemo path: /Algorithms/ChansAlgorithm.py from HullAlgorithm import HullAlgorithm from Subplane import Subplane from Submarkers import Submarkers from GrahamScan import GrahamScan from math import ceil class ChansAlgorithm(HullAlgorithm): """ Implements Chan's algor...
code_fim
hard
{ "lang": "python", "repo": "dilliwal11/PyConvexHullDemo", "path": "/Algorithms/ChansAlgorithm.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> break for k in range(H): p = finalhull[-1] thisGraham = None qbestMarker = None qbest = None qlMarker = None for graham in grahams: if graham == lastGraham: # If we're tryi...
code_fim
hard
{ "lang": "python", "repo": "dilliwal11/PyConvexHullDemo", "path": "/Algorithms/ChansAlgorithm.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>ons over de financieel situatie 3. linken in koppeltabel content 4. recommandaties geven """<|fim_prefix|># repo: StanHaakman/Business-rules-voor-RE path: /Rules/Collab_rules.py """ pseudocode for collab filtering 1. visitors en sessions pakken 2a type visitor 2b/ even<|fim_middle|>ts pakken 2c/ similar...
code_fim
medium
{ "lang": "python", "repo": "StanHaakman/Business-rules-voor-RE", "path": "/Rules/Collab_rules.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: StanHaakman/Business-rules-voor-RE path: /Rules/Collab_rules.py """ pseudocode for collab filtering 1. visitors en sessions pakken 2a type visitor 2b/ even<|fim_suffix|>n producten 2f/ deepselling meer verkopen aan soort gelijken producten 2g/ kijken naar sessions over de financieel situatie 3. ...
code_fim
medium
{ "lang": "python", "repo": "StanHaakman/Business-rules-voor-RE", "path": "/Rules/Collab_rules.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: SupriyoDam/DS-450-python path: /LinkedList/159 Find pairs with given sum in doubly ll.py # Python3 program to find a pair with class Node: def __init__(self, x): self.data = x self.next = None self.prev = None def pairSum(head, x): head1 = head head2 = head <|fim_suffix|> else: h...
code_fim
hard
{ "lang": "python", "repo": "SupriyoDam/DS-450-python", "path": "/LinkedList/159 Find pairs with given sum in doubly ll.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> return head # Driver code if __name__ == '__main__': head = None head = insert(head, 9) head = insert(head, 8) head = insert(head, 6) head = insert(head, 5) head = insert(head, 4) head = insert(head, 2) head = insert(head, 1) x = 7 pairSum(head, x)<|fim_prefix|># repo: SupriyoDam/DS-450-pyt...
code_fim
hard
{ "lang": "python", "repo": "SupriyoDam/DS-450-python", "path": "/LinkedList/159 Find pairs with given sum in doubly ll.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> @pytest.mark.parametrize( "fname", [ "TestOrcFile.NoIndStrm.StructWithNoNulls.orc", "TestOrcFile.NoIndStrm.StructAndIntWithNulls.orc", "TestOrcFile.NoIndStrm.StructAndIntWithNulls.TwoStripes.orc", "TestOrcFile.NoIndStrm.IntWithNulls.orc", ], ) def test_no_row_g...
code_fim
hard
{ "lang": "python", "repo": "rapidsai/cudf", "path": "/python/cudf/cudf/tests/test_orc.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: rapidsai/cudf path: /python/cudf/cudf/tests/test_orc.py [ rd.choice([None, np.random.randint(1, 3)]) for z in range(np.random.randint(1, 3)) ] for z in range(np.random.ra...
code_fim
hard
{ "lang": "python", "repo": "rapidsai/cudf", "path": "/python/cudf/cudf/tests/test_orc.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> lvl3_list = [ rd.choice( [ None, [ [ [ rd.choice([None, np.random.randint(1, 3)]) for z in range(np.random.randint(1, 3)) ] ...
code_fim
hard
{ "lang": "python", "repo": "rapidsai/cudf", "path": "/python/cudf/cudf/tests/test_orc.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> return GPIO.input(self.CTRLS["Previous"]) def getActionButton(self): return GPIO.input(self.CTRLS["Action"]) def getSystemButton(self): return GPIO.input(self.CTRLS["System"])<|fim_prefix|># repo: The-Blue-Sakura/ARView path: /src/Input.py import RPi.GPIO as GPIO import ...
code_fim
hard
{ "lang": "python", "repo": "The-Blue-Sakura/ARView", "path": "/src/Input.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: The-Blue-Sakura/ARView path: /src/Input.py import RPi.GPIO as GPIO import time class InputManager(): inputType = 1 # Input Types: 0/1 - Vision/Button def __init__(self): print("Input Manager Init") if(InputManager.inputType == 0): self.stream = None # Cam...
code_fim
hard
{ "lang": "python", "repo": "The-Blue-Sakura/ARView", "path": "/src/Input.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> return buttons def getControl(self, button): return(list(self.CTRLS.keys())[list(self.CTRLS.values()).index(16)]) def getNextButton(self): return GPIO.input(self.CTRLS["Next"]) def getPreviousButton(self): return GPIO.input(self.CTRLS["Previous"]) def ge...
code_fim
hard
{ "lang": "python", "repo": "The-Blue-Sakura/ARView", "path": "/src/Input.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: 994374821/maskrcnn_body25 path: /detectron/utils/blob.py # Copyright (c) 2017-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www...
code_fim
hard
{ "lang": "python", "repo": "994374821/maskrcnn_body25", "path": "/detectron/utils/blob.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> def zeros(shape, int32=False): """Return a blob of all zeros of the given shape with the correct float or int data type. """ return np.zeros(shape, dtype=np.int32 if int32 else np.float32) def ones(shape, int32=False): """Return a blob of all ones of the given shape with the correct...
code_fim
hard
{ "lang": "python", "repo": "994374821/maskrcnn_body25", "path": "/detectron/utils/blob.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>def py_op_copy_blob(blob_in, blob_out): """Copy a numpy ndarray given as blob_in into the Caffe2 CPUTensor blob given as blob_out. Supports float32 and int32 blob data types. This function is intended for copying numpy data into a Caffe2 blob in PythonOps. """ # Some awkward voodoo req...
code_fim
hard
{ "lang": "python", "repo": "994374821/maskrcnn_body25", "path": "/detectron/utils/blob.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: jgiha/DjangoTest path: /senseIntelsmpl/app.py #!flask/bin/python from flask import Flask, jsonify, make_response from collections import defaultdict from sense_hat import SenseHat from app.models import * #from flask.ext.cors import CORS import time import os from gps import * from time import * ...
code_fim
hard
{ "lang": "python", "repo": "jgiha/DjangoTest", "path": "/senseIntelsmpl/app.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> @app.route('/api/v1.1/sensor/<times>', methods=['GET']) def get_sensorReadingsAvg(times): humidity = [] temp = [] pressure = [] orient = [] orientRaw = [] compass = [] compassRaw = [] gyro = [] gyroRaw = [] accel = [] accelRaw = [] sensorList = defaultdict(...
code_fim
hard
{ "lang": "python", "repo": "jgiha/DjangoTest", "path": "/senseIntelsmpl/app.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: shabeer3508/ChatterBot path: /chatterbot/adapters/logic/matching.py ''' A collection of methods used to find the closest known match to an existing statement in the database. ''' def closest(text, database): <|fim_suffix|> # Get the closest matching statement from the database return proc...
code_fim
hard
{ "lang": "python", "repo": "shabeer3508/ChatterBot", "path": "/chatterbot/adapters/logic/matching.py", "mode": "psm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_suffix|> """ Takes a statement from the current conversation and a database instance. Returns the closest known statement that matches by string comparison. """ from fuzzywuzzy import process # Check if an exact match exists if database.find(text): return text # Get the cl...
code_fim
medium
{ "lang": "python", "repo": "shabeer3508/ChatterBot", "path": "/chatterbot/adapters/logic/matching.py", "mode": "spm", "license": "BSD-3-Clause", "source": "the-stack-v2" }
<|fim_prefix|># repo: tomofu74/image_search path: /etl/main.py import os import glob from metaflow import FlowSpec, step from lib.es.document import Document from lib.es.index import Index from step.extract.extract import * from lib.feature.src.embedding import * from lib.feature.src.phash import * from lib.feature.sr...
code_fim
hard
{ "lang": "python", "repo": "tomofu74/image_search", "path": "/etl/main.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> PATH = "/app/images" l = glob.glob(os.path.join(PATH, '*.jpg')) features = None for filepath in l: try: if features is None: features = get_akaze_feature(filepath) else : features = np.appe...
code_fim
hard
{ "lang": "python", "repo": "tomofu74/image_search", "path": "/etl/main.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> try: features = get_akaze_feature(filepath[0]) features = kmeans_model.predict(features) for f in features: d[f] = d[f] + 1 except: pass doc.update(d) res = d...
code_fim
hard
{ "lang": "python", "repo": "tomofu74/image_search", "path": "/etl/main.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: bfmat/LaneDetection path: /model/stop_sign_model.py from keras.layers import Dense, Flatten from keras.layers.convolutional import Conv2D from keras.models import Sequential # A very simple convolutional neural network model that will be used to predict the probability of the presence of a # st...
code_fim
hard
{ "lang": "python", "repo": "bfmat/LaneDetection", "path": "/model/stop_sign_model.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|># Main function to create model def get_model(window_size): # Hyperbolic tangent activation function activation = 'tanh' # Initialize the Sequential model model = Sequential() # Two convolutional layers model.add(Conv2D( input_shape=(window_size, window_size, 3), ...
code_fim
medium
{ "lang": "python", "repo": "bfmat/LaneDetection", "path": "/model/stop_sign_model.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> # Initialize the Sequential model model = Sequential() # Two convolutional layers model.add(Conv2D( input_shape=(window_size, window_size, 3), kernel_size=4, filters=8, activation=activation )) model.add(Conv2D( kernel_size=2, filter...
code_fim
medium
{ "lang": "python", "repo": "bfmat/LaneDetection", "path": "/model/stop_sign_model.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> dr = self.driver dr.get(url) elems = dr.find_elements_by_xpath(self.xpath["absolute_article_path"]) prev_cnt = 0 while len(elems) < self.limit and len(elems) != prev_cnt: self._load_more() prev_cnt = len(elems) elems = dr.find_ele...
code_fim
hard
{ "lang": "python", "repo": "mstrechen/news-scraper", "path": "/src/scraping/newslists_scrapers/ukrnet.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: mstrechen/news-scraper path: /src/scraping/newslists_scrapers/ukrnet.py from queue import Queue from datetime import datetime, timedelta from .INewslistScraper import INewslistScraper from .. import article from .. import driver class Scraper(INewslistScraper): def __init__(self, limit: ...
code_fim
hard
{ "lang": "python", "repo": "mstrechen/news-scraper", "path": "/src/scraping/newslists_scrapers/ukrnet.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> self.driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") def _date_from_ukr_to_datetime(self, s: str, index: int): mon = s[s.find(' ') + 1 :] day = int(s[: s.find(' ')]) return datetime(datetime.today().year, self.monthshorts.index(mon) + 1, \ ...
code_fim
hard
{ "lang": "python", "repo": "mstrechen/news-scraper", "path": "/src/scraping/newslists_scrapers/ukrnet.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: quantmatt/Scientific-Report-Generator path: /ResultTable.py import pandas as pd import numpy as np import matplotlib.pyplot as plt import six class ResultTable: """ A table class that hold calcualted result information """ def __init__(self): """ Init function for the Result...
code_fim
hard
{ "lang": "python", "repo": "quantmatt/Scientific-Report-Generator", "path": "/ResultTable.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> self.table = t def set_columns(self, column_names): """ Sets the names of the columns Args: column_names (str): The array of names for the columns """ for name in column_names: ...
code_fim
hard
{ "lang": "python", "repo": "quantmatt/Scientific-Report-Generator", "path": "/ResultTable.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: menglongyue/PdRSCD path: /ppcd/models/dsifn.py import paddle import paddle.nn as nn import paddle.nn.functional as F from paddle.vision.models import vgg16 from ppcd.models.layers import CAM, SAM class Vgg16Base(nn.Layer): # Vgg16 feature extraction backbone def __init__(self, in_channe...
code_fim
hard
{ "lang": "python", "repo": "menglongyue/PdRSCD", "path": "/ppcd/models/dsifn.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> class DSIFN(nn.Layer): """ The DSIFN implementation based on PaddlePaddle. The original article refers to Cz, A , et al. "A deeply supervised image fusion network for change detection in high resolution bi-temporal remote sensing images" (https://www.sciencedirect.com/science/article...
code_fim
hard
{ "lang": "python", "repo": "menglongyue/PdRSCD", "path": "/ppcd/models/dsifn.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: yutiansut/platform-client-python path: /tests/cli/formatters/test_blob_formatters.py from datetime import datetime from typing import List, Union, cast import pytest from neuromation.api import Action, BlobListing, BucketListing, PrefixListing from neuromation.cli.formatters.blob_storage import...
code_fim
hard
{ "lang": "python", "repo": "yutiansut/platform-client-python", "path": "/tests/cli/formatters/test_blob_formatters.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> formatter = LongBlobFormatter(human_readable=True, color=False) assert list(formatter(self.list_results)) == [ " 1.0K 2018-01-01 14:00:00 blob:neuro-public-bucket/file1024.txt", " 1000.0K 2018-01-01 00:00:00 blob:neuro-public-bucket/file_bigger.txt", ...
code_fim
hard
{ "lang": "python", "repo": "yutiansut/platform-client-python", "path": "/tests/cli/formatters/test_blob_formatters.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> def __init__(self,): _RIOT.__init__(self) self.name = "RIOTS" self.specie = 'verbs' self.basic = "riot" self.jsondata = {}<|fim_prefix|># repo: cash2one/xai path: /xai/brain/wordbase/verbs/_riots.py from xai.brain.wordbase.verbs._riot import _RIOT <|fim_middle|>#calss header class _RIOTS(_...
code_fim
easy
{ "lang": "python", "repo": "cash2one/xai", "path": "/xai/brain/wordbase/verbs/_riots.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: cash2one/xai path: /xai/brain/wordbase/verbs/_riots.py from xai.brain.wordbase.verbs._riot import _RIOT <|fim_suffix|> _RIOT.__init__(self) self.name = "RIOTS" self.specie = 'verbs' self.basic = "riot" self.jsondata = {}<|fim_middle|>#calss header class _RIOTS(_RIOT, ): def __init__(...
code_fim
medium
{ "lang": "python", "repo": "cash2one/xai", "path": "/xai/brain/wordbase/verbs/_riots.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>['TLaBeL', 'openmm_simulate', '1', '1599750189.0', 'Thu Sep 10 11:03:09 2020', '/gpfs/alpine/csc299/scratch/iyakushin/Test3/entk_cvae_md/MD_exps/fs-pep/run_openmm.py', '104\n'] ignore_index = True '''<|fim_prefix|># repo: DeepDriveMD/DeepDriveMD-streaming path: /analysis/timers.py import glob import...
code_fim
hard
{ "lang": "python", "repo": "DeepDriveMD/DeepDriveMD-streaming", "path": "/analysis/timers.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: DeepDriveMD/DeepDriveMD-streaming path: /analysis/timers.py import glob import subprocess import pandas as pd import os session = subprocess.getstatusoutput('ls -d ../re.* | cut -d "/" -f2')[1] dir = f'/p/gpfs1/yakushin/radical.pilot.sandbox/{session}/pilot.0000' <|fim_suffix|>for s in stdouts:...
code_fim
hard
{ "lang": "python", "repo": "DeepDriveMD/DeepDriveMD-streaming", "path": "/analysis/timers.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> pf['label'] = labels pf['start'] = starts pf['gps'] = gpss pf['date'] = dates pf['file'] = files pf['line'] = nlines pf['unit'] = units pf['time'] = times pf.to_csv(fn) ''' print(subprocess.getstatusoutput('/gpfs/alpine/scratch/iyakushin/csc299/radical.pilot.sandbox/$(ls -tr /gpfs/alpine/scratch/iyaku...
code_fim
hard
{ "lang": "python", "repo": "DeepDriveMD/DeepDriveMD-streaming", "path": "/analysis/timers.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: eyobofficial/Gebeya-Schedule-Bot path: /accounts/models.py from uuid import uuid4 from django.contrib.auth.models import AbstractUser from django.db import models <|fim_suffix|> def __str__(self): return self.username<|fim_middle|>class CustomUser(AbstractUser): id = models.UUID...
code_fim
medium
{ "lang": "python", "repo": "eyobofficial/Gebeya-Schedule-Bot", "path": "/accounts/models.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> return self.username<|fim_prefix|># repo: eyobofficial/Gebeya-Schedule-Bot path: /accounts/models.py from uuid import uuid4 from django.contrib.auth.models import AbstractUser from django.db import models class CustomUser(AbstractUser): <|fim_middle|> id = models.UUIDField(primary_key=True,...
code_fim
medium
{ "lang": "python", "repo": "eyobofficial/Gebeya-Schedule-Bot", "path": "/accounts/models.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> def __str__(self): return self.username<|fim_prefix|># repo: eyobofficial/Gebeya-Schedule-Bot path: /accounts/models.py from uuid import uuid4 from django.contrib.auth.models import AbstractUser from django.db import models <|fim_middle|> class CustomUser(AbstractUser): id = models.UUID...
code_fim
medium
{ "lang": "python", "repo": "eyobofficial/Gebeya-Schedule-Bot", "path": "/accounts/models.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> dependencies = [ ("froide_food", "0006_auto_20180612_1231"), ] operations = [ migrations.RunPython(store_last_status), ]<|fim_prefix|># repo: okfde/froide-food path: /froide_food/migrations/0007_auto_20180618_1217.py # -*- coding: utf-8 -*- # Generated by Django 1.11.13 o...
code_fim
hard
{ "lang": "python", "repo": "okfde/froide-food", "path": "/froide_food/migrations/0007_auto_20180618_1217.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_prefix|># repo: okfde/froide-food path: /froide_food/migrations/0007_auto_20180618_1217.py # -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-18 10:17 from __future__ import unicode_literals from django.db import migrations <|fim_suffix|> class Migration(migrations.Migration): dependencies ...
code_fim
hard
{ "lang": "python", "repo": "okfde/froide-food", "path": "/froide_food/migrations/0007_auto_20180618_1217.py", "mode": "psm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|> dependencies = [ ("froide_food", "0006_auto_20180612_1231"), ] operations = [ migrations.RunPython(store_last_status), ]<|fim_prefix|># repo: okfde/froide-food path: /froide_food/migrations/0007_auto_20180618_1217.py # -*- coding: utf-8 -*- # Generated by Django 1.11.13 ...
code_fim
hard
{ "lang": "python", "repo": "okfde/froide-food", "path": "/froide_food/migrations/0007_auto_20180618_1217.py", "mode": "spm", "license": "MIT", "source": "the-stack-v2" }
<|fim_suffix|>E_functions = [ ('EAPOLClientConfigurationCopyProfiles', '@@'), ('EAPOLClientConfigurationCopyAllLoginWindowProfiles', '@@'), ('EAPOLClientConfigurationCopyAllSystemProfiles', '@@'), ('EAPOLClientConfigurationCreate', '@^@'), ('EAP...
code_fim
medium
{ "lang": "python", "repo": "dockerizeme/dockerizeme", "path": "/hard-gists/8ad859f30438f3be149fe9751391d037/snippet.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: dockerizeme/dockerizeme path: /hard-gists/8ad859f30438f3be149fe9751391d037/snippet.py # This was all run from user space # I haven't tested it with root # ... but it didn't prompt for any permissions under userspace ^_^ # Tested on 10.11.5 import objc from Foundation import NSBundle EAP8021X_bun...
code_fim
hard
{ "lang": "python", "repo": "dockerizeme/dockerizeme", "path": "/hard-gists/8ad859f30438f3be149fe9751391d037/snippet.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_prefix|># repo: yodaos-project/rt-node path: /deps/jerryscript/tools/build.py #!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ...
code_fim
hard
{ "lang": "python", "repo": "yodaos-project/rt-node", "path": "/deps/jerryscript/tools/build.py", "mode": "psm", "license": "Apache-2.0", "source": "the-stack-v2" }
<|fim_suffix|> if not os.path.isabs(arguments.builddir): arguments.builddir = os.path.join(settings.PROJECT_DIR, arguments.builddir) if arguments.clean and os.path.exists(arguments.builddir): shutil.rmtree(arguments.builddir) if not os.path.exists(arguments.builddir): os.makedirs(ar...
code_fim
hard
{ "lang": "python", "repo": "yodaos-project/rt-node", "path": "/deps/jerryscript/tools/build.py", "mode": "spm", "license": "Apache-2.0", "source": "the-stack-v2" }