seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
} catch (InvalidToken $e) {
return response($e->getMessage() . "Error", 200);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os
from setuptools import setup
version = {}
version_path = os.path.join('array_namespace', '__version__.py')
with open(version_path, 'r', encoding='utf-8') as f:
exec(f.read(), version)
with open('README.rst', 'r', encoding='utf-8') as f:
readme = f.read()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
INITIAL_POPULATION = 20 # EXPERIMENT
| ise-uiuc/Magicoder-OSS-Instruct-75K |
formatter = lambda x: x
any_of_validator = AnyOf([1, 3, 5], message='something wrong', values_formatter=formatter)
validator = any_of_validator.validator
self.assertTrue(isinstance(validator, wtf_any_of))
self.assertEqual(validator.values, [1, 3, 5])
self.assertEqual(v... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# GENERATED BY KOMAND SDK - DO NOT EDIT
from .blacklist_url.action import BlacklistUrl
from .get_blacklist_url.action import GetBlacklistUrl
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return $result;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
c.add_item(i)
c.add_message("usage : {} %".format(cpu))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<div class="form-group">
{{ Form::label('price','Price') }}
{{ Form::text('price', null, array('class' => 'form-control')) }}
@if ($errors->has('price'))
<div class="has-error">{{ $errors->first('price') }}</div>
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
{
None,
PathNode,
DeadZone
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* @return bool|float|int|string
*/
public function getValue()
{
return $this->value;
}
/**
* @param bool|float|int|string $value
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def get_avatar_url(self):
# try to return the higher res picture-urls::(original) first
try:
if self.account.extra_data.get('picture-urls', {}).get(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#sudo systemctl restart apache2
| ise-uiuc/Magicoder-OSS-Instruct-75K |
strin_split = strin.split('$$\n')[:-1]
# print strin_split[0]
strin_split_content = [line.split('\n')[0] for line in strin_split]
# print strin_split_content
strout_seq = [line.split('\t')[2] for line in strin_split_content]
# print strout_seq[0]
strout_seq_cut = [cut_string(line, 60) for line in strout_... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// The mesh feature requires legion
#[cfg(feature = "legion")]
pub mod basic;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
calories.text = String.init(describing: self.caloriesn)+" KJ"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# print stats to that stream
# here we just report the top 10 functions, sorted by total amount of time spent in each
p.strip_dirs().sort_stats('tottime').print_stats(10)
# print the result to the log
logger.info('---Profiling result follows---\n%s' % profiling_output.getvalue(... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def deploy_ec2(commit):
return jsonify(aws.do_deploy(commit))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return featurelist
#*********************************************************************
def _KLTSelectGoodFeatures(tc,img,nFeatures,mode):
featurelist = [KLT_Feature() for i in range(nFeatures)]
#_KLT_FloatImage floatimg, gradx, grady;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var encodeCount = 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Ability.Pass: 1,
Ability.Escape: 1,
},
PlayerClass.Warrior: {
Ability.Attack: 1,
Ability.Guard: 1,
Ability.Pass: 1,
Ability.Escape: 1,
},
PlayerClass.Wizard: {
Ability.Attack: 1,
Ability.Fireball: 1,
Ability.Firewall: 4,
Abi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
@NgModule({
imports: [
CommonModule,
DxLoadPanelModule
],
declarations: [ LoaderComponent ],
exports: [ LoaderComponent ]
})
export class LoaderModule { }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.name = "British"
#Note the different method name here!
def speak_english(self):
return "Hello!"
class Adapter:
"""This changes the generic method name to individualized method names"""
def __init__(self, object, **adapted_method):
"""Change the name of the method"""
self._object = objec... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
var ctx = nonces[0].context;
return new MusigPubNonce(new ECPubKey(summed_nonces[0].ToGroupElement(), ctx),
new ECPubKey(summed_nonces[1].ToGroupElement(), ctx));
}
internal static void secp256k1_musig_sum_nonces(Span<GEJ> summed_nonces, MusigPubNonce[] pubnonces)
{
int i;
summed_nonce... | ise-uiuc/Magicoder-OSS-Instruct-75K |
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under th... | ise-uiuc/Magicoder-OSS-Instruct-75K |
print(102341132412344234 * 9876387639476324727)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class HBDecodableTests: XCTestCase {
func testSimpleStruct() {
struct TestObj: HBDecodable {
var message: String?
var id: Int?
init() {}
init(decoder: HBDecoder) {
message = try? decoder.decode("message")
id = ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
def constructFeatureVector(
self, featureDictObjectA, featureDictObjectB, selectedFeatures
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"Zeroth" (min value) and "Tenth" (max value) deciles are included for
reference and intuitive indexing.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
raise PermissionDenied
def ensure_user_has_permission(user, target, permission):
if not user.has_perm(permission, target):
raise PermissionDenied
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public uint MinUs
{
get => _minUs;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
var projectFilePathAreEqual = x.ProjectFilePath == y.ProjectFilePath;
areEqual &= projectFilePathAreEqual;
return areEqual;
}
public int GetHashCode(IProjectReference obj)
{
var hashCode = obj.ProjectFilePath.GetHashCode();
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}) {
HStack {
Image("icons_filled_add-friends_white")
.renderingMode(.template)
.foregroundColor(.white)
Text("Add Contacts").foregroundColor(.white)
}
}.frame(height: 40)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public function create
(
string $guid,
HistoryDataObjectInterface $history,
string $name
): ApplicationDataObjectInterface;
public function createArchive
(
string $guid,
HistoryDataObjectInterface $history,
string $name
): ApplicationArchiveI... | ise-uiuc/Magicoder-OSS-Instruct-75K |
_ir.TensorInfo(_ir.DataType.INT32, ()))
# Add mandatory loop condition tensor to subgraph (is also an output)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export interface ICKExceptionData {
stackTrace: string,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this.ResumeLayout(false);
}
#endregion
private FolderTree folderTree;
private System.Windows.Forms.Splitter splitter;
private DirectoryContentPane directoryContentPane;
private PreviewPane previewPane;
private StatusBar statusBar;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class ProjectTypeAPI(str, Enum):
all = "all"
template = "template"
user = "user"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
l = list(arrs)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def simbatch():
# TODO pytest-datadir pytest-datafiles vs ( path.dirname( path.realpath(sys.argv[0]) )
sib = core.SimBatch(5, ini_file="config_tests.ini")
sib.clear_all_memory_data()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* description="Internal server error"
* )
* )
* @param Request $request
* @return \Illuminate\Http\JsonResponse
| ise-uiuc/Magicoder-OSS-Instruct-75K |
labeled_img = cv2.merge([label_hue, blank_ch, blank_ch])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
+ self.__class__.member
def to_bitfield(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if let Some(solution) = g.solve(solve_settings) {
// Prints:
// 0 0 0 0
// ========================================
// 0 2 1 0
// 2 0 0 1
// 1 0 0 2
// 0 1 2 0
solution.puzzle.print();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from SepsisPredictor import models
m = models.Measurement()
m.delete_everything()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>src/util.cpp
#include <sortnet/util.h>
namespace sortnet {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# :param first_time_funded: Whether or not the project has reached the funded state before. For instance, a project
# can become "unfunded" when a donation that was pending fails.
#
project_funded = Signal(providing_args=["first_time_funded"])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# pp.pprint(market_to_id)
line_storage = {}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int k1 = 0;
int l1 = 0;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
exp = 2.0
near = 1.0
far = 10000.0
volumeDepth = 128.0
def volumeZToDepth(z):
return np.power(z / volumeDepth, exp) * far + near
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from edgar3 import edgar_index
def get_13f_listings(date: datetime.datetime, populate: bool) -> pd.DataFrame:
ed_i = edgar_index.edgar_index()
df = ed_i.get_full_listing_as_pd(date)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
a.city.visited = True
self.border.insert(a.city)
if self.border.getFirst() != None:
Greedy.search(self, self.border.getFirst())
return (self.visited_cities, self.travelled_distance)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.Bind(wx.EVT_PAINT, self.OnPaint)
def OnPaint(self, event):
dc = wx.PaintDC(self)
width, height = self.GetClientSize()
dc.SetPen(wx.Pen(wx.Colour(self.color)))
dc.SetBrush(wx.Brush(wx.Colour(self.color)))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Assert.Equal(1, attr.ObjectArray2.Length);
attr = typeof(SameTypesClass2)
.GetCustomAttributes(typeof(SameTypesAttribute), true)
.Cast<SameTypesAttribute>()
.Single();
Assert.Equal(1, attr.ObjectArray1.Length);
Assert.Null... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'FileGetPropertiesFromComputeNodeOptions',
'FileListFromTaskOptions',
'FileListFromComputeNodeOptions',
'JobScheduleExistsOptions',
'JobScheduleDeleteOptions',
'JobScheduleGetOptions',
'JobSchedulePatchOptions',
'JobScheduleUpdateOptions',
'JobScheduleDisableOptions',
'JobSchedul... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if not config['rpc_user_password']:
logger.error('get_coin_utils({0}): the wallet rpc user password is empty'.format(coin_name))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let byte = data.read(self);
let mask = 1 << target_bit;
data.write(self, byte | mask);
}
/// SLA
pub fn shift_left(&mut self, data: impl Source<u8> + Target<u8>) {
self.curr_instr = "SLA ".to_string() + &data.to_string();
let (byte, overflow) = data.read(self).over... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
| ise-uiuc/Magicoder-OSS-Instruct-75K |
resource_name = 'product'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// You may need to build the project (run Qt uic code generator) to get "ui_TriangleVWindow.h" resolved
#include "trianglevwindow.h"
#include "ui_TriangleVWindow.h"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mkfifo fifo/il_S1_summary_P18.idx
mkfifo fifo/il_S1_eltcalc_P18
mkfifo fifo/il_S1_summarycalc_P18
mkfifo fifo/il_S1_pltcalc_P18
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def acm(x,p):
""" Find an all-pole model using the autocorrelation method
Usage: a,err = acm(x,p)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"created_at":"2017-06-26T20:41:00Z",
"updated_at":"2017-06-26T21:14:10Z"
}
task_8083366_dict = {
"id":8083366,
"name":"Programming",
"billable_by_default":True,
"default_hourly_rate":100.0,
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if project is None:
samples_to_analyse = Sample.objects.all()
else:
project = Project.objects.get(number=project)
samples_to_analyse = Sample.objects.filter(project=project)
total_number_of_samples = len(samples_to_analyse)
for sample in samples_to_analyse:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int getst() const;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
''')
async def async_db_call(fn):
url = parse.urlparse(os.environ.get("DATABASE_URL", "postgres://localhost:5432/supers"))
engine_attrs = {
'database': url.path[1:],
'user': url.username,
'password': url.password,
'host': url.hostname,
'port': url.port,
}
as... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import theano
import theano.tensor as T
| ise-uiuc/Magicoder-OSS-Instruct-75K |
std::vector<unsigned> C;
for (auto x : A) {
if (x > average)
B.push_back(x);
else
| ise-uiuc/Magicoder-OSS-Instruct-75K |
docker-compose -f docker-compose.yml -f docker-compose-win.yml up -d
| ise-uiuc/Magicoder-OSS-Instruct-75K |
f = i
p = i['intent']['probability']
return f
| ise-uiuc/Magicoder-OSS-Instruct-75K |
done < $file
# sort all the requests | print count of each request | sort in reverse and numerical | show first 10 lines
done | sort | uniq -c | sort -rn | head -n 10
# I clean up after myself
rm -rf $DIRECTORY
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
echo "TRE1_fov2"
${FIJI_PATH}/ImageJ-linux64 --ij2 --headless --run scripts/cellStats.py cfgPath=\"/media/nwalczak/XFS_Test/Resilio\ Sync/Resilio/2018_03_05_CHO-DREP_Image_Data/2018_March_3-4/TRE1_fov2_config.ini\"
checkFailure "TRE1_fov2"
#TRE2_fov1
echo "TRE2_fov1"
${FIJI_PATH}/ImageJ-linux64 --ij2 --headless --run ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
checkOrDefaultValue));
}
}
return constraintInfos;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
get("/observarPuntaje", AppControl::chequearUsuario, new MustacheTemplateEngine());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn part1(digits: &[u32]) -> u32 {
captcha(digits, 1)
}
fn part2(digits: &[u32]) -> u32 {
captcha(digits, digits.len() / 2)
}
fn parse_input(str: &str) -> Vec<u32> {
str.chars().flat_map(|x| x.to_digit(10)).collect()
}
fn captcha(digits: &[u32], offset: usize) -> u32 {
let lookahead = digits.iter().c... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-10-31 15:58
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if [ -f $CONF ]; then
echo "INFO: Main configuration file found"
opencanaryd --start
elif [ -f $TEMP_CONF ]; then
echo "INFO: Temp configuration file found"
opencanaryd --dev
else
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os
import random
def rename_files(path):
file_list = os.listdir(path)
print(file_list)
for file_name in file_list:
# Remove numbers from filename.
# new_file_name file_name.translation(None, "0123456789")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using Foundatio.Elasticsearch.Jobs;
using Foundatio.Elasticsearch.Repositories;
using Foundatio.Elasticsearch.Repositories.Queries.Builders;
using Foundatio.Jobs;
using Foundatio.Lock;
using Foundatio.Logging;
using Foundatio.Messaging;
using Foundatio.Metrics;
using Foundatio.Queues;
using Foundatio.Serializer;
using ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def escapeQuotes(string):
return string.replace('"','""');
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from hat.syslog.server import common
import hat.syslog.server.backend
mlog: logging.Logger = logging.getLogger(__name__)
"""Module logger"""
package_path: Path = Path(__file__).parent
| ise-uiuc/Magicoder-OSS-Instruct-75K |
soma = soma + 1.0 / i;
}
Console.WriteLine(soma.ToString("F2",CultureInfo.InvariantCulture));
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_word(df, tmp_path):
path = (tmp_path / "word").resolve()
model = Word2VecRec()
model.fit(df)
base_pred = model.predict(df, 5)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{"Value": "${domain_internal}"}
]
}
}
]
}
EOF
if [ "${CHALLENGE_TYPE}" = "DNS-01" ]; then
cat << EOF > ./create-txt.json
{
"Changes": [
{
"Action": "CREATE",
"ResourceRecordSet": {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return pf.ReadASCIIData(fname)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sudo chmod -R 777 /SyncPy2/
rm -R SyncPy-master
rm master.zip
# Create a shortcut to the interface in /home/user
if [ -f $HOME/SyncPy2 ]; then
rm $HOME/SyncPy2
fi
touch $HOME/SyncPy2
cd ..
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if not trap_errors:
log.exception('Failed to play sound sample %r: %s', name, err)
res = dict((k, ft.partial(snd, k)) for k in 'play play_sync cache'.split())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@JsonProperty
| ise-uiuc/Magicoder-OSS-Instruct-75K |
help='Optimizer (default: "adamw"')
parser.add_argument('--opt-eps', default=1e-8, type=float, metavar='EPSILON',
help='Optimizer Epsilon (default: 1e-8)')
parser.add_argument('--opt-betas', default=None, type=float, nargs='+', metavar='BETA',
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
{
return this.smeltingList;
}
public float getHarvestorExperience(ItemStack stack)
{
for (Entry<ItemStack, Float> entry : this.experienceList.entrySet())
{
if(this.compareItemStacks(stack, (ItemStack)entry.getKey()))
{
return ((Float)entry.getValue()).floatValue();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Security.Claims;
using System.Threading.Tasks;
using ePiggyWeb.CurrencyAPI;
using ePiggyWeb.DataManagement.MonthlyReport;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
namespace ePiggyWeb.Pages
{
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
HTML("<a href='"+ download_link + "'>Download + " + filename + "</a>")
"""As we saw earlier. this Data file is an Excel spreadsheet. Where data is an Excel spreadsheet, it can be converted to a Comma Seperated File (CSV), by requesting this format through content negotiation.
In this case, we request a GET to https:... | ise-uiuc/Magicoder-OSS-Instruct-75K |
print('Qiskit Version :')
print(json.dumps(__qiskit_version__, indent=3))
circ = QuantumCircuit(1)
circ.draw('mpl')
plt.show()
circ_bell = QuantumCircuit(2)
circ_bell.h(0)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
img = np.zeros((h * size[0], w * size[1], c))
for idx, image in enumerate(images):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@if($users->count()>0)
<table class="table table-hover table-striped">
<thead>
<tr>
<th> Name </th>
<th> Email </th>
<th> Role </th>
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
lnks.append(link["href"])
return lnks | ise-uiuc/Magicoder-OSS-Instruct-75K |
) {
self.collections.refreshCollection(source, callback: callback)
}
/// - SeeAlso: `PackageCollectionsProtocol.addCollection`
public func addCollection(
_ source: PackageCollectionsModel.CollectionSource,
| 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.