text
string
size
int64
token_count
int64
# Generated by Django 3.2.2 on 2021-09-02 15:10 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('django_db_logger', '0001_initial'), ('policyengine', '0001_initial'), ] operations = [ ...
814
263
import numpy as np from mcerp import * from uncertainties.core import AffineScalarFunc class RiskFunction(object): def get_risk(self, bar, p): """ Computes risk for perf array w.r.t. bar. Args: bar: reference performance bar. perfs: performance array-like. Returns:...
3,087
961
import requests import re from bs4 import BeautifulSoup def nextPageLink(sess,soup,page,head=""): NextPage=soup.find(class_='next').link.get('href') req=sess.get(head + NextPage) print(f'第{page}页:',req.status_code) return BeautifulSoup(req.text,'html.parser')
277
102
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relationship # TODO: db_uri # dialect+driver://username:password@host:port/database?charset=utf8 DB_URI = 'mysql+pymysql://root:root123@127.0.0.1:33...
1,565
598
# coding: utf-8 from __future__ import unicode_literals from ...lemmatizer import read_index, read_exc import pytest @pytest.mark.models @pytest.mark.parametrize('text,lemmas', [("aardwolves", ["aardwolf"]), ("aardwolf", ["aardwolf"]), ...
2,149
740
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
2,530
648
import numpy as np from keras.models import Sequential from keras.layers import LSTM, Dense, Dropout def visualize_training_results(results): """ Plots the loss and accuracy for the training and testing data """ history = results.history plt.figure(figsize=(12,4)) plt.plot(history['val_loss']) ...
1,845
610
import torch import torch.nn.functional as F class SelfAttnFunc(torch.autograd.Function): @staticmethod def forward( ctx, use_time_mask, is_training, heads, scale, inputs, input_weights, output_weights, input_biases, output_biases...
14,120
5,060
from datetime import datetime from app import db from app.utils import misc class ReviewForm(db.Model): id = db.Column(db.Integer(), primary_key=True) application_form_id = db.Column(db.Integer(), db.ForeignKey('application_form.id'), nullable=False) is_open = db.Column(db.Boolean(), nullable=False)...
6,481
1,985
import torch.nn as nn import torch from utils import Flatten , Unflatten , weights_init , down_conv , up_conv class Net(nn.Module): def __init__(self , num_layers , img_dim , in_chan , act_func , latent_vector_size): super(Net , self).__init__() assert act_func in ("ReLU" , "LeakyReLU") , ...
3,307
1,076
"""This module contains helper functions and utilities for nelpy.""" __all__ = ['spatial_information', 'frange', 'swap_cols', 'swap_rows', 'pairwise', 'is_sorted', 'linear_merge', 'PrettyDuration', 'ddt_asa', 'get_contig...
73,603
22,913
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by app...
23,625
6,395
import pandas as pd import sqlite3 from pandas import DataFrame n_conn = sqlite3.connect('northwind_small.sqlite3') n_curs = n_conn.cursor() # What are the ten most expensive items (per unit price) in the database? query = """ SELECT ProductName, UnitPrice FROM Product ORDER BY UnitPrice DESC LIMIT 10 """ n_curs.ex...
1,815
610
from django.contrib import admin from django.urls import path from .models import BookLoan, Library from .views import CustomView class BookLoanInline(admin.StackedInline): model = BookLoan extra = 1 readonly_fields = ("id", "duration") fields = ( "book", "imprint", "status", ...
1,396
437
import os import datetime import logging import json import uuid from installed_clients.WorkspaceClient import Workspace as Workspace from installed_clients.KBaseReportClient import KBaseReport from installed_clients.annotation_ontology_apiServiceClient import annotation_ontology_api import MergeMetabolicAnnotations....
2,051
616
from models.Model import Player, Group, Session, engine
56
14
from unittest.mock import Mock, patch import numpy as np from game.models import ValuePolicyModel def test_predict(): mask = np.zeros((9, 7, 8), dtype=bool) mask[1, 2, 3] = 1 mask[6, 6, 6] = 1 tensor_mock = Mock() policy_tensor = np.zeros((9, 7, 8), dtype=float) policy_tensor[0, 0, 0] = 10...
1,168
453
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html from scrapy import Item, Field class TweetsItem(Item): # define the fields for your item here like: Author = Field() Title = Field() Create_time = Fie...
653
218
import json import logging import dateutil.parser from datetime import datetime # Our imports from emission.core.get_database import get_profile_db, get_client_db, get_pending_signup_db import emission.clients.common class Client: def __init__(self, clientName): # TODO: write background process to ensure that t...
9,259
2,664
import setuptools setuptools.setup(name='advent_of_code')
57
21
def escapeQuotes(string): return string.replace('"','""');
63
20
#!/usr/bin/env python3 """ sanity check script """ import vpp_papi
68
26
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from __future__ import print_function # Python 2/3 compatibility __doc__ = """ Examples of design matrices specification and and computation (event-related design, FIR design, etc) Re...
2,191
890
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import unittest from collections import defaultdict from typing import List, Optional, Tuple from unittest.mock import ...
36,821
10,676
from app import app from app.database.db import Database if __name__ == "__main__": db = Database() db.create_tables() db.create_admin() app.run(debug=True)
174
59
# -*- coding: utf-8 -*- # flake8: noqa from flask import Flask from flask_themes2 import Themes import config from util.auth import is_admin from util.converter import RegexConverter from util.csrf import generate_csrf_token app = Flask(__name__.split('.')[0]) app.secret_key = config.SECRET_KEY app.url_map.converter...
680
236
""" This is how I'm gonna schedule hours IDEA: import the format example file that I'm using and is saved in the same directory """ import csv import pprint from tkinter import * from tkinter.filedialog import askopenfilename import StringProcessing def selectHoursFile(): Tk().withdraw() # we don't want a fu...
2,028
845
from pathlib import Path from bsmu.bone_age.models import constants IMAGE_DIR = Path('C:/MyDiskBackup/Projects/BoneAge/Data/SmallImages500_NoPads') TRAIN_DATA_CSV_PATH = constants.TRAIN_DATA_CSV_PATH VALID_DATA_CSV_PATH = constants.VALID_DATA_CSV_PATH TEST_DATA_CSV_PATH = constants.TEST_DATA_CSV_PATH BATC...
415
178
from matplotlib import pyplot as plt def nisa_projection(years=30, annual_deposit=80, initial_budget=100): """ This is a function to plot deposit of TSUMITATE NISA Parameters: --------------- years: integer How many years are you going to continue? annual_depoist: integer Annual deposit in...
2,325
903
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. Original C++ source file: math_ops.cc """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from ten...
440,655
180,856
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from uuid import uuid4 from sqlalchemy.dialects.postgresql import ARRAY, UUID from sqlalchemy.ext.declara...
5,215
1,564
import paddle.fluid as fluid def loss(x, y, clip_value=10.0): """Calculate the sigmoid cross entropy with logits for input(x). Args: x: Variable with shape with shape [batch, dim] y: Input label Returns: loss: cross entropy logits: prediction """ logits = fluid.l...
6,257
2,021
from salts_lib.pyjsparser.pyjsparserdata import * REGEXP_SPECIAL_SINGLE = {'\\', '^', '$', '*', '+', '?', '.'} NOT_PATTERN_CHARS = {'^', '$', '\\', '.', '*', '+', '?', '(', ')', '[', ']', '|'} # what about '{', '}', ??? CHAR_CLASS_ESCAPE = {'d', 'D', 's', 'S', 'w', 'W'} CONTROL_ESCAPE_CHARS = {'f', 'n', 'r', 't',...
6,896
2,053
import torch.nn as nn from .basic import * class squeeze_excitation_2d(nn.Module): """Squeeze-and-Excitation Block 2D Args: channel (int): number of input channels. channel_reduction (int): channel squeezing factor. spatial_reduction (int): pooling factor for x,y axes. """ def ...
2,388
832
# pylint: disable=W0201, E1101 """ handle request for markdown pages """ import logging import os import importlib from tornado.web import RequestHandler, HTTPError from tornado.escape import url_escape from ..utils.converter_mixin import ConverterMixin from .access_control import UserMixin from ..utils.nav import nav ...
4,282
1,296
# @Title: 从二叉搜索树到更大和树 (Binary Search Tree to Greater Sum Tree) # @Author: KivenC # @Date: 2019-05-15 19:52:08 # @Runtime: 48 ms # @Memory: 13 MB # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solu...
627
245
import os import option import utility import grapeMenu import grapeGit as git import grapeConfig class Clone(option.Option): """ grape-clone Clones a git repo and configures it for use with git. Usage: grape-clone <url> <path> [--recursive] [--allNested] Arguments: <url> The URL of th...
2,058
593
# -*- coding: utf-8 -*- # Copyright (c) 2016, German Neuroinformatics Node (G-Node) # Achilleas Koutsou <achilleas.k@gmail.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the BSD License. See # LICE...
45,589
14,655
# -*- coding: utf-8 -*- """ Created on Wed Mar 28 11:25:43 2019 @author: Taufik Sutanto taufik@tau-data.id https://tau-data.id ~~Perjanjian Penggunaan Materi & Codes (PPMC) - License:~~ * Modul Python dan gambar-gambar (images) yang digunakan adalah milik dari berbagai sumber sebagaimana yang telah dicantumkan...
5,686
2,013
from __future__ import annotations from copy import deepcopy from dataclasses import dataclass, field from typing import List, Iterator, TypeVar, Union, Any, Generic import pandas as pd from pandas.core.indexing import _LocIndexer from reamber.base.Map import Map from reamber.base.Property import stack_props NoteLi...
5,205
1,561
""" ========= filtering.py ========= This module provides more granular filtering for captures. You can customize your own filters too. """ from __future__ import annotations import re from abc import ABC, ABCMeta, abstractmethod from dataclasses import dataclass from json import JSONEncoder from pathlib import Posi...
24,765
7,021
def main(): # Pass a string to show_mammal_info... show_mammal_info('I am a string') # The show_mammal_info function accepts an object # as an argument, and calls its show_species # and make_sound methods. def show_mammal_info(creature): creature.show_species() creature.make_sound() # Call th...
344
111
""" 4 – Um grande cliente seu sofreu um ataque hacker: o servidor foi sequestrado por um software malicioso, que criptografou todos os discos e pede a digitação de uma senha para a liberação da máquina. E é claro que os criminosos exigem um pagamento para informar a senha. Ao analisar o código do programa deles, porém...
1,307
439
# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam from .util import fetchUrl, getPageContent, getQueryParams def queryNamer(paramName, usePageUrl=False): """Get name from URL query part.""" @classmethod def _namer(cls, ...
1,555
497
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by applica...
66,098
21,609
# -*- coding: utf-8 -*- """ Created on Tue Apr 21 08:09:31 2020 @author: Shivadhar SIngh """ def count_capitals(string): count = 0 for ch in string: if ord(ch) >= 65 and ord(ch) <= 90: count += 1 return count def remove_substring_everywhere(string, substring): ''' Remove all o...
807
280
""" .. _GenerateSpectrum-at-api: **GenerateSpectrum_AT** --- Generates synthetic test spectra. ------------------------------------------------------------- This module defines the GenerateSpectrum_AT class. """ from admit.AT import AT import admit.util.bdp_types as bt from admit.bdp.CubeSpectrum_BDP import ...
12,695
3,973
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- """Tests for Interrogate.""" import socket from grr.client import vfs from grr.lib import action_mocks from grr.lib import aff4 from grr.lib import artifact_test from grr.lib import client_index from grr.lib import config_lib from grr.lib import flags fro...
11,576
3,718
import sys from PySide2.QtWidgets import QGraphicsView, QGraphicsScene, QApplication from PySide2.QtCore import * from PySide2.QtGui import * class GraphicsView(QGraphicsView): def __init__(self, parent=None): super().__init__(parent) # 画布视图尺寸 self.w = 64000.0 self.h = 32000.0 ...
3,595
1,151
from armstrong.dev.tests.utils import ArmstrongTestCase import random def random_range(): # TODO: make sure this can only be generated once return range(random.randint(1000, 2000)) class HatbandTestCase(ArmstrongTestCase): pass class HatbandTestMixin(object): script_code = """ <script type="t...
781
237
import unittest from logics.classes.propositional import Inference, Formula from logics.classes.propositional.proof_theories import NaturalDeductionStep, NaturalDeductionRule from logics.utils.parsers import classical_parser from logics.instances.propositional.natural_deduction import classical_natural_deduction_syste...
7,997
2,660
#!/usr/bin/python # # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # """ Responsible for generating the decoder based on parsed table representations. """ import dgen_opt import dgen_output imp...
10,244
3,469
from __future__ import absolute_import from __future__ import unicode_literals from compose import utils class StreamOutputError(Exception): pass def stream_output(output, stream): is_terminal = hasattr(stream, 'isatty') and stream.isatty() stream = utils.get_output_stream(stream) all_events = [] ...
2,985
920
# Copyright 2012 Anton Beloglazov # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
13,110
4,799
import os from bids_validator import BIDSValidator def validate(bids_directory): print('- Validate: init started.') file_paths = [] result = [] validator = BIDSValidator() for path, dirs, files in os.walk(bids_directory): for filename in files: if filename == '.bidsignore': ...
808
238
from math import cos, sin, degrees, radians, pi from time import time from euclid import Vector2, Point2 from numpy import array as np_array from numpy.linalg import solve as np_solve __author__ = 'tom' def test(): chassis = HoloChassis(wheels=[ HoloChassis.OmniWheel(position=Point2(1, 0), angle=0, radi...
32,090
8,396
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed 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/licenses/LICENSE-2.0 Unless required by applica...
12,467
3,353
COLOR_BLUE = '\033[0;34m' COLOR_GREEN = '\033[0;32m' COLOR_CYAN = '\033[0;36m' COLOR_RED = '\033[0;31m' COLOR_PURPLE = '\033[0;35m' COLOR_BROWN = '\033[0;33m' COLOR_YELLOW = '\033[1;33m' COLOR_GRAY = '\033[1;30m' COLOR_RESET = '\033[0m' FG_COLORS = [ # COLOR_BLUE, COLOR_GREEN, # COLOR_CYAN, # COLOR_R...
696
361
''' 8-5. Cities: Write a function called describe_city() that accepts the name of a city and its country. The function should print a simple sentence, such as Reykjavik is in Iceland. Give the parameter for the country a default value. Call your function for three different cities, at least one of which is not in the...
712
236
from nexus_constructor.geometry import OFFGeometryNoNexus from nexus_constructor.geometry.geometry_loader import load_geometry_from_file_object from nexus_constructor.off_renderer import repeat_shape_over_positions from PySide2.QtGui import QVector3D from io import StringIO def test_GIVEN_off_file_containing_geometry...
12,383
5,533
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'aboutdialog.ui' ## ## Created by: Qt User Interface Compiler version 6.1.1 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###############...
3,140
1,013
import asyncio from contextlib import suppress from unittest import mock import pytest from aiohttp.base_protocol import BaseProtocol async def test_loop() -> None: loop = asyncio.get_event_loop() asyncio.set_event_loop(None) pr = BaseProtocol(loop) assert pr._loop is loop async def test_pause_wri...
4,416
1,531
import PySimpleGUI as sg import os import time import pyautogui class TelaPython: def __init__(self): layout = [ [sg.Text('Usuário',size=(10,0)), sg.Input(size=(20,0),key='usuario')], [sg.Text('Senha',size=(10,0)), sg.Input(size=(20,0),key='senha')], [sg.Text('Número',si...
1,599
644
# Helper code to plot binary losses. # # Eli Bendersky (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': fig, ax = plt.subplots() fig.set_tight_layout(True) xs = np.linspac...
810
333
#!/usr/bin/env python3 ################################ # Development tool # Auto-compiles style.less to style.css # # Requires lessc and less clean css to be installed: # npm install -g less # npm install -g less-plugin-clean-css ################################ import os, time from os import path from math import fl...
1,243
474
# -- encoding: UTF-8 -- import json import uuid from admin_export_action import report from admin_export_action.admin import export_selected_objects from admin_export_action.config import default_config, get_config from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from djang...
10,522
3,173
from pytest_djangoapp import configure_djangoapp_plugin pytest_plugins = configure_djangoapp_plugin( extend_INSTALLED_APPS=[ 'django.contrib.sessions', 'django.contrib.messages', ], extend_MIDDLEWARE=[ 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.m...
367
111
import argparse import numpy as np from sklearn.model_selection import StratifiedKFold import sklearn import cv2 import datetime import mxnet as mx from mxnet import ndarray as nd import pandas as pd from numpy import linalg as line import logging logging.basicConfig( format="%(asctime)s %(message)s", datefmt="%m/...
10,434
3,659
#!/usr/bin/python -t # this script was written to use /etc/nixos/nixpkgs/pkgs/development/python-modules/generic/wrap.sh # which already automates python executable wrapping by extending the PATH/pythonPath # from http://docs.python.org/library/subprocess.html # Warning Invoking the system shell with shell=True can be...
691
227
import base64 import datetime from abc import ABC, abstractmethod from .conditions import AnyValue from .errors import FieldError, FormError __all__ = [ 'Field', 'StringField', 'IntegerField', 'FloatField', 'BooleanField', 'DateTimeField', 'DateField', 'TimeField', 'ListField','SetField', 'EnumField', 'BytesF...
6,645
1,893
from __future__ import annotations from contextlib import contextmanager from contextvars import ContextVar from typing import Optional, Tuple from magicgui.widgets import FunctionGui from pydantic import BaseModel class Source(BaseModel): """An object to store the provenance of a layer. Parameters ---...
3,331
920
import pytest import src.constants as cnst from src.directions import BaseDirection @pytest.fixture def base_direction(): return BaseDirection() def test_init_BaseDirection(base_direction): assert isinstance(base_direction, BaseDirection) def test_current_direction_is(base_direction): assert base_dir...
1,599
584
import numpy as np import cv2 #define a canvas of size 300x300 px, with 3 channels (R,G,B) and data type as 8 bit unsigned integer canvas = np.zeros((300,300,3), dtype ="uint8") #define color #draw a circle #arguments are canvas/image, midpoint, radius, color, thickness(optional) #display in cv2 window green = (0,255...
1,220
488
# -*- coding: utf-8 -*- """ Main Script """ import logging import argh import sarge import tmuxp DEV_LOGGER = logging.getLogger(__name__) def get_current_session(server=None): ''' Seems to be no easy way to grab current attached session in tmuxp so this provides a simple alternative. ''' server ...
1,648
503
"""Additional Django management commands added by nautobot_capacity_metrics plugin."""
87
23
from .to_2darray import to_2darray
35
15
import io from PIL import Image as PILImage from sqlalchemy import Column, ForeignKey, LargeBinary, Index, Integer, String from resources.models.ModelBase import Base class Image(Base): # If this is used then the image is stored in the database image = Column(LargeBinary(length=16777215), default=None) #...
1,520
451
import os import sys import argparse import json import random import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from arch2vec.models.pretraining_nasbench101 import configs from arch2vec.utils import load_json, preprocessing, one_hot_darts from arch2vec.preprocessing.gen_is...
10,288
3,470
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
2,326
678
class Hey: def __init__(jose, name="mours"): jose.name = name def get_name(jose): return jose.name class Person(object): def __init__(self, name, phone): self.name = name self.phone = phone class Teenager(Person): def __init__(self, *args, **kwargs): self.website...
538
194
import enum from typing import Dict, List from odmantic.field import Field from odmantic.model import Model class TreeKind(str, enum.Enum): BIG = "big" SMALL = "small" class TreeModel(Model): name: str = Field(primary_key=True, default="Acacia des montagnes") average_size: float = Field(mongo_name=...
449
153
"""Test AdaNet estimator single graph implementation. Copyright 2018 The AdaNet Authors. All Rights Reserved. Licensed 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 https://www.apache.org/licenses/LI...
115,103
35,114
from seeker.models import Building, Classroom, Time import json import os os.chdir('../data') fileList = os.listdir() #loops through each json file for jsonfile in fileList: #opens the jsonfile and loads the data f = open(jsonfile, 'r') data = f.read() jsondata = json.loads(data) #create the build...
1,473
455
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Slider(Component): """A Slider component. A slider component with support for a target value. Keyword arguments: - id (string; optional): The ID used to identify this component in Dash callbac...
6,729
1,882
"""Utility function for process to raw data """ from .util import ( cvt_pcm2wav, cvt_float2fixed, cvt_char2num, plot_frequency_response, plot_pole_zero_analysis, ) from .fi import fi __all__ = [ "fi", "cvt_pcm2wav", "cvt_float2fixed", "cvt_char2num", "plot_frequency_response", ...
353
144
import pytest from django.core.files import File from django.urls import reverse from freezegun import freeze_time from infra.apps.catalog.tests.helpers.open_catalog import open_catalog pytestmark = pytest.mark.django_db @pytest.fixture(autouse=True) def give_user_edit_rights(user, node): node.admins.add(user) ...
1,192
344
import subprocess, os ue4_win = r"C:\Program Files\Epic Games\UE_4.16" ue4_linux = "/home/qiuwch/workspace/UE416" ue4_mac = '/Users/Shared/Epic Games/UE_4.16' win_uprojects = [ r'C:\qiuwch\workspace\uprojects\UE4RealisticRendering\RealisticRendering.uproject', r'C:\qiuwch\workspace\uprojects\UE4ArchinteriorsV...
3,494
1,250
# Licensed 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
3,515
1,085
""" Django settings for openstack_lease_it project. Generated by 'django-admin startproject' using Django 1.8.7. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ #...
6,639
2,256
# coding=utf-8 # Copyright 2021 RigL Authors. # # Licensed 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/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
3,619
1,106
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class CardLink(Component): """A CardLink component. Use card link to add consistently styled links to your cards. Links can be used like buttons, external links, or internal Dash style links. Keyword arg...
3,643
1,013
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-12-28 23:15 from hanlp.components.taggers.transformers.transformer_tagger_tf import TransformerTaggerTF from tests import cdroot cdroot() tagger = TransformerTaggerTF() save_dir = 'data/model/pos/ctb9_electra_small_zh_epoch_20' tagger.fit('data/pos/ctb9/train.tsv', ...
731
303
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api import landing, login, attendance_confirmation from sql_app.database import orm_connection app = FastAPI(title="Sergio's wedding backend API", description="REST API which serves login, attendance confirmation and other fea...
768
280
from unittest import TestCase from pandora.client import APIClient from pandora.errors import InvalidAuthToken, ParameterMissing from pandora.models.pandora import Station, AdItem, PlaylistItem from pandora.py2compat import Mock, patch from pydora.utils import iterate_forever class TestIterateForever(TestCase): ...
1,800
520
""" Bifurcation point classes. Each class locates and processes bifurcation points. * _BranchPointFold is a version based on BranchPoint location algorithms * BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes) Drew LaMar, March 2006 """ from __future__ import absolu...
28,526
10,835
"""Urls for the marion application""" from django.urls import include, path from rest_framework import routers from .. import views router = routers.DefaultRouter() router.register(r"requests", views.DocumentRequestViewSet) urlpatterns = [ path("", include(router.urls)), ]
283
83
""" PyXLL-Jupyter This package integrated Jupyter notebooks into Microsoft Excel. To install it, first install PyXLL (see https://www.pyxll.com). Briefly, to install PyXLL do the following:: pip install pyxll pyxll install Once PyXLL is installed then installing this package will add a button to the PyXLL ...
1,736
583
from typing import List from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import JsonResponse from django.shortcuts import render from django.urls import reverse_lazy from django.views import generic, View from board.forms import SignUpForm from .co...
5,630
1,608
# -*- coding: utf-8 -*- # Learn more: https://github.com/kennethreitz/setup.py from setuptools import setup, find_packages import os with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() def take_package_name(name): if name.startswith("-e"): return name[...
1,008
384
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-01-15 22:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('wagtailsearchpromotions', '0002_capitalizeverbose'), ('wagtailcore', '0040_page_draft_title...
2,455
746