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
f750951c50361ff4970990d72352d09eb6fa1297
6,449
py
Python
configs/gn+ws/mask_rcnn_x101_32x4d_fpn_gn_ws_2x.py
Lechatelia/own_mmdet
eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f
[ "Apache-2.0" ]
24
2021-10-14T03:28:28.000Z
2022-03-29T09:30:04.000Z
configs/gn+ws/mask_rcnn_x101_32x4d_fpn_gn_ws_2x.py
Lechatelia/own_mmdet
eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f
[ "Apache-2.0" ]
4
2021-12-14T15:04:49.000Z
2022-02-19T09:54:42.000Z
configs/gn+ws/mask_rcnn_x101_32x4d_fpn_gn_ws_2x.py
Lechatelia/own_mmdet
eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f
[ "Apache-2.0" ]
4
2021-10-31T11:23:06.000Z
2021-12-17T06:38:50.000Z
# model settings conv_cfg = dict(type='ConvWS') norm_cfg = dict(type='GN', num_groups=32, requires_grad=True) model = dict( type='MaskRCNN', pretrained='open-mmlab://jhu/resnext101_32x4d_gn_ws', backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=4, ...
31.612745
79
0.575903
conv_cfg = dict(type='ConvWS') norm_cfg = dict(type='GN', num_groups=32, requires_grad=True) model = dict( type='MaskRCNN', pretrained='open-mmlab://jhu/resnext101_32x4d_gn_ws', backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=4, num_stages=4,...
true
true
f750952299f3ce2942b0325e5b345b7e89f255f3
2,711
py
Python
unittests/decl_string_tester.py
mamoll/pygccxml
91348c3e56ec891496c00bc7771e647791114c7d
[ "BSL-1.0" ]
null
null
null
unittests/decl_string_tester.py
mamoll/pygccxml
91348c3e56ec891496c00bc7771e647791114c7d
[ "BSL-1.0" ]
null
null
null
unittests/decl_string_tester.py
mamoll/pygccxml
91348c3e56ec891496c00bc7771e647791114c7d
[ "BSL-1.0" ]
null
null
null
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt import os import unittest import autoconfig import parser_test_case from pygccxml import parser from pygccxml import declarat...
33.060976
76
0.65474
import os import unittest import autoconfig import parser_test_case from pygccxml import parser from pygccxml import declarations class tester_t(parser_test_case.parser_test_case_t): COMPILATION_MODE = parser.COMPILATION_MODE.ALL_AT_ONCE global_ns = None def __init__(self, *args): parser_test_ca...
true
true
f750973aff3fef38c91b05f68337424789503882
30,441
py
Python
conans/test/unittests/client/generators/cmake_test.py
noverby/conan
5e560ce806be28416e80544e767b1bca3f48d11e
[ "MIT" ]
null
null
null
conans/test/unittests/client/generators/cmake_test.py
noverby/conan
5e560ce806be28416e80544e767b1bca3f48d11e
[ "MIT" ]
null
null
null
conans/test/unittests/client/generators/cmake_test.py
noverby/conan
5e560ce806be28416e80544e767b1bca3f48d11e
[ "MIT" ]
null
null
null
import os import re import unittest import six from conans.client.build.cmake_flags import CMakeDefinitionsBuilder from conans.client.conf import default_settings_yml from conans.client.generators import CMakeFindPackageGenerator, CMakeFindPackageMultiGenerator from conans.client.generators.cmake import CMakeGenerato...
50.735
107
0.683946
import os import re import unittest import six from conans.client.build.cmake_flags import CMakeDefinitionsBuilder from conans.client.conf import default_settings_yml from conans.client.generators import CMakeFindPackageGenerator, CMakeFindPackageMultiGenerator from conans.client.generators.cmake import CMakeGenerato...
true
true
f75097798b0cc0a2ec6170085d879acf60213bf1
279
py
Python
config.py
dgoodwin208/6.883ProteinDocking
07f33688bd5ec8c5ae6d4d4113eb64b0f2352e9e
[ "Apache-2.0" ]
91
2020-04-04T21:00:23.000Z
2022-03-25T06:15:11.000Z
config.py
dgoodwin208/6.883ProteinDocking
07f33688bd5ec8c5ae6d4d4113eb64b0f2352e9e
[ "Apache-2.0" ]
4
2020-05-03T02:42:26.000Z
2021-08-16T14:32:05.000Z
config.py
dgoodwin208/6.883ProteinDocking
07f33688bd5ec8c5ae6d4d4113eb64b0f2352e9e
[ "Apache-2.0" ]
23
2020-05-03T00:35:18.000Z
2022-03-30T10:20:39.000Z
import torch device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu') FloatTensor = torch.cuda.FloatTensor if torch.cuda.is_available() else torch.FloatTensor LongTensor = torch.cuda.LongTensor if torch.cuda.is_available() else torch.LongTensor
46.5
88
0.781362
import torch device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu') FloatTensor = torch.cuda.FloatTensor if torch.cuda.is_available() else torch.FloatTensor LongTensor = torch.cuda.LongTensor if torch.cuda.is_available() else torch.LongTensor
true
true
f750988b612c66128a7487df73d237b1073dd47b
1,634
py
Python
aaem/components/biomass_wood/config.py
gina-alaska/alaska_affordable_energy_model
96fed0137152985ce280ea37e0affec131e3087f
[ "MIT-feh" ]
1
2022-01-23T07:18:36.000Z
2022-01-23T07:18:36.000Z
aaem/components/biomass_wood/config.py
gina-alaska/alaska_affordable_energy_model
96fed0137152985ce280ea37e0affec131e3087f
[ "MIT-feh" ]
5
2017-07-14T21:56:46.000Z
2017-07-14T21:59:15.000Z
aaem/components/biomass_wood/config.py
gina-alaska/alaska_affordable_energy_model
96fed0137152985ce280ea37e0affec131e3087f
[ "MIT-feh" ]
2
2020-04-28T18:12:55.000Z
2021-01-13T01:56:57.000Z
""" Biomass Pellet configuration ---------------------------- Contains biomass wood configuration info for community data yaml file, and other set-up requirements """ import aaem.components.biomass_base as bmb from copy import deepcopy COMPONENT_NAME = "Biomass for Heat (Cordwood)" IMPORT = "IMPORT" UNKNOWN =...
28.666667
86
0.665239
import aaem.components.biomass_base as bmb from copy import deepcopy COMPONENT_NAME = "Biomass for Heat (Cordwood)" IMPORT = "IMPORT" UNKNOWN = "UNKNOWN" order = deepcopy(bmb.order) order += [ "hours of storage for peak", "percent at max output", "cordwood system efficiency", "hours operation per cord...
true
true
f75098ae2c8f6222c7cde52b8e28c5f2ea2f8e92
9,342
py
Python
src/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
ilya-fedin/tg_owt
d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589
[ "BSD-3-Clause" ]
162
2018-04-03T04:29:45.000Z
2022-03-30T19:41:27.000Z
src/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
ilya-fedin/tg_owt
d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589
[ "BSD-3-Clause" ]
59
2020-08-24T09:17:42.000Z
2022-02-27T23:33:37.000Z
src/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py
ilya-fedin/tg_owt
d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589
[ "BSD-3-Clause" ]
62
2018-03-26T08:38:18.000Z
2022-03-14T02:29:47.000Z
# Copyright (c) 2017 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. All contributing project au...
44.913462
86
0.665489
import os import shutil import tempfile import unittest import numpy as np import scipy.io from . import test_data_generation from . import test_data_generation_factory from . import signal_processing class TestTestDataGenerators(unittest.TestCase): def setUp(self): self._base_output_path = tempfile.m...
true
true
f75099d1b689009935638ab59bc4bb43f748dd84
493
py
Python
createwikimap.py
Srinivas-R/BLINK
51a932319cc2446843f7907054d9726a3376210e
[ "MIT" ]
null
null
null
createwikimap.py
Srinivas-R/BLINK
51a932319cc2446843f7907054d9726a3376210e
[ "MIT" ]
null
null
null
createwikimap.py
Srinivas-R/BLINK
51a932319cc2446843f7907054d9726a3376210e
[ "MIT" ]
null
null
null
import pickle from tqdm import tqdm wikimap = {} with open('page_ids_en.ttl', 'r') as filein: for line in tqdm(filein, total=16000000): try: res, _, pageID, _ = [x.strip() for x in line.split(' ')] pageID = int(pageID.split('^^')[0].strip('"')) res = res.strip('<').strip('>') wikimap[pageID] = res exc...
24.65
64
0.657201
import pickle from tqdm import tqdm wikimap = {} with open('page_ids_en.ttl', 'r') as filein: for line in tqdm(filein, total=16000000): try: res, _, pageID, _ = [x.strip() for x in line.split(' ')] pageID = int(pageID.split('^^')[0].strip('"')) res = res.strip('<').strip('>') wikimap[pageID] = res exc...
true
true
f7509aafc05dc1c45b4269da0c599121e828c69c
6,318
py
Python
scripts/update_python.py
akoeplinger/emsdk
96d7ee1c5e2ce349add36df6165ba7b4ffc96b77
[ "MIT" ]
null
null
null
scripts/update_python.py
akoeplinger/emsdk
96d7ee1c5e2ce349add36df6165ba7b4ffc96b77
[ "MIT" ]
null
null
null
scripts/update_python.py
akoeplinger/emsdk
96d7ee1c5e2ce349add36df6165ba7b4ffc96b77
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2020 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. """Updates the python binaries that we cache s...
40.5
181
0.666667
import glob import multiprocessing import os import platform import urllib.request import shutil import subprocess import sys from subprocess import check_call version = '3.9.2' major_minor_version = '.'.join(version.split('.')[:2]) base = 'https://www.python.org/ftp/python/%s/' % version revision = '1' pywin32_ve...
true
true
f7509b648f003ddaaca1b1446b932c15bc5003ef
327
py
Python
accounts/api/urls.py
SubhanRzayev/E-commerce-Tmart
239218397f4ee55ab6ae4ef1798fbc83bc7d1159
[ "MIT" ]
2
2021-08-13T14:23:34.000Z
2021-09-18T08:48:29.000Z
accounts/api/urls.py
SubhanRzayev/E-commerce-Tmart
239218397f4ee55ab6ae4ef1798fbc83bc7d1159
[ "MIT" ]
null
null
null
accounts/api/urls.py
SubhanRzayev/E-commerce-Tmart
239218397f4ee55ab6ae4ef1798fbc83bc7d1159
[ "MIT" ]
null
null
null
from rest_framework import views from accounts.api.views import * from django.urls import path from . import views from accounts.api.serializer import RegisterSerializer from accounts.views import RegisterView app_name = 'accounts' urlpatterns = [ path('register/', views.RegisterView.as_view(), name='auth_register...
25.153846
74
0.788991
from rest_framework import views from accounts.api.views import * from django.urls import path from . import views from accounts.api.serializer import RegisterSerializer from accounts.views import RegisterView app_name = 'accounts' urlpatterns = [ path('register/', views.RegisterView.as_view(), name='auth_register...
true
true
f7509c18049a6df28d17d6c90c30957cf294958c
6,934
py
Python
official/cv/ssd/src/box_utils.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/ssd/src/box_utils.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/ssd/src/box_utils.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
40.549708
117
0.602682
import math import itertools as it import numpy as np from src.model_utils.config import config from .anchor_generator import GridAnchorGenerator class GeneratDefaultBoxes(): def __init__(self): fk = config.img_shape[0] / np.array(config.steps) scale_rate = (config.max_scale - config.min_scale) ...
true
true
f7509d786edbaea5116819d280816e3353cd61cd
685
py
Python
tests/test_worker_registration.py
agronick/aiogear
9e4f2d18f05d91daea9e48de18b2d38f4811589f
[ "MIT" ]
null
null
null
tests/test_worker_registration.py
agronick/aiogear
9e4f2d18f05d91daea9e48de18b2d38f4811589f
[ "MIT" ]
null
null
null
tests/test_worker_registration.py
agronick/aiogear
9e4f2d18f05d91daea9e48de18b2d38f4811589f
[ "MIT" ]
null
null
null
import pytest from unittest import mock from aiogear import Worker, PacketType @pytest.fixture(scope='function') def worker(): w = Worker() w.get_task = mock.Mock() return w def test_register_function_connected(worker): written = None def _write(data): nonlocal written written =...
23.62069
82
0.725547
import pytest from unittest import mock from aiogear import Worker, PacketType @pytest.fixture(scope='function') def worker(): w = Worker() w.get_task = mock.Mock() return w def test_register_function_connected(worker): written = None def _write(data): nonlocal written written =...
true
true
f7509f903f49a97e3b7ba172f876bf3f261dc59c
410
py
Python
balanced_news/news/models.py
thearyanmittal/news-aggregator
2debf78a23a882040c88bcc1facf0087ee30fbfb
[ "Apache-2.0" ]
null
null
null
balanced_news/news/models.py
thearyanmittal/news-aggregator
2debf78a23a882040c88bcc1facf0087ee30fbfb
[ "Apache-2.0" ]
null
null
null
balanced_news/news/models.py
thearyanmittal/news-aggregator
2debf78a23a882040c88bcc1facf0087ee30fbfb
[ "Apache-2.0" ]
null
null
null
from django.db import models # Create your models here. class Headline(models.Model): leaning = models.TextField() title = models.TextField() img = models.URLField(max_length=1000, null=True, blank=True) mins_ago = models.IntegerField(default=1440) time_ago_str = models.TextField(null=True) url...
31.538462
65
0.714634
from django.db import models class Headline(models.Model): leaning = models.TextField() title = models.TextField() img = models.URLField(max_length=1000, null=True, blank=True) mins_ago = models.IntegerField(default=1440) time_ago_str = models.TextField(null=True) url = models.URLField(max_leng...
true
true
f7509fb1dace0eaf94060d0a0c5c7f5df324cd9f
12,761
py
Python
Fission Reactor Simulator/ReactorGridBlock.py
Klayto-235/GT6-Simulators
f0a1d543945ce5a10f6692e5988a0f2d5638ad90
[ "MIT" ]
1
2022-03-08T08:32:59.000Z
2022-03-08T08:32:59.000Z
Fission Reactor Simulator/ReactorGridBlock.py
Klayto-235/GT6-Simulators
f0a1d543945ce5a10f6692e5988a0f2d5638ad90
[ "MIT" ]
1
2022-02-26T16:22:59.000Z
2022-02-28T09:31:12.000Z
Fission Reactor Simulator/ReactorGridBlock.py
Klayto-235/GT6-Simulators
f0a1d543945ce5a10f6692e5988a0f2d5638ad90
[ "MIT" ]
1
2022-01-02T19:55:39.000Z
2022-01-02T19:55:39.000Z
from json import JSONEncoder from PyQt6.QtGui import QIcon, QResizeEvent, QColor, QPainter, QBrush, QPen, QFont from PyQt6.QtWidgets import QGridLayout, QWidget, QSizePolicy, QHBoxLayout, QGraphicsSimpleTextItem, QGraphicsRectItem, QGraphicsPixmapItem from PyQt6.QtCore import Qt, pyqtSignal, QSize, QRect from Assets i...
25.884381
139
0.69156
from json import JSONEncoder from PyQt6.QtGui import QIcon, QResizeEvent, QColor, QPainter, QBrush, QPen, QFont from PyQt6.QtWidgets import QGridLayout, QWidget, QSizePolicy, QHBoxLayout, QGraphicsSimpleTextItem, QGraphicsRectItem, QGraphicsPixmapItem from PyQt6.QtCore import Qt, pyqtSignal, QSize, QRect from Assets i...
true
true
f7509fb7b4924a4dfb4d3d634da9e473b442044a
5,356
py
Python
tests/test_index_functions.py
octoenergy/elasticsearch-django
4b24fb8bb5729d950c8d56740f8be0acb336de1c
[ "MIT" ]
87
2016-09-04T06:24:04.000Z
2022-02-01T01:43:47.000Z
tests/test_index_functions.py
octoenergy/elasticsearch-django
4b24fb8bb5729d950c8d56740f8be0acb336de1c
[ "MIT" ]
28
2016-12-09T22:48:29.000Z
2021-04-07T11:01:34.000Z
tests/test_index_functions.py
octoenergy/elasticsearch-django
4b24fb8bb5729d950c8d56740f8be0acb336de1c
[ "MIT" ]
31
2017-01-30T12:31:47.000Z
2022-02-03T17:22:03.000Z
from unittest import mock from django.test import TestCase from elasticsearch_django.index import ( _prune_hit, bulk_actions, create_index, delete_index, prune_index, scan_index, update_index, ) from .models import ExampleModel, ExampleModelManager class IndexFunctionTests(TestCase): ...
38.811594
86
0.677931
from unittest import mock from django.test import TestCase from elasticsearch_django.index import ( _prune_hit, bulk_actions, create_index, delete_index, prune_index, scan_index, update_index, ) from .models import ExampleModel, ExampleModelManager class IndexFunctionTests(TestCase): ...
true
true
f7509fbe1a8a9ca7f94dfc7b49ef0f8b62166fc7
760
py
Python
stories/migrations/0003_post.py
HamdaniFatima/WorkShop
cd3f682a4d8b1abf3b03f80e96aa50ce5b48062e
[ "bzip2-1.0.6" ]
null
null
null
stories/migrations/0003_post.py
HamdaniFatima/WorkShop
cd3f682a4d8b1abf3b03f80e96aa50ce5b48062e
[ "bzip2-1.0.6" ]
null
null
null
stories/migrations/0003_post.py
HamdaniFatima/WorkShop
cd3f682a4d8b1abf3b03f80e96aa50ce5b48062e
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.2.7 on 2020-02-28 15:12 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('stories', '0002_auto_20200228_1551'), ] operations = [ migrations.CreateModel( name='Post', ...
30.4
114
0.593421
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('stories', '0002_auto_20200228_1551'), ] operations = [ migrations.CreateModel( name='Post', fields=[ ('id', models.Auto...
true
true
f7509ffbcfbda0f4eef2ccb95c26447fb3c1708a
12,852
py
Python
pybrain/rl/environments/flexcube/objects3d.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
2,208
2015-01-02T02:14:41.000Z
2022-03-31T04:45:46.000Z
pybrain/rl/environments/flexcube/objects3d.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
91
2015-01-08T16:42:16.000Z
2021-12-11T19:16:35.000Z
pybrain/rl/environments/flexcube/objects3d.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
786
2015-01-02T15:18:20.000Z
2022-02-23T23:42:40.000Z
__author__ = 'Frank Sehnke, sehnke@in.tum.de' from OpenGL.GL import * #@UnusedWildImport from OpenGL.GLU import * #@UnusedWildImport import math class Objects3D: def normale(self, vect, centerOfGrav): vect = self.dumpVect(vect, 1.0 / 4.0) norm = self.difVect(vect, centerOfGrav) norm = sel...
37.68915
212
0.459462
__author__ = 'Frank Sehnke, sehnke@in.tum.de' from OpenGL.GL import * from OpenGL.GLU import * import math class Objects3D: def normale(self, vect, centerOfGrav): vect = self.dumpVect(vect, 1.0 / 4.0) norm = self.difVect(vect, centerOfGrav) norm = self.normVect(norm, 1.0) return n...
true
true
f750a1f534c66f365d470c8fb06cfe71db5ac961
154
py
Python
76-100/76.py
tonyyzy/ProjectEuler
f52de2f931ebd4df2020e32d12062866b1586e72
[ "MIT" ]
null
null
null
76-100/76.py
tonyyzy/ProjectEuler
f52de2f931ebd4df2020e32d12062866b1586e72
[ "MIT" ]
null
null
null
76-100/76.py
tonyyzy/ProjectEuler
f52de2f931ebd4df2020e32d12062866b1586e72
[ "MIT" ]
null
null
null
coins = list(range(2, 100)) result = [1] * 101 for i in coins: for j in range(i, 101): result[j] += result[j - i] print(result[-1])
17.111111
35
0.525974
coins = list(range(2, 100)) result = [1] * 101 for i in coins: for j in range(i, 101): result[j] += result[j - i] print(result[-1])
true
true
f750a2acd3a748313bc0bd93b1408dc9acbdd95e
6,347
py
Python
testscripts/RDKB/component/HAL_DHCP/TS_dhcp_stub_hal_get_gw.py
cablelabs/tools-tdkb
1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/HAL_DHCP/TS_dhcp_stub_hal_get_gw.py
cablelabs/tools-tdkb
1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/HAL_DHCP/TS_dhcp_stub_hal_get_gw.py
cablelabs/tools-tdkb
1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69
[ "Apache-2.0" ]
null
null
null
# =========================================================================== # Copyright 2016-2017 Intel Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at #http://www.apache.o...
42.885135
125
0.651962
''' <?xml version="1.0" encoding="UTF-8"?><xml> <id/> <version>42</version> <name>TS_dhcp_stub_hal_get_gw</name> <primitive_test_id/> <primitive_test_name>dhcp_stub_hal_get_ert_gw</primitive_test_name> <primitive_test_version>1</primitive_test_version> <status>FREE</status> <synopsis>To validate HAL...
false
true
f750a3c410aaad73628606876447347eea05d803
554
py
Python
5primer.py
Dmitry-15/4_laba
fa1124722fb9bc2c5f273cb96ac108bc2d99c48e
[ "MIT" ]
null
null
null
5primer.py
Dmitry-15/4_laba
fa1124722fb9bc2c5f273cb96ac108bc2d99c48e
[ "MIT" ]
null
null
null
5primer.py
Dmitry-15/4_laba
fa1124722fb9bc2c5f273cb96ac108bc2d99c48e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math import sys # Постоянная Эйлера. EULER = 0.5772156649015328606 # Точность вычислений. EPS = 1e-10 if __name__ == '__main__': x = float(input("Value of x? ")) if x == 0: print("Illegal value of x", file=sys.stderr) exit(1) a = x ...
19.103448
60
0.534296
import math import sys EULER = 0.5772156649015328606 EPS = 1e-10 if __name__ == '__main__': x = float(input("Value of x? ")) if x == 0: print("Illegal value of x", file=sys.stderr) exit(1) a = x s, k = a, 1 while math.fabs(a) > EPS: a *= x * k / (k + 1) ** 2 ...
true
true
f750a4617dc11c73f561287ca522f4d0cf99cd06
1,407
py
Python
tests/bugs/core_3964_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_3964_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_3964_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_3964 # title: It is not possible to create a ddl-trigger with "any DDL statement" clause # decription: # tracker_id: CORE-3964 # min_versions: ['3.0'] # versions: 3.0 # qmid: None import pytest from firebird.qa import db_factory, isql_act, Action # ver...
24.684211
90
0.620469
import pytest from firebird.qa import db_factory, isql_act, Action substitutions_1 = [] init_script_1 = """""" db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1) test_script_1 = """ create table mp$modified_tables (relation_name char(31)); commit; create index mp$modified_tables_idx ...
true
true
f750a4f69e49e58017bf204553f4d0b58cef573c
7,679
py
Python
bui/layout/window.py
vincent-lg/bui
a4a783fea2269190fb69c6491a4bc91753ccc580
[ "BSD-3-Clause" ]
3
2019-07-28T17:15:56.000Z
2020-04-12T14:05:12.000Z
bui/layout/window.py
vincent-lg/bui
a4a783fea2269190fb69c6491a4bc91753ccc580
[ "BSD-3-Clause" ]
null
null
null
bui/layout/window.py
vincent-lg/bui
a4a783fea2269190fb69c6491a4bc91753ccc580
[ "BSD-3-Clause" ]
null
null
null
"""Window object represented in layout.""" from bui.layout.attr import Attr from bui.layout.component import Component class Window(Component): """ Window tag, to encompass widget tags. The window tag is the only one that is truly mandatory in your [layout](../overview.md). It is used to describe b...
47.401235
75
0.454356
from bui.layout.attr import Attr from bui.layout.component import Component class Window(Component): tag_name = "window" attrs = ( Attr("title", help="The window title"), Attr("width", help="The window width", type=int, default=6), Attr("height", help="The window height", type=int, d...
true
true
f750a533f7af3f07fc4e1e37cc7f38d743e09c73
741
py
Python
liesl/streams/__init__.py
jasmainak/pyliesl
9f71ba36ec0c4f28f61c0d744cc975728ecc8bf0
[ "MIT" ]
null
null
null
liesl/streams/__init__.py
jasmainak/pyliesl
9f71ba36ec0c4f28f61c0d744cc975728ecc8bf0
[ "MIT" ]
null
null
null
liesl/streams/__init__.py
jasmainak/pyliesl
9f71ba36ec0c4f28f61c0d744cc975728ecc8bf0
[ "MIT" ]
null
null
null
""" localhost --------- """ import socket, os def get_localhostname(): if os.environ.get("DOC", False) == True: return socket.gethostname() else: return "sphinx-doc" def get_ip_adress(): if os.environ.get("DOC", False) == True: try: s = socket.socket(socket.AF_INET, s...
20.583333
64
0.582996
import socket, os def get_localhostname(): if os.environ.get("DOC", False) == True: return socket.gethostname() else: return "sphinx-doc" def get_ip_adress(): if os.environ.get("DOC", False) == True: try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ...
true
true
f750a68096feb6ac6aedf32e9d3359fe722314d1
2,065
py
Python
main.py
danieloconell/elopy
58e14df2d4039d0acc6b70a3c43fd6bb560de0ca
[ "MIT" ]
null
null
null
main.py
danieloconell/elopy
58e14df2d4039d0acc6b70a3c43fd6bb560de0ca
[ "MIT" ]
null
null
null
main.py
danieloconell/elopy
58e14df2d4039d0acc6b70a3c43fd6bb560de0ca
[ "MIT" ]
null
null
null
from brain import Brain from flask import Flask, request, render_template from pprint import pprint app = Flask(__name__, static_url_path="/static") brain = Brain() @app.route("/") def index(): return render_template("index.html") @app.route("/team/<string:team>") def team(team): return render_template("te...
32.265625
102
0.63632
from brain import Brain from flask import Flask, request, render_template from pprint import pprint app = Flask(__name__, static_url_path="/static") brain = Brain() @app.route("/") def index(): return render_template("index.html") @app.route("/team/<string:team>") def team(team): return render_template("te...
true
true
f750a6826d14d3ebca54c1c58c3e1a3f2ff0fcb3
9,405
py
Python
nlabel/io/carenero/common.py
poke1024/nlabel
359972d2f71ba7ed2ee097fffcdc750e225d3784
[ "MIT" ]
1
2022-02-03T11:28:24.000Z
2022-02-03T11:28:24.000Z
nlabel/io/carenero/common.py
poke1024/nlabel
359972d2f71ba7ed2ee097fffcdc750e225d3784
[ "MIT" ]
null
null
null
nlabel/io/carenero/common.py
poke1024/nlabel
359972d2f71ba7ed2ee097fffcdc750e225d3784
[ "MIT" ]
null
null
null
import functools import logging import traceback import hashlib import orjson from cached_property import cached_property from nlabel.io.json.group import split_data from nlabel.nlp.nlp import NLP as CoreNLP, Text as CoreText from nlabel.io.carenero.schema import Tagger, Tag, TagInstances, Text, Vector, Vectors, Resu...
26.794872
112
0.604253
import functools import logging import traceback import hashlib import orjson from cached_property import cached_property from nlabel.io.json.group import split_data from nlabel.nlp.nlp import NLP as CoreNLP, Text as CoreText from nlabel.io.carenero.schema import Tagger, Tag, TagInstances, Text, Vector, Vectors, Resu...
true
true
f750a69277996c05065d08cd07a8380a1b524407
32,600
py
Python
hyperopt/tpe.py
alexandgu/hyperopt
cfb7a89d689ea8102b90b20daefd390d526eb131
[ "BSD-3-Clause" ]
null
null
null
hyperopt/tpe.py
alexandgu/hyperopt
cfb7a89d689ea8102b90b20daefd390d526eb131
[ "BSD-3-Clause" ]
null
null
null
hyperopt/tpe.py
alexandgu/hyperopt
cfb7a89d689ea8102b90b20daefd390d526eb131
[ "BSD-3-Clause" ]
null
null
null
""" Graphical model (GM)-based optimization algorithm using Theano """ from past.utils import old_div import logging import time import numpy as np from scipy.special import erf from . import pyll from .pyll import scope from .pyll.stochastic import implicit_stochastic from .base import miscs_to_idxs_vals from .base ...
33.993743
93
0.623374
from past.utils import old_div import logging import time import numpy as np from scipy.special import erf from . import pyll from .pyll import scope from .pyll.stochastic import implicit_stochastic from .base import miscs_to_idxs_vals from .base import miscs_update_idxs_vals from . import rand __authors__ = "James...
true
true
f750a69fcc152f9288f1e8dfd15a585af42ec0ae
156
py
Python
python_scripts/treelength.py
Neo-sage/UniveralMarkerEMTW
ad4e21076282ef485e2c9cc11eb10a2dddc09b2e
[ "MIT" ]
null
null
null
python_scripts/treelength.py
Neo-sage/UniveralMarkerEMTW
ad4e21076282ef485e2c9cc11eb10a2dddc09b2e
[ "MIT" ]
null
null
null
python_scripts/treelength.py
Neo-sage/UniveralMarkerEMTW
ad4e21076282ef485e2c9cc11eb10a2dddc09b2e
[ "MIT" ]
null
null
null
from ete3 import Tree import sys t = Tree(sys.argv[1]) total = 0 for node in t.traverse(): loop = node.dist total = total + loop print (total)
11.142857
25
0.641026
from ete3 import Tree import sys t = Tree(sys.argv[1]) total = 0 for node in t.traverse(): loop = node.dist total = total + loop print (total)
true
true
f750a8066ee6274ed134475984c2cc7ef2465ed5
677
py
Python
Exercise-ManningStrickler/get_h.py
jayarammaddikunta/python
449960fabc7d77a60d8f20f909e0e9650ad308a4
[ "MIT" ]
null
null
null
Exercise-ManningStrickler/get_h.py
jayarammaddikunta/python
449960fabc7d77a60d8f20f909e0e9650ad308a4
[ "MIT" ]
null
null
null
Exercise-ManningStrickler/get_h.py
jayarammaddikunta/python
449960fabc7d77a60d8f20f909e0e9650ad308a4
[ "MIT" ]
null
null
null
import math as m def calc_discharge(b, h, k_st, m_bank, S): A=h*0*5*(b+B). P=b+2h(m**2+1)**0*5. Q=k_st*R(2**3).sqrt*A return Q def interpolate_h(*args, **kwargs): pass m if __name__ == '__main__': # input parameters Q = 15.5 # discharge in (m3/s) b = 5.1 ...
25.074074
71
0.556869
import math as m def calc_discharge(b, h, k_st, m_bank, S): A=h*0*5*(b+B). P=b+2h(m**2+1)**0*5. Q=k_st*R(2**3).sqrt*A return Q def interpolate_h(*args, **kwargs): pass m if __name__ == '__main__': Q = 15.5 b = 5.1 m_bank = 2.5 k_st = 20 ...
false
true
f750a8ac6258f3fe5aeb9c650dfb06f23df79105
1,189
py
Python
backend/services/task_annotations_service.py
majdal/tasking-manager
eb8851a9095a3eb64c531946fd7ee81cb95ccc8d
[ "BSD-2-Clause" ]
421
2017-02-16T15:02:51.000Z
2022-03-06T07:12:14.000Z
backend/services/task_annotations_service.py
majdal/tasking-manager
eb8851a9095a3eb64c531946fd7ee81cb95ccc8d
[ "BSD-2-Clause" ]
3,143
2017-02-14T16:47:25.000Z
2022-03-30T11:25:20.000Z
backend/services/task_annotations_service.py
majdal/tasking-manager
eb8851a9095a3eb64c531946fd7ee81cb95ccc8d
[ "BSD-2-Clause" ]
280
2017-04-06T19:51:32.000Z
2022-03-16T09:21:27.000Z
from backend.models.postgis.task_annotation import TaskAnnotation from backend.models.postgis.utils import timestamp class TaskAnnotationsService: @staticmethod def add_or_update_annotation(annotation, project_id, annotation_type): """ Takes a json of tasks and create annotations in the db """ ...
34.970588
74
0.651808
from backend.models.postgis.task_annotation import TaskAnnotation from backend.models.postgis.utils import timestamp class TaskAnnotationsService: @staticmethod def add_or_update_annotation(annotation, project_id, annotation_type): task_id = annotation["taskId"] source = annotation.get("annot...
true
true
f750a9572fb026b06c09e4a58553ef59b4b2a2be
35,867
py
Python
pylib/cqlshlib/test/test_cqlsh_output.py
jkzilla/cassandra
4078626dddbc8bb620e306e9c12e2c5189db3746
[ "Apache-2.0" ]
1
2019-07-24T01:03:40.000Z
2019-07-24T01:03:40.000Z
pylib/cqlshlib/test/test_cqlsh_output.py
jkzilla/cassandra
4078626dddbc8bb620e306e9c12e2c5189db3746
[ "Apache-2.0" ]
null
null
null
pylib/cqlshlib/test/test_cqlsh_output.py
jkzilla/cassandra
4078626dddbc8bb620e306e9c12e2c5189db3746
[ "Apache-2.0" ]
1
2019-07-12T10:40:28.000Z
2019-07-12T10:40:28.000Z
# 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...
37.914376
195
0.507402
from __future__ import unicode_literals, with_statement import locale import os import re import subprocess import sys import unittest from .basecase import (BaseTestCase, TEST_HOST, TEST_PORT, at_a_time, cqlsh, cqlshlog, dedent) from .cassconnect import (cassandra_cursor, create_db, get_keys...
true
true
f750aa2a4501e4c5cf204ac4156affc1a7735fe9
8,521
py
Python
build/PureCloudPlatformClientV2/models/async_user_details_query.py
cjohnson-ctl/platform-client-sdk-python
38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100
[ "MIT" ]
10
2019-02-22T00:27:08.000Z
2021-09-12T23:23:44.000Z
libs/PureCloudPlatformClientV2/models/async_user_details_query.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
5
2018-06-07T08:32:00.000Z
2021-07-28T17:37:26.000Z
libs/PureCloudPlatformClientV2/models/async_user_details_query.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
6
2020-04-09T17:43:07.000Z
2022-02-17T08:48:05.000Z
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
32.154717
271
0.621406
from pprint import pformat from six import iteritems import re import json from ..utils import sanitize_for_serialization class AsyncUserDetailsQuery(object): def __init__(self): self.swagger_types = { 'interval': 'str', 'user_filters': 'list[UserDetailQueryFilter]', ...
true
true
f750aa968dd3c4be2351662875ee920d2f24f312
9,992
py
Python
angr/analyses/reaching_definitions/engine_ail.py
zeroSteiner/angr
90dc141c424a2c4dba5551baf0beac7ce7bc8837
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/reaching_definitions/engine_ail.py
zeroSteiner/angr
90dc141c424a2c4dba5551baf0beac7ce7bc8837
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/reaching_definitions/engine_ail.py
zeroSteiner/angr
90dc141c424a2c4dba5551baf0beac7ce7bc8837
[ "BSD-2-Clause" ]
null
null
null
import logging import ailment from .atoms import Register, Tmp, MemoryLocation from .constants import OP_BEFORE, OP_AFTER from .dataset import DataSet from .external_codeloc import ExternalCodeLocation from .undefined import Undefined from ...engines.light import SimEngineLightAIL, RegisterOffset, SpOffset from ...er...
38.430769
117
0.621497
import logging import ailment from .atoms import Register, Tmp, MemoryLocation from .constants import OP_BEFORE, OP_AFTER from .dataset import DataSet from .external_codeloc import ExternalCodeLocation from .undefined import Undefined from ...engines.light import SimEngineLightAIL, RegisterOffset, SpOffset from ...er...
true
true
f750ad28e9de1ce2cbe84e6662a4c5ed178a4f8a
7,889
py
Python
docs/conf.py
nestauk/gateway_to_cookies
ff7c20f003448e21060b202c41a8cd76946e1d39
[ "MIT" ]
null
null
null
docs/conf.py
nestauk/gateway_to_cookies
ff7c20f003448e21060b202c41a8cd76946e1d39
[ "MIT" ]
3
2019-04-04T13:13:37.000Z
2019-04-04T14:27:10.000Z
docs/conf.py
nestauk/gateway_to_cookies
ff7c20f003448e21060b202c41a8cd76946e1d39
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Gateway to Cookies documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration va...
32.2
97
0.708962
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Gateway to Cookies' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1' # The full version, includ...
false
true
f750ad5f030166a208167f69ec09d8cf190d5ee8
8,279
py
Python
uncertainty_eval/datasets/other.py
selflein/nn_uncertainty_eval
94a7f2292b8db2197cd55fab57324d438618ae06
[ "Apache-2.0" ]
1
2022-02-10T16:59:47.000Z
2022-02-10T16:59:47.000Z
uncertainty_eval/datasets/other.py
selflein/nn_uncertainty_eval
94a7f2292b8db2197cd55fab57324d438618ae06
[ "Apache-2.0" ]
null
null
null
uncertainty_eval/datasets/other.py
selflein/nn_uncertainty_eval
94a7f2292b8db2197cd55fab57324d438618ae06
[ "Apache-2.0" ]
null
null
null
import json from pathlib import Path import torch import numpy as np from PIL import Image from torch.utils.data import Dataset, TensorDataset from tfrecord.torch.dataset import MultiTFRecordDataset from uncertainty_eval.datasets.tabular import TabularDataset from uncertainty_eval.datasets.abstract_datasplit import D...
31.12406
165
0.6473
import json from pathlib import Path import torch import numpy as np from PIL import Image from torch.utils.data import Dataset, TensorDataset from tfrecord.torch.dataset import MultiTFRecordDataset from uncertainty_eval.datasets.tabular import TabularDataset from uncertainty_eval.datasets.abstract_datasplit import D...
true
true
f750ae2c95efac0fcc0186d2845baee907d4607a
23,495
py
Python
src/search.py
Matin-Ardestani/Digikala-Search
889549ce1b278e227bba6281632eb80071e0e792
[ "MIT" ]
17
2021-09-09T11:48:21.000Z
2022-03-29T05:21:31.000Z
src/search.py
Matin-Ardestani/Digikala-Search
889549ce1b278e227bba6281632eb80071e0e792
[ "MIT" ]
null
null
null
src/search.py
Matin-Ardestani/Digikala-Search
889549ce1b278e227bba6281632eb80071e0e792
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'UI.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui, Qt...
50.310493
149
0.625622
from PyQt5 import QtCore, QtGui, QtWidgets import requests from bs4 import BeautifulSoup import urllib.request from pathlib import Path path = str(Path.cwd()) class Ui_SearchWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(500, 476) ...
true
true
f750af0bb6fba3d873e21b1878a7086ae59a7b02
97,264
py
Python
flair/embeddings.py
atakanokan/flair
d33aa6a007384da76d1ae8dac6f4fc61bc652ce7
[ "MIT" ]
null
null
null
flair/embeddings.py
atakanokan/flair
d33aa6a007384da76d1ae8dac6f4fc61bc652ce7
[ "MIT" ]
null
null
null
flair/embeddings.py
atakanokan/flair
d33aa6a007384da76d1ae8dac6f4fc61bc652ce7
[ "MIT" ]
null
null
null
import os import re import logging from abc import abstractmethod from collections import Counter from pathlib import Path from typing import List, Union, Dict import gensim import numpy as np import torch from bpemb import BPEmb from deprecated import deprecated from pytorch_pretrained_bert import ( BertTokenize...
40.375259
165
0.610123
import os import re import logging from abc import abstractmethod from collections import Counter from pathlib import Path from typing import List, Union, Dict import gensim import numpy as np import torch from bpemb import BPEmb from deprecated import deprecated from pytorch_pretrained_bert import ( BertTokenize...
true
true
f750af649b8f06e794929151fa9400fbbb9202ea
1,520
py
Python
designate/tests/unit/sink/test_service.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
145
2015-01-02T09:35:53.000Z
2021-12-14T17:03:53.000Z
designate/tests/unit/sink/test_service.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
6
2015-03-15T00:22:27.000Z
2019-12-16T09:37:38.000Z
designate/tests/unit/sink/test_service.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
109
2015-01-13T16:47:34.000Z
2021-03-15T13:18:48.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
34.545455
75
0.726316
from unittest import mock import designate.rpc from designate.sink import service import designate.tests from designate.tests import fixtures class TestSinkService(designate.tests.TestCase): def setUp(self): super(TestSinkService, self).setUp() self.stdlog = fixtures.StandardLogging() sel...
true
true
f750b1d779dd980be4564068ac0ed2991ff95c0d
1,779
py
Python
setup.py
WildflowerSchools/wf-classroom-simulation
7a7bb8ba5919b9a0db5516dda2b7d9118d9c59bf
[ "MIT" ]
null
null
null
setup.py
WildflowerSchools/wf-classroom-simulation
7a7bb8ba5919b9a0db5516dda2b7d9118d9c59bf
[ "MIT" ]
null
null
null
setup.py
WildflowerSchools/wf-classroom-simulation
7a7bb8ba5919b9a0db5516dda2b7d9118d9c59bf
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages import re import os BASEDIR = os.path.dirname(os.path.abspath(__file__)) VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''') def get_version(): init = open(os.path.join(BASEDIR, 'classroom_simulation', '__init__.py')).read() return VERSION_RE.search(ini...
26.954545
84
0.655987
from setuptools import setup, find_packages import re import os BASEDIR = os.path.dirname(os.path.abspath(__file__)) VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''') def get_version(): init = open(os.path.join(BASEDIR, 'classroom_simulation', '__init__.py')).read() return VERSION_RE.search(ini...
true
true
f750b3667cec26d714354b71edeec328332ae206
35,528
py
Python
pandas/tests/indexing/test_indexing.py
mavismonica/pandas
dbdc55c9d59f25589d58cc60247af193f06c3c66
[ "BSD-3-Clause" ]
2
2020-11-30T11:20:33.000Z
2020-12-02T07:46:43.000Z
pandas/tests/indexing/test_indexing.py
mavismonica/pandas
dbdc55c9d59f25589d58cc60247af193f06c3c66
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/indexing/test_indexing.py
mavismonica/pandas
dbdc55c9d59f25589d58cc60247af193f06c3c66
[ "BSD-3-Clause" ]
null
null
null
""" test fancy indexing & misc """ from datetime import datetime import re import weakref import numpy as np import pytest from pandas.core.dtypes.common import is_float_dtype, is_integer_dtype import pandas as pd from pandas import DataFrame, Index, NaT, Series import pandas._testing as tm from pandas.core.indexin...
33.803996
88
0.522517
from datetime import datetime import re import weakref import numpy as np import pytest from pandas.core.dtypes.common import is_float_dtype, is_integer_dtype import pandas as pd from pandas import DataFrame, Index, NaT, Series import pandas._testing as tm from pandas.core.indexing import maybe_numeric_slice, non_r...
true
true
f750b589c2d5a33d4d98a2a3bba451a15eb263fe
1,498
py
Python
PGGAN/hyun_experiments.py
jinhan814/PyTorch-GAN-Study
c63ed1bbcbc663d3267671d8ded4ed13c766b738
[ "MIT" ]
null
null
null
PGGAN/hyun_experiments.py
jinhan814/PyTorch-GAN-Study
c63ed1bbcbc663d3267671d8ded4ed13c766b738
[ "MIT" ]
null
null
null
PGGAN/hyun_experiments.py
jinhan814/PyTorch-GAN-Study
c63ed1bbcbc663d3267671d8ded4ed13c766b738
[ "MIT" ]
1
2022-02-16T06:15:40.000Z
2022-02-16T06:15:40.000Z
import torch ## 실험용 입니다 # x = torch.randint(10,size=(1,4,2,2)) # print(x) # print(x.size()) # factor =2 # s = x.size() # x = x.view(-1, s[1], s[2], 1, s[3], 1) # (-1, 4, 2, 1, 2, 1) # print(x.size()) # # print(x) # x = x.expand(-1, s[1], s[2], factor, s[3], factor) # (-1, 4,2,2,2,2) # print(x.size()) # # print(x) # ...
24.966667
74
0.537383
import torch import torch import torchvision import cv2 x = torch.randint(10,size=(8,8,3)) x= torch.transpose(x,(2,0,1)) print(x.size()) x = torchvision.transforms.Resize((4,4))(x) x = torch.transpose(x,(1,2,0)) print(x.size())
true
true
f750b5a370455dde6ecab742ca2fdfcad2dbe8bf
7,584
py
Python
zaza/openstack/charm_tests/nova/tests.py
rodrigogansobarbieri/zaza-openstack-tests
60f9bafb0a7ea17ebbfaa70811c94a87bc981705
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
zaza/openstack/charm_tests/nova/tests.py
rodrigogansobarbieri/zaza-openstack-tests
60f9bafb0a7ea17ebbfaa70811c94a87bc981705
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
zaza/openstack/charm_tests/nova/tests.py
rodrigogansobarbieri/zaza-openstack-tests
60f9bafb0a7ea17ebbfaa70811c94a87bc981705
[ "ECL-2.0", "Apache-2.0" ]
1
2020-04-30T10:55:34.000Z
2020-04-30T10:55:34.000Z
#!/usr/bin/env python3 # Copyright 2018 Canonical Ltd. # # 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 la...
38.497462
77
0.612078
import logging import unittest import zaza.model import zaza.openstack.charm_tests.test_utils as test_utils import zaza.openstack.charm_tests.glance.setup as glance_setup import zaza.openstack.configure.guest class BaseGuestCreateTest(unittest.TestCase): def launch_instance(self, instance_key): loggi...
true
true
f750b6c4ccdee7675010a0c3b2a4fc5bd94da712
1,251
py
Python
04-A.Kraevskiy/2021-10-09-stone-game/words.py
Stankist04/2021-11-1
50e7568b219f6dce96ffd942c1c9a2ce09b1fd91
[ "MIT" ]
10
2021-10-02T09:25:55.000Z
2022-01-13T04:49:56.000Z
04-A.Kraevskiy/2021-10-09-stone-game/words.py
Stankist04/2021-11-1
50e7568b219f6dce96ffd942c1c9a2ce09b1fd91
[ "MIT" ]
7
2021-10-02T09:27:38.000Z
2021-12-23T17:37:01.000Z
04-A.Kraevskiy/2021-10-09-stone-game/words.py
Stankist04/2021-11-1
50e7568b219f6dce96ffd942c1c9a2ce09b1fd91
[ "MIT" ]
10
2021-10-02T09:26:25.000Z
2021-12-25T06:38:59.000Z
def possible_moves(current_word, words_list): answer_set = set() for word in words_list: if word.startswith(current_word): answer_set.add(word[len(current_word)]) return answer_set def rec(words_list, current_word=''): if current_word in words_list: return {current_word,} ...
30.512195
117
0.593125
def possible_moves(current_word, words_list): answer_set = set() for word in words_list: if word.startswith(current_word): answer_set.add(word[len(current_word)]) return answer_set def rec(words_list, current_word=''): if current_word in words_list: return {current_word,} ...
true
true
f750b6d66c25eac974aa37161c4ab2418c960efa
6,230
py
Python
plugins/xrmmap/configfile.py
bruceravel/xraylarch
a8179208872d43bd23453fa0c64680e11bc2b5ed
[ "BSD-3-Clause" ]
null
null
null
plugins/xrmmap/configfile.py
bruceravel/xraylarch
a8179208872d43bd23453fa0c64680e11bc2b5ed
[ "BSD-3-Clause" ]
null
null
null
plugins/xrmmap/configfile.py
bruceravel/xraylarch
a8179208872d43bd23453fa0c64680e11bc2b5ed
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python import os import sys import time import six if sys.version[0] == '2': from ConfigParser import ConfigParser from cStringIO import StringIO elif sys.version[0] == '3': from configparser import ConfigParser from io import StringIO from larch.utils import OrderedDict conf_sects = {'...
30.539216
80
0.506902
import os import sys import time import six if sys.version[0] == '2': from ConfigParser import ConfigParser from cStringIO import StringIO elif sys.version[0] == '3': from configparser import ConfigParser from io import StringIO from larch.utils import OrderedDict conf_sects = {'general': {}, ...
true
true
f750b7d0e42b0d9fd4a3364382354fb7fafe971c
39,609
py
Python
tensorflow_probability/python/positive_semidefinite_kernels/positive_semidefinite_kernel.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/positive_semidefinite_kernels/positive_semidefinite_kernel.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/positive_semidefinite_kernels/positive_semidefinite_kernel.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
38.122233
85
0.654498
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import contextlib import functools import operator import six import tensorflow.compat.v2 as tf from tensorflow_probability.python.positive_semidefinite_kernels.internal import util __all__ = [ ...
true
true
f750b8928a5df73ae9c9ce9d14f14b326dd34f3b
10,645
py
Python
sgrna_modeler/models.py
PeterDeWeirdt/sgrna_modeler
5c6cf0330cda35acf67d7e5f58d0b2ae29bf026e
[ "MIT" ]
null
null
null
sgrna_modeler/models.py
PeterDeWeirdt/sgrna_modeler
5c6cf0330cda35acf67d7e5f58d0b2ae29bf026e
[ "MIT" ]
2
2020-01-28T20:35:14.000Z
2021-11-15T17:49:13.000Z
sgrna_modeler/models.py
PeterDeWeirdt/sgrna_modeler
5c6cf0330cda35acf67d7e5f58d0b2ae29bf026e
[ "MIT" ]
null
null
null
from sgrna_modeler import features as fe from sklearn.model_selection import train_test_split from sklearn import ensemble from tensorflow import keras as k import pandas as pd import os from joblib import load import sgrna_modeler.enzymes as en def curr_path(): return os.path.dirname(__file__) def get_deepcpf1_w...
37.748227
120
0.614185
from sgrna_modeler import features as fe from sklearn.model_selection import train_test_split from sklearn import ensemble from tensorflow import keras as k import pandas as pd import os from joblib import load import sgrna_modeler.enzymes as en def curr_path(): return os.path.dirname(__file__) def get_deepcpf1_w...
true
true
f750b8b319f38f619fa14bb8e1b2d79514d9a860
938
py
Python
processes/jsonprocess.py
talos-gis/talos_api
aa8d5bdaf8dac43ecdc0750ac3413f8ad329d2ce
[ "MIT" ]
null
null
null
processes/jsonprocess.py
talos-gis/talos_api
aa8d5bdaf8dac43ecdc0750ac3413f8ad329d2ce
[ "MIT" ]
null
null
null
processes/jsonprocess.py
talos-gis/talos_api
aa8d5bdaf8dac43ecdc0750ac3413f8ad329d2ce
[ "MIT" ]
null
null
null
import json from pywps import Process, LiteralInput, ComplexOutput, Format class TestJson(Process): def __init__(self): inputs = [LiteralInput('name', 'Input name', data_type='string')] outputs = [ComplexOutput('output', 'Referenced Output', supported_formats=[Format('application...
33.5
73
0.592751
import json from pywps import Process, LiteralInput, ComplexOutput, Format class TestJson(Process): def __init__(self): inputs = [LiteralInput('name', 'Input name', data_type='string')] outputs = [ComplexOutput('output', 'Referenced Output', supported_formats=[Format('application...
true
true
f750b97c8dabb7853db996502e7380d72c9d4e2e
2,180
py
Python
setup.py
minhquang153/predictionio-python
470aa0bdf3e545c6b9355f6c8ebc1cadbc087255
[ "Apache-2.0" ]
null
null
null
setup.py
minhquang153/predictionio-python
470aa0bdf3e545c6b9355f6c8ebc1cadbc087255
[ "Apache-2.0" ]
null
null
null
setup.py
minhquang153/predictionio-python
470aa0bdf3e545c6b9355f6c8ebc1cadbc087255
[ "Apache-2.0" ]
null
null
null
try: from setuptools import setup except ImportError: from distutils.core import setup __author__ = "Apache PredictionIO" __email__ = "user@predictionio.apache.org" __copyright__ = "Copyright 2017 The Apache Software Foundation" __license__ = "Apache License, Version 2.0" setup( name='PredictionIO', v...
39.636364
79
0.601376
try: from setuptools import setup except ImportError: from distutils.core import setup __author__ = "Apache PredictionIO" __email__ = "user@predictionio.apache.org" __copyright__ = "Copyright 2017 The Apache Software Foundation" __license__ = "Apache License, Version 2.0" setup( name='PredictionIO', v...
true
true
f750b9a0899a276b58174d80a664a2d2cd095156
3,387
py
Python
odo/backends/tests/test_url.py
dan-coates/odo
ac8061b1853a53bfebafdfcf8314d2ba3ebb0413
[ "BSD-3-Clause" ]
null
null
null
odo/backends/tests/test_url.py
dan-coates/odo
ac8061b1853a53bfebafdfcf8314d2ba3ebb0413
[ "BSD-3-Clause" ]
null
null
null
odo/backends/tests/test_url.py
dan-coates/odo
ac8061b1853a53bfebafdfcf8314d2ba3ebb0413
[ "BSD-3-Clause" ]
2
2018-02-21T04:42:33.000Z
2021-01-27T05:25:48.000Z
from __future__ import print_function import pytest from functools import partial import codecs import os from odo import odo, resource, URL, discover, CSV, TextFile, convert from odo.backends.url import sample from odo.temp import _Temp, Temp from odo.utils import tmpfile, raises import datashape try: from ur...
27.096
78
0.662238
from __future__ import print_function import pytest from functools import partial import codecs import os from odo import odo, resource, URL, discover, CSV, TextFile, convert from odo.backends.url import sample from odo.temp import _Temp, Temp from odo.utils import tmpfile, raises import datashape try: from ur...
true
true
f750b9c042033ab1603eb38bb576994201a8abe1
2,732
py
Python
src/passcodes.py
fatty-duck/lib-lockdown
f1371931798507e4eb651e4a4ca42405189db866
[ "MIT" ]
null
null
null
src/passcodes.py
fatty-duck/lib-lockdown
f1371931798507e4eb651e4a4ca42405189db866
[ "MIT" ]
null
null
null
src/passcodes.py
fatty-duck/lib-lockdown
f1371931798507e4eb651e4a4ca42405189db866
[ "MIT" ]
null
null
null
#!/usr/bin/python import ConfigParser as cp # Module named configparser in Python 3; ConfigParser in Python 2 config = cp.RawConfigParser() config.read("..\passcodes.cfg") passcodes= config.get("Main","passcodes").lower().split(",") old_passcodes= [] total = len(passcodes) if config.get("Main", "bro...
25.296296
171
0.638726
import ConfigParser as cp config = cp.RawConfigParser() config.read("..\passcodes.cfg") passcodes= config.get("Main","passcodes").lower().split(",") old_passcodes= [] total = len(passcodes) if config.get("Main", "bronze"): bronze = int(config.get("Main", "bronze")) else: bronze = total ...
false
true
f750ba4d781b6ab7235b2a3fe6c0d9a380cc9a1c
450
py
Python
sdk/python/pulumi_azure_nextgen/network/v20180901/__init__.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20180901/__init__.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20180901/__init__.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .get_private_zone import * from .get_record_set import * from .get_virtual_network_link import * from ...
32.142857
80
0.753333
# Export this package's modules as members: from .get_private_zone import * from .get_record_set import * from .get_virtual_network_link import * from .private_zone import * from .record_set import * from .virtual_network_link import * from ._inputs import * from . import outputs
true
true
f750ba528c7bda9ae46436174481a0137e8ef16b
8,367
py
Python
salt/states/mac_package.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
salt/states/mac_package.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
salt/states/mac_package.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Installing of mac pkg files =========================== Install any kind of pkg, dmg or app file on macOS: .. code-block:: yaml /mnt/test.pkg: macpackage.installed: - store: True /mnt/test.dmg: macpackage.installed: - dmg: True /mnt/xcode.dmg: ...
31.104089
112
0.534242
from __future__ import absolute_import import logging import os import re import salt.utils.platform from salt.exceptions import CommandExecutionError log = logging.getLogger(__name__) __virtualname__ = "macpackage" def __virtual__(): if salt.utils.platform.is_darwin(): return __virtualname__ return...
true
true
f750bb695279583f41c95f3dec80ff29c62532b3
564
py
Python
Python3/Django/HelloREST/app/migrations/0001_initial.py
youngqqcn/QBlockChainNotes
85122049024dc5555705bf016312491a51966621
[ "MIT" ]
24
2018-11-01T03:36:43.000Z
2022-03-28T08:20:30.000Z
Python3/Django/HelloREST/app/migrations/0001_initial.py
songning4/QBlockChainNotes
d65ede073f5a20f728f41cc6850409693820cdb1
[ "MIT" ]
57
2019-12-04T08:26:47.000Z
2022-03-08T07:35:15.000Z
Python3/Django/HelloREST/app/migrations/0001_initial.py
youngqqcn/QBlockChainNotes
85122049024dc5555705bf016312491a51966621
[ "MIT" ]
11
2019-01-04T08:41:57.000Z
2022-03-16T03:51:36.000Z
# Generated by Django 3.0.5 on 2020-05-05 15:14 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(aut...
24.521739
114
0.578014
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fals...
true
true
f750bbcf0366aa2207329abf429191443682731a
27
py
Python
program/nondet/__init__.py
mmsbrggr/polar
34348baf6992232e47cee7a4d56b5a96567c50b8
[ "MIT" ]
null
null
null
program/nondet/__init__.py
mmsbrggr/polar
34348baf6992232e47cee7a4d56b5a96567c50b8
[ "MIT" ]
null
null
null
program/nondet/__init__.py
mmsbrggr/polar
34348baf6992232e47cee7a4d56b5a96567c50b8
[ "MIT" ]
null
null
null
from .nondet import Nondet
13.5
26
0.814815
from .nondet import Nondet
true
true
f750bbfd18f7e764570e149a13357bfedf465d0b
1,902
py
Python
teammy/t3ammy.py
t3ammy/teammy
d1a70acfbfb89b0645c25ec415427ad227c1b54c
[ "MIT" ]
null
null
null
teammy/t3ammy.py
t3ammy/teammy
d1a70acfbfb89b0645c25ec415427ad227c1b54c
[ "MIT" ]
null
null
null
teammy/t3ammy.py
t3ammy/teammy
d1a70acfbfb89b0645c25ec415427ad227c1b54c
[ "MIT" ]
null
null
null
class Teammy: def __init__(self): self.name = 'T3ammy' self.lastname = 'Sit_Uncle_Engineer' self.nickname = 'teammy' def WhoIAM(self): ''' นี่คือฟังชั่่นที่ใช้ในการแสดงชื่อของคราสนี้ ''' print('My name is: {}'.format(self.name)) prin...
23.195122
91
0.501052
class Teammy: def __init__(self): self.name = 'T3ammy' self.lastname = 'Sit_Uncle_Engineer' self.nickname = 'teammy' def WhoIAM(self): print('My name is: {}'.format(self.name)) print('My lastname is: {}'.format(self.lastname)) print('My nickname is: {}...
true
true
f750bd571033d52bea706b8151121f0d99b64242
57,734
py
Python
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_aaa_protocol_radius_oper.py
tkamata-test/ydk-py
b637e7853a8edbbd31fbc05afa3aa4110b31c5f9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_aaa_protocol_radius_oper.py
tkamata-test/ydk-py
b637e7853a8edbbd31fbc05afa3aa4110b31c5f9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_aaa_protocol_radius_oper.py
tkamata-test/ydk-py
b637e7853a8edbbd31fbc05afa3aa4110b31c5f9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
53.358595
231
0.515277
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
true
true
f750be0ad542028a6d1f6c6b7b5efa1a7fe7e536
51,920
py
Python
updateHostsFile.py
GeoZac/android_external_hosts
c0f5749003f5fdcde2f82ca53488ca696e939295
[ "MIT" ]
null
null
null
updateHostsFile.py
GeoZac/android_external_hosts
c0f5749003f5fdcde2f82ca53488ca696e939295
[ "MIT" ]
null
null
null
updateHostsFile.py
GeoZac/android_external_hosts
c0f5749003f5fdcde2f82ca53488ca696e939295
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Script by Ben Limmer # https://github.com/l1m5 # # This Python script will combine all the host files you provide # as sources into one, unique host file to keep your internet browsing happy. import argparse import fnmatch import json import locale import os import platform import re import s...
29.399773
107
0.609707
import argparse import fnmatch import json import locale import os import platform import re import shutil import socket import subprocess import sys import tempfile import time from glob import glob import lxml from bs4 import BeautifulSoup PY3 = sys.version_info >= (3, 0) if PY3: from urllib.request import ...
true
true
f750bef87f2f6feae25628f0e9403f98b9b62df4
30,456
py
Python
octavia/db/models.py
mauroseb/octavia
8f032d884e0f89ac69d5b6e5f5b77d19ee6eb1d7
[ "Apache-2.0" ]
null
null
null
octavia/db/models.py
mauroseb/octavia
8f032d884e0f89ac69d5b6e5f5b77d19ee6eb1d7
[ "Apache-2.0" ]
null
null
null
octavia/db/models.py
mauroseb/octavia
8f032d884e0f89ac69d5b6e5f5b77d19ee6eb1d7
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Rackspace # Copyright 2016 Blue Box, an IBM Company # Copyright 2017 Walmart Stores 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://...
35.621053
79
0.66253
from oslo_db.sqlalchemy import models import sqlalchemy as sa from sqlalchemy.ext import orderinglist from sqlalchemy import orm from sqlalchemy.orm import validates from sqlalchemy.sql import func from octavia.api.v2.types import amphora from octavia.api.v2.types import availability_zone_profile from octavia.api.v2...
true
true
f750c01595b2f9b84e19bc1e88217767eb9c98a9
490
py
Python
Exercicios/Resposta-EstruturaDeRepeticao/Exerc_16.py
ThaisAlves7/Exercicios_PythonBrasil
3c55f56c44b4da9953a79398859e7c73a155dc0e
[ "MIT" ]
null
null
null
Exercicios/Resposta-EstruturaDeRepeticao/Exerc_16.py
ThaisAlves7/Exercicios_PythonBrasil
3c55f56c44b4da9953a79398859e7c73a155dc0e
[ "MIT" ]
null
null
null
Exercicios/Resposta-EstruturaDeRepeticao/Exerc_16.py
ThaisAlves7/Exercicios_PythonBrasil
3c55f56c44b4da9953a79398859e7c73a155dc0e
[ "MIT" ]
null
null
null
# A série de Fibonacci é formada pela seqüência 0,1,1,2,3,5,8,13,21,34,55,... Faça um programa capaz de gerar a série até # que o valor seja maior que 500 fibonnaci = [] limite = True n = 0 while limite: for n in range(1, 10000): if n <= 1: valor = n fibonnaci.append(valor) ...
21.304348
121
0.538776
fibonnaci = [] limite = True n = 0 while limite: for n in range(1, 10000): if n <= 1: valor = n fibonnaci.append(valor) else: valor = (n - 1) + (n - 2) fibonnaci.append(valor) if valor > 500: limite = False break pri...
true
true
f750c02cedbb752781dccfeee9a3fe77f1f4a665
1,628
py
Python
users/tests.py
D-Kamunya/instagram-clone
3fe83d0e58146268149caa6687dc4ab2b0c9bfb8
[ "Unlicense" ]
null
null
null
users/tests.py
D-Kamunya/instagram-clone
3fe83d0e58146268149caa6687dc4ab2b0c9bfb8
[ "Unlicense" ]
null
null
null
users/tests.py
D-Kamunya/instagram-clone
3fe83d0e58146268149caa6687dc4ab2b0c9bfb8
[ "Unlicense" ]
null
null
null
from django.test import TestCase from .models import Profile import datetime as dt from django.contrib.auth.models import User # Create your tests here. class ProfileTestClass(TestCase): # Set up method def setUp(self): # Creating a new location and saving it self.new_user= User(username='den...
28.068966
93
0.682432
from django.test import TestCase from .models import Profile import datetime as dt from django.contrib.auth.models import User class ProfileTestClass(TestCase): def setUp(self): self.new_user= User(username='denno',email='test@gmail.com',password='moringa#23') self.new_user.save() ...
true
true
f750c14ec56dd471171a436934a108742ec7f19e
1,802
py
Python
data analysis/pyecharts/pyecharts/charts/basic_charts/map.py
mrxgavin/Coursework
6a1c87767d61f0865345dcdd4e963498856f05f3
[ "MIT" ]
3
2019-06-29T11:40:29.000Z
2019-09-07T02:15:09.000Z
data analysis/pyecharts/pyecharts/charts/basic_charts/map.py
mrxgavin/Coursework
6a1c87767d61f0865345dcdd4e963498856f05f3
[ "MIT" ]
null
null
null
data analysis/pyecharts/pyecharts/charts/basic_charts/map.py
mrxgavin/Coursework
6a1c87767d61f0865345dcdd4e963498856f05f3
[ "MIT" ]
null
null
null
from ... import options as opts from ...charts.chart import Chart from ...commons.types import Numeric, Optional, Sequence, Union from ...globals import ChartType class Map(Chart): """ <<< Map >>> Map are mainly used for visualization of geographic area data. """ def __init__(self, ...
32.763636
70
0.529412
from ... import options as opts from ...charts.chart import Chart from ...commons.types import Numeric, Optional, Sequence, Union from ...globals import ChartType class Map(Chart): def __init__(self, init_opts: opts.InitOpts = opts.InitOpts()): super().__init__(init_opts=init_opts) def ad...
true
true
f750c165b8a479b5e991a9e926e7330518cdac2a
942
py
Python
open_connect/accounts/migrations/0004_add_modify_staff_status_permission.py
ofa/connect
a56c0f89df82694bf5db32a04d8b092974791972
[ "MIT" ]
66
2015-11-30T20:35:38.000Z
2019-06-12T17:40:32.000Z
open_connect/accounts/migrations/0004_add_modify_staff_status_permission.py
ofa/connect
a56c0f89df82694bf5db32a04d8b092974791972
[ "MIT" ]
18
2015-11-30T22:03:05.000Z
2019-07-02T00:50:29.000Z
open_connect/accounts/migrations/0004_add_modify_staff_status_permission.py
ofa/connect
a56c0f89df82694bf5db32a04d8b092974791972
[ "MIT" ]
11
2015-11-30T20:56:01.000Z
2019-07-01T17:06:09.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0003_create_system_user'), ] operations = [ migrations.AlterModelOptions( name='user', o...
49.578947
617
0.681529
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0003_create_system_user'), ] operations = [ migrations.AlterModelOptions( name='user', options={'verbose_name': ...
true
true
f750c16ebbe8c02cc0478fafd42ece00c6b3cc0f
1,122
py
Python
10 Days of Statistics/11 - Day 3 - Drawing Marbles.py
srgeyK87/Hacker-Rank-30-days-challlenge
4a929935148db493057dd3a5a88e77efcc0fd086
[ "MIT" ]
275
2020-04-10T18:01:13.000Z
2022-03-23T15:03:41.000Z
10 Days of Statistics/11 - Day 3 - Drawing Marbles.py
rakshit6432/HackerRank-Solutions
9fd5b295f03cc80b77e80810bb6b7b6acd160e79
[ "MIT" ]
2
2020-12-20T10:55:40.000Z
2021-05-20T12:52:53.000Z
10 Days of Statistics/11 - Day 3 - Drawing Marbles.py
rakshit6432/HackerRank-Solutions
9fd5b295f03cc80b77e80810bb6b7b6acd160e79
[ "MIT" ]
196
2020-09-26T16:24:43.000Z
2022-03-28T10:40:05.000Z
# ======================== # Information # ======================== # Direct Link: https://www.hackerrank.com/challenges/s10-mcq-6/problem # Difficulty: Easy # Max Score: 10 # Language: Python # Multiple Choice Question - No code required but checked with code # ======================== # Solution # ===...
27.365854
91
0.617647
from itertools import permutations from fractions import Fraction RED_MARBLES = [1, 1, 1] BLUE_MARBLES = [0, 0, 0, 0] FIRST_DRAW = list(filter(lambda m: m[0] == 1, permutations(RED_MARBLES + BLUE_MARBLES, 2))) MARBLES_REMAINING = list(filter(lambda m: m[1] == 0, FIRST_DRAW)) print(Fraction(len(MARBLES_REMAINING)...
true
true
f750c28a42ea73115e08ec9142e5f33739fde199
90
py
Python
tests/PaxHeaders.47482/MockXenAPI.py
xiaobinglu/openvswitch
b206a49997a51909d73fd5c11784c17aa885f76b
[ "Apache-2.0" ]
null
null
null
tests/PaxHeaders.47482/MockXenAPI.py
xiaobinglu/openvswitch
b206a49997a51909d73fd5c11784c17aa885f76b
[ "Apache-2.0" ]
null
null
null
tests/PaxHeaders.47482/MockXenAPI.py
xiaobinglu/openvswitch
b206a49997a51909d73fd5c11784c17aa885f76b
[ "Apache-2.0" ]
null
null
null
30 mtime=1365496689.486878593 30 atime=1440176559.453245606 30 ctime=1440177384.833299751
22.5
29
0.866667
30 mtime=1365496689.486878593 30 atime=1440176559.453245606 30 ctime=1440177384.833299751
false
true
f750c42144db8da84e662243729b93bedf77ac38
1,077
py
Python
locallibrary/locallibrary/catalog/admin.py
learning-laboratory/first-steps-with-django
382cd294d905263877b3cf21a3f84a1c39dc90aa
[ "MIT" ]
null
null
null
locallibrary/locallibrary/catalog/admin.py
learning-laboratory/first-steps-with-django
382cd294d905263877b3cf21a3f84a1c39dc90aa
[ "MIT" ]
null
null
null
locallibrary/locallibrary/catalog/admin.py
learning-laboratory/first-steps-with-django
382cd294d905263877b3cf21a3f84a1c39dc90aa
[ "MIT" ]
null
null
null
from django.contrib import admin from catalog.models import Author, Genre, Book, BookInstance, Language # admin.site.register(Book) # admin.site.register(Author) admin.site.register(Genre) admin.site.register(Language) # admin.site.register(BookInstance) @admin.register(Author) class AuthorAdmin(admin.ModelAdmin): ...
29.108108
79
0.677809
from django.contrib import admin from catalog.models import Author, Genre, Book, BookInstance, Language admin.site.register(Genre) admin.site.register(Language) @admin.register(Author) class AuthorAdmin(admin.ModelAdmin): list_display = ('last_name','first_name', 'date_of_birth', 'date_of_death') fields = ['f...
true
true
f750c552bc466e72f62efe74246732c6e309a067
2,999
py
Python
homeassistant/components/logbook/queries/devices.py
bieniu/core
c6b835dd91620484f8a4b4c6593f83f7da3850b7
[ "Apache-2.0" ]
null
null
null
homeassistant/components/logbook/queries/devices.py
bieniu/core
c6b835dd91620484f8a4b4c6593f83f7da3850b7
[ "Apache-2.0" ]
null
null
null
homeassistant/components/logbook/queries/devices.py
bieniu/core
c6b835dd91620484f8a4b4c6593f83f7da3850b7
[ "Apache-2.0" ]
null
null
null
"""Devices queries for logbook.""" from __future__ import annotations from collections.abc import Iterable from datetime import datetime as dt from sqlalchemy import lambda_stmt, select from sqlalchemy.orm import Query from sqlalchemy.sql.elements import ClauseList from sqlalchemy.sql.lambdas import StatementLambdaEl...
30.917526
87
0.710237
from __future__ import annotations from collections.abc import Iterable from datetime import datetime as dt from sqlalchemy import lambda_stmt, select from sqlalchemy.orm import Query from sqlalchemy.sql.elements import ClauseList from sqlalchemy.sql.lambdas import StatementLambdaElement from sqlalchemy.sql.selectabl...
true
true
f750c68516b653e17bc9fece5d088e988ded3304
1,326
py
Python
falcon_heavy/core/types/errors.py
NotJustAToy/falcon-heavy
2e96f649daafc2707a01e38f403f1ce4268f4629
[ "Apache-2.0" ]
21
2020-01-02T10:44:42.000Z
2022-02-11T14:27:05.000Z
falcon_heavy/core/types/errors.py
NotJustAToy/falcon-heavy
2e96f649daafc2707a01e38f403f1ce4268f4629
[ "Apache-2.0" ]
2
2020-02-13T21:06:56.000Z
2020-09-27T16:47:25.000Z
falcon_heavy/core/types/errors.py
NotJustAToy/falcon-heavy
2e96f649daafc2707a01e38f403f1ce4268f4629
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 Not Just A Toy Corp. # # 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...
27.061224
80
0.659125
import typing as ty from .path import Path __all__ = ( 'Error', ) class Error: __slots__ = ( 'path', 'message' ) def __init__(self, path: Path, message: str) -> None: self.path = path self.message = message def __eq__(self, other: ty.Any) -> bool: if n...
true
true
f750c717f229f8b7860b28bc3f2f220d26ae2d34
338
py
Python
venv/Lib/site-packages/pynance/__init__.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
35
2015-03-12T04:16:14.000Z
2020-12-17T18:10:15.000Z
venv/Lib/site-packages/pynance/__init__.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
31
2015-03-16T21:31:04.000Z
2021-01-26T00:12:34.000Z
venv/Lib/site-packages/pynance/__init__.py
LeonardoHMS/imobi
6b2b97a05df67ea7d493f7b601382f65c6629cc2
[ "MIT" ]
18
2015-09-30T10:40:26.000Z
2021-01-25T21:20:44.000Z
from __future__ import division, absolute_import, print_function __all__ = ["common", "chart", "data", "dateutils", "interest", "learn", "pf", "tech"] from . import common from .common import * from . import chart from . import data from . import dateutils from . import interest from . import learn from . import pf f...
24.142857
85
0.727811
from __future__ import division, absolute_import, print_function __all__ = ["common", "chart", "data", "dateutils", "interest", "learn", "pf", "tech"] from . import common from .common import * from . import chart from . import data from . import dateutils from . import interest from . import learn from . import pf f...
true
true
f750c78148cf573e8a241fac8f6a47d2b9c36b95
1,467
py
Python
src/atcoder/abc212/g/sol_8.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
1
2021-07-11T03:20:10.000Z
2021-07-11T03:20:10.000Z
src/atcoder/abc212/g/sol_8.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
39
2021-07-10T05:21:09.000Z
2021-12-15T06:10:12.000Z
src/atcoder/abc212/g/sol_8.py
kagemeka/competitive-programming
c70fe481bcd518f507b885fc9234691d8ce63171
[ "MIT" ]
null
null
null
import typing import numpy as np import numba as nb @nb.njit def find_divisors( n: int, ) -> np.array: i = np.arange(int(n ** .5)) i += 1 i = i[n % i == 0] i = np.hstack((i, n // i)) return np.unique(i) @nb.njit def gpf( n: int = 1 << 20, ) -> np.array: s = np.arange(n) s[:2] = -1 i = 0 whi...
13.71028
31
0.502386
import typing import numpy as np import numba as nb @nb.njit def find_divisors( n: int, ) -> np.array: i = np.arange(int(n ** .5)) i += 1 i = i[n % i == 0] i = np.hstack((i, n // i)) return np.unique(i) @nb.njit def gpf( n: int = 1 << 20, ) -> np.array: s = np.arange(n) s[:2] = -1 i = 0 whi...
true
true
f750c7c66b6901abf81b3820cf58e07e28870047
5,197
py
Python
oscar/lib/python2.7/site-packages/setuptools/__init__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/setuptools/__init__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/setuptools/__init__.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
"""Extensions to the 'distutils' for large or complex distributions""" import os import functools import distutils.core import distutils.filelist from distutils.util import convert_path from fnmatch import fnmatchcase from setuptools.extern.six.moves import filter, map import setuptools.version from setu...
32.279503
80
0.630941
import os import functools import distutils.core import distutils.filelist from distutils.util import convert_path from fnmatch import fnmatchcase from setuptools.extern.six.moves import filter, map import setuptools.version from setuptools.extension import Extension from setuptools.dist import Distribut...
true
true
f750c85272c7350d822700408247ee4eaa0170eb
146
py
Python
03. Record Unique Names.py
boykostoyanoff/PythonAdvanced
118d67aeff6f7bf37a5d5f0a3a2eeaf45a5532d2
[ "Apache-2.0" ]
null
null
null
03. Record Unique Names.py
boykostoyanoff/PythonAdvanced
118d67aeff6f7bf37a5d5f0a3a2eeaf45a5532d2
[ "Apache-2.0" ]
null
null
null
03. Record Unique Names.py
boykostoyanoff/PythonAdvanced
118d67aeff6f7bf37a5d5f0a3a2eeaf45a5532d2
[ "Apache-2.0" ]
null
null
null
names = set() for _ in range(int(input())): name = input() if name not in names: names.add(name) [print(name) for name in names]
18.25
31
0.59589
names = set() for _ in range(int(input())): name = input() if name not in names: names.add(name) [print(name) for name in names]
true
true
f750c8aff7cafacc2a37d3f5c068ed8ea1a1f1df
66,308
py
Python
pytorch_lightning/core/lightning.py
tobiasmaier/pytorch-lightning
7f352cb69a8202e3f829419657597697ca5d99e2
[ "Apache-2.0" ]
1
2020-11-24T17:49:42.000Z
2020-11-24T17:49:42.000Z
pytorch_lightning/core/lightning.py
tobiasmaier/pytorch-lightning
7f352cb69a8202e3f829419657597697ca5d99e2
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/core/lightning.py
tobiasmaier/pytorch-lightning
7f352cb69a8202e3f829419657597697ca5d99e2
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
38.43942
193
0.581891
import collections import copy import inspect import os import re import tempfile from abc import ABC from argparse import Namespace from pathlib import Path from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence, Tuple, Union import torch from torch import ScriptModule, Tensor from torch.nn impor...
true
true
f750c96e05c39e254deac31c0172e0c01bdb5206
5,498
py
Python
blobserver/blobs.py
pekrau/blobserver
f4c9411197033df9e8aefc1651dc6009c33e0c90
[ "MIT" ]
1
2022-03-09T09:23:28.000Z
2022-03-09T09:23:28.000Z
blobserver/blobs.py
pekrau/blobserver
f4c9411197033df9e8aefc1651dc6009c33e0c90
[ "MIT" ]
64
2021-02-19T19:31:15.000Z
2022-02-25T10:18:26.000Z
blobserver/blobs.py
pekrau/blobserver
f4c9411197033df9e8aefc1651dc6009c33e0c90
[ "MIT" ]
1
2021-03-01T13:06:37.000Z
2021-03-01T13:06:37.000Z
"Lists of blobs." import flask import blobserver.user from blobserver import constants from blobserver import utils blueprint = flask.Blueprint("blobs", __name__) @blueprint.route("/all") def all(): "List of all blobs." cursor = flask.g.db.cursor() rows = cursor.execute("SELECT * FROM blobs") blobs ...
38.992908
78
0.595853
import flask import blobserver.user from blobserver import constants from blobserver import utils blueprint = flask.Blueprint("blobs", __name__) @blueprint.route("/all") def all(): cursor = flask.g.db.cursor() rows = cursor.execute("SELECT * FROM blobs") blobs = [dict(zip(row.keys(), row)) for row in ro...
true
true
f750cb10da4099d6837e002c4fe12b6e40870f3a
911
py
Python
src/score_submission/score_subm.py
Szpedy/RecSys2k19
bca72e4358f4d2bcee061f127be0dc4cb8506f40
[ "MIT" ]
1
2019-06-13T16:10:28.000Z
2019-06-13T16:10:28.000Z
src/score_submission/score_subm.py
Szpedy/RecSys2k19
bca72e4358f4d2bcee061f127be0dc4cb8506f40
[ "MIT" ]
null
null
null
src/score_submission/score_subm.py
Szpedy/RecSys2k19
bca72e4358f4d2bcee061f127be0dc4cb8506f40
[ "MIT" ]
null
null
null
from pathlib import Path import click from . import functions as f current_directory = Path(__file__).absolute().parent default_data_directory = current_directory.joinpath('..', '..', 'data') @click.command() @click.option('--data-path', default=None, help='Directory for the CSV files') @click.option('--submission...
31.413793
94
0.746432
from pathlib import Path import click from . import functions as f current_directory = Path(__file__).absolute().parent default_data_directory = current_directory.joinpath('..', '..', 'data') @click.command() @click.option('--data-path', default=None, help='Directory for the CSV files') @click.option('--submission...
true
true
f750cb93b70c1910e40c22e575dfce46b799b9ed
6,394
py
Python
scripts/test_util.py
ana13S/codalab-worksheets
3f839dbe92e505a94ddc627ffab9cfea621cb2d1
[ "Apache-2.0" ]
40
2015-02-19T13:36:03.000Z
2018-12-13T08:36:48.000Z
scripts/test_util.py
ana13S/codalab-worksheets
3f839dbe92e505a94ddc627ffab9cfea621cb2d1
[ "Apache-2.0" ]
881
2015-01-08T18:09:44.000Z
2019-03-12T19:41:55.000Z
scripts/test_util.py
ana13S/codalab-worksheets
3f839dbe92e505a94ddc627ffab9cfea621cb2d1
[ "Apache-2.0" ]
37
2015-03-15T21:50:15.000Z
2019-03-04T06:14:01.000Z
import io import subprocess import sys import traceback global cl class Colorizer(object): RED = "\033[31;1m" GREEN = "\033[32;1m" YELLOW = "\033[33;1m" CYAN = "\033[36;1m" RESET = "\033[0m" NEWLINE = "\n" @classmethod def _colorize(cls, string, color): return getattr(cls, co...
35.131868
100
0.621051
import io import subprocess import sys import traceback global cl class Colorizer(object): RED = "\033[31;1m" GREEN = "\033[32;1m" YELLOW = "\033[33;1m" CYAN = "\033[36;1m" RESET = "\033[0m" NEWLINE = "\n" @classmethod def _colorize(cls, string, color): return getattr(cls, co...
true
true
f750cc4c98afafa671fa4ceff847cf519feb4a6e
3,702
py
Python
tests/sentry/integrations/slack/test_integration.py
dpoirier/sentry
19bdf8aff1cd230fb6f6b32f13340d49ae16f67c
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/integrations/slack/test_integration.py
dpoirier/sentry
19bdf8aff1cd230fb6f6b32f13340d49ae16f67c
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/integrations/slack/test_integration.py
dpoirier/sentry
19bdf8aff1cd230fb6f6b32f13340d49ae16f67c
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import responses import six from six.moves.urllib.parse import parse_qs, urlencode, urlparse from sentry.integrations.slack import SlackIntegration from sentry.models import Identity, IdentityProvider, IdentityStatus, Integration, OrganizationIntegration from sentry.testutils i...
36.653465
106
0.589681
from __future__ import absolute_import import responses import six from six.moves.urllib.parse import parse_qs, urlencode, urlparse from sentry.integrations.slack import SlackIntegration from sentry.models import Identity, IdentityProvider, IdentityStatus, Integration, OrganizationIntegration from sentry.testutils i...
true
true
f750cccbf0f22d1e0000ece2ff4db751519c3e00
12,619
py
Python
test/integration/writing/test_txt_writer.py
mishioo/tesliper
e09dcbc0eeb5cc5f7d612ea7f913e4c5dd58a327
[ "BSD-2-Clause" ]
null
null
null
test/integration/writing/test_txt_writer.py
mishioo/tesliper
e09dcbc0eeb5cc5f7d612ea7f913e4c5dd58a327
[ "BSD-2-Clause" ]
4
2022-02-24T18:28:39.000Z
2022-03-23T16:27:59.000Z
test/integration/writing/test_txt_writer.py
mishioo/tesliper
e09dcbc0eeb5cc5f7d612ea7f913e4c5dd58a327
[ "BSD-2-Clause" ]
null
null
null
from logging import Logger from pathlib import Path from unittest.mock import Mock import pytest from tesliper.extraction import Soxhlet from tesliper.glassware import Conformers, SingleSpectrum, Spectra from tesliper.glassware import arrays as ar from tesliper.writing.txt_writer import TxtWriter @pytest.fixture de...
39.434375
169
0.5231
from logging import Logger from pathlib import Path from unittest.mock import Mock import pytest from tesliper.extraction import Soxhlet from tesliper.glassware import Conformers, SingleSpectrum, Spectra from tesliper.glassware import arrays as ar from tesliper.writing.txt_writer import TxtWriter @pytest.fixture de...
true
true
f750cdf03bb5145076f9ad38328e7f1ab051461b
2,657
py
Python
software/reachy/io/cam.py
tigakub/reachy
6427f8f550387dedae2ed73b2f699df4fbe7e848
[ "Apache-1.1" ]
null
null
null
software/reachy/io/cam.py
tigakub/reachy
6427f8f550387dedae2ed73b2f699df4fbe7e848
[ "Apache-1.1" ]
1
2021-04-28T21:46:18.000Z
2021-04-28T21:46:18.000Z
software/reachy/io/cam.py
tigakub/reachy
6427f8f550387dedae2ed73b2f699df4fbe7e848
[ "Apache-1.1" ]
1
2021-04-25T14:09:19.000Z
2021-04-25T14:09:19.000Z
"""Wrapper around two RPI and the multi channel switch. It relies on the use of the Multi_Adapter_Board_2Channel_uc444 for switching camera via the I2C and GPIO control. See https://github.com/ArduCAM/RaspberryPi/tree/master/Multi_Camera_Adapter/Multi_Adapter_Board_2Channel_uc444 """ import time import cv2 as cv f...
29.197802
123
0.63041
import time import cv2 as cv from threading import Thread, Event, Lock from ..error import CameraNotFoundError class BackgroundVideoCapture(object): def __init__(self, camera_index, resolution=(600, 800), lazy_setup=True): self.camera_index = camera_index self.resolution = resolution ...
true
true
f750ce1367ef6cf53f72fce6639fe520c2266d99
7,682
py
Python
flask_pystmark.py
xsleonard/flask-pystmark
ef934f48dbdad772eec6e89396fe8c80d4f1bbbd
[ "MIT" ]
4
2015-04-13T00:15:36.000Z
2016-08-29T09:42:20.000Z
flask_pystmark.py
xsleonard/flask-pystmark
ef934f48dbdad772eec6e89396fe8c80d4f1bbbd
[ "MIT" ]
1
2019-09-26T08:30:43.000Z
2019-09-26T08:30:44.000Z
flask_pystmark.py
xsleonard/flask-pystmark
ef934f48dbdad772eec6e89396fe8c80d4f1bbbd
[ "MIT" ]
4
2015-04-13T00:15:40.000Z
2021-08-20T00:48:43.000Z
from flask import current_app from pystmark import (send, send_batch, get_delivery_stats, get_bounces, get_bounce, get_bounce_dump, get_bounce_tags, activate_bounce, Message as _Message) from __about__ import __version__, __title__, __description__ __all__ = ['__version__', ...
41.978142
79
0.636032
from flask import current_app from pystmark import (send, send_batch, get_delivery_stats, get_bounces, get_bounce, get_bounce_dump, get_bounce_tags, activate_bounce, Message as _Message) from __about__ import __version__, __title__, __description__ __all__ = ['__version__', ...
true
true
f750ce9046de4348e9c46e08194e397e7cd3e12f
48,634
py
Python
BEATLES.py
HratchianGroup/CorrespondingOrbitals
2cd671366a597126a57e480030376145908a3d98
[ "MIT" ]
null
null
null
BEATLES.py
HratchianGroup/CorrespondingOrbitals
2cd671366a597126a57e480030376145908a3d98
[ "MIT" ]
3
2020-05-20T18:20:32.000Z
2020-06-11T08:07:41.000Z
BEATLES.py
HratchianGroup/CorrespondingOrbitals
2cd671366a597126a57e480030376145908a3d98
[ "MIT" ]
2
2020-05-20T04:20:43.000Z
2020-05-30T23:54:45.000Z
#!/usr/bin/python from __future__ import division import sys import math import cmath import numpy as np from numpy import genfromtxt import csv from decimal import Decimal import os import random # BEATLES: Bundle of Essential and Assistive Tools Library for Electronic Structure # A tribute to the Beatles #...
34.516678
593
0.498293
from __future__ import division import sys import math import cmath import numpy as np from numpy import genfromtxt import csv from decimal import Decimal import os import random def NBasGrab(filename): NBasis = 0 NElem = 0 SCFEnergy = 0.0 Charge = 0 Multiplicity = 0 NAtoms = 0 temp = 1 with open(...
false
true
f750cf01ec88ea81e79881c407461aca4ee5e60b
306,672
py
Python
sympy/integrals/rubi/constraints.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/integrals/rubi/constraints.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/integrals/rubi/constraints.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_...
27.583378
361
0.571125
from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, Nonz...
true
true
f750cfded6c14fad6917c652b829cfdbefd4d445
525
py
Python
tasks/sample.py
wataken44/kushimori
34ed43a785330092f2dbedd7944a18d4e3a83ef7
[ "MIT" ]
null
null
null
tasks/sample.py
wataken44/kushimori
34ed43a785330092f2dbedd7944a18d4e3a83ef7
[ "MIT" ]
null
null
null
tasks/sample.py
wataken44/kushimori
34ed43a785330092f2dbedd7944a18d4e3a83ef7
[ "MIT" ]
null
null
null
from flask import Blueprint from google.cloud import firestore application = Blueprint('task', __name__) @application.route("/task") def index(): return 'this is task directory' @application.route("/task/sample") def sample(): db = firestore.Client() novels = db.collection(u'novels').order_by(u'novel...
21.875
87
0.64
from flask import Blueprint from google.cloud import firestore application = Blueprint('task', __name__) @application.route("/task") def index(): return 'this is task directory' @application.route("/task/sample") def sample(): db = firestore.Client() novels = db.collection(u'novels').order_by(u'novel...
true
true
f750d0003606d9d7cd8b3218994de8998bf613fd
3,108
py
Python
xml_py/routedem.py
mlacayoemery/wps-server-invest
c3d5eca357218dac76225028fab491b357cbc343
[ "MIT" ]
null
null
null
xml_py/routedem.py
mlacayoemery/wps-server-invest
c3d5eca357218dac76225028fab491b357cbc343
[ "MIT" ]
null
null
null
xml_py/routedem.py
mlacayoemery/wps-server-invest
c3d5eca357218dac76225028fab491b357cbc343
[ "MIT" ]
null
null
null
import pywps import pywps.validator.mode import natcap.invest.routing.routedem import tempfile import os.path import logging import sys class invest(pywps.Process): def __init__(self): inputs = [pywps.LiteralInput("calculate_downstream_distance", "Calculate Downstream...
43.774648
102
0.535071
import pywps import pywps.validator.mode import natcap.invest.routing.routedem import tempfile import os.path import logging import sys class invest(pywps.Process): def __init__(self): inputs = [pywps.LiteralInput("calculate_downstream_distance", "Calculate Downstream...
true
true
f750d049814bc1e540250bfb160e6a812c1aecbf
370,949
py
Python
hikari/api/rest.py
neonjonn/hikari
a1237eeb09eef4b765dd29fac842aa2506c287f3
[ "MIT" ]
2
2021-09-18T18:43:11.000Z
2021-12-30T11:54:26.000Z
hikari/api/rest.py
neonjonn/hikari
a1237eeb09eef4b765dd29fac842aa2506c287f3
[ "MIT" ]
null
null
null
hikari/api/rest.py
neonjonn/hikari
a1237eeb09eef4b765dd29fac842aa2506c287f3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # cython: language_level=3 # Copyright (c) 2020 Nekokatt # Copyright (c) 2021-present davfsa # # 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, inc...
47.351162
169
0.65833
from __future__ import annotations __all__: typing.List[str] = ["RESTClient", "TokenStrategy"] import abc import typing from hikari import traits from hikari import undefined if typing.TYPE_CHECKING: import datetime from hikari import applications from hikari import audit_logs from hikari import ch...
true
true
f750d09b12c391745f653b17e0df9f281743c2ca
2,139
py
Python
setup.py
elbuco1/fen2png
c64263cb5c53eeb33d2d311328256ffe4f1ac1a2
[ "MIT" ]
2
2021-12-01T03:28:52.000Z
2022-01-29T19:58:38.000Z
setup.py
elbuco1/fen2png
c64263cb5c53eeb33d2d311328256ffe4f1ac1a2
[ "MIT" ]
1
2021-12-01T03:28:21.000Z
2021-12-01T03:28:21.000Z
setup.py
elbuco1/fen2png
c64263cb5c53eeb33d2d311328256ffe4f1ac1a2
[ "MIT" ]
null
null
null
import io import os from pathlib import Path from setuptools import find_packages, setup # Package meta-data. NAME = 'fen2pil' DESCRIPTION = 'Convert Forsyth–Edwards Notation (FEN) to a 2D chessboard PIL image' URL = 'https://github.com/elbuco1/fen2pil' EMAIL = 'lrtboucaud@gmail.com' AUTHOR = "Laurent Boucaud" REQUIR...
25.771084
83
0.665264
import io import os from pathlib import Path from setuptools import find_packages, setup NAME = 'fen2pil' DESCRIPTION = 'Convert Forsyth–Edwards Notation (FEN) to a 2D chessboard PIL image' URL = 'https://github.com/elbuco1/fen2pil' EMAIL = 'lrtboucaud@gmail.com' AUTHOR = "Laurent Boucaud" REQUIRES_PYTHON = '>=3.7' ...
true
true
f750d23b284b6040b302da7c886bc637674d91b2
315
py
Python
tests/migrations/test_migrations_squashed_erroneous/3_squashed_5.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
16
2019-08-10T12:24:06.000Z
2020-05-21T09:11:14.000Z
tests/migrations/test_migrations_squashed_erroneous/3_squashed_5.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
12
2019-08-10T11:55:29.000Z
2020-05-21T04:46:30.000Z
tests/migrations/test_migrations_squashed_erroneous/3_squashed_5.py
jpmallarino/django
659d2421c7adbbcd205604002d521d82d6b0b465
[ "BSD-3-Clause", "0BSD" ]
3
2019-08-20T13:29:34.000Z
2020-01-30T22:05:10.000Z
from django.db import migrations class Migration(migrations.Migration): replaces = [ ("migrations", "3_auto"), ("migrations", "4_auto"), ("migrations", "5_auto"), ] dependencies = [("migrations", "2_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
21
66
0.625397
from django.db import migrations class Migration(migrations.Migration): replaces = [ ("migrations", "3_auto"), ("migrations", "4_auto"), ("migrations", "5_auto"), ] dependencies = [("migrations", "2_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
true
true
f750d25a6569ab0b4f3ca88347c14468fa6858b4
7,567
py
Python
cm/app/api_v1/my_calculation_module_directory/CM/__delete_if_tested__/CEDM/create_csv_results.py
HotMaps/renovation_effect
469a01b4cc805256768d884a3a2ae4560770b734
[ "Apache-2.0" ]
1
2021-05-11T06:41:04.000Z
2021-05-11T06:41:04.000Z
cm/app/api_v1/my_calculation_module_directory/CM/__delete_if_tested__/CEDM/create_csv_results.py
mayr-ethink/renovation_effect
5b1fb81102b3c6ee531b719d8136ed9a343c2598
[ "Apache-2.0" ]
2
2020-06-04T20:19:36.000Z
2020-06-04T20:19:36.000Z
cm/app/api_v1/my_calculation_module_directory/CM/__delete_if_tested__/CEDM/create_csv_results.py
mayr-ethink/renovation_effect
5b1fb81102b3c6ee531b719d8136ed9a343c2598
[ "Apache-2.0" ]
null
null
null
import numpy as np import os import time import sys path = os.path.dirname(os.path.dirname(os.path.dirname(os.path. abspath(__file__)))) if path not in sys.path: sys.path.append(path) import CM_intern.CEDM.modules.cyf.create_density_map as CDM import CM_...
38.805128
141
0.584776
import numpy as np import os import time import sys path = os.path.dirname(os.path.dirname(os.path.dirname(os.path. abspath(__file__)))) if path not in sys.path: sys.path.append(path) import CM_intern.CEDM.modules.cyf.create_density_map as CDM import CM_...
true
true
f750d336b17a251e169d3a616546f94c208c3057
38,413
py
Python
awx/settings/defaults.py
a-dawg/awx
4b22f63d32946df7a57aa80538c2a1d295a3c2a5
[ "Apache-2.0" ]
null
null
null
awx/settings/defaults.py
a-dawg/awx
4b22f63d32946df7a57aa80538c2a1d295a3c2a5
[ "Apache-2.0" ]
null
null
null
awx/settings/defaults.py
a-dawg/awx
4b22f63d32946df7a57aa80538c2a1d295a3c2a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. import base64 import os import re # noqa import sys from datetime import timedelta # global settings from django.conf import global_settings # Update this module's local settings from the global settings module. this_module = sys.modules[__name__] for settin...
38.879555
159
0.718012
import base64 import os import re import sys from datetime import timedelta from django.conf import global_settings this_module = sys.modules[__name__] for setting in dir(global_settings): if setting == setting.upper(): setattr(this_module, setting, getattr(global_settings, setting)) # Build paths insi...
true
true
f750d375b77fd2a050d740bbd095af8a7c8d8f83
1,733
py
Python
ogr/services/gitlab/user.py
maniis/ogr
2ca00be36e7103103f743e551adb1358b2ab662a
[ "MIT" ]
null
null
null
ogr/services/gitlab/user.py
maniis/ogr
2ca00be36e7103103f743e551adb1358b2ab662a
[ "MIT" ]
null
null
null
ogr/services/gitlab/user.py
maniis/ogr
2ca00be36e7103103f743e551adb1358b2ab662a
[ "MIT" ]
null
null
null
# type: ignore # MIT License # # Copyright (c) 2018-2019 Red Hat, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, ...
37.673913
80
0.747259
from ogr.services import gitlab as ogr_gitlab from ogr.services.base import BaseGitUser class GitlabUser(BaseGitUser): service: "ogr_gitlab.GitlabService" def __init__(self, service: "ogr_gitlab.GitlabService") -> None: super().__init__(service=service) def __str__(self) -> str: return...
true
true
f750d479509d3e843b705df0456933a20a32c02c
120
py
Python
tartiflette/types/builtins/__init__.py
erezsh/tartiflette
c945b02e9025e2524393c1eaec2191745bfc38f4
[ "MIT" ]
null
null
null
tartiflette/types/builtins/__init__.py
erezsh/tartiflette
c945b02e9025e2524393c1eaec2191745bfc38f4
[ "MIT" ]
null
null
null
tartiflette/types/builtins/__init__.py
erezsh/tartiflette
c945b02e9025e2524393c1eaec2191745bfc38f4
[ "MIT" ]
null
null
null
from tartiflette.types.builtins.scalars import GraphQLBoolean, GraphQLFloat, \ GraphQLID, GraphQLInt, GraphQLString
40
78
0.825
from tartiflette.types.builtins.scalars import GraphQLBoolean, GraphQLFloat, \ GraphQLID, GraphQLInt, GraphQLString
true
true
f750d4a0e259cecd4aff2daeba6da1cfc68e18d1
1,236
py
Python
venv/lib/python3.8/site-packages/vsts/test/v4_0/models/point_assignment.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/test/v4_0/models/point_assignment.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/test/v4_0/models/point_assignment.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
41.2
95
0.523463
from msrest.serialization import Model class PointAssignment(Model): _attribute_map = { 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, 'tester': {'key': 'tester', 'type': 'IdentityRef'} } def __init__(self, configuration=None, tester=None): su...
true
true
f750d4ca29dd8bbcf87bd922a30e35ff48b7e49f
7,215
py
Python
app.py
TaeKyoungKim/flask-dashboard-web
206bc3bf209d5473a8bf3abae61712e1d269164a
[ "bzip2-1.0.6" ]
null
null
null
app.py
TaeKyoungKim/flask-dashboard-web
206bc3bf209d5473a8bf3abae61712e1d269164a
[ "bzip2-1.0.6" ]
null
null
null
app.py
TaeKyoungKim/flask-dashboard-web
206bc3bf209d5473a8bf3abae61712e1d269164a
[ "bzip2-1.0.6" ]
null
null
null
from flask import Flask,render_template, flash, redirect , url_for , session ,request, logging from flask_mysqldb import MySQL from wtforms import Form, StringField , TextAreaField ,PasswordField , validators from passlib.hash import sha256_crypt from functools import wraps app = Flask(__name__) app.debug = True #C...
25.227273
135
0.629383
from flask import Flask,render_template, flash, redirect , url_for , session ,request, logging from flask_mysqldb import MySQL from wtforms import Form, StringField , TextAreaField ,PasswordField , validators from passlib.hash import sha256_crypt from functools import wraps app = Flask(__name__) app.debug = True ap...
true
true
f750d5c94ba835cf5a94abca7d62374722b8357e
33,872
py
Python
bigbang/listserv.py
RiccardoNanni/bigbang
70b9890fcd615ccb21a3685a9b33d79226e6fb36
[ "MIT" ]
null
null
null
bigbang/listserv.py
RiccardoNanni/bigbang
70b9890fcd615ccb21a3685a9b33d79226e6fb36
[ "MIT" ]
null
null
null
bigbang/listserv.py
RiccardoNanni/bigbang
70b9890fcd615ccb21a3685a9b33d79226e6fb36
[ "MIT" ]
null
null
null
import datetime import email import email.parser import glob import mailbox import os import re import subprocess import time import urllib import warnings from email.header import Header from email.message import Message from email.mime.text import MIMEText from typing import Dict, List, Optional, Tuple, Union import...
31.160994
87
0.545081
import datetime import email import email.parser import glob import mailbox import os import re import subprocess import time import urllib import warnings from email.header import Header from email.message import Message from email.mime.text import MIMEText from typing import Dict, List, Optional, Tuple, Union import...
true
true
f750d62c2329fca03ebf56eb48c7f6244af61265
3,317
py
Python
pynetworking/features/awp_interface_status_lexer.py
alliedtelesis/py-networking
6c5d4bdafabfb4feef235a02344432e1f0336e48
[ "Apache-2.0" ]
4
2015-04-24T20:36:56.000Z
2021-05-03T20:21:54.000Z
pynetworking/features/awp_interface_status_lexer.py
alliedtelesis/py-networking
6c5d4bdafabfb4feef235a02344432e1f0336e48
[ "Apache-2.0" ]
1
2019-07-14T07:07:21.000Z
2019-07-14T07:07:21.000Z
pynetworking/features/awp_interface_status_lexer.py
alliedtelesis/py-networking
6c5d4bdafabfb4feef235a02344432e1f0336e48
[ "Apache-2.0" ]
3
2015-04-24T20:37:04.000Z
2017-03-02T15:14:46.000Z
# -*- coding: utf-8 -*- import re import ply.lex as lex try: from collections import OrderedDict except ImportError: # pragma: no cover from ordereddict import OrderedDict class InterfaceStatusLexer(object): states = ( ('if', 'exclusive'), ('lo', 'exclusive'), ('vlan', 'exclusiv...
28.110169
81
0.539946
import re import ply.lex as lex try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict class InterfaceStatusLexer(object): states = ( ('if', 'exclusive'), ('lo', 'exclusive'), ('vlan', 'exclusive'), ) tokens = ( 'link', ...
true
true
f750d6ad1e45999c9e0206221e729359e5243f54
1,434
py
Python
metrics.py
bhigy/discrete-repr
3d4a4fc3833df3a1fa287c78c7402ce6df09abd4
[ "Apache-2.0" ]
1
2021-09-24T03:44:13.000Z
2021-09-24T03:44:13.000Z
metrics.py
bhigy/discrete-repr
3d4a4fc3833df3a1fa287c78c7402ce6df09abd4
[ "Apache-2.0" ]
null
null
null
metrics.py
bhigy/discrete-repr
3d4a4fc3833df3a1fa287c78c7402ce6df09abd4
[ "Apache-2.0" ]
null
null
null
from collections import Counter from itertools import groupby from math import log2 import numpy as np def segments_start(array): return [i for i in range(len(array)) if i == 0 or array[i] != array[i-1]] def split_sequences(array, start): end = start[1:] + [len(array)] return [array[s:e] for s, e in zip...
28.68
77
0.642957
from collections import Counter from itertools import groupby from math import log2 import numpy as np def segments_start(array): return [i for i in range(len(array)) if i == 0 or array[i] != array[i-1]] def split_sequences(array, start): end = start[1:] + [len(array)] return [array[s:e] for s, e in zip...
true
true
f750d83a44b20d824afbaf9fe38be0448c7e5fce
458
py
Python
Cursoemvideo/desafios/desafio031.py
gentildf/Python
bb333e55b197492eac1294619ca7b13ef57bb631
[ "MIT" ]
1
2021-03-16T13:07:29.000Z
2021-03-16T13:07:29.000Z
Cursoemvideo/desafios/desafio031.py
gentildf/Python
bb333e55b197492eac1294619ca7b13ef57bb631
[ "MIT" ]
null
null
null
Cursoemvideo/desafios/desafio031.py
gentildf/Python
bb333e55b197492eac1294619ca7b13ef57bb631
[ "MIT" ]
null
null
null
''' Desenvolva um programa que pergunte a distância de uma viagem em Km. Calcule o preço da passagem, obrando R$0,50 por Km para viagens de até 200Km e R$0,45 para viagens mais longas. ''' dist = float(input('\033[1;33mInforme a distância da viagem desejada:\033[m ')) if dist <= 200: print(('O valor da sua viagem s...
45.8
111
0.694323
dist = float(input('\033[1;33mInforme a distância da viagem desejada:\033[m ')) if dist <= 200: print(('O valor da sua viagem será de: \033[32mR${:.2f}\033[m'.format(dist*0.5))) else: print('O valor da sua viagem será de: \033[32mR${}\033[m'.format(dist*0.45))
true
true
f750d86c9cddcc067645619ba4b167eff700690a
1,490
py
Python
oscar/lib/python2.7/site-packages/django/conf/locale/el/formats.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/django/conf/locale/el/formats.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/django/conf/locale/el/formats.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd/m/Y' TIME_FORMAT = 'P' ...
38.205128
83
0.547651
from __future__ import unicode_literals DATE_FORMAT = 'd/m/Y' TIME_FORMAT = 'P' DATETIME_FORMAT = 'd/m/Y P' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j F' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT = 'd/m/Y P' FIRST_DAY_OF_WEEK = 0 DATE_INPUT_FORMATS = [ '%d/%m/%Y', '%d/%m/%y', '%Y-%m-%d', ...
true
true
f750d888603205c8ad794895675e6664fe1d9a50
5,941
py
Python
survey.py
arosswilson/think_stats
cfe8312f4bb5c45af2ccf6ed8f9692adfd0a319f
[ "MIT" ]
null
null
null
survey.py
arosswilson/think_stats
cfe8312f4bb5c45af2ccf6ed8f9692adfd0a319f
[ "MIT" ]
null
null
null
survey.py
arosswilson/think_stats
cfe8312f4bb5c45af2ccf6ed8f9692adfd0a319f
[ "MIT" ]
null
null
null
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2010 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import sys import gzip import os class Record(object): """Represents a record.""" class Respondent(Record): "...
29.854271
79
0.561017
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2010 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import sys import gzip import os class Record(object): """Represents a record.""" class Respondent(Record): "...
false
true
f750d9e49e1fd3cbc8a99c09104fd70d02d18f4e
1,881
py
Python
Instafollowbot.py
palahsu/Insta-follow-bot
a3fb61e77ca2cafabbd10e47de064115b23839c1
[ "MIT" ]
6
2021-08-04T18:06:40.000Z
2022-03-02T03:35:09.000Z
Instafollowbot.py
palahsu/Insta-follow-bot
a3fb61e77ca2cafabbd10e47de064115b23839c1
[ "MIT" ]
1
2021-11-26T14:04:33.000Z
2021-11-26T14:04:33.000Z
Instafollowbot.py
palahsu/Insta-follow-bot
a3fb61e77ca2cafabbd10e47de064115b23839c1
[ "MIT" ]
2
2021-11-27T15:46:56.000Z
2022-03-01T00:01:23.000Z
from selenium import webdriver import datetime import random import time from webdriver_manager.chrome import ChromeDriverManager #1st changer driver = webdriver.Chrome(ChromeDriverManager().install()) #2nd change driver.get('https://www.instagram.com') time.sleep(1) #auto login information def login(): ...
26.492958
84
0.64806
from selenium import webdriver import datetime import random import time from webdriver_manager.chrome import ChromeDriverManager driver = webdriver.Chrome(ChromeDriverManager().install()) driver.get('https://www.instagram.com') time.sleep(1) def login(): driver.find_element_by_name('username').send_ke...
true
true
f750daaadb7c01c845440bc8de27c1444a2c33b1
20,446
py
Python
selfdrive/thermald/thermald.py
hikee9123/openpilot_0810
47b5df273b3acfb7154331a175e67f45c7fcc8e8
[ "MIT" ]
null
null
null
selfdrive/thermald/thermald.py
hikee9123/openpilot_0810
47b5df273b3acfb7154331a175e67f45c7fcc8e8
[ "MIT" ]
null
null
null
selfdrive/thermald/thermald.py
hikee9123/openpilot_0810
47b5df273b3acfb7154331a175e67f45c7fcc8e8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import datetime import os import time from pathlib import Path from typing import Dict, Optional, Tuple from collections import namedtuple, OrderedDict import psutil from smbus2 import SMBus import cereal.messaging as messaging from cereal import log from common.filter_simple import FirstOrderF...
41.388664
160
0.732466
import datetime import os import time from pathlib import Path from typing import Dict, Optional, Tuple from collections import namedtuple, OrderedDict import psutil from smbus2 import SMBus import cereal.messaging as messaging from cereal import log from common.filter_simple import FirstOrderFilter from common.numpy...
true
true
f750db025f122ca96e33d1bf2e5d389255b3eb62
2,620
py
Python
code/realtime.py
shivammalviya712/Real-Time-Trigger-Word-Detection
7ad9144d31ef407f7326750633471dcb30cb5e46
[ "MIT" ]
9
2020-05-05T08:49:15.000Z
2021-09-29T02:52:39.000Z
code/realtime.py
shivammalviya712/Real-Time-Trigger-Word-Detection
7ad9144d31ef407f7326750633471dcb30cb5e46
[ "MIT" ]
4
2020-04-13T13:18:08.000Z
2020-04-22T18:24:52.000Z
code/realtime.py
shivammalviya712/Real-Time-Trigger-Word-Detection
7ad9144d31ef407f7326750633471dcb30cb5e46
[ "MIT" ]
6
2020-08-29T15:55:34.000Z
2021-11-10T13:46:39.000Z
"""Implement the model in real time.""" # Third party modules import matplotlib.pyplot as plt import numpy as np import sounddevice as sd from pydub import AudioSegment from pydub.playback import play class Realtime: """Implement the modle in real time.""" def __init__(self, settings): """Intiallise ...
29.438202
73
0.548092
import matplotlib.pyplot as plt import numpy as np import sounddevice as sd from pydub import AudioSegment from pydub.playback import play class Realtime: def __init__(self, settings): self.Ty = settings.Ty self.Tx = settings.Tx self.Tnew = settings.Tnew self.n_freq = settings.n_f...
true
true
f750db071a98dcea7442a411a96640313bc823c0
1,100
py
Python
iqt/feed/api/generic/warmup.py
yt7589/iching
6673da38f4c80e7fd297c86fedc5616aee8ac09b
[ "Apache-2.0" ]
32
2020-04-14T08:32:18.000Z
2022-02-09T07:05:08.000Z
iqt/feed/api/generic/warmup.py
yt7589/iching
6673da38f4c80e7fd297c86fedc5616aee8ac09b
[ "Apache-2.0" ]
1
2020-04-08T10:42:15.000Z
2020-04-15T01:38:03.000Z
iqt/feed/api/generic/warmup.py
yt7589/iching
6673da38f4c80e7fd297c86fedc5616aee8ac09b
[ "Apache-2.0" ]
4
2020-08-25T03:56:46.000Z
2021-05-11T05:55:51.000Z
""" warmup.py contains classes for warm up stream operations. """ import numpy as np from iqt.feed.core.base import Stream, T class WarmUp(Stream[T]): """A stream operator for warming up a given stream. Parameters ---------- periods : int Number of periods to warm up. """ def __ini...
20
57
0.559091
import numpy as np from iqt.feed.core.base import Stream, T class WarmUp(Stream[T]): def __init__(self, periods: int) -> None: super().__init__() self.count = 0 self.periods = periods def forward(self) -> T: v = self.inputs[0].value if self.count < self.periods: ...
true
true