max_stars_repo_path
stringlengths
4
237
max_stars_repo_name
stringlengths
6
117
max_stars_count
int64
0
95.2k
id
stringlengths
1
7
content
stringlengths
12
593k
input_ids
listlengths
7
549k
InvenTree/build/views.py
mpdgraev/InvenTree
0
152474
""" Django views for interacting with Build objects """ # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext as _ from django.core.exceptions import ValidationError from django.views.generic import DetailView, ListView, UpdateView from django.forms import Hidde...
[ 1, 9995, 13, 29928, 5364, 8386, 363, 16254, 292, 411, 8878, 3618, 13, 15945, 29908, 13, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338...
tests/test_config.py
dstarner/pacyam
3
139474
<gh_stars>1-10 import os import unittest from pacyam.pacyam import Configuration, BuildException REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) class ConfigurationTestCase(unittest.TestCase): test_configs_root = os.path.join(REPO_ROOT, 'tests', 'test-configs') project_root = os.path...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 13, 5215, 443, 27958, 13, 13, 3166, 282, 4135, 314, 29889, 29886, 4135, 314, 1053, 20999, 29892, 8878, 2451, 13, 13, 1525, 13152, 29918, 21289, 353, 289...
plugins/simsimi.py
messense/wechat-bot
115
1617087
#coding=utf-8 """ Copyright (c) 2012 wong2 <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
[ 1, 396, 29883, 3689, 29922, 9420, 29899, 29947, 13, 13, 15945, 29908, 13, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29906, 281, 549, 29906, 3532, 26862, 6227, 6778, 13, 13, 27293, 338, 1244, 1609, 16896, 29892, 3889, 310...
train.py
JanFschr/gangealing
2
132801
<filename>train.py """ GANgealing training script. """ import torch from torch import nn, optim import numpy as np from tqdm import tqdm import json import os from models import Generator, get_stn, DirectionInterpolator, PCA, get_perceptual_loss, kmeans_plusplus, BilinearDownsample, accumulate, requires_grad from mod...
[ 1, 529, 9507, 29958, 14968, 29889, 2272, 13, 15945, 29908, 13, 29954, 2190, 479, 12818, 6694, 2471, 29889, 13, 15945, 29908, 13, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 1053, 302, 29876, 29892, 5994, 13, 5215, 12655, 408, 7442, 13, ...
pygame/PygameSuperMario/source/setup.py
Tom-Li1/py_modules
0
66309
<filename>pygame/PygameSuperMario/source/setup.py<gh_stars>0 import pygame from . import constants as C from . import tools pygame.init() SCREEN = pygame.display.set_mode(C.SCREEN_SIZE) GRAPHICS = tools.load_graphics(r'resources/graphics')
[ 1, 529, 9507, 29958, 2272, 11802, 29914, 29925, 4790, 420, 19111, 29924, 2628, 29914, 4993, 29914, 14669, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 22028, 13, 3166, 869, 1053, 17727, 408, 315, 13, 3166, 869, 105...
unifier/apps/core/migrations/0010_auto_20210225_0227.py
sosolidkk/manga-unifier
6
151580
<reponame>sosolidkk/manga-unifier<gh_stars>1-10 # Generated by Django 3.1.7 on 2021-02-25 02:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0009_auto_20210223_0124'), ] operations = [ migrations.AddField( model_n...
[ 1, 529, 276, 1112, 420, 29958, 29879, 359, 17211, 6859, 29914, 29885, 12686, 29899, 348, 3709, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29889, 29955, 37...
demisto_sdk/commands/lint/linter.py
nericksen/demisto-sdk
0
77399
# STD python packages import copy import hashlib import logging import os import platform import traceback from typing import Any, Dict, List, Optional, Tuple import docker import docker.errors import docker.models.containers import git import requests.exceptions import urllib3.exceptions from packaging.version import...
[ 1, 396, 6850, 29928, 3017, 9741, 13, 5215, 3509, 13, 5215, 6608, 1982, 13, 5215, 12183, 13, 5215, 2897, 13, 5215, 7481, 13, 5215, 9637, 1627, 13, 3166, 19229, 1053, 3139, 29892, 360, 919, 29892, 2391, 29892, 28379, 29892, 12603, 552, ...
giggleliu/tba/lattice/latticelib.py
Lynn-015/Test_01
2
63116
#!/usr/bin/python #-*-coding:utf-8-*- #By <NAME> from numpy import * from lattice import Lattice from bzone import BZone from group import C6vGroup,C4vGroup,C3vGroup __all__=['Honeycomb_Lattice','Square_Lattice','Triangular_Lattice','Chain','construct_lattice','resize_lattice'] class Honeycomb_Lattice(Lat...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 30004, 13, 29937, 29899, 29930, 29899, 29883, 3689, 29901, 9420, 29899, 29947, 29899, 29930, 29899, 30004, 13, 29937, 2059, 529, 5813, 3238, 13, 30004, 13, 3166, 12655, 1053, 334, 30004, 13, 3166, ...
teste.py
EduardoFockinkSilva/python-exercises
0
164734
<gh_stars>0 #test print('==================================') print(' this is just a test ') print('==================================') num = int(input('insert a number: ')) print((num * 5) % 3)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 1688, 13, 13, 2158, 877, 9166, 9166, 1360, 1495, 13, 2158, 877, 4706, 445, 338, 925, 263, 1243, 539, 25710, 13, 2158, 877, 9166, 9166, 1360, 1495, 13, 13, 1949, 353, 938, 298...
src/bbapp/migrations/0004_auto_20190303_1557.py
levinsamuel/baseballdb
0
84901
<reponame>levinsamuel/baseballdb # Generated by Django 2.1.7 on 2019-03-03 23:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bbapp', '0003_fielding'), ] operations = [ migrations.AlterField( model_name='batting', ...
[ 1, 529, 276, 1112, 420, 29958, 2608, 1144, 314, 2491, 29914, 3188, 5521, 430, 29890, 13, 29937, 3251, 630, 491, 15337, 29871, 29906, 29889, 29896, 29889, 29955, 373, 29871, 29906, 29900, 29896, 29929, 29899, 29900, 29941, 29899, 29900, 2994...
tests/test_wps_dummy.py
f-PLT/emu
3
14210
from pywps import Service from pywps.tests import assert_response_success from .common import client_for, get_output from emu.processes.wps_dummy import Dummy def test_wps_dummy(): client = client_for(Service(processes=[Dummy()])) datainputs = "input1=10;input2=2" resp = client.get( service='WPS'...
[ 1, 515, 282, 5693, 567, 1053, 6692, 13, 3166, 282, 5693, 567, 29889, 21150, 1053, 4974, 29918, 5327, 29918, 8698, 13, 13, 3166, 869, 9435, 1053, 3132, 29918, 1454, 29892, 679, 29918, 4905, 13, 3166, 953, 29884, 29889, 5014, 267, 29889, ...
data/split_data_num.py
xiangyue9607/QVE
4
148648
import json import random from argparse import ArgumentParser from numpy.random import default_rng parser = ArgumentParser() parser.add_argument("--in_file", type=str, default="data/NewsQA.train.json",) parser.add_argument("--out_file_dev", type=str, default="dataNewsQA.sample.dev.json") parser.add_argument("...
[ 1, 1053, 4390, 30004, 13, 5215, 4036, 30004, 13, 3166, 1852, 5510, 1053, 23125, 11726, 30004, 13, 3166, 12655, 29889, 8172, 1053, 2322, 29918, 29878, 865, 30004, 13, 30004, 13, 16680, 353, 23125, 11726, 26471, 13, 16680, 29889, 1202, 2991...
code/ch14/chord.py
raionik/Py4Bio
66
65754
<filename>code/ch14/chord.py from bokeh.charts import output_file, Chord from bokeh.io import show import pandas as pd data = pd.read_csv('../../samples/test3.csv') chord_from_df = Chord(data, source='name_x', target='name_y', value='value') output_file('chord.html') show(chord_from_df)
[ 1, 529, 9507, 29958, 401, 29914, 305, 29896, 29946, 29914, 305, 536, 29889, 2272, 13, 3166, 1045, 446, 29882, 29889, 18366, 1053, 1962, 29918, 1445, 29892, 678, 536, 13, 3166, 1045, 446, 29882, 29889, 601, 1053, 1510, 13, 5215, 11701, 4...
var/spack/repos/builtin/packages/perl-ipc-run/package.py
adrianjhpc/spack
2
8105
<reponame>adrianjhpc/spack # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlIpcRun(PerlPackage): """IPC::Run allows you to run and inte...
[ 1, 529, 276, 1112, 420, 29958, 328, 6392, 29926, 29882, 6739, 29914, 1028, 547, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29941, 29899, 29906, 29900, 29896, 29929, 19520, 22469, 5514, 3086, 14223, 29892, 365, 12182, 322, 916, 13, ...
testing/logging/test_formatter.py
christian-steinmeyer/pytest
4
24001
import logging from typing import Any from _pytest._io import TerminalWriter from _pytest.logging import ColoredLevelFormatter def test_coloredlogformatter() -> None: logfmt = "%(filename)-25s %(lineno)4d %(levelname)-8s %(message)s" record = logging.LogRecord( name="dummy", level=logging.IN...
[ 1, 1053, 12183, 13, 3166, 19229, 1053, 3139, 13, 13, 3166, 903, 2272, 1688, 3032, 601, 1053, 29175, 10507, 13, 3166, 903, 2272, 1688, 29889, 21027, 1053, 1530, 4395, 10108, 18522, 13, 13, 13, 1753, 1243, 29918, 2780, 287, 1188, 689, 2...
waffle/defaults.py
PrimarySite/django-waffle
0
199550
from __future__ import unicode_literals COOKIE = 'dwf_%s' TEST_COOKIE = 'dwft_%s' SECURE = True MAX_AGE = 2592000 # 1 month in seconds CACHE_PREFIX = 'waffle:' CACHE_NAME = 'default' FLAG_CACHE_KEY = 'flag:%s' FLAG_USERS_CACHE_KEY = 'flag:%s:users' FLAG_GROUPS_CACHE_KEY = 'flag:%s:groups' ALL_FLAGS_CACHE_KEY = 'fla...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 13, 3217, 8949, 8673, 353, 525, 28012, 29888, 29918, 29995, 29879, 29915, 13, 18267, 29918, 3217, 8949, 8673, 353, 525, 28012, 615, 29918, 29995, 29879, 29915, 13, ...
magda/pipeline/parallel/group/group.py
p-mielniczuk/magda
0
1606451
<filename>magda/pipeline/parallel/group/group.py from __future__ import annotations from typing import List from magda.module.module import Module from magda.pipeline.parallel.group.runtime import GroupRuntime class Group: Runtime = GroupRuntime def __init__( self, name: str, *, rep...
[ 1, 529, 9507, 29958, 11082, 1388, 29914, 13096, 5570, 29914, 23482, 29914, 2972, 29914, 2972, 29889, 2272, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 3166, 19229, 1053, 2391, 13, 13, 3166, 2320, 1388, 29889, 5453, 29889, 5453...
Code/GMM Test Scripts/yellowTest.py
Praveen1098/Gaussian_Mixture_Modelling
0
24954
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import cv2 import numpy as np from matplotlib import pyplot as plt import os import math def gaussian(x, mu, sig): return ((1/(sig*math.sqrt(2*math.pi)))*np.exp(-np.power(x - mu, 2.) / (2 * np.power(sig, 2.)))) x=list(range(0, 256)) g1=gaussian(x,np.arr...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 13850, 29906, 13, 5215, 12655, ...
configs/benchmarks/classification/imagenet/imagenet_per_1/r50_sz224_4xb64_head1_lr0_01_step_ep20.py
Westlake-AI/openmixup
10
108070
<gh_stars>1-10 _base_ = [ 'r50_sz224_4xb64_head1_lr0_1_step_ep20.py', ] # optimizer optimizer = dict(lr=0.01)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29918, 3188, 29918, 353, 518, 13, 1678, 525, 29878, 29945, 29900, 29918, 3616, 29906, 29906, 29946, 29918, 29946, 29916, 29890, 29953, 29946, 29918, 2813, 29896, 29918, ...
test/utilities/test_contains_none_values.py
elifesciences/profiles
2
1607954
import pytest from profiles.utilities import contains_none_values EMPTY_DICT = {} DICT_WITH_NONE_VALUE = {'test': None} DICT_WITH_NESTED_DICTS_WITHOUT_NONE_VALUE = {'test': {'test': {'test': 1}}} DICT_WITH_NESTED_DICTS_WITH_NONE_VALUE = {'test': {'test': {'test': 1}, ...
[ 1, 1053, 11451, 1688, 13, 13, 3166, 28723, 29889, 4422, 1907, 1053, 3743, 29918, 9290, 29918, 5975, 13, 13, 29923, 3580, 15631, 29918, 4571, 1783, 353, 6571, 13, 4571, 1783, 29918, 29956, 13054, 29918, 29940, 12413, 29918, 19143, 353, 111...
mailmerge/smtp_dummy.py
Denzeldeveloper/Python-Auto-MailMerge-
0
29996
"""Dummy SMTP API.""" class SMTP_dummy(object): # pylint: disable=useless-object-inheritance # pylint: disable=invalid-name, no-self-use """Dummy SMTP API.""" # Class variables track member function calls for later checking. msg_from = None msg_to = None msg = None def login(self, login...
[ 1, 9995, 29928, 11770, 13766, 3557, 3450, 1213, 15945, 13, 13, 13, 1990, 13766, 3557, 29918, 29881, 11770, 29898, 3318, 1125, 29871, 396, 282, 2904, 524, 29901, 11262, 29922, 375, 6393, 29899, 3318, 29899, 262, 27069, 749, 13, 1678, 396, ...
phpme/binx/console.py
eghojansu/phpme
0
39822
import os, json, subprocess class Console(): """Run PHP job""" def get_interface_methods(namespace): try: output = Console.run_command('interface-methods', [namespace]) return json.loads(output) except Exception as e: return {} def get_class_methods(n...
[ 1, 1053, 2897, 29892, 4390, 29892, 1014, 5014, 13, 13, 13, 1990, 9405, 7295, 13, 1678, 9995, 6558, 5048, 4982, 15945, 29908, 13, 13, 1678, 822, 679, 29918, 13248, 29918, 23515, 29898, 22377, 1125, 13, 4706, 1018, 29901, 13, 9651, 1962, ...
rllib/agents/dqn/learner_thread.py
firebolt55439/ray
3
74756
<gh_stars>1-10 import queue import threading from ray.rllib.evaluation.metrics import get_learner_stats from ray.rllib.policy.policy import LEARNER_STATS_KEY from ray.rllib.utils.framework import try_import_tf from ray.rllib.utils.timer import TimerStat from ray.rllib.utils.window_stat import WindowStat LEARNER_QUEUE...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 9521, 13, 5215, 3244, 292, 13, 13, 3166, 15570, 29889, 2096, 1982, 29889, 24219, 362, 29889, 2527, 10817, 1053, 679, 29918, 1945, 1089, 29918, 16202, 13, 3166, ...
leetcode/python/359_logger_rate_limiter.py
VVKot/leetcode-solutions
4
194667
class Logger: PRINT_INTERVAL = 10 def __init__(self): self.buckets = [-1 for _ in range(self.PRINT_INTERVAL)] self.sets = [set() for _ in range(self.PRINT_INTERVAL)] def shouldPrintMessage(self, timestamp: int, message: str) -> bool: bucket_index = timestamp % self.PRINT_INTERVAL ...
[ 1, 770, 28468, 29901, 13, 13, 1678, 12089, 10192, 29918, 23845, 8932, 353, 29871, 29896, 29900, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 1125, 13, 4706, 1583, 29889, 2423, 9737, 353, 21069, 29896, 363, 903, 297, 3464, 29898, 1311, 29...
super32assembler/super32assembler/preprocessor/asmdirectives.py
Projektstudium-Mikroprozessor/Super32
1
19108
""" Enum Assembler-Directives """ from enum import Enum, auto class AssemblerDirectives(Enum): START = auto() END = auto() ORG = auto() DEFINE = auto() @classmethod def to_string(cls): return "{START},{END},{ORG},{DEFINE}".format( START=cls.START.name, END=cls...
[ 1, 9995, 13, 16854, 4007, 1590, 1358, 29899, 17392, 3145, 13, 15945, 29908, 13, 13, 3166, 14115, 1053, 1174, 398, 29892, 4469, 13, 13, 13, 1990, 4007, 1590, 1358, 17392, 3145, 29898, 16854, 1125, 13, 1678, 6850, 8322, 353, 4469, 580, ...
FSPSFiles.py
AlexaVillaume/FSPS
1
91898
import os ''' Read an FSPS spec file ''' class specmodel(object): def __init__(self, attr, wave, flux): self.agegyr = round(10**attr[0] / 1e9, 3) self.mass = attr[1] self.lbol = attr[2] self.sfr = attr[3] self.wave = wave self.flux = flux class readspec(o...
[ 1, 1053, 2897, 13, 13, 12008, 13, 6359, 385, 383, 5550, 29903, 1580, 934, 13, 12008, 13, 1990, 1580, 4299, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 12421, 29892, 10742, 29892, 19389, 1125, 13, 4706, 1583, 29889,...
tests/test_properties.py
Kapiche/gcloud-python-orm
1
45505
import six import unittest2 from gcloud.datastore import helpers, key, set_default_dataset_id from gcloudorm import model, properties class TestProperties(unittest2.TestCase): _DATASET_ID = 'DATASET' def setUp(self): set_default_dataset_id(self._DATASET_ID) def testBooleanProperty(self): ...
[ 1, 1053, 4832, 13, 5215, 443, 27958, 29906, 13, 13, 3166, 330, 9274, 29889, 4130, 579, 487, 1053, 1371, 414, 29892, 1820, 29892, 731, 29918, 4381, 29918, 24713, 29918, 333, 13, 13, 3166, 330, 9274, 555, 1053, 1904, 29892, 4426, 13, 13...
mall/celery_tasks/sms/tasks.py
DanaLee1990/meiduo
0
54871
""" 任务: 1、就是普通函数 2、该函数必须通过celery的实例对象的tasks装饰其装饰 3、该任务需要让celery实例对象自动检测 4、任务(函数)需要使用任务名(函数名).delay() 进行调用 """ from libs.yuntongxun.sms import CCP from celery_tasks.main import app @app.task def send_sms_code(mobile,sms_code): ccp = CCP() ccp.send_template_sms(mobile, [sms_code, 5], 1)
[ 1, 29871, 13, 13, 13, 15945, 29908, 13, 31450, 31358, 30383, 13, 268, 29896, 30330, 31238, 30392, 233, 156, 177, 30768, 31629, 30354, 13, 268, 29906, 30330, 31751, 31629, 30354, 31641, 236, 164, 190, 30768, 31138, 2242, 708, 30210, 31195,...
api/resources/__init__.py
wopost/opencmdb
2
101142
from flask import Blueprint from flask_restful import Api from api.resources.demo import DemoResource from api.resources.login import LoginResource api_bp_v1 = Blueprint('bp_v1', __name__) api_v1 = Api(api_bp_v1, '/v1') api_v1.add_resource(DemoResource, '/demo') api_v1.add_resource(LoginResource, '/login') BLUEPRIN...
[ 1, 515, 29784, 1053, 10924, 2158, 13, 3166, 29784, 29918, 5060, 1319, 1053, 29749, 13, 13, 3166, 7882, 29889, 13237, 29889, 17482, 1053, 27819, 6848, 13, 3166, 7882, 29889, 13237, 29889, 7507, 1053, 19130, 6848, 13, 13, 2754, 29918, 25288...
src/simulation/entity.py
rah/optimal-search
0
32758
class Entity(object): ''' An entity has: - energy - position(x,y) - size(length, width) An entity may have a parent entity An entity may have child entities ''' def __init__( self, p, parent=None, children=None): ...
[ 1, 770, 14945, 29898, 3318, 1125, 30004, 13, 1678, 14550, 30004, 13, 1678, 530, 7855, 756, 29901, 30004, 13, 418, 448, 5864, 30004, 13, 418, 448, 2602, 29898, 29916, 29892, 29891, 8443, 13, 418, 448, 2159, 29898, 2848, 29892, 2920, 8443...
mygallary/urls.py
mangowilliam/my_gallary
0
5799
<gh_stars>0 from django.conf import settings from django.conf.urls.static import static from django.conf.urls import url from . import views urlpatterns = [ url('^$', views.gallary,name = 'gallary'), url(r'^search/', views.search_image, name='search_image'), url(r'^details/(\d+)',views.search_location,na...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 5527, 29889, 26045, 29889, 7959, 1053, 2294, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 13, 3166, 869, 1053, 8386, ...
install/app_store/tk-framework-shotgunutils/v5.2.4/python/shotgun_globals/icon.py
JoanAzpeitia/lp_sg
0
59064
<reponame>JoanAzpeitia/lp_sg # Copyright (c) 2015 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you in...
[ 1, 529, 276, 1112, 420, 29958, 10844, 273, 16748, 412, 277, 423, 29914, 22833, 29918, 5311, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 1383, 327, 28798, 18540, 9266, 29889, 13, 29937, 29871, 13, 29937, 8...
Codewars/you're a square/you're a square.py
adoreblvnk/code_solutions
0
26653
from math import isqrt is_square = lambda n: isqrt(n) ** 2 == n if n >= 0 else False def is_square_soln(n): pass print(is_square(-1))
[ 1, 515, 5844, 1053, 338, 29939, 2273, 13, 13, 275, 29918, 17619, 353, 14013, 302, 29901, 338, 29939, 2273, 29898, 29876, 29897, 3579, 29871, 29906, 1275, 302, 565, 302, 6736, 29871, 29900, 1683, 7700, 13, 13, 1753, 338, 29918, 17619, 29...
pylibcamera_src/__init__.py
Jiangshan00001/pylibcamera
0
191614
import os from .cffi_helpers import get_lib_handle _this_path = os.path.dirname(os.path.realpath(__file__)) _library_dir = os.getenv('PI_LIBRARY_DIR') if _library_dir is None: _library_dir = os.path.join(_this_path, 'lib') _include_dir = os.getenv('PI_INCLUDE_DIR') if _include_dir is None: _include_dir = os...
[ 1, 1053, 2897, 13, 3166, 869, 29883, 600, 29875, 29918, 3952, 6774, 1053, 679, 29918, 1982, 29918, 8411, 13, 13, 13, 29918, 1366, 29918, 2084, 353, 2897, 29889, 2084, 29889, 25721, 29898, 359, 29889, 2084, 29889, 6370, 2084, 22168, 1445, ...
boards/models.py
6ba/bbgo
22
113622
<filename>boards/models.py # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib.auth.models import User from django.db import models from django.urls import reverse_lazy from django.utils.translation import ugettext as _ class Board(models.Model): "...
[ 1, 529, 9507, 29958, 24691, 29914, 9794, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 5527, ...
src/pyphoplacecellanalysis/GUI/PyQtPlot/Flowchart/CustomNodes/Mixins/CtrlNodeMixins.py
CommanderPho/pyPhoPlaceCellAnalysis
0
112471
import numpy as np class KeysListAccessingMixin: """ Provides a helper function to get the keys from a variety of different data-types. Used for combo-boxes.""" @classmethod def get_keys_list(cls, data): if isinstance(data, dict): keys = list(data.keys()) elif isinstance(data, l...
[ 1, 1053, 12655, 408, 7442, 13, 13, 1990, 4813, 952, 1293, 6638, 292, 29924, 861, 262, 29901, 13, 1678, 9995, 9133, 2247, 263, 16876, 740, 304, 679, 278, 6611, 515, 263, 12875, 310, 1422, 848, 29899, 8768, 29889, 501, 8485, 363, 419, ...
src/_zkapauthorizer/replicate.py
PrivateStorageio/SecureAccessTokenAuthorizer
1
59898
<reponame>PrivateStorageio/SecureAccessTokenAuthorizer # Copyright 2022 PrivateStorage.io, LLC # # 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...
[ 1, 529, 276, 1112, 420, 29958, 25207, 10486, 601, 29914, 7898, 545, 6638, 6066, 13720, 3950, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29906, 12230, 10486, 29889, 601, 29892, 365, 12182, 13, 29937, 13, 29937, 10413, 21144, 1090, ...
ultracart/models/item_digital_item.py
gstingy/uc_python_api
0
152087
<reponame>gstingy/uc_python_api # coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 OpenAPI spec version: 2.0.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class ItemDig...
[ 1, 529, 276, 1112, 420, 29958, 29887, 303, 292, 29891, 29914, 1682, 29918, 4691, 29918, 2754, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 15945, 29908, 13, 1678, 18514, 336, 25233, 11654, 3450, 478, 29906, 13, 13, 1678, 18514, ...
resources/mstats/__init__.py
mvelezg99/distribuciones-de-probabilidad-python
8
178649
<reponame>mvelezg99/distribuciones-de-probabilidad-python """ mstats: A statistics and probability library for Python ======================================================= """ from mstats import anova from mstats import distributions from mstats import generals from mstats import hypothesis from mstats import interv...
[ 1, 529, 276, 1112, 420, 29958, 29885, 345, 11867, 29887, 29929, 29929, 29914, 5721, 1091, 1682, 2884, 29899, 311, 29899, 22795, 4427, 2368, 29899, 4691, 13, 15945, 29908, 13, 29885, 16202, 29901, 319, 13964, 322, 6976, 3489, 363, 5132, 13...
src/creeps/__init__.py
ppolewicz/screeps-starter-python
0
98283
<reponame>ppolewicz/screeps-starter-python from creeps.builder import Builder from creeps.harvester import Harvester from creeps.miner import Miner from creeps.hauler import Hauler from creeps.scout import Scout from creeps.claimer import Claimer from creeps.upgrader import Upgrader from creeps.settler import Settler f...
[ 1, 529, 276, 1112, 420, 29958, 407, 1772, 29893, 5175, 29914, 1557, 929, 567, 29899, 303, 4254, 29899, 4691, 13, 3166, 907, 8961, 29889, 16409, 1053, 5373, 2700, 13, 3166, 907, 8961, 29889, 8222, 29894, 4156, 1053, 3536, 29894, 4156, 13...
AngularJSLibrary/test/testExecAsyncWithCallback.py
klaasderks/robotframework-angularjs
35
127472
<filename>AngularJSLibrary/test/testExecAsyncWithCallback.py import unittest from selenium import webdriver js_waiting_var=""" var waiting = true; var callback = arguments[arguments.length - 1]; var el = document.querySelector('#nested-ng-app'); angular.element(el).injector().get('$browser'). ...
[ 1, 529, 9507, 29958, 9928, 1070, 8700, 12284, 29914, 1688, 29914, 1688, 5379, 8123, 3047, 10717, 29889, 2272, 13, 5215, 443, 27958, 13, 3166, 18866, 1053, 1856, 9465, 13, 13, 1315, 29918, 10685, 292, 29918, 1707, 13776, 29908, 13, 1678, ...
Code/Testing/AlexNet Testing Code.py
apoorva2398/APS360-Project-Team-1
1
86236
#!/usr/bin/env python # coding: utf-8 # In[7]: import torch import torch.nn as nn from torchvision import datasets, models, transforms import os # In[8]: # Load the test data. data_transforms = { 'test': transforms.Compose([ transforms.Resize([224, 224]), transforms.ToTensor() ]) } data_...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 512, 29961, 29955, 5387, 13, 13, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 3166, 4842, 305, ...
src/plog/mixins.py
Strangemother/project-conceptnet-graphing
0
160338
<reponame>Strangemother/project-conceptnet-graphing from io import StringIO from plog import patterns class MixinBase(object): ''' Base mixin object of all Plog Mixins to inherit''' def __init__(self, *args, **kwargs): pass class PlogFileMixin(MixinBase): ''' A PlogFileMixin is desig...
[ 1, 529, 276, 1112, 420, 29958, 5015, 574, 331, 1228, 29914, 4836, 29899, 535, 1547, 1212, 29899, 4262, 292, 13, 3166, 12013, 1053, 1714, 5971, 30004, 13, 3166, 282, 1188, 1053, 15038, 30004, 13, 30004, 13, 1990, 23478, 262, 5160, 29898,...
gdcv/db/base_match_state.py
the-blue-alliance/gdcv-backend
4
179250
<filename>gdcv/db/base_match_state.py from sqlalchemy import Column, String, Integer, BigInteger, PrimaryKeyConstraint class BaseMatchState(object): __table_args__ = ( PrimaryKeyConstraint('event_key', 'match_id', 'wall_time'), ) event_key = Column(String(16), nullable=False) # Like 2017nyny ...
[ 1, 529, 9507, 29958, 29887, 29881, 11023, 29914, 2585, 29914, 3188, 29918, 4352, 29918, 3859, 29889, 2272, 13, 3166, 4576, 284, 305, 6764, 1053, 12481, 29892, 1714, 29892, 8102, 29892, 7997, 7798, 29892, 28267, 2558, 21529, 13, 13, 1990, ...
trainer.py
Xavierxhq/tableware
0
81347
import os, random, sys, time import torch from os import path as osp from pprint import pprint import numpy as np from torch import nn from torch.backends import cudnn import utils.loss as loss from models import get_baseline_model from utils.meters import AverageMeter from utils.loss import TripletLoss from utils.seri...
[ 1, 1053, 2897, 29892, 4036, 29892, 10876, 29892, 931, 13, 5215, 4842, 305, 13, 3166, 2897, 1053, 2224, 408, 288, 1028, 13, 3166, 282, 2158, 1053, 282, 2158, 13, 5215, 12655, 408, 7442, 13, 3166, 4842, 305, 1053, 302, 29876, 13, 3166, ...
care/facility/migrations/0010_auto_20200321_0758.py
tucosaurus/care
189
1617112
<reponame>tucosaurus/care<filename>care/facility/migrations/0010_auto_20200321_0758.py # Generated by Django 2.2.11 on 2020-03-21 07:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('facility', '0009_auto_20200320_1850'), ] operations = [ ...
[ 1, 529, 276, 1112, 420, 29958, 29873, 1682, 3628, 17142, 29914, 18020, 29966, 9507, 29958, 18020, 29914, 17470, 1793, 29914, 26983, 800, 29914, 29900, 29900, 29896, 29900, 29918, 6921, 29918, 29906, 29900, 29906, 29900, 29900, 29941, 29906, 2...
cepan/_utils.py
kanga333/cepan
1
178845
<filename>cepan/_utils.py from typing import Any, Callable, Dict, Iterator, Optional import boto3 def client( service: str, session: Optional[boto3.Session] = None, ) -> boto3.client: if session is None: return boto3.client(service) return session.client(service) def call_with_pagination( ...
[ 1, 529, 9507, 29958, 346, 8357, 19891, 13239, 29889, 2272, 13, 3166, 19229, 1053, 3139, 29892, 8251, 519, 29892, 360, 919, 29892, 20504, 1061, 29892, 28379, 13, 13, 5215, 289, 3747, 29941, 13, 13, 13, 1753, 3132, 29898, 13, 1678, 2669, ...
src/ai/backend/kernel/git/__init__.py
hephaex/backend.ai-kernel-runner
1
157332
import asyncio import json import logging import os from pathlib import Path import re import subprocess # import pygit2 # from pygit2 import GIT_SORT_TOPOLOGICAL, GIT_SORT_REVERSE from .. import BaseRunner, Terminal log = logging.getLogger() CHILD_ENV = { 'TERM': 'xterm', 'LANG': 'C.UTF-8', 'SHELL': '/...
[ 1, 1053, 408, 948, 3934, 13, 5215, 4390, 13, 5215, 12183, 13, 5215, 2897, 13, 3166, 2224, 1982, 1053, 10802, 13, 5215, 337, 13, 5215, 1014, 5014, 13, 13, 29937, 1053, 19484, 277, 29906, 13, 29937, 515, 19484, 277, 29906, 1053, 402, ...
code/bp_chrono/pull.py
niplav/site
2
170857
<gh_stars>1-10 import urllib2 from bs4 import BeautifulSoup import sys import datetime for year in range(2006, datetime.datetime.now().year+1): yearposts=[] for page in range(1, 1000): url='http://bit-player.org/{}/page/{}'.format(year, page) req=urllib2.Request(url, headers={'User-Agent' : "Firefox"}) try: ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 3142, 1982, 29906, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 13, 5215, 10876, 13, 5215, 12865, 13, 13, 1454, 1629, 297, 3464, 29898, 29906, 29900, 29900...
sdk/python/pulumi_openstack/__init__.py
Frassle/pulumi-openstack
0
68419
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Make subpackages available: __all__ = ['blockstorage', 'compute', 'config', 'database', 'dns', 'firewall', 'identity', 'images', 'loa...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 18610, 399, 25614, 29901, 445, 934, 471, 5759, 491, 278, 27477, 15547, 20839, 689, 16230, 313, 13264, 1885, 29897, 21704, 29889, 18610, 13, 29937, 18610, 1938, 451, 3863, 491, 1361, 652...
src/mem/slicc/ast/PeekStatementAST.py
qianlong4526888/haha
31
143045
# Copyright (c) 1999-2008 <NAME> and <NAME> # Copyright (c) 2009 The Hewlett-Packard Development Company # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retai...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 29871, 29896, 29929, 29929, 29929, 29899, 29906, 29900, 29900, 29947, 529, 5813, 29958, 322, 529, 5813, 29958, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29900, 29929, 450, 379, 8...
image_classification/T2T_ViT/load_pytorch_weights.py
RangeKing/PaddleViT
0
3288
<reponame>RangeKing/PaddleViT<filename>image_classification/T2T_ViT/load_pytorch_weights.py # Copyright (c) 2021 PPViT 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 Licen...
[ 1, 529, 276, 1112, 420, 29958, 6069, 29968, 292, 29914, 29925, 22352, 29963, 29875, 29911, 29966, 9507, 29958, 3027, 29918, 1990, 2450, 29914, 29911, 29906, 29911, 29918, 29963, 29875, 29911, 29914, 1359, 29918, 2272, 7345, 305, 29918, 705, ...
Acquire/Client/_user.py
michellab/BioSimSpaceCloud
2
15502
<filename>Acquire/Client/_user.py import os as _os from enum import Enum as _Enum from datetime import datetime as _datetime import time as _time from Acquire.Service import call_function as _call_function from Acquire.Service import Service as _Service from Acquire.ObjectStore import bytes_to_string as _bytes_to_...
[ 1, 529, 9507, 29958, 10644, 1548, 29914, 4032, 19891, 1792, 29889, 2272, 13, 13, 5215, 2897, 408, 903, 359, 13, 13, 3166, 14115, 1053, 1174, 398, 408, 903, 16854, 13, 13, 3166, 12865, 1053, 12865, 408, 903, 12673, 13, 5215, 931, 408, ...
tests/compilation/request/test_request_compiler.py
ymoch/preacher
3
10668
<reponame>ymoch/preacher<gh_stars>1-10 from unittest.mock import NonCallableMock, sentinel from pytest import mark, raises, fixture from preacher.compilation.argument import Argument from preacher.compilation.error import CompilationError, NamedNode, IndexedNode from preacher.compilation.request.request import Reques...
[ 1, 529, 276, 1112, 420, 29958, 962, 2878, 29914, 1457, 11665, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 443, 27958, 29889, 17640, 1053, 10050, 5594, 519, 18680, 29892, 2665, 262, 295, 13, 13, 3166, 11451...
skpr/inout/frc.py
PhilippPelz/scikit-pr-open
0
1601830
from pyE17.utils import imsave from matplotlib import pyplot as plt import numpy as np from numpy.fft import fft2, ifftshift, fftshift, ifft2, fft, ifft from scipy.ndimage.filters import gaussian_filter1d from .plot import imsave def taperarray(shape, edge): xx, yy = np.mgrid[0:shape[0], 0:shape[1]] xx1 = np.f...
[ 1, 515, 11451, 29923, 29896, 29955, 29889, 13239, 1053, 527, 7620, 13, 3166, 22889, 1053, 11451, 5317, 408, 14770, 13, 5215, 12655, 408, 7442, 13, 3166, 12655, 29889, 600, 29873, 1053, 285, 615, 29906, 29892, 565, 615, 10889, 29892, 285, ...
eval/beat_scores_calc.py
StoneYeY/Beat-Detection
0
61620
#!/usr/bin/env python # encoding: utf-8 """ calc beat score of files copyright: www.mgtv.com """ import os import sys import argparse import numpy as np import traceback import beat_evaluation_toolbox as be def calc_beat_score_of_file(annotation_file, beat_file): #check input params if os.pat...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 8025, 29901, 23616, 29899, 29947, 13, 15945, 29908, 13, 28667, 16646, 8158, 310, 2066, 13, 8552, 1266, 29901, 7821, 29889, 29885, 4141, 29894, 29889, 510, 13, 15945, 29908, 13, 13...
Proxy_network/seq2seqSummariser.py
quilan78/MSC_project
0
1601164
<reponame>quilan78/MSC_project import numpy as np from encoder import * from embedding import * from decoder import * from lstm import * from utils import * import sys sys.path.append('/home/dwt17/MSc_project/neural_sum_1/code/Commons/') sys.path.append('../Commons/') from vocab import * from stateReducer imp...
[ 1, 529, 276, 1112, 420, 29958, 339, 309, 273, 29955, 29947, 29914, 4345, 29907, 29918, 4836, 13, 5215, 12655, 408, 7442, 30004, 13, 3166, 2094, 6119, 1053, 334, 30004, 13, 3166, 23655, 1053, 334, 30004, 13, 3166, 1602, 6119, 1053, 334, ...
src/lesson_mathematics/math_frexp.py
jasonwee/asus-rt-n14uhp-mrtg
3
114105
import math print('{:^7} {:^7} {:^7}'.format('x', 'm', 'e')) print('{:-^7} {:-^7} {:-^7}'.format('', '', '')) for x in [0.1, 0.5, 4.0]: m, e = math.frexp(x) print('{:7.2f} {:7.2f} {:7d}'.format(x, m, e))
[ 1, 1053, 5844, 13, 13, 2158, 877, 25641, 29985, 29955, 29913, 12365, 29985, 29955, 29913, 12365, 29985, 29955, 29913, 4286, 4830, 877, 29916, 742, 525, 29885, 742, 525, 29872, 8785, 13, 2158, 877, 29912, 13018, 29985, 29955, 29913, 12365, ...
apps/plea/exceptions.py
uk-gov-mirror/ministryofjustice.manchester_traffic_offences_pleas
3
173209
""" Exceptions ========== """ class AuditEventException(BaseException): pass
[ 1, 9995, 13, 2451, 29879, 13, 4936, 1360, 13, 15945, 29908, 13, 13, 1990, 8612, 277, 2624, 2451, 29898, 5160, 2451, 1125, 13, 1678, 1209, 13, 13, 13, 2 ]
zenbot/logging/__init__.py
Dmunch04/ZenBot
7
125957
<filename>zenbot/logging/__init__.py<gh_stars>1-10 from .console_logger import ConsoleLogger from .file_logger import FileLogger from .logger import Logger from .logmanager import LogManager
[ 1, 529, 9507, 29958, 2256, 7451, 29914, 21027, 29914, 1649, 2344, 26914, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 869, 11058, 29918, 21707, 1053, 9405, 16363, 13, 3166, 869, 1445, 29918, 21707, 1053...
10_ExtractUniqueSents.py
bjascob/SmartLMVocabs
10
125060
#!/usr/bin/python3 # Copyright 2018 <NAME> # # 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...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29947, 529, 5813, 29958, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, ...
23_Basic_testbench_1.0/testbench.py
raysalemi/python4uvm_examples
1
107834
<gh_stars>1-10 # ## Importing modules # Figure 3: Importing needed resources import cocotb from cocotb.triggers import FallingEdge import random # ### The tinyalu_utils module # All testbenches use tinyalu_utils, so store it in a central # place and add its path to the sys path so we can import it from pathlib impo...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 444, 16032, 292, 10585, 13, 13, 29937, 11479, 29871, 29941, 29901, 16032, 292, 4312, 7788, 13, 5215, 274, 542, 327, 29890, 13, 3166, 274, 542, 327, 29890, 29...
nutsml/examples/pytorch_/mnist/mlp_train.py
maet3608/nuts-ml
39
19605
""" .. module:: cnn_train :synopsis: Example nuts-ml pipeline for training a MLP on MNIST """ import torch import torch.nn.functional as F import torch.nn as nn import torch.optim as optim import nutsflow as nf import nutsml as nm import numpy as np from nutsml.network import PytorchNetwork from utils import downl...
[ 1, 9995, 13, 636, 3883, 1057, 274, 15755, 29918, 14968, 13, 259, 584, 19274, 15368, 29901, 8741, 302, 8842, 29899, 828, 16439, 363, 6694, 263, 341, 13208, 373, 341, 29940, 9047, 13, 15945, 29908, 13, 13, 5215, 4842, 305, 13, 5215, 484...
gcp-cloud-function/send_email/main.py
duongphannamhung/atom-assignments
3
89885
<gh_stars>1-10 def send_email(request): """Responds to any HTTP request. Args: request (flask.Request): HTTP request object. Returns: The response text or any set of values that can be turned into a Response object using `make_response <http://flask.pocoo.org/docs/1.0/api/#fl...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 1753, 3638, 29918, 5269, 29898, 3827, 1125, 13, 1678, 9995, 1666, 2818, 29879, 304, 738, 7331, 2009, 29889, 13, 1678, 826, 3174, 29901, 13, 4706, 2009, 313, 1579, 1...
model_based/svms/test_model_compression.py
vohoaiviet/tag-image-retrieval
50
28844
import sys import os import time from basic.common import ROOT_PATH,checkToSkip,makedirsforfile from basic.util import readImageSet from simpleknn.bigfile import BigFile, StreamFile from basic.annotationtable import readConcepts,readAnnotationsFrom from basic.metric import getScorer if __name__ == "__main__": t...
[ 1, 29871, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 931, 13, 13, 3166, 6996, 29889, 9435, 1053, 16641, 2891, 29918, 10145, 29892, 3198, 1762, 15797, 666, 29892, 29885, 12535, 12935, 1454, 1445, 13, 3166, 6996, 29889, 4422, 1053, 1303, ...
airtableio/api.py
Parapheen/airtableio
0
175213
<reponame>Parapheen/airtableio<filename>airtableio/api.py import logging import os from http import HTTPStatus import aiohttp from .exceptions import AirtableAPIError LOG = logging.getLogger("airtable") API_URL = "https://api.airtable.com/v0/{app_id}/{table_name}" async def make_request( session, token, metho...
[ 1, 529, 276, 1112, 420, 29958, 2177, 481, 354, 264, 29914, 1466, 2371, 601, 29966, 9507, 29958, 1466, 2371, 601, 29914, 2754, 29889, 2272, 13, 5215, 12183, 13, 5215, 2897, 13, 3166, 1732, 1053, 7331, 5709, 13, 13, 5215, 263, 601, 1124...
office365/onedrive/permissions/sharing_invitation.py
theodoriss/Office365-REST-Python-Client
0
193186
from office365.directory.identities.identity_set import IdentitySet from office365.runtime.client_value import ClientValue class SharingInvitation(ClientValue): """The SharingInvitation resource groups invitation-related data items into a single structure.""" def __init__(self, email=None, invited_by=Identit...
[ 1, 515, 8034, 29941, 29953, 29945, 29889, 12322, 29889, 1693, 1907, 29889, 22350, 29918, 842, 1053, 27486, 2697, 13, 3166, 8034, 29941, 29953, 29945, 29889, 15634, 29889, 4645, 29918, 1767, 1053, 12477, 1917, 13, 13, 13, 1990, 1383, 4362, ...
Python/Advanced OOP/Problems/10. Rhombus of stars.py
teodoramilcheva/softuni-software-engineering
0
155320
<gh_stars>0 INCREASE: int = 1 # global namespace DECREASE: int = -1 space = ' ' sign = '* ' def print_rhombus(n: int): # global namespace # fn-in-fn: closure def print_line(i: int, direction: int): # local namespace visible in print_rhombus if i == 0: # i is part of the local namespace of pri...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 1177, 22245, 8127, 29901, 938, 353, 29871, 29896, 396, 5534, 7397, 30004, 13, 2287, 22245, 8127, 29901, 938, 353, 448, 29896, 30004, 13, 3493, 353, 525, 525, 30004, 13, 4530, 353, 525, ...
main.py
angmont/PIA_PC
1
48521
import subprocess import cifrado import enviocorreos import puertos import metadata import webscraping import argparse import os, time import logging logging.basicConfig(filename='app.log', level=logging.INFO) if __name__ == "__main__": description= ("Este script realiza una gran diversa cantidad de tareas " + "...
[ 1, 1053, 1014, 5014, 13, 5215, 274, 361, 26881, 13, 5215, 21061, 542, 272, 276, 359, 13, 5215, 2653, 814, 359, 13, 5215, 15562, 13, 5215, 1856, 1557, 2390, 292, 13, 5215, 1852, 5510, 13, 5215, 2897, 29892, 931, 13, 5215, 12183, 2987...
ch10/myproject_virtualenv/src/django-myproject/myproject/settings/production.py
PacktPublishing/Django-3-Web-Development-Cookbook
159
22663
from ._base import * DEBUG = False WEBSITE_URL = "https://example.com" # without trailing slash MEDIA_URL = f"{WEBSITE_URL}/media/"
[ 1, 515, 869, 29918, 3188, 1053, 334, 13, 13, 18525, 353, 7700, 13, 13, 8851, 9851, 9094, 29918, 4219, 353, 376, 991, 597, 4773, 29889, 510, 29908, 29871, 396, 1728, 25053, 24765, 13, 2303, 4571, 29909, 29918, 4219, 353, 285, 29908, 29...
tests/unit/server/test_get_model_metadata_utils.py
rasapala/OpenVINO-model-server
0
78469
<reponame>rasapala/OpenVINO-model-server<gh_stars>0 # # Copyright (c) 2018 Intel Corporation # # 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/LIC...
[ 1, 529, 276, 1112, 420, 29958, 3417, 481, 2883, 29914, 6585, 29963, 1177, 29949, 29899, 4299, 29899, 2974, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 30004, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896...
faketranslate/metadata.py
HeywoodKing/faketranslate
0
23745
<filename>faketranslate/metadata.py # -*- encoding: utf-8 -*- """ @File : metadata.py @Time : 2020/1/1 @Author : flack @Email : <EMAIL> @ide : PyCharm @project : faketranslate @description : 描述 """
[ 1, 529, 9507, 29958, 29888, 557, 18184, 550, 9632, 29914, 19635, 29889, 2272, 13, 29937, 448, 29930, 29899, 8025, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29992, 2283, 965, 584, 15562, 29889, 2272, 13, 29992, 2...
problems/problem3.py
JakobHavtorn/euler
0
23420
"""Largest prime factor The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? """ import math import numpy as np def largest_prime_factor_naive(number): """ Let the given number be n and let k = 2, 3, 4, 5, ... . For each k, if it is a factor of n ...
[ 1, 9995, 29931, 1191, 342, 6019, 7329, 13, 13, 1576, 6019, 13879, 310, 29871, 29896, 29941, 29896, 29929, 29945, 526, 29871, 29945, 29892, 29871, 29955, 29892, 29871, 29896, 29941, 322, 29871, 29906, 29929, 29889, 13, 5618, 338, 278, 10150,...
apps/utils/errors.py
osw4l/villas-de-san-pablo
0
171375
<filename>apps/utils/errors.py __author__ = 'osw4l' from django.shortcuts import render def error400(request): return render(request, '400.html', status=400) def error403(request): return render(request, '403.html', status=403) def error404(request): return render(request, '404.html', status=404) def...
[ 1, 529, 9507, 29958, 13371, 29914, 13239, 29914, 12523, 29889, 2272, 13, 1649, 8921, 1649, 353, 525, 359, 29893, 29946, 29880, 29915, 13, 13, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 13, 13, 1753, 1059, 29946, 29900, 2...
molior/api/mirror.py
randombenj/molior
0
182905
<gh_stars>0 """ Provides functions for managing aptly mirrors. """ from aiohttp import web import logging from molior.model.build import Build from molior.model.project import Project from molior.model.projectversion import ProjectVersion from molior.model.buildvariant import BuildVariant from molior.molior.utils imp...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 1184, 29894, 2247, 3168, 363, 767, 6751, 10882, 368, 19571, 29879, 29889, 13, 15945, 29908, 13, 3166, 263, 601, 1124, 1053, 1856, 13, 5215, 12183, 13, 13, 3166, 6062, ...
QA system/main.py
yiwen26/NLP_banking_chatbot
2
199785
import os import argparse from gensim.models.keyedvectors import KeyedVectors from preprocess import * from model import * import torch if __name__ == '__main__': # parse command line argument parser = argparse.ArgumentParser() parser.add_argument('--mode', default='training', type=str, ...
[ 1, 1053, 2897, 30004, 13, 5215, 1852, 5510, 30004, 13, 3166, 26943, 326, 29889, 9794, 29889, 1989, 287, 345, 14359, 1053, 7670, 287, 29963, 11142, 30004, 13, 30004, 13, 3166, 758, 5014, 1053, 334, 30004, 13, 3166, 1904, 1053, 334, 30004...
old-code/enzfam-molfunc3.py
rwst/wikidata-molbio
2
84836
import pronto, six, csv from sys import * reader = csv.DictReader(open('goid.tab', 'r'), delimiter='\t') efs = {} for item in reader: go = item.get('goid') iturl = item.get('p') it = iturl[iturl.rfind('/')+1:] git = efs.get(go) if git is None: efs[go] = it else: print('=========...
[ 1, 1053, 544, 10268, 29892, 4832, 29892, 11799, 13, 3166, 10876, 1053, 334, 13, 13, 16950, 353, 11799, 29889, 21533, 6982, 29898, 3150, 877, 1484, 333, 29889, 3891, 742, 525, 29878, 5477, 28552, 2433, 29905, 29873, 1495, 13, 1389, 29879, ...
nekoyume/app.py
lux600/nekoyume
0
80594
<reponame>lux600/nekoyume import os from flask import Flask from raven.contrib.flask import Sentry from nekoyume.models import cache, db from nekoyume.api import api from nekoyume.game import babel, game from nekoyume.tasks import celery def make_celery(app): celery.name = app.import_name celery.conf.update...
[ 1, 529, 276, 1112, 420, 29958, 29880, 1314, 29953, 29900, 29900, 29914, 484, 2901, 29891, 2017, 13, 5215, 2897, 13, 13, 3166, 29784, 1053, 2379, 1278, 13, 3166, 1153, 854, 29889, 21570, 29889, 1579, 1278, 1053, 317, 8269, 13, 13, 3166, ...
dagology/__init__.py
JamesClough/dagology
5
89263
<gh_stars>1-10 from algorithms import * from generators import * from utils import * from metrics import * from matrix import *
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 14009, 1053, 334, 13, 3166, 1176, 4097, 1053, 334, 13, 3166, 3667, 29879, 1053, 334, 13, 3166, 21556, 1053, 334, 13, 3166, 4636, 1053, 334, 13, 2 ]
setup.py
aidan-fitz/opwen-cloudserver
0
124067
<filename>setup.py from setuptools import find_packages from setuptools import setup with open('requirements.txt') as fobj: install_requires = [line.strip() for line in fobj] with open('README.rst') as fobj: long_description = fobj.read() with open('version.txt') as fobj: version = fobj.read().strip()...
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 13, 3166, 731, 21245, 8789, 1053, 1284, 29918, 8318, 13, 3166, 731, 21245, 8789, 1053, 6230, 13, 13, 13, 2541, 1722, 877, 12277, 1860, 29889, 3945, 1495, 408, 285, 5415, 29901, 13, 1678, 2601, ...
setup.py
walwe/autolabel
1
25027
#!/usr/bin/env python from pkg_resources import get_distribution from setuptools import setup, find_packages with open("README.md", "r") as f: long_description = f.read() version = get_distribution("autolabel").version setup( packages=find_packages(), install_requires=[ 'click', 'more-ite...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 3166, 282, 9415, 29918, 13237, 1053, 679, 29918, 27691, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 2541, 1722, 703, 16310, 2303, 29889, 3487, 613, 376, 2...
workflow/scripts/sample_comp_plot.py
snakemake-workflows/dna-seq-neoantigen-prediction
6
120081
import os import glob import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt from pysam import VariantFile variant_df = pd.read_csv(snakemake.input[0], sep='\t').fillna(0.0) variant_df = variant_df[["CHROM", "POS"] + [c for c in variant_df.columns if c.endswith("Freq")]] ## tidy d...
[ 1, 1053, 2897, 13, 5215, 13149, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 409, 370, 1398, 408, 269, 1983, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 282, 952, 314, 1053, 9586, 424, 2283, 13, 1...
LossAug/OpticalFlowLoss.py
gexahedron/pytti
0
30730
<reponame>gexahedron/pytti from pytti.LossAug import MSELoss, LatentLoss import sys, os, gc import argparse import os import cv2 import glob import math, copy import numpy as np import torch from torch import nn from torch.nn import functional as F from PIL import Image import imageio import matplotlib.pyp...
[ 1, 529, 276, 1112, 420, 29958, 5082, 801, 287, 1617, 29914, 2272, 698, 29875, 13, 3166, 11451, 698, 29875, 29889, 29931, 2209, 29909, 688, 1053, 341, 1660, 29931, 2209, 29892, 7053, 296, 29931, 2209, 30004, 13, 5215, 10876, 29892, 2897, ...
pythainlp/corpus/__init__.py
petetanru/pythainlp
1
21571
# -*- coding: utf-8 -*- from __future__ import absolute_import,unicode_literals from pythainlp.tools import get_path_db,get_path_data from tinydb import TinyDB,Query from future.moves.urllib.request import urlopen from tqdm import tqdm import requests import os import math import requests from nltk.corpus import names ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 2523, 356, 29918, 20889, 1338, 13, 3166, 282, 1541, 475, 22833, 29889, 8504, 1053, 679, 29...
paper/figures/make_photometry_table.py
abostroem/asassn15oz
0
39479
<reponame>abostroem/asassn15oz # coding: utf-8 # Creates a table of all imaging observations in the database for paper: # * lc_obs.tex # In[1]: import numpy as np from astropy import table from astropy.table import Table from astropy.time import Time from utilities_az import supernova, connect_to_sndavis ...
[ 1, 529, 276, 1112, 420, 29958, 370, 520, 307, 331, 29914, 294, 465, 29876, 29896, 29945, 2112, 13, 29871, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 6760, 1078, 263, 1591, 310, 599, 6382, 292, 13917, 297, 278, 2566, ...
datasets/few_shot_test_pickle.py
PengWan-Yang/few-shot-transformer
4
23240
<filename>datasets/few_shot_test_pickle.py import pickle # modify validation data _few_shot_pickle_file = 'few_shot_test_data.pkl' _few_shot_file = open(_few_shot_pickle_file, 'rb') data_few_shot = pickle.load(_few_shot_file) _few_shot_pickle_file = 'few_shot_val_data.pkl' _few_shot_file = open(_few_shot_pickle_fi...
[ 1, 529, 9507, 29958, 14538, 1691, 29914, 29888, 809, 29918, 8962, 29918, 1688, 29918, 23945, 280, 29889, 2272, 13, 13, 13, 5215, 5839, 280, 13, 13, 29937, 6623, 8845, 848, 13, 13, 29918, 29888, 809, 29918, 8962, 29918, 23945, 280, 29918...
var/spack/repos/builtin/packages/r-xde/package.py
nkianggiss/spack
3
168095
<filename>var/spack/repos/builtin/packages/r-xde/package.py # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RXde(RPackage): """Multi-level...
[ 1, 529, 9507, 29958, 1707, 29914, 1028, 547, 29914, 276, 1066, 29914, 16145, 262, 29914, 8318, 29914, 29878, 29899, 29916, 311, 29914, 5113, 29889, 2272, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29941, 29899, 29906, 29900, 29896, ...
tests/test_engagement_query_set.py
Asday/keiyakusha
2
1605076
from datetime import date, timedelta import pytest from engagements.models import Engagement from factories.auth import UserFactory from factories.clients import ClientFactory from factories.engagements import EngagementFactory @pytest.mark.django_db def test_active_at(): user = UserFactory() client_a = Cl...
[ 1, 515, 12865, 1053, 2635, 29892, 5335, 287, 2554, 13, 13, 5215, 11451, 1688, 13, 13, 3166, 27010, 4110, 29889, 9794, 1053, 2201, 5049, 13, 3166, 2114, 3842, 29889, 5150, 1053, 4911, 5126, 13, 3166, 2114, 3842, 29889, 11303, 1237, 1053,...
lib/utils/__init__.py
jwyang/C3Net.pytorch
43
19886
from .verbo import *
[ 1, 515, 869, 369, 833, 1053, 334, 13, 2 ]
training/rootnav2/accuracy/__init__.py
robail-yasrab/6-RootNav-2.0
23
187358
<reponame>robail-yasrab/6-RootNav-2.0<gh_stars>10-100 from .nms import nonmaximalsuppression, rrtree, evaluate_points
[ 1, 529, 276, 1112, 420, 29958, 13716, 737, 29899, 29891, 294, 4201, 29914, 29953, 29899, 10303, 22107, 29899, 29906, 29889, 29900, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 869, 29876, 1516, ...
utils/experiment_utils.py
samuelfneumann/RLControl
0
119224
#!/usr/bin/env python3 import pickle import os import numpy as np def get_sweep_parameters(parameters, env_config, index): """ Gets the parameters for the hyperparameter sweep defined by the index. Each hyperparameter setting has a specific index number, and this function will get the appropriate par...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 5215, 5839, 280, 13, 5215, 2897, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 679, 29918, 29879, 705, 1022, 29918, 16744, 29898, 16744, 29892, 8829, 29918, 2917, 29892, 2380, 1...
lib/ExtraFM.py
KanHatakeyama/anneal_project2
0
98890
<reponame>KanHatakeyama/anneal_project2 from scipy.sparse import csr_matrix from pyfm import pylibfm import numpy as np from numba import jit from ScaleRegressor import ScaleRegressor default_model = pylibfm.FM(task="regression", num_iter=30, initial_learning_rate=10**-3, num_factors=10, ...
[ 1, 529, 276, 1112, 420, 29958, 29968, 273, 29950, 532, 1989, 3304, 29914, 11276, 284, 29918, 4836, 29906, 13, 3166, 4560, 2272, 29889, 29879, 5510, 1053, 5939, 29878, 29918, 5344, 13, 3166, 11451, 24826, 1053, 11451, 492, 1635, 29885, 13,...
test/swe2d/test_steady_state_basin_mms.py
jrper/thetis
0
193326
<reponame>jrper/thetis """ MMS test for 2d shallow water equations. - setup functions define analytical expressions for fields and boundary conditions. Expressions were derived with sympy. - run function runs the MMS setup with a single mesh resolution, returning L2 errors. - run_convergence runs a scaling test, c...
[ 1, 529, 276, 1112, 420, 29958, 29926, 29878, 546, 29914, 386, 300, 275, 13, 15945, 29908, 13, 29924, 4345, 1243, 363, 29871, 29906, 29881, 4091, 340, 4094, 10693, 29889, 13, 13, 29899, 6230, 3168, 4529, 16114, 936, 12241, 363, 4235, 322...
tests/py_tests/test_faint/test_color.py
lukas-ke/faint-graphics-editor
10
190551
<filename>tests/py_tests/test_faint/test_color.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest import os from faint import Color class TestColor(unittest.TestCase): """Tests the faint.Color class""" def test_color(self): # Default construction self.assertEqual(...
[ 1, 529, 9507, 29958, 21150, 29914, 2272, 29918, 21150, 29914, 1688, 29918, 29888, 2365, 29914, 1688, 29918, 2780, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 30004, 13, 29937, 448, 29930, 29899, 14137, 29901, ...
transtool/checks/missing_translations.py
MarcinOrlowski/prop-tool
1
194480
<reponame>MarcinOrlowski/prop-tool<gh_stars>1-10 """ # trans-tool # The translation files checker and syncing tool. # # Copyright ©2021 <NAME> <mail [@] <EMAIL>> # https://github.com/MarcinOrlowski/trans-tool/ # """ from typing import Dict from transtool.decorators.overrides import overrides from transtool.report.grou...
[ 1, 529, 276, 1112, 420, 29958, 29924, 5666, 262, 2816, 677, 2574, 29914, 7728, 29899, 10154, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 13, 29937, 1301, 29899, 10154, 13, 29937, 450, 13962, 2066, ...
coordinator/api/management/commands/fakedata.py
kids-first/kf-api-release-coordinator
2
80688
<gh_stars>1-10 from django.core.management.base import BaseCommand from coordinator.api.factories.release import ReleaseFactory class Command(BaseCommand): help = "Pre-populate the database with fake data" def handle(self, *args, **options): ReleaseFactory.create_batch(100) self.stdout.write(...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 13, 3166, 6615, 1061, 29889, 2754, 29889, 17028, 3842, 29889, 14096, 1053, 23708, 5126, 13, 13, ...
desafiosCursoEmVideo/ex018.py
gomesGabriel/Pythonicos
1
156246
<filename>desafiosCursoEmVideo/ex018.py import math n1 = float(input('Digite um valor: ')) print('O seno: {:.5f}' .format(math.sin(math.radians(n1)))) print('O cosseno: {:.5f}' .format(math.cos(math.radians(n1)))) print('O tg: {:.5f}' .format(math.tan(math.radians(n1))))
[ 1, 529, 9507, 29958, 2783, 2142, 2363, 23902, 578, 6026, 15167, 29914, 735, 29900, 29896, 29947, 29889, 2272, 13, 5215, 5844, 13, 29876, 29896, 353, 5785, 29898, 2080, 877, 14991, 568, 1922, 16497, 29901, 525, 876, 13, 2158, 877, 29949, ...
updates.py
knowledgetechnologyuhh/hipss
0
16314
import torch import numpy as np import torch.nn.functional as F from torch.nn.utils.clip_grad import clip_grad_norm_ from mpi_utils.mpi_utils import sync_grads def update_entropy(alpha, log_alpha, target_entropy, log_pi, alpha_optim, cfg): if cfg.automatic_entropy_tuning: alpha_loss = -(log_alpha * (log_p...
[ 1, 1053, 4842, 305, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 29889, 15755, 29889, 2220, 284, 408, 383, 13, 3166, 4842, 305, 29889, 15755, 29889, 13239, 29889, 24049, 29918, 5105, 1053, 20102, 29918, 5105, 29918, 12324, 29918, 13, ...
search/urls.py
MubongwoNdasi/pms
0
1607683
from django.urls import path from search import views app_name = 'search' urlpatterns = [ path('', views.DrugSearchListView.as_view(), name="list"), path('pharmacist_list', views.PharmacistSearchListView.as_view(), name="pharmacist_list"), ]
[ 1, 515, 9557, 29889, 26045, 1053, 2224, 13, 3166, 2740, 1053, 8386, 13, 13, 13, 932, 29918, 978, 353, 525, 4478, 29915, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, 2224, 877, 742, 8386, 29889, 29928, 11124, 7974, 15660, 29889, 294...
test.py
zhanghanduo/calc_new
1
41595
#!/usr/bin/env python3 import layers import cv2 from os.path import join import numpy as np # import tensorflow as tf import Augmentor vw = 320 vh = 320 class Augment: def __init__(self): self.w = 2 * 640 self.h = 2 * 480 self.canvas = np.zeros((self.h, self.w, 3), dtype=np.uint8) d...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 15359, 13, 5215, 13850, 29906, 13, 3166, 2897, 29889, 2084, 1053, 5988, 13, 5215, 12655, 408, 7442, 13, 29937, 1053, 26110, 408, 15886, 13, 5215, 22333, 358, 272, 13, ...