seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
scanf("%d", &n);
int tot = 0;
for(int i=0; i<n; i++) {
scanf("%d", &a[i]);
tot += a[i];
x[i] = i;
}
sort(x, x+n, cmp);
int l = n / 2;
for(int i=0; i<l; i++) {
printf("%d %d\n", x[i]+1, x[n-i-1]+1);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if(sum == num):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let channelItems: [
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Logger.shared.verbose(closure, functionName: functionName, fileName: fileName, lineNumber: lineNumber, userInfo: userInfo)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class TransportRequestException extends \Exception {
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
private readonly ReviewManager _manager;
private readonly BlobCodeFileRepository _codeFileRepository;
private readonly CommentsManager _commentsManager;
public ReviewPageModel(
ReviewManager manager,
BlobCodeFileRepository codeFileRepository,
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
List<Container> containers = podSpec.getContainers();
if (containers == null || containers.isEmpty()) {
return;
}
log.verbose("Adding init container for changing persistent volumes access mode to %s",
getConfig... | ise-uiuc/Magicoder-OSS-Instruct-75K |
gomobile_repositories()
# config ios
apple_support_dependencies()
swift_rules_dependencies()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"perPage": per_page,
"writable": writable,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
2. train_path, val_path, test_path 경로 수정 (split 한다음에 저장할 경로)
3. ratio 정해주기
4. json_file 변수에 하나로 합쳐져있는 json 파일 경로 쓰기
cf. train, test, val 모두 json 파일 이름 동일하게 설정하기
cf. 여기서 설정한 json 파일 이름을 cucumber.py (training 코드)에도 그대로 써야함
2020-07-24 <NAME>
'''
| ise-uiuc/Magicoder-OSS-Instruct-75K |
m[m == -1] = 100
m = 125*(np.array(m/50,dtype=np.uint8))
return m
def matrix_size(a , b):
'''a , b: car length and width in pixels'''
siz = int(np.sqrt(a**2 + b**2) + 1)
return siz
def _wheels_loc(a,b,theta , pixel_size = 0.1):
'''Locations of wheels in pixel world '''
Orig_fl... | ise-uiuc/Magicoder-OSS-Instruct-75K |
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Datetime\DrupalDateTime;
/**
* Adds event contoller.
*
* Class EventsController
* Implements event controller.
*
* @package Drupal\avoindata_events\Controller
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from django.forms.models import model_to_dict
def show_pc_character(request, character_id=None):
try:
if character_id is None:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from torchmm.models.captioning.nic import NIC
__all__ = [
'SCAN',
'SGRAF',
'VSEPP',
'IMRAM',
'BFAN',
'CMML',
'NIC',
'AoANet',
'BertConfig',
'VILBERTPretrain',
'VILBERTFinetune',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
*/
final public class Constants {
public final static String SERIALIZABLE_NULL_KEY_PATH = "___SERIALIZABLE_NULL_KEY_PATH___";
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
newLabels = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
func load<U>(service: T, decodeType: U.Type, completion: @escaping (CCResult<U>) -> Void) where U: Decodable {
call(service.request) { result in
switch result {
case .success(let data):
do {
let resp = try JSONDecoder().decode(decod... | ise-uiuc/Magicoder-OSS-Instruct-75K |
cb = colorbar.ColorbarBase(cax, norm=colors.Normalize(vmin=vmin, vmax=vmax), cmap=icmap,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
match (env::var("SLACK_API_TOKEN"), env::var("SLACK_DATABASE_URL")) {
(Ok(api_token), Ok(db_url)) => {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
attack_model = [epsilon] * X.shape[1]
groot_tree = GrootTreeClassifier(attack_model=attack_model, max_depth=max_depth)
groot_tree.fit(X, y)
adversary = DecisionTreeAdversary(groot_tree, "groot", attack_model, [True for _ in range(X.shape[1])], [None for _ in range(X.shape[1])], one_adversarial_class=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.offset_y as _,
sdf_width as _,
sdf_height as _,
&sdf,
);
self.offset_x += sdf_width;
self.line_height = max(self.line_height, sdf_height);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"title": "Eiffel tower",
"article": "Eiffel tower is based in Paris",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</ul>
</li>
@endif
| ise-uiuc/Magicoder-OSS-Instruct-75K |
view.addSubview(stopBtn)
view.addSubview(recordRectBtn)
view.addSubview(startRecordBtn)
view.addSubview(stopRecordBtn)
view.addSubview(audioPopUpButton)
view.addSubview(cameraPopUpButton)
view.addSubview(paleyView)
createRecordScreen()
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
-g (enable generation of debugging information, valid only with -opt=0)
-generate-line-info (generate line number information)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public FieldAliases getFieldAliases() {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def send(self):
message = self.send_area.get()
self.send_area.delete(0, 'end')
message = '{}: {}\n'.format(self.username, message)
self.client_socket.send(message.encode('ascii'))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
stack1.push("Paris");
stack1.push("Berlin");
System.out.println(stack1);
GeneralStack<Integer> stack2 = new GeneralStack<>();
stack2.push(1);
stack2.push(2);
stack2.push(3);
System.out.println(stack2);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
make -j $NUM_CPU_CORES
echo $? > ~/install-exit-status
cd ~
7z x Bosphorus_3840x2160_120fps_420_8bit_YUV_Y4M.7z -aoa
7z x Bosphorus_1920x1080_120fps_420_8bit_YUV_Y4M.7z -aoa
echo "#!/bin/sh
./kvazaar-2.1.0/src/kvazaar --threads \$NUM_CPU_CORES \$@ -o /dev/null > \$LOG_FILE 2>&1
echo \$? > ~/test-exit-status" > kvazaa... | ise-uiuc/Magicoder-OSS-Instruct-75K |
save_button = (By.XPATH, "/html/body/app/div[3]/div[2]/div/div/div/button[1]")
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, sentence_objs):
"""The init method to initialize with an array of sentence objects
"""
self.sentence_objs = sentence_objs
def handle(self):
"""Method to calculcate the brunet's statistic
Args:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
town_color = [-1] * n
tmp = [[0, -1, 0]]
while tmp:
v, past, color = tmp.pop()
town_color[v] = color
group[color].append(v + 1)
for i in graph[v]:
if i == past: continue
| ise-uiuc/Magicoder-OSS-Instruct-75K |
requiredToAddedToCommandLine = other1.requiredToAddedToCommandLine;
dataStaged = other1.dataStaged;
storageResourceId = other1.storageResourceId;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
data_sets,
NeuralNetworkOptimizer.OptimizationParameters(geometry, self.learning_rate),
max_steps=max_steps
)
results.append(run_info)
results = sorted(results, key=lambda r: r.cpu_time)
if self.verbose: pprint.pprint(results, width... | ise-uiuc/Magicoder-OSS-Instruct-75K |
echo $1 | cut -d\" -f 2 | awk '{print ") == " $3}'
}
# input: s0 -> s1 [label="h(0) / _"];
# output: missState(s0, 0) == s1
hitState() {
num=$(echo $line | cut -d\( -f2 | cut -d\) -f1)
echo -n "hitState("
echo $1 | awk '{print $1", '$num') == "$3}'
}
# modify params
echo "pragma options \"--be:nosim --beopt:simpl... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
python3 htmltopdf.py | ise-uiuc/Magicoder-OSS-Instruct-75K |
return null;
}
public async buildConfigFile(
configFilePath: string,
destDir: string,
verbose?: boolean,
importHelpers?: boolean,
): Promise<string> {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@property
def location_list_short(self):
return [l.name_short for l in self.locations.all()]
@property
def difficulty_index(self):
return constants.DIFFICULTY_CHOICES.index_of(self.difficulty)
@property
def filter_tags(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// class.path == "android/media/audiofx/DynamicsProcessing$Eq", java.flags == PUBLIC, .name == "<init>", .descriptor == "(ZZI)V"
unsafe {
let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1), __jni_bindgen::AsJValue::as_jvalue(&ar... | ise-uiuc/Magicoder-OSS-Instruct-75K |
uint64_t frame_num; // frame number in streaming session (stream is looped, video sequence will be repeated again and again)
};
class RosBagReader {
public:
RosBagReader();
~RosBagReader();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import click_log
logger = logging.getLogger(__name__)
click_log.basic_config(logger)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public Land(string name, decimal buyPrice, Color color) :
base(name, buyPrice)
{
Color = color;
}
public decimal GetRent => RentPrice.GetRent(LandEnhancements);
}
} | ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--no-cleanup", dest="cleanup_workdir",
action="store_false", default=True,
help="do not delete the generated C files (allows passing --no-cython on next run)")... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import './style.css';
import { App } from './App';
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
decoder_.decodeMessage(*this, builder_);
}
catch(std::exception & ex)
{
more = builder_.reportDecodingError(ex.what());
if(!more)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dotnet publish -c Release
cd bin/Release/netcoreapp3.1/publish
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for i in range(1,D):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
metadata=V1ObjectMeta(name=name, namespace=namespace),
spec=client.V1DeploymentSpec(
selector=client.V1LabelSelector(match_labels=match_labels),
template=V1PodTemplateSpec(template_spec_labels or {})))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def list_buckets():
bck_rep = s3_client().list_buckets()
for buck in bck_rep["Buckets"]:
print(buck)
def create_bucket():
return s3_client().create_bucket(
Bucket="polo202214"
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Copyright ©2017. The Regents of the University of California (Regents). All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its documentation for educational,
research, and not-for-profit purposes, without fee and without a signed licensing agreement, is
hereby granted, provided that ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.timeout = duration;
self
}
pub fn method(mut self, method: Method) -> ReverseProxy<'a> {
self.method = method;
self
}
pub fn header(mut self, header: HeaderMap) -> ReverseProxy<'a> {
self.header = header;
self
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
use serde::Deserialize;
use crate::models::{job::Status, Duration};
/// Request to create a new job.
#[derive(Clone, Debug, Default, Deserialize)]
pub struct CreateRequest {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
'PATCH',
f'/api/v0/user/{self._webapp.user}/webapps/{self._webapp.domain_name}/static_headers/{self.id}/',
data=kwargs
)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import serial
ser = serial.Serial('/dev/ttyACM0') | ise-uiuc/Magicoder-OSS-Instruct-75K |
# iterate through states that we need to generate spectrogram images for
| ise-uiuc/Magicoder-OSS-Instruct-75K |
contad
contador(1, 2, 3,) | ise-uiuc/Magicoder-OSS-Instruct-75K |
# # looking at Known131
# # 1 = gravitational lens
# # 0 = negative lens
#
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
private static Affirmation getActiveAffirmation() {
PojoClass loggerPojoClass = FacadeFactory.getLoadedFacadePojoClass(SUPPORTED_ASSERTIONS);
return (Affirmation) InstanceFactory.getInstance(loggerPojoClass);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"reproducing kernel Hilbert space".
Given n examples from p(X) and m samples from q(Y), one can formulate a
test statistic based on the empirical estimate of the MMD:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# http://pymotw.com/2/platform/
self.audit += " Platform: " + platform.system()
self.audit += "\n Node: " + platform.node()
self.audit += "\n Release: " + platform.release()
self.audit += "\n Version: " + platform.version()
self.audit += "\n Machine: "... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if "SYSTEM_TOPIC" in os.environ:
system_topic = os.environ["SYSTEM_TOPIC"]
system = cast(System, resolve_topic(system_topic))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pixel_per_line = view.line_height()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
package com.github.jpingus;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for (Map.Entry<String, List<String>> entry : seriesList.entrySet()) {
strForList.append("`").append(entry.getKey()).append("` = c(");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
num_box = 0
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# The array script runs jobs over chr
# Set the environment
POP=$1
BAM_DIR=/gpfs/ts0/home/jw962/GUPPYCon/STAR_bams
MASTER=/gpfs/ts0/home/jw962/HP_LP_trials/deeptools
| ise-uiuc/Magicoder-OSS-Instruct-75K |
rm -Rf $working_directory/build/atftp
mkdir -p $working_directory/build/atftp/
if [ ! -f $working_directory/sources/atftp-0.7.2.tar.gz ]; then
wget --no-check-certificate -P $working_directory/sources/ https://freefr.dl.sourceforge.net/project/atftp/atftp-0.7.2.tar.gz
fi
cd $working_directory/build/atftp/
cp $wor... | ise-uiuc/Magicoder-OSS-Instruct-75K |
);
});
ModalFooter.displayName = 'ModalFooter';
if (process.env.NODE_ENV === 'development') {
ModalFooter.propTypes = {
children: PropTypes.node.isRequired,
};
}
export {ModalFooter};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private let placeholder: Placeholder?
init(url: URL, cache: ImageCache? = nil, placeholder: Placeholder? = nil) {
self.imageloader = ImageLoader(url: url, cache: cache)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def descuento(niños=int(input("Cuantos niños son "))):
if niños==2:
descuentoTotal=10
elif niños==3:
descuentoTotal=15
elif niños==4:
descuentoTotal=18
elif niños>=5:
descuentoTotal=18+(niños-4)*1
return print(descuentoTotal)
descuento()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# return highest_product_of_three
return highest_product_of_three
| ise-uiuc/Magicoder-OSS-Instruct-75K |
test_columns(0, 64, 0) # GREEN
test_columns(0, 0, 64) # BLUE
test_columns(64, 64, 64) # WHITE
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def get(self, key):
startslot = self.hashfunction(key, len(self.slots))
found = False
stop = False
data = None
while self.slots[startslot] != None and not found and not stop:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let tags = files
.iter()
.flat_map(|f| f.tags.iter().map(|tag| format_ident!("{}", tag)))
.sorted()
.dedup()
.collect::<Vec<_>>();
let layers = files
.iter()
.flat_map(|f| f.layers.iter().map(|layer| format_ident!("{}", layer)))
.sorted()
.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public String getDataClassName()
{
return "GameTransGameToClientRequest";
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.pagerModel.totalPages = data.count
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class AdmissionsGradeSerializer(serializers.ModelSerializer):
notebook = serializers.FileField(source="feedback")
class Meta(GradeSerializer.Meta):
model = Submission
class AdmissionsChecksumSerializer(serializers.ModelSerializer):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//请求时间(必填)
head.RequestTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
//命名名(必填)
head.Command = "Finance.FinanceList";
//版本号(选填)
head.Version = "1.2.0";
//系统类型【pc,android,ios】(选填)
head.System = "pc";
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class DBProxy(BaseProxy):
_exposed_ = (
'get',
'set',
'delete',
'exists',
)
def __getitem__(self, key):
return self._callmethod('get', (key,))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
q.unlink();
else:
print(q.read_text())
q.unlink();
# 遍历文件
| ise-uiuc/Magicoder-OSS-Instruct-75K |
hits = []
for c in _list_of_courts:
page_url = "https://www.judici.com/courts/cases/case_search.jsp?" + \
"court=" + c.id + query_str
regex_pattern = r"\/courts\/cases\/case_information.jsp\?court="
links = _get_links_from_page(page_url, regex_pattern)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
const pattern = new RegExp('^Endpoint=sb://.*;SharedAccessKeyName=.*;SharedAccessKey=.*$');
return pattern.test(connectionString);
};
| ise-uiuc/Magicoder-OSS-Instruct-75K |
elif str(data_size_str).find('~') != -1:
start_size = int(data_size_str.split('~')[0])
end_size = int(data_size_str.split('~')[1])
return random.randint(start_size, end_size), False
elif str(data_size_str).find(',') != -1:
size_array = data_size_str.split(',')
return int(... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class OriskamiAPIResourcesTests(OriskamiTestCase):
def test_router_data_update(self):
response = oriskami.RouterData.update("0", is_active="true")
self.assertTrue(hasattr(response.data, "__iter__"))
self.assertEqual(response.data[0].is_active, "true")
response = oriskami.RouterData... | ise-uiuc/Magicoder-OSS-Instruct-75K |
created_flag = models.BooleanField(default=True)
privacy = models.BooleanField(default=False)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
],
),
migrations.CreateModel(
name='Skill',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//MARK: - Init方法初始化 InitLifeCycleable可以接在ViewController的头上
public protocol InitLifeCycleable : LifeCycleable, InitNavigable{
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# -----------------------------------------------------
# Singleton class for configuration manager instance creations
# -----------------------------------------------------
class Utils(object):
__instance = None
def ensure_dir(file_path):
directory = os.path.dirname(file_path)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private final class BundleToken {}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.nodes[newGid]['head'] = gid
self.nodes[newGid]['gid'] = newGid # has the same value of the gid of nodes in ldg.
self.nodes[newGid]['remaining_ops'] = list(LgGraph.operator_dic.keys())
self.nodes[gid]['deps'].update({'fork'+str(newGid): newGid})
else:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from app.admin.infrastructure.tables import MySQLStatEventsTable as StatEvents
from app.interfaces.infrastructure.queries import MySQLQuery
all_fields = f'{StatEvents.type_name_col}, {StatEvents.date_col}'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
public virtual void OnSliderValueChanged(float v)
{
property.value = v;
UpdateText();
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
package com.example.vincent.mystuproject;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
gradientLayer.colors = [bottom.cgColor, top.cgColor]
gradientLayer.startPoint = CGPoint(x: 0.5, y: 1.0)
gradientLayer.endPoint = CGPoint(x: 0.5, y: 0.0)
gradientLayer.locations = [0, 1]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
parser.add_argument('--dry-run', action='store_true', help='Print Conan commands instead of running them')
parser.add_argument('--no-cache', action='store_true', help='Do not add the conan-ue4cli recipe cache to the list of default recipe sources')
parser.add_argument('-s', '-source', action='append', dest='sources'... | ise-uiuc/Magicoder-OSS-Instruct-75K |
flag = 0
| 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.
#
# If you are searching for other useful scripts, be free to go to https://github.com/cmxconsulting/
#
CRED='\033[1;31m'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.__set_octave(note[1:2])
self.__set_semitone(note[2:3])
else:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>jacobbarssbailey/daisy_bsp
pub mod midi;
| 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.