seed
stringlengths
1
14k
source
stringclasses
2 values
input: input tensor of shape [B,n,d_in]. output_sizes: An iterable containing the output sizes of the MLP as defined in `basic.Linear`. variable_scope: String giving the name of the variable scope. If this is set to be the same as a previously defined MLP, then the weights are reused. ...
ise-uiuc/Magicoder-OSS-Instruct-75K
final Matcher matcher = PATTERN_FOR_VARIABLE_PARTS_OF_ROUTE.matcher(uriPattern); while (matcher.find()) { // group(1) is the name of the group. Must be always there... // "/assets/{file}" and "/assets/{file:[a-zA-Z][a-zA-Z_0-9]}" // will return file. parameters.add(matcher.group(1)); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Error in plugin usage."""
ise-uiuc/Magicoder-OSS-Instruct-75K
file_path = "tests//resources//test_file.txt" file_input = create_input(input_type) file_input.add_file_path(file_path) file_input.get_houses() raise TestError # Act/Assert self.assertRaises(TestError, helper) def test_get_houses_1(self):...
ise-uiuc/Magicoder-OSS-Instruct-75K
</form> </h6> </div> </div>
ise-uiuc/Magicoder-OSS-Instruct-75K
return salt + result def vaildate(self, password, hashed): return hashed == self.encrypt(password, salt=hashed[:8])
ise-uiuc/Magicoder-OSS-Instruct-75K
assert(ret) print(vars) assert(str(vars['B'])=="cons/2(x,cons/2(y,nil/0()))") assert(prolog_next_solution(env)) print(vars) assert(str(vars['A'])=="cons/2(x,nil/0())") assert(prolog_next_solution(env)) print(vars) assert(str(vars['B'])=="nil/0()")
ise-uiuc/Magicoder-OSS-Instruct-75K
<Icon icon="small-cross" iconSize={isLarge ? Icon.SIZE_LARGE : Icon.SIZE_STANDARD} /> </button> ) : null; return ( <span {...htmlProps} className={tagClasses}> {children} {removeButton} </span> ); } pri...
ise-uiuc/Magicoder-OSS-Instruct-75K
.kravNummer(krav.getKravNummer()) .kravVersjon(krav.getKravVersjon()) .id(etterlevelse.getId().toString()) .build(); var resp = restTemplate.exchange("/etterlevelse/{id}", HttpMethod.PUT, new HttpEntity<>(req), EtterlevelseResponse.class, etterleve...
ise-uiuc/Magicoder-OSS-Instruct-75K
make DESTDIR="${BUILD_DIR}/expat-install" \ install || die "expat install failed" xpopd
ise-uiuc/Magicoder-OSS-Instruct-75K
# calculate the jacobian j = 0.5 * np.linalg.det(J)
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Starts a database session as a context manager. """
ise-uiuc/Magicoder-OSS-Instruct-75K
app.start() app.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
'NAME': os.path.join(BASE_DIR, 'database.db'), },
ise-uiuc/Magicoder-OSS-Instruct-75K
} } else { self.wait_till_successful_read_then_execute(); } } } #[arduino_uno::entry] fn main() -> ! { let peripherals = arduino_uno::Peripherals::take().unwrap();
ise-uiuc/Magicoder-OSS-Instruct-75K
String basicMessage = messageProcessor.processBasicMessage(script.getBasicMessage(), current); String richMessage = messageProcessor.processRichMessage(script.getRichMessage(), current); Escalation escalation = new Escalation.Builder() ...
ise-uiuc/Magicoder-OSS-Instruct-75K
const DayOfWeekEmoji = ({ dayOfWeek }: Props) => { if (dayOfWeek === "weekend") { return ( <span role="img" aria-label="Weekend"> 🎉 </span>
ise-uiuc/Magicoder-OSS-Instruct-75K
public class GetRouteReportsListResponse : IDataTransferObject { public IList<RouteReportLookupModel> RouteReports { get; set; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
# ro.r('library(devtools)') ## to use source_url # ro.r('library(tidyverse)') ############################## rpy2 functions ############################## # def pull(r): # return r2p(ro.globalenv[r]) # def push(py,rname=None): # import inspect # def retrieve_name(var): # for fi in reversed(inspec...
ise-uiuc/Magicoder-OSS-Instruct-75K
Creates a new billing request flow. Args: params (dict, optional): Request body. Returns: ListResponse of BillingRequestFlow instances """
ise-uiuc/Magicoder-OSS-Instruct-75K
GGFILE="/tmp/greengrass-ubuntu-x86-64-1.5.0.tar.gz"
ise-uiuc/Magicoder-OSS-Instruct-75K
modality=${line#*,} # transfer data from remote server
ise-uiuc/Magicoder-OSS-Instruct-75K
# @property def systemAccountManager(self) -> SystemAccountManager: raise NotImplementedError() # #
ise-uiuc/Magicoder-OSS-Instruct-75K
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
ise-uiuc/Magicoder-OSS-Instruct-75K
} /** Returns a deep copy of this */ public abstract Continuation copy(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
public Result<T> Filter(Func<T, bool> func, Func<T,Exception> exceptionMapFunc) {
ise-uiuc/Magicoder-OSS-Instruct-75K
.filter( (option: any) => option.toLowerCase().indexOf(inputValue.toLowerCase()) > -1,
ise-uiuc/Magicoder-OSS-Instruct-75K
#ensure that flask the schedule maker page loads correctly def test_views_scheduleMaker_load(self): tester = app.test_client(self) response = tester.get('/class-select', content_type = 'html/text') self.assertTrue(b'Subject:' in response.data) #ensure the botton in first page can lead to the ...
ise-uiuc/Magicoder-OSS-Instruct-75K
if (out_top < out_bottom) and (out_left < out_right): return out_top - self.top, \ out_left - self.left, \ out_bottom - self.top, \ out_right - self.left else: return None def crop_to_mask(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
echo Initialization completed. EOF chmod a+x "$DEST/etc/init.d/rcS" # Create startup/init script - executed as non-root user cat<<EOF > "$DEST/etc/init.d/rcS.user" #!/bin/sh echo starting USER init script #Simulate a never ending daemon.... while true ;
ise-uiuc/Magicoder-OSS-Instruct-75K
BaseSensor.__init__(self) self.sensor = None self.count = 20 self.soil_moisture_pin = 0 self.setup() def setup(self): try: self.sensor = ADC() self.init = True except Exception as e: print("SoilMositureSensor.setup:...
ise-uiuc/Magicoder-OSS-Instruct-75K
$yarn prepack --stub
ise-uiuc/Magicoder-OSS-Instruct-75K
private final UserStore store; private final KeyWhitener keyWhitener; public UserManager(UserStore store, KeyWhitener keyWhitener) { this.store = store; this.keyWhitener = keyWhitener; } public boolean addUser(String username, String email, String password) { var hash = keyWhitener.hash(passwor...
ise-uiuc/Magicoder-OSS-Instruct-75K
for row in cursor: lod = calculate_lod_for_polyline(row[0],lod_length,start_level) row[2] = lod cursor.updateRow(row) endTime = time.time() print("Compute finished, elapsed: {0} Seconds.eter..".format(str(endTime - startT...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.weight = weight self.max_iterations = max_iterations #Classe de Parâmetros do Algoritmo Girvan Newman. class ParametersGirvanNewman: def __init__(self, most_valuable_edge, max_iterations): self.most_valuable_edge = most_valuable_edge self.max_iterations = max_iterations ...
ise-uiuc/Magicoder-OSS-Instruct-75K
read -n 1 -p "Has package.json version been updated [yN]? " answer2 [ -z "$answer2" ] && answer2="n" # if 'no' have to be default choice
ise-uiuc/Magicoder-OSS-Instruct-75K
self.module = None self.computed_rev = None self.n_outputs = 1 self.input_vars = [] self.out0 = (self, 0) def build_modules(self, verbose=True): return [self.data.shape] def run_forward(self, op_list): return [(self.id, 0)]
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in range(0, int(self.LOW_WATER_MARK * 1) - len(self.proxies_list)): self.fetch_proxy()
ise-uiuc/Magicoder-OSS-Instruct-75K
end = 9999999999999 for i in range(start,end+1): url = "https://konachan.net/post/show/"+str(i) html = requests.get(url).text soup = BeautifulSoup(html, 'html.parser') for img in soup.find_all('img', class_="image"):
ise-uiuc/Magicoder-OSS-Instruct-75K
0, 0, 0, 0, 0, /* color table; to be filled in later */ nullptr, 0, }; CTabPtr conv_table;
ise-uiuc/Magicoder-OSS-Instruct-75K
if (response.RespCode == SUCCESS) { if(response.GambleResult != null){ payout=float.Parse(response.GambleWonAmount); } doneGamble = true; EventManager.instance.OnPlaySettingsUpdate(PlaySettingsUpdate.GAMBLE_TOTAL_RESULT); //BROADCAST EVENT THAT GAMBLE ENDED AND RESULT HAS BEEN PARSED AND READY T...
ise-uiuc/Magicoder-OSS-Instruct-75K
array3.add(object2); Point point = new Point(i3 / 4, array3.getLength() - 1); sparseArray.put(object2.getInt("giftid", 0), point); if (object2.getInt("level", 0) == 0 && object2.getInt("giftnum", 0) <= 0 && object2.getInt("remaintime", 0) >...
ise-uiuc/Magicoder-OSS-Instruct-75K
public string Fullname { get; set; } [Required] public string ResourceType { get; set; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
parser_run = subparsers.add_parser('run', help='run experiments') parser_run.add_argument('files', nargs='+', type=str, help='file(s) describing experiments') parser_run.set_defaults(func=run_experiment) parser_trials = subparsers.add_parser('trials', help='run multiple experiment trials') parser_t...
ise-uiuc/Magicoder-OSS-Instruct-75K
class StudentAdmin(admin.ModelAdmin): list_display = ('first_name','middle_name', 'last_name','identification_number') search_fields = ('first_name','middle_name', 'last_name','identification_number')
ise-uiuc/Magicoder-OSS-Instruct-75K
options[key] = value.strip() elif isinstance(curr, list): options[key] = curr + [val.strip() for val in value.split(',')] else: print "ERROR: Key '%s' was repeated but can only appear once in the info file." % key return options d...
ise-uiuc/Magicoder-OSS-Instruct-75K
out.push(format!( "TOTAL: {}", bytesize::ByteSize::b(sizes.into_iter().map(|(_, size)| size).sum()) )); } for line in out { println!("{}", line);
ise-uiuc/Magicoder-OSS-Instruct-75K
if type(data['x']) is np.ndarray: x = data['x'] else: x = data['x'].flatten().numpy() y = np.zeros(self.number_classes()) y[int((data['y'] - self.__min_class))] = 1 x = self.concept_drift(x, int(idx / (self.number_samples() / self...
ise-uiuc/Magicoder-OSS-Instruct-75K
} return true } if !success { return false } } if lastTrustResult == .proceed || lastTrustResult == .unspecified { return false }
ise-uiuc/Magicoder-OSS-Instruct-75K
All derived data is from the mps_configuration database. Properties: timestamp: the timestamp of the fault event. Format is as follows in order to work with sqlite date/time functions: "YYYY-MM-DD HH:MM:SS.SSS"
ise-uiuc/Magicoder-OSS-Instruct-75K
tree = 0 x = 0 y = 0 while y < len(terrain): if x >= len(terrain[y]): x = x - len(terrain[y]) if terrain[y][x] == '#': tree += 1 x += hor
ise-uiuc/Magicoder-OSS-Instruct-75K
) # numba requires numpy<1.22 but tensorflow might install higher # so install numpy less than 1.22 if needed import numpy np_version = numpy.__version__.split('.') np_major, np_minor = [int(v) for v in np_version][:2] if np_major >= 1 and np_minor >= 22:
ise-uiuc/Magicoder-OSS-Instruct-75K
@helpers.csrf_protect @helpers.category_exists @helpers.check_permission def editCategory(category_id, category): if request.method == 'POST': category.name = request.form['name']
ise-uiuc/Magicoder-OSS-Instruct-75K
public function load($filename); public function save($filename, $content); public function delete($filename); public function rename($old_filename, $new_filename); public function exists($filename); }
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>10-100 #include <type_traits> template<int N> typename std::enable_if<N==2, int>::type testme() { return 0; }
ise-uiuc/Magicoder-OSS-Instruct-75K
} required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
ise-uiuc/Magicoder-OSS-Instruct-75K
fn count_api_calls(disassembly_result: &mut DisassemblyResult) -> Result<usize> { Ok(disassembly_result.get_all_api_refs()?.len()) } fn count_instructions(disassembly_result: &DisassemblyResult) -> Result<usize> { let mut num_ins = 0; for function_offset in disassembly_result.funct...
ise-uiuc/Magicoder-OSS-Instruct-75K
} }); // Third pass: provide appropriate types for the remaining properties f.run0(new Function<CustomPropertyDefinition, S>() { @Override public S apply(@Nullable CustomPropertyDefinition def) { String name; switch (def.getPropertyClass()) { case BOOLEAN: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
if [ "$?" != '0' ]; then
ise-uiuc/Magicoder-OSS-Instruct-75K
""" 1. Creating a flask application instance, the name argument is passed to flask application constructor. It's used to determine the root path""" app = Flask(__name__)
ise-uiuc/Magicoder-OSS-Instruct-75K
#[actix_web::main] async fn main() -> std::io::Result<()> { let settings = configuration::get_configuration().expect("Failed to read configuration."); let address = format!("localhost:{}", settings.application_port); let connection_pool = PgPool::connect(&settings.database.connection_string()) .awai...
ise-uiuc/Magicoder-OSS-Instruct-75K
parser.add_argument('--gamma', type=float, default=0.99) parser.add_argument('--seed', '-s', type=int, default=233) parser.add_argument('--steps', type=int, default=600) parser.add_argument('--epochs', type=int, default=4000) parser.add_argument('--exp_name', type=str, default='ppo') parser.add_argument('--env_setting'...
ise-uiuc/Magicoder-OSS-Instruct-75K
this.start = 0; this.last = null; } /** Get the complete unit specification. * @return complete unit specification
ise-uiuc/Magicoder-OSS-Instruct-75K
from report_builder_examples.views.base import MainMenu, MainIndices from advanced_report_builder.models import Target class ViewTargets(MainIndices): model = Target table_title = 'colour' def setup_menu(self): super().setup_menu() self.add_menu('table_menu', 'button_group').add_items(('...
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': marbles.core.main()
ise-uiuc/Magicoder-OSS-Instruct-75K
/// A .NET wrapper for TurboJPEG's compression routines. /// </summary> public class Compressor { IntPtr _handle; /// <summary> /// Initializes a new instance of the <see cref="TurboJPEG.Compressor"/> class. /// </summary> public Compressor () { _handle = Library.tjInitCompress();
ise-uiuc/Magicoder-OSS-Instruct-75K
x1 = Pop().GetBoolean(); Push(x1 & &x2);
ise-uiuc/Magicoder-OSS-Instruct-75K
from aisutils import binary from aisutils import aisstring
ise-uiuc/Magicoder-OSS-Instruct-75K
('A002', 'D', 100, ),
ise-uiuc/Magicoder-OSS-Instruct-75K
from distutils.core import setup setup( name='customassert', version='1.0.0.0', packages=['customassert'], install_requires=[] )
ise-uiuc/Magicoder-OSS-Instruct-75K
return true } func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the appl...
ise-uiuc/Magicoder-OSS-Instruct-75K
list_display = ('zone', 'rate', 'term',) list_filter = ('zone', 'rate', 'term',) list_per_page = 20 class ZoneAdmin(admin.ModelAdmin): fields = ('zone',)
ise-uiuc/Magicoder-OSS-Instruct-75K
_immutable_fields_ = ['iterator'] def __init__(self, iterator): self.iterator = iterator def iter(self): return self @ScopeIterator.builtin_method @signature(ScopeIterator) def next(self): return String(self.iterator.next())
ise-uiuc/Magicoder-OSS-Instruct-75K
"--limit", type=int, default=10 ) args = parser.parse_args() return args
ise-uiuc/Magicoder-OSS-Instruct-75K
error at the first iteration. """ system = self._system() if self.options['debug_print']: self._err_cache['inputs'] = system._inputs._copy_views() self._err_cache['outputs'] = system._outputs._copy_views() if self.options['maxiter'] > 0: s...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.cookies_path = cookies_path
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': parser = argparse.ArgumentParser( description='A wrapper around verify_order that writes a stamp file.') parser.add_argument('--stamp', action='store', type=str, help='Touch this stamp file on success.') parser.add_argument('--developer_dir', required=False, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
from evidently.model_profile.sections import * __path__ = evidently.model_profile.sections.__path__ # type: ignore warnings.warn("'import evidently.profile_sections' is deprecated, use 'import evidently.model_profile.sections'")
ise-uiuc/Magicoder-OSS-Instruct-75K
public function tampil_user(){ $result = $this->db->get('tbl_user'); return $result; } public function tampil_where_memo($tbl, $where){ $this->db->order_by('id_memo', 'DESC'); $result = $this->db->get_where($tbl, $where); return $result; } public function t...
ise-uiuc/Magicoder-OSS-Instruct-75K
export type IEventFunction = (event?: Event) => void;
ise-uiuc/Magicoder-OSS-Instruct-75K
x_out = x_out.swapaxes(0, 1).reshape(k, -1) N = x_out.shape[1]
ise-uiuc/Magicoder-OSS-Instruct-75K
print("\n--------------------------------FACUALTY DASHBOARD----------------------------------------") time.sleep(3) print(f"\n\tName: {self.name}\tFacualty Id: {self.fid}\tBook Issued: {self.issued_book_facualty}") print("____________________________________________x_____________________...
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * @Property serviceOn: Web attack protection switch, the value of:
ise-uiuc/Magicoder-OSS-Instruct-75K
parser.add_argument('-o', '--output', action='store', nargs='?', required=NOT_DEBUG, help="Output pFind peptides file") args = parser.parse_args() if DEBUG:
ise-uiuc/Magicoder-OSS-Instruct-75K
Destroy(gameObject); } protected override void OnReceive(Vector3 value)
ise-uiuc/Magicoder-OSS-Instruct-75K
Args: Q (np.array): streamflow
ise-uiuc/Magicoder-OSS-Instruct-75K
<NAME> <<EMAIL>> """ DEFAULT_TOPIC_NAME_FMT = 'topic_{i1}' DEFAULT_RANK_NAME_FMT = 'rank_{i1}'
ise-uiuc/Magicoder-OSS-Instruct-75K
use crate::connection::sending::send; use crate::data::image::image::ImageID; use bit_helper::output::{BitOutput, U8VecBitOutput}; use std::sync::Arc; pub fn send_success(socket: Arc<ws::Sender>, image_ids: Vec<ImageID>) -> Result<(), ws::Error> { let mut output = U8VecBitOutput::with_capac...
ise-uiuc/Magicoder-OSS-Instruct-75K
# return dt
ise-uiuc/Magicoder-OSS-Instruct-75K
} } private ICollection<Order> _orders; #endregion
ise-uiuc/Magicoder-OSS-Instruct-75K
$total_download_count += absint( $version->get_download_count() ); } catch ( Exception $e ) { } // do dlm_save_downloadable_file action do_action( 'dlm_save_downloadable_file', $file_id, $i ); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
get { return false; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "../include/cpp_lane_line_detection.h" int main(int argc, char * argv[]) {
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Shows dialog, blocks till submitted, returns dict of form data.""" self._results = None self.exec_() return self._results class FormBuilderLayout(QtWidgets.QFormLayout): """ Custom `QFormLayout` which populates itself from list of form fields. Args: items_to_cre...
ise-uiuc/Magicoder-OSS-Instruct-75K
raise Exception('not a status register address') return self._spi_read(address)[1]
ise-uiuc/Magicoder-OSS-Instruct-75K
{ var serializer = new DataContractSerializer(objectType); using (var ms = new MemoryStream()) { serializer.WriteObject(ms, content); using (var sr = new StreamReader(ms)) { ms.Position = 0; ...
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod error; mod integration_tests; pub mod msg; pub mod state; #[macro_export] macro_rules! require { ($expr:expr, $error:tt) => { if !$expr { return core::result::Result::Err(ContractError::$error); }
ise-uiuc/Magicoder-OSS-Instruct-75K
class sgentype(object): ''' a signed generic numeric type in OpenCL ''' def __init__(self, *types): self.types = types class RuntimeFunction(cltype): '''
ise-uiuc/Magicoder-OSS-Instruct-75K
from sqlalchemy import Column, ForeignKey from sqlalchemy.orm import relationship, backref from sqlalchemy.types import Integer from models import dbsession from models.Team import Team from models.Relationships import snapshot_team_to_flag, snapshot_team_to_game_level
ise-uiuc/Magicoder-OSS-Instruct-75K
pub fn render(self) -> String {
ise-uiuc/Magicoder-OSS-Instruct-75K