seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
});
}
pushWarning = () => {
this.pushItem({
type: 'warning',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return GetActualLength() / SamplePerSeconds;
}
public int GetLeadNumber()
{
return this.Leads.Length;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Copyright (c) 2019, Apple Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
parent::__construct($env);
$this->blocks = array(
'head' => array($this, 'block_head'),
'content' => array($this, 'block_content'),
);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
current_url = '{0}:{1}'.format(match.app_name, match.url_name)
changelist_url = '{0}:{1}_{2}_changelist'.format(
self.admin_site.name,
self.opts.app_label,
self.opts.model_name)
if current_url == changelist_url:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/usr/bin/env python
# coding: utf-8
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# reset and try again at the next output (see this class'
# tor_connection_failed)
txtorlog.msg(data)
if not self.attempted_connect and self.connection_creator \
and b'Bootstrap' in data:
self.attempted_connect = True
# hmmm, we don't "do" anything... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# Go for it!
parser.run()
# Get results
results = parser.get_results()
'''
data=app.get_all()
with open('iii.json', 'w') as outfile:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
afternoon_2_msg = "Drink a glass of water. Stay hydrated, @everyone!"
afternoon_3_msg = "Get up and stretch! @everyone."
afternoon_4_msg = "Go out and breathe before the evening sync. @everyone."
evening_1_msg = "Do some stretches! @everyone."
evening_2_msg = "Drink water. Good night, @everyone."
# Handler f... | ise-uiuc/Magicoder-OSS-Instruct-75K |
disp_help(argv[0]);
return 0;
case 'r':
if (1!=sscanf(optarg,"%s",rangeChar))
{
cout << "error ==> wrong format of " << optarg << endl;
}
break;
case 'c':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def ajaxresponse(request, txt):
return render(request, 'signuplogin/ajaxresponse.html', {'response':txt}) | ise-uiuc/Magicoder-OSS-Instruct-75K |
Oxygen("Oxygen"),
Carbon_Dioxide("CarbonDioxide"),
Sulphur_Dioxide("SulphurDioxide"),
Ammonia("Ammonia"),
Methane("Methane"),
Nitrogen("Nitrogen"),
Hydrogen("Hydrogen"),
Helium("Helium"),
Neon("Neon"),
Argon("Argon"),
Silicates("Silicates"),
Iron("Iron");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
modalIsOpen: action.payload,
}),
};
return (action?.type && reducers?.[action.type] && reducers?.[action.type]()) || state;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_check_win_loser(self):
p1 = {1, 3, 4, 5, 8}
assert check_win(p1) == False
def test_check_win_winner(self):
p1 = {1, 3, 5, 6, 7, 8}
assert check_win(p1) == True
class TestWinningCombinations:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// if the default screen widget is being enabled/disabled the key will be pref_default_widget
} else if (key.equals("pref_default_widget")) {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
:return: None
"""
if confirm == 'y' or confirm == 'yes':
remove_file(filename)
elif confirm == 'n' or confirm == 'no':
print("File will stay there")
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Transaction id of file prior to modifications
user : User
User performing the ingest
Returns
-------
txid : str
Transaction id if commit is successfull
"""
file_path = os.path.abspath(file_path)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
exit 1
;;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub const LOG_PREFIX: &str = "[Registry Canister] ";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sleep 0.5
| ise-uiuc/Magicoder-OSS-Instruct-75K |
When a Pet() is created, the hunger value must be an integer.
This is an infinite search space, so just settle for a few
basic types for bad data type checking.
"""
if isinstance(bad_type, (str, float)):
# These types *could* be cast by the user as I do here. This
| ise-uiuc/Magicoder-OSS-Instruct-75K |
df.loc[:, c] = df.loc[:, c] * 2.5
score = df.sum(axis=1)
print('###### System Usability Score ######')
print(df.mean(axis=0))
print(score.mean(), score.std())
print('\n\n')
def print_visual_design(df: pd.DataFrame):
de = df[df['Role'] == 'domain expert']
ar = df[df['Role'] == 'au... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// Copyright © 2018 App-o-Mat. All rights reserved.
//
import Foundation
import Intents
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.assertEqual("I don't understand type <class 'test_readme.Rope'>", str(e.exception).replace('tests.', ''))
if __name__ == '__main__':
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
impo... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return this.skins[0].geometry;
}-*/;
public native final JsArrayString getJoints()/*-{
return this.skins[0].skinController.skin.joints;
}-*/;
public native final JsArray<JsArray<WeightData>> getWeights()/*-{
return this.skins[0].skinController.skin.weights;
}-*/;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return tag.name == "a" and href and "/user/" in href
| ise-uiuc/Magicoder-OSS-Instruct-75K |
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
});
}
if (qp.code) {
delete oauth2.state;
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
l1=[1,2,3,4,5,6,7,8,9,10]
l2=list(map(lambda n:n*n,l1))
print('l2:',l2)
l3=list((map(lambda n,m:n*m,l1,l2)))#map function can take more than one sequence argument
print('l3:',l3)
#if the length of the sequence is not equal then function will perform till same length
l3.pop()
print('popped l3:',l3)
l4=list(map(lambda n,... | ise-uiuc/Magicoder-OSS-Instruct-75K |
pub fn ok<T>(_t: &T) -> &'static str {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
docReader.Dispose();
}
_ctx.Dispose();
base.Dispose();
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fifo_in_name = base_name + "-" + str(i) + ".in"
fifo_out_name = base_name + "-" + str(i) + ".out"
os.system("mkfifo " + fifo_in_name)
os.system("mkfifo " + fifo_out_name)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import torch
import torch.nn as nn
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def add_render(self):
self.rendering = True
if self.rendering:
for child in self.children:
child.add_render()
def stop_render(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
JSON_AS_ASCII = False
JSONIFY_MIMETYPE = "application/json; charset=utf-8"
class ProdConfig(Config):
DEBUG = False
PAGE_SIZE = 50
MYSQL_DB = "avaandmed"
MYSQL_HOST = "localhost"
class DevConfig(Config):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# frame for parameters of 3D plot
self.Frame3DPlotParam = tk.LabelFrame( self.Frame3DPlot, width = 410, height = 150, text = "Parameters" )
self.Frame3DPlotParam.place( x = 3, y = 65 )
def InitLabel( self ):
self.Init3DPlotLabel()
def InitEntry( self ):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print_board function.
"""
board_dict = {}
for type, tokens in data.items():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
struct Break {}
fn r#break(context: CommandContext) -> CrushResult<()> {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import logging
from eris.decorators import BaseDecorator
from eris.events.hooks import Hook as EventHook
LOGGER = logging.getLogger(__name__)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('canfd2', CANFD_SETTINGS),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"Examples:\n"
"- **{0} {10} 1 _https://example.com Example presentation_** "
"- will add an presentation and sends notification in the first room\n"
"- **{0} {5} 2 _Why we are expensive?_** - will manually insert FAQ in the room number 2\n... | ise-uiuc/Magicoder-OSS-Instruct-75K |
-------
None : :class:`NoneType`
"""
result = mutator.mutate(record)
assert (
result.get_mutator_name() == mutation_record.get_mutator_name()
)
is_equivalent(
result.get_molecule_record().get_molecule(),
mutation_record.get_molecule_record().get_molecule(),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
PageWrapper,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
// MARK:- GPX
override func addChildTag(toGPX gpx: NSMutableString, indentationLevel: Int) {
super.addChildTag(toGPX: gpx, indentationLevel: indentationLevel)
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
try:
self.collection = self.db[collection]
self.collection.insert_many(documents)
except Exception as e:
print(e)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'schemes': [
'http'
],
'tags': [
{
'name': '계정',
'description': '계정 관련 API'
},
{
'name': '도서관',
'description': '도서관 가입과 탈퇴에 관한 API'
},
{
'name': '책',
'description': '도서관의 책 관리에 관한 API'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cap.set(3, xres)
cap.set(4, yres)
return cap
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#if _runtime(_ObjC)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private var appDelegate: AppDelegate {
return NSApplication.shared.delegate as! AppDelegate
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def best_fit_slope_and_intercept(xs, ys):
m = ((mean(xs) * mean(ys)) - mean(xs * ys)) / (mean(xs)**2 - mean(xs**2))
b = mean(ys) - m * mean(xs)
return m, b
m, b = best_fit_slope_and_intercept(xs, ys)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif [[ "$unamestr" == "Darwin" ]]; then
LIBRARY_NAME_SUFFIX=dylib
else
LIBRARY_NAME_SUFFIX=dll
fi
# make sure that we are under project folder
mkdir -p build
pushd build
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if name:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"/tender/tenderPeriod/durationInDays",
"/tender/minValue/amount",
"/tender/minValue/currency",
"/tender/value/amount",
"/tender/value/currency",
"/tender/items/0/id",
"/tender/items/0/description",
"/tender/items/0/quantity",
"/tender/items/0/unit/scheme",
"/tender/items/0/unit/i... | ise-uiuc/Magicoder-OSS-Instruct-75K |
]
@property
def versions_in_stock(self) -> List[PS5Version]:
return [availability.version for availability in self.in_stock_availabilities]
class Config:
json_loads = orjson.loads
json_dumps = orjson_dumps
| ise-uiuc/Magicoder-OSS-Instruct-75K |
layers += [nn.Linear(sizes[j], sizes[j + 1]), act()]
return nn.Sequential(*layers)
class Actor(nn.Module):
def _distribution(self, obs):
raise NotImplementedError
def _log_prob_from_distribution(self, pi, act):
raise NotImplementedError
def forward(self, obs, act=None):
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* The incident's attributes for a create request.
*/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using ::testing::status::StatusIs;
} // namespace
class RsaFdhBlinderTest : public ::testing::Test {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
index.occurencesOfToken("SwiftKey", completion: { (tokenIndexData) -> () in
guard let tokenIndexData = tokenIndexData else {
XCTFail("No token index data was found")
return
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from nltk.corpus import wordnet as wn
all_synsets = set()
for word in wn.words():
for synset in wn.synsets(word):
all_synsets.add(synset)
with open("wordnet_synset_definition.txt", "wb+") as fp:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
($ctx:expr, $argument:expr) => {{
$ctx.respond($argument).await;
}};
($ctx:expr, $($t:tt)*) => {{
$ctx.respond(&format!($($t)*)).await;
}};
}
/// Backoff and retry until the given action has been successfully executed.
#[macro_export]
macro_rules! retry_until_ok {
($id:expr, { $($f... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if (res.isEmpty()) {
Logger.log(
this.level, this.origin,
"Failed to authenticate '%s' user via %s",
username, this.origin
);
} else {
Logger.log(
this.level, this.origin,
"Successfully au... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# If a multi-arm environment has been chosen, choose configuration and appropriate robot(s)
options["robots"] = choose_robots(exclude_bimanual=True)
options["task"] = choose_task()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
type = {
id: '',
code: '',
//name: '',
allowAddToCart: false
}
constructor(
private _sanitizer: DomSanitizer,
private fb: FormBuilder,
private translate: TranslateService,
private router: Router,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Expected splice
i = b.loadInt(42)
f = b.loadFloat(13.37)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@app.route('/')
@app.route('/api')
def home():
return flask.redirect('https://gadhagod.github.io/Hyrule-Compendium-API')
if __name__ == '__main__':
app.run() | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
# Don't use pd.Timedelta:
# pd.Timestamp('2000-12-30 07:30') + pd.Timedelta(1, unit='M') == Timestamp('2001-01-29 17:59:06')
dt = pd.Timestamp(dt)
return pd.Timestamp(pd.Timestamp(dt).to_pydatetime() + relativedelta(years=years, microseconds=microseconds))
def get_max_min_mean(df, beg_datetime... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
None => (),
}
}
for name in cache {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# for p in process_list:
# p.terminate()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var viewmodel = DataContext as NodesViewModel;
var viewItem = viewmodel.Selected;
if (viewItem == null)
return;
var tab = new NodeViewModel(viewmodel.Cluster, viewItem);
shell.OpenTab(tab);
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
INSTALLDIR=$(pwd)
SYSTEMD_DIR="/etc/systemd/system"
echo "Creating ${stringZ:0}..."
adduser --system asdf
echo $(run some command using $INSTALLDIR)
X=`command with backticks`
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[no_mangle]
pub extern "C" fn init() {
let _config = hostcall::config().unwrap();
Registration::transform().register().unwrap();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return padded_data
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Register your models here.
@admin.register(CustomerProfile)
class CustomerProfileAdmin(admin.ModelAdmin):
list_display = [
'user',
'phone_no',
'dob',
] | ise-uiuc/Magicoder-OSS-Instruct-75K |
def model_verbose_name_plural(obj):
"""
Returns the pluralized verbose name of a model instance or class.
"""
return model_options(obj).verbose_name_plural
def model_app_label(obj):
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export enum AppRoutes {
join = "join",
whitepaper = "whitepaper",
swap = "swap",
}
export interface SwapRouteType {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
slowNode = pr.node
otherNodes = [n for n in txnPoolNodeSet if n != slowNode]
for n in otherNodes:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if [ "$libpath" ]
then
echo "Already installed at $libpath, checking version"
version=`"$libpath" -v`
if [ "$version" == "$VERSION" ]
then
echo "The version is $version, no need to replace."
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*Denary Logarithm*
"""
from dataclasses import dataclass
import jax.numpy as jnp
from ._operator import Logarithm
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.rt.clock_start = starting_time
#Trigger upon CMD_transmit_word arrival
self.rt.on(Event_RT_TRS_CMD, self.find_RT_tcmd)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[JsonProperty("args")]
public JArray Parameters;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
git clone https://github.com/littlevgl/lvgl.git --branch v5.3
fi
$makewrap -f Makefile_wasm_app
$makewrap -f Makefile_wasm_app_no_wasi
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace RA.Models.Navy.Json
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
symbols = SparseIntSetType.Instance.Union(csets);
}
public void AddInputSet(IntSet cset) { symbols = symbols.Union(cset); }
public IntSetType SymbolSetType { get { return SparseIntSetType.Instance; } }
public int EoiSymbol { get { return RegularTree.EoiChar; } }
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
cv2.imshow('closing', closing) #show image in a window named "closing"
cv2.imshow('gradient', gradient) #show image in a window named "gradient"
cv2.imshow('tophat', tophat) #show image in a window named "tophat"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@endforeach
</div>
</div>
</div>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def sync(self, db: Session):
for script in self.scripts:
try:
directory = os.path.join(self.root_directory, script)
print(directory)
sql = open(directory, "r").read()
db.execute(sql)
db.commit()
print... | ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace Netfox.Detective.ViewModels
{
/// <summary>
/// Use as a base class of any singletonouse investigation related ViewModel docked in panes
/// </summary>
public abstract class DetectiveInvestigationPaneViewModelBase : DetectivePaneViewModelBase
{
protected DetectiveInvestigation... | ise-uiuc/Magicoder-OSS-Instruct-75K |
for ID in exp_dt[gene_name]:
if ID!="Total":
print '\t'.join([ID, str(exp_dt[gene_name][ID]), str(exp_dt[gene_name]["Total"])] )
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from __future__ import absolute_import
from django.conf import settings
from django.core.management.base import BaseCommand
from elasticsearch import Elasticsearch
class Command(BaseCommand):
"""Clear elasticsearch index."""
def handle(self, *args, **options):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
net = tfl.conv2d(net, num_filters, kernel_size, stride, activation_fn=tf.identity, padding="SAME")
# normalize the output
net = tfl.batch_norm(net, is_training=is_training, activation_fn=tf.identity)
# now convolve again but do not downsample
net = tfl.conv2d(net, num_filters, kernel_size, stride=... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# * `base_url`: string of DeansList base ULR for your schools
# * `end_points`: dict of DL endpoints to hit
import base64
import ast
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with open("lingoshell/languages.csv", mode="r") as csv_file:
keywords = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* @returns Called when websites' local storage has been cleared.
*/
removeLocalStorage(options: RemovalOptions): Promise<void>;
/**
* Clears plugins' data.
*
* @param options
* @returns Called when plugins' data has been cleared.
*/
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
urlpatterns = [
path('login/', obtain_jwt_token),
] | ise-uiuc/Magicoder-OSS-Instruct-75K |
* get the timing model attribute
* which allows timing model chaining
*/
generic_attribute_t
get_timing_model( SIMULATOR_GET_ATTRIBUTE_SIGNATURE )
{
osamod_t *pOsaTxm = (osamod_t *)obj;
return GENERIC_ATTRIFY(pOsaTxm->timing_model);
}
/**
* set_caches()
* set the list of caches,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public vPWTSB()
{
InitializeComponent();
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
filtering on the 'FilterData' key
"""
self.ex = HelperExperiment()
ev = IPETEvaluation(index="Index", indexsplit="1")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.module_cli.get_drive_folder_children = origin_func
def test_mock_self_func_get_drive_file_statistics(self):
origin_func = self.module_cli.get_drive_file_statistics
self.module_cli.get_drive_file_statistics = mock
with pytest.raises(pylark.PyLarkError) as e:
self.mo... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return capturer;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class Set:
"""Implements a set using BinarySearchTree"""
__slots__ = ("data",)
| 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.