seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
# where to look for mongo helper scripts
MONGO_SCRIPTS_PATH=$DOTFILES/mongo/scripts
mongoshell() {
mongo --shell $* $(ls $MONGO_SCRIPTS_PATH/*.js 2>/dev/null)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from ....dochelpers import exc_str
from ....tests.utils import assert_true, assert_raises, assert_false
from ....tests.utils import SkipTest
from ....tests.utils import with_tempfile, skip_if_no_network, use_cassette
from ....tests.utils import skip_if_url_is_not_available
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# The Universal Permissive License (UPL), Version 1.0
#
# Subject to the condition set forth below, permission is hereby granted to any
# person obtaining a copy of this softw... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def get_optional_attributes(self):
val = frappe.cache().hget('optional_attributes', self.item_code)
if not val:
self.build_cache()
return frappe.cache().hget('optional_attributes', self.item_code)
def get_ordered_attribute_values(self):
val = frappe.cache().get_value('ordered_attribute_values_map')
if... | ise-uiuc/Magicoder-OSS-Instruct-75K |
subString(hex_str,hex_str.length());
// cout << hex2dec(hex_str) << endl;
return 0;
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
import UIKit
@objc protocol SwitchCellDelegate {
@objc optional func switchCell(switchCell: SwitchCell, didChangeValue value: Bool)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
catch (System.InvalidCastException)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//EUMeterRenderer *euMeter=new EUMeterRenderer(*ICPE::pMinecraftGame);
//euMeter->show();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
answer = sr.err(ref, names)
else:
ref = {k: float(v) for k, v in ref.items()}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
q1 = None
with AppState.Database.CONN.cursor() as cur:
if tag_name is not None and tag_name != 'global':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
public function showOffer(){
return view('Frontend.Layouts.User.offerFront');
}
public function showBlog1(){
return view('Frontend.Layouts.User.offerBlog1');
}
public function showBlog2(){
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return true;
MEMORY_BASIC_INFORMATION mbi = { 0 };
for (SIZE_T addr = (SIZE_T)nearest; addr > (SIZE_T)nearest - 0x80000000; addr = (SIZE_T)mbi.BaseAddress - 1)
{
if (!VirtualQuery( (LPCVOID)addr, &mbi, sizeof( mbi ) ))
break;
if (mbi.State == MEM_FREE)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('manage_chat', '0006_poll_hash_value'),
]
operations = [
migrations.AlterField(
model_name='poll',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
} catch (TypeError $exception) {
echo $exception->getMessage() . "\n";
}
}
?>
--EXPECT--
string(1) "a"
string(3) "f6e"
string(3) "f6e"
string(1) "3"
string(2) "5f"
string(1) "a"
string(3) "f6e"
string(3) "f6e"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export class ListenerTemplate {
public name: string;
public port: number;
public certificate: string | null = null;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.seed()
self.s = np.array([int(categorical_sample(self.isd, self.np_random))])
self.max_episode_length = 200
self.episode_length = 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mehadia = Vertice('Mehadia')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return metadata['collector']['sensors'][sensor_key]['name']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$result = $query->row();
return $result;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
from ..coordinator import TahomaDataUpdateCoordinator
from ..tahoma_entity import TahomaEntity
_LOGGER = logging.getLogger(__name__)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<p>
{!! __(
'emails/projects/members.created.message',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
machineHash = document["machineHash"].GetString();
}
else if (document.HasMember("payload"))
{
machineHash = document["payload"].GetString();
isEntitlementsV3 = true;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
average_sales=total/len(sales)
print('Average sales are:', average_sales)
average_sales()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TestSparse(models.TransientModel):
_name = 'sparse_fields.test'
_description = 'Sparse fields Test'
data = fields.Serialized()
boolean = fields.Boolean(sparse='data')
integer = fields.Integer(sparse='data')
float = fields.Float(sparse='data')
char = fields.Char(sparse='data')
sele... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>resources/build.sh
#!/bin/bash
set -e
mvn -B clean verify package "$@"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
RC=$?
echo "RC=${RC}"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fontsize=10,
)
yBlockLoc += blockHeight
yBlockHeights.append(yBlockLoc)
# Add location, block heights, and axial mesh points to ordered set
yBlockAxMesh.add((yBlockCenterLoc, blockHeight, b.p.axMesh))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ble_address_type = {
'gap_address_type_public': 0,
'gap_address_type_random': 1
}
gap_discoverable_mode = {
'non_discoverable': 0x00,
'limited_discoverable': 0x01,
'general_discoverable': 0x02,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from app.models import Log
| ise-uiuc/Magicoder-OSS-Instruct-75K |
user_request.set_custom_attr("trainingProportion", "1")
user_request.set_custom_attr("trainingIndexes", [])
otu_table = AnalysisTestUtils.get_test_npz_as_table(AnalysisTestUtils.SIMPLE_TEST_CASE_ROOT)
headers, sample_labels = AnalysisTestUtils.get_test_input_as_metadata(AnalysisTestUtil... | ise-uiuc/Magicoder-OSS-Instruct-75K |
parsed = ast.parse(body)
body = parsed.body[0].body
insert_returns(body)
env = {
"this": ctx,
"ctx": ctx,
"db": self.bot.db,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// evaluate tensor map operation using tensor engine immediate api
struct ImmediateMap : Eval {
std::function<double(double)> function;
ImmediateMap(const std::function<double(double)> &function_in) : function(function_in) {}
Result eval(const TensorEngine &engine, const TensorSpec &a) const override {
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.__intep = None
else:
logger.debug('Found {}'.format(repr(self.__inep)))
logger.debug('Found {}'.format(repr(self.__outep)))
logger.debug('Found {}'.format(repr(self.__intep)))
self.__cfg = cfg
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if Selectable::new(im_str!("Simple Clone")).build(ui) {
clone_action = Some(MirrorPlane::None);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with open(html_file, mode='w') as outfile:
outfile.write('<html>\n')
outfile.write('<head>\n<title>Python Weather HTML</title>\n</head>\n\n')
outfile.write('<body>\n')
outfile.write('<div style="margin: 0 auto; width: 40%">\n')
outfile.write( '<tr><td align="center"> </t... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if (x == cursor_x) inv ^= 0xff;
mem = (2*(ma + x)) & 0xfff;
chr = m_p_videoram[mem] & 0x3f;
if (ra < 8)
gfx = MHB2501[(chr<<3) | ra] ^ inv;
/* Display a scanline of a character */
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* <p>
* AndDirective
* </p>
*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from fileutil.utils import find_file_name_without_suffix
from fileutil.utils import find_compressed_files
from fileutil.utils import remove_dir
from fileutil.utils import remove_subdir
from fileutil.utils import find_files
from fileutil.utils import copy_dir
from fileutil.utils import write_to_file
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.to.equal('PGRpdiB4bWxucz0Pg==');
});
it('should decompose a data URI with charset without encoding', () =>
{
const dataUri = utils.decomposeDataUri('data:image/svg+xml;charset=utf8,PGRpdiB4bWxucz0Pg==');
expect(dataUri)
.to.be.an('object... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from .base import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
email: email,
device: device) { jwtToken in
if let jwtToken = jwtToken {
StorageManager<String>(type: .JWTToken).store(jwtToken)
}
completion(jwtToken)
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from flask import Flask
from flask_cors import CORS
app = Flask(__name__)
CORS(app)
if 'CONFIG_FILE' in os.environ and os.environ['CONFIG_FILE']:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Test case found by fuzzing
var:{{{{struct S{let a{{{}class A{let a{class A{enum A{{{{{}}}}}enum A<f:f.c{let c{func a{{{{{{{}}}{{{{var:{let c{{{{a:{{extension
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print("Error: you should pass 2 arguments: [link_to_download_from] [path_to_save_downloaded_file]")
exit(1)
url = sys.argv[1]
r = requests.get(url, allow_redirects=True)
open(sys.argv[2], 'wb').write(r.content)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
slow.Value.duration -= Time.deltaTime;
if (slow.Value.duration <= 0f)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.w.lineView = MultiLineView((0, 0, -0, -0),
pointSize=30,
selectionCallback=self.lineViewSelectionCallback)
self.w.lineView.setFont(font)
glyphs = []
for glyphName in font.glyphOrder:
glyphs.append(font[glyphName])
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
clock_size = int(180 * scale)
clock_style_id = "ClockLabel{}.TLabel".format(window_id)
style.configure(clock_style_id, font="Helvetica {} bold".format(clock_size))
entry_style_id = "{}.TEntry".format(window_id)
style.configure(entry_style_id,
foreground=s... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
@Published var currentHotkeyLabel: String = UserDefaults.globalKey?.description ?? "Set Hotkey"
@Published var isListenningForHotkey: Bool = false
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
s.push("Sensor IR")
s.push("Cables")
s.push("Freescale microcontroller")
# Check stack now
print("\nNEW STACK:\n", s)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
ThreadContext context) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
relex_socket.sendall(relex_sentence.encode('utf-8'))
# Read the first parts
received_message = relex_socket.recv(1024)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class RecordingsFilter(django_filters.FilterSet):
class Meta:
model = Recordings
| ise-uiuc/Magicoder-OSS-Instruct-75K |
false
}
fn emitted(&self, ray_in: &Ray, hit_record: &HitRecord) -> ColorRGB {
if glm::dot(ray_in.direction, hit_record.normal) < 0.0 {
self.emit
.value(&hit_record.uv, &hit_record.position)
.truncate(3)
} else {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>app/src/constants.py<gh_stars>1-10
friendly_camera_mapping = {
"GM1913": "Oneplus 7 Pro",
"FC3170": "Mavic Air 2",
# An analogue scanner in FilmNeverDie
"SP500": "Canon AE-1 Program"
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
local_set = 'vault read -field={} {}'.format(vault_args[1],vault_args[0])
sets["dry"] += '--set {}="$({})" '.format(key,local_set)
if vault_args[0]+"_"+vault_args[1] in cache:
secret = {"out": cache[vault_args[0]+"_"+vault_args[1]],"retcode": 0}
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
alt -5 {
-5 {}
_ { fail }
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
case 'pointerdown':
this.onDownPosition.x = event.offsetX;
this.onDownPosition.y = event.offsetY;
break;
case 'pointerup':
this.onUpPosition.x = event.offsetX;
this.onUpPosition.y = event.offsetY;
if (
this.transformControl !== null &&
this.onDownPosition.distanceTo(this.onUpPosi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
agents = history_agents[frame_ind]
vehicle_agents = filter_vehicle_agents_by_labels(agents, self.filter_agents_threshold)
for agent in vehicle_agents:
add_agent_info_to_dict(agent, rel_time, vehicle_dict)
nonvehicle_agents = filter_nonvehicle_agents_b... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with ldap3 in the COPYING and COPYING.LESSER fi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.argument_name = argument_name
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo $result; | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
GlobalCommandController& CommandCompleter::getGlobalCommandController() const
{
if (auto globalCommandController =
dynamic_cast<GlobalCommandController*>(&commandController)) {
return *globalCommandController;
} else {
return checked_cast<MSXCommandController*>(&commandController)
->getGlobalCommandCon... | ise-uiuc/Magicoder-OSS-Instruct-75K |
make.top.equalToSuperview().inset(10)
make.left.equalTo(self.title.snp.right)
make.height.equalTo(self.title)
make.right.equalToSuperview().inset(20)
}
company.snp.makeConstraints { (make) in
make.top.equalTo(self.title.snp.bottom)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public function bombardStrength()
{
$ret = 0;
foreach( $this->units as $unit )
{
$ret += $unit->bombardStrength();
}
foreach( $this->armies as $army )
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if (options->HasKey(constants::kEnqueueKey)) {
EXTENSION_FUNCTION_VALIDATE(
options->GetBoolean(constants::kEnqueueKey, &can_enqueue));
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
match Arch::native() {
Arch::X86_64 => Arch::ARM,
_ => Arch::X86_64,
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__=='__main__':
outlookEnum = {'Sunny': 1, 'Overcast': 2, 'Rain': 3}
tempEnum = {'Hot': 1, 'Mild': 2, 'Cool': 3}
humidityEnum = {'High': 1, 'Normal': 2}
windEnum = {'Weak': 1, 'Strong': 2}
targetEnum = {'Y': 10, 'N': 5}
data = []
lines = csv.reader(open('nb_data.csv'))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(664, 478);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this._btnParse,
this._txtInput,
this._lithiumControl});
thi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
" any executed tools will be printed without modification.",
)
class SilentExecutor(_ExecutorBase):
"""This executor class runs and logs nothing except errors."""
def message(self, msg):
pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public const PREPEND_KEY = 'ilios.jwt.key.';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__license__ = "MIT"
import os
# Welcome
print("\n\n")
print(" _______ __ __ _______ _______ _______ _______ _______ _______ _______ ______ ___ _______ _______ ")
print("| _ || | | || || | | _ || || | | || || _ | | || || |")... | ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
duration = None
if duration is None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def main():
try:
asyncio.run(start_payment_server())
except KeyboardInterrupt:
asyncio.run(stop())
if __name__ == "__main__":
main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub fn internal_server_error(msg: &str) -> HttpResponse {
HttpResponse::InternalServerError().json(error_msg(msg))
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
xs = xs.view(batch, K, 1)
ys = ys.view(batch, K, 1)
wh = _transpose_and_gather_feat(wh, inds)
wh = wh.view(batch, K, 3)
kept_offset = _transpose_and_gather_feat(kept[:, :4*grid_size, :, :], inds)
kept_offset = kept_offset.view(batch, K, 4*grid_size)
_, kept_offset = torch.max(kept_offset, d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
type: Object as PropType<Record<string, any>>,
default: null
}
},
emits: ['scroll'],
setup(props, { emit, slots, attrs, expose }) {
const nh = useNameHelper('virtual-list')
const { items, itemSize, itemFixed, idKey, defaultKeyAt, bufferSize } = toRefs(props)
const scroll = ref<Instanc... | ise-uiuc/Magicoder-OSS-Instruct-75K |
nginx
else
exec "$@"
fi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# hint, the empty tuple;
()
if hints_forwardref_class_basename is None else
# Else, that set converted into a tuple.
tuple(hints_forwardref_class_basename)
),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self._storage_allocated = None
self._storage_used = None
self._storage_used_by_table_space = None
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>LinkedList/LinkedListCycleII.py
# https://leetcode.com/problems/linked-list-cycle-ii/
from ListNode import ListNode
class Solution(object):
def detectCycle(self, head):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from functools import partial
import torch
from e3nn import o3
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func testPikachuEggGroup() {
XCTAssertEqual(pikachu.species.eggGroupOne, .field)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import click
from rakali import VideoPlayer
from rakali.annotate import add_frame_labels, colors
from rakali.video import VideoStream
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
def decorate_frame(frame, source):
img = add_frame_labels(
frame=frame,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if(report_size != 0)
{
const ssize_t status = sendto(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if using_fine:
fine_loss = self.rgb_fine_crit(fine.rgb, all_rgb_gt)
rgb_loss = rgb_loss * self.lambda_coarse + fine_loss * self.lambda_fine
loss_dict["rf"] = fine_loss.item() * self.lambda_fine
loss = rgb_loss
if is_train:
loss.backward()
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
r'focal length lens: {:4.2f} cm'.format(f/cm) + '\n\n' +\
| ise-uiuc/Magicoder-OSS-Instruct-75K |
python bert_command_line.py --config ./command_line_config.yaml
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from users.models import Profile
class Post(models.Model):
description = models.CharField(max_length=255)
picture = models.ImageField(upload_to='posts', blank=True)
date_posted = models.DateTimeField(auto_now_add=True, auto_now=False)
owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=model... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return _combine_combiner(lst, orders, xlst)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Created by admin on 16/5/5.
// Copyright © 2016年 郭月辉. All rights reserved.
//
import UIKit
import SnapKit
let statusCellMarginEight: CGFloat = 8
private let statusCellMarginTen = 10
| ise-uiuc/Magicoder-OSS-Instruct-75K |
break
elif result < target:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __contains__(self, day):
delta = day - self.start
return datetime.timedelta(seconds = 0) <= delta and delta < self.length
def overlaps(self, other):
if other.start < self.start:
return other.overlaps(self)
assert(self.start <= other.start)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
});
it('returns community_member', () => {
expect(getAnalyticsAssignmentType(false, true)).toEqual('community_member');
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# A helper to run a Metronome job as root to clean up the NFS share on an agent.
# We define this here so that it can be used during error handling.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import { ctx } from "../types";
export declare function notfound(ctx: ctx): Promise<any>;
export default notfound;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public enum States {
hide,
hiding,
show,
showing,
}
private States state;
/// <summary>
/// State
/// </summary>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
lst.sort()
print lst | ise-uiuc/Magicoder-OSS-Instruct-75K |
// All Rights Reserved.
//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// MARK: - ARSCNViewDelegate (Image detection results)
/// - Tag: ARImageAnchor-Visualizing
func renderer(_ renderer: SCNSceneRenderer, didAdd node: SCNNode, for anchor: ARAnchor) {
guard let imageAnchor = anchor as? ARImageAnchor else { return }
| 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.