seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
;//iY
return/*3ASwHB*/ 1636944560 ;
if(true ){
}else
for(int /*x8*/ i=1;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.limit = limit
@classmethod
def from_dict(cls, params: Dict):
return cls(offset=params.get('offset', 0),
limit=params.get('limit', 10))
class Sort:
__slots__ = ['by']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>shortest-distance-to-a-character.cc
#include <vector>
#include <string>
#include <algorithm>
class Solution
{
public:
std::vector<int> shortestToChar(std::string &s, char c)
{
int left = 0, right = 0;
std::vector<int> res(s.size(), 0);
while (right < s.size())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""turn heading cell into corresponding markdown"""
cell.cell_type = "markdown"
level = cell.pop('level', 1)
cell.source = '#' * level + ' ' + cell.source
def raw_to_md(cell):
"""let raw passthrough as markdown"""
cell.cell_type = "markdown"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
return false;
}
}
class sRequest
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"BLACK": (0, 0, 0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
await service.AddNewsletterSubscription(_contact.Email, _newsletterSubscription.ChannelName, _contact.FirstName, _contact.LastName);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import unittest
from azure_devtools.scenario_tests import AllowLargeResponse
from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, RoleBasedServicePrincipalPreparer)
TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
class AppserviceKubernetesScenarioTest(ScenarioTest):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
print("player_id=%i has no data"%player_id)
return 0
def get_player_data_status(player_id):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# versions: 4.0
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 4.0
# resources: None
substitutions_1 = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
include_package_data=True,
entry_points={"console_scripts": ["md2md=bridgemetadata.convert:main"]},
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
void IWebViewDelegate.LoadUrl(string? url)
{
WebView.LoadUrl(url ?? string.Empty);
}
void OnFocused(object? sender, EventArgs e)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""1/1 adventofcode"""
with open("input.txt", "r", encoding="UTF-8") as i_file:
data = list(map(int, i_file.read().splitlines()))
values = ["i" if data[i] > data[i - 1] else "d" for i in range(1, len(data))]
print(values.count("i"))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# 输出: 2
# 说明:已知学生0和学生1互为朋友,他们在一个朋友圈。
# 第2个学生自己在一个朋友圈。所以返回2。
# 注意:
# N 在[1,200]的范围内。
# 对于所有学生,有M[i][i] = 1。
# 如果有M[i][j] = 1,则有M[j][i] = 1。
class Solution(object):
def findCircleNum(self, M):
"""
:type M: List[List[int]]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CREDENTIALS_PATH_BUCKETS="../credentials/tynr/engine/bucketAccess.json"
CREDENTIALS_PATH_FIRESTORE = '../credentials/tynr/engine/firestoreServiceAccount.json'
INGESTION_COLLECTION = "tyns"
INGESTION_BATCH_LIMIT = 1000 | ise-uiuc/Magicoder-OSS-Instruct-75K |
return [convert(element) for element in input]
elif isinstance(input, unicode):
return input.encode('utf-8')
else:
return input
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif a[i] < b[j]:
res.append(a[i])
i += 1
else:
res.append(b[j])
j += 1
if i < j:
res.append(a[-1])
elif i > j:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
t2 = threading.Thread(target=start_train_center)
t2.daemon = True
t2.start()
admin_config = config['admin']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"$count": "uniques"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
enemySighted = false;
if (isPlayer)
{
//Enemy out of sight, trigger for animation blend tree
if (characterAnimator != null)
{
characterAnimator.SetBool("EnemySighted", enemySighted);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import re
import six
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class Bot {
public static void main(String[] args) {
final GatewayDiscordClient client = DiscordClientBuilder.create(args[0])
.build()
.login()
.block();
final long guildId = Long.parseLong(args[1]); // My Testing server
// final long guildId = Long.parseLong(System.getenv("SERVER... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__=='__main__':
martinho = Mutante(nome='Martinho')
rennan = Homem(martinho, nome='Rennan')
print(Pessoa.cumprimentar(rennan))
print(id(rennan))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
protected Sandbox2hireRestApiConfiguration Configuration { get; private set; }
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
use ConfirmsPasswords;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
-e LANG=C.UTF-8 \
--net=host \
prepare-free-parallel-corpora bash
bash
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if self.l1:
regularization += K.sum(self.l1 * K.abs(x))
if self.l2:
regularization += K.sum(self.l2 * K.square(x))
return regularization
def get_config(self):
return {'name': self.__class__.__name__,
'l1': float(self.l1),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
required.add_argument('--output',
required=False,
metavar='FILE',
type=ap.FileType('w'),
help='The name of the output contact-file')
args = parser.parse_args(argv)
contacts, total_frames = parse_contacts... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>Codeforces Problems/Add Odd or Subtract Even/Add Odd or Subtract Even2.py
b=13
print(b and((b<0)&b|(b>0)&~b)+1) | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
Invalidates a document in the cached_core caching framework.
"""
_get_cache_processor().process_doc(document.to_json(), deleted)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Test
void toVoidResult_success_shouldCreateEmptyVoidResult() {
Result<String, String> result = Result.success("Success");
VoidResult<String> voidResult = result.toVoidResult();
voidResult.consumeEither(
() -> {},
err -> fail("Should not be error")
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
hist_struct['scenes_abs_80'] = hist_abs[0][4]
hist_struct['scenes_abs_100'] = hist_abs[0][5]
result_list.append(hist_struct)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
y = np.linspace(0, 1, num=self.resolution, endpoint=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#
# Name : make_tok.py
# Purpose : Create tokenisation test.
# Date : 12th June 2019
| ise-uiuc/Magicoder-OSS-Instruct-75K |
);
mb(1, 1,
ma(0, 2) * ma(2, 3) * ma(3, 0) - ma(0, 3) * ma(2, 2) * ma(3, 0) +
ma(0, 3) * ma(2, 0) * ma(3, 2) - ma(0, 0) * ma(2, 3) * ma(3, 2) -
ma(0, 2) * ma(2, 0) * ma(3, 3) + ma(0, 0) * ma(2, 2) * ma(3, 3)
);
mb(1, 2,
ma(0, 3) * ma(1, 2) * ma(3, 0) - ma(0, 2) * ma(1, 3) * ma(3, 0) -
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from datetime import timezone
from airflow.models import DagRun, TaskInstance
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"status",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def classify_items_slug(self, items, score_min):
classify_items = {}
for key, item in enumerate(items):
scores = {}
for nex_key, next_item in enumerate(items):
if key == nex_key:
continue
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Copyright (c) 2019-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@section('body')
<div>toto je profil</div>
@endsection | ise-uiuc/Magicoder-OSS-Instruct-75K |
# parse arguments for cli (if not given as function arguments)
parser = add_parser(config)
if args is None:
kwargs = vars(parser.parse_args())
sys_exit = exit
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from scrapy.http import HtmlResponse
class JSMiddleware(object):
def process_request(self,request,spider):
print("PhantomJS is starting")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def add(moment):
return moment + datetime.timedelta(seconds=10**9)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
place = "Madrid"
mad2t = get(c.T, location=place)
madp = get(c.P, location=place)
madw = get(c.W, location=place)
madc = get(c.C, location=place)
# write orchestra + score
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dst_priv_key = self.get_option('dstPrivKey', options)
if dst_priv_key:
dst_priv_key = None
dst_dir = self.get_option('dstDir', options)
remote_host.create_cert(name, dst_dir, export_type, dst_user, dst_priv, dst_priv_key, dst_host, int(dst_host_port))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.String(64))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from collections import deque
from configparser import ConfigParser, ExtendedInterpolation
from configparser import Error as ParserError
from _sadm import log
from _sadm.configure import pluginsList
from _sadm.errors import SettingsError
__all__ = ['Settings']
_unset = object()
class Settings(ConfigParser):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// GameDateModel.swift
// swiftArch
//
// Created by czq on 2018/5/17.
// Copyright © 2018年 czq. All rights reserved.
//
import UIKit
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assigned_prisoner = relationship(
"Prisoner", back_populates="qualifications", lazy="joined"
)
def __init__(self, prisoners_id: int, skill: str, level: str) -> None:
super().__init__()
self.prisoners_id = prisoners_id
self.skill = skill
self.level = level
def __... | ise-uiuc/Magicoder-OSS-Instruct-75K |
pattern : string
the pattern to be removed
Returns
-------
string
cleaned tweat
"""
r = re.findall(pattern,text) # finds the pattern i.e @user and puts it in a list for further task
for i in r:
text = re.sub(i,"",text)
return text
| ise-uiuc/Magicoder-OSS-Instruct-75K |
0x01,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@pytest.fixture
def df():
return pd.DataFrame({"x": [1,1,2,2], "y": [1.0,2.0,3.0,4.0]})
@pytest.fixture
def big_df():
data = {}
for i in range(100):
data[f"v{i}"] = range(100)
return pd.DataFrame(data).set_index(["v0", "v1"])
@pytest.fixture
def df_df():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#e em milímetros
m=float(input('Digite uma distância em metros: '))
cm=m*100
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/usr/bin/npm run start
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return
user.is_authenticated = user.password == request.form['password']
return user
@public.route('/logout')
def logout(home: str=None) -> str:
"""Log out current session and redirect to home.
:param home: URL to redirect to after logout success
"""
flask_login.logout_user()
retu... | ise-uiuc/Magicoder-OSS-Instruct-75K |
wget https://github.com/Informatievlaanderen/duet-generated/raw/master/report/doc/applicationprofile/cccev-ap/html-nj_en.json
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# bob: tests_full/test_vm_compiler.py
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Get the previous front address.
///
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<a href="#" data-rel="back" data-icon="back">Back</a> | ise-uiuc/Magicoder-OSS-Instruct-75K |
# while true; do python3 ~/util/kick/fill_cm2.py; sleep 3600; done #
# This fills queue after every 60 min till all jobs are submitted! #
# ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'ToKey',
'TensorFlowScorer'
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Attempt to read the graph of the instability trans
# Get the product graphs and inchis
tra, path = filesys.read.instability_transformation(
spc_dct, spc_name, thy_info, save_prefix, zma_locs=zma_locs)
if tra is not None:
ioprinter.info_message('\nFound instability files at path:')
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return(vsota)
print(vsota_stevk_fakultete(100)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
dt: float = 0.08,
gui: bool = True,
num_substeps: int = 1,
num_solver_iterations: int = 5,
contact_erp: float = 0.9):
# Only define variables (locally) you wish to store on the parameter server (done in baseclass constructor).
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
Contains reader implementations.
"""
import contextlib
import io
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* Allow regular Wordpress logins?
*
* Default is true - users can choose Wordpress or SAML login
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
include_package_data=True,
package_data={"": ["*.svg", "*.ui"]},
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
python_requires=">=3.6",
install_requires=["markdown-it-py~=0.4.5"],
extras_require={
"sphinx": ["pyyaml", "docutils>=0.15", "sphinx>=2,<3"],
"code_style": ["flake8<3.8.0,>=3.7.0", "black", "pre-commit==1.17.0"],
"testing": [
"coverage",
"pytest>=3.6,<4",
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def __call__(self, features) -> Dict[str, torch.Tensor]:
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class SeparateFileStorage : public Storage, public IDGenerator {
fs::path dirPath_; // path to the directory where entities shall be saved.
std::set<std::string> entityIDs_; // all ever given entity ids, to avoid
// collisions
size_t nextID_; // the next id to try to ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.input_size = input_size
self.hidden_size = hidden_size
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return 0;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
STR=$(ps -ax | grep "./start.sh")
if [ "$STR" != "" ];
then
kill -9 $(echo "$STR" | sed 's/\([0-9][0-9]*\).*/\1/')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
public required init(from decoder: Decoder) throws {
try super.init(from: decoder);
let container = try decoder.container(keyedBy: CodingKeys.self);
self.additionalFonts = try container.decodeIfPresent([FontInfo].self, forKey: .additionalFonts);
self.customFonts = try containe... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "LRUCache.h"
int main()
{
LRUCache ca(4);
ca.refer(1);
ca.refer(2);
ca.refer(3);
ca.refer(1);
ca.refer(4);
ca.refer(5);
ca.display();
return 0;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
_work_lock.unlock();
return item;
}
void rest(T * t) {
_work_lock.lock();
for (typename std::deque<T*>::iterator iter = _works.begin(); iter != _works.end(); iter++) {
if (*iter == t) {
_works.erase(iter);
break;
}
}
_work_lock.unlock();
}
size_t available() const {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
raise RuntimeError("Error in creating {}. Error-{}".format(temp_file, str(ex)))
pyz.add(temp_file, arcname=basename(temp_file))
async def add_table_configuration(self, pyz, file_spec):
# The contents of the configuration table from the storage layer
temp_file = self._interim_fil... | ise-uiuc/Magicoder-OSS-Instruct-75K |
csizes = np.zeros((len(anms), n_trials, Ms.shape[0]))
Fs = np.zeros((len(anms), n_trials, Ms.shape[0]))
cputs_full = np.zeros(n_trials)
chains = np.zeros((n_trials, mcmc_steps, mu.shape[0]))
for tr in range(n_trials):
print('Trial ' + str(tr+1) +'/' + str(n_trials))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
Precondition: newDate is a consistent date of birth.
Postcondition: Date of birth of the calling object is newDate.
*/
public void setBirthDate(Date newDate)
{
if (consistent(newDate, died))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// get tokens info
let token_a = self.get_token_by_ref_from_cache(&farm.reward_token_a_ref)?;
let lp_token = self.get_token_by_ref_from_cache(&farm.lp_token_ref)?;
// get user accounts info
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import DysartComm as adc
## PRIMARY FUNCTIONS
def get_args(terminal_args):
"""
Interprets terminal arguments as import path, export path, and sorting
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.available_properties = ['children', 'id', 'style', 'className', 'disabled', 'dangerDescription', 'href', 'isSelected', 'kind', 'role', 'size', 'tooltipAlignment', 'tooltipPosition', 'type', 'n_clicks']
self.available_wildcard_properties = []
_explicit_args = kwargs.pop('_explici... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;
location / {
rewrite ^ /index.php\$uri;
}
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def getPositiveTweets():
return twitter_samples.strings('positive_tweets.json')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using Newtonsoft.Json;
using Comformation.IntrinsicFunctions;
namespace Comformation.IoTAnalytics.Dataset
{
/// <summary>
/// AWS::IoTAnalytics::Dataset Trigger
/// https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-trigger.html
/// </summary>
public ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
""" tokenizing a string and counting unique words"""
text = ('this is sample text with several words different '
'this is more sample text with some different words')
word_counts = {}
#count ocurrences of each unique word
for word in text.split():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if samps1 != samps2:
# Set the seed due to the sampling
np.random.seed(seed)
if samps1 < samps2:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CareConnectProcedure.class,
CareConnectProcedureRequest.class,
CareConnectRelatedPerson.class,
CareConnectSpecimen.class
));
return fhirParser;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def plot_mesh_general(path):
x, _, tri = get_topology(path)
fig = plt.figure(figsize=(8, 8))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# if new final state has shorter cost, set it as final state
cost = nx.dijkstra_path_length(tree, starting_state, m_new)
if cost < min_cost:
final_state = m_new
min_cost = cost
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def _transform_pandas(self, df: pd.DataFrame):
_validate_df(df, self.label_column)
def column_label_encoder(s: pd.Series):
s_values = self.stats_[f"unique_values({s.name})"]
return s.map(s_values)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
class FibonacciFunctor
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
obj = jsonpickle.json.loads(msg.payload)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
app.diesel_app.add_loop(diesel.Loop(t))
app.run(debug=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>tests/__init__.py
# -*- coding: utf-8 -*-
"""Tests go in this directory."""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if word not in element:
save.remove(element)
print(save)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::vector<std::vector<BasicBlock *> *> *traversalOrder = BBTraversalHelper::getSCCTraversalOrder(
*currFunc);
// Create a GlobalVisitor
GlobalVisitor *vis = new GlobalVisitor(currState, currFunc, newCallContext, traversalOrder, newCallBacks);
// Star... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
tesselator.EndPolygon();
}
#if !DEBUG
catch
{
}
#endif
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int ntypes = atom->ntypes;
iskip = new int[ntypes+1];
memory->create(ijskip,ntypes+1,ntypes+1,"neigh_list:ijskip");
int i,j;
for (i = 1; i <= ntypes; i++) iskip[i] = nq->iskip[i];
for (i = 1; i <= ntypes; i++)
for (j = 1; j <= ntypes; j++)
ijskip[i][j] = nq->ijskip[i][j];
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.