seed
stringlengths
1
14k
source
stringclasses
2 values
<gh_stars>10-100 import requests
ise-uiuc/Magicoder-OSS-Instruct-75K
from .types import *
ise-uiuc/Magicoder-OSS-Instruct-75K
asker = models.TextField()
ise-uiuc/Magicoder-OSS-Instruct-75K
} public function updatePassword(UpdateUserPass $request) { // this function update ONLY password of user if(Hash::check($request->input('old_password') , auth()->user()->password)) { if(auth()->user()->update(['password' => <PASSWORD>($request->input('new_password'))])) {
ise-uiuc/Magicoder-OSS-Instruct-75K
} public void test_inner_with_two_primitive_contexts() { final double some_context_a = 1.0; final double some_context_b = 2.0;
ise-uiuc/Magicoder-OSS-Instruct-75K
main() input("Press any key to exit.") except Exception as e: print(str(e)) input("Press any key to exit.")
ise-uiuc/Magicoder-OSS-Instruct-75K
return p power_2 = power(2, 2) # 4 print(power_2) # define una función que devuelva una nota ("A", "B", ...) # para el numero que le pase def many_return(x):
ise-uiuc/Magicoder-OSS-Instruct-75K
from fractions import Fraction from functools import reduce def product(fracs): t=reduce(lambda x,y:x*y , fracs) # now t is a instance of Fraction bcoz recude'll return a single class return t.numerator, t.denominator if __name__ == '__main__': fracs = []
ise-uiuc/Magicoder-OSS-Instruct-75K
salary = float(input()) for tab in range(tabs): current_tab = input() if current_tab == "Facebook": salary -= 150 elif current_tab == "Instagram": salary -= 100 elif current_tab == "Reddit": salary -= 50 if salary <= 0: print("You have lost your salary.") bre...
ise-uiuc/Magicoder-OSS-Instruct-75K
return currencies def fetch(self, data): """ :param data: {} Raw request :return: response Fetch with client """ return self.client.fetch( data["url"], headers=data["headers"], body=data["body"] ) @handle_rate_limits
ise-uiuc/Magicoder-OSS-Instruct-75K
init_book.close() # -------------- Launch actual script now --------------- # import openpyxl import xlsxwriter import pandas as pd
ise-uiuc/Magicoder-OSS-Instruct-75K
//Se almacena el objeto seleccionado public alumnoSeleccionado:Alumno; onSelect(alumno){ this.alumnoSeleccionado=alumno; } createFrom(){
ise-uiuc/Magicoder-OSS-Instruct-75K
export { OfficialAccount } export default OfficialAccount
ise-uiuc/Magicoder-OSS-Instruct-75K
self.canvas.move('bola', self.vx, self.vy)
ise-uiuc/Magicoder-OSS-Instruct-75K
ts.Complete(); if (bit > 0) { return true; } return false;
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * * @export * @interface DocumentDTO */ export interface DocumentDTO { /** * * @type {string} * @memberof DocumentDTO */ fileType?: string /** * * @type {string}
ise-uiuc/Magicoder-OSS-Instruct-75K
def setOSWirelessConfig(update): """ Write settings from osWirelessConfig out to UCI files. """ changed = uciutils.setConfig(update.new, update.old, cacheKeys=['osWirelessConfig'], filepath=uci.getSystemPath("wireless"))
ise-uiuc/Magicoder-OSS-Instruct-75K
{ near_plane = new_near_plane; } float OrthographicCamera::get_near_plane() const { return near_plane; } void OrthographicCamera::set_far_plane(float new_far_plane) { far_plane = new_far_plane; }
ise-uiuc/Magicoder-OSS-Instruct-75K
import {ShaderBuffers} from './vertex-data-mapper'; export function simplePointsToShaderBuffers<G extends Point | MultiPoint, P>( data: FeatureCollection<G, P>, styleOption: StyleOption<G, P, PointStyle> ): ShaderBuffers { const array: number[] = []; function processSinglePoint(coords: number[], style...
ise-uiuc/Magicoder-OSS-Instruct-75K
or downloads their YAML version, an dconverts them to RDF afterwards. ''' res_i = 0 for elem in yaml_cont['resources']: if KEY_RESOURCE_URL_YAML in elem: res_yml_url = elem[KEY_RESOURCE_URL_YAML]
ise-uiuc/Magicoder-OSS-Instruct-75K
parser.add_argument("--latent_num_blocks", type=int, default=1, help='Number of stacked CNFs.') parser.add_argument("--layer_type", type=str, default="concatsquash", choices=LAYERS) parser.add_argument('--time_length', type=float, default=0.5) parser.add_argument('--train_T', typ...
ise-uiuc/Magicoder-OSS-Instruct-75K
[ "$DOT_LOG_PREFIX" != "" ] \ && logString+="\x1b[32m($DOT_LOG_PREFIX)\x1b[0m " # Add the rest of the arguments (merged together) to $logString logString+="${*:2}" # Don't print log if it's below our log level, and make sure to always show "ask" and "tell" log levels [ "$DOT_LOGLEVEL" ] && ...
ise-uiuc/Magicoder-OSS-Instruct-75K
{ return false; }
ise-uiuc/Magicoder-OSS-Instruct-75K
"ChunHelpful" ] option = random.choice(options) await ctx.author.edit(nick=option) await self.msg(ctx, "Changed Chun's name") # fcb @commands.command(hidden=True) @commands.bot_has_permissions(manage_nicknames=True) @bot.checks.is_member(283204260781490176) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
x, y = numba.cuda.grid(2) if x < an_array.shape[0] and y < an_array.shape[1]: an_array[x, y] += 1 @numba.cuda.jit def sum_1DArrays(array1, array2, return_array): x = numba.cuda.grid(1) if x < array1.shape[0]:
ise-uiuc/Magicoder-OSS-Instruct-75K
migrations.AddField( model_name='comment', name='image', field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='comment', to='instapic.Image'), ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
} else { realSCL = SCLExampleAttribute.SCL; } await Task.CompletedTask; testOutputHelper.WriteLine("SCL:"); testOutputHelper.WriteLine(realSCL); if (SCLExampleAttribute.Description is not null) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
class abstract_delegate : public delegate { public: abstract_delegate(); void onStartElement(const XML_Char *fullname, const XML_Char **atts) override; void onEndElement( const XML_Char *fullname) override; void onCharacterData(const char * pBuf, int len) override; void onProcessingInstruction(const XML_Ch...
ise-uiuc/Magicoder-OSS-Instruct-75K
# yum install wireshark for this to work! ''' TShark (Wireshark) 2.1.0 (v2.1.0rc0-502-g328fbc0 from master) Dump and analyze network traffic.
ise-uiuc/Magicoder-OSS-Instruct-75K
logger.info("Loading 1 objects to table invoicing_plan...") # fields: id, user, today, journal, max_date, partner, course
ise-uiuc/Magicoder-OSS-Instruct-75K
private String selectedValue; @MethodRef public void testMethod() { setMessage("you entered: " + inputValue); }
ise-uiuc/Magicoder-OSS-Instruct-75K
var grid = new Grid(); grid.ColumnDefinitions.Add(new ColumnDefinition()); grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto }); grid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); grid.RowDefinitions.Add(new Ro...
ise-uiuc/Magicoder-OSS-Instruct-75K
docker-compose -f "./event-bus/docker-compose.yml" up -d docker-compose -f "./consumer/docker-compose.yml" up -d docker-compose -f "./producer/docker-compose.yml" up --scale nodejs=2 -d
ise-uiuc/Magicoder-OSS-Instruct-75K
]); } public function execute(WorkflowInstance $workflow) { parent::execute($workflow); $target = $workflow->getTarget(); $method = $this->TargetMethodName; if ($method && ClassInfo::hasMethod($target, $method)) {
ise-uiuc/Magicoder-OSS-Instruct-75K
if s>m:m=s print(m)
ise-uiuc/Magicoder-OSS-Instruct-75K
'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36' } r = requests.get(url, headers) _data = r.text return _data url = "http://www.yvtc.edu.cn" data = url_open(url) soup = Beaut...
ise-uiuc/Magicoder-OSS-Instruct-75K
"verbose_name": "Outcome-Assessment Link", "verbose_name_plural": "Outcome-Assessment Links", }, ),
ise-uiuc/Magicoder-OSS-Instruct-75K
url(r'^desc/(?P<org_id>\d+)/$', OrgDescView.as_view(), name="org_desc"), url(r'^org_teacher/(?P<org_id>\d+)/$', OrgTeacherView.as_view(), name="org_teacher"), # --------------机构收藏------------------------- url(r'^add_fav/$', AddFavView.as_view(), name="add_fav"), # -----------------------teacher----...
ise-uiuc/Magicoder-OSS-Instruct-75K
header_parameters = {} header_parameters['Accept'] = 'application/json'
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- coding: utf-8 -*- def method(args1='sample2'): print(args1 + " is runned") print("")
ise-uiuc/Magicoder-OSS-Instruct-75K
fprintf(fd, "\t %s hKey = %x\n", QIT(HCRPK), hKey); fprintf(fd, "\t DWORD dwFlags = %x\n", dwFlags); fprintf(fd, "\t %s* phHash = %x, *phHash = %s%s\n", QIT(HCRPH), phHash, "OUTPUT, so probably", "can't deref NULL"); fclose(fd); return _REP(Old, CreateHash)(hProv, Algid, hKey, dwFlags, phHash); } BOOL WINAPI _RE...
ise-uiuc/Magicoder-OSS-Instruct-75K
2. 文件名:202002120001 => 202002123000 """ import os import time import random import datetime import shutil file_nums = 100 log_nums = 100
ise-uiuc/Magicoder-OSS-Instruct-75K
#endif //J2CPP_JAVA_NIO_MAPPEDBYTEBUFFER_HPP_DECL #else //J2CPP_INCLUDE_IMPLEMENTATION #ifndef J2CPP_JAVA_NIO_MAPPEDBYTEBUFFER_HPP_IMPL #define J2CPP_JAVA_NIO_MAPPEDBYTEBUFFER_HPP_IMPL
ise-uiuc/Magicoder-OSS-Instruct-75K
if banlist: bot.reply_to(message, "You are banned!") return markup = types.ReplyKeyboardMarkup() numbers = list(range(3, 3000, 3)) numbers = [0] + numbers cline = 0
ise-uiuc/Magicoder-OSS-Instruct-75K
// Copyright © 2017年 Signularity Studio. All rights reserved. // import UIKit class SSBaseViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white // Do any additional setup after loading the view. }
ise-uiuc/Magicoder-OSS-Instruct-75K
// guard let item = routeDescription.outputs.first(where: { $0.portType == .airPlay}) else { return (false, nil) } // // return (true, item.portName) // } //} //
ise-uiuc/Magicoder-OSS-Instruct-75K
<div class="cover-3"> <div class="cover-grad"></div> <div class="cover-text"> <div class="sub-title">Groundbreaking</div> <h3>Hulu Originals</h3> </div> </div> <div class="cover-4">
ise-uiuc/Magicoder-OSS-Instruct-75K
orbitAngles.y() = moveTowardsAngle(orbitAngles.y(), headingAngle, rotationChange); return true;
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>core/src/main/java/io/stat/nabuproject/core/config/InvalidValueException.java<gh_stars>0 package io.stat.nabuproject.core.config; /** * Thrown when the configuration contains a value that
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copyright (c) 2009-2014 by Farsight Security, Inc. #
ise-uiuc/Magicoder-OSS-Instruct-75K
__all__ = ["auto_collection"]
ise-uiuc/Magicoder-OSS-Instruct-75K
<div class="content-wrapper"> <section class="content"> <div class="box box-warning box-solid"> <div class="box-header with-border"> <h3 class="box-title">FILTER TINDAKAN BERDASARKAN POLI</h3> </div> <form action="filter_action" method="post"> <table class='table table-b...
ise-uiuc/Magicoder-OSS-Instruct-75K
public static AttachmentProvider Provider { get; set; } #endregion } }
ise-uiuc/Magicoder-OSS-Instruct-75K
import helper import configs pygame.init() size = (640, 660) pygame.display.set_caption("self driving data viewer") screen = pygame.display.set_mode(size, pygame.DOUBLEBUF) screen.set_alpha(None) camera_surface = pygame.surface.Surface((640, 480),0,24).convert() clock = pygame.time.Clock()
ise-uiuc/Magicoder-OSS-Instruct-75K
month += 1 dense_file.write(str(cf_amount) + '\n') # here's the cash flow month month += 1
ise-uiuc/Magicoder-OSS-Instruct-75K
Links for more information on the license:\n\ \n\ - [Unlicense Commentary][unlicense]\n\ - [Open Source Initiative: Unlicense][osi-unlicense]\n\ - [Free Software Foundation: Unlicense][fsf-unlicense]\n\ - [Choose a license: Unlicense][github-unlicense]\n\
ise-uiuc/Magicoder-OSS-Instruct-75K
| code 28. return-statement -> return return-follow 29. return-follow -> ; | expression ; 30. var-follow -> [ expression ] | empty 31. expression -> additive-expr expression-follow
ise-uiuc/Magicoder-OSS-Instruct-75K
/// Command byte to the last parameter byte. /// /// Then, the result is appended to the end to yield the checksum byte. /// /// If the message is correct, XOR’ing all the bytes(including the checksum byte) /// will produce a result of zero. Checking the integrity of a message using //...
ise-uiuc/Magicoder-OSS-Instruct-75K
:rtype: List[int] """
ise-uiuc/Magicoder-OSS-Instruct-75K
templateUrl: './add-contextpacks.component.html', styleUrls: ['./add-contextpacks.component.scss'] }) export class AddContextpacksComponent implements OnInit { contextPackForm: FormGroup;
ise-uiuc/Magicoder-OSS-Instruct-75K
use bytes::Bytes; pub struct OpusPayloader; impl Payloader for OpusPayloader { fn payload(&self, mtu: usize, payload: &Bytes) -> Result<Vec<Bytes>, Error> { if payload.is_empty() || mtu == 0 { return Ok(vec![]);
ise-uiuc/Magicoder-OSS-Instruct-75K
# nCR x = mcmc.nCR() + 1 mcmc.set_nCR(x) self.assertEqual(mcmc.nCR(), 4) self.assertRaises(ValueError, mcmc.set_nCR, 1) # should implicitly convert floats to int mcmc.set_nCR(2.1) self.assertEqual(mcmc.nCR(), 2)
ise-uiuc/Magicoder-OSS-Instruct-75K
print(vocabulary) print("W") print(W) print("V") print(V)
ise-uiuc/Magicoder-OSS-Instruct-75K
#[doc = "Writer for register FIRCCSR"] pub type W = crate::W<u32, super::FIRCCSR>; #[doc = "Register FIRCCSR `reset()`'s with value 0x0300_0001"] impl crate::ResetValue for super::FIRCCSR { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0x0300_0001
ise-uiuc/Magicoder-OSS-Instruct-75K
span: Span, ) -> TokenStream { let encoding = generate_encoding(encoding); quote_spanned!(span=> tezos_encoding::encoding::Encoding::Sized(#size, Box::new(#encoding))) }
ise-uiuc/Magicoder-OSS-Instruct-75K
api = KongAPI(base_url, auth_user, auth_password) if state == "present": response = api.add_or_update(**data) if state == "absent": response = api.delete_by_name(data.get("name")) if state == "list": response = api.list()
ise-uiuc/Magicoder-OSS-Instruct-75K
# Set default neighbours used in stencil to 1. Normal default is # 8, which won't work if the input and output grids are similar in # size and resolution. self._params.setdefault('neighbours', 1) self._args = kd_tree.get_neighbour_info(input_def, output_de...
ise-uiuc/Magicoder-OSS-Instruct-75K
export enum InternalLoadBalancingMode { // Serve all traffic on the public internet (default) None = 'None', // Serve web traffic (ports 80 and 443 plus remote debugging ports) privately Web = 'Web', // Serve FTP ports privately; // Publishing = whether the FTP endpoint is on the ILB Publishing = 'Publis...
ise-uiuc/Magicoder-OSS-Instruct-75K
Input('menu-demo', 'currentKey'), prevent_initial_call=True )
ise-uiuc/Magicoder-OSS-Instruct-75K
Parameters ---------- labels: Tensor
ise-uiuc/Magicoder-OSS-Instruct-75K
raise KeyError( 'Stored npz file needs to have data in field named X') if 'doc_range' not in var_dict: raise KeyError( 'Stored npz file needs to have field named doc_range') if nDocTotal is not None: var_dict['nDocTotal'] = nDocTotal ...
ise-uiuc/Magicoder-OSS-Instruct-75K
spark.conf.set("com.databricks.training.expected-dbr", currentVersion) # COMMAND ---------- # MAGIC %run ./Common
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace ApiClients\Tests\Foundation\Hydrator\Resources\Async; use ApiClients\Tests\Foundation\Hydrator\Resources\SubResource as BaseResource; class SubResource extends BaseResource { }
ise-uiuc/Magicoder-OSS-Instruct-75K
type SystemData = ( Entities<'a>, ReadStorage<'a, Target>, WriteStorage<'a, Position>, WriteStorage<'a, Moveing>, WriteStorage<'a, Rotation>,
ise-uiuc/Magicoder-OSS-Instruct-75K
resubmit['destination'], MESSAGES[job_state.runner_state], job_state.job_wrapper.job_destination.id ) # fetch JobDestination for the id or tag new_destination = app.job_config.get_destination( resubmit['destination']) # Resolve dynam...
ise-uiuc/Magicoder-OSS-Instruct-75K
@classmethod def getSoup(cls, url): html = requests.get(url) return BeautifulSoup(html.content, 'html.parser')
ise-uiuc/Magicoder-OSS-Instruct-75K
<?= wp_get_attachment_image($icon['image']['id'], 'full') ?> <p><?= wptexturize($icon['text']) ?></p> </div> <?php endforeach; ?> </div>
ise-uiuc/Magicoder-OSS-Instruct-75K
### init info = {} # info we care about self.mol_old = copy.deepcopy(self.mol) # keep old mol stop = False new = False
ise-uiuc/Magicoder-OSS-Instruct-75K
dict['object_2_content_type'] = 'timeblock' elif dict['object_2_content_type'] == ['database', 'section']: object_2_natural_id = Section.objects.get(id=dict['object_2_id']).section_id
ise-uiuc/Magicoder-OSS-Instruct-75K
// Copyright (c) <NAME>. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace praxicloud.core.kestrel { #region Using Clauses using Microsoft.AspNetCore.Builder;
ise-uiuc/Magicoder-OSS-Instruct-75K
lenx = (len(switch) -1) line = switch[0].rolex.strip()
ise-uiuc/Magicoder-OSS-Instruct-75K
let rHex = (tempHex as NSString).substring(with: range) range.location = 2 let gHex = (tempHex as NSString).substring(with: range) range.location = 4 let bHex = (tempHex as NSString).substring(with: range) // 5.将十六进制转成数字 emoji表情
ise-uiuc/Magicoder-OSS-Instruct-75K
HOMEDIR=`pwd` popd &>/dev/null `dirname $0`/install2.sh $ACCOUNT $HOMEDIR else
ise-uiuc/Magicoder-OSS-Instruct-75K
total: index, removed: removeCount, patched: patchCount, // A rest can only happen if there are messages without index rest: index - removeCount - patchCount }; }
ise-uiuc/Magicoder-OSS-Instruct-75K
def eip_sync_cmdb():
ise-uiuc/Magicoder-OSS-Instruct-75K
match = self.rx_vlan_stack_global.match(cmd) if match: for match in self.rx_vlan_stack.finditer(cmd): if match.group("role").lower() == "tunnel":
ise-uiuc/Magicoder-OSS-Instruct-75K
buffers = list(sorted(set([128, 256, 1024, 1024 * 1024 * 5] + [random.randint(128, 1024) for _ in range(10)]))) else: buffers = [128]
ise-uiuc/Magicoder-OSS-Instruct-75K
mod swap; #[cfg(all(feature = "test_bitcoin_node", feature = "test_meros_node"))] mod btc_and_meros; #[cfg(all(feature = "test_bitcoin_node", feature = "test_nano_node"))] mod btc_and_nano; #[cfg(all(feature = "test_bitcoin_node", feature = "test_monero_node"))] mod btc_and_xmr; #[cfg(all(feature = "test_bitcoin_node",...
ise-uiuc/Magicoder-OSS-Instruct-75K
to={`https://github.com/linode/manager/releases/tag/linode-manager@v${VERSION}`} > Read the release notes{` `} </Link> for details. </Typography> </div> </Paper>
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>rafaelbarretomg/Uninter<gh_stars>0
ise-uiuc/Magicoder-OSS-Instruct-75K
<meta name="csrf-token" content="{{ csrf_token() }}"> <style> .imagePreview {
ise-uiuc/Magicoder-OSS-Instruct-75K
cookie?:string; proxy?:string; agent?:string; }; type SoundCloud = { agent?:string; SoundCloudID?:string; }; type Cache = { enabled:boolean; limit?:number;
ise-uiuc/Magicoder-OSS-Instruct-75K
for(int i = 0;i < authorization.scopes().length;i++) { com.wordnik.swagger.annotations.AuthorizationScope authScope = authorization.scopes()[i]; authorizationScopes[i] = new AuthorizationScope(authScope.scope(), authScope.description()); } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.times_to_go_over = 0 def collect_data(self, datatype): if datatype == 'real': start_real = Real(self) start_real.collect_data_live() else: start_fake = Fake(self)
ise-uiuc/Magicoder-OSS-Instruct-75K
angular_vel = self._wheel_radius/self._track_width * (wr - wl) linear_vel = (self._wheel_radius/2)*(wr + wl) angular_pos = self._odom['yaw'] + angular_vel * dt
ise-uiuc/Magicoder-OSS-Instruct-75K
drawerName = drawerElement['drawer'] canvas = manager.addStaticDrawerNoPos(drawerName, QtGui.QColor(100,100,100,0)); drawerRBs = [] member = drawerElement['genus-list'] for genusName in member: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
23 0.018135355784 34 24 0.019290830241944442 1 25 0.013667536021055556 5 26 0.028850898412500003 3 27 0.016239694456000004 35 28 0.034089116968 20 29 0.016711936999555557 44 30 0.02005785484133334 42
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': from core.simulate import test_with_argv test_with_argv(None, *sys.argv)
ise-uiuc/Magicoder-OSS-Instruct-75K
if cible=='E': lbl.configure(text=messages[1]) coul='blue' else: dic_ships[cible]-=1 if dic_ships[cible]>0: lbl.configure(text=messages[2]) else: lbl.configure(text=messages[3]) remaining_ships-=1 lbl2.configure(text='Rema...
ise-uiuc/Magicoder-OSS-Instruct-75K
} /** * @see NavigationModeController.ModeChangedListener#onNavigationModeChanged */ public void onNavigationModeChanged(int mode) { mIsGesturalModeEnabled = QuickStepContract.isGesturalMode(mode); updateIsEnabled(); updateCurrentUserResources(); } public void onN...
ise-uiuc/Magicoder-OSS-Instruct-75K