seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
else
{
path_1 = argv[1];
path_2 = argv[2];
if (argc >= 4)
{
edit_script_path = argv[3];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class UserV2 extends Model
{
protected $type = [
'create_time' => 'datetime',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Actions(Vec<Vec<Action>>),
None,
}
impl BatchChoices {
pub fn characters(self) -> Option<Vec<Vec<Character>>> {
if let BatchChoices::Characters(characters) = self {
Some(characters)
} else {
None
}
}
pub fn boosters(self) -> Option<Vec<Vec<Booster>>>... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# frappe.db.sql(""" update `tabActual` a, `tabTreatment Plan` tp set a.comision_pagada = 1, a.comision_date= %(fecha_final)s
# where tp.name = a.parent AND tp.paid = 1 AND a.status = "Finished" AND a.finished_date < %(fecha_final)s AND tp.date_paid < %(fecha_final)s AND a.comision_pagada = 0 """)
frappe.db.comm... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>jpnauta/orchardbot-app<gh_stars>0
#!/usr/bin/env bash
set -e
# Go to project directory script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import sys
from os import listdir
from os.path import isfile, join
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cout << "\n 选项" << choice << "已完成,按任意键继续..." << endl;
system("color 3f && pause>nul");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
20190805
#################################
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for linha in arquivo:
print('Nome: {}, Idade: {}'.format(*linha.strip().split(','))) #Usando * irá extrair os elementos de uma coleção de dados (lista, tuplas dicionários, sets, etc)
arquivo.close() | ise-uiuc/Magicoder-OSS-Instruct-75K |
# Mobile
| ise-uiuc/Magicoder-OSS-Instruct-75K |
session['logged_in_username'] = username
return redirect('/')
def get_logout(self):
session.pop('logged_in', None)
session.pop('logged_in_username', None)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>correlatedmaterialslaboratory/dmftmodel
for i in {0..19}; do cp ../imp.$i/Sig.out sigs/Sig.out.$i; done
cp ../Sig_?.out sigs/
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self._root.mainloop()
def _update(self):
if not self.alive:
self._root.destroy()
# print("CUSTOM UPDATE @ "+str(time.time()-start))
self.custom_update(self)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cout << *iter;
}
}
cout << endl;
return 0;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
updated_by = models.CharField(max_length=255, blank=True)
class Meta:
abstract=True | ise-uiuc/Magicoder-OSS-Instruct-75K |
$ty(errmsg.to_string())
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Product(id: "66VCHSJNUP", name: "Vintage Camera Lens", price: 12.48, image: URL(string: "http://ssidhu.o11ystore.com/static/img/products/camera-lens.jpg")!, description: "You won't have a camera to use it and it probably doesn't work anyway."),
Product(id: "1YMWWN1N4O", name: "Home Barista Kit", price: ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// APIWeatherOnline-Constants.swift
// TheWeatherApp
//
// Created by Darren Leith on 16/04/2016.
// Copyright © 2016 Darren Leith. All rights reserved.
//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return False
# start "in" instance
self.megasync_ch_in = self.start_megasync(self.local_mount_in, "in")
# pause
time.sleep(5)
# start "out" instance
self.megasync_ch_out = self.start_megasync(self.local_mount_out, "out")
# check both instances
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class Param(dict):
pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
namespace ExtendsFramework\ServiceLocator\Resolver\Reflection;
class ReflectionB
{
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
set interfaces interface if2 subinterfaces subinterface 100 vlan config vlan-id 100
set interfaces interface if2 subinterfaces subinterface 100 config enabled true
set interfaces interface if2 config enabled true
set interfaces interface if2 subinterfaces subinterface 200 vlan config vlan-id 200
set interfaces interf... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>utils/tools.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#------------------------------------------------------
# @ File : tools.py
# @ Description:
# @ Author : <NAME>
# @ Contact : <EMAIL>
# @ License : Copyright (c) 2017-2018
# @ Time : 2020/9/29 下午6:09
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
@Override
public void deleteTask(@NonNull Task task) {
restoreDataSource.deleteTask(task);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
System.out.println(Thread.currentThread().getName() + " : " + ++product);
condition.signalAll();
} finally {
lock.unlock();
}
}
/**
* 卖货
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.status = STATUS_SUCCESS
for key in keys.find():
#key.set()
self.output.append(json.dumps(key.object, indent = 4))
except Exception:
self.status = STATUS_EXCEPTION
self.output.append(traceback.format_exc())
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
let full_schema_name = Binary::pack(&[CATALOG, Datum::from_str(&schema_name)]);
self.catalog.work_with(DEFINITION_SCHEMA, |schema| {
schema.work_with(SCHEMATA_TABLE, |table| {
let schema_id = tabl... | ise-uiuc/Magicoder-OSS-Instruct-75K |
## create seed points
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, code):
self.code = code
#noescape_brushs = ['js','jscript','javascript','php','xml','xhtml','xslt','html','xhtml']
#if not self.code.brush in noescape_brushs:
if True:
self.code.code = template.defaultfilters.force_escape(self.code.code)
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#Helper script. Not intended to run directly.
#Please install graphviz
dot $1 -Tpng -o $1.png
| ise-uiuc/Magicoder-OSS-Instruct-75K |
author="<NAME>",
author_email="<EMAIL>",
description="The Python Skeleton Library",
long_description=long_description,
long_description_content_type="text/markdown",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return "design";
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import java.awt.Dimension;
import java.awt.color.ICC_Profile;
import org.apache.commons.imaging.FormatCompliance;
import org.apache.commons.imaging.ImageFormat;
import org.apache.commons.imaging.ImageFormats;
import org.apache.commons.imaging.ImageInfo;
import org.apache.commons.imaging.Imaging;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return get_default_field_value(field, value)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'surnames'=>$faker->lastName,
'dni'=>$faker->randomNumber(),
'telephone'=>$faker->randomNumber(8),
'direction'=>$faker->address,
'email' => $faker->unique()->safeEmail,
'role_id'=> $role = $faker->randomElement([2,3]),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def calc_checksum(partial_frame):
'''
partial_frame do not contain first 3 bytes and the last byte of checksum
'''
return pack("!B", 0xff - (sum(partial_frame) & 0xff))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export {Interval};
export default Interval; | ise-uiuc/Magicoder-OSS-Instruct-75K |
java -jar "DataGenerator.jar" | ise-uiuc/Magicoder-OSS-Instruct-75K |
<NavLink className={clsx("sub-nav__link", className)} end {...props}>
<span className="sub-nav__link__text">{children}</span>
<ArrowUpIcon className="sub-nav__active-icon" />
</NavLink>
);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
S = Surface(M)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
decrypt2 = windows.crypto.decrypt(pfx, res2)
assert message_to_encrypt == decrypt
assert decrypt == decrypt2
def test_randomkeypair(randomkeypair):
randcert, randrawpfx = randomkeypair
assert randcert.name == RANDOM_CERTIF_NAME
randpfx = windows.crypto.import_pfx(randrawpfx, RANDOM_PFX_PASSWO... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
Table declarations for the logset self service usage reporting tool. All
of the data must be present in order for a row to be inserted into the
database.
ASSUMPTION: A machine is going to send data to the heart_beat flask app
and as such there will be no malformed data.
ASS... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// If it doesn't exist then it is plugged in so make it 100% percent capacity
eprintln!("We could not detect your battery. If you are sure you are on a laptop please create an issue at https://github.com/JakeRoggenBuck/auto-clock-speed/issues/new");
return Ok(100);
}
};
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
orderedsandwich(['kela','aloo'])
orderedsandwich(['cheese','poteto'])
orderedsandwich(['uiyer']) | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.messages.append(msg)
elif evtype == 'simresult':
assert msg[2] == self.request.reqid
self.result = msg
custom_subdirs = {}
def find_scripts():
for custom_dir in [d for d in glob.glob(path.join(module_root, 'nicos_*'))
if path.isdir(d) and d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
for f in $FILES
do
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
It is closely based on rest_framework.authtoken module coming under following license.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fabric-ca-server init -b $BOOTSTRAP_USER_PASS
# 将根CA的签名证书复制到data目录以供其他人使用
cp $FABRIC_CA_SERVER_HOME/ca-cert.pem $TARGET_CERTFILE
# 添加组织结构配置
for o in $FABRIC_ORGS; do
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Schema::table('imageables', function (Blueprint $table) {
$table->dropForeign(['media_id']);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
directions = [(1, 0), (0, -1), (1, -1), (-1, 0), (-1, 1), (0, 1)]
def store_pixel(current_pixel):
if(
current_pixel[0] == image.size[0] or
current_pixel[1] == image.size[1] or
current_pixel[0] < 0 or
| ise-uiuc/Magicoder-OSS-Instruct-75K |
it('should create an instance', () => {
expect(new TtProduksiJasa()).toBeTruthy();
});
});
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use Handlebars\VM;
require __DIR__ . "/../../../utils.inc";
use Handlebars\DefaultRegistry;
use Handlebars\SafeString;
$tmpl = '{{dash (concat a e.e) c.c}}';
$context = array(
'a' => 'a',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rm -rf "$mount_point"
mkdir -p "$mount_point"
chown -R abc:abc "$mount_point"
exec s6-setuidgid abc rclone --config /tmp/rclone.conf mount --allow-other "$remote_name" "$mount_point" "${params[@]}"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sum += np.linalg.norm(P[i-1] - P[i])
return sum * sum
def MovingAverage(a, w):
b = np.zeros(len(a)-w+1)
c = 1.0/w
s = np.sum(a[0:w])
b[0] = c*s
for k in range(1, len(a)-w+1):
s += a[w+k-1] - a[k-1]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def read_element(self, *args, **kwargs):
raise NotImplementedError
@staticmethod
def eliminate_empty_rows(df):
return df.loc[df.apply(any, axis=1), :].reset_index(drop=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
mousetonStore.getBooks().add(grandiClassici);
duckburgStore.getBooks().add(topolino);
duckburgStore.getBooks().add(mega2000);
duckburgStore.getBooks().add(grandiClassici);
topolino.getBookstores().add(mousetonStore);
topolino.getBookstores().add(duckburgStore);
m... | ise-uiuc/Magicoder-OSS-Instruct-75K |
pub use arena::{Arena, ArenaIndex};
pub use vector::Vector;
pub use queue::Queue;
pub use multi_arena::{MultiArena, MultiArenaIndex};
/// A Chunk of general purpose memory, essentially acting as &mut [u8]
/// which can be backed by different `ChunkStorage` providers.
/// Dropping a Chunk deallocates its in-memory spac... | ise-uiuc/Magicoder-OSS-Instruct-75K |
),
],
targets: [
.target(
name: "MimeLib",
path: "Sources"
),
],
swiftLanguageVersions: [5, 4]
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
linkstatic = True,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn main() {
fbs_build::compile_fbs("./src/index.fbs").unwrap();
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>miathedev/BoostForArduino
#include <boost/test/data/monomorphic/grid.hpp>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
load_default_resources(resource_container);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import {generateAvatars} from '../utils';
import {tallImage} from '@atlaskit/media-test-helpers';
const avatars: Array<Avatar> = generateAvatars(30);
storiesOf('Avatar Picker', {})
.add('With imageSource', () => (
<AvatarPickerDialog avatars={avatars} imageSource={tallImage}/>
))
.add('Without imageSource',... | ise-uiuc/Magicoder-OSS-Instruct-75K |
export { VitePluginMarkdown as default };
| ise-uiuc/Magicoder-OSS-Instruct-75K |
os.makedirs(tempDir, exist_ok=True)
pshells = [os.path.join(os.path.split(sys.executable)[0], pyExec) for pyExec in ["python", "ipython"]]
# Prepare ad-hoc script for execution in new process
scriptName = os.path.join(tempDir, "dummy.py")
scriptContents = \
"from acm... | ise-uiuc/Magicoder-OSS-Instruct-75K |
//
import Foundation
extension MSRect {
func asCGRect() -> String {
return "CGRect(x: \(x), y: \(y), width: \(width), height: \(height))"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
// https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/table/RowSet.html
export type RowSet = {
tableId: string
concreteType: string
etag: string // Any RowSet returned from Synapse will contain the current etag of the change set. To update any rows from a RowSet the etag must be provided with th... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# Make scale bar not visible
viewer.scale_bar.visible = False
assert not viewer.scale_bar.visible
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .create_package import _open_folder_in_st, _is_override_package
__all__ = ('PackagedevOpenPackageCommand',)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
var infos = new DEBUG_PROPERTY_INFO[1];
HResultChecker.Check(debugProperty.GetPropertyInfo(
enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_ALL, Radix, 0, null, 0, infos));
return infos[0];
}
IDebugExpressionContext2 GetExpressionContext()
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
@istest
def unique_of_empty_list_is_empty_list():
assert_equal([], unique([]))
@istest
def unique_removes_duplicates_while_preserving_order():
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cfg = Config(cfg_f)
script_generator = BackupScript(cfg)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Copyright 2020 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
Vec3 &operator+=(const Vec3 &other)
{
x += other.x;
y += other.y;
z += other.z;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public class Class1
{
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import java.io.IOException;
public class RuntimeIOException extends RuntimeException {
public RuntimeIOException(IOException cause) {
super(cause);
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#print self.formhash
def signin(self):
postdata = {'formhash':self.formhash,'qdxq':'kx','qdmode':3,'todaysay':'','fastreply':1}
postdata = urllib.urlencode(postdata)
print self.username,'is signing...'
req = urllib2.Request(url = 'http://www.madio.net/plugin.php?id=d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
tuple_num.append(input4)
tuple_num.append(input5)
print(tuple_num)
tuple_num.sort()
for a in tuple_num:
print(a * a) | ise-uiuc/Magicoder-OSS-Instruct-75K |
def install(cls, file_path: str, replace: bool = False) -> bool:
"""Install bible from file, grail-bible format only.
Args:
file_path (str): path to bible file
replace (bool): if bible already installed replace it by another version
Returns:
True i... | ise-uiuc/Magicoder-OSS-Instruct-75K |
nw_tcp_options_set_keepalive_count(self.nw, UInt32(newValue))
}
get {
return self._keepaliveCount
}
}
private var _keepaliveIdle: Int = 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class_name=self.class_name,
data=data,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
cursum -= v[start];
start++;
}
if(cursum == sum)
{
cout<<start+1<<" "<<i<<endl;
flag =0;
break;
}
if(i<n)
cursum += v[i];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from scipy.optimize import leastsq
def model(t, coeffs):
return coeffs[0] + coeffs[1] * np.exp(- ((t-coeffs[2])/coeffs[3])**2)
def residuals(coeffs, y, t):
return y - model(t, coeffs)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
yarn install
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<hr class="featurette-divider"><!-- zirin's hr-->
<div class="pricing-header px-3 py-3 pt-md-5 pb-md-4 mx-auto text-center " >
<h2 class="display-6 pt-2 ">Types of MVP We Can Build for You</h2>
<p class="lead"></p>
</div>
<div class="row pt-3">
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
('Myapi', '0006_auto_20200303_1419'),
]
operations = [
migrations.AlterField(
model_name='fichaemergencia',
name='alerta',
field=models.CharField(choices=[('AMARILLA', '<NAME>'), ('ROJA', 'Cl<NAME>')], max_length=30),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return input_shape
def get_config(self):
config = {'eps': self.eps}
base_config = super(LayerNormalization, self).get_config()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#[test]
fn test_add_to_env() {
let mut new_env = os::env();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'''
dt = 8
I,J = ak.join_on_eq_with_dt(self.a1,self.a1,self.t1,self.t1*10,dt,"abs_dt")
self.assertEqual(0, I.size)
self.assertEqual(0, J.size)
I,J = ak.join_on_eq_with_dt(self.a2,self.a1,self.t1,self.t2,dt,"abs_dt")
self.assertEqual(0, I.size)
self.assert... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
Does the extremely confusing steps required to add api view permission to
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>seekersapp2013/new<filename>node_modules/carbon-icons-svelte/lib/Umbrella32/index.d.ts<gh_stars>0
export { Umbrella32 as default } from "../";
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def cw_api_fetch_resource_call(return_value):
method_name = 'djconnectwise.api.ConnectWiseAPIClient.fetch_resource'
return create_mock_call(method_name, return_value)
def get(url, data, headers=None, status=200):
"""Set up requests mock for given URL and JSON-serializable data."""
get_raw(url, json.du... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public static void main(String[] args) throws ProcessException {
new RemoteController("ssh_remote.conf");
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
})
}
public func onUploadImgResp(_ data: Data ,file: String ,param: ZALCredentialsBean) -> Observable<String> {
return Observable<String>.create({ (observer) -> Disposable in
| ise-uiuc/Magicoder-OSS-Instruct-75K |
filter_length, i - pad_top);
auto schur_product = blaze::subtensor(a, 0, sub.image_beg_,
0, batch, sub.size_, in_channels) %
blaze::submatrix(
kslice, sub.kernel_beg_, 0, sub.size... | ise-uiuc/Magicoder-OSS-Instruct-75K |
source venv/bin/activate
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from molsysmt._private.digestion import *
def to_mdtraj_Topology(item, atom_indices='all', syntaxis='MolSysMT'):
if check:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__all__ = ['Identity']
class Identity(nn.Module):
"""The most useful module. A pass-through module which does nothing."""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
include!("ConfigurationParseError.rs");
include!("ConfigurationWrapper.rs");
include!("UcpConfigurationWrapper.rs");
| 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.