seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
def process(self):
if has_package(InstalledRedHatSignedRPM, 'grep'):
create_report([
reporting.Title('Grep has incompatible changes in the next major version'),
reporting.Summary(
'If a file contains data improperly encoded for the current loca... | ise-uiuc/Magicoder-OSS-Instruct-75K |
n = int(input())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if items is None:
type = "success"
else:
type = "items"
return {"type": type, **extra, "items": items, "value": value}
def input_required(message, args):
cmdstr = get_context(args).input_value
return result([{"label": "", "description": message}], cmdstr)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
w.loc[ni, nj] += (w.loc[ni, nj] + 1)/(n.loc[ni, nj] + 2)
n.loc[ni, nj] += 1
return activelo.solve(n.values, w.values)
def offdiag_refill(run, names, queue, count=1):
n = (json.symmetric_games(run)
.reindex(index=names, columns=names)
.fillna(0))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, root, logger):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def graph_difficulties(is_by_height: bool = False, show: bool = False):
df = pd.read_csv(alchemy.csv_exporting.difficulties_filename)
fig = go.Figure()
fig.add_trace(
go.Scatter(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
::str::count_len( const char * s ) const
{
size_t i = 0;
while( s[i] )
++i;
return i;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>seung-seok/survey
<?php
class Cs_model extends CI_Model {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "======开始下载文件======="
#$1参数是从上传的文件附件中传过来的上传文件网址
cp /opt/storage/$1 /opt/litemallbak.jar
echo "====下载文件成功===="
##升级前对进程的关闭,和对缓存的清理
echo "======开始关闭进程======="
ps -ef | grep litemall | grep -v grep | awk '{print $2}' | xargs kill -9
echo "====删除进程成功========开始清理日志===="
cat /dev/null > /opt/nohup.out
echo "====清理日志成功==... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def retry_reservation(organization_code, vaccine_type, jar):
reservation_url = 'https://vaccine.kakao.com/api/v2/reservation/retry'
data = {"from": "List", "vaccineCode": vaccine_type,
"orgCode": organization_code, "distance": None}
response = requests.post(reservation_url, data=json.dumps(dat... | ise-uiuc/Magicoder-OSS-Instruct-75K |
Normal = 0,
Aiming = 1,
Driver = 2,
Passenger = 3
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# naive_bg = BrachioGraph(
# # the lengths of the arms
# inner_arm=8,
# outer_arm=8,
# # the drawing area
# bounds=(-6, 4, 6, 12),
# # relationship between servo angles and pulse-widths
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
import nltk
dler = nltk.downloader.Downloader()
dler._update_index()
dler._status_cache['panlex_lite'] = 'installed' # Trick the index to treat panlex_lite as it's already installed.
dler.download('all')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print('A temperatura de {}ºC corresponde a {}ºF!'.format(C,F))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
diff_preprocess="path_to_preprocessed"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'offset': offset
}
return await request(f'{base_url}/getUpdates', params=params)
async def send_message(base_url, chat_id, text, reply_markup=None):
payload = {
'chat_id': chat_id,
'text': text
}
if reply_markup is not None:
payload['reply_markup'] = reply_markup
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
data=[[Image(Content, 12*cm, 8*cm)]],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<button type="submit" id="btn" name="button">Edit!</button>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this.updateButtons();
}
}
private void addNewPage() {
if (this.bookPages != null && this.bookPages.tagCount() < 50) {
this.bookPages.appendTag(new NBTTagString(""));
++this.bookTotalPages;
this.bookIsModified = true;
}
}
@Override... | ise-uiuc/Magicoder-OSS-Instruct-75K |
pub output: String,
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# [1 1 1 2 2 2]]
print(np.block([[a1], [a2]]))
# [[1 1 1]
# [1 1 1]
# [2 2 2]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
complete -W "--left-only --right-only" trim
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Cart(models.Model):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Best-effort filter for hostnames which are just reflected IPs.
# IP addresses often use dots or dashes.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// </summary>
public DateTime LastUpdatedTime { get; protected set; }
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os, cv2
imgs = np.load('test_set_ck_extended_no_resize.npy')
lbls = np.load('test_labels_ck_extended_no_resize.npy')
for i in range(imgs.shape[0]):
print (lbls[i])
cv2.imshow('img', imgs[i])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dieharder -d 100 -g 52 -S 301879919
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/*
WhetStone, version 2.0
Release name: naka-to.
Copyright 2010-201x held jointly by LANS/LANL, LBNL, and PNNL.
Amanzi is released under the three-clause BSD License.
The terms of use and "as is" disclaimer for this license are
provided in the top-level COPYRIGHT file.
Author: <NAME> (<EMAIL>)
*/
#i... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class Image(SXBase):
SXClass = SXImage
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, list, name):
self.list = list
self.name = name
def func1():
print("func1 print something")
def func2():
print("func2 print something")
integer = 8
return integer
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return (float) Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
}
public void normalize() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
self._session_params = ['jsessionid=', 'phpsessid=',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
logger.debug('Creating client: {}'.format(client_id))
# create and associate callbacks
super().__init__(client_id=client_id, clean_session=False)
self.callback = mqtt_util.CallbackContainer(led_strip)
self.on_message = self.callback.on_message
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export declare const cisCallMade: string[]; | ise-uiuc/Magicoder-OSS-Instruct-75K |
. ${srcdir}/../test_common.sh
FRAG="#checksummode=ignore"
F="\
nc4_nc_classic_comp.nc \
nc4_nc_classic_no_comp.nc \
nc4_strings.nc \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return text
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
public interface IOnIndexed {
void OnIndexed();
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cloudError = 0
setupError = 1
from influxdb_client import InfluxDBClient, Point, WritePrecision
from influxdb_client.client.write_api import SYNCHRONOUS
with InfluxDBClient(url=cloudHost, token=token, org=org) as influxc:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class PlanningSessions {
private var storage: [String : PlanningSession]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
@Override
public String serviceName()
{
return _serviceName;
}
@Override
final synchronized public void start() throws Throwable
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.expect("PORT MISSING IN ENV")
.parse()
.unwrap(),
get_rendezvous_server(false).unwrap(),
);
hoster.run();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Panosen.CodeDom.CSharp.Engine
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def get_loss(args):
if args.opt == 'dfw':
loss_fn = MultiClassHingeLoss()
if 'cifar' in args.dataset:
args.smooth_svm = True
| ise-uiuc/Magicoder-OSS-Instruct-75K |
right.x = freeRect.x + placedRect.width
right.y = freeRect.y
right.width = freeRect.width - placedRect.width
if splitHorizontal:
bottom.width = freeRect.width
| ise-uiuc/Magicoder-OSS-Instruct-75K |
switch self {
case .status400(let response): return response
case .status401(let response): return response
case .status403(let response): return response
case .status404(let response): return response
case .status500(let re... | ise-uiuc/Magicoder-OSS-Instruct-75K |
CREATE DATABASE $(echo ${DB_NAME});
GRANT ALL PRIVILEGES ON DATABASE $(echo ${DB_NAME}) TO $(echo ${DB_USER});
EOSQL
| ise-uiuc/Magicoder-OSS-Instruct-75K |
email: string
jobTitle: string
profiles: Profiles
usernames: {
twitter: string
}
}
export interface SiteInfo {
title: string
description: string
metaTitle: string
metaDescription: string
url: string
repositoryUrl: string
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"AthenaPet": True,
"AthenaPickaxe": True,
"AthenaCharacter": True,
"AthenaSkyDiveContrail": True,
"AthenaGlider": True,
"AthenaDance": True,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cursor.execute(add_salary, data_salary)
# Make sure data is committed to the database
cnx.commit()
cursor.close()
cnx.close() | ise-uiuc/Magicoder-OSS-Instruct-75K |
return 0;
}
public boolean equals(Object o) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in range(5):
teid = 1
buf = assembleMSG(teid)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
CONFIGURATION_FILES_PATH = sys.path[1] + "/configuration_files" | ise-uiuc/Magicoder-OSS-Instruct-75K |
use App\Category;
use Tests\TestCase;
class CategoryResourceTest extends TestCase
{
/**
* A basic feature test example.
*
* @return void
*/
public function testFetchingCategories()
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
o2 = widgets.Dropdown( description='Filename:',
options=[''], value='',
disabled=False, style=left_style,
layout=Layout(width=full_width_px) )
#------------------------------------------------------------------
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
* @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError
*/
public function notFound()
{
$this->render('@Router/NotFoundError');
http_response_code(404);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
nonce_hex.chars().enumerate().for_each(|(idx, c)| {
let res = self.hash.find(c);
if let Some(n) = res {
let n = n as u128;
let n = n.checked_pow(idx as u32);
if let Some(n) = n {
pointers.push(n as u128);
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return x
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Simply renders a menu.
"""
"""
It adds a context variables:
* name -- Slug of selected menu.
"""
pk = None
if "menu_id" in context:
# NOTE: Here, "context" is not a simple dict instance, so we can't use:
#
# >> pk = context.pop("menu_id", None)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Testing module instance_type.vt
import pytest
import ec2_compare.internal.instance_type.vt
def test_get_internal_data_instance_type_vt_get_instances_list():
assert len(ec2_compare.internal.instance_type.vt.get_instances_list()) > 0
def test_get_internal_data_instance_type_vt_get():
assert len(ec2_compare.intern... | ise-uiuc/Magicoder-OSS-Instruct-75K |
value: value,
unit: unit,
selectableValues: selectableValues.map { unit.roundForPicker(value: $0) },
formatter: formatter,
isUnitLabelVisible: isUnitLabelVisible,
colorForValue: { value in
let quantity = HKQuantity(unit: unit, doubl... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// Created by Ben Chatelain on 1/4/19.
// Copyright © 2019 mas-cli. All rights reserved.
//
@testable import MasKit
class StoreSearchMock: StoreSearch {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$this->session->set_flashdata('messageAlert', $this->messageAlert('error', 'Batas waktu untuk absen telah berakhir'));
redirect(base_url() . 'user');
return;
}
$this->session->set_flashdata('messageAlert', $this->messageAlert('error', 'Gagal untuk absen'));
re... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "CompilerBase.hpp"
#include "CompilerFactory.hpp"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private bool hasMesh; // used to show that at least one mesh has been found
private bool is3ds; // usd to shwo that the 4D4D magic number has been found
public IOReadResult Read(BinaryReader reader, ReadOptions options, IMeshBuilder builder)
{
ushort ChunkID;
St... | ise-uiuc/Magicoder-OSS-Instruct-75K |
fields.FIELD_DATE_END,
fields.FIELD_USER,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from datetime import timezone
import logging
import os
import sys
import json
import re
#from model.orders import Orders, orders_init
#from yacgb.lookup import OrderBookLookup
#from yacgb.bdt import BacktestDateTime
| ise-uiuc/Magicoder-OSS-Instruct-75K |
guard !isCancelled else {
return
}
frameAssigner.performFrameAssignments(frameAssignments)
}
}
final class FullscreenLayout: Layout {
static var layoutName: String { return "Fullscreen" }
static var layoutKey: String { return "fullscreen" }
let windowActivityCache... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* @param string $from
*/
public function setFrom($from)
{
$this->from = $from;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public Activity getActivityByClass(Class cs) {
for (Activity ac : activityList) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
a[i],a[j]=a[j],a[i]
swa+= 1
print("Array is sorted in "+str(swa)+" swaps.")
print("First Element: "+str(a[0]))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import rospkg
import yaml
from svenzva_utils.kinesthetic_teaching_console import *
from svenzva_msgs.msg import *
from svenzva_msgs.srv import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.addPage(Page2b(self))
self.setWindowTitle("Import Wizard")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'LIME LEAF', 'CUBE DESIGN BUILD & MANAGEMENT, INC', 'INTERMEZZO', 'AMERICAN RETRO',
'URBAN TRANS ENGINEERING, LLC', 'TAMBORRA ARCHITECTURE CONSTRUCTION', 'MIYAGI',
"STEPHANIE'S RESTAURANT", 'KL INNOVATIVE DESIGN INC', 'FEI MA', 'VINNY VIN', '<NAME>',
'... | ise-uiuc/Magicoder-OSS-Instruct-75K |
using UnityEngine.UI;
public class UI_Controller : MonoBehaviour {
public AzureSky_Controller azureController;
public Material skyMaterial;
public Slider timelineSlider;
public Slider cloudCovarage;
public Slider timeToRefreshGI;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Linq;
using System.Web;
namespace Blog.Services
{
/// <summary>
/// Description of DataService.
/// </summary>
public sealed class DataService : IDataService//, IDisposable
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public partial class RuntimeDomain : BaseDomain
{
/// <summary>
/// Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used f... | ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "Pushing docker image to '$DOCKER_IMAGE'..."
docker push $DOCKER_IMAGE
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert error < 0.001
| ise-uiuc/Magicoder-OSS-Instruct-75K |
left(angle)
forward(length)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
time_t
ttime::time_get()
{
time_t tmp;
time(&tmp);
return tmp;
}
void
ttime::wait(int index)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
linear_constraints = extract_parameter_constraints(
search_space.parameter_constraints, self.parameters
)
# Generate the candidates
X, w = self.model.gen(
n=n,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(lst[lst.index(0)+1])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#Sort Labels
labels = plc['labels']
o_labels = old_plc['labels']
labels.sort()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (
self._relAbsErr(self.Cp, dp2.Cp) < tol
and self._relAbsErr(self.H, dp2.H) < tol
| ise-uiuc/Magicoder-OSS-Instruct-75K |
FeatureCollection::FeatureCollection(std::vector<std::shared_ptr<Feature> > features) :
_features(std::move(features))
{
}
FeatureCollection::~FeatureCollection() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
paper = arxiv.query(search_query="cat:math.RT",max_results=numpapers)[x]
arxiv.download(paper, slugify=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class Delete : BaseAsyncEndpoint
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Nullable
ASTNode getListItemMarker();
/**
* -1 - not a task item
* 0 - low priority '-' list item marker
* 1 - normal priority '+' list item marker or ordered list item
* 2 - high priority '*' list item marker
*
* @param editContext
*
* @return priority of task ite... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/// Creates a new instance.
public init() {
ptr = hexe_engine_new()
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>Code/predict_objdet.py
#%%
# import packages
import torch
import cv2
import torchvision
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
from PIL import Image
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@user_routes.route('/')
@login_required
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_der_cert_to_sshkey(self):
f = open('certificate.der','rb')
self.assertIsNot(cert_to_sshkey(f.read()),'')
f.close()
def test_config(self):
self.assertNotEqual(load_config(), None)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model app\modules\forum\models\Post */
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return deck
# 処理はここから
deck = encode_cardd_by_url(input())
card_details = []
# csvを開く, card_dbはwithを抜けると自動で閉じる
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var x = (double)i / (n - 1);
points.Add(new PointType2(x, y(x)));
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$this->symbol = $symbol;
}
public function toString(): string
{
return $this->symbol;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public interface StatisticsService {
List<Statistics> returnQueryALLProjcetBugs();
List<Statistics> returnQueryProjectBugsByname(String projectName);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super(props);
const { t } = props;
this.state = {
filter: 'all'
};
}
render () {
const { current, next, t } = this.props;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public
BaseCollection()
{
super("BaseBuilders", new VersionID("1.0.0"), "NathanLove",
"A collection of basic builders for Nathan Love");
LayoutGroup group = new LayoutGroup(true);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import bpy
import glob
| 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.