seed
stringlengths
1
14k
source
stringclasses
2 values
assert is_active def test_check_if_user_is_superuser(db: Session) -> None: email = random_email() password = <PASSWORD>_<PASSWORD>() user_in = UserCreate(email=email, password=password, is_superuser=True) user = crud.user.create(db, obj_in=user_in)
ise-uiuc/Magicoder-OSS-Instruct-75K
class Migration(migrations.Migration): dependencies = [ ('home', '0001_initial'), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
/*Tabela dos níveis de atendimento do estabelecimento*/ CREATE TABLE IF NOT EXISTS {child_db}.nivhier("ID" VARCHAR(2), "NIVEL" VARCHAR(66)); /*Tabel...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.format = FortranFormat(format) else: self.format = format self.length = length if self.text is None: self._output() if self.data is None: self._input() def __len__(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
# vim:sw=4:ts=4:et:
ise-uiuc/Magicoder-OSS-Instruct-75K
elev_band, elev_prob = calc_viewloss_vec(elev_band_width, elev_sigma) tilt_band, tilt_prob = calc_viewloss_vec(tilt_band_width, tilt_sigma) # print(azim_band) # print(obj_mult) # print(azim_prob) for i in azim_band: # print(azim, obj_mult, np.mod(azim + i + 360, 360) + 360 * obj_mult, az...
ise-uiuc/Magicoder-OSS-Instruct-75K
def main(): injection_string = ';admin=true;' part1 = encryption_oracle('X' * len(injection_string)) part2 = encryption_oracle('Y' * len(injection_string)) part3 = xor_str('X' * len(injection_string), injection_string) locationing = xor_str(part1, part2)
ise-uiuc/Magicoder-OSS-Instruct-75K
fifo = f"{mpileup}{tmp}.fifo" if os.path.exists(fifo): os.unlink(fifo) shell("mkfifo {fifo}")
ise-uiuc/Magicoder-OSS-Instruct-75K
return list(set([item.split(sep='@')[1] for item \ in list_of_sender_domain_pairs if '@' in item])) return list_of_sender_domain_pairs.split(sep='@')[-1] def load_model(MODEL_NAME) -> RandomForestClassifier: return joblib.load(MODEL_NAME)
ise-uiuc/Magicoder-OSS-Instruct-75K
lastStateTemperature="" lastStateHumidity="" while True: # Retreive data from DHT11 sensor humidity, temperature = Adafruit_DHT.read_retry(sensor=Adafruit_DHT.DHT11, pin=4, retries=15, delay_seconds=2) # Check Retreive Data
ise-uiuc/Magicoder-OSS-Instruct-75K
__all__ = ['CronDescriptor']
ise-uiuc/Magicoder-OSS-Instruct-75K
export { Separator };
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.androidannotations.annotations.Extra; import org.androidannotations.annotations.ViewById; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; @EActivity(R.layout.activity_set_enterprise_authority) public class SetEnterpriseAuthorityActivity extends BackActivity { @Extra ...
ise-uiuc/Magicoder-OSS-Instruct-75K
var focusDelay = 100; if (instanceAttributes["focus-delay"]) focusDelay = parseInt(instanceAttributes["focus-delay"], 10);
ise-uiuc/Magicoder-OSS-Instruct-75K
enum CodingKeys: String, CodingKey {
ise-uiuc/Magicoder-OSS-Instruct-75K
def maximalSquare(self, matrix: List[List[str]]) -> int: if not matrix: return 0 m, n = len(matrix), len(matrix[0]) dp = [[0]*n for _ in range(m)] res = 0 for i in range(m): dp[i][0] = int(matrix[i][0]) for j in range(n): dp[0][j] = int(matrix[...
ise-uiuc/Magicoder-OSS-Instruct-75K
public InstantKillImpact(SerializationInfo info, StreamingContext context) { Chance = info.GetValue(nameof(Chance), Chance); } public void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue(nameof(Chance), Chance); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
self.get_expasy(i[0],i[1],session) self.finish_num+=1 if self.finish_num==self.num_process: print('Done!') def run(self,num_process): self.num_process=num_process numtotal=len(self.gene_ls) for i in range(self.num_process): startpoint=i*in...
ise-uiuc/Magicoder-OSS-Instruct-75K
func actionHandler(controlEvents control: UIControl.Event, forAction action: @escaping () -> Void) { actionHandler(action: action) addTarget(self, action: #selector(triggerActionHandler), for: control) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
col10 = ele[11] if 'title' in ele[11]: reg = re.compile(r'\=\"(.*?)\">') col11 = re.findall(reg,ele[11])[0] elif 'td' in ele[11]: reg = re.compile(r'<td>(.*?)</td>') col11 = re.findall(reg,ele[11])[0] # 10 maintain col10 = ele[8] cur_line = col0_6 + [str(col7)] + ...
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == "__main__": run_test()
ise-uiuc/Magicoder-OSS-Instruct-75K
token = '<KEY>' import lyricsgenius genius = lyricsgenius.Genius(token) muzik = input("Şarkı sözü ara:") song = genius.search_song(muzik) print(song.lyrics)
ise-uiuc/Magicoder-OSS-Instruct-75K
protocol SwapTokenURLProviderType { var action: String { get } var rpcServer: RPCServer? { get } var analyticsName: String { get } func url(token: TokenObject) -> URL? } protocol TokenActionsServiceType: TokenActionsProvider { func register(service: TokenActionsProvider) }
ise-uiuc/Magicoder-OSS-Instruct-75K
string ssprintf(const char* fmt, ...) { va_list ap; va_start(ap, fmt); char buf[4097]; int len = vsnprintf(buf, 4096, fmt, ap); buf[len] = '\0';
ise-uiuc/Magicoder-OSS-Instruct-75K
) # Create snapshot
ise-uiuc/Magicoder-OSS-Instruct-75K
print('\nScraping statistics:') return [find_station(browser, s) for s in tqdm(stations)] if __name__ == '__main__': from selenium import webdriver browser = webdriver.Firefox() stations = find_stations(browser) for s in stations: print(str(s)) browser.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ namespace Shopware\DataGenerator;
ise-uiuc/Magicoder-OSS-Instruct-75K
/// Get sampler handle. pub fn sampler(&self) -> &Handle<Sampler<B>> { &self.sampler } /// Get reference to image view. pub fn view(&self) -> &ImageView<B> { &self.view } /// Get mutable reference to image view. pub fn view_mut(&mut self) -> &mut ImageView<B> { ...
ise-uiuc/Magicoder-OSS-Instruct-75K
package org.flockdata.search; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.ArrayList; import java.util.Collection;
ise-uiuc/Magicoder-OSS-Instruct-75K
} }; (modified_separators, modified_alphabet) }
ise-uiuc/Magicoder-OSS-Instruct-75K
# for vehicle in runnings: # print("Running Vehicle)", vehicle.id, ":", libsalt.vehicle.getRoute(vehicle.id).toString()) # print("Running Vehicle)", vehicle.id, ":", vehicle.toString()) #print("#Standby Vehicles: ", len(standbys))
ise-uiuc/Magicoder-OSS-Instruct-75K
'verbose_name_plural': 'API session accesses' }, ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
S = input().split("/") print(f"2018/{S[1]}/{S[2]}")
ise-uiuc/Magicoder-OSS-Instruct-75K
:return: Meter: stores and computes the average of recent values. For each part loss, calculate the loss separately. """ if len(loss_list) > 1:
ise-uiuc/Magicoder-OSS-Instruct-75K
select += ' FROM ' + ','.join(s_from) where_str = [] for k in where: if where[k]: where_str.append('%s=%s' % (k, where[k],)) else: where_str.append('%s=?' % k) select += ' WHERE ' + ' AND '.join(where_str) with db() as c...
ise-uiuc/Magicoder-OSS-Instruct-75K
div = soup.find('p', attrs={'class' : 'install-button'})
ise-uiuc/Magicoder-OSS-Instruct-75K
} else { // TODO: Implement fatalError() } // // InitGenesis performs genesis initialization for the genutil module. It returns // // no validator updates. // func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []ab...
ise-uiuc/Magicoder-OSS-Instruct-75K
operations = [ ]
ise-uiuc/Magicoder-OSS-Instruct-75K
from tests.actions.support.mouse import assert_move_to_coordinates, get_center from tests.actions.support.refine import get_events, filter_dict _DBLCLICK_INTERVAL = 640 # Using local fixtures because we want to start a new session between # each test, otherwise the clicks in each test interfere with each other. @p...
ise-uiuc/Magicoder-OSS-Instruct-75K
br = BaseRepository(model="test", name=__name__) # return fails if no interface is created assert not br.get_all() assert not br.get_by_id(0)
ise-uiuc/Magicoder-OSS-Instruct-75K
let c = nums[2]; let d = nums[3];
ise-uiuc/Magicoder-OSS-Instruct-75K
await cls.r.pool.set(f'email_validate:{action}:{token}', email, expire=600) @classmethod async def get_email_validate_token(cls, action: str, token: str) -> Optional[str]: email = await cls.r.pool.get(f'email_validate:{action}:{token}') if not email: return return em...
ise-uiuc/Magicoder-OSS-Instruct-75K
func sceneWillResignActive(_ scene: UIScene) { // Called when the scene will move from an active state to an inactive state. // This may occur due to temporary interruptions (ex. an incoming phone call). } func sceneWillEnterForeground(_ scene: UIScene) { // Called as the scene tra...
ise-uiuc/Magicoder-OSS-Instruct-75K
profile.to_file("src/templates/{}".format(payload["eda_report"])) return payload def show_eda_result_in_html(self): result = None
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "Syncing data drive" syncdrive.sh /media/MassiveSto8TbAyy /media/MassiveSto8TbBee nodryrun Syncthing SyncthingChrisAndroid
ise-uiuc/Magicoder-OSS-Instruct-75K
reTextileQuot = re.compile(r'^bq\.\s.+') reMkdCodeSpans = re.compile('`[^`]*`') reMkdMathSpans = re.compile(r'\\[\(\[].*?\\[\)\]]') reReSTCodeSpan = re.compile('``.+?``')
ise-uiuc/Magicoder-OSS-Instruct-75K
def intersection(*seqs): """ Description ---------- Creates a generator containing values found in all sequences. Parameters ---------- *seqs : (list or tuple) - sequences to pull common values from Returns ---------- generator - a generator containing values found in all seque...
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>kostalski/ffmpeg-normalize from ._ffmpeg_normalize import FFmpegNormalize from ._media_file import MediaFile from ._version import __version__
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Val Acc max" + str(max(accs))) print("FMAX " + str(max(fscores)))
ise-uiuc/Magicoder-OSS-Instruct-75K
</li> <li class="last"> <a href="extra-lockscreen.html">
ise-uiuc/Magicoder-OSS-Instruct-75K
} func testDayExtract() { let result = day.extract() XCTAssertEqual(result.0, 1) XCTAssertEqual(result.1, 1) } func testDayCoflatMap() { let transformed = day.coflatMap() { (x : DayOf<ForId, ForId, (Int, Int)>) -> String in
ise-uiuc/Magicoder-OSS-Instruct-75K
if version != task.app.jam_version or not os.path.exists(langs_path): # ~ task.log.info('Version changed!') copyfile(os.path.join(os.path.dirname(jam.__file__), 'langs.sqlite'), langs_path) os.chmod(os.path.join(task.work_dir, 'langs.sqlite'), 0o666)
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @return array */
ise-uiuc/Magicoder-OSS-Instruct-75K
expected = open(pytest.TMATS, 'rb').read().replace(b'\r\n', b'\n') with open(args['<outfile>'], 'rb') as f: assert f.read(6351)[28:] == expected
ise-uiuc/Magicoder-OSS-Instruct-75K
.catch(e => e.json().then(json => reject(json))); }); } } const client = new Client(); export default client;
ise-uiuc/Magicoder-OSS-Instruct-75K
if not text: continue for k, vectorizer in self.vectorizers.items(): vocab_file = vectorizer.count(text) vocab[k].update(vocab_file) if label not in self.label2index: self.label2index[label]...
ise-uiuc/Magicoder-OSS-Instruct-75K
AllowedMentions,
ise-uiuc/Magicoder-OSS-Instruct-75K
def checkPriorityChanges(entry, issue_as_string): global priority_string
ise-uiuc/Magicoder-OSS-Instruct-75K
summary.labels(labels).observe(duration); } else { summary.observe(duration); } } @Override
ise-uiuc/Magicoder-OSS-Instruct-75K
Fill(Stream_Audio, 0, Audio_Codec, "SV7"); Fill(Stream_Audio, 0, Audio_Codec_Settings, Mpc_Profile[Profile]); Fill(Stream_Audio, 0, Audio_Encoded_Library, Encoder); Fill(Stream_Audio, 0, Audio_BitDepth, 16); //MPC support only 16 bits Fill(Stream_Audio, 0, Audio_Duration, ((int64...
ise-uiuc/Magicoder-OSS-Instruct-75K
assertNotSame(emf, emf2); } finally { if (emf != null && emf.isOpen()) { UnmanagedEntityManagerFactory.close(emf); }
ise-uiuc/Magicoder-OSS-Instruct-75K
hasher.update(value) logging.info("DIGEST: %s", hasher.hexdigest()) logging.info("Reading done for %s", fname)
ise-uiuc/Magicoder-OSS-Instruct-75K
str_line = line json_line = json.loads(str_line) raw_data = repr(self._generate_raw_log(json_line)) json_line["Raw"] = raw_data if output_format == "csv": raw_line = self._add_raw_data_to_csv(json...
ise-uiuc/Magicoder-OSS-Instruct-75K
response = requests.get(url) return Image.open(BytesIO(response.content)).convert("RGB") if __name__ == "__main__": pil_image = fetch_image( url="http://farm3.staticflickr.com/2469/3915380994_2e611b1779_z.jpg")
ise-uiuc/Magicoder-OSS-Instruct-75K
type="text" id="city" className="form-control" aria-describedby="city-weather" /> </div> <div className="col-auto"> <button onClick={handleGetWeather} type="submit" className="btn btn-primary">Look up</button> </div> </div...
ise-uiuc/Magicoder-OSS-Instruct-75K
// export export default main_
ise-uiuc/Magicoder-OSS-Instruct-75K
result += " " } } self.present(progress, animated: true, completion: nil) parameters["message"] = result //2. 正式评论层主 HttpUtil.POST(url: postUrl!, params: parameters) { ok,res in var success = false
ise-uiuc/Magicoder-OSS-Instruct-75K
import net.minecraft.util.math.BlockPos; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Optional.Method;
ise-uiuc/Magicoder-OSS-Instruct-75K
# distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/l...
ise-uiuc/Magicoder-OSS-Instruct-75K
user = models.ForeignKey( UserModel, on_delete=models.CASCADE, ) date = models.DateTimeField( auto_now_add=True,
ise-uiuc/Magicoder-OSS-Instruct-75K
<button type="button" data-testid="remove-task-button" onClick={() => handleRemoveTask(task.id, folder.id)}> <FiTrash size={16}/> </button> </li> ))} </ul> </li> ))} </ul> ...
ise-uiuc/Magicoder-OSS-Instruct-75K
} public BasicUnary ReplaceLValueByExpression(BasicUnary oldExpr, SymbolLValue oldLvalue, ILanguageExpressionAtomic newExpr) { ReplaceLValueByExpression(oldExpr.Operator, oldLvalue, newExpr); oldExpr.ChangeOperand(ReplaceLValueByExpression(oldExpr.Operand, oldLvalue, ne...
ise-uiuc/Magicoder-OSS-Instruct-75K
( "rsync -av --exclude='*target*' --exclude='*.idea*' --exclude='*.class' " "{scala_modules_dir} ."
ise-uiuc/Magicoder-OSS-Instruct-75K
class WishListPage(BasePage): pass
ise-uiuc/Magicoder-OSS-Instruct-75K
if ($user['active'] == 1) { // CEK PASSS if (password_verify($password, $user['password'])) { // set session $dataLogin = array( 'username' ...
ise-uiuc/Magicoder-OSS-Instruct-75K
</div> <div class="form-group"> <span class="input-icon text-gray-hover"> <i class="svg-icon" data-feather="user"></i> <input type="text" class="form-control" name="name" value="{{ s...
ise-uiuc/Magicoder-OSS-Instruct-75K
public String getCustomerId() {
ise-uiuc/Magicoder-OSS-Instruct-75K
Examples -------- >>>
ise-uiuc/Magicoder-OSS-Instruct-75K
# $$\textbf{else}$$ else: # $$x' \leftarrow \text{\small H\scriptsize OURGLASS}(x, shorten\_factors)$$
ise-uiuc/Magicoder-OSS-Instruct-75K
this.monthPicker = false this.inc = 1 this.incrementMessage = '+' + JSON.stringify(this.inc) + ' days' this.decrementMessage = '-' + JSON.stringify(this.inc) + ' days' if (this.inc === 1) { //grammer change
ise-uiuc/Magicoder-OSS-Instruct-75K
} var section = NarvaloWebConfigurationManager.OptimizationSection; // Si le filtre est activé globalement (valeur par défaut), on vérifie la directive locale, sinon on
ise-uiuc/Magicoder-OSS-Instruct-75K
public IStringlyTypedPathOperator StringlyTypedPathOperator { get; set; } public IVisualStudioProjectFileReferencesProvider VisualStudioProjectFileReferencesProvider { get; set; } public IVisualStudioSolutionFileOperator VisualStudioSolutionFileOperator { get; set; } ISolutionContext IH...
ise-uiuc/Magicoder-OSS-Instruct-75K
var compiler = new ModuleCompiler
ise-uiuc/Magicoder-OSS-Instruct-75K
""" with open("input", "r+") as file: puzzle_input = file.read() FLOOR = 0 POSITION = 0 BASEMENT = False for (index, character) in enumerate(puzzle_input): if character == "(": FLOOR += 1
ise-uiuc/Magicoder-OSS-Instruct-75K
{ internal interface INavigation { void GoToApplicants(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
# I'm used for testing parallelization! echo "sleeping 5 seconds..." sleep 5 echo "writing slept file" touch slept.txt
ise-uiuc/Magicoder-OSS-Instruct-75K
from .build_scripts import annotation_misuse_1 assert 'Replace use of @chore with @chore().' in str(exc.value)
ise-uiuc/Magicoder-OSS-Instruct-75K
server: string;
ise-uiuc/Magicoder-OSS-Instruct-75K
pub const RGB_EVENT_MARKER: RGBInt = rgb(0x5A494F); pub const SWATCH_SIZE: i32 = 32; pub const BG_SAMPLE_HEIGHT: u32 = 32; pub const SCROLL_SPLIT_POINT: i32 = VARIABLE_BOTTOM; pub const HEADER_BLEND_START: i32 = 8; pub const HEADER_BLEND_END: i32 = 16;
ise-uiuc/Magicoder-OSS-Instruct-75K
@ApiOperation(value = "删除计生人员信息", notes = "传参:Integer id 记录id") public Result delete(Integer id) {
ise-uiuc/Magicoder-OSS-Instruct-75K
#[async_std::test] #[stubr::mock("req/method/post.json")] async fn should_map_request_method_post() { surf::post(stubr.uri()).await.expect_status_ok(); } #[async_std::test] #[stubr::mock("req/method/put.json")] async fn should_map_request_method_put() { surf::put(stubr.uri()).await.expect_status_ok(); } #[as...
ise-uiuc/Magicoder-OSS-Instruct-75K
[FloatArray, "areas", "*", "tiles", "*", "mappos"], [FloatArray, "areas", "*", "tiles", "*", "sidepos"], [TwoInt, "killRange"], [TwoBool, "profile_options", "values", "quest_select_warnings"], [TwoBool, "profile_options", "values", "provision_warnings"], ...
ise-uiuc/Magicoder-OSS-Instruct-75K
con = None
ise-uiuc/Magicoder-OSS-Instruct-75K
} /// MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. struct Akash_Audit_V1beta2_MsgDeleteProviderAttributesResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for //...
ise-uiuc/Magicoder-OSS-Instruct-75K
class laundryinfo: def __init__(self): self.time = datetime.datetime.now()
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>scripts/docker/cache-clear.sh #!/usr/bin/env bash # https://github.com/alexanderfefelov/scripts/blob/master/install/ops/install-docker.sh # Elevate privileges [ $UID -eq 0 ] || exec sudo bash "$0" "$@"
ise-uiuc/Magicoder-OSS-Instruct-75K
PWD2=$PWD SRC_DIR=. DST_DIR=. GOGOPROTO_PATH=$GOPATH/src/nebula.chat/vendor/github.com/gogo/protobuf/protobuf protoc -I=$SRC_DIR:$MTPROTO_PATH --proto_path=$GOPATH/src:$GOPATH/src/nebula.chat/vendor:$GOGOPROTO_PATH:./ \ --gogo_out=plugins=grpc,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,:$DST_...
ise-uiuc/Magicoder-OSS-Instruct-75K
#pragma warning restore CA1034 // Nested types should not be visible } }
ise-uiuc/Magicoder-OSS-Instruct-75K
{ private int activatedTrial = -1; private void OnTriggerEnter(Collider other) { if (activatedTrial == LevelManager.Instance.currentTrial) return; if (other.CompareTag("Player")) { LevelManager.Instance.UpdateCheckpoint(transform.position, other.transform.ro...
ise-uiuc/Magicoder-OSS-Instruct-75K
impl Parser { pub fn new(lexer: Lexer)-> Parser{ Parser{ input: lexer, ahead_token: Ok(Token::N_A) } } fn match_type(&mut self, t: Token){ match self.ahead_token { Ok(t) => self.consume(), _ => {}
ise-uiuc/Magicoder-OSS-Instruct-75K