seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
],
targets: [
.target(name: "URLEncodedForm", dependencies: ["Core"]),
.testTarget(name: "URLEncodedFormTests", dependencies: ["URLEncodedForm"]),
]
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'end': 3900
}
cmd_url = 'http://localhost:9119/%s' % set_cmd
headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}
print('COMMAND: %s' % cmd_url)
print('PARAMS: %s' % params)
r = requests.post(cmd_url, headers=headers, json=params)
data = json.loads(r.text)
print('RESPONSE: %s\n' % data)
# Wait some seconds to be sure that the transaction has been handled
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* <p>May be a reference to another resource, in the form
* "<code>@[+][<i>package</i>:]<i>type</i>/<i>name</i></code>" or a theme
* attribute in the form
* "<code>?[<i>package</i>:]<i>type</i>/<i>name</i></code>".
*
* @attr name com.example.musicplayer:logo
| ise-uiuc/Magicoder-OSS-Instruct-75K |
should_replace = False
if value and value[0].startswith('#'): # This shorts out if value is empty
value = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# path('categories/<int:category_id>/', category_detail)
path('login/', obtain_jwt_token),
path('categories/', CategoryListAPIView.as_view()),
path('categories/<int:pk>/', CategoryDetailAPIView.as_view()),
path('products/', ProductListAPIView.as_view()),
path('products/<int:pk>/', ProductDetailAPIView.as_view())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include "qatomicstring_p.h"
#include "qtocodepointsiterator_p.h"
#include "qassemblestringfns_p.h"
QT_BEGIN_NAMESPACE
using namespace QPatternist;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import type { Mixin } from '@tpluscode/rdfine/lib/ResourceFactory';
import { ExecutionPlatformMixin } from '../lib/ExecutionPlatform';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
declare(strict_types=1);
namespace Symplify\PHPStanRules\Tests\Rules\ForbiddenParamTypeRemovalRule\Source;
interface SomeRectorInterface
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
private Integer unclosedQuantity;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# === bokeh demo at below ===
# embedding the graph to html
from flask import Flask, render_template, request
from bokeh.resources import CDN
from bokeh.plotting import figure
from bokeh.embed import components
app = Flask(__name__)
def create_figure():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sequencer.tracks[0].add(noteNumber: 24, velocity: 127, position: AKDuration(beats: 2), duration: AKDuration(beats: 1))
sequencer.tracks[1].add(noteNumber: 26, velocity: 127, position: AKDuration(beats: 2), duration: AKDuration(beats: 1))
for i in 0 ... 7 {
sequencer.tracks[2].add(
noteNumber: 30,
velocity: 80,
position: AKDuration(beats: i / 2.0),
duration: AKDuration(beats: 0.5))
}
sequencer.tracks[3].add(noteNumber: 26, velocity: 127, position: AKDuration(beats: 2), duration: AKDuration(beats: 1))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
item = QtWidgets.QTableWidgetItem(Names.Chemical_Elemnts[i])
self.result_tb.setHorizontalHeaderItem(i, item)
font = QtGui.QFont()
font.setItalic(True)
item.setFont(font)
item.setBackground(QtGui.QColor(114, 159, 207))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
error = e
if error:
raise error
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if skipped_labels:
print_warning(f"Skipped {skipped_labels} labels for {data['taskId']}")
return {
"images": images,
"annotations": annotations,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.S = tf.concat((tf.zeros_like(self.mels[:, :1, :]), self.mels[:, :-1, :]), 1)
# Networks
| ise-uiuc/Magicoder-OSS-Instruct-75K |
permission_role_create = namespace.add_permission(
label=_('Create roles'), name='role_create'
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<div class="control-product">
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .api import * | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.messageText.add(button: messagePasteButton)
self.addressText.textViewDelegate = self
self.signatureText.textViewDelegate = self
self.messageText.textViewDelegate = self
self.addressText.placeholder = LocalizedStrings.address
self.signatureText.placeholder = LocalizedStrings.signature
self.messageText.placeholder = LocalizedStrings.message
self.hideKeyboardOnTapAround()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if expr is not None:
return from_expr(expr)
for row in st:
if not isinstance(row, list):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
logger("Pulling image failed.")
else:
logger("Pulling image %s succeeded." % docker_image)
if not docker.image_exists():
if create_missing:
if logger:
logger("Building docker image %s from source..." % docker_image)
docker.buildFromString(dockerfile_as_string, env_keys_to_passthrough=env_keys_to_passthrough, logger=logger)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
internal static void encode_split(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bytestring, np_address, self.hash_list, len(self.dict))
for i in range(np_add_dict.shape[0]//2):
start = np_add_dict[2*i]
end = np_add_dict[2*i+1]
word = bytestring[start:end]
word_hash = hash_bytestring(word)
self.hash_list[len(self.dict)] = word_hash
self.dict[word] = len(self.dict)+1
self.inv_dict.append(word)
return post_fix
def parse_bytestring_new(self, bytestring, address=[]):
postfix = self.postfix_of_bytestring(bytestring, [])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
list_display = (
*Microprocessor._list_fields(),
*CustomListWorkstationsModelAdmin.list_display,
)
fields = (*Microprocessor._list_fields(), )
| ise-uiuc/Magicoder-OSS-Instruct-75K |
plt.ylabel('Desplazamiento Cuadrático (m²)', fontsize=16)
plt.xlabel('Tiempo (s)', fontsize=16)
plt.ticklabel_format(useMathText=True)
plt.tight_layout()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
course = Course(title, partners, self.name,
description, tags, url, snippet=snippet)
courses.append(course)
return courses
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(x.info())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.x, self.y, self.z = (10, 0, 5)
def incr_x(self, event):
self.x += self.dx
def decr_x(self, event):
self.x -= self.dx
def incr_y(self, event):
self.y += self.dx
def decr_y(self, event):
self.y -= self.dx
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mic_index = None
audio = pyaudio.PyAudio()
info = audio.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
for i in range(0, numdevices):
print(audio.get_device_info_by_host_api_device_index(0, i).get('name'))
if (audio.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Patchfile Path 参数为 \(patchFilePath ?? "nil")
Overwrite State 参数为 \(overwrite)
""")
do {
let pipeline = try Pipeline(mode: mode,
referencePath: referencePath,
targetPath: targetPath,
patchFilePath: patchFilePath,
overwrite: overwrite)
try pipeline.run()
print("🎉 Import Sanitizer 运行完成".likeSeperateLine(.normal))
} catch {
print("🚧 Import Sanitizer 运行中断".likeSeperateLine(.normal))
if let impsError = error as? ImportSanitizerError {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export const contramap: 'fantasy-land/contramap';
export const ap: 'fantasy-land/ap';
export const of: 'fantasy-land/of';
export const alt: 'fantasy-land/alt';
export const zero: 'fantasy-land/zero';
export const reduce: 'fantasy-land/reduce';
export const traverse: 'fantasy-land/traverse';
export const chain: 'fantasy-land/chain';
export const chainRec: 'fantasy-land/chainRec';
export const extend: 'fantasy-land/extend';
export const extract: 'fantasy-land/extract';
export const bimap: 'fantasy-land/bimap';
export const promap: 'fantasy-land/promap';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""entry point"""
from . import main
start = main.app.launch
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __str__(self):
return self.name
# Friend Model (友情链接)
class Friend(models.Model):
avatar = models.URLField(validators=[URLValidator(schemes=['http', 'https'])])
name = models.CharField(max_length=40)
url = models.URLField(validators=[URLValidator(schemes=['http', 'https'])])
def __str__(self):
return self.name
| ise-uiuc/Magicoder-OSS-Instruct-75K |
['hurt', ['machucar'], 'hurt', 'hurt'], ['keep', ['manter', 'preservar'], 'kept', 'kept'],
['kneel', ['ajoelhar-se'], 'knelt', 'knelt'], ['knit', ['tricotar'], 'knit', 'knit'],
['know', ['saber', 'conhecer'], 'knew', 'known'], ['lay', ['por', 'colocar', 'deitar'], 'laid', 'laid'],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* PNGCropper
*
* @author <NAME> <<EMAIL>>
* @extends ImagickCropper
*/
class PNGCropper extends ImagickCropper
| ise-uiuc/Magicoder-OSS-Instruct-75K |
extra = 0
class DiensteAdmin(admin.ModelAdmin):
list_display = ('tag', 'schicht', 'ordner', 'ordner_name')
list_filter = ('ordner__dienstplan', 'ordner__jahr', 'ordner__monat', 'tag')
inlines = [BesatzungInline]
admin.site.register(DpDienste, DiensteAdmin)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.sound = sound
def speak(self):
return self.sound | ise-uiuc/Magicoder-OSS-Instruct-75K |
file_system_(file_system), symbol_table_(Stats::SymbolTableCreator::initAndMakeSymbolTable(
options_.fakeSymbolTableEnabled())),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn main() {
println!("in!");
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# for scan in nessus.get_scans():
# process_scan(scan)
# break
with concurrent.futures.ThreadPoolExecutor() as executor:
executor.map(process_scan, nessus.get_scans())
print(f"Total Time: {time.time() - t1}. Sleeping for {exporter.polling_interval} seconds.")
time.sleep(exporter.polling_interval)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
g.identity,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Err(_) => panic!()
};
logger.debug(format!("public key = {:?}", public));
// let handler = MUTEX_HANDLERS.lock().get_crypto_trng();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#sudo apt install python3-tk
except ImportError:
if int(platform.python_version()[0]) >= 3:
if platform.system().upper() == "WINDOWS":
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return (timeEnd-timeStart)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Created by LiDinggui on 2017/8/15.
// Copyright © 2017年 DAQSoft. All rights reserved.
//
import XCTest
@testable import SwiftTarget
class SwiftTargetTests: XCTestCase {
override func setUp() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
}
}
@Override
| ise-uiuc/Magicoder-OSS-Instruct-75K |
UpdateBrk();
}
QProcessSize::~QProcessSize()
{
}
void QProcessSize::UpdateBrk()
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else
{
// fa_int : crossflow
// ______|________
// --> Hpf | | |\
// Hm |======v========| \
// Hfa |_______________|\-\-> pf_out
// \ L \D\|
// \ \ |
// \_______________\|
// |
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
from flask import render_template, redirect, url_for
from flask_login import login_required, current_user
from app.models import Post
from . import admin_bp
from .forms import PostForm
| ise-uiuc/Magicoder-OSS-Instruct-75K |
:param z_col: List of z-coordinates of collocation points
:param norm_vec: List of normal vectors
:return: Influence coefficient matrix
| ise-uiuc/Magicoder-OSS-Instruct-75K |
QueryKind: QueryKindTrait<Value, OnEmpty>,
OnEmpty: Get<QueryKind::Query> + 'static,
MaxValues: Get<Option<u32>>,
{
/// Get the storage key used to fetch a value corresponding to a specific key.
pub fn hashed_key_for<KArg: EncodeLikeTuple<Key::KArg> + TupleToEncodedIter>(key: KArg) -> Vec<u8> {
<Self as crate::storage::StorageNMap<Key, Value>>::hashed_key_for(key)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (hr != 0)
{
Marshal.ThrowExceptionForHR(hr);
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include <amp.h>
#include <ostream>
namespace Smurf {
void printPCInfo(std::wostream& os) {
auto accelerators = Concurrency::accelerator::get_all();
for (auto && elem : accelerators) {
os << elem.description << std::endl;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Random rnd = new Random((int)Stopwatch.GetTimestamp());
for (int i = 0; i < 100; i++)
{
short short_number = (short)rnd.Next(short.MinValue, short.MaxValue);
ushort short_number_1 = (ushort)rnd.Next(ushort.MinValue, ushort.MaxValue);
int int_number = rnd.Next(int.MinValue, int.MaxValue);
uint int_number_1 = (uint)rnd.Next(0, int.MaxValue);
float float_number = rnd.Next(-100000, 100000) / 100;
var bool_value = short_number % 2 == 1;
client.Write("A1", bool_value);
Assert.True(client.ReadBoolean("A1").Value == bool_value);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
runnings = set(runnings)
# Here we don't have workflow id, so use empty one instead
store = workflow_storage.get_workflow_storage("")
ret = []
for (k, s) in store.list_workflow():
if s == WorkflowStatus.RUNNING and k not in runnings:
s = WorkflowStatus.RESUMABLE
if s in status_filter:
ret.append((k, s))
return ret
def resume_all(with_failed: bool) -> List[Tuple[str, ray.ObjectRef]]:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (src.hasIntent())
tgt.setIntent(convertMedicationRequestIntent(src.getIntent()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory())
tgt.addCategory(convertCodeableConcept(t));
if (src.hasPriority())
tgt.setPriority(convertMedicationRequestPriority(src.getPriority()));
if (src.hasDoNotPerform())
tgt.setDoNotPerformElement(convertBoolean(src.getDoNotPerformElement()));
if (src.hasReportedBooleanType())
tgt.setReportedElement(convertBoolean(src.getReportedBooleanType()));
if (src.hasReportedReference())
tgt.setInformationSource(convertReference(src.getReportedReference()));
if (src.hasMedication())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
) : null;
default:
return null;
}
};
export default MessageCardViewTypeRenderer;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
static_assert(Size<P1>::value == 2);
#if ZEN_STL
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$result = $mysqli->query($sql);
$sql = "SELECT * FROM tb_user WHERE user_id = '" . $_POST['user_id'] . "'";
$result = $mysqli->query($sql);
$data = $result->fetch_assoc();
echo json_encode($data, JSON_PRETTY_PRINT);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
test_predict = np.zeros(NUM_CLASS)
for idx in range(NUM_CLASS):
clf = clf_list[idx]
test_predict[idx] = clf.predict(test_X)
print("Predict:", test_predict, "\n Ground Truth:", test_Y)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'Topxia\\Service\\Course\\Event\\CourseLessonEventSubscriber'
),
);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
raise InvalidTypeError('hlsMasterPlaylistVersion has to be of type HlsVersion')
@classmethod
def parse_from_json_object(cls, json_object):
manifest = AbstractManifest.parse_from_json_object(json_object=json_object)
id_ = manifest.id
manifest_name = manifest.manifestName
name = manifest.name
description = manifest.description
custom_data = manifest.customData
outputs = manifest.outputs
| ise-uiuc/Magicoder-OSS-Instruct-75K |
stitch.speed = 80
size = 200
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in range(10):
x0 = (pyb.rng() % (2*img.width())) - (img.width()//2)
y0 = (pyb.rng() % (2*img.height())) - (img.height()//2)
x1 = (pyb.rng() % (2*img.width())) - (img.width()//2)
y1 = (pyb.rng() % (2*img.height())) - (img.height()//2)
r = (pyb.rng() % 127) + 128
g = (pyb.rng() % 127) + 128
b = (pyb.rng() % 127) + 128
# If the first argument is a scaler then this method expects
# to see x0, y0, x1, and y1. Otherwise, it expects a (x0,y0,x1,y1) tuple.
img.draw_line(x0, y0, x1, y1, color = (r, g, b), thickness = 2)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
go-ipfs/ipfs cat $1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fatalError("init(coder:) has not been implemented")
}
private func applyLocalization() {
walletCell.titleLabel.text = R.string.localizable.commonWallet(preferredLanguages: locale.rLanguages)
accountCell.titleLabel.text = R.string.localizable.commonAccount(preferredLanguages: locale.rLanguages)
networkFeeCell.rowContentView.locale = locale
actionButton.imageWithTitleView?.title = R.string.localizable.commonConfirm(
preferredLanguages: locale.rLanguages
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return { action, state in
var state = state ?? AppState()
state.authState = AuthReducer.reducer(action, state.authState)
state.signUpState = SignUpReducer.reducer(action, state.signUpState)
state.tasksState = TasksReducer.reducer(action, state.tasksState)
state.editTaskState = EditTaskReducer.reducer(action, state.editTaskState)
return state
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import webbrowser
class DataFetch:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import static org.apache.batik.util.SVGConstants.SVG_NAMESPACE_URI;
import static org.apache.batik.util.SVGConstants.SVG_STYLE_ATTRIBUTE;
import static org.apache.batik.util.SVGConstants.SVG_VIEW_BOX_ATTRIBUTE;
import java.awt.Rectangle;
import java.io.StringWriter;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.apache.batik.dom.GenericDOMImplementation;
import org.apache.batik.svggen.SVGCSSStyler;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
print('Seu nome é normal!')
print('Bom dia, {}!'.format(nome)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
fn handler(event: SqsEvent, ctx: Context) -> Result<(), HandlerError> {
info!("Handling event");
let mut initial_events: HashSet<String> = event
.records
.iter()
.map(|event| event.message_id.clone().unwrap())
.collect();
info!("Initial Events {:?}", initial_events);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
a = np.array([0.1,0.2,0.3])
b = np.array([0,0.2,0])
L = get_dotproduct_loss(a, b, 1.0)
print(L) | ise-uiuc/Magicoder-OSS-Instruct-75K |
* Get the state that owns the brand.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function state()
{
return $this->belongsTo(State::class);
}
/**
* Get the zones for the Municipality.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace smtc
{
TmplFuncDefnEntity::TmplFuncDefnEntity (TmplFuncDefnPtr const & tmpl_func_defn)
: m_tmpl_func_defn (tmpl_func_defn)
{}
}
namespace smtc
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
checkContext(context, 'before');
if (!context.params.user || !context.params.user.isVerified) {
throw new errors.BadRequest("User's email is not yet verified.");
}
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from typing import Type
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if line in counter_dict:
counter_dict[line] += 1
else:
counter_dict[line] = 1
line = f.readline()
# loeb failist ridade kaupa ja loendab dictionarisse erinevad kategooriad, mille jaoks on vaja kindlat osa reast [3:-26]
counter_dict2 = {}
with open('/Users/mikksillaste/Downloads/aima-python/Training_01.txt') as f:
line = f.readline()
while line:
line = line[3:-26]
if line in counter_dict2:
counter_dict2[line] += 1
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if ((is_null($user) && !$findByMail) || (!is_null($user) && ($findByMail == $user || !$findByMail))) {
$isValidEmail = filter_var($email, FILTER_VALIDATE_EMAIL) ? true : false;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
type = winreg.REG_MULTI_SZ
else:
type = winreg.REG_SZ
with key as k:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# kernel/system statistics. man -P 'less +//proc/stat' procfs
stat = []
with open(self.stat, "r") as f:
for line in f:
if "cpu" in line:
stat.append(line)
else:
return stat
def _filter_stat(self, stat, avg=False):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub struct TropicalFish;
pub fn create() -> EntityBuilder {
mob::base(MobKind::TropicalFish).with(TropicalFish)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def get_text_dataset(tree_base_size: int, tree_branch_number: int, dataset_split: str,
data_directory: str) -> TextDataset:
image_size = tree_base_size * (2 ** (tree_branch_number - 1))
image_transform = transforms.Compose([
transforms.Scale(int(image_size * 76 / 64)),
transforms.RandomCrop(image_size),
transforms.RandomHorizontalFlip()])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// <summary>
/// Include namespace in XML
/// </summary>
public bool UseNamespace { get; set;}
///<summary>
/// Head of OPML
///</summary>
public Head Head { get; set;} = new Head();
///<summary>
/// Body of OPML
///</summary>
public Body Body { get; set;} = new Body();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
PIXEL_MEAN: [128, 128, 128]
PIXEL_STD: [128, 128, 128]
INPUT:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
_py_distance = distance
_py_np_distance = np_distance
_py_g = g
_py_np_g = np_g
_py_kernel = kernel
def test_window_floor_ceil():
assert 3 == window_floor(4, 1)
assert 0 == window_floor(1, 4)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
async fn run_server(
listener: TcpListener,
sessions: Arc<RwLock<Sessions>>,
settings: Arc<BrokerSettings>,
shutdown: Trigger,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self = cls.__init__(fee, _error_use_class_method=False)
self._sender_public_key = Keys(secret).get_public_key()
self._asset["signature"] = {
"publicKey": Keys(second_secret).get_public_key()
}
self.sign(secret, second_secret)
return self
@classmethod
def from_dict(cls, transaction):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rm -rf target/classes
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
private void OnTriggerExit(Collider other)
{
if (other.gameObject.tag == ("Player"))
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#include <opencv2/highgui/highgui_c.h>
#include "armor_detect.h"
using namespace cv;
using namespace std;
int main()
{
Mat video1, new_image;
int g_nContrastValue=100;//100
int g_nBrightValue=-100;
VideoCapture video("der.avi");//打开视频
namedWindow("识别窗口", CV_WINDOW_AUTOSIZE);
while(1)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public DoorOpenChecker()
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from cognito.check import Check
from cognito.table import Table
import os
import pytest
import pandas as pd
import numpy as np
from os import path
from sklearn import preprocessing
| ise-uiuc/Magicoder-OSS-Instruct-75K |
async fn kv_del(&self, key: &str) -> Result<()> {
let mut data = self.conn.lock().unwrap();
data.kv.remove(key);
Ok(())
}
}
#[async_trait]
impl ParticipationsRepo for MemoryRepo {
async fn part_new(&self, part_data: NewParticipation) -> Result<Participation> {
let mut data = self.conn.lock().unwrap();
let part_id = data.parts.len() as ParticipationId;
let part = Participation {
id: part_id,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# generate iroha lib
CURDIR="$(cd "$(dirname "$0")"; pwd)"
IROHA_HOME="$(dirname $(dirname "${CURDIR}"))"
cmake -H$IROHA_HOME -Bbuild -DSWIG_PYTHON=ON;
cmake --build build/ --target irohapy -- -j"$(getconf _NPROCESSORS_ONLN)"
# generate proto files in current dir
protoc --proto_path=../../schema --python_out=. block.proto primitive.proto commands.proto queries.proto responses.proto endpoint.proto
python2 -m grpc_tools.protoc --proto_path=../../schema --python_out=. --grpc_python_out=. endpoint.proto yac.proto ordering.proto loader.proto
| ise-uiuc/Magicoder-OSS-Instruct-75K |
6.0: 7.0, 7.0: 8.0, 8.0: 9.0, 9.0: 10.0}
testing_utils.assert_deep_almost_equal(self, result['score'], expected)
def test_regression_cat(self):
config = {
'feature': 'cats',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
},
"name3": {
"set repo": {
"info": "13",
"status": REPO_STATUS.SUCCEED
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TestPermissions(TestBase):
def setUp(self):
self.view = MagicMock()
self.permissions = MetaDataObjectPermissions()
self.instance = MagicMock(Instance)
self.instance.xform = MagicMock(XForm)
def test_delete_instance_metadata_perms(self):
request = MagicMock(user=MagicMock(), method='DELETE')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
function strace_stop {
echo "$LOG strace-stop: $1:$2:$3"
STRACE_PIDS_TO_STOP=( "${STRACE_PIDS[@]}" )
echo -n "$LOG strace-stop: Killing Strace instances: "
for a in "${STRACE_PIDS_TO_STOP[@]}"; do stringarray=($a); echo -n "${stringarray[1]} (${stringarray[0]}); "; done
echo ""
# stop strace instances
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from app.users.models import User
class Enterprise(BaseModel):
name = CharField(_("Name of Enterprise"), max_length=255)
members = ManyToManyField(User, through="UserEnterprise", related_name="enterprises")
| 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.