ngram listlengths 0 82k |
|---|
[
"produced by PythiaFunctionCallParser#ArrayOfValues. def enterArrayOfValues(self, ctx: PythiaFunctionCallParser.ArrayOfValuesContext): pass # Exit",
"# Exit a parse tree produced by PythiaFunctionCallParser#call. def exitCall(self,",
"__name__ is not None and \".\" in __name__: from .PythiaFunctionCallParser",
... |
[
"image: str, environment: Dict[str, str]) -> None: self.name = name",
"= name self.image = image self.environment = environment def run(self)",
"None: logging.info(\"Stopping agent '%s'\", self.name) subprocess.run([\"docker\", \"stop\", self.name]) def get_agent_by_label(name:",
"Agent: # TODO: lookup label ... |
[
"vol_idx = v_h.mesh.vol_idx bdy_idx = v_h.mesh.bdy_idx self.S = stiffness_matrix(self.v_h, sigma_vec)",
"bdy_idx = v_h.mesh.bdy_idx self.S = stiffness_matrix(self.v_h, sigma_vec) def build_matrices self.Mass",
"update_matrices(self, sigma_vec): vol_idx = v_h.mesh.vol_idx bdy_idx = v_h.mesh.bdy_idx self.S =",
... |
[
"= self.DATE_FORMAT % (m, d) with self.subTest(value, value=value): result =",
"] for name, value in case: url = reverse(name, kwargs={name:",
"in range(1, 29): self.assertTrue(result) else: self.assertFalse(result) def test_date_time_regex(self): import re",
"return False for y in range(10000): for m in rang... |
[
"sys.path.insert(0, dirname(dirname(dirname(__file__))) + \"/rtk\", ) import unittest from nose.plugins.attrib import",
"0.95 self.assertFalse(self.DUT.calculate()) self.assertAlmostEqual(self.DUT.mean_cost, 360.83333333) self.assertAlmostEqual(self.DUT.cost_variance, 992.25) class TestValidationController(unitte... |
[
"a grade as a string. def computegrade(score): if score <",
"of range\" elif score >= 0.9: return \"A\" elif score",
"0.7: return \"C\" elif score >= 0.6: return \"D\" else:",
"called computegrade # that takes a score as its parameter",
"or score > 1: return \"score out of range\" elif",
"grade as a strin... |
[
"nb.predict(XB) assess(yP) # Stochastic Gradient Descent from sklearn.linear_model import SGDClassifier",
"*mixing else True for i in range(n)]) yplot = xplot**2",
"np.linspace(0,1,100) if option=='linear': y = np.array([False if (X[i,0]+X[i,1])>=(1.0+mixing/2-np.random.rand()*mixing) else True",
"Split into ... |
[
"result again as unicode def _set_webserver_details(self): # Get the Kodi",
"simply calling it at the http endpoint requests.head(url=(action_url), auth=(self.xbmc_username, self.xbmc_password),",
"not self.xbmc_port: self._set_webserver_details() def _double_urlencode(self, text): text = self.single_urlencode(... |
[
"part of the file into #the header with the frequency",
"#the header with the frequency index increasing the fastest for",
"header with the frequency index increasing the fastest for l",
"+ str(f) + '.dat', 'rb') freqstep =float( np.fromfile(fIn, np.double,1) )",
"<gh_stars>10-100 def makeMultiFrameSimFile(... |
[
"self.indexer.remove(*oldParticles) def removeByID(self, *ids): \"\"\"\\ Remove particle(s) as specified by",
"from other particles to these ones. \"\"\" for particle in",
"License, V2.1 # # (1) Kamaelia Contributors are listed in",
"called first. Particles should not apply their velocities to update",
"Con... |
[
"polygon created from the objects specified. Parameters ---------- vertices :",
"1 return is_ccw def get_swap(self): \"\"\"Returns a ``LineSegment`` object which",
"where the ray originates). See ``second_p``. Examples -------- >>> l",
"float]: return math.hypot(v1[0] - v2[0], v1[1] - v2[1]) def part_perimete... |
[
"('question', models.CharField(max_length=255, verbose_name='Вопрос')), ('answer', models.CharField(max_length=1000, verbose_name='Ответ')), ], options={ 'verbose_name': 'Вопрос/Ответ',",
"verbose_name='Название')), ('question', models.CharField(max_length=255, verbose_name='Вопрос')), ('answer', models.CharField... |
[
"import Response from rest_framework.views import APIView from .serializers import ClientTokenSerializer",
"app_id = serializer.data['app_id'] app = App.objects.get(pk=app_id) token, created = ClientToken.objects.get_or_create(client_secret=client_secret,",
"from .serializers import ClientTokenSerializer from .... |
[
"#Remove connections node_to_remove.next = None node_to_remove.prev = None self.length -=1",
"= 1 def append(self, value): new_node = Node(value) if self.length",
"self.head def pop_first(self): #Empty List if self.length == 0: return",
"self.length += 1 return self.head def pop_first(self): #Empty List if",
... |
[
"override_service class TestSimpleThing(CanvasTestCase): def test_basic_addition(self): \"\"\" Tests that 1 +",
"Services, override_service class TestSimpleThing(CanvasTestCase): def test_basic_addition(self): \"\"\" Tests that 1",
"create_quest_comment) from services import Services, override_service class Tes... |
[
"size, car in data) my_data = 'get uuuuuuuuuuuuuuuup' print(list(my_data)) compressed",
"groupby def compress(data): return ((len(list(group)), name) for name, group in",
"groupby(data)) def decompress(data): return (car * size for size, car",
"compress(data): return ((len(list(group)), name) for name, group ... |
[
"} views = BasicLTILaunchViews(context, pyramid_request) return views.configure_module_item() class TestBasicLTILaunchViewsInit: \"\"\"Unit",
"BasicLTILaunchViews.db_configured_basic_lti_launch(), and return whatever BasicLTILaunchViews.db_configured_basic_lti_launch() returns. \"\"\" views = BasicLTILaunchViews(... |
[
"access admin page for unauthorized but authenticated users. \"\"\" def",
"page for unauthorized but authenticated users. \"\"\" def process_request(self, request):",
"unauthorized but authenticated users. \"\"\" def process_request(self, request): if request.META['PATH_INFO'].startswith('/admin'):",
"\"\"\" ... |
[
"audio_loader.load(r'C:\\Users\\ewais\\Documents\\GitHub\\tensor-hero\\Source Separation\\song.ogg', sample_rate=sample_rate) # Perform the separation : prediction =",
"loader explicitly for loading audio waveform : from spleeter.audio.adapter import",
"from scipy.io.wavfile import write from pydub import Audio... |
[
"return_edges=True) assert len(xmid)+1 == len(xedges), \"Length of xmid and xedges",
"import numpy as np import magpie # check cartesian def",
"and p are not the same.\" assert len(r) == npix,",
"unexpected results.\" def test_grid2d(): x2d, y2d = magpie.grids.grid2d(10, 10) assert",
"npix = magpie.grids.po... |
[
"import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((socket.gethostname(), 1123)) while True:",
"m = receive_message(s) if m: print(m, \"\\n\") ping(s) print(s.getsockname()) print(socket.gethostbyname(socket.gethostname()))",
"import * import socket s = socket.socket(socket.AF_INET, ... |
[
"time w = tw.Watcher(filename='test.log') s = w.create_stream(name='my_metric') #w.make_notebook() for i",
"tw.Watcher(filename='test.log') s = w.create_stream(name='my_metric') #w.make_notebook() for i in range(1000): s.write((i,",
"= w.create_stream(name='my_metric') #w.make_notebook() for i in range(1000): s... |
[
"in self.data if 'UUID' in dm] self.by_uuid = dict((dm['UUID'], dm)",
"Command ``dmsetup`` ====================================== Parsers for parsing and extracting data from",
"module are: DmsetupInfo - command ``dmsetup info -C`` ----------------------------------------- \"\"\"",
"'VG00-tmp', 'Min': '8', 'T... |
[
"dict(kernel=kernel_range, C=C_range) self.grid = GridSearchCV(SVC(), param_grid=self.param_grid, cv=self.cv, n_jobs=-1) pass def",
"for i in range(0, len(l), n): yield l[i:i+n] def runLROverTime(train_X,",
"names\") pass # run CV according to params for each",
"computation time report.showResult(model, predi... |
[
"unittest import maxixe from maxixe.tests import decorators from maxixe.tests import",
"maxixe.tests import utils suite = unittest.TestSuite() suite.addTests(unittest.TestLoader().loadTestsFromModule(decorators)) suite.addTests(unittest.TestLoader().loadTestsFromModule(loader)) suite.addTests(unittest.TestLoader(... |
[
"False], inplace=True) completed_course.set_index('Course', inplace=True) def browsefunc1(): filename = filedialog.askopenfilename(filetypes=( (\"csv",
"= not completed_course.loc[x, 'Finished'] def submit3(): unlocked = get_unlocked_course(df, completed_course)",
"= pd.read_csv(filepath) completed_course.repla... |
[
"title = models.CharField(\"标题\", unique=True, max_length=200) class Meta: db_table = 'blog'",
"models.CharField(\"标题\", unique=True, max_length=200) class Meta: db_table = 'blog' verbose_name =",
"Blog(models.Model): title = models.CharField(\"标题\", unique=True, max_length=200) class Meta: db_table =",
"mode... |
[
"from wormer.data import strategy import re class Graber: synopsis_pattern =",
"and findall return list urls = self.textManager.find_urls_by_regex(page_source, Graber.href_pattern) synopsis =",
"add_urls_head(urls, head): for i, item in enumerate(urls): item = head",
"# url = input('The website you want:\\n')... |
[
"code provided in your editor to print whether or not",
"= float(input()) tip_percent = int(input()) tax_percent = int(input()) solve(meal_cost, tip_percent,",
"print whether or not n is weird. \"\"\" # Complete",
"#!/usr/local/bin/python3 \"\"\"Task Given the meal price (base cost of a",
"find and print th... |
[
"(mock_security_groups_client.create_security_group .return_value) = fake_security_group (self._base_tempest_backend._manager .security_groups_client) = mock_security_groups_client self._base_tempest_backend._security_groups_rules =",
"mock.Mock( return_value=fake_security_group[\"security_group\"][\"id\"]) self.... |
[
"element = WebDriverWait(browser1, 10).until( EC.presence_of_element_located((By.XPATH, selector1)) ) element.click() return True",
") element.click() return True except: print(\"timedout\", function, selector1, value1) return",
"element.click() return True except: print(\"timedout\", function, selector1, value... |
[
"len(class_mapping) - 1 class_mapping[key_to_switch] = val_to_switch return all_data, classes_count, class_mapping",
"for hard negative mining).') found_bg = True class_mapping[class_name] = len(class_mapping)",
"found_bg = False all_imgs = {} classes_count = {} class_mapping",
"x1, y1, x2, y2, class_name, bu... |
[] |
[
"True: for event in pygame.event.get(): if event.type == QUIT: pygame.display.quit()",
"for event in pygame.event.get(): if event.type == QUIT: pygame.display.quit() elif",
"pygame.display.quit() elif event.type == VIDEORESIZE: screen = pygame.display.set_mode( event.size, HWSURFACE",
"in pygame.event.get(): ... |
[
"Ex. 014 c = float(input(\"Digite uma temperatura em °C: \"))",
"# Ex. 014 c = float(input(\"Digite uma temperatura em °C:",
"c = float(input(\"Digite uma temperatura em °C: \")) print(f\"{c}°C =",
"014 c = float(input(\"Digite uma temperatura em °C: \")) print(f\"{c}°C",
"= float(input(\"Digite uma tempera... |
[
"import path from .views import NodeShow, NodeDetail, SelectNode urlpatterns =",
"NodeDetail, SelectNode urlpatterns = [ path('node/', NodeShow.as_view(), name='node-show'), path('node/detail/<int:n_id>', NodeDetail.as_view(),",
"<reponame>dongdawang/ssrmgmt from django.urls import path from .views import NodeS... |
[
"back to the main menu\") log().info(\"User %s entered an invalid",
"= range(1) class DividendSummary: def __init__(self, dispatcher): self.__dp = dispatcher",
"update.message.text user = update.effective_user log().info(\"User %s entered ticker value %s.\",",
"str(pay_amount).replace('SGD', 'SGD ') +'\\n' i ... |
[
"def _calculate_composition(read_file, kmer_len, length_threshold=25): #Generate kmer dictionary feature_mapping, nr_features =",
"re import logging import numpy as np import pandas as",
"length assumed overlap\") parser.add_argument(\"outFileStub\", help=\"stub for output files\") args =",
"composition_v fai... |
[
"over changes of power of \\mu_t. e. Bayesian methods fail",
"distribution\") plt.savefig(\"3_exponential_dist.png\") plt.clf() plt.plot(theExponential.lookup_x, theExponential.cdf) plt.xlabel(\"x\") plt.ylabel(\"cdf\") plt.title(\"Exponential cdf\") plt.savefig(\"3_exponential_cdf.png\")",
"plt.hist(slopes, bi... |
[
"ttf[\"fvar\"].axes] globalAxisNames = {axisTag for axisTag in axisTags if axisTag[0]",
"buildVarC( args.designspace, args.ttf, args.output, args.ttx, not args.no_woff2, args.neutral_only, ) if",
"fixedCoord for k in coordKeys} dicts = [coord for coord,",
"mapping[v[VARIDX_KEY]] for v in component.transform.v... |
[
"else port['portconf_id'] portconf = find_by_attr(self.controller.portconf(), _id=portconf_id) return portconf def set_port_profile(self,",
"port_override and 'portconf_id' in port_override else port['portconf_id'] portconf = find_by_attr(self.controller.portconf(),",
"'portconf_id' in port_override else port['... |
[
"deck[index] == 0: break for j in xrange(i - 1):",
"(index + 1)%cards if deck[index] == 0: break deck[index] =",
"k = input() # indexes = map(int, raw_input().split()) # #",
"# print deck # deck.rotate(card - 1) # print deck",
"deck[index] == 0: break deck[index] = i #---------------------------------------... |
[
"time import sleep token = \"<KEY>\" # ID da minha",
"ser acessada url_1 = 'https://api.lifx.com/v1/lights/all' url_2 = 'https://api.lifx.com/v1/scenes' url_3 =",
"requests.put('https://api.lifx.com/v1/lights/d073d502164d/state', data=state1, headers=headers) #sleep(5) #activate = requests.put('https://api.lifx... |
[
"with self.assertRaises(RuntimeError): env.observation('VIEW1') def test_lab2d_act_before_start(self): env = self._create_env() with self.assertRaises(RuntimeError):",
"2.0 (the \"License\"); # you may not use this file",
"self._create_env() env.start(episode=0, seed=0) np.testing.assert_array_equal(env.observa... |
[
"<reponame>yonghui-cc/molpy<filename>molpy/data/__init__.py<gh_stars>0 from .reader import look_and_say, get_molecule from .read_xyz_files import open_xyz"
] |
[
"-> Generator[Union[str, bytes], None, None]: \"\"\"\\ Render `args` to sequence",
"DEFAULT_OPTS_SORT = True CompletedProcess = subprocess.CompletedProcess def render_path(path: Path, rel_to:",
"# # We omit these entirely. # pass elif value",
"\"\"\"\\ Render `args` to a single string with `prepare` ->",
"!... |
[
"= set() for uncom_id in uncom_id_list: uncom_vpc_peering_info_request = session.query(VpcPeering).filter(VpcPeering.requester_owner_id ==",
"import OwnerList from models.owner_list import model_to_dict as owner_model_to_list # 获取不合规的vpc",
"owner_id = [] for data in owner_info: data_dict = owner_model_to_list(d... |
[
"-= num print \"Part 1:\", pos * part_1_depth print \"Part",
"= 0 aim = 0 part_1_depth = 0 part_2_depth =",
"elif ins == 'down': part_1_depth += num aim += num",
"'forward': pos += num part_2_depth += (aim * num) elif",
"+= num part_2_depth += (aim * num) elif ins ==",
"+= num aim += num elif ins == \"up\... |
[
"for python 2 # from httplib import HTTPConnection # for",
"= {\"ip\": \"192.168.2.254\", \"list_of_commands_to_send\": \"show version\" } # Get the",
"'/add_command_raw', dumps(data), {'Content-Type': 'application/json'}, ) print(\"Waiting for Server response:\") response",
"print(\"code: \", code) print(\"h... |
[
"opt: salt=value password=password.encode(\"utf8\") if salt: salt=binascii.a2b_hex(salt) else: salt=os.urandom(16) digest=hashes.Hash(hashes.SHA512(),backend=default_backend()) digest.update(password)",
"cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes import b... |
[
"{ \"bot_commands\": [ { \"command\": \"command1\", \"description\": \"description1\" }, {",
"\"command\": \"command2\", \"description\": \"description2\" }, ] } url = f'https://messengerg2b1.iranlms.ir/v3/{token}/setCommands'",
"\"command1\", \"description\": \"description1\" }, { \"command\": \"command2\", \"... |
[
"All rights reserved. \"\"\" NOTE: This class should always comply",
"services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/nfs_dataset_client.py \"\"\" from oci_cli import cli_util from services.dts.src.oci_cli_dts.appliance_config_manager import ApplianceConfigManager",
"cli_util.build_config(c... |
[
"= parent.y + y self.message = message self.color = color",
"self.message = message self.color = color self.visible = True self.priority",
"= 2 def draw(self, root_console, tick_count) -> None: if not",
"message self.color = color self.visible = True self.priority = 2",
"+ x self.y = parent.y + y self.messa... |
[
"} def __init__(self, parser, server_name): writable_metrics_and_types = { 'your model",
"\"\"\" Your model Params Sheet class \"\"\" params_sheet_id = '...'",
"import get_parser class YourParamsSheet(ParamsSheet): \"\"\" Your model Params Sheet class",
"= { \"type\": \"service_account\", \"project_id\": \"..... |
[
"Define constants # HEADERS = {'content-type': 'application/json'} SWIMLANE_FINDER_URL = 'https://global.replicon.com/DiscoveryService1.svc/GetTenantEndpointDetails'",
"# Define constants # HEADERS = {'content-type': 'application/json'} SWIMLANE_FINDER_URL =",
"<reponame>kyhau/friday-5pm-helper # Define constan... |
[
"= listdiff.listdiff( reclist[[\"pid\",\"song_id\",\"pos\"]].sample(frac=1).values, gt[[\"pid\",\"song_id\",\"pos\"]].sample(frac=1).values, complement=complement[[\"pid\",\"song_id\",\"pos\"]].sample(frac=1).values, extra_pids=np.array([3,4]), cut_to_size=4 ) print(res) assert",
"print(res) assert np.all(res[res... |
[
"def map_source(): map_source = app.config.get('MAP_SOURCE', {}) return jsonify({ \"attribution\": map_source.get('attribution',",
") else: dps = DropPoint.get_dps_json() return Response( dps, mimetype=\"application/json\" )",
"if ts: try: dps = DropPoint.get_dps_json( time=datetime.fromtimestamp(float(ts)) ) e... |
[
"coordinate line. In one step the elephant can move 1,",
"visit his friend. It turned out that the elephant's house",
"Input The first line of the input contains an integer",
"line. In one step the elephant can move 1, 2,",
"from point 0 to point x. ''' x = int(input())",
"3, 4 or 5 positions forward. Det... |
[
"\"\"\" :param key: An integer index or a slice (eg.",
"np class InvalidFieldsException(Exception): pass class Dataset(object): \"\"\" Generic Dataset object",
"None else str(e) for e in row]) for row in",
"Pads a list of sequences such that they form a",
"object that encapsulates a list of instances. The d... |
[
"SLEEP = 3 TG_LINK = 'https://api.telegram.org/bot{TOKEN}/sendMessage?chat_id=@{CHANNEL}&text={MESSAGE}&parse_mode=html' UNSUPPORTED_TAGS = ['<span class=\"twython-tweet-suffix\">',",
"= 'USER_NAME_HERE' MSG = '<b>{NAME}</b>:\\n{TEXT}\\n\\n<a href=\"{URL}\">Source</a>' # Technical stuff: TWEET_BASE_URL",
"# Tel... |
[
"from networks.projection import Projection from dataset import get_num_class, get_dataloaders, get_label_name,",
"False\") parser.add_argument('--model_name', type=str, default='wresnet40_2', help=\"model name\") parser.add_argument('--model_path', type=str, default='saved_models', help='path",
"= args.epochs ... |
[
"<!-- **dungpoke/dungpoke** is a ✨ _special_ ✨ repository because its",
"I’m currently learning ... - 👯 I’m looking to collaborate",
"a ✨ _special_ ✨ repository because its `README.md` (this file)",
"- 🌱 I’m currently learning ... - 👯 I’m looking",
"because its `README.md` (this file) appears on your Git... |
[
"with tf.variable_scope('zdx',reuse = True): v = tf.get_variable('v222',shape= [1],initializer = tf.constant_initializer(100.0))",
"[1],initializer = tf.constant_initializer(100.0)) print(v) v1 = tf.get_variable('v222',shape= [1],initializer = tf.constant_initializer(2.0))",
"#因为在foo空间已经创建v的变量,所以下面的代码会报错 #with ... |
[
"= (16000 * 10, 4) audio = AudioUtils.load_audio_from_file(self.audio_file_path, sample_rate=16000, sample_size=10,",
"self.audio_file_path = \"/tf/test_environment/audio/DevNode1_ex1_1.wav\" def test_audio_loading_mono(self): expected_shape = (16000 * 10,)",
"src.utils.utils_audio import AudioUtils class TestU... |
[
"setup setup( install_requires=[ \"numpy >= 1.13\" ], name='jitter', scripts=['bin/jitter.py'], version='0.1.0',",
"\"numpy >= 1.13\" ], name='jitter', scripts=['bin/jitter.py'], version='0.1.0', url='https://github.com/philipwfowler/jitter', author='<NAME>', packages=['jitter'],",
">= 1.13\" ], name='jitter', ... |
[
"Dict, List, Callable Node = namedtuple('Node', 'name parent children data')",
"node in nodes.values(): if node.name != root: nodes[node.parent].children.append(node) return nodes[root]",
"n in reverse_topo_sort: if len(n.children) == 0: n.data[f_descendants] = 0",
"+ sum(nn.data[f_descendants] for nn in n.ch... |
[
"TestStringMethods(unittest.TestCase): count = 0 def setUp(self): TestStringMethods.count = 0 self.root",
"+= 1 else: for i in root.children: add_childs_to_leaf(i, num) class",
"range(1, 20): key = \"child{0}\".format(random.randrange(TestStringMethods.count - 1)) print(\"Deleting node=\",key) n,",
"= DSADAss... |
[
"mtz mtz_obj = mtz.object(file_name=\"3nd4.mtz\") # Only works with mtz.object. #",
"iotbx import mtz mtz_obj = mtz.object(file_name=\"3nd4.mtz\") # Only works with",
"works with mtz.object. # Does not work if mtz is",
"mtz.object. # Does not work if mtz is read in",
"with mtz.object. # Does not work if mtz... |
[
"self.hook = module._register_load_state_dict_pre_hook(partial(self.hook_fn, module=module)) def hook_fn(self, state_dict, prefix, local_metadata, strict,",
"Corporation Licensed under the Apache License, Version 2.0 (the \"License\");",
"# pylint: disable=protected-access self.hook = module._register_load_stat... |
[
"range (a): if(r==s[i]): c+=1 break a+=1 if (c==0): print(\"It is",
"print(\"It is a unique number\") else: print(\"It is not a",
"a+=1 if (c==0): print(\"It is a unique number\") else: print(\"It",
"in range (a): if(r==s[i]): c+=1 break a+=1 if (c==0): print(\"It",
"s={} a=0 c=0 while(n!=0): r=n%10 n=int(n... |
[
"predict_height(audio): global INFERENCE_COUNT INFERENCE_COUNT += 1 # resample audio to",
"# convert to torch tensor tensor = torch.Tensor([arr]) sample_length =",
"cfg.slice_window * cfg.sample_rate if tensor.shape[-1] < sample_length: tensor = torch.nn.functional.pad(tensor,",
"5 seconds would be preferred.... |
[
"on/off toggleState = 400 throttle = 450 delta = 20",
"import sleep #ESC Brushles motor states: direction, on/off toggleState =",
"time import sleep #ESC Brushles motor states: direction, on/off toggleState",
"#ESC Brushles motor states: direction, on/off toggleState = 400 throttle",
"throttle = 450 delta =... |
[
"= 1 r = List([pv.int(21)], size=(1, 1)) store = {",
"exitcode = 1 r = List([pv.int(21)], size=(1, 1)) store =",
"from pytropos.internals.values.python_values.python_values import PythonValue, PT exitcode = 1 r =",
"from pytropos.internals.values.python_values.builtin_mutvalues import * from pytropos.internal... |
[
"m = reg.match(line) if m: version = m.group(1) break if",
"if not version: raise RuntimeError('Cannot find version information') return version",
"'r') as fp: reg = re.compile(r'__version__ = [\\'\"]([^\\'\"]*)[\\'\"]') for line",
"Raises RuntimeError if not found. \"\"\" version = '' with",
"number in the... |
[
"keyboard.is_pressed('a'): qtd_apertos += 1 print('A foi apertado ', qtd_apertos) if",
"keyboard print('\\napertando A ') qtd_apertos = 0 while True: if",
"<reponame>jonasht/pythonEstudos import keyboard print('\\napertando A ') qtd_apertos = 0 while",
"print('\\napertando A ') qtd_apertos = 0 while True: if ... |
[
"0) if DEBUG_ENABLED: character_name = f\"{worksheet.cell(current_row, 1).value} {worksheet.cell(current_row, 2).value}\" current_class",
"class_range: tuple, header_row: tuple, current_row: int): \"\"\"method to update the",
"ID of an character via XIV API\"\"\" current_request_url: str =",
"information in t... |
[
"Returns: str: configuration path. \"\"\" return self.quickbuild._request( 'GET', 'configurations/{}/path'.format(configuration_id), )",
"will be copied. Returns: int: configuration id of the newly",
"-> Union[dict, str]: \"\"\" Get full configuration info. Args: configuration_id",
"reason, only brief informa... |
[
"9, # return [0, 1]. class Solution: def twoSum(self, nums,",
"Solution: def twoSum(self, nums, target): \"\"\" :type nums: List[int] :type",
"1]. class Solution: def twoSum(self, nums, target): \"\"\" :type nums:",
"add up to a specific target. # You may assume",
"= 9, # Because nums[0] + nums[1] = 2 +",
... |
[
"db cursor db_cursor = annotation_tasks.cursor() # Get the next task",
"- workerId - hitId If annotation_type is \"name\", it should",
"noun \" + str(verified_action_set['action_noun'])) all_verifications_correct = False break else: #",
"task if ant_type == 'name_preview' or ant_type == 'trim_preview': needs_... |
[
"assert np.all(np.isclose(x_normed[:, 1::2].std(axis=0), 1.0, 1e-2)) # Channels without variation should",
"1.0)) # nan values should be set to -1.0. assert",
"Checks that all feature indices that are not excluded have",
"exclude_indices=range(1, 10, 2)) x_normed = normalizer(x) # Included indices should",
... |
[
"def curr_file_path() -> Path: \"\"\"Get cuurent file path.\"\"\" return Path(__file__).absolute()",
"\"\"\"Get output folder path.\"\"\" return curr_file_path().parents[3].joinpath(\"out\").absolute() def out_geom_path() -> Path:",
"out_geom_path() -> Path: \"\"\"Get output geometry folder path.\"\"\" return p... |
[
"i = 1 while i < 6: print(i) if (i",
"= 1 while i < 6: print(i) if (i ==",
"1 while i < 6: print(i) if (i == 3):",
"while i < 6: print(i) if (i == 3): break",
"< 6: print(i) if (i == 3): break i +=",
"6: print(i) if (i == 3): break i += 1",
"i < 6: print(i) if (i == 3): break i"
] |
[
"auth.ipaddr + \"/rest/\" + auth.version + \"/cli\" command_dict = {\"cmd\":",
"\"/rest/\" + auth.version + \"/cli\" command_dict = {\"cmd\": command} try:",
"python # -*- coding: utf-8 -*- import requests, json, base64",
"decoded_response except requests.exceptions.RequestException as error: return \"Error:\... |
[
"radar = Radar1(fig, titles, labels) # radar.plot(Robertson[1:], '-', lw=5, color='r',",
"# labels = [np.around(np.linspace(0,10,6),2), np.around(np.linspace(0,11,6),2), # np.around(np.linspace(0,3.2,6),2), np.around(np.linspace(0,100,6),2), # np.around(np.linspace(0,2.3,6),2),",
"# radar.plot(Muki[1:], '-', lw... |
[
"def change_group_value(self, field_name, text): wd = self.app.wd if text is",
"wd = self.app.wd if text is not None: wd.find_element_by_name(field_name).click() wd.find_element_by_name(field_name).clear()",
"def count(self): wd = self.app.wd self.go_to_group_page() return len(wd.find_elements_by_name(\"selecte... |
[
"the literal value \"ネコ\" (which means \"cat\" in japanese) Source:",
"# Last modified on 2015-11-30T12:37:27.133314Z # Version 1 s =",
"japanese word ネコ. Declare a new string _s and initialize",
"value \"ネコ\" (which means \"cat\" in japanese) Source: programming-idioms.org \"\"\"",
"# Implementation author... |
[
"\"\"\" from django.urls import path from workflow import views urlpatterns",
"for the workflow app \"\"\" from django.urls import path from",
"import path from workflow import views urlpatterns = [ path('logs',",
"workflow import views urlpatterns = [ path('logs', views.logs, name='logs'), path('logs/<lid>',... |
[
"i += 1 return i limit = int(input('Limit: ')) primes",
"= 2 while (no * m) <= max(primes): if primes.count(no",
"no = primes[i] m = 2 while (no * m)",
"0: primes.remove(no * m) m+=1 i+=1 return primes def maxPower(n,",
"primes.remove(no * m) m+=1 i+=1 return primes def maxPower(n, limit):",
"while math.p... |
[
"return filter_by_query_param(queryset, query, PAYMENT_SEARCH_FIELDS) def resolve_payment_meta(payment_intent_id): stripe_plugin = manager.get_plugins_manager().get_plugin(\"mirumee.payments.stripe\") if",
"customer_id) def resolve_payments(info, query): queryset = models.Payment.objects.all().distinct() return f... |
[
"make a comparation into the sorted #(Organized by the highest",
"k and we gonna organize by the d[k] who is",
"d: d[x] = d[x] +1 # \"x\" will be key",
"a function states = {\"Minnesota\": ['St.Paul', 'Minneapolis', 'Saint Cloud', 'Stillwater'],",
"comparation into the sorted #(Organized by the highest valu... |
[
"coding: utf8 * ''' vista_pallet.py A module that contains a",
"forklift.models import Pallet from os.path import join class VistaPallet(Pallet): def",
"def __init__(self): super(VistaPallet, self).__init__() self.arcgis_services = [('Vista', 'MapServer')] self.sgid =",
"A module that contains a forklift pall... |
[
"ler_qtd(qa, ' Quantas cartas Alice possui? ') qb = ler_qtd(qb,",
"l = list() for cont in range(len(lista)): if lista[cont] not",
"#Espera 1s def retirar_repetidos(lista): l = list() for cont in",
"tiro os repetidos for i in range(len(cartasB)): for j in",
"in range(len(cartasA)): if cartasB[i] == cartasA[j... |
[
"= [polygon_ops.shear_y(pnts, degree, img_size=(w, h), expand=True) for pnts in points]",
"else: fillcolor = self.fillcolor degree = random.random() * (self.ydegree[1] -",
"points = polygon_ops.scale(points, 1 / r) return img, points class",
"[polygon_ops.rotate(pnts, degree, (w // 2, h // 2), img_size=(w, h)... |
[
"def kompajliraj(inp,outp,error): try: tmp = Builder.load_string(inp.text) if not tmp: error.text",
"# replace with your current kivy version ! from kivy.app",
"tmp = None error.text = \"Error: ParserException\" outp.clear_widgets() if tmp:",
"KVoutput(BoxLayout): pass class MainBox(BoxLayout): pass class Kvt... |
[
"attributeMap: The key is attribute name and the value is",
"Gets the protocol_version of this IbIocProfile. The protocol version (protocol-specific).",
"GUID used to uniquely identify the I/O controller. :return: The",
"A number assigned by the vendor to identify the device",
"\"\"\" Gets the io_class of t... |
[
"< 20 def match(self, uri): path = uri.strip('/') for _,",
"for our N < 20 def match(self, uri): path =",
"_, pattern, value in self._patterns: match = pattern.match(path) if match:",
"= [] for part in parts: is_variable = VARIABLE.search(part) if",
"in self._patterns: match = pattern.match(path) if match: ... |
[
"return self.error_lineno def submitted_at(self): return self.submitted_at def updated_at(self): return self.updated_at",
"def error_lineno(self): return self.error_lineno def submitted_at(self): return self.submitted_at def updated_at(self):",
"self.error_lineno = response_body['error_lineno'] self.submitted_a... |
[
"POST req body = request.data s = 'You want path:",
"'application/json'} except: return json.dumps({'rip': True}), 404, {'ContentType': 'application/json'} def http_app(ip,",
"requests.post('http://10.10.1.140:9200/'+path, json={\"username\": jsonData['username'], \"password\": <PASSWORD>['password']}) print(r.... |
[
"3\", \"License :: OSI Approved :: BSD License\", \"Operating System",
"download_url=GITHUB_URL, project_urls={ \"Source\": GITHUB_URL, \"Tracker\": GITHUB_URL + '/issues', }, classifiers=[",
"= f.read().splitlines() GITHUB_URL = \"https://github.com/jackz314/eeglabio\" setuptools.setup( name=\"eeglabio\", vers... |
[
"g_xy = -2 * x[0] g_yy = 1 H =",
"line_search def aokiFn(x): \"\"\" F(x,y) = 0.5 x (x^2 -",
"g_yy return H def gradient_descent(x0, f, f_prime, hessian=None, adaptative=False): \"\"\"",
"dx_i, dy_i = f_prime(np.asarray([x_i, y_i])) if adaptative: # Compute a",
"plt.plot(1, 1, 'go', MarkerSize=10) r = gradie... |