seed
stringlengths
1
14k
source
stringclasses
2 values
protected $name = 'make:dto'; protected $signature = 'make:dto {domain} {name}'; protected $description = 'Create a new dto class'; protected $type = 'DTO'; public function __construct() { parent::__construct(new Filesystem()); } protected function getStub(): string
ise-uiuc/Magicoder-OSS-Instruct-75K
assert_true('add_regs' in evds_regrs.a) assert_true('time_indices' in evds_regrs.a.add_regs.sa.regressor_names) assert_equal(len(ds.UC) * len(ds.UT), len(evds_regrs)) assert_equal(len(evds_regrs.UC) * len(evds_regrs.UT), len(evds_regrs))
ise-uiuc/Magicoder-OSS-Instruct-75K
{ // Dispose of any IDisposable members } _pinnedHandle.Free(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
router.register(r'custom_commands', api_views.CustomCommandsViewSet) router.register(r'notices', api_views.NoticeViewSet)
ise-uiuc/Magicoder-OSS-Instruct-75K
# UBUNTU 14.04 #prepare Docker docker build -t base .
ise-uiuc/Magicoder-OSS-Instruct-75K
@login_required(login_url="/login/") def scrape_data(request): scrape_name = request.GET.get('scrape_name', None) start_id = request.GET.get('start_id', None) end_id = request.GET.get('end_id', None) option = webdriver.ChromeOptions() option.add_argument("window-size=1280,800")
ise-uiuc/Magicoder-OSS-Instruct-75K
fmt = '%Y-%m-%d_%H:%M:%S' return datetime.datetime.today().strftime(fmt) def str2bool(v): return v.lower() in ("yes", "true", "1") def is_iterable(obj): return hasattr(obj, '__len__')
ise-uiuc/Magicoder-OSS-Instruct-75K
cancellation_reason_id: number; cancellation_note?: string;
ise-uiuc/Magicoder-OSS-Instruct-75K
}); test('allows user to provide a custom provider', () => {
ise-uiuc/Magicoder-OSS-Instruct-75K
"""User detail view""" template_name='users/detail.html' slug_field='username' slug_url_kwarg='username' #keyword argument... queryset= User.objects.all() context_object_name='user' def get_context_data(self,**kwargs): """add users posts to context""" context=super().get_context_data(**kwargs)
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "DataReference.h" #include "WebCoreArgumentCoders.h" #include <wtf/text/WTFString.h> namespace WebKit {
ise-uiuc/Magicoder-OSS-Instruct-75K
$value = $conv->convert($value); } return $value; }
ise-uiuc/Magicoder-OSS-Instruct-75K
elif macro_func == 'mean': macro_func = Aggr_mean elif macro_func == 'max': macro_func = Aggr_max self.model = MetapathConv( meta_paths, [dgl.nn.pytorch.GATConv(dim_in, dim_out, num_heads=1, bias=bias)
ise-uiuc/Magicoder-OSS-Instruct-75K
import nodes def build_all(src: pathlib.Path, dest: pathlib.Path, log: typing.TextIO = sys.stdout) -> None:
ise-uiuc/Magicoder-OSS-Instruct-75K
# Role Of The User # role = Authentication_Service.sendMessage(adress, finalbody) role = "Test" if role == "False": return "Error - User not allowed"
ise-uiuc/Magicoder-OSS-Instruct-75K
'tensorboard', 'tqdm' ], zip_safe=False)
ise-uiuc/Magicoder-OSS-Instruct-75K
constructor(private companyService: CompanyService, private authService: AuthService) { } ngOnInit() { console.log(StorageService.getItem('User')); this.user = StorageService.getItem('User'); this.companyService.getUserCompanies() .pipe(
ise-uiuc/Magicoder-OSS-Instruct-75K
import pymongo client = pymongo.MongoClient('''mongodb://dakotapope:<PASSWORD>wrd@ cluster0-shard-00-00-iaoct.mongodb.net:27017,cluster0-shard-00 -01-iaoct.mongodb.net:27017,cluster0-shard-00-02-iaoct.mongodb. net:27017/test?ssl=true&replicaSet=Cluster0-shard-0&authSource= admin&retryWrites=true''') # investigate the ...
ise-uiuc/Magicoder-OSS-Instruct-75K
} void Lvl4Creator::Dispose(){ engine->GetEntityManager()->RemoveEntities();
ise-uiuc/Magicoder-OSS-Instruct-75K
return [u(x), v(x)] def forcing_velocity(x): return [forcing_u(x), forcing_v(x)]
ise-uiuc/Magicoder-OSS-Instruct-75K
ExpectationSweepJobContextSchema, ExpectationSweepJobResultSchema, JobProgressSchema, JobResultSchema, JobStatusEventSchema, JobSubmittedSchema, JobsQueueSchema, NoisyExpectationJobContextSchema,
ise-uiuc/Magicoder-OSS-Instruct-75K
</form> </div> </div> @push('custom-scripts') <script> </script> @endpush @endsection
ise-uiuc/Magicoder-OSS-Instruct-75K
template_dir = "template_dir/" model_string = "from weis.multifidelity.models.testbed_components import simple_two_variable as model" output_scalers = [1.0] options = {"method": "coliny_cobyla", "max_function_evaluations": 3} opt = DakotaOptimizer(template_dir) res...
ise-uiuc/Magicoder-OSS-Instruct-75K
{ if (_tmpStack.Count == 0) { while (_stack.Count > 0) { _tmpStack.Push(_stack.Pop()); }
ise-uiuc/Magicoder-OSS-Instruct-75K
cnx = mysql.connector.connect(user='root', password='',
ise-uiuc/Magicoder-OSS-Instruct-75K
} static float calculateFloatConversionError (int srcBits) { if (srcBits > 0) { const int clampedBits = de::clamp<int>(srcBits, 0, 32); const float srcMaxValue = de::max((float)(1ULL<<clampedBits) - 1.0f, 1.0f); const float error = 1.0f / srcMaxValue; return de::clamp<float>(error, 0.0f, 1.0f);
ise-uiuc/Magicoder-OSS-Instruct-75K
# tworzymy instancję bazy używanej przez modele baza = SQLAlchemy(app)
ise-uiuc/Magicoder-OSS-Instruct-75K
('super_entity', models.ForeignKey(to='entity.Entity', related_name='+', help_text='The super entity in the relationship that was activated / deactivated')), ], options={ }, bases=(models.Model,), ), migrations.CreateModel( name...
ise-uiuc/Magicoder-OSS-Instruct-75K
import java.awt.*; import java.awt.datatransfer.StringSelection; public class DocRenderCopyHandler extends EditorActionHandler { private final EditorActionHandler myOriginalHandler; public DocRenderCopyHandler(EditorActionHandler handler) {myOriginalHandler = handler;} @Override protected void doExecute(@No...
ise-uiuc/Magicoder-OSS-Instruct-75K
fn deref_mut(&mut self) -> &mut T { self._value
ise-uiuc/Magicoder-OSS-Instruct-75K
def set_all(self, color): ledshim.set_all(*color) def clear(self): ledshim.clear()
ise-uiuc/Magicoder-OSS-Instruct-75K
return text.replace(u'\xa0', u' ').strip() def parse_restaurant(name, url): data = [] # Construct CSS Selectors
ise-uiuc/Magicoder-OSS-Instruct-75K
self._errors = {} async def async_step_user(self, user_input=None): """Handle a flow initialized by the user."""
ise-uiuc/Magicoder-OSS-Instruct-75K
#e1 = tk.Entry(width=50) #l1 = tk.Label(text="Машинное обучение", font="Arial 32") l2 = tk.Label(text="Отчет работы:\n", font="Arial 32" ) l2.pack(expand=1, anchor=tk.SE) #l1.config(bd=20, bg='#ffaaaa') #l1.pack() #e1.pack(expand=1, anchor=tk.E) tex = tk.Text() tex.pack(side=tk.RIG...
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public static func warning(_ msg: String) { self.log("[WARNING] \(msg)", LogLevel.Warning) }
ise-uiuc/Magicoder-OSS-Instruct-75K
void reset() { for(int i=0;i<n+10;i++) { edge[i].clear(),cost[i].clear(),dis[i]=INF; } } int main()
ise-uiuc/Magicoder-OSS-Instruct-75K
.GreaterThan(0); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
if (jump && m_isGround) { m_animator.SetTrigger("Jump"); SendMessage("Jump", SendMessageOptions.DontRequireReceiver); m_rigidbody2D.AddForce(Vector2.up * jumpPower); } } void FixedUpdate() { Vector2 pos = transform.position; Vector...
ise-uiuc/Magicoder-OSS-Instruct-75K
return password }
ise-uiuc/Magicoder-OSS-Instruct-75K
import retrofit2.http.Headers; import retrofit2.http.Multipart; import retrofit2.http.POST; import retrofit2.http.Part; public interface Ascii2DApi { @Multipart @POST("/search/file") @Headers("User-Agent: RetrofitClient") Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part); }
ise-uiuc/Magicoder-OSS-Instruct-75K
protected get editDialogComponent(): ComponentType<any> { return PictureDialogComponent; } protected get root(): string {
ise-uiuc/Magicoder-OSS-Instruct-75K
urlpatterns = [ url(r'^(\w+)/(\d+)$', views.get_video_by_competition), url(r'^add/', views.add_video_by_competition), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
.next() .map(|s| usize::from_str_radix(s, 10).unwrap()) .unwrap(); let bus_ids: Vec<_> = lines .next() .unwrap() .split(',') .map(|s| usize::from_str_radix(s, 10)) .flatten() .collect(); let res = part1(start, &bus_ids); println!("res =...
ise-uiuc/Magicoder-OSS-Instruct-75K
def __repr__(self): return "User(id='{}')".format(self.user_id) def to_dict(self): return {"user_id": self.user_id, "username": self.username}
ise-uiuc/Magicoder-OSS-Instruct-75K
{ void CCallbackTimerTest::TestAll() { TestConstruct(); TestTimer(); } void CCallbackTimerTest::TestConstruct() { const _tstring functionName = _T("CCallbackTimerTest::TestConstruct"); Output(functionName + _T(" - start")); CCallbackTimer timer;
ise-uiuc/Magicoder-OSS-Instruct-75K
pkill -9 python python -m ta3ta2.server > /tmp/server_out 2>&1 & sleep 1 python -m ta3ta2.test_server
ise-uiuc/Magicoder-OSS-Instruct-75K
if folder.parts[-3] == 'VIP_CUP18_TestData': output_path = output_dir / 'testing' / f"{case_id}.nii.gz" else: output_path = output_dir / 'training' / f"{case_id}.nii.gz" try: dicom2nifti.d...
ise-uiuc/Magicoder-OSS-Instruct-75K
{ get { return _hasMinorGridlines; }
ise-uiuc/Magicoder-OSS-Instruct-75K
Ok(()) => Ok(()), Err(e) => { if !opts.quiet {
ise-uiuc/Magicoder-OSS-Instruct-75K
def send_async_email(app, sg, mail): with app.app_context(): response = sg.client.mail.send.post(request_body=mail.get()) def send_email(to, subject, template, **kwargs): app = current_app._get_current_object() sg = sendgrid.SendGridAPIClient(apikey=app.config['SENDGRID_API_KEY'])
ise-uiuc/Magicoder-OSS-Instruct-75K
@pytest.mark.parametrize("code,errors", EXAMPLES) def test_examples(code: str, errors: list[Error]) -> None: expr = ast.parse(code) assert to_errors(Flake8PieCheck(expr, filename="foo.py").run()) == errors
ise-uiuc/Magicoder-OSS-Instruct-75K
<html> <head> <title>Word Grid Game</title> <meta charset='UTF-8' /> <script src=\"js/jquery.min.js\"></script> <style>
ise-uiuc/Magicoder-OSS-Instruct-75K
@pytest.fixture def SubCategory(self, Base, Product): class SubCategory(Base): __tablename__ = 'sub_category' id = sa.Column('_id', sa.Integer, primary_key=True) category_id = sa.Column( '_category_id', sa.Integer, sa.F...
ise-uiuc/Magicoder-OSS-Instruct-75K
this.profileId = profileId; } public String getSchool() { return school;
ise-uiuc/Magicoder-OSS-Instruct-75K
assert_eq!(target.values[1].value, "2"); assert_eq!(target.values[2].key, "three"); assert_eq!(target.values[2].value, "3"); }
ise-uiuc/Magicoder-OSS-Instruct-75K
// // NullViewController.swift // XMGWeibo // // Created by tianyao on 15/8/31.
ise-uiuc/Magicoder-OSS-Instruct-75K
dirname:string constructor(dirname?:string) public getLastCallDirname():string public json2file(path_:string,json:{[k:string]:any}):void public file2json (path_:string,encoding:string):{ json:{[k:string]:any},
ise-uiuc/Magicoder-OSS-Instruct-75K
if poisson_a_is_log: sim_maps = np.asarray([random_draw_fn((10.0 ** a[i]) * t_masked_compressed) for i in range(n_sim_per_chunk)]) else: sim_maps = np.asarray([random_draw_fn(a[i] * t_masked_compressed) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
} public scalePlayer(): void { this.game.add.tween(this.scale).to({ x: 1.3, y: 1.3 }, 100) .yoyo(true).start(); } public move(direction?: Direction): void { // If the left arrow key is pressed if (direction === Direction.Left) { // Move the player to the...
ise-uiuc/Magicoder-OSS-Instruct-75K
import HandTracking_module as htm # initiate time pTime = 0 cTime = 0 cap = cv2.VideoCapture(0) # 0 is internal camera, while 1 is external camera detector = htm.handDetector() while True:
ise-uiuc/Magicoder-OSS-Instruct-75K
$validator = Validator::make($request->all(), [ 'backup_log_system' => 'required', 'maintenance_system' => 'required' ], [ 'backup_log_system.required' => 'Invalid Action !!!', 'maintenance_system.required' => 'Invalid Action !!!' ...
ise-uiuc/Magicoder-OSS-Instruct-75K
super(); this.visible = false; this.frame = 0;
ise-uiuc/Magicoder-OSS-Instruct-75K
@ViewChild("moreInfo") infoBlock: ElementRef; constructor(public authService: AuthService, public router: Router) { this.currentUser = JSON.parse(localStorage.getItem('currentUser')); } ngOnInit() {
ise-uiuc/Magicoder-OSS-Instruct-75K
print(resp) print(f"{key} processed.") return False
ise-uiuc/Magicoder-OSS-Instruct-75K
{ /** * A basic test example. * * @return void */ public function testAddRootUser() { $data = [ 'name' => '<NAME>', 'email' => '<EMAIL>', 'password' => '<PASSWORD>'
ise-uiuc/Magicoder-OSS-Instruct-75K
assert "Can't instantiate abstract class FileFilter" in str(exc_info.value)
ise-uiuc/Magicoder-OSS-Instruct-75K
}, )
ise-uiuc/Magicoder-OSS-Instruct-75K
def load_config(create=False) -> 'Config':
ise-uiuc/Magicoder-OSS-Instruct-75K
from ensmallen_graph import EnsmallenGraph # pylint: disable=no-name-in-module def load_hpo() -> EnsmallenGraph: """Test that HPO graph can be loaded.""" graph = EnsmallenGraph.from_unsorted_csv( edge_path="./pytests/data/edges.tsv", sources_column="subject", destinations_column="obj...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Generated by Django 1.11.13 on 2018-05-14 07:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('test_app', '0001_initial'), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-filter', templateUrl: './filter.component.html', styleUrls: ['./filter.component.sass'] }) export class FilterComponent { down: string = "/assets/menu-down.png" up: string = "/assets/menu-up.png" visiblSettings: boolean = false...
ise-uiuc/Magicoder-OSS-Instruct-75K
(r'^use_template/(.*/)?', views.use_template), )
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php // puedo cargar otras funciones iniciales // dentro de la funcion donde cargo la vista actual // como por ejemplo cargar el corte actual if(isset($_SESSION["admin_id"])){ View::load("index"); }else{ Action::execute("login",array()); } ?>
ise-uiuc/Magicoder-OSS-Instruct-75K
} if (get_permission("view", $forum["id"]) === false) { exit(); } if (!empty($forum["logo"])) { $url = "uploaded_img/".$forum["logo"];
ise-uiuc/Magicoder-OSS-Instruct-75K
return db_instance.get_row(SASaleInvoiceB, *args, **kwargs) def get_sale_invoice_items_rows(*args, **kwargs): """ 获取列表 :param args: :param kwargs: :return: """ return db_instance.get_rows(SASaleInvoiceB, *args, **kwargs)
ise-uiuc/Magicoder-OSS-Instruct-75K
'tableColumn', 'tableRow', 'mergeTableCells', ], }, toolbar: { items: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote',
ise-uiuc/Magicoder-OSS-Instruct-75K
__all__ = [ "Root", ]
ise-uiuc/Magicoder-OSS-Instruct-75K
} var nestedTypes = symbol.GetMembers(); if (nestedTypes.IsDefaultOrEmpty) {
ise-uiuc/Magicoder-OSS-Instruct-75K
* 2020-04-10 * Veronica */ class Solution { public: int minPathSum(vector<vector<int>>& grid) { int m = grid.size(); if (m == 0) return 0; int n = grid[0].size(); if (n == 0) return 0; vector<int> pathSum(m);
ise-uiuc/Magicoder-OSS-Instruct-75K
$(''+val+'#form_contact .input_warn').text('* 内容控制在2-500字'); return false; } else { $(''+val+'#form_contact').submit(); } } // load more function loadMore() { $("#uyan_more_cmt span").text("加载评论中"); var start = $("#start").val(); var limit = $("#limit").val(); var id = $("#id").val(); $.post( __A+'articl...
ise-uiuc/Magicoder-OSS-Instruct-75K
public var image: UIImage? { set {} get { return nil } } public var badgeValue: String? { set {} get { return nil
ise-uiuc/Magicoder-OSS-Instruct-75K
</div> </div> @endsection
ise-uiuc/Magicoder-OSS-Instruct-75K
subject='Helios Decrypt', body=""" Helios has decrypted its portion of the tally
ise-uiuc/Magicoder-OSS-Instruct-75K
memcache_client.set(requestId, event) def get(requestId): # Get item (UUID) from the cache. item = memcache_client.get(requestId) return item
ise-uiuc/Magicoder-OSS-Instruct-75K
ref_date = models.DateField(blank=True) ingredient = models.CharField(max_length=255) created = models.DateTimeField(auto_now_add=True)
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == "__main__": main() # Solution part 1: 19944447 # Solution part 2: 81207421
ise-uiuc/Magicoder-OSS-Instruct-75K
label.textAlignment = .center
ise-uiuc/Magicoder-OSS-Instruct-75K
"locationPulseInterval": "6000000" } """ ATTRS = [ 'header', 'accuracy',
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * @ Author :XuanDongTang * @ Date :Created in 4:08 下午 2020/12/8
ise-uiuc/Magicoder-OSS-Instruct-75K
os.remove(filename + "_"+"Z-axis.png") else: tcpCliSock.send("0".encode()) continue if(os.path.exists(filename + "_"+"X-axis.png")): os.remove(filename + "_"+"X-axis.png") else: tcpCliSock.send("0".encode()) continue if(os.path.exists(filename + "_"+...
ise-uiuc/Magicoder-OSS-Instruct-75K
def dequeue(self): try: return self.array.pop(0) except IndexError: raise ValueError('queue is empty')
ise-uiuc/Magicoder-OSS-Instruct-75K
def crop_classes(train_geo):
ise-uiuc/Magicoder-OSS-Instruct-75K
cumulative2(mean, std, lower_range, upper_range)
ise-uiuc/Magicoder-OSS-Instruct-75K
self.daemon = True self._comm = comm self._stateMachine = stateMachine def run(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
mean_x.add_assign_round( div, Round::Nearest); // info!("{} mean_x={}",n, mean_x.to_string_radix(10, None)); //mean_y += (y - mean_y) / (n as f64); let minus = Float::with_val(512, &y - &mean_y ); // let mut recipTmp = Float::new(512); let div = Float::with_val(512, &minu...
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_library(tempdir): assert '1x32_buzsaki' in list_probes() probe = load_probe('1x32_buzsaki') assert probe assert probe.channels == list(range(32)) path = Path(tempdir) / 'test.prb' with raises(IOError): load_probe(path) with open(path, 'w') as f:
ise-uiuc/Magicoder-OSS-Instruct-75K
match typ { FixedSize::Base(Base::Unit) => fe::TypeDesc::Unit,
ise-uiuc/Magicoder-OSS-Instruct-75K
open class MJHorizontalScrollVM: MJViewModel { public internal(set) var pageVM: MJHorizontalPageVM!
ise-uiuc/Magicoder-OSS-Instruct-75K
@DocumentationExtension(mergeBehavior: override)
ise-uiuc/Magicoder-OSS-Instruct-75K
* search * * @param $modelMorph * @param array $params * @return mixed */ public function search($modelMorph, $params = []) { $params = $this->setParams($params); $query = $modelMorph->ratings(); $query = $query->with('user');
ise-uiuc/Magicoder-OSS-Instruct-75K