seed
stringlengths
1
14k
source
stringclasses
2 values
const selectGroup = (id: string, name: string) => {
ise-uiuc/Magicoder-OSS-Instruct-75K
import pupa from 'pupa'; const wind = window as any; export const ls: { [key: string]: string } = wind.cft_ls; export default ls; export function format(key: string, ...data: any[]): string { return pupa(ls[key], data); }
ise-uiuc/Magicoder-OSS-Instruct-75K
} else { println!("number is not divisible by 4, 3, or 2");
ise-uiuc/Magicoder-OSS-Instruct-75K
return 0 return int(bin(self.BitNum)[-(i+1)]) def __repr__(self): return bin(self.BitNum)[2:] def __str__(self): return bin(self.BitNum)[2:]
ise-uiuc/Magicoder-OSS-Instruct-75K
use App\Model\Customer\Ticket; use Illuminate\Support\Facades\Gate;
ise-uiuc/Magicoder-OSS-Instruct-75K
func testLoadData() { let store = ReadingListObjectStore(MyStoreName) let expected = store.readingList() println("In \(__FUNCTION__): reading list is \(expected)") } func testLoadDataPerformance() { self.measureBlock() { for i in 0..<10_000 ...
ise-uiuc/Magicoder-OSS-Instruct-75K
aria-label={src} > <SvgIcon src={src} width="25px" height="25px" /> </a> ); };
ise-uiuc/Magicoder-OSS-Instruct-75K
def get_E_Elc_washer_d_t(E_Elc_washer_wash_rtd, tm_washer_wash_d_t): """時刻別消費電力量を計算する Parameters ---------- E_Elc_washer_wash_rtd : float
ise-uiuc/Magicoder-OSS-Instruct-75K
return endTextJoin(spaces, StyleTokenCoverter[item.type], ' ', item.content as string) + LINE_SPLITE; } if (item.type === StyleTokenType.STYLE) { return endTextJoin(spaces, item.name as string, ': ', item.content as string) + LINE_SPLITE; } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// // http://www.apache.org/licenses/LICENSE-2.0 // // 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 gover...
ise-uiuc/Magicoder-OSS-Instruct-75K
description='Tech@NYU API Python Client', author='TechatNYU', url='https://github.com/TechAtNYU/pytnyu', author_email='<EMAIL>', version='0.0.4', install_requires=['requests'], namespace_packages=['pytnyu'], packages=['pytnyu'], name='pytnyu', )
ise-uiuc/Magicoder-OSS-Instruct-75K
doc1.save() doc1.fetch() doc1.delete()
ise-uiuc/Magicoder-OSS-Instruct-75K
} } impl<'a, K, V> IntoIterator for &'a SmallIndexMap<K, V> { type Item = (&'a K, &'a V); type IntoIter = Iter<'a, K, V>; fn into_iter(self) -> Self::IntoIter { self.iter()
ise-uiuc/Magicoder-OSS-Instruct-75K
vehicle_predecessor.successor = vehicle_to_place @dataclass class TrafficParameters(SimulationParameters): """Class for keeping track of the simulation parameters in menus.""" length: int = 2250 # 2250 default 3500 max 300 min
ise-uiuc/Magicoder-OSS-Instruct-75K
arch = registry.architectures.get("my_test_function") assert arch is create_model with pytest.raises(RegistryError): registry.architectures.get("not_an_existing_key")
ise-uiuc/Magicoder-OSS-Instruct-75K
//глобальные хелперы как функции в одном файле if (empty(function_exists('helperfunction1'))) { function helperfunction1() { echo 'helperfunction1'; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
dates3 = []
ise-uiuc/Magicoder-OSS-Instruct-75K
from athinterpreter import TildeAthInterp stmts = AthStatementList([ AthTokenStatement('PROCREATE', [IdentifierToken('TEST'), None]), TildeAthLoop(False, AthStatementList([ CondiJump([IdentifierToken('TEST'), 3]), AthTokenStatement('print', [LiteralToken('Test!\\n', str)]), AthTokenStat...
ise-uiuc/Magicoder-OSS-Instruct-75K
if mode:
ise-uiuc/Magicoder-OSS-Instruct-75K
bash build.sh ./build/model_test --single_thread=false --single_instance=false --test_groups=0
ise-uiuc/Magicoder-OSS-Instruct-75K
email=self.cleaned_data['email'], content=self.content, ) if created: invite.send() class EventAdminInviteForm(BaseInviteForm): choices = (
ise-uiuc/Magicoder-OSS-Instruct-75K
is_active = models.BooleanField( verbose_name='active', default=True, help_text='Set to true when the publication is active'
ise-uiuc/Magicoder-OSS-Instruct-75K
return redirect()->route('mailrules.index');
ise-uiuc/Magicoder-OSS-Instruct-75K
# Calculate the aggregates per client client_aggregates = tff.federated_map(tff_count_by_key, tff_client_dataset) # Start to build the aggregation function @tff.tf_computation() def build_zeros(): key_size = len(key_list_t) return tf.zeros([key_size], tf.int32)
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>src/libsml/Utils/Base64/test.cpp #include <libsml/include.hpp> #include "Base64.hpp" using namespace std; int main() { const string s = "ADP GmbH\nAnalyse Design & Programmierung\nGesellschaft mit beschränkter Haftung";
ise-uiuc/Magicoder-OSS-Instruct-75K
// distributed under the License is distributed on an "AS IS" BASIS,
ise-uiuc/Magicoder-OSS-Instruct-75K
A subtree of s is a tree consists of a node in s and all of this node's descendants. The tree s could also be considered as a subtree of itself. https://leetcode.com/problems/subtree-of-another-tree/ """ # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): ...
ise-uiuc/Magicoder-OSS-Instruct-75K
@Test public void testWithIdenticalAnimal() { super.testWithIdentical(); } @Test public void testWithDifferentAnimal() { super.testWithDifferent(); } // CS:OFF: MagicNumber @Test(timeOut = 1000L)
ise-uiuc/Magicoder-OSS-Instruct-75K
("MIP", "CP"), index=0, ) cg_sp_p_type = st.selectbox( "Select the approach to use in the subproblem placement for column generation", ("Maxrects", "MIP", "CP"), index=0,
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace Logy.Maps.Geometry.WanderMaps
ise-uiuc/Magicoder-OSS-Instruct-75K
testing(myString);
ise-uiuc/Magicoder-OSS-Instruct-75K
private static IReadOnlyList<string> ReadPrereleaseIdentifiers(string versionString, ref int index) { var result = new List<string>(); while (true) { if (TryReadPrereleaseIdentifier(versionString, ref index, out var label)) { ...
ise-uiuc/Magicoder-OSS-Instruct-75K
description: 'Name of the Place', }) public title: string; @ApiProperty() public desc: string; @ApiProperty() public adress: string; } //TODO: add class-validator
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <iostream> #include <stack>
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': s = threading.Semaphore(5) producer = UrlProducer(s) producer.start()
ise-uiuc/Magicoder-OSS-Instruct-75K
return (self.Players[x].Addr, text) """ Retorna os players presente na sala passada por parametro """ def getPlayersInRoom(self, room): sala = self.Map.getRoom(room) if(sala == None): return "Sala nao encontrada" playersNaSala = [] for x in range(0, len(self.Players)): if(self.Players[x].Room ==...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Perform 2D delaunay triangulation
ise-uiuc/Magicoder-OSS-Instruct-75K
urlpatterns = [ path("", views.index, name="index"), path("wiki", views.index, name="index"), path("wiki/<str:name>", views.page, name="page"), path("w", views.searchPage, name="searchPage"), path("wiki/page/new", views.create, name="create"), path("wiki/page/edit", views.edit, name="edit") ]
ise-uiuc/Magicoder-OSS-Instruct-75K
# import os from az_code_gen.base import * from AzReflectionCpp import format_cpp_annotations class AZEBusInline_Driver(TemplateDriver):
ise-uiuc/Magicoder-OSS-Instruct-75K
self.steps = 0 self.last_delta = 0 self.r_seq = self.rotation_sequence() self.steps_per_cycle = 4 self.remainder = 0 def rotation_state(self): a_state = GPIO.input(self.pin_a) b_state = GPIO.input(self.pin_b) r_state = a_state | b_state << 1 r...
ise-uiuc/Magicoder-OSS-Instruct-75K
new_targets = [] targets_np = np.array(self.targets, dtype=np.int64) classes = np.unique(targets_np) # np.random.shuffle(classes) self.num_per_cls_dict = dict() for the_class, the_img_num in zip(classes, img_num_per_cls): self.num_per_cls_dict[the_class] = the...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// User-provided platform name/version pairs. /// /// Used to set the current release version of a platform. Contains an array of strings in the following format: /// ```
ise-uiuc/Magicoder-OSS-Instruct-75K
if left % 2 == 1: resleft = self.func(resleft, self.SEG[left])
ise-uiuc/Magicoder-OSS-Instruct-75K
task_context::task_context(task_context&& rhs) noexcept : m_pointer(nullptr) { *this = std::move(rhs); }
ise-uiuc/Magicoder-OSS-Instruct-75K
self.currentXMLDOMPath = self.currentXMLDOMPath.URLByDeletingLastPathComponent!
ise-uiuc/Magicoder-OSS-Instruct-75K
extended_private_key_prefix = unhexlify('0488ade4') max_target = 0x0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff genesis_hash = '9c89283ba0f3227f6c03b70216b9f665f0118d5e0fa729cedf4fb34d6a34f463' genesis_bits = 0x1f00ffff
ise-uiuc/Magicoder-OSS-Instruct-75K
print a print b
ise-uiuc/Magicoder-OSS-Instruct-75K
class A<T : AnyObject> { weak var a : T? } protocol B : class { } print((Array<A<B>>()[0] as A<B>).a)
ise-uiuc/Magicoder-OSS-Instruct-75K
# # testdata =[
ise-uiuc/Magicoder-OSS-Instruct-75K
Self::F64(_) => mem::size_of::<f64>(), }
ise-uiuc/Magicoder-OSS-Instruct-75K
/* Copyright (C) 2015 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: The `ListRowRepresentedObject` class provides an abstraction suitable for adapting the details of a list item to the requirements of the `NCWidgetListViewController` class. It is ...
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Test that questions feeds with products and topics work.""" p = product(save=True) t = topic(product=p, save=True) url = urlparams(reverse('questions.questions'), product=p.slug, topic=t.slug) res = self.client.get(url) doc = pq(res.content) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
{ } public PersistencePackageMetadata(string id, string version) : this(id, new SemanticVersion(version), DateTime.MinValue) { } public PersistencePackageMetadata(string id, SemanticVersion version, DateTime lastUsedDate)
ise-uiuc/Magicoder-OSS-Instruct-75K
def FWT(A, v): B = A[:] d = 1 while d < len(B): for i in xrange(0, len(B), d << 1): for j in xrange(d): B[i+j] += B[i+j+d] * v d <<= 1 return B k = 3 n, max_A = 1, max(A) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
Begin2D(false); DrawRateStuff(); GLRenderer->Flush(); Swap();
ise-uiuc/Magicoder-OSS-Instruct-75K
author_email='<EMAIL>', description='Tiny live plotting library', install_requires=[ 'matplotlib', 'numpy' ],
ise-uiuc/Magicoder-OSS-Instruct-75K
internal sealed class NumericalSignedRunner : ParseRunner { private NumericalSignedRunner() { } public override ParseRunner Run(ParseRunnerContext context, Token token) { var sign = context.GetAndClearPreSignToken().Symbol.ToString(); switch (token) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public static synchronized void registerTypeAdapter(final Type type, final TypeAdapter typeAdapter) { GSON_BUILDER.registerTypeAdapter(type, typeAdapter); gson = GSON_BUILDER.create(); } /** * Get gson instance. * * @return gson instance */ public static...
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>zeshan321/EmailScript using System.Collections.Generic; using Microsoft.CodeAnalysis.Scripting;
ise-uiuc/Magicoder-OSS-Instruct-75K
std::unique_ptr<LightTransformer> LightOutput::create_default_transition() { return make_unique<LightTransitionTransformer>(); } } // namespace light } // namespace esphome
ise-uiuc/Magicoder-OSS-Instruct-75K
static llvm::RegisterPass<FunctionBitCastKiller> X("function-bitcast-killer", "Pass that kills all function bitcasts in call instructions", false, false); } // namespace borealis #include "Util/unmacros.h"
ise-uiuc/Magicoder-OSS-Instruct-75K
assert(self.graph) if self.seed: np.random.seed(self.seed) self.population = [] for i in range(self.pops): pop = Particle(self.graph, self.omega, self.phi_particle, self.phi_global) self.population.append(pop) if (self.best_fitness is No...
ise-uiuc/Magicoder-OSS-Instruct-75K
fn rotate_impl<T>(input: &str, output: &str, config: Config, file_io: &T) where T: FileIO { let input = decide_path(input, &config); let output = decide_path(output, &config); let rotated_contents: String = file_io.read(input.as_str()).chars().map(rotate).collect(); file_io.write(output.as_str(), rotate...
ise-uiuc/Magicoder-OSS-Instruct-75K
#_________________________________________________________________________________________ def collate_param_factory (input_files_task_globs, flatten_input, regex, extra_input_files_task_globs, replace_inputs, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
{ internal class InitializeRouteHandler : ActionHandler<InitializeRouteAction> { public InitializeRouteHandler ( IStore aStore, NavigationManager aNavigationManager ) : base(aStore) { NavigationManager = aNavigationManager; } private RouteState Rout...
ise-uiuc/Magicoder-OSS-Instruct-75K
name = kw.get('log_name', method.__name__.upper()) kw['log_time'][name] = int((te - ts) * 1000) else:
ise-uiuc/Magicoder-OSS-Instruct-75K
const router = routerMiddleware(history); // bump up storage version if state structure change const engine = filter(createEngine('myApp-0.0.1'), [ 'user' ]); const storeMiddleware = storage.createMiddleware(engine, [], [ // White list actions, will save everything if leave blank h...
ise-uiuc/Magicoder-OSS-Instruct-75K
export async function seed(knex: Knex): Promise<void> { // Production seed doesn't do anything }
ise-uiuc/Magicoder-OSS-Instruct-75K
class OncePerDayUserThrottle(UserRateThrottle): rate = '1/day' @api_view(['GET'])
ise-uiuc/Magicoder-OSS-Instruct-75K
return Vec3(self.x-vec.x, self.y-vec.y, self.z-vec.z) def __mul__(self, num): return Vec3(self.x*num, self.y*num, self.z*num) def __rmul__(self, num): return self.__mul__(num) def __truediv__(self, num): return Vec3(self.x/num, self.y/num, self.z/num)
ise-uiuc/Magicoder-OSS-Instruct-75K
super.draw(map); if (selected) { ScreenPosition screenPosition = map.getScreenPosition(this.getLocation()); showTitle(pg, this.getId(), screenPosition.x, screenPosition.y); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
print_link = soup.findAll('a', text='Print')[0].get('href') html2 = grab_url(print_link) logger.debug('got html 2') # Now we have to switch back to bs3. Hilarious. # and the labeled encoding is wrong, so force utf-8.
ise-uiuc/Magicoder-OSS-Instruct-75K
self.ID = ID self.descriptions = [] if descriptions is None else descriptions self.definition = None class Description: ID = None concept_ID = None term = None def __init__(self, ID=None, concept_ID=None, term=None): self.ID = ID self.concept_ID = concept_ID ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_blogs_commands(self): blogs = ImportBlog.objects.count() self.assertEqual(blogs, self.blogs_data_count) call_command('delete_blogs') blogs = ImportBlog.objects.count() self.assertEqual(blogs, 0)
ise-uiuc/Magicoder-OSS-Instruct-75K
char = None complex128 = None complex64 = None double = None f4 = None f8 = None ffi = None ffi_forced_object = None float32 = None float64 = None float_ = None i1 = None
ise-uiuc/Magicoder-OSS-Instruct-75K
constructor(private graph: WorkflowGraph, private element: Element, private graphManager: WorkflowGraphManager, private taskQueue: TaskQueue) { } attached() { this.graph.render(this.workflow, this.diagramContainer, this.editable); this.currentChanged(); this....
ise-uiuc/Magicoder-OSS-Instruct-75K
'%(asctime)s %(levelname)s %(message)s', '%Y-%m-%d %H:%M:%S')) logger.setLevel(level) logger.addHandler(handler) def main(): setup_logging() cluster = MariaDBCluster() logging.info({'action': 'main', 'status': 'start', 'my_ipv4': cluster.my_ipv4})
ise-uiuc/Magicoder-OSS-Instruct-75K
def visit_importfrom(self, node): pass def visit_for_statement(self, node): self.newline(node) self.body(node.block) def visit_for_iterator_with_index(self, node): pass
ise-uiuc/Magicoder-OSS-Instruct-75K
class CommentCommonSerializer(serializers.ModelSerializer): """评论""" class Meta: model = Comment fields = "__all__" class CommentListSerializer(serializers.ModelSerializer): """评论列表""" username = serializers.SerializerMethodField() children = serializers.SerializerMethodField()...
ise-uiuc/Magicoder-OSS-Instruct-75K
* Copyright (c) 2021 California Institute of Technology
ise-uiuc/Magicoder-OSS-Instruct-75K
Console.WriteLine(result); Console.ReadLine();*/ } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
SpType, r_SpType, ),dtype=record) if hip in data: print('Error: Duplicate Records for HIP', hip) data[hip] = item infile.close() newdata = [] for hip in range(1, max(data.keys())+1): if hip in data: newdata.append(data[hip]) else: newdata...
ise-uiuc/Magicoder-OSS-Instruct-75K
line = line.rstrip("\n") if Interpreter.number.match(line): self.memory[index] = int(line) else: self.memory[index] = line
ise-uiuc/Magicoder-OSS-Instruct-75K
public class KuttException : Exception { public KuttException(string message) : base(message) { } public override string StackTrace => ""; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
# Whether or not to save the displayed image in a temporary directory SAVE_IMAGE = False # Convert all incoming frames to a fixed size to ease processing IMAGE_HEIGHT = 360 IMAGE_WIDTH = 640 BLUR_KERNEL_SIZE = int(IMAGE_WIDTH // 16 + 1)
ise-uiuc/Magicoder-OSS-Instruct-75K
"query" : "query($tokenIds: [String]!) { tokens(where: { id_in: $tokenIds } ) { id name symbol derivedETH totalSupply totalLiquidity } }", "variables" : [ "tokenIds" : entities.map({$0.address.lowercased()}) ] ] let url = URL(string: "htt...
ise-uiuc/Magicoder-OSS-Instruct-75K
# },
ise-uiuc/Magicoder-OSS-Instruct-75K
/> </div> </div> </Container> ); }; export const getStaticProps = getStaticPropsFiliere;
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public static void main(String[] args) throws Exception { RandomOperations.setRandomSeed(); // 1M Exp // String archivesFileName = "X:/CoPhIR/1MExp/dataset"; // int nTries = 100000;
ise-uiuc/Magicoder-OSS-Instruct-75K
event["name"]= model; event["decision_network"]= DN_network; event["shunting_network"]= SM_network; event["decision_pre_evolve"]= DN_EVOLED; event["shunting_pre_evolve"]= SM_EVOLED;
ise-uiuc/Magicoder-OSS-Instruct-75K
self.input_box_7 += event.unicode # Mode menu. elif (self.active_menu == 'mode_input_1' or self.active_menu == 'mode_input_2' or self.active_menu == 'mode_input_3' or self.active_menu == 'mode_input_4'): if event.key == pygame.K_RET...
ise-uiuc/Magicoder-OSS-Instruct-75K
for griddf in pd.read_csv(bedpeName,sep='\t', chunksize=10): print("CHUNK") for row in griddf.itertuples(): print(row.achr,row.astart)
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <LibGUI/Application.h> #include <LibGUI/Icon.h> #include <LibGUI/SettingsWindow.h> #include <LibMain/Main.h> ErrorOr<int> serenity_main(Main::Arguments arguments) { TRY(Core::System::pledge("stdio rpath recvfd sendfd unix proc exec")); auto app = TRY(GUI::Application::try_create(arguments)); Con...
ise-uiuc/Magicoder-OSS-Instruct-75K
@IBOutlet weak var backgroundImage: UIImageView! @IBOutlet weak var label: UILabel! static let menuCellIdentifier = "MenuItem"
ise-uiuc/Magicoder-OSS-Instruct-75K
ACCOUNT_VISIBILITY_CONFIGURATION["default_visibility"] = "private" # A user is verified if he has an approved SoftwareSecurePhotoVerification entry # this setting will create a dummy SoftwareSecurePhotoVerification for user in # paybox success callback view. A this point, we think it's better to create a # dummy one t...
ise-uiuc/Magicoder-OSS-Instruct-75K
} class func defaultAuctionViewModelCreator() -> AuctionViewModelCreator { return { sale, currentLotSignal, biddingCredentials in return LiveAuctionViewModel(sale: sale, currentLotSignal: currentLotSignal, biddingCredentials: biddingCredentials) } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
params?: Partial<PutItemInput> ): Promise<PutItemOutput | AWSError> => client .put({ TableName: table, Item: item, ...params, }) .promise()
ise-uiuc/Magicoder-OSS-Instruct-75K
private Integer key; private String value; }
ise-uiuc/Magicoder-OSS-Instruct-75K
def packaging_get(): return ModelPackagingClient().get_all() @staticmethod def packaging_get_id(pack_id: str): return ModelPackagingClient().get(pack_id) @staticmethod def packaging_put(payload_file, artifact_name=None): api_object = parse_resources_file_with_one_item(paylo...
ise-uiuc/Magicoder-OSS-Instruct-75K
* SPDX-License-Identifier: BSD-3-Clause */
ise-uiuc/Magicoder-OSS-Instruct-75K