seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
print(X)
"""
[[165349.2 136897.8 471784.1 'New York']
[162597.7 151377.59 443898.53 'California']
[153441.51 101145.55 407934.54 'Florida']
[144372.41 118671.85 383199.62 'New York']
[142107.34 91391.77 366168.42 'Florida']
[131876.9 99814.71 362861.36 'New York']
[134615.46 147198.87 127716.82 'California']
[13... | ise-uiuc/Magicoder-OSS-Instruct-75K |
* Created by PhpStorm.
* User: mac
* Date: 2016/12/6
* Time: 13:48
*/
namespace common\component\Mq;
class Util
{
//计算签名
public static function calSignatue($str,$key)
{
$sign = "";
if(function_exists("hash_hmac"))
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from schemas.item_resp import ItemsResp
from crud.epic_free_game import get_epic_free_game
from utils import get_db
router = APIRouter(prefix="/api", tags=["epic"])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$set: {
token: device.token
}
}, {
upsert: true
}, (error) => {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# yes | pacman -S --needed \
pacman -S --needed --noconfirm \
gnome \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bind = "0.0.0.0:5000"
pidfile = "gunicorn.pid"
workers = multiprocessing.cpu_count()*2 + 1
worker_class = "gevent"
# daemon=True 在docker中不需要daemon运行,反而会导致看不到gunicorn输出而增加排查问题的难度 | ise-uiuc/Magicoder-OSS-Instruct-75K |
from .adapweightsstrategy import AdapWeightsStrategy | ise-uiuc/Magicoder-OSS-Instruct-75K |
str=",".join(li)#adding the lists value together along with a comma
print(str)
str="&".join(li)#adding the lists value together along with a &
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace EnvironmentAssessment.Common.VimApi
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public static GraphicsBitmapLoader Instance { get; } = new GraphicsBitmapLoader();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if canonical_doc_id in id_to_text_features:
if text_features in id_to_text_features[canonical_doc_id]:
print(f'duplicate txt found! file: {basename}')
print(text_features, id_to_text_features[canonical_doc_id])
continue
id_to_text_features[canonical_doc_id].... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/* ---
Roughly looks like:
const validationResult = {
LOGIN: validateLoginCredentials(req.body),
REGISTER: validateRegisterCredentials(req.body)
}
--- */
};
export default validateCredentials;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Json j;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
get type() {
return 'number';
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
],
),
migrations.CreateModel(
name='Room',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('slug', models.SlugField(blank=True, max_length=80, unique=True)),
(... | ise-uiuc/Magicoder-OSS-Instruct-75K |
struct TransactionItem {
let image: UIImage
let desc: String
let name: String
let price: String
var quantity: String
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.device = device
self.model = model
if model is not None:
self.model = self.model.to(self.device)
def encode_image(self, xs, ys, context=2, scaling=10, size=224):
"""
encode an input image x with a bounding box y by including context, croppin... | ise-uiuc/Magicoder-OSS-Instruct-75K |
iter(SweepValues(p))
def test_snapshot(c0):
assert c0[0].snapshot() == {
'parameter': c0.snapshot(),
'values': [{'item': 0}]
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace Elastos {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
h = ( h * 0x85ebca6b ) & 0xFFFFFFFF
h ^= h >> 13
| ise-uiuc/Magicoder-OSS-Instruct-75K |
author="<NAME>",
author_email="<EMAIL>",
license="Apache License 2.0",
entry_points={
'console_scripts': [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
act = tf.nn.relu(input)
tf.summary.histogram("activations", act)
return act
def pool_layer(input, ksize, strides, name="pool"):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import pandas as pd
import os
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
catch (JsonException e)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>1-10
@section Styles {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bed_index = bed_info.index.to_numpy()
bed_sun_req = bed_info.sun.to_numpy()
num_beds = len(beds)
#time dimension
num_years = 3
years = np.array(range(1,num_years+1))
year_index = np.array(range(num_years))
#for keeping track of what axis is which
plant_axis = 0
bed_axis = 1
year_axis = 2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert MyClass.prop2 == 'b'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
id = Column(Integer, primary_key=True)
firstname = Column(String(64))
lastname = Column(String(64))
username = Column(String(16), unique=True)
password = Column(String(93))
status = Column(String(20))
email = Column(String(64), unique=True)
created_at = Column(DateTime, default=datetime.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
Apply certain func against dataframe parallelling the application
:param df: DataFrame which contains the required by func
:param func: func that will be parallelize through df
:param word: to compute the distance using
:param n_cores: thread to parallelize the function
:return: DataFr... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# limitations under the License.
import re
from twisted.internet.defer import CancelledError
from twisted.python import failure
from synapse.api.errors import SynapseError
class RequestTimedOutError(SynapseError):
"""Exception representing timeout of an outbound request"""
def __init__(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.mount('http://', adapter)
self.mount('https://', adapter)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
plt.at(1).show(mesh2, msg2)
plt.interactive().close()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
:param die: if True, raise any exception that was raise in the tasks, defaults to False
:param die: bool, optional
:raises TypeError: raised if the iterable does not contains only zerorobot.task.Task
:return: a list of all the result from the tasks
:rtype: list
"""
results = []
for task ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if "zola-v0-14-1-x86-64-unknown-linux-gnu" not in native.existing_rules():
http_archive(
name = "zola-v0-14-1-x86-64-unknown-linux-gnu",
url = "https://github.com/getzola/zola/releases/download/v0.14.1/zola-v0.14.1-x86_64-unknown-linux-gnu.tar.gz",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == "__main__":
print("*** Task 1D: CUED Part IA Flood Warning System ***")
run()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
kubectl delete -f es-data.yaml --namespace=search &&
kubectl delete -f ingest.yaml --namespace=search &&
kubectl delete -f ingest-svc.yaml --namespace=search
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cout << "Failed: request Faulted: " << R.getFaultText() << endl;
exit(6);
}
return(0);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
inv_vects=[(InventoryType.MSG_BLOCK, block_hash)],
request_witness_data=False
)
logger.trace("Received block cleanup request: {}", block_hash)
node_conn = self.node.get_any_active_blockchain_connection()
if node_conn:
node_conn.enqueue_msg(block_reques... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'variables': {
'apk_name': 'MemConsumer',
'java_in_dir': 'java',
'resource_dir': 'java/res',
'native_lib_target': 'libmemconsumer',
},
'dependencies': [
'libmemconsumer',
],
'includes': [ '../../../build/java_apk.gypi' ],
},
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mainContainer; //<--main container for the this component
ReverseContainer;
ReverseOverlay;
CurrentBox;
constructor() {
this.mobileChecker = mobilecheck(); //<--Init the function
}
ngAfterViewInit(){
console.log("Delete me");
this.SetUpVariables(); // <-- SET UP G... | ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// PostEntity+Extension.swift
// HealiosTest
//
// Created by Eugenio on 12/10/2020.
// Copyright © 2020 Eugenio Barquín. All rights reserved.
//
extension PostEntity {
func mapped() -> Post {
return Post(userId: Int(self.userId),
id: Int(self.id),
title:... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public var endpointUrl: String {
return environment.apiUrl + "/rating/asset/" + assetId
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self,
api_key,
format_string=None,
view_box=None,
country_bias=None,
timeout=DEFAULT_SENTINEL,
proxies=DEFAULT_SENTINEL,
domain='api.pickpoint.io',
scheme=None,
user_agent=None,
ssl_contex... | ise-uiuc/Magicoder-OSS-Instruct-75K |
} else {
return nil
}
}
}
//Non-optional [JSON]
public var arrayValue: [JSON] {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_function2():
assert function2() == 2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
N = int(input())
book = {}
for i in range(N):
name = input()
if name not in book:
book[name] = 1
else:
book[name] += 1
book = list(book.items())
book.sort(key = lambda x : (-x[1],x[0]))
print(book[0][0])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
value = tf.clip_by_value(value, clip_value_min, clip_value_max)
return tf.exp(value)
def add_ignore_empty(x, y):
"""Add two Tensors which may be None or ().
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/static/img/best.png
/static/img/best.svg
/static/img/calendar.svg
/static/img/cci.acorn
/static/img/cci.png
/static/img/design.acorn
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super(OpFeatures, self).execute(slot, subindex, roi, result)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
catalog_path, label_paths, img_paths = build_catalog(TEST_DIRECTORY_PATH,
nb_labels=nb_labels)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
return $this->secure;
}
/**
* {@inheritdoc}
*/
public function setSecure(bool $secure): StubServerConfigInterface
{
$this->secure = $secure;
return $this;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace mattfarina\MarkdownExtra;
use Symfony\Component\Console\Input\InputOption;
/**
* Gets text from StdIn.
*/
class ConvertOptions extends \Fortissimo\Command\Base {
public function expects() {
return $this
->description('Adds the CLI options for conversions.')
->usesParam('inputDefinition'... | ise-uiuc/Magicoder-OSS-Instruct-75K |
use PHPUnit\Framework\TestCase;
/**
* CreateServerRequestTest Class Doc Comment.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__all__ = ['toolkit', 'plugNplay','trace']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<table id="myTable" border="0" >
<thead>
<tr>
<th>Nama</th>
<th>Nama Proyek</th>
<th>Kategori</th>
<th>Dana Sementara</th>
<th>Total Dana</th>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Ok(ProcessingState::Loaded(map))
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
public function apply(Builder $builder, Mapper $mapper);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{!! HTML::script('js/all.js')!!}
</body>
</html>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Where the knot is.
sample_weight: None, array-like (n_samples, )
**kws:
keyword arguments to scipy.optimize.root_scalar
Output
------
avg: array-like or float
"""
out = np.apply_along_axis(func1d=huberized_mean_1d,
arr=values, axis=axis,
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
time.sleep(0.5)
self.gauge.SetValue(self.count)
def onIdle2(self, event):
if self.count2 < 100:
self.count2 += 10
time.sleep(0.2)
self.gauge2.SetValue(self.count2)
if __name__ == "__main__":
app = wx.App()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>reesmanp/typedpy
import json
from typedpy import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let options: [UIApplication.OpenURLOptionsKey : Any] = [:]
_ = CAPBridge.handleOpenUrl(components.url!, options)
}
#if DEBUG
@objc @available(iOS 13.0, *)
func openDebugger(_ sender: UITapGestureRecognizer) {
let debuggerView = Debugger()
let host = UIHo... | ise-uiuc/Magicoder-OSS-Instruct-75K |
new_head = borrow.next.clone();
borrow.next = None;
borrow.prev = None;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif [ \! -e $f.exe ]; then
echo "linking failed";
else
echo "ok";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var grammar = new CoreGrammar();
grammar.Initialize();
var sut = grammar.Rule("CTL");
using (var scanner = new TextScanner(new StringTextSource(input)))
{
var result = sut.Read(scanner);
Assert.Equal(input, result.Text);
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from models.Perceptron import *
from models.Softmax import *
from models.Logistic import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if ! script_path="$(readlink "$0")"; then
script_path="$0";
fi;
cd "$(dirname "$script_path")";
if ! tc_volume="$(git rev-parse --show-toplevel 2>/dev/null)"; then
tc_volume='/trafficcontrol'; # Default repo location for ATC builder Docker images
fi;
# set owner of dist dir -- cleans up existing dist permissions...
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import tensorflow as tf
# TODO: It would be great if we could maintain the example.tensorflow_custom_op package prefix for
# this python_dist()!
from wrap_lib.wrap_zero_out_op import zero_out_op_lib_path
# We make this a function in order to lazily load the op library.
def zero_out_module():
return tf.load_op_libr... | ise-uiuc/Magicoder-OSS-Instruct-75K |
@State var changingBio = User.bio
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for app_name in app_list:
created = Group.objects.get_or_create(name=app_name)
sys.stdout.write(f"\n{app_name}, new={created}")
sys.stdout.write("\n") | ise-uiuc/Magicoder-OSS-Instruct-75K |
from src.models.conversational.emotion_model import EmotionSeq2seq, EmotionTopKDecoder
from src.models.conversational.predictor import Predictor
from src.models.conversational.utils import APP_NAME
from src.models.courses.recommender import Recommender
from src.utils import preprocess
class EmoCourseChat(object):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if cmdItemIsValid[20] == True:
Commands.ui.itemLabelTextBrowser_21.setText(cmdDesc[20])
else:
Commands.ui.itemLabelTextBrowser_21.setText("(unused)")
if cmdItemIsValid[21] == True:
Commands.ui.itemLabelTextBrowser_22.setText(cmdDesc[21])
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
$x->password=<PASSWORD>("<PASSWORD>");
$x->save();
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private lazy var mainStackView: UIStackView = {
let view = UIStackView()
view.axis = .vertical
view.translatesAutoresizingMaskIntoConstraints = false
view.layoutMargins = UIEdgeInsets(top: 12, left: 8, bottom: 12, right: 8)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
BindAttrib(0, "position");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "target: $TARGET, query: $QUERY"
# loop over all
for ALPHA in ${ALPHAS[@]}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
MODELS = {"mtcnn": MTCNNDetector(),
"casclas": CasClasDetector(app.config["PRETRAINED_CASCLAS"]),
"mlp": MLPClassifier(app.config["MLP_WEIGHTS"]),
"svm": SVMClassifier(app.config["SVM"]),
"cnn": CNNClassifier(app.config["CNN_WEIGHTS"]),
"nb": NaiveBayesClassifier(app.co... | ise-uiuc/Magicoder-OSS-Instruct-75K |
print("---CONVERSÃO DE MEDIDAS---")
valor_metros = float(input("Informe o valor em metros à ser convertido: "))
valor_centimetros = valor_metros * 100
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.contrib import admin
from .models import Job
from .models import JobCandidate
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// ScopeOp PkgLength NameString TermList
let name: AMLNameString
let value: AMLTermList
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public int CompareTo(object other)
{
return String.Compare(ToString(), other.ToString(), StringComparison.Ordinal);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
one: `one`,
two: `two`,
array: [`one`, `two`]
}
};
const res = UT.testMerge(restOptsOrig, restOptsMerger);
assert.deepStrictEqual(res, result)
});
});
}); | ise-uiuc/Magicoder-OSS-Instruct-75K |
actor['preferredUsername'],
actor['displayName'], 1, 0)
elif t.is_share():
original_tweet = t.data['object']
actor = original_tweet['actor']
print '"{}","{}","{}","{}",... | ise-uiuc/Magicoder-OSS-Instruct-75K |
routersD = {}
routerId = 0
file_sno = 1
for curr_file in fnames:
with open(DATA_DIR+ '/' + curr_file) as f:
G = nx.DiGraph()
G.add_nodes_from(range(7716))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
57.5
"""
# 此处可 import 模块
"""
@param string line 为单行测试数据
@return string 处理后的结果
"""
def solution(line):
# 缩进请使用 4 个空格,遵循 PEP8 规范
| ise-uiuc/Magicoder-OSS-Instruct-75K |
print(numpy.shape(inputs))
weights = [[4.1, -4.5, 3.1, 2.3],
[-4.1, 4.5, 2.1, 2.3],
[4.1, 4.5, 3.1, -2.3]]
print(numpy.shape(weights))
biases = [1, 2, 3]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
@ConfigReader<FileAttachmentConfig>()
export class FileAttachmentConfig {
static kind = 'FileAttachment';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Html.LabelFor(x => x.Title)
</label>
<span>
@Html.DisplayFor(x => x.Title)
</span>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<?php endif; ?> | ise-uiuc/Magicoder-OSS-Instruct-75K |
<View style={[padding.medium, margin.horizontal.large]}>
<TouchableOpacity
onPress={async () => {
await accountService.networkConfigSet({
accountId: ctx.selectedAccount,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# resnext
# TODO:
# add augmentation
# increase image size
# use better architectures | ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
_upload_data()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
context.resume();
} catch (e) {
void e; // yeet
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
bash stop-dfs.sh
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fmt = '{:' + str(num_digits) + 'd}'
return '[' + fmt + '/' + fmt.format(num_batches) + ']'
def adjust_learning_rate(optimizer, epoch, args):
"""Decay the learning rate based on schedule"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// IDPDesign
//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# The isBadVersion API is already defined for you.
# @param version, an integer
# @return a bool
# def isBadVersion(version):
class Solution(object):
def firstBadVersion(self, n):
start = 1
end = n
while start + 1 < end:
mid = start + (end - start) / 2
if isBadVersi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
skf_control=device('nicos.devices.epics.pva.EpicsMappedMoveable',
description='Used to start and stop the chopper.',
readpv='{}Cmd'.format(pv_root),
writepv='{}Cmd'.format(pv_root),
requires={'level': 'user'},
mapping={'Clear chopper': 8,
'Start chopper': 6,
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
</td>
<td>
@if(key_exists('as', $route->action))
| 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.