seed
stringlengths
1
14k
source
stringclasses
2 values
def main(): points = [[9]] with open('input.txt') as f: for line in f.readlines(): points.append([9] + list(map(int, list(line.strip()))) + [9]) points[0] = [9] * len(points[1]) points.append(points[0]) size = (len(points[0]), len(points)) low_points, basin_sizes = [], []
ise-uiuc/Magicoder-OSS-Instruct-75K
{ bool result; //Check if model exist
ise-uiuc/Magicoder-OSS-Instruct-75K
new_text.line_of_offset(new_text.len()) + 1, self.line_height, self.lens_height, &normal_lines, ); Syntax { rev: new_rev, language: self.language, tree: new_tree, text: new_text, lens, line_height: self.line_height,
ise-uiuc/Magicoder-OSS-Instruct-75K
using System.Collections.Generic; namespace Processor.ConsoleApp { public class ConsoleMenu { public List<ConsoleMenuItem> ConsoleMenuItems { get; }
ise-uiuc/Magicoder-OSS-Instruct-75K
# TexStudio will annoyingly highlight underscores in filenames output_fig_path=process_output_path(os.path.join(model_dir, f"KDE-{i}-{output_suffix}.png")),
ise-uiuc/Magicoder-OSS-Instruct-75K
#print("jk:", jk) f.write("\n") f.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
def exitProgram(): print("Sortie du programme : " + get_dateNow()) sys.exit()
ise-uiuc/Magicoder-OSS-Instruct-75K
from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement
ise-uiuc/Magicoder-OSS-Instruct-75K
source /home/mjh/SETUP_PY27.sh module load python/2.7.8_gcc-4.4.7 python makeTrainingSet.py
ise-uiuc/Magicoder-OSS-Instruct-75K
parser = argparse.ArgumentParser(description="生成指定数量的简单加减法数学题") parser.add_argument('-q', '--quantity', type=int, default=20, help='生成题目的数量,默认为%(default)s,最多200题') parser.add_argument('-m', '--min_number', type=int, default=1, help='题目中出现的最小数字,默认为%(default)s') parser.add_argument('-x', '--max_number', type=int, default=50, help='题目中出现的最大数字,默认为%(default)s') parser.add_argument('-n', '--number', type=int, default=2, help='算式由多少个数字构成,默认为%(default)s') parser.add_argument('-w', '--with_answer', action='count', help='生成显示答案的试题') parser.add_argument('-g', '--negative', action='count', help='允许在算式和运算结果中出现负数,不加该选项时为不允许。')
ise-uiuc/Magicoder-OSS-Instruct-75K
private String name; public long getId() { return id; } public void setId(long id) { this.id = id;
ise-uiuc/Magicoder-OSS-Instruct-75K
return False if int(event_decoded.blockNumber) <= int(self.asset["event"]["block"]): logger.warning("asset was updated later")
ise-uiuc/Magicoder-OSS-Instruct-75K
header += " import time (us)" + "\n" + "-" * width + "\n" output_str += header for node in waterfall_output: name = node.space * "." + str(node.name) offset = ((max_name_len - len(name)) + 3) * " " time_str = str(node.time) water = "=" * int( (node.time / max_time) * (width - len(offset) - len(time_str) - len(name) - 2) )
ise-uiuc/Magicoder-OSS-Instruct-75K
public Page<Project> findByProjectNmContaining(String projectNm, Pageable pageable) { int page = (pageable.getPageNumber() == 0) ? 0 : (pageable.getPageNumber() - 1); pageable= PageRequest.of(page,10); return projectRepository.findByProjectNmContaining(projectNm, pageable); } public Page<Project> findByManager_ManagerNmContaining(String managerNm, Pageable pageable) { int page = (pageable.getPageNumber() == 0) ? 0 : (pageable.getPageNumber() - 1); pageable= PageRequest.of(page,10); return projectRepository.findByManager_ManagerNmContaining(managerNm, pageable); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
app_name='logged' # url mappings for the webapp. urlpatterns = [ re_path(r'^$', views.logged_count, name="logged_count"), re_path(r'^loggedusers/', views.logged, name="logged_users"), re_path(r'^settings/', views.user_settings, name="update_info"), re_path(r'^administrators/', views.post_alert, name="post_alert"),
ise-uiuc/Magicoder-OSS-Instruct-75K
cl_parser = OptionParser( usage="%prog [options] file" ) cl_parser.add_option( "-o", dest="output_file", type="string", default=None, help="The file to write the output to (default: stdout)" ) (options, args) = cl_parser.parse_args(); if len( args ) == 0: cl_parser.error( "No input file" )
ise-uiuc/Magicoder-OSS-Instruct-75K
impl Fold for Throws { fn fold_item_fn(&mut self, i: syn::ItemFn) -> syn::ItemFn { if !self.outer_fn { return i; } let sig = syn::Signature { output: self.fold_return_type(i.sig.output), ..i.sig };
ise-uiuc/Magicoder-OSS-Instruct-75K
pub alert_tags: Option<Vec<String>>, /// Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3 #[serde(rename = "alertPriority", skip_serializing_if = "Option::is_none")] pub alert_priority: Option<AlertPriority>, } impl CreateHeartbeatPayloadAllOf { pub fn new(name: String, interval: i32, interval_unit: IntervalUnit, enabled: bool) -> CreateHeartbeatPayloadAllOf { CreateHeartbeatPayloadAllOf { name, description: None, interval,
ise-uiuc/Magicoder-OSS-Instruct-75K
<body> <h1>Colocando CSS em um script a parte</h1> <hr> <p>Ola imagens CGI!</p> <div class="wraptocenter"> <img id="imagem" src="../imagens/evil.jpg" border=1 alt="Piadinha idiota" width=350 height=500> </div> <hr>
ise-uiuc/Magicoder-OSS-Instruct-75K
loop { if let Some(ev) = ts.poll() { if ev.z > 0 { let x = max(min(ev.x, i32::from(DISP_WIDTH) - 1), 0) as u16; let y = max(min(ev.y, i32::from(DISP_HEIGHT) - 1), 0) as u16; //writeln!(stdout, "{:?}", ev).unwrap(); let (r, g, b) = color_from_xy(x, y, clampf(ev.z as f32 / 1000.0)); pwm.set(Channel::CH1, freq, 1.0 - r * R_SCALE); pwm.set(Channel::CH2, freq, 1.0 - g * G_SCALE); pwm.set(Channel::CH3, freq, 1.0 - b * B_SCALE); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
def update_progress(progress, operation): barLength = 40 # Modify this to change the length of the progress bar dynamically status = "" if isinstance(progress, int): progress = float(progress) if not isinstance(progress, float): progress = 0 status = "error: progress var must be float\r\n" if progress < 0: progress = 0 status = "Halt...\r\n" if progress >= 1: progress = 1 status = "{} Completed...\r\n".format(operation) block = int(round(barLength*progress))
ise-uiuc/Magicoder-OSS-Instruct-75K
while 1: pass line = irc.recv(4096) print(line) ping_checker(line) if ( line.find(bytes("PRIVMSG", "utf8")) != -1 or line.find(bytes("NOTICE", "utf8")) != -1 ): message_checker(line) target.write(str(line)) target.flush()
ise-uiuc/Magicoder-OSS-Instruct-75K
else if (Count >= 3 && Count < 5) { className = "tagcloud3"; } else if (Count > 1 && Count < 3) { className = "tagcloud2"; } else if (Count == 1) { className = "tagcloud1";
ise-uiuc/Magicoder-OSS-Instruct-75K
fn table_growing(&mut self, current: u32, desired: u32, maximum: Option<u32>) -> bool; /// Notifies the resource limiter that growing a linear memory, permitted by /// the `table_growing` method, has failed. /// /// Reasons for failure include: the growth exceeds the `maximum` passed to /// `table_growing`. This could expand in the future. fn table_grow_failed(&mut self, _error: &anyhow::Error) {} /// The maximum number of instances that can be created for a `Store`. ///
ise-uiuc/Magicoder-OSS-Instruct-75K
("MARS_SUN_DISTANCE", ">f8"), ("ORBIT_NUMBER", ">u4"), ("TARGET_NAME", "V6"), ("TARGET_SC_POSITION_VECTOR", ">f8", 3),
ise-uiuc/Magicoder-OSS-Instruct-75K
iterator = asd.split('_')[0] np.save(os.path.join(save_pose_dir, 'pose'+iterator), tes['RT'])
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_add_movie(app): app.session.login(User.Admin()) old_list = app.movie.get_movie_list() app.movie.add_movie(Movie(film_name='name', film_year='2016')) new_list = app.movie.get_movie_list() assert old_list == new_list app.session.logout() def test_add_movie_empty(app): app.session.login(User.Admin()) app.movie.check_field_in_add_form() app.session.logout()
ise-uiuc/Magicoder-OSS-Instruct-75K
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoreactredux.settings.dev") from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise application = get_wsgi_application()
ise-uiuc/Magicoder-OSS-Instruct-75K
help="Output GFF with exon entries") parser.add_argument("-e", "--exon_id_prefix", action="store", dest="exon_id_prefix", default="EXON", help="Prefix of exon id. Default: EXON") parser.add_argument("-n", "--id_digit_num", action="store", dest="id_digit_num", default=8, type=int, help="Number of digits in exon id. Default: 8") args = parser.parse_args() AUGUSTUS.add_exon_lines_to_augustus_gff(args.input_gff, args.output_gff, number_of_digits_in_id=args.id_digit_num, exon_id_prefix=args.exon_id_prefix,
ise-uiuc/Magicoder-OSS-Instruct-75K
def lichbd_add_disks(monHostname): shell.call('ssh %s /opt/fusionstack/lich/bin/lich.node --raid_add all' % monHostname) shell.call('ssh %s /opt/fusionstack/lich/bin/lich.node --disk_add all' % monHostname)
ise-uiuc/Magicoder-OSS-Instruct-75K
export = DirectionStraightFilled16;
ise-uiuc/Magicoder-OSS-Instruct-75K
public boolean getCanCancel() { return false; } public boolean getIsCancelled() { return false; } public void cancel() { }
ise-uiuc/Magicoder-OSS-Instruct-75K
// // Rx+PFS.swift // PCCWFoundationSwift // // Created by 李智慧 on 12/07/2017. // //
ise-uiuc/Magicoder-OSS-Instruct-75K
curl --silent "https://${JENKINS_URL}/job/${JOB_NAME}/build" \
ise-uiuc/Magicoder-OSS-Instruct-75K
- *(string) --* - *(string) --* :type BackupVaultName: string
ise-uiuc/Magicoder-OSS-Instruct-75K
* @see com.elepy.exceptions.ElepyException * @see com.elepy.exceptions.ElepyErrorMessage */ void handleCreate(HttpContext context, Crud<T> crud, ModelDescription<T> modelDescription, ObjectMapper objectMapper) throws Exception; }
ise-uiuc/Magicoder-OSS-Instruct-75K
class FetchLavaDomesTest(unittest.TestCase): def setUp(self): self.api = MonitoringAPI(api_key='TEST_API_KEY') def test_request_without_supplying_params(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>1-10 print("I'm the setup file!")
ise-uiuc/Magicoder-OSS-Instruct-75K
System.err.println(Arrays.deepToString(o)); }
ise-uiuc/Magicoder-OSS-Instruct-75K
#define VKEY_STATE_PRESSED 1 #define VKEY_STATE_HELD 2 #define VKEY_STATE_RELEASED 4 class InputManager
ise-uiuc/Magicoder-OSS-Instruct-75K
// CHECK-LABEL: define {{(dllexport )?}}{{(protected )?}}swiftcc %swift.metadata_response @"$s14generic_vtable8ConcreteCMa" // CHECK: call swiftcc %swift.metadata_response @swift_getSingletonMetadata([[INT]] %0, %swift.type_descriptor* bitcast ({{.*}} @"$s14generic_vtable8ConcreteCMn" to {{.*}})) // CHECK: ret //// Metadata response function for 'Concrete' is fairly simple.
ise-uiuc/Magicoder-OSS-Instruct-75K
import os here = os.path.abspath(os.path.dirname(__file__)) params_yml = 'params.yml' data_root = os.path.expanduser("~/ball_catching_data") settings_root = os.path.join(here, "_files")
ise-uiuc/Magicoder-OSS-Instruct-75K
""" initializes an instance of ListSerializer.
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>Y-Ysss/minimal_git.py import os import os def is_windows() -> bool: return os.name == 'nt'
ise-uiuc/Magicoder-OSS-Instruct-75K
public class SquashEntry extends ArchiveEntry { private SquashFile squashFile; private long fileLength;
ise-uiuc/Magicoder-OSS-Instruct-75K
void EndDocument(); /// <summary> /// Returns whether the <see cref="IIntermediateCodeTranslatorFormatter"/> /// buffers the writes itself using its own indented text writer. /// </summary> bool HandlesWrite { get; } void HandleWrite(string text); void HandleWriteLine();
ise-uiuc/Magicoder-OSS-Instruct-75K
_node_registry = _NodeRegistry() def register_node(node: 'base_node.BaseNode'): """Register a node in the local thread.""" _node_registry.register(node) def registered_nodes() -> FrozenSet['base_node.BaseNode']: """Get registered nodes in the local thread.""" return frozenset(_node_registry.registered_nodes())
ise-uiuc/Magicoder-OSS-Instruct-75K
n.equationOfState().pressure(rho0, u0)) del n
ise-uiuc/Magicoder-OSS-Instruct-75K
try { if ( baseIRI != null ) RDFDataMgr.read(model, input, baseIRI, lang) ; else
ise-uiuc/Magicoder-OSS-Instruct-75K
MAX_DEPTH = 5 MAX_BRANCH = 5 DIRECTORY_CREATION_PROBABILITY = 0.4 FILES_PER_DIRECTORY = 5 FILE_SIZE = (512, 2048) #bytes def random_extension(): return ''.join(random.choice(string.ascii_lowercase) for i in range(3)) def random_name(): return uuid.uuid4().hex
ise-uiuc/Magicoder-OSS-Instruct-75K
print " " print "Parameters and fit quality from machine fit" print "Viscosity from machine fit: " + str(viscosity) print "1 sigma confidence: " + str(perr) # residuals in the fitting of the model residuals = listDampingForFit - funcFitDecay(listFrequenciesForFit, viscosity) # check the quality statistics # from http://stackoverflow.com/questions/19189362/getting-the-r-squared-value-using-curve-fit ss_res = np.sum(residuals**2)
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from './Subscription.entity'; export * from './Crate.entity';
ise-uiuc/Magicoder-OSS-Instruct-75K
public class ChapterSelectInputParams : SceneInputParams { public string param1; } [Serializable] public class ChapterSelectOutParams : SceneOutputParams { public string outParam1;
ise-uiuc/Magicoder-OSS-Instruct-75K
AbstractFigur[][] loading(AbstractFigur data[][], Player player); }
ise-uiuc/Magicoder-OSS-Instruct-75K
def update(c): c.run("pwd") c.run("eval `ssh-agent` && ssh-add /home/calvine/.ssh/calvineaws.pem") c.run("ansible-playbook -i hosts deploy.yml")
ise-uiuc/Magicoder-OSS-Instruct-75K
# If our index list is empty, then the data point in orig that
ise-uiuc/Magicoder-OSS-Instruct-75K
Initializer for TestArticleRecommender class. This function loads the corpus for testing. """ self.corpus = pd.read_csv(configs.CORPUS_PATH) self.knn_dimension = article_recommender.knn_prediction( np.zeros(shape=(5, 10)), [np.zeros(10)])
ise-uiuc/Magicoder-OSS-Instruct-75K
else: try: nonlinearity = {'RNN_TANH': 'tanh', 'RNN_RELU': 'relu'}[rnn_type] except KeyError: raise ValueError( """An invalid option for `--model` was supplied, options are ['LSTM', 'GRU', 'RNN_TANH' or 'RNN_RELU']""") self.rnn = nn.RNN(ninp, nhid, nlayers, nonlinearity=nonlinearity, dropout=dropout) if decoder is None: self.decoder = nn.Linear(nhid, ntoken) else: self.decoder = decoder
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * @return the name of the {@link City} this address is located in. */ @Mandatory
ise-uiuc/Magicoder-OSS-Instruct-75K
return Response( { 'img_url': settings.FDFS_URL+image_url }, status=201 )
ise-uiuc/Magicoder-OSS-Instruct-75K
if self.key is None: # Maskout attention score for padded states self.att_layer.compute_mask(enc_feat, enc_len.to(enc_feat.device)) # Store enc state to lower computational cost self.key = torch.tanh(self.proj_k(enc_feat)) self.value = torch.tanh(self.proj_v( enc_feat)) if self.v_proj else enc_feat # BxTxN if self.num_head > 1: self.key = self.key.view(bs, ts, self.num_head, self.dim).permute( 0, 2, 1, 3) # BxNxTxD
ise-uiuc/Magicoder-OSS-Instruct-75K
function dash(f) {
ise-uiuc/Magicoder-OSS-Instruct-75K
for f in connection: print(connection['B']) print(connection[id])
ise-uiuc/Magicoder-OSS-Instruct-75K
saved_prediction = torch.load('prediction.pt', map_location=torch.device('cpu')) for acc_at_k in [1, 5, 10, 20]: total_num = 0 correct = 0 for topk_pred, ref in zip(saved_prediction['topk'], saved_prediction['ref']): pred = topk_pred[:, :acc_at_k] is_correct = True for p, t in zip(pred, ref):
ise-uiuc/Magicoder-OSS-Instruct-75K
"couldn't be matched with a known, trusted CA.".format(e.args[1])) else: lgr.warn('HTTP Server: {}'.format(e.args[1]))
ise-uiuc/Magicoder-OSS-Instruct-75K
current_path + '/storages/**/options.json', recursive=True) # loop though all options avalible for option in option_files: json_option = utils.reading_json(option) stdout_path = json_option.get('WORKSPACES') + "/" + filename if utils.not_empty_file(stdout_path): return json_option.get('WORKSPACES'), os.path.normpath(filename) # get real path
ise-uiuc/Magicoder-OSS-Instruct-75K
class ScheduleTableViewController : UITableViewController {
ise-uiuc/Magicoder-OSS-Instruct-75K
fn borrow(&self) -> &str { self.0.as_str() } } impl From<String> for SessionToken { fn from(token: String) -> Self { SessionToken::new(token)
ise-uiuc/Magicoder-OSS-Instruct-75K
'[ {0}, {1} ]' ', but you output: {2}' ) return CheckResult.wrong( output.format(attach[2], attach[1], numbers), )
ise-uiuc/Magicoder-OSS-Instruct-75K
for i in orange: if (b + i) in list(range(s, t+1)): b_score +=1
ise-uiuc/Magicoder-OSS-Instruct-75K
# # Licensed under the Academic Free License version 3.0 # (for details see LICENSE.txt in this directory).
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "ERROR: lvremove did leave some some mappings in DM behind!" return 1 fi : } check_and_cleanup_lvs_() { lvs -a -o+devices $vg lvremove -ff $vg if dmsetup table|grep $vg; then echo "ERROR: lvremove did leave some some mappings in DM behind!" return 1
ise-uiuc/Magicoder-OSS-Instruct-75K
powermanager-service,\ procmanager-service,\ settings-service,\ tcpsocket-service,\ time-service,\ virtual-host"} BUILD_TYPE=${BUILD_TYPE:-"release"} JS_BUILD_TYPE="prod" OPT="--release --strip --no-default-features" if [[ "${BUILD_TYPE}" == "debug" ]]; then
ise-uiuc/Magicoder-OSS-Instruct-75K
f = get_filename("irdata/nh4y-activation.spg") assert f == { '.spg': [Path(prefs.datadir) / 'irdata' / 'nh4y-activation.spg'] } # no directory specified (filename must be in the working or the default data directory
ise-uiuc/Magicoder-OSS-Instruct-75K
{ /// <summary> /// Мод "Auth". Основа. Задания. Обновление. JWT. Исключение. /// </summary> public class ModAuthBaseJobRefreshJwtException : Exception { } }
ise-uiuc/Magicoder-OSS-Instruct-75K
private static bool GetBooleanEnvironmentVariable(string name) => bool.TryParse(Environment.GetEnvironmentVariable(name), out var enabled) && enabled; }
ise-uiuc/Magicoder-OSS-Instruct-75K
# Librerias en carpetas locales from .submodels.pos import PyPos
ise-uiuc/Magicoder-OSS-Instruct-75K
parseResult = h2i.import_parse(bucket='home-0xdiag-datasets', path=csvPathname, schema='local', timeoutSecs=500) print csvFilename, 'parse time:', parseResult['response']['time'] print "Parse result['destination_key']:", parseResult['destination_key'] inspect = h2o_cmd.runInspect(None,parseResult['destination_key']) print "\n" + csvFilename start = time.time() RFview = h2o_cmd.runRF(parseResult=parseResult, trees=5, depth=5, timeoutSecs=600, retryDelaySecs=10.0) print "RF end on ", csvFilename, 'took', time.time() - start, 'seconds'
ise-uiuc/Magicoder-OSS-Instruct-75K
global found visisted[u] = True checkedLoop[u] = True
ise-uiuc/Magicoder-OSS-Instruct-75K
fn maybe(&self) -> &mem::MaybeUninit<T> {
ise-uiuc/Magicoder-OSS-Instruct-75K
break for word in words: word=word.strip() if(len(word)<minlength): continue if(len(word)>maxlength): continue if(None==specials.search(word)): continue if(None==lowers.search(word)): continue if(None==uppers.search(word)):
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.apache.plc4x.java.api.PlcConnection; import org.apache.plc4x.java.api.exceptions.PlcConnectionException; import org.apache.plc4x.java.mock.connection.MockConnection;
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace spec\Knp\FriendlyContexts\Reader; use PhpSpec\ObjectBehavior; use Prophecy\Argument;
ise-uiuc/Magicoder-OSS-Instruct-75K
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.apache.hadoop.conf.Configuration; import org.apache.tajo.catalog.Schema; import org.apache.tajo.catalog.TableMeta;
ise-uiuc/Magicoder-OSS-Instruct-75K
http = urllib3.PoolManager() encoded_args = urlencode( { 'api_key': os.environ['BADR_CHALLONGE_KEY'], 'match[scores_csv]': '{}-{}'.format(record[3], record[4]), 'match[winner_id]': record[5] }) url = getUpdateUrl(record[0]) + '?' + encoded_args response = http.request('PUT', url) print("Update to challonge:", response.status) return response.status == 200
ise-uiuc/Magicoder-OSS-Instruct-75K
check_species_url = str(target['urls']['check_species']) # Check a rectangle that includes more of one plant than the other and make sure the plant # with the greater density wins. result = self.check_species(check_species_url, [rects.TWO_PLANTS]) self._assert_image_rects(result, ["SPC_PLANT001"])
ise-uiuc/Magicoder-OSS-Instruct-75K
func_preproc.run() #func_preproc.run(plugin='MultiProc') #func_preproc.run(plugin='CondorDAGMan')
ise-uiuc/Magicoder-OSS-Instruct-75K
private RingBufferedStream _innerStream; private bool _initialized; public DownloadStream(Func<long, long, File, CustomDisposable<HttpWebResponse>> responseGenerator, File file, long? start = null, long? end = null) : this(responseGenerator, file.Parts, start, end) { } private DownloadStream(Func<long, long, File, CustomDisposable<HttpWebResponse>> responseGenerator, IList<File> files, long? start = null, long? end = null) { var globalLength = files.Sum(f => f.OriginalSize);
ise-uiuc/Magicoder-OSS-Instruct-75K
} interface SeekToAction { type: typeof PLAYER_SEEK_TO; position: number; } interface SetVolumeAction { type: typeof PLAYER_CHANGE_VOLUME; volume: number; }
ise-uiuc/Magicoder-OSS-Instruct-75K
func instantiateFrom(filename: String) throws -> SwiftFHIRAccount { return try instantiateFrom(json: try readJSONFile(filename)) } func instantiateFrom(json: FHIRJSON) throws -> SwiftFHIRAccount { return try SwiftFHIRAccount(json: json) } func testAccount1() {
ise-uiuc/Magicoder-OSS-Instruct-75K
return x**(self.k-1)*exp(-x/self.t)/((self.t*self.k)*gamma_func(self.k)) def sample(self, n, seed=None): rng = np.random.default_rng(seed) return rng.gamma(self.k, self.t, size=n)
ise-uiuc/Magicoder-OSS-Instruct-75K
return False def bearbeiten(datei): img = Image.open(datei)
ise-uiuc/Magicoder-OSS-Instruct-75K
connect(mapStateToProps, mapDispatchToProps)(DefaultChapter) ); export default AcademyDefaultChapterContainer;
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by KP on 2018-03-29. // Copyright © 2018 KP. All rights reserved. // import UIKit class InsertScoreTableViewCell: UITableViewCell { @IBOutlet weak var nameLabel: UILabel! @IBOutlet weak var pibakButton: DetailBakButton!
ise-uiuc/Magicoder-OSS-Instruct-75K
} void ChromeFrameAutomationClient::OnUnload(bool* should_unload) { *should_unload = true; if (automation_server_) { const DWORD kUnloadEventTimeout = 20000; IPC::SyncMessage* msg = new AutomationMsg_RunUnloadHandlers(tab_handle_, should_unload); base::WaitableEvent unload_call_finished(false, false); UnloadContext* unload_context = new UnloadContext(&unload_call_finished, should_unload); automation_server_->SendAsAsync(msg, unload_context, this); HANDLE done = unload_call_finished.handle();
ise-uiuc/Magicoder-OSS-Instruct-75K
return x_fake_seg else: return fake_seg def to_discrete(self, fake_seg): fake_sem_seg = fake_seg["sem_seg"] if self.opt.discretization == "gumbel": x_fake_sem_seg = self.gumbel_sampler(fake_sem_seg) elif self.opt.discretization == "max": x_fake_sem_seg = self.max_sampler(fake_sem_seg) elif self.opt.discretization == "none":
ise-uiuc/Magicoder-OSS-Instruct-75K
{ /** * {@inheritdoc} */ public function build(ContainerBuilder $container) { $container->addCompilerPass(new StoragePass());
ise-uiuc/Magicoder-OSS-Instruct-75K
# here: https://github.com/pytest-dev/pytest-django/issues/18 ContentType.objects.clear_cache() models = utils.get_all_models(True, False) for m in models: codename = utils.get_permission_codename("select", m) name = f"Can SELECT from {m._meta.db_table} table" # nosec content_type = ContentType.objects.get_for_model(m)
ise-uiuc/Magicoder-OSS-Instruct-75K
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { return true } }
ise-uiuc/Magicoder-OSS-Instruct-75K
return '{}{}{}'.format( self.types[type], message, self.__reset__ ) @classmethod
ise-uiuc/Magicoder-OSS-Instruct-75K