seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
template<typename S, typename ... Strings>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import random
from zipfile import ZipFile
rootPath = '..\..\dataAndModel\data\mnist\\'
for file in ["train", "test"]:
path = rootPath + file
print(os.listdir(path))
# %%
image_paths = [rootPath + 'train\\' + file for file in os.listdir(rootPath + 'train') ]
# %%
image_paths
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Created on Apr 9, 2014
@author: dfleck
'''
class MessageCache(list):
'''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class JonSubmission(SubmissionPy):
def run(self, s):
l = [int(x) for x in s.strip().split()]
n = len(l)
for i in range(n):
for j in range(i):
if l[i] + l[j] > 2020:
continue
for k in range(j):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* For the full copyright and license information, please view the LICENSE
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fakepdb_to_cops.py scripts.
"""
import sys,os
from tsevalutils import iter_searchresult
| ise-uiuc/Magicoder-OSS-Instruct-75K |
writer.writerows(myData) | ise-uiuc/Magicoder-OSS-Instruct-75K |
ht = khmer.LabelHash(K, HT_SIZE, N_HT)
# without tagging/joining across consume, this breaks into two partition;
# with, it is one partition.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return float(seat_line.split(' (')[1].split(')')[0])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
violation_type: "Offense Misdemeanor",
},
],
},
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Send SIGTERM to shutdown ffmpeg
ffmpeg_proc.terminate()
try:
# ffmpeg writes a bit of data out to stderr after it terminates,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return r2t.send_simple(submission, min_upvotes_limit=100)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public interface ResultRepository extends JpaRepository <Result,Long> {
public Set<Result> findByUsr(User user);
public Set<Result> findByQuz(Quiz quiz);
public Set<Result> findByUsrAndQuz(User user,Quiz quiz);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) {
logger.debug("Handling a background task...")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def tanh(x):
return tf.nn.tanh(x)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return {}
def delete(self, key):
self.store.delete(key) | ise-uiuc/Magicoder-OSS-Instruct-75K |
package com.divide2.product.query;
import com.divide2.core.root.query.QueryField;
import com.divide2.core.root.query.QueryParam;
import com.divide2.product.model.Stock;
import lombok.Data;
/**
* @author bvvy
* @date 2018/12/10
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# TODO Test lookup()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDE... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# -*- coding: ascii -*-
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tlc5947 = adafruit_tlc5947.TLC5947(spi, LATCH)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
q = self.q_net(BATCH.obs, begin_mask=BATCH.begin_mask) # [T, B, A]
q_next = self.q_net(BATCH.obs_, begin_mask=BATCH.begin_mask) # [T, B, A]
q_target_next = self.q_net.t(BATCH.obs_, begin_mask=BATCH.begin_mask) # [T, B, A]
next_max_action = q_next.argmax(-1) # [T, B]
next_... | ise-uiuc/Magicoder-OSS-Instruct-75K |
etm::TermInput::~TermInput() {
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return dict(
id=status.uri,
PK=status.uri,
SK=created_at,
indexKey="Status",
name=status.name,
filename=status.filename,
createdAt=created_at,
createdUser=status.user,
status=status.status,
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public static void main(String[]args){
Scanner in=new Scanner (System.in);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
NEG_INFINITY = float("-infinity")
def isBST(tree, lastNode=[NEG_INFINITY]):
if tree is None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Massacre : StateEffectIns
{
[UnityEngine.SerializeField]
EffectCondition condition1;
[UnityEngine.SerializeField]
EffectCondition condition2;
[UnityEngine.SerializeField]
float extra = 0;
[UnityEng... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import { getAppImport } from "../../src/utils/getAppImport";
const p1 = path.resolve(__dirname, "app.ts");
const p2 = path.resolve(__dirname, "app.js");
const p3 = path.resolve(__dirname, "app");
test(`Getting import path for app`, () => {
expect(getAppImport(p1)).toEqual(p3);
expect(getAppImport(p2)).toEqual(... | ise-uiuc/Magicoder-OSS-Instruct-75K |
using System;
using System.ComponentModel;
using osu.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Overlays.BeatmapListing
{
[LocalisableEnum(typeof(SearchCategoryEnumLocalisationMapper))]
public enum SearchCategory
{
Any,
[Description(... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class Grads:
"""each grad contains the N*N*params table for one (normal_mag, normal_dir) pair"""
grad_r = None
grad_g = None
grad_b = None
countmap = None
class polyCalibration:
"""
Calibrate the polynomial table from the data pack
"""
def __init__(self,fn):
self.fn = osp.join(fn, "d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
REQUIRE(EHTTools::runMol(*mol, res));
CHECK(res.numElectrons == 30);
CHECK(res.numOrbitals == 30);
CHECK(res.numAtoms == 12);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
V = number of exterior vertices
:param polygon_object: Instance of `shapely.geometry.Polygon`.
:param num_vertices_in_half_window: Number of vertices in smoothing half-
window. Number of vertices in full window =
2 * num_vertices_in_half_window + 1.
:param num_iterations: Number of ite... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Text Processing :: Indexing",
"Topic :: Utilities"
]) | ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in src:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Min heap usage
#a = ['s', 'o', 'r', 't', 'e', 'x', 'a', 'm', 'p', 'l', 'e']
a = [1, -1, 0, 3, 9, 8, 3]
print(a)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if all_prefixes.count(prefix) > 1])
for run in run_list:
run.prefixes = [p for p in run.prefixes if p not in common_prefixes]
return run_list, common_prefixes
def find_functions_with_one_bb(lines, verbose=False):
result = []
cur_func = None
bbs = 0
for line ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class CommentUpdateView(LoginRequiredMixin, CommentSecureRedirectToMixin, UpdateView):
model = Comment
form_class = CommentForm
def get_form_kwargs(self):
kwargs = super().get_form_kwargs()
kwargs.update({
"request": self.request,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from System.Management import *
from System.Management.Instrumentation import *
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@GetMapping(value = "/error")
public String handleError() {
return "redirect:/public/index.html";
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
label: string;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Text = " Do that! ",
Style = (Style)Resources["buttonStyle"]
},
new Button
{
Text = " Do the other thing! ",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
try (SqlSession session = factory.openSession()) {
List<Item> result = session.selectList("io.github.mattn.todo.select");
ctx.json(result);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Console.WriteLine("BiGram Analysis:");
if (phrase.Length > 100)
{
Console.WriteLine($"{phrase.Substring(0, 100)} ...[cutoff]");
Console.WriteLine("---");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
author='<NAME>',
maintainer='Deformetrica developers',
maintainer_email='',
license='INRIA license',
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
include_package_data=True,
zip_safe=False,
entry_poi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
boolean withPlan(HeatingPlan plan) {
return plan.withRange(_tempRange);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
{
private readonly List<int> _modification;
public ListModification(int field, params int[] modification)
: base(field)
{
//_modification = modification.ToImmutableArray();
_modification = new List<int>(modification);
}
public ListModific... | ise-uiuc/Magicoder-OSS-Instruct-75K |
id: number;
title: string;
body: string;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
match a{
Some(num) => Some(num+1),
None => None
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>0
package org.kenux.miraclelibrary.web.member.dto.request;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.kenux.miraclelibrary.domain.member.domain.Member;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
redis.srem('project:{}:jobs:queued'.format(project_name), job_id)
def job_project_names(redis, list_of_job_ids):
return {job_id: _job_project_name(redis, job_id) for job_id in list_of_job_ids}
def _job_project_name(redis, job_id):
project_name = redis.get('jobs:{}:project'.format(job_id))
if proje... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# TODO Optional requirements on windows
import steps.d_optional
import steps.e_launcher
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
#[macro_export]
macro_rules! loop_select {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.assertEqual(ps.is_finished(), True)
runs = ps.create_runs_upto(1)
self.assertFalse(ps.is_finished())
self.assertEqual(len(ps.finished_runs()), 0)
runs[0].store_result([1.0, 2.0, 3.0], 0, 3, 111, 222)
self.assertTrue(ps.is_finished())
self.assertEqual(len(ps.f... | ise-uiuc/Magicoder-OSS-Instruct-75K |
acc = 0
done = [False] * len(instructions)
i = 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if line.strip()==0:
target.write(line)
continue
b = (line.find(">",0,len(line)-4))
if b == -1:
target.write(line)
continue
| ise-uiuc/Magicoder-OSS-Instruct-75K |
git clone https://github.com/CCInCharge/campsite-hot-or-not.git
pip install --upgrade pip
cd campsite-hot-or-not/batch
pip install -r requirements.txt
#bash /common.sh
#
## -- estimate a reasonable executor memory --
#total_ram=$(free -g | awk '/^Mem:/{print $2}')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
while last_prime_number**2 <= n:
i += last_prime_number
while i <= n:
numbers[i] = False
i += last_prime_number
j = last_prime_number + 1
while j < n:
if numbers[j]:
last_prime_number = j
break
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# 1)get codes form eastmoney
codeList = getSymbols()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def assert_attribute(self, attribute: str, default: str=' '):
if self.get_attribute(attribute) is None:
self.change_attribute(attribute, default)
self.file_read = open(self.ssn + '.txt')
def delete(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Versions: $1=bump_type(0=nothing, 1=patch, 2=minor, 3=major), $2=current_version
bump() {
if [ "$1" == "3" ]; then
| ise-uiuc/Magicoder-OSS-Instruct-75K |
assert homeserver.hostname == "example.org"
assert homeserver.geturl() == "https://example.org:80/_matrix"
homeserver = MatrixServer._parse_url(
"https://example.org/_matrix", 80
| ise-uiuc/Magicoder-OSS-Instruct-75K |
page=request.GET.get('page',1)
loadded=paginator.page(page)
return render(request, 'message.html', {'all': loadded})
def save(request):
username=request.POST.get("name")
title=request.POST.get("title")
context=request.POST.get("message")
publish=datetime.datetime.now().strftime("%Y-%m-%d %H:... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2018.4.*")]
[assembly: AssemblyFileVersion("2018.4.1.0")]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
path('remainder/', views.notification,name='blog-notifications'),
] | ise-uiuc/Magicoder-OSS-Instruct-75K |
. $(pwd)/scripts/internal/build/test/args/jmeter-arg-log-tests.sh
. $(pwd)/scripts/internal/build/test/args/jmeter-arg-properties-tests.sh
. $(pwd)/scripts/internal/build/test/args/jmeter-arg-report-tests.sh
set -e
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
Model::unguard();
// $this->call('AddressesTableSeeder');
// $this->call('AttributeOrderTableSeeder');
// $this->call('OrdersTableSeeder');
// $this->call('MeasurementsTableSeeder');
$this->call('AttributesTableSeeder');
$this->call('JacketsTableSeeder');
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
);
array_push($data, $voucher);
}
$arr = array();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
net.sf.jasperreports.engine.fill.JRFillInterruptedException
| ise-uiuc/Magicoder-OSS-Instruct-75K |
librmath = ctypes.CDLL('./librmath.so')
print(librmath.square(5))
class Point(ctypes.Structure):
_fields_ = [('x', ctypes.c_double), ('y', ctypes.c_double)]
def __str__(self):
return 'Point(%f,%f)' % (self.x, self.y)
librmath.move_point.argtypes = (Point, ctypes.c_double, ctypes.c_double)
librmath.m... | ise-uiuc/Magicoder-OSS-Instruct-75K |
*outImageOpenArgs
)
outImage.copy_image(imageInput)
outImage.close()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
glyph_order = [".notdef"] + list(ascii_letters)
pen = TTGlyphPen(glyphSet=None)
pen.moveTo((0, 0))
pen.lineTo((0, 500))
pen.lineTo((500, 500))
pen.lineTo((500, 0))
pen.closePath()
glyph = pen.glyph()
glyphs = {g: glyph for g in glyph_order}
fb = FontBuilder(unitsPerEm=1024, isT... | ise-uiuc/Magicoder-OSS-Instruct-75K |
c += im.shape[2]
else:
c += 1
new_shape += [c]
np.testing.assert_equal(result.pixel_data.shape, new_shape)
def test_stack_multichannel(self):
img_shape = (10, 10, 5)
image1 = np.zeros(img_shape)
image2 = np.copy(image1)
ima... | ise-uiuc/Magicoder-OSS-Instruct-75K |
make clean
make -j6 flash monitor | ise-uiuc/Magicoder-OSS-Instruct-75K |
path = urlparse(url).path.split('/')
file_path = None
if len(path) > 0:
file_path = f'{dir}/{path[len(path)-1]}'
if not os.path.exists(file_path):
data = requests.get(url).content
| ise-uiuc/Magicoder-OSS-Instruct-75K |
expect(image.contentUrl).toMatch(/^data:image\/png;base64,/)
expect(image.content).toEqual(
expect.arrayContaining([
expect.objectContaining({ mediaType: vegaMediaType, spec: testData }),
])
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class OncogenicClassifier(SetBasedClassifier):
"""The oncogenic classifier class."""
def classification_type(self) -> ClassificationType:
"""Return the oncogenic classification type."""
return ClassificationType.ONCOGENIC
def exact_match_candidates(self) -> List[List[str]]:
"""Ret... | ise-uiuc/Magicoder-OSS-Instruct-75K |
pub mod ir;
pub mod parser;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
return true;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
success = fields.BooleanField(required=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def store(self):
pickle.dump(self.sessions, open(self.storage_file, "wb"))
logger.debug('Benchmarking Sessions stored to %s (%d sessions)', self.storage_file, len(self.sessions))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from liveness_to_safety import extract_liveness_as_safety
from utils import fold_fairness_constraints
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub const POLICY_OR: CommandCodeStructure = CommandCodeStructure(TPM2_CC_PolicyOR);
pub const POLICY_TICKET: CommandCodeStructure = CommandCodeStructure(TPM2_CC_PolicyTicket);
pub const READ_PUBLIC: CommandCodeStructure = CommandCodeStructure(TPM2_CC_ReadPublic);
pub const RSA_ENCRYPT: CommandCodeStruct... | ise-uiuc/Magicoder-OSS-Instruct-75K |
const generate_style = (theme) => ({
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with it('prints nothing interesting if solutions are empty'):
self.subject.solve()
expect(str(self.subject)).to(look_like(''))
with it('prints solutions'):
self.solutions = (
['header1', 'header2'],
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for k, v in record.items():
if k == self._field_name:
new_val = self._callback_function(v)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
longhelp_text
)?;
Ok(Timer {
metric: metric,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
array[merge_idx] = rightArr[r]
r += 1
merge_idx += 1
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rv = self.login(self.email, self.password)
assert b'Admin' in rv.data
rv = self.logout()
assert bytes(c['messages']['logout_message'],"utf-8") in rv.data
| ise-uiuc/Magicoder-OSS-Instruct-75K |
docker build -t yantis/instant-disposable-chrome .
docker run \
-ti \
--rm \
-v $HOME/.ssh/authorized_keys:/authorized_keys:ro \
-p 49158:22 \
yantis/instant-disposable-chrome
# --privileged \
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>rholang/archive-old<filename>packages/editor/editor-jira-transformer/dist/cjs/parse-html.d.ts
export default function (fragment: string): Document;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub fn new<T: SymbolTable, U>(&self, symbols: &mut T) -> Proc<T, U> {
self.new_with(&mut |sym| symbols.symbol(sym))
}
/// Creates a new `Proc` from the `ConstProc` using the given closure to obtain symbols.
///
/// This may be useful for templating since symbols can be remapped arbitrarily.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
*c) Решить задачу под пунктом b, не создавая новый список. (если будете решать - либо создайте доп. функцию,
либо перепишите существующую sum_list_2)
"""
def sum_list_1(dataset: list) -> int:
"""Вычисляет сумму чисел списка dataset, сумма цифр которых делится нацело на 7"""
new = 0
for i in range(len(my_l... | ise-uiuc/Magicoder-OSS-Instruct-75K |
recipeIdChecker = ConditionalBlockStart(arg_fields='recipeId', condition_func=g(0))
recipeType = ERecipeType()
timeSpend = Int32Field()
requires = ArrayField(Int32Field)
requireCounts = ArrayField(Int32Field)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.sampler = sampler
self.collate_fn = collate_fn
self.shuffle = shuffle
self.sampled_data = self.sampler(self.dataset, self.batch_size, shuffle=self.shuffle)
def __iter__(self):
for batch in self.sampled_data:
if not batch:
raise StopIteration
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
augmented = self.img_aug(input_images)
is_aug = (torch.rand(batch_size, device=input_images.device)[:, None, None, None] < self.aug_proba).float()
result = augmented * is_aug + permuted * (1 - is_aug)
return result
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cd ~/10.03_app_demo/5_applications/unixv6.rl02
~/10.03_app_demo/4_deploy/demo --verbose --cmdfile unixv6_dl_34.cmd $*
| ise-uiuc/Magicoder-OSS-Instruct-75K |
src_number
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/sh
npm run tslint && npm run tsc && ./halite --replay-directory replays/ -vvv --width 32 --height 32 "node MyBot.js" "node MyBot.js"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Description:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class ApplicationFactory {
private final HttpRequestFactory httpRequestFactory;
public ApplicationFactory(HttpRequestFactory httpRequestFactory) {
this.httpRequestFactory = httpRequestFactory;
}
public Application create (HttpServletRequest request) {
return new Application(htt... | 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.