ngram
listlengths
0
82k
[ "obj.sense == Maximize def test_bad_sense(self): with pytest.raises(ValueError) as e: LpObjective(name='',", "obj.sense = Maximize assert obj.sense == Maximize def test_bad_sense(self): with", "e: LpObjective(name='', expression=None, constant=0, sense='') assert \"Sense must be one", "= Maximize assert obj.s...
[ "{ 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Token ' + '<PASSWORD>'", "'apis/coachuser/' BASE_URL = 'https://www.securityadvisor.io/' CONTEXT_JSON = { \"SecurityAdvisor.CoachUser\": { \"coaching_date\":", "test-module command Args: requests_mock ([type]): [description] ...
[ "PATH_ARTICLES = '/mnt/data/datasets/newspapers/guardian/articles.csv' PATH_ORIG_COMMENTS = '/mnt/data/datasets/newspapers/guardian/comments.csv' PATH_TOKENIZED_TEXT = '/mnt/data/datasets/newspapers/guardian/sorted_comments_twokenized_lower' #", "res = pd.merge(co, res_pos, how='left') res['class'] = res['class']...
[ "constants as const import math lambda_obsereved = float(input(\"Enter the obeserved", "lamda 와 적색편이 z가 주어졌을 때 시선속도 V_r 은 다음과", "the obeserved wavelength (lambda_obsereved): \")) lambda_0 = 5006.84 c =", "func_V_r(): print(\" \\n V_r = \" , end='', flush =", "계산합니다. 21cm 전파의 lamda_0 는 5006.84 A 이고,관측된 파장 la...
[ "All rights reserved. \"\"\" import os APP_NAME = 'folktales' PROJECT_DIR", "@ 12:40 AM. Copyright © 2017. Victor. All rights reserved.", "A.I. Engineer & Software developer <EMAIL> Created on 27 December,", "2017 @ 12:40 AM. Copyright © 2017. Victor. All rights", "= 'folktales' PROJECT_DIR = os.getcwd() ST...
[ "PROCESSED_DATA_PATH = 'data/processed' OUTPUT_DATA_PATH = 'data/output' MODELS_PATH = 'models' REPORTS_PATH", "= 'data/processed' OUTPUT_DATA_PATH = 'data/output' MODELS_PATH = 'models' REPORTS_PATH =", "'data/processed' OUTPUT_DATA_PATH = 'data/output' MODELS_PATH = 'models' REPORTS_PATH = 'reports'", "'dat...
[ "first_category = BlogCategory() first_category.title = 'Category1' first_category.save() second_category = BlogCategory()", "first_saved_category = saved_category[0] second_saved_category = saved_category[1] self.assertEqual(first_saved_category.title, 'Category1') self.assertEqual(second_saved_category.title, '...
[]
[ "# worst time compleity_ O(logn) # space compleity- O(1) #", "list is sorted def binary_search(arr, value): length = len(arr) start", "= length - 1 mid = (start + end) //", "while mid != start: if arr[mid] == value: return True", "value: end = mid else: start = mid mid =", "start = mid mid = (start + end)...
[ "\"2021-03-16T14:11:49.270209/Democracy_Club__06May2021.csv\" stations_name = \"2021-03-16T14:11:49.270209/Democracy_Club__06May2021.csv\" elections = [\"2021-05-06\"] csv_delimiter = \",\"", "uprn = record.property_urn.strip().lstrip(\"0\") if uprn in [ \"100091587330\", # CEDAR", "COMMON ROAD, BILLERICAY \"10...
[ "count_pairs = sorted(counter.items(), key=lambda x: (-x[1], x[0])) words, _ =", "def build_vocabulary(self): counter = Counter(self.words) count_pairs = sorted(counter.items(), key=lambda x:", "Batches''' def __init__(self, config): self.config = config self.batch_size = batch_size", "= config self.batch_siz...
[ "def test_neal_funnel(config=Config()): test_neal_funnel = MCMCTest( name='neal_funnel', model_file='good/neal_funnel.stan', config=config ) return", "MCMCTest, Config from pprint import pprint def test_neal_funnel(config=Config()): test_neal_funnel =", "model_file='good/neal_funnel.stan', config=config ) retur...
[ "obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0", "LLC # # Licensed under the Apache License, Version 2.0", "repo_name = name[len(strip_repo_prefix):] if repo_name in native.existing_rules(): return repo_rule(name =", "py_binary( name = \"black\", srcs = glob([\"**/*.py\"]), v...
[ "range(X.shape[1])))) return X, y, featnames def load_iwpc(data_folder): datafile = '{}/iwpc-scaled.csv'.format(data_folder)", "'iwpc': X, y, featnames = load_iwpc(data_folder) train_X, test_X, train_y, test_y", ":-1], data[:, -1] featnames = np.array( list(map(lambda i: '{:03}'.format(i), range(X.shape[1]))))"...
[ "hparams[\"skip_prep\"] }, ) print(\"data io prep\") if not os.path.exists(os.path.join(hparams[\"feat_folder\"])): os.makedirs(os.path.join(hparams[\"feat_folder\"]),", "os.makedirs(os.path.join(hparams[\"feat_folder\"]), exist_ok=False) save_dir = os.path.join(hparams[\"feat_folder\"]) # Dataset IO prep: creati...
[ "of a shapely Polygon or geodataframe geometries. GeoJSON specification recommends", "} def reduce_precision(ingeo: Union[Polygon, GDF], precision: int=3) -> Union[Polygon, GDF]:", "ingeo.geometry = ingeo.geometry.apply(lambda _p: _invert_y_axis(poly=_p, reference_height=reference_height)) return ingeo def cut_...
[ "value1, value2): return \"PROD = \" + str(value1 * value2)", "def solution(self, value1, value2): return \"PROD = \" + str(value1", "solution(self, value1, value2): return \"PROD = \" + str(value1 *", "SimpleProduct: def solution(self, value1, value2): return \"PROD = \" +", "class SimpleProduct: def solut...
[ "create_expression(observer): \"\"\" Create an expression with a dummy observer for", "expected = [ create_graph( DictItemObserver(notify=False, optional=False), ), ] actual =", "calls the top-level function correctly. expr = expression.match(filter=self.anytrait).match( filter=self.anytrait )", "create_graph...
[ "= authed_session.request('GET', self.TEST_URL) assert response == mock_response assert mock_credentials.before_request.called assert", "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "'1' class MockAdapter(requests.adapters.BaseAdapter): def __init__(self, responses, hea...
[ "patch.set_alpha(1.0) for label in diagram.set_labels: label.set_size(20) for label in diagram.subset_labels:", "'german': set(), 'english': set()} for entry in entries: language =", "venn3 with open('../../Data/Annotations/ethnicity.csv') as f: reader = csv.DictReader(f) entries =", "from matplotlib_venn imp...
[ "variable when building # the docker containers if os.environ[\"REQUIREMENTS_FILE\"] ==", "DEBUG = True SERVER_EMAIL = \"Wikilink Local <<EMAIL>>\" DEFAULT_FROM_EMAIL =", "\"local.txt\": INSTALLED_APPS += [ \"debug_toolbar\", \"django_extensions\", ] MIDDLEWARE += [", "# Sometimes, developers do not want the ...
[ "MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName(\"statusbar\") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.tableWidget, self.lineEdit)", "ite...
[ "a.rotation_axis_angle, a.scale.copy(), rotname]) else: pose.append([a.location.copy(), getattr(a,rotname).copy(), a.scale.copy(), rotname]) return pose", "rotname = \"rotation_euler\" elif rotway in ['AXIS_ANGLE']: rotname = 'rotation_axis_angle'", "def draw(self, context): layout = self.layout row = layout.ro...
[ "db class Automated(commands.Cog): def __init__(self, bot): self.bot = bot self.player_count", "to the scoring database, we need to fill # 4", "4 parameters: # - [List] of ID's of all players", "self.game_db.games[game_id] # Remove reaction if user isn't in the game", "finished...\", value=scoring_help, inl...
[ "len(symbol) == 0: continue if \"func_\" in symbol: continue print", "i = 0 for line in buf: if len(line) ==", "== 0: continue addr , symbol , empty = line.split(\"|\")", "__name__ == \"__main__\": default_file = \"test\" fname = askString(\"Kernelcache symbol", "default_file = \"test\" fname = askString(\"...
[ "# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law", "compliance with the License. # You may obtain a copy", "an \"AS IS\" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF", "2.0 (the \"License\"); # you may not use this file", "agreed to in writing, software # distributed und...
[ "<= 2, bdnyc.photometry.c.band.in_(band_list))).\\ pandas() if len(bd_data) == 0: continue #", "= db.query(db.Sources).\\ filter(db.Sources.c.source.notin_(sources_with_photometry)).\\ pandas() # Get the BDNYC source_id values", "if len(bd_data) == 0: continue # Insert into the database", "row in sources.iter...
[ "User from .drink_dto import Drinks from .dessert_dto import Dessert from", "import Drinks from .dessert_dto import Dessert from .role_dto import Roles", "from .drink_dto import Drinks from .dessert_dto import Dessert from .role_dto", "from .user_dto import User from .drink_dto import Drinks from .dessert_dto...
[ "# aa : 遇到两个重复字符的时候 # aaa: 遇到多个重复字符的时候 # aba: 遇到左右字符重复的时候", "+= 1 # 探索完成 max = (right - left +", "\"baaabd\", \"kkkfcddddddcfkabckkl\", \"aaaabcdefghijjjjklmn\"] for str in strs: max = maxOfPalindrome(str)", "max # 当后面的字符串数量少于最大回文个数时,提前跳出循环 left = right right += 1 return", "str[right]: # aa... while right +...
[ "into an array of N'-bits integers \"\"\" carry = 0", "for number in input: carry = carry << input_bits carry", "bits_count >= output_bits: number = (carry >> (bits_count - output_bits))", "= carry << input_bits carry += number bits_count += input_bits", "max_acc bits += frombits while bits >= tobits: bits ...
[ "date = str(date_list[0]) date = date[14:-11].replace(\" \", \"\") date =", "#!/usr/bin/python3 import scrapy from yarl import URL from datetime import", "IndianExpressSpider(scrapy.Spider): name = \"indian_express\" allowed_domains = [config.INDIAN_EXPRESS_ROOT] tag = \"\"", "newspaper.spiders.generate_links...
[]
[ "..gateway import KeepAlive class DiscordGateway: def __init__(self, client, ws): self.ws", "url = await client.request(\"GET\", \"/gateway\")[\"url\"] ws = await client.ws_connect(url +", "KeepAlive(ws = self, interval = self.interval) await self.send(self.keepalive.get_data()) self.keepalive.start() await", ...
[ "import HttpResponseRedirect,HttpRequest, HttpResponse, JsonResponse, QueryDict, Http404 from django.conf import settings", "== 1: res = {'code': 1, 'result': '不能删除管理员'} else: user", "Permission class UserView(LoginRequiredMixin, PaginationMixin, ListView): \"\"\" 组功能 \"\"\" model =", "手机号码非法 # print(_userFor...
[ "settings from django.conf.urls.static import static app_name=\"blog\" urlpatterns = [ url(r'(?P<id>\\d+)/post_edit/$',", "views.post_create, name=\"post_create\"), url(r'edit_profile/$', views.edit_profile, name=\"edit_profile\"), ] if settings.DEBUG: urlpatterns +=", "url(r'(?P<id>\\d+)/cmnt_delete/$', views....
[ "results also provide # important considerations for other tests. Almost", "er_np(n, p) if i == 0: node_data = pd.DataFrame(index=np.arange(n)) ax", "color=network_palette[\"Left\"], size=\"large\", rotation=0, ha=\"right\", labelpad=10, ) ax = axs[1, 0]", "Math # Let $n$ be the number of nodes. We", "numbe...
[ "= points[:len(points) / 2 + 1] points_right = points[len(points) /", "given polints. # # Usage: # ``` # bvh1 =", "params_right = params[len(points) / 2:] self._children = [BVH(points_left, params_left, self._level", "t_ranges = zip(params[:-1], params[1:]) points = self._points p_ranges = zip(points[:-1],", ...
[ "= RegiaoFactory.create(id=1) def test_perform_create(self): data = { 'nome': 'Gotham', 'regiao':", "args=[15])) self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT) response = self.client.get(reverse('cidade-list')) self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(len(res...
[ "if(a>0): return a else: return -a s = input() s1", "0): kaburi_hoten_3 = 0 else: kaburi_hoten_3 = print(zentai) print(kaburi_zentai) print(kaburi_hoten_1)", "range(int(s[0]))] si = [] for i in range(0,int(s),1): si.append([int(s1[i][0]),int(s1[i][1]),int(s1[i][2])]) print(si)", "if(a>b): return (a-b+1)**2 re...
[ "[ ('imageledger', '0010_auto_20161130_1814'), ] operations = [ migrations.AlterModelOptions( name='favorite', options={'ordering':", "2016-12-05 14:24 from __future__ import unicode_literals from django.db import migrations", "14:24 from __future__ import unicode_literals from django.db import migrations class...
[ "'boxelec': ['electrical', 'heat', 'protection', 'enabled'], 'acreq': ['autocalibration', 'required'], 'acact': ['autocalibration',", "'sppb': ['static', 'pressure', 'proportional', 'band'], 'spset': ['static', 'pressure', 'setpoint'], 'sprampst':", "\"oa\": [\"outside\", \"air\"], \"ra\": [\"return\", \"air\"]...
[ "with open(self.docword_file, \"r\", encoding=\"utf-8\") as f: for line in f:", "(line, \"@default_class\") i += 1 self.docword_file = docword_file self.log(\"UCI read", "' except BaseException: self.bow[modality] = write + ' ' self.write_doc()", "= token[1:] else: parsed = token.split(':') try: cnt = int(par...
[ "}) if para[\"beta\"] < 0: status[\"tradPoint\"][-1][\"dirc_B\"] = status[\"tradPoint\"][-1][\"dirc_A\"] self.creatTradingLog(status[\"tradPoint\"][-1], status[\"tradPoint\"][-2])", "ratio }) if para[\"beta\"] < 0: status[\"tradPoint\"][-1][\"dirc_B\"] = status[\"tradPoint\"][-1][\"dirc_A\"] self.creatTradingLog(...
[ "sendedData += len(bytesToSend) print(\"Done File\") else: ConnexionAUnClient.sendall(b\"ERR \") elif(Type_Commande==2):# commande", "transmettre le code 400 ConnexionAUnClient.send((\"400 Commande inconue = \"+Commande).encode()) ConnexionAUnClient.send(b\"--\\r\\n\\r\\n\")", "courant # os.listdir(\".\") revoi...
[ "fmt) ev.add(\"dtstart\", begin_dt) ev.add(\"dtend\", end_dt) ev.add(\"summary\", lesson['discipline']) ev.add(\"location\", vText(\", \".join([lesson['building'],", "= lesson['beginLesson'] end = lesson['endLesson'] fmt = \"%Y.%m.%d %H:%M\" begin_dt", "get_current_timetable(idxes, weeks=10): now = datetime.dat...
[ "from django.shortcuts import redirect from django.contrib.auth import logout class LoginRequiredMiddleware:", "request.path_info.lstrip('/') print(path) if path.find(\"admin/\") != -1: return None if path", "!= -1: return None if path == 'sign-out': return None", "request.session['phone_number'] except KeyEr...
[ "dataframe_label_transformer(self,data,listWidget,darwinizer_list): column_dict=defaultdict() selected_indexes=[x.row() for x in listWidget.selectedIndexes()] if not selected_indexes:", "script refresh data base #leer columnas de lista de dwc_file,", "open(f\"{self.route_destiny_label}\\dwc_terms\\df_column_dic...
[ "1 GREEN = 2 BLUE = 3 BLACK = 4", "(20 <= hsv[2] and hsv[2] <= 255): return Color.YELLOW return", "hsv[2] and hsv[2] <= 255): return Color.GREEN if (20 <=", "<= 20): return Color.BLACK if (0 <= hsv[0] and hsv[0]", "<= 255) \\ and (60 <= hsv[2] and hsv[2] <=", "if (20 <= hsv[0] and hsv[0] <= 30) \\ and", ...
[ "init='he_normal')(deconv[-1]) self.model = Model(input=inputs, output=final) self.model.load_weights(\"{0}_weights.hdf5\".format(self.root)) def validation_generator(self): f_images =", "% 32) self.model = model_from_json(json_string) self.model.load_weights(\"{0}_weights.hdf5\".format(self.root)) def defineNetw...
[ "f'{self.sandbox_url}/report/{job_id}/summary' headers = {'api-key': self.apikey, 'user-agent': self.useragent} response = requests.get(url,", "2.0 (the \"License\"); # you may not use this file", "except (JSONDecodeError, KeyError) as err: err = str(err) finally: count", "if plugin_opts and 'apikey' in plugi...
[ "= [\"a\",\"a\",\"c\",\"b\",\"d\",\"c\",\"c\",\"c\",\"d\",\"d\"] def programFun(arry_list): set_result = set(arry_list) results = {}", "# grep # tail -f # netstat # top #", "-ef | grep # sed -i \"1,2p\" nohup.log # grep", "nums+=1 results[str] = nums def programFun2(arry_list): results2 = {} count", "= 1 el...
[ "if latest_release is None: latest_release = 'master' print(\"Write index.html\") write_index_html(latest_release)", "= r'''<!DOCTYPE html> <html> <head> <meta http-equiv=\"Refresh\" content=\"0; url={default_branch}\" />", "get_versions_data, write_versions_json INDEX_HTML = r'''<!DOCTYPE html> <html> <head> <...
[ "<reponame>baldingwizard/thermostatpi<gh_stars>1-10 from subprocess import call import time image=100000 while True:", "from subprocess import call import time image=100000 while True: call([\"cp\",", "subprocess import call import time image=100000 while True: call([\"cp\", \"ramdisk/ui.png\",", "while True:...
[ "print 'Processing data from file %s' % (f_name) data =", "#[0]: for k2 in xrange(8, 240, 30): #[0]: f_list =", "gids = data[:, 0] f_rate_mean = np.zeros(gids.size) f_rate = data[:,", "* len(f_list)) plt.plot(gids, f_rate_mean, '-o', linewidth=3) plt.ylim(bottom=0.0) plt.xlabel('gid') plt.ylabel('Firing rate"...
[]
[ "from .user import Username, User # from .task import Title,", ".user import Username, User # from .task import Title, Task", "<filename>fancy_todo_list/application/entities/__init__.py from .base import RefId from .user import Username, User", "from .base import RefId from .user import Username, User #", "...
[ "Position from Sheep import Sheep from Grass import Grass if", "from Position import Position from Sheep import Sheep from Grass", "for i in range(0,10): print('-- Iteration {0} --'.format(i)) grass.move() print(grass)", "10)) sheep = Sheep(position=Position(-10, -10)) for i in range(0,10): print('--", "= S...
[ "= { 'object_list': queryset } return render(request, \"products/list.html\", context) class", "= qs.first() # else: # raise Http404(\"Product doesn't exist.\") instance", "= \"products/detail.html\" class ProductDetailSlugView(ObjectViewedMixin, DetailView): queryset = Product.objects.all() template_name =", ...
[ "this is displaying the command being issued for this compiler", "= build_system.environment.parseKey(None, '$(PRODUCT_NAME)')[1]; output_dir = build_system.environment.parseKey(None, '$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/$(CURRENT_ARCH)')[1]; path_helper.create_directories(output_dir) link_file_list =", "in e...
[ "Trees\" if counter == 0: table_per += \"\"\" \\\\begin{table*}[ht] \\\\begin{minipage}{.3\\\\textwidth}", "\\\\bottomrule \\end{tabular}} \\caption{\"\"\" +table_name+\"\"\"} \\end{minipage} \\end{table*} \"\"\" table_stat += \"\"\"", "0: table_per += \"\"\" \\\\begin{table*}[ht] \\\\begin{minipage}{.3\\\\text...
[ "'etoo s') assert(generalize_names(\"Eto'o, Samuel\") == 'etoo s') assert(generalize_names(\"Eto'o, Samuel\") ==", "Robin\", output_sep=', ') == 'vanpersie, r') assert(generalize_names(\"<NAME>\", output_sep=', ') ==", "SkipTest raise SkipTest from mlxtend.text import generalize_names def test_generalize_names(...
[ "if not file_guids: return str() module_guid = file_guids[-1].replace(\"file-\", \"\") module_name", "supported\") return False def get_unique_name(self, module_name: str) -> str: #", "section, try to get a friendly name from the GUID", "g_re_guid = re.compile( r\"file-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9...
[ "a summary file.\") target.add_argument(\"--summary\", help=\"Data is a summary file generated", "x=dfs['start_time'], y=np.log10(dfs['index'] + 1), x_ci=None, fit_reg=False, color=\"blue\", scatter_kws={\"s\": 1}) aligned_df", "def main(): args = get_args() merged_df = get_input(source=\"summary\", files=args....
[ "import Decompiler from .decompilation_options import options, options_by_category from . import", "from .clinic import Clinic from .region_simplifier import RegionSimplifier from .decompiler", ".region_simplifier import RegionSimplifier from .decompiler import Decompiler from .decompilation_options import", ...
[ "chC_MML a MML string for PSG channel C # @param", "eom = 0 #End of mml while(index_a < len(chA_seq) or", "2 if wait_c <= 0: if index_c < len(chC_seq): seq", "a MML string for PSG channel B # @param chC_MML", "0: if index_b < len(chB_seq): seq = chB_seq[index_b] wait_b =", "if wait_c > 0: wait_c -= wait t...
[ "\"0.0.4\" # N.B.: Flit uses this as our distribution version.", "Flit uses this as our distribution description. __version__ = \"0.0.4\"", "LICENSE). \"\"\"Jupyter support for Pants projects and PEX files.\"\"\" #", "description. __version__ = \"0.0.4\" # N.B.: Flit uses this as", "from IPython import Inte...
[ "if settings.MAX_FPS: self.set_update_rate(1 / settings.MAX_FPS) self.actual_fps = settings.MAX_FPS # Initializse", "length = random.randint(settings.WALL_MIN(), settings.WALL_MAX()) if random.random() < 0.5: # Horizontal", "key. \"\"\" # # if key == arcade.key.UP or key", "settings.DRAW_BASE: self.create_bas...
[ "MakeDataset(): \"\"\" A class that handles everything related to getting", "download_data() Downloads the data from Google Drive and unzips it", "'./data/raw/raw.zip', quiet=False) #with zipfile.ZipFile(path_to_zip_file, 'r') as zip_ref: # zip_ref.extractall(directory_to_extract_to) #!unzip", "datasets ... M...
[ "messagebox from tkinter import Button window = tkinter.Tk() HEIGHT =", "Width: {WIDTH}') def click_button(): msg = messagebox.showinfo(\"Hello!\", \"You clicked a", "\"You clicked a button!\") # initializing button button_widget = Button(", "= Button( window, text='Click me!', command=click_button ) # placin...
[ "self.split=='training': file_names=file_names[:int(len(file_names)*0.8)] elif self.split=='testing': file_names=file_names[int(len(file_names)*0.8):-20] self.file_names=[] self.vec=[] self.flip=[] self.lbls=[] for", "from utils.rotate_fcns import rotate_2d,rotate_3d,flip_2d class DataLoader2D(data.Dataset): def ...
[ "from core.monorepo_stack import MonorepoStack from core.pipelines_stack import PipelineStack app =", "aws_cdk import (core as cdk) from core.monorepo_stack import MonorepoStack from", "= cdk.App() core = MonorepoStack(app, \"MonoRepoStack\") PipelineStack(app, \"PipelinesStack\", core.exported_monorepo) app.sy...
[ "= 4033 Dolares = Pesos / v_Dolar Dolares = str(Dolares)", "= input(\"¿Cuántos Pesos Colombianos tiene?: \") Pesos = float(Pesos) v_Dolar", "float(Pesos) v_Dolar = 4033 Dolares = Pesos / v_Dolar Dolares", "v_Dolar Dolares = str(Dolares) print(\"Tienes $\" + Dolares + \"", "v_Dolar = 4033 Dolares = Pesos / v...
[ "Something: some_property = 3 __book_url__ = \"dummy\" __book_version__ = \"dummy\"", "<reponame>gillistephan/aas-core-codegen<gh_stars>1-10 class Something: some_property = 3 __book_url__ = \"dummy\" __book_version__", "class Something: some_property = 3 __book_url__ = \"dummy\" __book_version__ =" ]
[ "\"\"\" h = [1] s = set([1]) while n >", "int \"\"\" h = [1] s = set([1]) while n", "= heapq.heappop(h) for k in (2, 3, 5): nxt =", "= set([1]) while n > 1: now = heapq.heappop(h) for", "not in s: heapq.heappush(h, nxt) s.add(nxt) n -= 1 return", "\"\"\" :type n: int :rtype: int \"\"\" h = [1]", "now = ...
[ "img.size[0]), random.randint(0, img.size[1]) end = random.randint(0, img.size[0]), random.randint(0, img.size[1]) #", "from PIL import Image, ImageDraw config = { 'count' :", "random.randint(-180, 180), fill=rgb) elif shape == 'pieslice': draw.pieslice((*start, *end), 0,", "shape == 'pieslice': draw.pieslice...
[ "application) #app = QtGui.QApplication([]) app = QtCore.QCoreApplication.instance() if app is", "to manage the widgets size and position layout = QtGui.QGridLayout()", "Define a top-level widget to hold everything w = QtGui.QWidget()", "= np.sin(x/10)+noise plt1 = pltW1.plot(x,y, color='g') ## Create a grid"...
[ "18:32 采用无监督的方式做, 通过估算正态分布 \"\"\" from surprise import NormalPredictor from surprise", "print(traindf.columns) # A reader is still needed but only the", "from surprise import NormalPredictor from surprise import Dataset, Reader from", "surprise import NormalPredictor from surprise import Dataset, Reader from ...
[ "question_text = models.CharField(max_length=200) slug = models.SlugField(max_length=250, unique_for_date='pub_date') pub_date = models.DateTimeField('date", "status = models.CharField(max_length=10, choices=STATUS_CHOICES, default=\"draft\") created_by = models.ForeignKey(get_user_model(), on_delete=models.CASCA...
[ "difference of second and third will give the error resolved", "of second and third will give the error resolved by", "and second will give the error resolved by second round.", "difference of first and second will give the error resolved", "raw_input() # ignoring n first_errors = map(int, raw_input().split...
[ "= urllib2.ProxyHandler({\"http\": \"mr_mao_hacker:sffqry9r@172.16.31.10:16816\"}) authproxy_handler = urllib2.ProxyHandler({\"http\": \"192.168.3.11:9000\"}) # authproxy_handler =", "= \"http://www.baidu.com/\" request = urllib2.Request(url) # 获取响应 response = opener.open(request)", "# coding=utf-8 import urlli...
[]
[ "combinations s, n = input().split() for k in range(1, int(n)", "# Python > Itertools > itertools.combinations() # Print all the", "# from itertools import combinations s, n = input().split() for", "using itertools. # # https://www.hackerrank.com/challenges/itertools-combinations/problem # from itertools impo...
[ "= [format(i) for i in row] + [record_fingerprint] data_batch.append(savable) if", "satcat): log.info(\"Fixing discrepencies in the UCS data...\") # discrepencies_url =", "= val.strip() try: return int(val.replace(\",\", \"\")) except: pass try: return", "\"payload_flag\", \"ops_status_code\", \"name\", \"sou...
[ "data={ # URL 'client_id': 'your app id', # 填写app-id、app-secret、账号及密码 'client_secret':", "5.89, 'Maxload': 21000 }], 'interimContainers': [], 'loadingOptions': {}, 'interimOptions': {},", "'your app id', # 填写app-id、app-secret、账号及密码 'client_secret': 'your app secret', 'grant_type':", "'InnerZ': 5.89, 'Maxload'...
[ "Pin: def __init__(self, pin_id): self.pin_id = pin_id self.state = Off", "output = GPIO.input(self.pin_id) self.state = output return output def set(self,", "GPIO.setup(self.pin_id, GPIO.OUT) GPIO.output(self.pin_id, state) self.state = state def get(self): return", "__init__(self, pin_id): self.pin_id = pin...
[ "int(player[0]) < 14 ] return num_players def calc_playing_time(self, game_data): playing_time_mapping", "items to remove duplicate data, such as the title being", "for playing_time_max, playing_time in playing_time_mapping.items(): if not game_data[\"playing_time\"]: return 'Unknown'", "self.reimplements = l...
[ "#import socket #import struct #import bitstring from capture import *", "#import string #import socket #import struct #import bitstring from capture", "string #import socket #import struct #import bitstring from capture import" ]
[ "# 倒数第二颗牙前面只有一颗牙 end = index + 2 else: end =", "(max_area / second_max_area) < 1.2: refine[output == second_max_index + 1]", "= output_all if index <= 29: end = index +", "+ 0.001 if (inter / output_id_area) >= 0.4: refine[:, :,", "= output_all[:, :, index].reshape(1, -1) # 每一通道保存着一颗牙的分割结果 output_id_area = ...
[ "spam_0 = Spam(price=0.618, name=\"wexort\") print(spam_0.name, spam_0.price) spam_1 = Spam(\"hughluo\", 42)", "Spam(Structure): pass if __name__ == \"__main__\": spam_0 = Spam(price=0.618, name=\"wexort\")", "= price @add_signature(\"name\", \"price\") class Spam(Structure): pass if __name__ ==", "= name sel...
[ "version_filters import * from string_filters import * from datetime_filters import", "from list_filters import * from version_filters import * from string_filters", "hash_filters import * from list_filters import * from version_filters import", "import * from list_filters import * from version_filters import...
[ "second = first.shift(months=-1) second = second.format(\"YYYYMM\") first = first.shift(months=m) first", "\"\"\"get the date range of the used months\"\"\" start =", "featureName) if not os.path.exists(testDataDir): os.makedirs(testDataDir) testFile = feature + '/testing/'", "+ get_test(Date) shutil.copy(tes...
[ "= ConfigParser() g.siteconfigParser.read(FILENAME) return g.siteconfigParser def get_config(name): \"\"\" Get a", "ConfigParser from flask import g FILENAME = '/srv/oclubs/siteconfig.ini' def _done(commit=True):", "if g.get('siteconfigParser', None): return g.siteconfigParser g.siteconfigParser = ConfigParser(...
[ "self.assert_extract(' 123,456,789 ', library.comma_seperator, '123,456,789') if __name__ == '__main__': unittest.main()", "for mixed_ordinals, # we find \"5th\" and \"1st\". def test_mixed_ordinals(self):", "timezone offset -0800 def test_dates_8(self): self.assert_extract(' 2018-06-21 15:54:00.123-0800 ', lib...
[ "DataToken, data_store: T, alignment_columns: list[ColumnAlias], ) -> None: with self._db_adapter:", "= [str(col) for col in columns] if columns is not", "else None table_data = self._db_adapter.query(data_token, query, columns) store_class: Type[T] =", "cast, Optional, Type, TYPE_CHECKING, TypeVar from tanuk...
[]
[ "50503S006 MARKER NUMBER <NAME> NGS OBSERVER / AGENCY 4733K06635 TRIMBLE", "try: with NamedTemporaryFile(mode='w', delete=False) as tmp_file: tmp_file.writelines(tmp_str) tmp_file.close() tmp_file_name =", "the name of the file which holds tmp_str inside, and", "and removes the file after all. \"\"\" tmp_file...
[ "str :param device: device on which we are running inference", "Detection2DArray, queue_size=10) else: self.fall_publisher = None self.input_image_topic = input_image_topic self.bridge", "2.0 (the \"License\"); # you may not use this file", "get_bbox from opendr.perception.pose_estimation import LightweightOp...
[ "options universal = parser.add_argument_group('universal options') universal.add_argument(\"-n\", dest=\"normalized\", action=\"store_true\", help=\"Use when", "option parser usage = \"For more options type -h\" description", "defauls scripts takes 'a_b_c' from a_b_c_hittable_reads.txt as experiment name. Use"...
[ "batch_idx, data in enumerate(train_loader): contexts, questions, answers = data break", "dset_train = BabiDataset(20, is_train=True) train_loader = DataLoader(dset_train, batch_size=2, shuffle=True, collate_fn=pad_collate)", "**kav) self.__dict__ = self def pad_collate(batch): max_context_sen_len = float('-inf...
[ "def host(request): # build local ./Dockerfile subprocess.check_call(['docker', 'build', '-t', 'web',", "'run', '-d', 'web']).decode().strip() # return a testinfra connection to the", "pprint # scope='session' uses the same container for all the", "return a testinfra connection to the container yield testinfr...