seed
stringlengths
1
14k
source
stringclasses
2 values
S3_PATH_ENTITIES, 'entity', model = model, validate = validate, )
ise-uiuc/Magicoder-OSS-Instruct-75K
public extension Chain where Base: NSMutableAttributedString { @discardableResult func addAttribute(_ name: AttributedStringKey, value: Any, range: NSRange) -> Chain { base.addAttribute(name, value: value, range: range) return self } @discardableResult func addAttributes(_...
ise-uiuc/Magicoder-OSS-Instruct-75K
struct PID { let kp: Float let ki: Float private(set) var controlVariable: Float = 0 private var lastUpdateTime: Date? private var lastError: Float = 0 private var errorIntegral: Float = 0 init(kp: Float, ki: Float) { self.kp = kp self.ki = ki
ise-uiuc/Magicoder-OSS-Instruct-75K
} return Ok(Parsed::Pushd(value)); }, "@popd" => { if value.len() > 0 { let (s1, s2, s3) = repl::partition_re(&RE_POPD, alias_value).unwrap(); return Err(Error::new(ErrorKind::InvalidData, format!("{}: @popd...
ise-uiuc/Magicoder-OSS-Instruct-75K
// ============== implementation starts ============== // #include "mtsampler.hpp"
ise-uiuc/Magicoder-OSS-Instruct-75K
self.use_intent_context_concat = use_intent_context_concat self.max_seq_len = max_seq_len self.num_intent_labels = num_intent_labels self.num_slot_labels = num_slot_labels self.attention_embedding_size = attention_embedding_size output_dim = self.attention_embedding_size...
ise-uiuc/Magicoder-OSS-Instruct-75K
# INTRO FUNCTIONS def intro_events(self): for event in pygame.event.get(): if event.type == pygame.QUIT: self.running = False if event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE: self.running = False
ise-uiuc/Magicoder-OSS-Instruct-75K
'dv_token_update': None }) self.assertEqual(serializer.is_valid(), True) dataverse_user = serializer.save() # Ensure token from DataverseHandoff makes it onto the new DataverseUser
ise-uiuc/Magicoder-OSS-Instruct-75K
views_relations.SampleRunRelationshipViewSet, basename='samples-runs' ) router.register( r'experiment-types/(?P<experiment_type>[^/]+)/runs', views_relations.ExperimentTypeRunRelationshipViewSet, basename='experiment-types-runs' ) router.register( r'experiment-types/(?P<experiment_type>[^/]+)/...
ise-uiuc/Magicoder-OSS-Instruct-75K
@pytest.fixture def contacts_view_id(fs): views = fs.contacts.get_views() for v in views: if re.match('all', v['name'].lower()): return v['id'] assert False, 'Could not find a contacts view' return None
ise-uiuc/Magicoder-OSS-Instruct-75K
modules.insert("ObjectMapper") var guards: [String] = [] var assigns: [String] = []
ise-uiuc/Magicoder-OSS-Instruct-75K
selfNode.root = new_node else: selfNode.root.insert(new_node) def remove(selfNode, nodeData): to_remove = selfNode.search(nodeData) if (selfNode.root == to_remove and selfNode.root.left is None
ise-uiuc/Magicoder-OSS-Instruct-75K
# print(exif_infos)
ise-uiuc/Magicoder-OSS-Instruct-75K
################################################################################ def du(path): """disk usage in human readable format (e.g. '2,1GB')""" return subprocess.check_output(['du','-sh', path]).split()[0].decode('utf-8') class PostedFileWriter(object):
ise-uiuc/Magicoder-OSS-Instruct-75K
package cn.rong.combusis.ui.roomlist; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment;
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == "__main__": theadpool()
ise-uiuc/Magicoder-OSS-Instruct-75K
low_bits_3 = transform.rgb_to_LAB_L_low_bits(block, 3) data = compression.get_SVD_s(low_bits_3) if data_type == 'low_bits_2': low_bits_2 = transform.rgb_to_LAB_L_low_bits(block, 2) data = compression.get_SVD_s(low_bits_2)
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "!!! More than one Apple_HFS or Apple_HFSX volumes present. Cannot decide which one to use. Emergency stop." if (whoami = root); then
ise-uiuc/Magicoder-OSS-Instruct-75K
let mut random_number_generator = RandomNumberGenerator::new( humidity_sensor.read(&mut delay).to_combined_u64() ); loop { delay.delay(random_number_generator.next(500, 2000).ms());
ise-uiuc/Magicoder-OSS-Instruct-75K
if not query_on_field:#Default case on sentence.sn sentence.sn = [ng for [prep, ngL] in nominal_groupL for ng in ngL] sentence.sv = [] elif query_on_field == 'QUERY_ON_DIRECT_OBJ': sentence.sv[0].d_obj = [ng for [prep, ngL] in nominal_groupL for ng in ngL]
ise-uiuc/Magicoder-OSS-Instruct-75K
[JsonPropertyName("min_duration")] public int? MinDuration { get; init; }
ise-uiuc/Magicoder-OSS-Instruct-75K
# Monkey patch the result type of the dataset computation to avoid TypeError # being raised inside `tff.simultation.iterative_process_compositions`. # TODO: propose to relax the assumption about the type signature of the # dataset computation being SequenceType in TFF. try: # Monkey-patch tf_computa...
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Set the applied field to the first value in `H_ext_list` (which should be a list of external field vectors) and then call the relax() method. When convergence is reached, the field is changed to the next one in H_ext_list, and so on until all values in H_ext_list are exhausted. Note: The fi...
ise-uiuc/Magicoder-OSS-Instruct-75K
print("closing db thread") def run(self): while self.connected:
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php /* * Copyright 2018 the original author or authors. * * 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 a...
ise-uiuc/Magicoder-OSS-Instruct-75K
__version__ = version = '0.9.2' DEFAULT_IGNORE = 'E24' DEFAULT_INDENT_SIZE = 4 if sys.platform == 'win32': # pragma: no cover DEFAULT_CONFIG = os.path.expanduser(r'~\.pep8') else: DEFAULT_CONFIG = os.path.join(os.getenv('XDG_CONFIG_HOME') or os.path.expanduser('~/.config')...
ise-uiuc/Magicoder-OSS-Instruct-75K
steps, success = self._controller.backwardAction.data().toInt() if success: self._controller.model.relativeHistoryIndex = steps @util.immediateConnectionDecorator("forwardAction", "triggered()") def _historyForwardClickedSlot(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
from ._Scorch_Module._scorch import Scorch from ._AnnData_handlers._AnnData_from_10x_h5 import _AnnData_from_10x_h5 as read_10x_h5 # 10x cellranger auxiliary functions from ._10x_cellranger_auxiliary._post_10x_pipestance import ( _post_10x_pipestance as post_10x_pipestance, ) from ._10x_cellranger_auxiliary._post_...
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 from rest_framework.authentication import TokenAuthentication class CustomTokenAuthentication(TokenAuthentication): keyword = "Bearer"
ise-uiuc/Magicoder-OSS-Instruct-75K
return { keyword }; } else if (keyword instanceof RegExp && keyword.test(text)) { return { keyword, match: text.match(keyword) }; } } return false; };
ise-uiuc/Magicoder-OSS-Instruct-75K
internal string Key { get { return this.Name; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
time_t start = time(0); scene.render(&image, width, height); std::cout << "Rendering finished in " << difftime(time(0), start) << " seconds." << std::endl; std::cout << "Writing to " << outfile_name << "." << std::endl; image.save(outfile_name); }
ise-uiuc/Magicoder-OSS-Instruct-75K
} } public onSubmit(values:Object){ if(this.editForm.valid){
ise-uiuc/Magicoder-OSS-Instruct-75K
public class PositionModificationSample : Robot { [Parameter("Position Comment")] public string PositionComment { get; set; } [Parameter("Position Label")] public string PositionLabel { get; set; } [Parameter("Stop Loss (Pips)", DefaultValue = 10)] public double...
ise-uiuc/Magicoder-OSS-Instruct-75K
'/{db_name}'
ise-uiuc/Magicoder-OSS-Instruct-75K
); return products; } catch (e) { throw new RequestTimeoutException( 'taking longer than expected please try later',
ise-uiuc/Magicoder-OSS-Instruct-75K
data_date = Field("data_date")
ise-uiuc/Magicoder-OSS-Instruct-75K
s.integer(io.dspCounter); s.integer(io.apu0); s.integer(io.apu1); s.integer(io.apu2); s.integer(io.apu3); s.integer(io.timersDisable); s.integer(io.ramWritable); s.integer(io.ramDisable); s.integer(io.timersEnable);
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Set matchTime * * @param integer $matchTime * * @return TournamentGame */ public function setMatchTime($matchTime) {
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>consulo/consulo-spring public class FooInjection2 { }
ise-uiuc/Magicoder-OSS-Instruct-75K
def _get_timestamp_from_string( timestring ) : dt = datetime.datetime.strptime(timestring,"%Y-%m-%d %H:%M:%S.%f") ts = time.mktime (dt.timetuple()) * 1000 return ts def _get_stub_job (): try: job = Job.objects.get(id='ffffffffffffffff0000000000000000') except Job.DoesNotExist: job = Job...
ise-uiuc/Magicoder-OSS-Instruct-75K
from flask_migrate import Migrate from flocka.models import User # Setup flask cache cache = Cache() # Init flask assets assets_env = Environment()
ise-uiuc/Magicoder-OSS-Instruct-75K
* 0 /\ * \ / \ * \/ \ * 2 -- 4 ---> demand = 1 * </pre>
ise-uiuc/Magicoder-OSS-Instruct-75K
# Created by MechAviv # High Noon Damage Skin | (2438671) if sm.addDamageSkin(2438671): sm.chat("'High Noon Damage Skin' Damage Skin has been added to your account's damage skin collection.") sm.consumeItem()
ise-uiuc/Magicoder-OSS-Instruct-75K
argument_list|)
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php if($this->session->flashdata('type') =='0') { ?> <div class="alert alert-danger"> <?php } else {?>
ise-uiuc/Magicoder-OSS-Instruct-75K
<Layout> <Sider trigger={null} collapsible collapsed={this.state.collapsed} style={{overflow: 'auto', height: '100vh'}} width={256} theme={"light"} > <ApiList {...apiInfo} /> ...
ise-uiuc/Magicoder-OSS-Instruct-75K
CMD='eval date ; eval uname -m ; eval uname -r ; eval uname -s ; eval uname -v ; eval uname -p' elif [ "x$KERNEL" = "xHP-UX" ] ; then # HP-UX lacks -p switch. assertHaveCommand date assertHaveCommand uname CMD='eval date ; eval uname -m ; eval uname -r ; eval uname -s ; eval uname -v' elif [ "x$KERNEL" = "xAIX" ] ...
ise-uiuc/Magicoder-OSS-Instruct-75K
bool palindrome (void){ bool isPalindrome = true; for (int i = myFront; i != (myBack - 1) / 2 ; i++) {
ise-uiuc/Magicoder-OSS-Instruct-75K
imgs_pil.append(im) mesh = mesh_imgs(imgs_pil)
ise-uiuc/Magicoder-OSS-Instruct-75K
else: return "Returning Hello"
ise-uiuc/Magicoder-OSS-Instruct-75K
except: self.this = this def _clone(self, f=0, c=None): return _SimInternalLoad_Lights_Default.SimInternalLoad_Lights__clone(self, f, c) __swig_destroy__ = _SimInternalLoad_Lights_Default.delete_SimInternalLoad_Lights __del__ = lambda self: None SimInternalLoad_Lights_swigregist...
ise-uiuc/Magicoder-OSS-Instruct-75K
} ); sqlfunc!( #[sqlname = "sqrtf64"] fn sqrt_float64(a: f64) -> Result<f64, EvalError> { if a < 0.0 { return Err(EvalError::NegSqrt); } Ok(a.sqrt()) } ); sqlfunc!(
ise-uiuc/Magicoder-OSS-Instruct-75K
#initialization will run the method context.module = DiseaseAssociatedGeneSet(context.disease) @then('the module result contains {gene_ids}') def step_impl(context): hit_ids = [ x["hit_id"] for x in context.module.disease_associated_genes ] gene_ids = gene_ids.split(",") for gene ...
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public void notifyEdgeSchedule(PathEdge<N, D> edge) { // TODO Auto-generated method stub
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_utils(self): self.assertEqual(testmod(utils).failed, 0)
ise-uiuc/Magicoder-OSS-Instruct-75K
// TravilerTests // // Created by Mohammed Iskandar on 30/12/2020. // import Foundation @testable import Traviler class WeatherConstants {
ise-uiuc/Magicoder-OSS-Instruct-75K
CHECK_EQUAL(10, parameter_flash_storage_block_get_length(block)); mock("flash").expectOneCall("erase").withParameter("sector", block); parameter_flash_storage_save(block, sizeof(block), &ns); }
ise-uiuc/Magicoder-OSS-Instruct-75K
X = pd.DataFrame(columns=cols, index=[0, 1, 2]) X["var_0"] = pd.Series( [pd.Series([1, 2, 3]), pd.Series([1, 2, 3]), pd.Series([1, 2, 3])] ) X["var_1"] = pd.Series( [pd.Series([4, 5, 6]), pd.Series([4, 55, 6]), pd.Series([42, 5, 6])] ) example_dict[("nested_univ", "Panel", 0)] = X
ise-uiuc/Magicoder-OSS-Instruct-75K
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MovieLib { public interface IMovieDatabase {
ise-uiuc/Magicoder-OSS-Instruct-75K
pass class C(B): def name(self): print(self.username) def age(self): return c=C('Testing-123456') c.name()
ise-uiuc/Magicoder-OSS-Instruct-75K
import UIKit class HomeRouter: Router { func route(to routeID: String, from context: UIViewController, parameters: Any?, animated: Bool) { switch routeID { case NotificationsVC.identifier:
ise-uiuc/Magicoder-OSS-Instruct-75K
frame = imresize(frame_large, (128, 128)) # needed
ise-uiuc/Magicoder-OSS-Instruct-75K
self.ssl_file('server-private-key.pem'), password="<PASSWORD>") self.ssl_domain.set_trusted_ca_db(self.ssl_file('ca-certificate.pem')) def ssl_file(self, name): return os.path.join(system_test.DIR, 'ssl_certs', name) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
author_email='<EMAIL>', url='https://github.com/clics/pyclics-clustering', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', 'Programming Language :: Py...
ise-uiuc/Magicoder-OSS-Instruct-75K
'type': target_value, 'type_mapping': {}, 'extra_columns': {}, } continue mapping[target_table]['sources'][source_table]['type_mapping'].setdefault(source_attribute, []).append((source_value, target_value)) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
node ../../output/index.js push ../.. "le test message"
ise-uiuc/Magicoder-OSS-Instruct-75K
pub fn connect<S: Into<String>>(id: S) -> Connect { Connect {
ise-uiuc/Magicoder-OSS-Instruct-75K
var office = new DataBoxOffice
ise-uiuc/Magicoder-OSS-Instruct-75K
}); it('generates the expected raw message', () => { expect(omnistat2Request.raw).toBe('2At200000000000000000000000000000000000000C7\r\n'); }); }); });
ise-uiuc/Magicoder-OSS-Instruct-75K
{ InitializeComponent(); listView.SelectedItem = (listView.ItemsSource as IList)?[0]; } void OnListViewItemTapped(object sender, ItemTappedEventArgs e)
ise-uiuc/Magicoder-OSS-Instruct-75K
:param params: Additional arguments sent to compute engine. .. index:: transform Example: .. literalinclude:: /../nimbusml/examples/TensorFlowScorer.py :language: python """
ise-uiuc/Magicoder-OSS-Instruct-75K
tf.keras.layers.Dense(10, activation=tf.nn.softmax) ]) model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) model.fit(x_train, y_train, epochs=2) loss, metrics = model.evaluate(x_test, y_test) print('loss={0} accuracy={1}'.format(loss, metrics))
ise-uiuc/Magicoder-OSS-Instruct-75K
mkdir -p $CUR_DIR/classes javac -Xlint -classpath $MY_CLASSPATH -d $CUR_DIR/classes $CUR_DIR/KMeans.java jar -cvf kmeans.jar -C $CUR_DIR/classes .
ise-uiuc/Magicoder-OSS-Instruct-75K
final class FirstScreenPresenter: FirstScreenPresenterProtocol { private var service: WebService private weak var view: FirstScreenViewControllerPresenterProtocol! private weak var router: FirstScreenRouterProtocol! init(view: FirstScreenViewControllerPresenterProtocol, router: FirstScreenRouterProto...
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "sexpr.hpp"
ise-uiuc/Magicoder-OSS-Instruct-75K
r = requests.get(url) return r.text
ise-uiuc/Magicoder-OSS-Instruct-75K
return "" } }
ise-uiuc/Magicoder-OSS-Instruct-75K
for filename, content in files.items(): open(os.path.join(self.db, filename), 'w+').write(content) def test_yamlbackend_load(self): f1 = """ --- key: value """ f2 = """ --- key2: value2 """ files = {'f1.yaml': f1, 'f2.yaml': f2} self.create_db(files)
ise-uiuc/Magicoder-OSS-Instruct-75K
path('teamsignup/<encodeddata>/', views.teamsignup, name='teamsignup'), path('teamsignupcomplete/', views.teamsignupcomplete, name='teamsignupcomplete'), re_path(r'^logout', views.logout, name='logout'), re_path(r'^forgot_password', views.forgot_password, name='forgot_password'), path('reset_confirm...
ise-uiuc/Magicoder-OSS-Instruct-75K
}; }, );
ise-uiuc/Magicoder-OSS-Instruct-75K
@Component({ selector: 'app-mainnav', templateUrl: './mainnav.component.html',
ise-uiuc/Magicoder-OSS-Instruct-75K
fields: { ...videos.mutationFields } }) const schema = new GraphQLSchema({ query: queryType, mutation: mutationType })
ise-uiuc/Magicoder-OSS-Instruct-75K
package cppclassanalyzer.database.schema; import cppclassanalyzer.database.record.ArchivedClassTypeInfoRecord; import cppclassanalyzer.database.schema.fields.ArchivedClassTypeInfoSchemaFields; public final class ArchivedClassTypeInfoSchema extends AbstractSchema<ArchivedClassTypeInfoRecord> { private static final...
ise-uiuc/Magicoder-OSS-Instruct-75K
LOG_FORMAT = '%(asctime)s.%(msecs)03d [%(levelname)s] %(module)s.%(funcName)s:%(lineno)d (%(process)d:' \ + '%(threadName)s) - %(message)s' LOG_DATE_FORMAT = '%Y-%m-%dT%H:%M:%S%z' LOG_LEVEL = 'INFO' COLUMN_STAT_ORDER = None # type: Dict[str, int] UNEDITABLE_SCHEMAS = set() # type...
ise-uiuc/Magicoder-OSS-Instruct-75K
use uvll; use raw::{mod, Request, Allocated, Stream}; use UvResult; pub struct Write { handle: *mut uvll::uv_write_t, } impl Write { pub fn send<T, U>(&mut self, handle: &mut U, buf: &[u8], cb: uvll::uv_write_cb) -> UvResult<()>
ise-uiuc/Magicoder-OSS-Instruct-75K
'id': team_id + '.' + channel_id, 'type': type # --- private or channel }, 'user': { 'id': user_id, 'username': user_name, 'lang': None }, 'service': self.__name__, 'commands': [co...
ise-uiuc/Magicoder-OSS-Instruct-75K
Get the available models for translation """ params = {'default': default, 'source': source, 'target': target} return self.request(method='GET', url='/v2/models', params=params, accept_json=True) def translate(self, text, source=None, target=None, model=None): """ Tr...
ise-uiuc/Magicoder-OSS-Instruct-75K
worksheet.Cells[4, 0].Value = "In order to see Russian and Chinese characters you need to have appropriate fonts on your PC.";
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/usr/bin/env bash # main bash build script for CI, dev and releasing. Used in Makefile set -e # Abort script at first error source ../bin/init_env # main init script setVar BOT_EMAIL <EMAIL> # --- boiler plate function runner, keep at end of file ------ # check if first param is a functions if declare -f "$1" > /...
ise-uiuc/Magicoder-OSS-Instruct-75K
message = "Starting aggregator " + str(agg) logger.info(message)
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Created by Allen7D on 2018/6/16. """ import os.path as op from flask_admin import Admin, BaseView, expose
ise-uiuc/Magicoder-OSS-Instruct-75K
print('{}EU{}: {}\t\t{}PC{}: {}'.format(cor['vermelho'], cor['fim'], me, cor['vermelho'], cor['fim'], pc[0])) print('TESOURA {}CORTA{} PAPEL\n'.format(cor['amarelo'], cor['fim']))
ise-uiuc/Magicoder-OSS-Instruct-75K
* Modelo Course, maneja toda la información de los cursos */ class Course extends ActiveRecord { }
ise-uiuc/Magicoder-OSS-Instruct-75K
base_path = os.path.dirname(__file__) print(base_path) try: f = open(base_path + '/../config/token.txt', 'r') token = f.read() f.close() except OSError: f = open(base_path + '/../config/token.txt', 'w') token = auth() f.write(token)
ise-uiuc/Magicoder-OSS-Instruct-75K
import Configuration
ise-uiuc/Magicoder-OSS-Instruct-75K
protected $fillable = [ 'type',
ise-uiuc/Magicoder-OSS-Instruct-75K
# print(arrivals[ts_idx + 1], step_durations[ts_idx + 1], step_start_ts, timestamp) if timestamp >= step_start_ts: # print('in')
ise-uiuc/Magicoder-OSS-Instruct-75K
set -e -x if [ "${1}" != "major" -a "${1}" != "minor" -a "${1}" != "patch" ]; then echo "Usage: ${0} (major|minor|patch)" exit 1 fi part="${1}" poetry run bump2version "${part}" poetry build poetry run twine check dist/*
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range( N ): xDP[56][56] = 20 t1 = time.time() print t1 - t0,'xDP[56][56] = 20' # Time setting, including derivs print 'SETTING INCLUDE DERIVS'
ise-uiuc/Magicoder-OSS-Instruct-75K