seed
stringlengths
1
14k
source
stringclasses
2 values
void dfs(TreeNode *cur, int level, vector<vector<int>> &res) { if (cur == NULL) return; if (level >= res.size()) res.push_back(vector<int>()); res[level].push_back(cur->val); dfs(cur->left,level+1,res); dfs(cur->right,level+1,res); }
ise-uiuc/Magicoder-OSS-Instruct-75K
<g fill="none" stroke="#000" strokeLinecap="round" strokeLinejoin="round" strokeMiterlimit={10} > <path strokeWidth={2} d="M56.227 53.879H19.033a6.02 6.02 0 01-6.01-6.391l1.259-20.417a6.02 6.02 0 016.01-5.65h34.677a6.02 6.02 0 016.01 5.65l1.257 20.417a6.02 6.0...
ise-uiuc/Magicoder-OSS-Instruct-75K
source deactivate
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': # Windows multiprocessing safety main()
ise-uiuc/Magicoder-OSS-Instruct-75K
return state; } public void setState(Integer state) { this.state = state; } public String getCreator() { return creator; } public void setCreator(String creator) { this.creator = creator; }
ise-uiuc/Magicoder-OSS-Instruct-75K
let out = ((self.curr & (0xFF << sh)) >> sh) as u8; self.i += 1; Some(out)
ise-uiuc/Magicoder-OSS-Instruct-75K
'plugin' => 'webapi.php:WebApiPlugin', );
ise-uiuc/Magicoder-OSS-Instruct-75K
config.add_route('create', '/journal/new-entry') config.add_route('update', '/journal/{id:\d+}/edit-entry') config.add_route('delete', '/journal/{id:\d+}/delete')
ise-uiuc/Magicoder-OSS-Instruct-75K
callToAction: ad.callToAction, image: UIImage(named: ad.imageName) ?? nil, link: ad.link) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
# Make sure your procedure has a return statement. def find_last(a,b): if (a.find(b) == -1):
ise-uiuc/Magicoder-OSS-Instruct-75K
} function aboutsection1Delete($id, Request $req){ $aboutsection1 = Aboutsection1::find($id); $aboutsection1->aboutsection1_status = 1; $aboutsection1->save(); return response([ 'success'=>"Deleted Successfully" ]); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
content = {'message': 'Hello, World!'} return Response(content)
ise-uiuc/Magicoder-OSS-Instruct-75K
SCRIPT=$1 PREFIX=$2 shift 2 GENERATED_FILE="${PREFIX}.out" TCHECKER_INPUT="${PREFIX}.tck" TCHECKER_RESULT="${PREFIX}.res" TCHECKER_CARDS="${PREFIX}.cards" case ${SCRIPT/.sh/} in *.xta) XTAMODE=yes ;; *) XTAMODE=no ;; esac
ise-uiuc/Magicoder-OSS-Instruct-75K
pass def save_name(request): if request.method == 'POST': name = request.POST.get('name') curs = connection.cursor() #GOOD -- Using parameters curs.execute( "insert into names_file ('name') values ('%s')", name)
ise-uiuc/Magicoder-OSS-Instruct-75K
print(f'Result:') print(f'\taccount: \t\t\t{predicted_account}') print(f'\tdeprn rate: \t\t{rate_perc}')
ise-uiuc/Magicoder-OSS-Instruct-75K
pub type c_long = i64; pub type time_t = i64; pub type Elf_Addr = ::Elf64_Addr; pub type Elf_Half = ::Elf64_Half;
ise-uiuc/Magicoder-OSS-Instruct-75K
this.c.g(aVar.a("kitBuildNumber")); this.c.h(aVar.a("kitBuildType")); this.c.k(aVar.a("appVer")); this.c.s(aVar.optString("app_debuggable", "0")); this.c.m(aVar.a("appBuild")); this.c.i(aVar.a("osVer")); this...
ise-uiuc/Magicoder-OSS-Instruct-75K
a1 = [] a2 = []
ise-uiuc/Magicoder-OSS-Instruct-75K
private_key = mnemonic.to_private_key(key)
ise-uiuc/Magicoder-OSS-Instruct-75K
let inputs: pulumi.Inputs = {}; opts = opts || {};
ise-uiuc/Magicoder-OSS-Instruct-75K
sa.Column("id", sa.Integer, primary_key=True), sa.Column("token", sa.String(64), unique=True), sa.Column("resource_id", sa.String(), nullable=False), sa.Column("created_at", sa.DateTime), )
ise-uiuc/Magicoder-OSS-Instruct-75K
import pytest pytestmark = [pytest.mark.django_db] @pytest.fixture def answer(answers): return answers[0]
ise-uiuc/Magicoder-OSS-Instruct-75K
unsigned char UnknownData01[0x3]; // 0x2295(0x0003) MISSED OFFSET struct FRotator NetDesiredRotation; // 0x2298(0x000C) (Edit, BlueprintVisible, Net, ZeroConstructor, Dis...
ise-uiuc/Magicoder-OSS-Instruct-75K
return parser def arguments_ddp(parser: argparse.ArgumentParser) -> argparse.ArgumentParser: group = parser.add_argument_group( title="DDP arguments", description="DDP arguments" ) group.add_argument("--ddp.disable", action="store_true", help="Don't use DDP") group.add_argument( "...
ise-uiuc/Magicoder-OSS-Instruct-75K
echo " TEST: ${TESTNAME}......" >>${LOGFILE} mkdir -p ${TESTDIR}
ise-uiuc/Magicoder-OSS-Instruct-75K
super(ThumbnailProcessor, self).__init__(**kwargs) def preprocess_cell(self, cell, resources, index): if cell['cell_type'] == 'code': template = 'from nbsite.gallery.thumbnailer import thumbnail;thumbnail({{expr}}, {basename!r})' cell['source'] = wrap_cell_expression(cell['s...
ise-uiuc/Magicoder-OSS-Instruct-75K
browser =findViewById(R.id.feed_activity_web_view); browser.loadUrl(url); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
StatsComponent, GridSettingsComponent, MazeSettingsComponent, PathfindingSettingsComponent, ControllerComponent ], imports: [ CommonModule, SimulationRoutingModule, CoreModule,
ise-uiuc/Magicoder-OSS-Instruct-75K
const dispatch = useDispatch();
ise-uiuc/Magicoder-OSS-Instruct-75K
self.highest_internal = 0 self.internal_slot_layout = dict() # type: Dict[int, int] # key: slot number (starting at 1), value: module class @property def utility_slots(self): return len(self.utility_slots_free) def get_available_internal_slot(self, module_class: int, revers...
ise-uiuc/Magicoder-OSS-Instruct-75K
mv composer.phar ${PREFIX}/bin/composer
ise-uiuc/Magicoder-OSS-Instruct-75K
logging.info('hostname: %r (default)' % hostname) interfaces = []
ise-uiuc/Magicoder-OSS-Instruct-75K
if let msg = message() { os_log("%@", log: osLogger, type: osLogTypeFor(messageLevel), msg) } } // MARK: Private Methods private func osLogTypeFor(_ level: LogLevel) -> OSLogType { switch level { case .error, .warning: return .error ...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertEqual(str(lb), result)
ise-uiuc/Magicoder-OSS-Instruct-75K
ncc__default_client_out_port=4999
ise-uiuc/Magicoder-OSS-Instruct-75K
// An ExampleCommand will run in autonomous return m_autoCommand; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
public function __construct($challenge="") { $packlets=array("challenge" => $challenge); parent::__construct("authRequestOut_PI",$packlets); }
ise-uiuc/Magicoder-OSS-Instruct-75K
print(
ise-uiuc/Magicoder-OSS-Instruct-75K
variant: "outlined", size: "medium", color: "secondary" } return ( <Card title="Všechny zálohy a faktury" buttonProps={buttonProps} handleClick={handleClick}> <Table fetchUrl={requests.fetchInvoices} /> </Card> );
ise-uiuc/Magicoder-OSS-Instruct-75K
'loadInt32', 'dumpInt32' ]
ise-uiuc/Magicoder-OSS-Instruct-75K
last_src_path = Path(self.last_src) last_src_mode = utils.unix_permissions_to_str(last_src_path.lstat().st_mode) except: pass last_dst_path = "unknown" last_dst_mode = "unknown" try: last_dst_path = Path(self.last_dst) last_dst...
ise-uiuc/Magicoder-OSS-Instruct-75K
return any(dp[-1])
ise-uiuc/Magicoder-OSS-Instruct-75K
public void LocalTest_CatchVariable() { GetContext(@"Declarations\Locals\CatchVariable.cs").GetClassifications().AssertContains( CSharpNames.LocalVariableName.ClassifyAt(256, 9)); }
ise-uiuc/Magicoder-OSS-Instruct-75K
++size; head = next.next; next.next = curr; curr = next; next = head; }
ise-uiuc/Magicoder-OSS-Instruct-75K
WEB_MERCATOR_SRID = 3857 #: Web Mercator CRS. WEB_MERCATOR_CRS = CRS.from_epsg(WEB_MERCATOR_SRID) # Best widely used, equal area projection according to # http://icaci.org/documents/ICC_proceedings/ICC2001/icc2001/file/f24014.doc # (found on https://en.wikipedia.org/wiki/Winkel_tripel_projection#Comparison_with_other...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// </value> public string Name { get; set; } /// <summary> /// Gets or sets the layout. /// </summary> /// <value> /// The layout. /// </value> [RequiredParameter] public Layout Layout { get; set; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_An_Actors_object_is_added_to_a_context(): context = Context() add_screenplay_objects_to(context) assert isinstance(context.actors, Actors) def test_The_they_Actor_object_is_added_to_a_context(): context = Context() add_screenplay_objects_to(context)
ise-uiuc/Magicoder-OSS-Instruct-75K
expected_branch = "fake_build_branch" self.Patch(android_build_client, "AndroidBuildClient", return_value=build_client) self.Patch(auth, "CreateCredentials", return_value=mock.MagicMock()) self.Patch(build_client, "GetBranch", return_value=expected_branch) self...
ise-uiuc/Magicoder-OSS-Instruct-75K
} else { { SNode _nodeToCheck_1029348928467 = SLinkOperations.getTarget(throwStatement, LINKS.throwable$kKKg);
ise-uiuc/Magicoder-OSS-Instruct-75K
message=f'key lookup failure: `{key}`', cause=res.value, include_traceback=False, ), ) else: result.append(res.value) if failures: return issue( 'multi_get key retrieval failure', ...
ise-uiuc/Magicoder-OSS-Instruct-75K
n += 1 if n > m: m = n a0 += 1 print(m)
ise-uiuc/Magicoder-OSS-Instruct-75K
( uint32_t* pDestination, FXMVECTOR V ) noexcept { assert(pDestination); #if defined(_XM_NO_INTRINSICS_) pDestination[0] = V.vector4_u32[0]; pDestination[1] = V.vector4_u32[1]; pDestination[2] = V.vector4_u32[2]; pDestination[3] = V.vector4_u32[3];
ise-uiuc/Magicoder-OSS-Instruct-75K
variables.append(parameter.set_variable())
ise-uiuc/Magicoder-OSS-Instruct-75K
using NUnit.Framework; namespace Kaitai { [TestFixture] public class SpecBitsSeqEndianCombo : CommonSpec { [Test] public void TestBitsSeqEndianCombo() { var r = BitsSeqEndianCombo.FromFile(SourceFile("process_xor_4.bin"));
ise-uiuc/Magicoder-OSS-Instruct-75K
{ for (int l = 0; l < Meridians; l++) { int a = (k * (Meridians + 1)) + l; int b = a + Meridians + 1; Indices.push_back(a); Indices.push_back(b); Indices.push_back(a + 1); Indices.push_back(b);
ise-uiuc/Magicoder-OSS-Instruct-75K
app_name='core' urlpatterns=[ path('product/<slug>',ItemDetailView.as_view(),name='product'),
ise-uiuc/Magicoder-OSS-Instruct-75K
let id = match (hymnal, number) { (Hymnals::Hymnal1982, HymnNumber::S(n)) => Some(1353 + (n - 1)), (Hymnals::Hymnal1982, HymnNumber::H(n)) => Some(193 + (n - 1)), (Hymnals::LEVAS, HymnNumber::H(n)) => Some(913 + (n - 1)), (Hymnals::LEVAS, HymnNumber::S(n)) => Some(913 + (n - 1)), ...
ise-uiuc/Magicoder-OSS-Instruct-75K
m.c83 = Constraint(expr= 340*m.b9 - m.x30 + m.x33 + m.x69 <= 340) m.c84 = Constraint(expr= 340*m.b10 - m.x31 + m.x34 + m.x70 <= 340) m.c85 = Constraint(expr= - m.x19 + m.x71 <= -320) m.c86 = Constraint(expr= - m.x22 + m.x72 <= -320) m.c87 = Constraint(expr= - m.x25 + m.x73 <= -320) m.c88 = Constraint(expr= - ...
ise-uiuc/Magicoder-OSS-Instruct-75K
auth_key = "%s:auth" % str(settings.AGENT['entity']) seed_auth_key = hashlib.md5(auth_key.encode()).hexdigest() return seed_auth_key
ise-uiuc/Magicoder-OSS-Instruct-75K
* An implementation of {@link IBackupCallback} that completes the {@link CompletableFuture} * provided in the constructor with a present {@link RemoteResult}. */ public class FutureBackupCallback extends IBackupCallback.Stub { private final CompletableFuture<RemoteResult> mFuture; FutureBackupCallback(Compl...
ise-uiuc/Magicoder-OSS-Instruct-75K
fn task1(lines: &Vec<usize>, bitcount: usize) -> usize { let half_length = ((lines.len() as f32) / 2.0 + 0.5) as usize; let frequency = calculate_frequency(lines, bitcount); let gamma_rate = calculate_gamma_rate(&frequency, half_length, bitcount); let epsilon_rate = calculate_epsilon_rate(gamma_rate, b...
ise-uiuc/Magicoder-OSS-Instruct-75K
private System.Windows.Forms.Button btnCancel; private ScrollEventTextBox txtCriteriaXml; private System.Windows.Forms.TextBox txtLineNum; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
#[error("Json error: {0}")] Json(#[from] serde_json::Error), #[error("NotClean error")] NotClean, #[error("Io error: {0}")] Io(#[from] std::io::Error), #[error("Git error: {0}")] Git(#[from] git2::Error), }
ise-uiuc/Magicoder-OSS-Instruct-75K
list) SHIFT_TIMES=1 ;; --commands) SHIFT_TIMES=1 _TOOLS_LIST="yes" SGIT_LIST_ARGS_PRESENT="yes" ;; --aliases)
ise-uiuc/Magicoder-OSS-Instruct-75K
def keys(joined: bool = False) -> Tuple[str, ...]: # noqa: unused parameter """ Tuple representation of keys. Args: joined (bool): Join relations instead of identifiers. Not used by `Host`. Returns: keys (tuple): ('id', 'name...
ise-uiuc/Magicoder-OSS-Instruct-75K
@property @pulumi.getter(name="dnsRecords") def dns_records(self) -> pulumi.Input[Sequence[pulumi.Input['ServiceDnsConfigDnsRecordArgs']]]: """ An array that contains one DnsRecord object for each resource record set. """ return pulumi.get(self, "dns_records") @dns_recor...
ise-uiuc/Magicoder-OSS-Instruct-75K
sense.show_message(msg, scroll_speed=0.05)
ise-uiuc/Magicoder-OSS-Instruct-75K
class UrlForm(forms.Form): url = forms.URLField(widget=forms.URLInput( attrs={'placeholder': 'Paste your link here...'}))
ise-uiuc/Magicoder-OSS-Instruct-75K
def adjust_learning_rate(optimizer, warmup_epoch, epoch, args, nums_batches): if args.lr_mode == 'step':
ise-uiuc/Magicoder-OSS-Instruct-75K
return response()->json($order->id, 200); } function getByInvoice($invoice)
ise-uiuc/Magicoder-OSS-Instruct-75K
lights = TrafficLights() ############# SETUP FLASK ROUTES ###################### @app.route('/red/<state>') def red(state): lights.set_red(state) return Response(status=200) @app.route('/red') def red_get():
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public var totalPages: Int? /** The total number of documents in this collection that can be used to train smart document understanding. For **lite** plan collections, the maximum is the first 20 uploaded documents (not including HTML or JSON documents). For other plans, the maximum is t...
ise-uiuc/Magicoder-OSS-Instruct-75K
def main(): parser = argparse.ArgumentParser(description='SSL Certificate Checker') parser.add_argument('hostname') args = parser.parse_args() SSLChecker(args.hostname)
ise-uiuc/Magicoder-OSS-Instruct-75K
type : "POST", dataType : 'json', data : {itemId:itemId , itemIndex:itemIndex}, success: function(data){ console.log('success'); } }); }) } }); </script>
ise-uiuc/Magicoder-OSS-Instruct-75K
.block_on(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
# host = "" # port = 8007 # # try: # # SubscribeRequestHandler.protocol_version = "HTTP/1.0" # # httpd = HTTPServer((host, port), SubscribeHttpRequestHandler) # # except Exception as e: # sys.stderr.write(str(e)) # sys.exit(-1)
ise-uiuc/Magicoder-OSS-Instruct-75K
pub trait Renderable { fn init(&mut self, gl: &WebGl2RenderingContext); fn render(&mut self, gl: &WebGl2RenderingContext, camera: &mut CameraRenderer); }
ise-uiuc/Magicoder-OSS-Instruct-75K
@{ ViewBag.Title = DisplayResource.WelcomeToSusuCMS; ViewBag.Subtitle = DisplayResource.WelcomeToSusuCMS; } <p> @Html.Raw(DisplayResource.WelcomeToSusuCMSDescription) </p>
ise-uiuc/Magicoder-OSS-Instruct-75K
'Yubico Yubikey 4 OTP+U2F', ], [] ), ] ###################################################################### # No need to modify anything below this line. # Custom lightweight object type. XInputDevice = namedtuple('XInputDevice', 'type id name') # Compiling the regex during the modu...
ise-uiuc/Magicoder-OSS-Instruct-75K
import sys from datetime import date, timedelta SIGN_IDS = list(range(1, 13)) if __name__ == "__main__": start_date = date(2019, 1, 1) end_date = date.today()
ise-uiuc/Magicoder-OSS-Instruct-75K
def date_time(time): months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] hour, minute = int(time[11:13]), int(time[14:16]) return f"{int(time[0:2])} {months[int(time[3:5])-1]} {time[6:10]} year {hour} hour{'s' if hour!=...
ise-uiuc/Magicoder-OSS-Instruct-75K
extern "C" void mtk_gps_ofl_send_flp_data() { }
ise-uiuc/Magicoder-OSS-Instruct-75K
<i class="icon_star"></i><i class="icon_star"></i><i class="icon_star"></i><i class="icon_star"></i><i class="icon_star empty"></i> @elseif($review->rating_id == 5) <i class="icon_...
ise-uiuc/Magicoder-OSS-Instruct-75K
import service.Key;
ise-uiuc/Magicoder-OSS-Instruct-75K
} // Iterating accesses all keys and values println!("All ratings:"); for (key, value) in &tv_ratings { println!("{}\t: {}", key, value); } // We can iterate mutably println!("All ratings with 100 as a maximum:"); for (key, value) in &mut tv_ratings { *value *= 10; ...
ise-uiuc/Magicoder-OSS-Instruct-75K
form.is_valid() del session[form_class.__name__] else: form = form_class(**kwargs) return form
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self): from java.lang import System self.olderr = sys.stderr self.printmethod = getattr(System.err, 'print') self.flushmethod = getattr(System.err, 'flush') def write(self, msg): self.printmethod(msg) def flush(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace Vrm.JsonSchema.Schemas { public class StringJsonSchema : JsonSchemaBase {
ise-uiuc/Magicoder-OSS-Instruct-75K
nx.draw_networkx_edges(G, pos, edgelist=epos, edge_color=colorspos, width=3, arrowsize=arrowsize, alpha=1, arrowstyle='->', edge_cmap=plt.cm.Blues)
ise-uiuc/Magicoder-OSS-Instruct-75K
if processor_name: output["processor_name"] = processor_name # Get some stats about the host output["os_version"] = platform.mac_ver()[0] # This will optionally print the number of virtual cores - see docs for more info output["cpu_count"] = multiprocessing.cpu_count()
ise-uiuc/Magicoder-OSS-Instruct-75K
export default (isMainnet: boolean = true) => { return isMainnet ? 'https://explorer.nervos.org' : 'https://explorer.nervos.org/aggron' }
ise-uiuc/Magicoder-OSS-Instruct-75K
/// - Parameter initialEntityIds: The entity ids to start providing up until the collection is empty (in last out order). init<EntityIds>(startProviding initialEntityIds: EntityIds) where EntityIds: BidirectionalCollection, EntityIds.Element == EntityIdentifier /// Provides the next unused entity identifie...
ise-uiuc/Magicoder-OSS-Instruct-75K
for msg in midi_file: delta_time = msg.time self.currentTime += delta_time if not msg.is_meta: if msg.type == "note_on":
ise-uiuc/Magicoder-OSS-Instruct-75K
# # The QuantumBlack Visual Analytics Limited ("QuantumBlack") name and logo # (either separately or in combination, "QuantumBlack Trademarks") are # trademarks of QuantumBlack. The License does not grant you any right or
ise-uiuc/Magicoder-OSS-Instruct-75K
def convert_extents(ext): return ext.x / PANGO_SCALE, ext.y / PANGO_SCALE, ext.width / PANGO_SCALE, ext.height / PANGO_SCALE
ise-uiuc/Magicoder-OSS-Instruct-75K
def make_num_jacobians(self): if self.num_deriv_type == 'csd': h = 1e-100 h_y_mat = h * np.eye(self.n_y, self.n_y) h_p_mat = h * np.eye(self.n_p_d, self.n_p_d) shooter = Shooting2(bvp_test)
ise-uiuc/Magicoder-OSS-Instruct-75K
def rand_Amesh_gen(mesh): num_Qhull_nodes = random.randint(20, 40) points = np.random.rand(num_Qhull_nodes, 2) # 30 random points in 2-D hull = ConvexHull(points) msh_sz = 0.1*random.random()+0.2 if mesh == None: with pygmsh.geo.Geometry() as geom: ge...
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @return void
ise-uiuc/Magicoder-OSS-Instruct-75K
# Assert successful cloning of classifier model self.assertTrue(classifier is not krc) emb_attack2 = PoisoningAttackAdversarialEmbedding(krc, backdoor, 2, [(target, target2)]) _ = emb_attack2.poison_estimator(x_train, y_train, nb_epochs=NB_EPOCHS) data, labels, bd = emb_attack2...
ise-uiuc/Magicoder-OSS-Instruct-75K
fixtures = ['dojo_testdata.json'] def setUp(self): token = Token.objects.get(user__username='admin') self.client = APIClient() self.client.credentials(HTTP_AUTHORIZATION='Token ' + token.key) def test_user_list(self): r = self.client.get(reverse('user-list'))
ise-uiuc/Magicoder-OSS-Instruct-75K