ngram
listlengths
0
67.8k
[ "btn_new_libros = QtGui.QPushButton('Nuevo') btn_new_libros.clicked.connect(self.open_new_libros_window) btn_edit_libros = QtGui.QPushButton('Editar') btn_edit_libros.clicked.connect(self.open_edit_libros_window) btn_list_libros = QtGui.QPushButton('Listar') btn_list_libros.clicked.connect(self.close) btn_delete_li...
[ "IOError: print(\"Error opening file \" + file_name) exit() # Check to make sure", "two-tuple hole_cards: e.g. ((As, Ks), (Ad, Kd), (Jh, Th)) def create_hole_cards(raw_hole_cards): # Checking", "(Ad, Kd), (Jh, Th)) def create_hole_cards(raw_hole_cards): # Checking that there are an even", "error_check_argumen...
[ "of user purchased products products = get_transaction(user.email) return render_template('index.html', user=user, owned_products=user_products, orders=products) @app.route('/register',", "def update_user_get(): return render_template('updateuser.html', message='Please enter new info below:') @app.route('/updateu...
[ "serializers.CharField(source=\"non_static_bike_uuid\", read_only=True) vehicle_type_id = serializers.CharField(read_only=True) last_reported = TimestampSerializer(read_only=True) class Meta: model = Bike", "TODO: maybe configuration later representation[\"is_disabled\"] = False public_geolocation = instance.publ...
[ "BaseExtractor from anime_downloader.sites import helpers logger = logging.getLogger(__name__) class VidStream(BaseExtractor): def _get_data(self): QUALITIES", "{ \"360\":[], \"480\":[], \"720\":[], \"1080\":[], } url = self.url.replace('https:////','https://') soup = helpers.get(url).text regex", "helpers.soup...
[ "form.save() data = {'is_valid': True, 'name': document.file.name, 'url': document.file.url} else: data = {'is_valid':", "request.session['sum_words'] = sum_words else: pass else: pass return redirect('sum_v1:summarize') def clear_database(request): for document", "def get(self, request): for document in File_u...
[ "integrate # pylint: disable=invalid-name ActiveConnection = connection.ActiveConnection BASE_COMMAND_MESSAGE_SCHEMA = messages.BASE_COMMAND_MESSAGE_SCHEMA error_message = messages.error_message", "bind_hass from . import commands, connection, const, decorators, http, messages DOMAIN = const.DOMAIN", "messages....
[ "\"postgres\", \"PASSWORD\": \"admin\", \"HOST\": \"localhost\", \"PORT\": \"5432\", } } # Password validation #", "on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS", "Created on Tue Dec 21 2021 # # Copyright (c) 2021 Lenders Cooperative,", "this file, see https://docs...
[ "query['criteria'] is_valid, errors = validate(query, 'searchQuery', 'ppr') if errors: for err in errors:", "for err in errors: print(err.message) print(errors) assert not is_valid def test_invalid_search_query_criteria(): \"\"\"Assert that", "print(err.message) print(errors) assert not is_valid def test_invali...
[ "decorators \"\"\" __author__ = '<NAME>' import re import time import itertools import logging", "Module to contain Pywork decorators \"\"\" __author__ = '<NAME>' import re import time", "= '<NAME>' import re import time import itertools import logging log = logging.getLogger(__name__)", "Pywork decorators \"...
[ "# Python 2.x compatibility - cast __name__ to str method.__name__ = str(name) getattr(test_action.mapping,", "Response({}) request = self.factory.put('/') response = view(request) assert response.status_code == status.HTTP_200_OK request =", "should raise an assertion. \"\"\" with self.assertRaises(AssertionEr...
[ "import codecs import json import tamil import sys import os #e.g. python morse_encode.py", "fp: codebook = json.loads(fp.read()) output = [codebook.get(l,l) for l in tamil.utf8.get_letters(text)] return u\"", "#(C) 2018 <NAME> # This file is part of Open-Tamil project # You", "<NAME> # This file is part of O...
[ "= 0 while cnt: counter += 1 cnt = cnt.next for _ in", "= next class Solution: def swapNodes(self, head: Optional[ListNode], k: int) -> Optional[ListNode]: if", "# class ListNode: # def __init__(self, val=0, next=None): # self.val = val #", "_ in range(k - 1): slow = slow.next for _ in range(counter -", "ar...
[ "reorged_txids, reorg_height), MAX_WAIT_TIME) except asyncio.TimeoutError: logger.exception(f\"timed out after {MAX_WAIT_TIME} seconds\") raise class TestReorg:", "electrumsv_node.is_node_running(): utils.submit_blocks_from_file(node_id='node1', filepath=Path(MODULE_DIR).joinpath('../reorg_blocks/node1_blocks.dat...
[ "ball is in the cup \"\"\" for i in range(self.sim.data.ncon): # Get current", "ball and cup) state_shape = np.concatenate([self.init_qpos, self.init_qvel, np.empty(3), np.empty(3)]).shape state_lo, state_up = np.full(state_shape,", "the robot ball_collided = self.check_ball_collisions() if self.stop_on_collisi...
[ "ungrib from metgrid import metgrid from prepare_wrf import prepare_wrf from real import real", ": # Python 3 # pip install pyyaml # pip install request #", "# pip install f90nml from downloadGFSA import downloadGFSA from prepare_wps import prepare_wps from", "downloadGFSA from prepare_wps import prepare_wps ...
[ "BaseStrategy pd.set_option(\"display.max_columns\", None) pd.set_option(\"display.width\", None) class EMABBAlligatorStrategy(BaseStrategy): BUY_SIGNAL = \"buy_signal\" SELL_SIGNAL = \"sell_signal\"", "pd.set_option(\"display.max_columns\", None) pd.set_option(\"display.width\", None) class EMABBAlligatorStrateg...
[ "not Alice, grannie.') # Loops in Python 3 spam = 0 while spam", "+ \"_342\" # Getting input input_from_user = input() # Basic print function print(input_from_user)", "6): print(\"True\") # Basic if & if else flow if name == 'Alice':", "spam < 5: print('Spam, spam!') spam = spam + 1 # Access loop", "you?') ...
[ "DATABASE_OPTIONS = { 'database': 'klazor', 'user': 'root', 'password': '', 'charset': 'utf8mb4', } HOSTS", "<filename>env.example.py DATABASE_OPTIONS = { 'database': 'klazor', 'user': 'root', 'password': '', 'charset': 'utf8mb4', }", "= { 'database': 'klazor', 'user': 'root', 'password': '', 'charset': 'utf8mb...
[ "Generated by 'django-admin startproject' using Django 2.2.4. For more information on this file,", "{ #'ENGINE': 'django.db.backends.oracle' #'ENGINE': 'django.db.backends.mysql', #'ENGINE': 'django.db.backends.sqlite3', 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'mydatabase', 'USER': 'mydatabaseuser',", ...
[ "from .models import Contact class ContactForm(forms.ModelForm): class Meta: model = Contact fields =", "ContactForm(forms.ModelForm): class Meta: model = Contact fields = ('name', 'number', 'email', 'category', 'description')", "import forms from .models import Contact class ContactForm(forms.ModelForm): class...
[ "name='ad_hoc_command_cancel'), re_path(r'^(?P<pk>[0-9]+)/relaunch/$', AdHocCommandRelaunch.as_view(), name='ad_hoc_command_relaunch'), re_path(r'^(?P<pk>[0-9]+)/events/$', AdHocCommandAdHocCommandEventsList.as_view(), name='ad_hoc_command_ad_hoc_command_events_list'), re_path(r'^(?P<pk>[0-9]+)/activity_stream/$', ...
[ "#test.py from time_tools import * # print(compareTimestamp(111,222)) time.showNowTime() # now time is XX:XX:XX" ]
[ "= 0 self._update_direction(FACE_RIGHT, self.stand_right_texture) self.textures = [self._texture] def _update_direction(self, state, texture): self.last_texture_change_center_x =", "list): if abs(delta) >= self.texture_change_distance: self.cur_texture_index += 1 self.last_texture_change_center_x = self.center_x ...
[ "upper_limit x_merge = concatenate((init_x, follow_x)) y_merge = concatenate((init_y, follow_y)) self.mmodel = deepcopy(self.regressor) self.mmodel.fit(x_merge,", "copy import deepcopy from numpy import random, concatenate, quantile, matmul, transpose import logging", "from copy import deepcopy from numpy impor...
[ "from sds.distributions.lingauss import SingleOutputLinearGaussianWithKnownPrecision from sds.distributions.lingauss import SingleOutputLinearGaussianWithKnownMean from sds.distributions.gaussian import GaussianWithPrecision from", "betas=betas) posterior = deepcopy(prior) likelihood = LinearGaussianWithDiagonalP...
[ "= cfd.read().split('\\n') for ln in raw: if not ln: continue ts, color =", "= defaultdict(lambda:0) for v in g.vertices(): for a in agents: D[f't{v}', a] =", "= g.new_vertex_property(\"string\", '#e0e0e0') g.vertex_properties['icolor'] = g.new_vertex_property(\"int\") g.vertex_properties['output_size'] = g.new...
[ "self.project.disable_project_robot_account(TestProjects.project_ra_id_a, robot_id, True, **TestProjects.USER_RA_CLIENT) print \"#13. Pull image(ImagePA) from project(PA) by robot account(RA),", "required\") print \"#15. Delete robot account(RA), it must be not successful.\" self.project.delete_project_robot_acco...
[ "= Locale.parse(settings.FALLBACK_LOCALE) return my_locale @staticmethod def _determine_timezone( my_tz: pytz.BaseTzInfo = None, author_info: dict", "str: \"\"\"returns formated datetime string for given dt using locale\"\"\" return format_datetime(my_datetime, format=\"short\",", "TypeError(\"my_tz must be of ...
[ "to screen MAX_CONTENT_LENGTH = 1024 * 1024 * 1024 DEBUG = False TESTING", "MAIL_USERNAME = os.getenv('DATABOARD_MAIL_USERNAME', 'user') MAIL_PASSWORD = os.getenv('DATABOARD_MAIL_PASSWORD', 'password') MAIL_DEFAULT_SENDER = ( os.getenv('DATABOARD_MAIL_SENDER_ALIAS', 'RAMP", "os.getenv('DATABOARD_MAIL_SENDER_ALI...
[ "dimensions should be squeezed \"\"\" def __init__(self, flatten: bool = False) -> None:", "whether spatial dimensions should be squeezed \"\"\" def __init__(self, flatten: bool = False)", "None: super().__init__() self.flatten = flatten def forward(self, x): if self.flatten: in_size = x.size()", "flatten: bo...
[ "import tempfile import ssl from shutil import rmtree import atexit import json from", "'' return pytest.mark.skipif(val, reason=reason) def _has_scipy_version(version): return (LooseVersion(sp.__version__) >= LooseVersion(version)) def _get_user_home_path(): \"\"\"Return", "for key, param in params.items() if ...
[ "__init__(self): self.interrupt = False signal.signal(signal.SIGTERM, self._signal_handler) signal.signal(signal.SIGINT, self._signal_handler) def _signal_handler(self, sign, frame): self.interrupt", "signal class KillableProcess(object): def __init__(self): self.interrupt = False signal.signal(signal.SIGTERM, se...
[]
[ "can patch # the linecache module to still recover it. # using exec_with_source", "will be copied over from the respective place within `root`'s Module hierarchy into", "'call_module']: assert isinstance(node.target, str) _copy_attr(root, self, node.target) elif isinstance(root, dict): targets_to_copy = []", ...
[ "path, 'file' ) elif entry['action'] == 'request-file': self.send('file', { 'path': entry['path'], 'action': 'send'", "{0}, data:\\n{1}', route, data) if route in self.routes: self.routes[route].handle(data, self) else: log.error(\"Data received", "log.info_v('Handling {0}, data:\\n{1}', route, data) if route i...
[ "hover.utils.metrics import classification_accuracy import numpy as np def test_classification_accuracy(): true = np.array([1, 2,", "5, 6, 7, 8]) accl = classification_accuracy(true, pred) accr = classification_accuracy(pred, true) assert", "8]) accl = classification_accuracy(true, pred) accr = classification_a...
[ "for additional information and resources. # # This software is released under the", "\"libglib\", \"libgobject\", \"libglapi\", \"libffi\", \"libfontconfig\", \"libutil\", \"libpython\", \"libxshmfence.so\" ] def plugin_extension(self): return \".so\"", "in glob.glob(input_pattern): shutil.copy(input_file, out...
[]
[ "[ 'wagtailkatex/katex/katex.min.css', ] } ) ) features.register_converter_rule('contentstate', feature_name, { 'from_database_format': {'div[data-katex-embed]': KaTeXEntityElementHandler()}, 'to_database_format':", "js=[ 'wagtailkatex/katex/katex.min.js', 'wagtailkatex/wagtailkatex.js', ], css={ 'all': [ 'wagtai...
[ "0: [(\"topic_partitions\", ArraySerializer(topicPartitionSerializers[0])), (\"timeout_ms\", int32Serializer)] } electPreferredLeadersRequestDataSerializers: Dict[int, ClassSerializer[ElectPreferredLeadersRequestData]] = { version: ClassSerializer(ElectPreferredLeadersRequestData,", "for version, schema in topicP...
[ "indent=4, separators=(',', ':'))) return False # ------------------------ Tests ------------------------------------- @attr(all=False) class api20_bootstrap_windows(fit_common.unittest.TestCase): @classmethod", "documented here: https://github.com/RackHD/on-tools/tree/master/winpe - Samba installed on the RackHD...
[ "number = random.randint(lowerLimit, upperLimit) text = render_template('random_number', lowerLimit=lowerLimit, upperLimit=upperLimit, number=number) return statement(text).simple_card('Flask-Ask Random", "import Flask, render_template from flask_ask import Ask, statement import random app = Flask(__name__)", "...
[ "accurate, and use them to teach the student. distill_mask = (student_error > teacher_error", "is the sum of the distillation losses at 2 directions. loss_distill += Ws[i]", "h, w = t.size() inner = torch.ones(n, 1, h - 2 * padding,", "+ dxdy.abs().mean() + dydx.abs().mean() + dy2.abs().mean() else: smooth_lo...
[ "12., 0], (0., 0., 0.5, 0.5)) # create 6 robots self.robots = []", "3., 0], (0., 0., 0., 1.)) # wallId = p.loadSDF(\"../models/walls.sdf\")[0] # p.resetBasePositionAndOrientation(wallId, [-5.,", "0.5, 0.5)) self.ball2 = p.loadURDF(\"../models/ball2.urdf\") p.resetBasePositionAndOrientation(self.ball2, [4., 2., ...
[ "for this Load Balancer. \"\"\" params = {'LoadBalancerName': load_balancer_name} self.build_list_params(params, zones_to_remove, 'AvailabilityZones.member.%d') obj", "request. If so, the load balancer sends the request to the application server", "name of the Load Balancer :type security_groups: List of string...
[ "subcommand subp = subparsers.add_parser('get-family', help='Output the family of a basis set') subp.add_argument('basis', help='Name", "type=str, help='Basis set file to convert') subp.add_argument('output_file', type=str, help='Converted basis set file') subp.add_argument('--in-fmt',", "help='Output a list al...
[ "j] = False j += 1 for i in range(left, right+1): if array[i]:", "j = 2 while i * j <= right: array[i * j] =", "range(2, int(math.sqrt(right)) + 1): if array[i] == True: j = 2 while i", "int(math.sqrt(right)) + 1): if array[i] == True: j = 2 while i *", "= 0 for i in range(2, int(math.sqrt(right)) + 1): if ...
[ "def test_conv(self): test_conv(1, 4, 3, 1, 3, 1, 1, b\"SAME\", [1, 2, 3,", "offset_constant_name, value=[1, 2, 3, 4, 5, 6], dtype=dtypes.float32, shape=[6]) float_graph_def.node.extend([offset_constant]) bias_add_node = quantize_graph.create_node(", "in output_names]) for expected, result in zip(float_results,...
[ "models import django.db.models.deletion import giscube.utils class Migration(migrations.Migration): initial = True dependencies = [", "models.CharField(blank=True, max_length=100, null=True)), ('description', models.TextField(blank=True, null=True)), ('keywords', models.CharField(blank=True, max_length=200, null...
[ "Display the Rarity of the Item typeconfig = { \"BannerToken\": True, \"AthenaBackpack\": True,", "True # <- Display the Rarity of the Item typeconfig = { \"BannerToken\":", "= \"https://storage.needpix.com/rsynced_images/colored-background.jpg\" # <- Need to be a Image URL!!! lang = \"en\"", "lang = \"en\" #...
[ "= Connection(settings.HV_APPID, settings.HV_SERVICE_SERVER) conn.thumbprint = settings.APP_THUMBPRINT conn.publickey = settings.APP_PUBLIC_KEY conn.privatekey = settings.APP_PRIVATE_KEY conn.connect()", "Connection(settings.HV_APPID, settings.HV_SERVICE_SERVER) conn.thumbprint = settings.APP_THUMBPRINT conn.publ...
[ "coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-06-09 03:01 from __future__", "on 2017-06-09 03:01 from __future__ import unicode_literals from django.db import migrations, models class", "import migrations, models class Migration(migrations.Migration): dependencies = [ ('extensions', '0011_auto_2017050...
[ "= 0 B = 0 C = 0 def test_globals(): global A, B,", "range(THREADS): t = threading.Thread( target=test_globals, args=() ) t.start() threads.append( t ) for t", "+= 1 B += 2 C = A + B lock.release() def main():", "range(1024*1024): lock.acquire() A += 1 B += 2 C = A + B", "[] for i in range(THREADS): t = thr...
[ "if self.are_same_and_non_zero(self.board[:, i]): # self.player_who_won = self.board[0, i] # self.result = 'Won {}", "np.any(np.unique(self.board) == 0) def is_finished(self): \"\"\"is game finished\"\"\" return True # for i", "# print(self.players_board) return # def player(self, player_no): # if player_no == ...
[ "other_thing_price_week = price[thing]['week'] * amount other_thing_price_month = price[thing]['month'] * amount return f'Стоимость составит", "thing == 'wheel': wheel_price = price[thing]['month'] * amount return f'Стоимость составит {wheel_price}/месяц' else:", "price[thing]['week'] * amount other_thing_price...
[ "event.type == pygame.KEYDOWN ) \\ or ( event.type == pygame.KEYUP ) : self.trigger_key_event(", "seeing how to poll the keys mods = pygame.key.get_mods() mod_bits = [ (", "#========================================================================= def trigger_key_event( self, event ): \"\"\" Initiates key input...
[ "= [ ('Authentication', '0003_auto_20201113_2210'), ] operations = [ migrations.AlterField( model_name='profiles', name='Qu_Shares', field=models.IntegerField(default=0), ),", "Django 3.0.6 on 2020-11-15 09:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies", "class ...
[ "'dashboard' urlpatterns = [ path('', MotorDataListView.as_view(), name='dashboard_custom'), #path('', dashboard_custom, name='dashboard_custom'), path('energy', dashboard_energy, name='dashboard_energy'),", "dashboard_cost, dashboard_energy, MotorDataListView app_name = 'dashboard' urlpatterns = [ path('', Motor...
[ "= input(\"Enter Hours:\") rate = input(\"Enter rate:\") pay = float(hrs) * float(rate) print(\"Pay:", "Hours:\") rate = input(\"Enter rate:\") pay = float(hrs) * float(rate) print(\"Pay: \" +str(pay))", "input(\"Enter Hours:\") rate = input(\"Enter rate:\") pay = float(hrs) * float(rate) print(\"Pay: \"", "h...
[ "\"V26\", \"LA09_N\" : \"W26\", \"LA13_P\" : \"AA20\", \"LA13_N\" : \"AB20\", \"LA17_CC_P\" : \"AA32\",", "\"AM24 AN23 AN24 AP23 AP25 AN22 AP24 AM22\", \"AH28 AK26 AK28 AM27 AJ28", "AP1\")), Subsignal(\"tx_p\", Pins(\"AC4 AE4 AG4 AH6 AK6 AL4 AM6 AN4\")), Subsignal(\"tx_n\", Pins(\"AC3 AE3", "litex.build.gener...
[ "holding = np.array(holding) holding[holding == '.'] = 0 holding[holding == '#'] = 1", "numpy as np import math # In[2]: fileObj = open('../data/advent_of_code_input_day_three.txt', \"r\") #opens the", "#puts the file into an array. # In[3]: #print (items) def split(line): return", "= np.tile(basedata, math.c...
[ "imageFile in os.listdir(self.IMAGES_PARENT_FOLDER)\\ if os.path.isfile(os.path.join(self.IMAGES_PARENT_FOLDER,imageFile))] except: print(traceback.print_exec()) return self.listFiles if __name__ == '__main__':", "'': self.IMAGES_PARENT_FOLDER = path try: self.listFiles = [os.path.join(self.IMAGES_PARENT_FOLDER,i...
[ "set.\") sys.exit(1) SECRET_KEY = os.environ.get(\"BEPASTY_SECRET_KEY\", None) if SECRET_KEY is None: print(\"\\n\\nEnvironment variable BEPASTY_SECRET_KEY", "str(err)) sys.exit(1) try: max_body_size = os.environ.get(\"BEPASTY_MAX_BODY_SIZE\", 1040384) MAX_BODY_SIZE = int(max_body_size) except ValueError as", "...
[ "s.match.end())) return cb @lru_cache() # it's intended for this to be global def", "import StringIO import re import tokenize import os from collections import deque, ChainMap", "v[1:])), (r'\\${( \\\\. | [^\\\\}]+ )+}', t('EXPR', lambda v: v[2:-1])), (r'[|<>^]+', t('OP')), (r'[A-Za-z0-9_%*+:.,=/@~\\[\\]{}-]+'...
[ "an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND,", "distributed on an # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY", "express or implied. See the License for the # specific language governing permissions", "specific language governing permissions and limitations # under the...
[ "\" \"to stop the otherworldly threat.\") ghostbusters.poster_url = (\"https://upload.wikimedia.org/wikipedia/\" \"en/3/32/Ghostbusters_2016_film_poster.png\") ghostbusters.trailer_url = \"https://www.youtube.com/watch?v=w3ugHP-yZXw\"", "\"weaponized suit of armor to fight evil.\") ironman.poster_url = (\"https:/...
[ "QtWidgets.QLabel(self.centralwidget) self.label_4.setObjectName(\"label_4\") self.horizontalLayout.addWidget(self.label_4) self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_2.setObjectName(\"lineEdit_2\") self.horizontalLayout.addWidget(self.lineEdit_2) self.line_2 = QtWidgets.QFrame(self.cen...
[ "cube(number): return number*number*number digit = input(\" the cube of which digit do you", "number*number*number digit = input(\" the cube of which digit do you want >\")", "input(\" the cube of which digit do you want >\") result = cube(int(digit))", "return number*number*number digit = input(\" the cube o...
[ "mock import patch from proofreader.runner import run, _run_command def test_it_will_return_1_exit_code_on_failure(bad_py_file): try: run(targets=[bad_py_file.strpath]) except", "as exception: assert exception.code == 0 def test_run_command_will_return_a_bool(): with patch('proofreader.runner.Popen') as mock_pope...
[ "def add(self, *mobjects): if self in mobjects: raise Exception(\"Mobject cannot contain self\") self.submobjects", "for submod in self.submobjects: if isinstance(submod, GroupContainer): submod.remove(mobject) elif mobject == submod: self.submobjects.remove(mobject)", "Is it really better to name it submobject...
[ "= cur.fetchone() db.commit() cur.close() return result except Exception as e: print(e) def get_works_list(articles):", "def get_works_list(articles): res = {} for i in range(0, len(articles)): id = articles[i][0]", "sql = \"SELECT * FROM article_works WHERE works_staff='%s' AND works_type=%s AND is_finished='Y...
[ "\\ .option(\"endingOffsets\", \"latest\") \\ .load() purchase_events = raw_events \\ .select(raw_events.value.cast('string').alias('raw'), raw_events.timestamp.cast('string')) \\ .filter(is_purchase('raw'))", "json.loads(event_as_json) if event['event_type'] == 'purchase_sword': return True return False def main...
[ "pysz import compress, decompress def test_compress_decompress(): a = np.linspace(0, 100, num=1000000).reshape((100, 100, 100)).astype(np.float32)", "numpy as np from pysz import compress, decompress def test_compress_decompress(): a = np.linspace(0,", "decompress def test_compress_decompress(): a = np.linspace...
[ "sparkdq.outliers.params.OutlierSolverParams import OutlierSolverParams from sparkdq.outliers.OutlierSolver import OutlierSolver class KSigmaParams(OutlierSolverParams): def __init__(self, deviation=1.5): self.deviation", "import OutlierSolverParams from sparkdq.outliers.OutlierSolver import OutlierSolver class K...
[ "severity = 'critical' else: severity = 'ok' return Alert( resource=payload['culprit'], event=payload['event']['event_id'], environment=environment, severity=severity,", "severity = 'ok' return Alert( resource=payload['culprit'], event=payload['event']['event_id'], environment=environment, severity=severity, serv...
[ "headers = [(\"Content-type\", \"text/html;charset=shift-jis\")] # Shift-JIS bytes for katakana TE SU TO ('test')", "[(\"Content-type\", \"text/html;charset=shift-jis\")] # Shift-JIS bytes for katakana TE SU TO ('test') content =", "# Shift-JIS bytes for katakana TE SU TO ('test') content = chr(0x83) +", "+ c...
[ "which sends email via the Gmail API', classifiers=[ 'Intended Audience :: Developers', 'License", "re from setuptools import setup, find_packages import sys if sys.version_info < (3, 5):", "author_email=\"<EMAIL>\", license=\"Apache License 2.0\", entry_points={ 'console_scripts': [ 'gmail_oauth2 = gmailapi_ba...
[ "if necessary.\" ) ) parser.add_argument( \"-c\", \"--config\", metavar=\"path_to_config_dir\", default=config_util.get_default_config_dir(), help=\"Directory that contains the", "exists.\"\"\" import argparse import os import openpeerpower.config as config_util from openpeerpower.core import OpenPeerPower", "c...
[ "S = list(input()) if len(set(S)) == 2: if S.count(S[0]) == 2: print(\"Yes\") quit()", "# https://atcoder.jp/contests/abc132/tasks/abc132_a # implementation S = list(input()) if len(set(S)) == 2: if S.count(S[0])", "# implementation S = list(input()) if len(set(S)) == 2: if S.count(S[0]) == 2:", "https://atco...
[ "plot(data, target_col=1) def test_large_ordinal(): # check that large integers don't bring us down", "100 \"target\": np.random.randint(low=50, high=100, size=200) } ) # append single outlier record with", "first column is low_card_int assert (detect_types(data).T.idxmax() == ['low_card_int', 'categorical']).a...
[ "there are ties, try to break them at fewer comparisons if len(paretto_optimal) >", "file with open(self._input_file) as data_file: experiments_object = json.load(data_file) # Sort all the configurations", "for it in dict_list[0]: if not (it in rank_list_bad): paretto_optimal.append(it) # If there", "(c) 2017...
[ "line.index('\"', start) start = p+1 if line[p-1] != '\\\\': if last_pos is None:", "errors tree = errors cmds.pop() cmds.pop() cmds_svg[-1] = tmp_dot try: p = sub.Popen(cmds_svg,stdout=sub.PIPE,stderr=sub.PIPE)", "last_pos = None parts = [] while line.find('\"', start) > -1: p =", "cmds = generate_ast_comman...
[ "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,", "self.model.load_weights(self.weights_path, weights_type = 'yolo') def predict(self, img:np.ndarray, output_path:str, iou = 0.45, score =", "'handbag', 27: 'tie', 28: 'suitcase', 29: 'frisbee', 30: 'skis', 31: 'snowboard', 32: ...
[ "self.client.loop_forever() class MQTTSubscriber: def __init__(self, *args, **kwargs): super(MQTTSubscriber, self).__init__(*args, **kwargs) class MQTTPublisher: def", "port): host = host port = port client = mqtt.Client() def connect(): self.client.connect(self.host,", "client = mqtt.Client() def connect(): se...
[ "np import os csv_source = \"scripts/spacy_files/data/thesis_200_with_school.csv\" df = pd.read_csv(csv_source) df = df[df['isScan']==False] df", "import main import spacy import json from spacy import displacy import unidecode import", "python from black import main import spacy import json from spacy import d...
[ "if num_updates is None and num_episodes is None and num_timesteps is None: num_updates", "KIND, either express or implied. # See the License for the specific language", "Unless required by applicable law or agreed to in writing, software # distributed", "name is None: sys.stdout.write('\\n{} {}: '.format( da...
[ "\"\"\"init module for reveal app\"\"\" # pylint: disable=invalid-name default_app_config = \"mspray.apps.reveal.apps.RevealConfig\" # noqa" ]
[ "description = models.TextField(blank=True) audit_log = AuditLog() #icon = models.ImageField(upload_to='images', blank=True) def __str__(self): return", "models.TextField(blank=True) audit_log = AuditLog() #icon = models.ImageField(upload_to='images', blank=True) def __str__(self): return self.name class", "mod...
[ "# Generated by Django 2.2.5 on 2019-09-25 00:12 from django.db import migrations class", "Generated by Django 2.2.5 on 2019-09-25 00:12 from django.db import migrations class Migration(migrations.Migration):", "migrations class Migration(migrations.Migration): dependencies = [ ('arm', '0001_initial'), ] operat...
[ "Thread(target=save_to_file, args=(str(path+filename),str(file_content))) x.start() x.join() file_content = [] if cv2.waitKey(1) & keyboard.is_pressed('d'): print('you pressed", "if cv2.waitKey(1) & keyboard.is_pressed('w'): print('you pressed w - service it was!') time.sleep(0.5) path", "for pose in poses[0]: ...
[ "+ uuid.uuid4().hex, 'max_memory': random.randint(1, 65535), 'used_memory': random.randint(1, 65535), 'cmd_get_count': random.randint(1, 65535), 'cmd_set_count': random.randint(1,", "Unless required by applicable law or agreed to in writing, software # distributed", "for the specific language governing permissi...
[ "as _expr from . import tensor as _tensor from . import schedule as", "import make as _make from . import expr as _expr from . import", ". import schedule as _schedule from . import container as _container from .", "from . import container as _container from . import tag as _tag int8", "import tag as _tag i...
[ "print(self._return_sr_record(multi_atk_records)) if self._accumulate_multi_atk_records: self._update_multi_atk_records(multi_atk_records) return final_images def _clear_multi_atk_records(self): self._multi_atk_records = [0.0] def _covert_to_success_rates(self,", "= True for i, attack in enumerate(self.attacks): ...
[ "copy of Mulan PSL v2 at: # # http://license.coscl.org.cn/MulanPSL2 # # THIS SOFTWARE", "(25000-26000)\\n\" + output def doSet(self): pidList = [] cmd = \"netstat -apn| grep", "\"netstat -apn | grep 'tcp' \" \\ \"| grep 'LISTEN'| awk -F '", "to kill process.Error:%s\\n\" % output self.result.val += \"The cmd ...
[ "DIST / \"sdist\"], cwd=str(pkg)) try: _run([*CONDA_BUILD_ARGS, \"--skip-existing\", \".\"], cwd=ROOT / \"recipes\") except: for", "import ROOT, PY_SRC, _run, PY, DIST CONDA_ORDER = [ \"core\", \"html\", \"lab\", \"datagrid\",", "import sys from . import ROOT, PY_SRC, _run, PY, DIST CONDA_ORDER = [", "subproc...
[ "3 & v elif 1 == e: e = 2 d += int2char(c", "f\"-----BEGIN PUBLIC KEY-----\\n{j_rsakey}\\n-----END PUBLIC KEY-----\" pubkey = rsa.PublicKey.load_pkcs1_openssl_pem(rsa_key.encode()) result = b64tohex((base64.b64encode(rsa.encrypt(f'{string}'.encode(), pubkey))).decode()) return", "(response.json().has_key('descr...
[ "cgnum_per_read.append(sum(cg)) if cg[0]>0 and cg[1]>0: reads_cg_num[2]+=1 continue if cg[0]>0: reads_cg_num[0]+=1 else: reads_cg_num[1]+=1 #print", "reads_cg_num=[0,0,0] #CG,cg,Cg cgnum_per_read=[] with pysam.AlignmentFile(args.bamfile) as f: for line in f: #t =", "with pysam.AlignmentFile(args.bamfile) as f: ...
[ "content if \"body\" in context: context[\"body\"] = wrap_tables(context[\"body\"]) def setup(app): \"\"\"Entry point for", "doctree): if app.config.html_theme != \"furo\": return # Custom Navigation Tree (adds checkboxes and", "checkboxes and labels) toctree = context.get(\"toctree\", lambda **kwargs: \"\") to...
[ "# # Licensed under the Apache License, Version 2.0 (the \"License\"); # you", "writing, software # distributed under the License is distributed on an \"AS IS\"", "parser = common.get_cmd_line_parser(description=__doc__) common.ParserArguments.filename(parser) common.ParserArguments.length(parser) common.Parser...