hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72a3383995074634d5dafb504c727c501dbf175
3,484
py
Python
tests/manage/rgw/test_bucket_deletion.py
prsurve/ocs-ci
a8e229755e1f9d43c8c71e5ba693cb14bfb38aed
[ "MIT" ]
null
null
null
tests/manage/rgw/test_bucket_deletion.py
prsurve/ocs-ci
a8e229755e1f9d43c8c71e5ba693cb14bfb38aed
[ "MIT" ]
null
null
null
tests/manage/rgw/test_bucket_deletion.py
prsurve/ocs-ci
a8e229755e1f9d43c8c71e5ba693cb14bfb38aed
[ "MIT" ]
null
null
null
import logging import botocore import pytest from flaky import flaky from ocs_ci.ocs.bucket_utils import retrieve_test_objects_to_pod, sync_object_directory from ocs_ci.framework import config from ocs_ci.framework.pytest_customization.marks import acceptance, tier1, tier3 from ocs_ci.ocs.exceptions import CommandFai...
34.156863
98
0.581803
import logging import botocore import pytest from flaky import flaky from ocs_ci.ocs.bucket_utils import retrieve_test_objects_to_pod, sync_object_directory from ocs_ci.framework import config from ocs_ci.framework.pytest_customization.marks import acceptance, tier1, tier3 from ocs_ci.ocs.exceptions import CommandFai...
true
true
f72a33b918735569e106f2221c7a10a6e1392d92
1,864
py
Python
tests/test_transforms_resize_modulo_pad_crop.py
civodlu/trw
b9a1cf045f61d6df9c65c014ef63b4048972dcdc
[ "MIT" ]
3
2019-07-04T01:20:41.000Z
2020-01-27T02:36:12.000Z
tests/test_transforms_resize_modulo_pad_crop.py
civodlu/trw
b9a1cf045f61d6df9c65c014ef63b4048972dcdc
[ "MIT" ]
null
null
null
tests/test_transforms_resize_modulo_pad_crop.py
civodlu/trw
b9a1cf045f61d6df9c65c014ef63b4048972dcdc
[ "MIT" ]
2
2020-10-19T13:46:06.000Z
2021-12-27T02:18:10.000Z
import unittest import trw import torch import numpy as np class TestTransformsResizeModuloPadCrop(unittest.TestCase): def test_crop_mode_torch(self): batch = { 'images': torch.rand([2, 3, 64, 64], dtype=torch.float32) } tfm = trw.transforms.TransformResizeModuloCropPad(60) ...
34.518519
73
0.603541
import unittest import trw import torch import numpy as np class TestTransformsResizeModuloPadCrop(unittest.TestCase): def test_crop_mode_torch(self): batch = { 'images': torch.rand([2, 3, 64, 64], dtype=torch.float32) } tfm = trw.transforms.TransformResizeModuloCropPad(60) ...
true
true
f72a348b9cd34cfd35f617a68b5a5d79dd7ba065
1,758
py
Python
biokit/services/coding_sequences/gc_content_second_position.py
JLSteenwyk/BioKIT
9ca31d8003dc845bf56b2c56c87820c0b05021c4
[ "MIT" ]
8
2021-10-03T21:08:33.000Z
2021-12-02T17:15:32.000Z
biokit/services/coding_sequences/gc_content_second_position.py
JLSteenwyk/BioKIT
9ca31d8003dc845bf56b2c56c87820c0b05021c4
[ "MIT" ]
null
null
null
biokit/services/coding_sequences/gc_content_second_position.py
JLSteenwyk/BioKIT
9ca31d8003dc845bf56b2c56c87820c0b05021c4
[ "MIT" ]
5
2021-10-05T06:25:03.000Z
2022-01-04T11:01:09.000Z
import re from .base import CodingSequence from ...helpers.files import read_and_parse_fasta_seqio class GCContentSecondPosition(CodingSequence): def __init__(self, args) -> None: super().__init__(**self.process_args(args)) def run(self): # create biopython object of sequences record...
32.555556
86
0.612628
import re from .base import CodingSequence from ...helpers.files import read_and_parse_fasta_seqio class GCContentSecondPosition(CodingSequence): def __init__(self, args) -> None: super().__init__(**self.process_args(args)) def run(self): records = read_and_parse_fasta_seqio(self.fa...
true
true
f72a34a439b3448174e70d31de729aeadbb9686e
187
py
Python
PCTC/2018 R2/Q5.py
object-oriented-human/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
1
2022-02-21T15:43:01.000Z
2022-02-21T15:43:01.000Z
PCTC/2018 R2/Q5.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
PCTC/2018 R2/Q5.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
d = dict() l = [] for i in range(int(input())): x, y = input().split() d[y] = x l.append(y) l.sort() for i in range(len(l)): if d[l[i]] == "Percy": print(i+1) break
13.357143
29
0.481283
d = dict() l = [] for i in range(int(input())): x, y = input().split() d[y] = x l.append(y) l.sort() for i in range(len(l)): if d[l[i]] == "Percy": print(i+1) break
true
true
f72a34a70be9391c0ff557e2faf72cca8765883e
2,747
py
Python
challenge.py
DaneliaSanchz/challenge-python-07
73b11936bf8fff81f99c271b2bf1c244706af207
[ "MIT" ]
null
null
null
challenge.py
DaneliaSanchz/challenge-python-07
73b11936bf8fff81f99c271b2bf1c244706af207
[ "MIT" ]
null
null
null
challenge.py
DaneliaSanchz/challenge-python-07
73b11936bf8fff81f99c271b2bf1c244706af207
[ "MIT" ]
null
null
null
DATA = [ { 'name': 'Facundo', 'age': 72, 'organization': 'Platzi', 'position': 'Technical Mentor', 'language': 'python', }, { 'name': 'Luisana', 'age': 33, 'organization': 'Globant', 'position': 'UX Designer', 'language': 'javas...
21.801587
94
0.486713
DATA = [ { 'name': 'Facundo', 'age': 72, 'organization': 'Platzi', 'position': 'Technical Mentor', 'language': 'python', }, { 'name': 'Luisana', 'age': 33, 'organization': 'Globant', 'position': 'UX Designer', 'language': 'javas...
true
true
f72a34fcaec6d61776028925ec6417f22ff909c9
30,977
py
Python
flask/lib/python3.4/site-packages/babel/messages/catalog.py
ddayguerrero/blogme
e6ee6a47310c382648eefd96634630c3bceb864f
[ "MIT" ]
null
null
null
flask/lib/python3.4/site-packages/babel/messages/catalog.py
ddayguerrero/blogme
e6ee6a47310c382648eefd96634630c3bceb864f
[ "MIT" ]
null
null
null
flask/lib/python3.4/site-packages/babel/messages/catalog.py
ddayguerrero/blogme
e6ee6a47310c382648eefd96634630c3bceb864f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ babel.messages.catalog ~~~~~~~~~~~~~~~~~~~~~~ Data structures for message catalogs. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ import re import time from cgi import parse_header from datetime import datetime, time as time_...
37.776829
80
0.569067
import re import time from cgi import parse_header from datetime import datetime, time as time_ from difflib import get_close_matches from email import message_from_string from copy import copy from babel import __version__ as VERSION from babel.core import Locale from babel.dates import format_datetime from babel....
true
true
f72a350db1ba57a29e227da4a2688911fa9f59a9
1,600
py
Python
app/api/db_config.py
gatemadavid/iReporter2
31ee2295a10c074bbf3b5b857240ec65ca9689e9
[ "MIT" ]
null
null
null
app/api/db_config.py
gatemadavid/iReporter2
31ee2295a10c074bbf3b5b857240ec65ca9689e9
[ "MIT" ]
null
null
null
app/api/db_config.py
gatemadavid/iReporter2
31ee2295a10c074bbf3b5b857240ec65ca9689e9
[ "MIT" ]
null
null
null
import psycopg2 import psycopg2.extras import os url = os.getenv('DATABASE_URL') def connection(url): conn = psycopg2.connect(url) return conn def init_db(): con = connection(url) return con def create_tables(): conn = connection(url) curr = conn.cursor() queries = tables() for qu...
25.396825
67
0.636875
import psycopg2 import psycopg2.extras import os url = os.getenv('DATABASE_URL') def connection(url): conn = psycopg2.connect(url) return conn def init_db(): con = connection(url) return con def create_tables(): conn = connection(url) curr = conn.cursor() queries = tables() for qu...
true
true
f72a355540cc984f158300eaacfdbb6e9b3587e6
2,682
py
Python
apps/points/models.py
stasm/akupunktura
5cf8b98dbb01a65db48c8f582f1592c680c47eba
[ "BSD-3-Clause" ]
1
2015-05-14T19:10:29.000Z
2015-05-14T19:10:29.000Z
apps/points/models.py
stasm/akupunktura
5cf8b98dbb01a65db48c8f582f1592c680c47eba
[ "BSD-3-Clause" ]
null
null
null
apps/points/models.py
stasm/akupunktura
5cf8b98dbb01a65db48c8f582f1592c680c47eba
[ "BSD-3-Clause" ]
null
null
null
from datetime import datetime from django.db import models from django.contrib.auth.models import User class PointManager(models.Manager): """Manager for Pressure Points.""" def recently_added(self, count=10): return self.order_by('-time_added')[:count] class City(models.Model): """City the Press...
30.827586
76
0.690902
from datetime import datetime from django.db import models from django.contrib.auth.models import User class PointManager(models.Manager): def recently_added(self, count=10): return self.order_by('-time_added')[:count] class City(models.Model): name = models.CharField(max_length=200) slug = model...
true
true
f72a35b4e1de51ead743b2099fba5d0628b7e0b3
214
py
Python
app/api.py
jecklgamis/flask-example-app
025f60d812acae1eb33263de3339ac8e37096a54
[ "Apache-2.0" ]
6
2019-11-25T08:46:03.000Z
2021-12-28T07:30:50.000Z
app/api.py
jecklgamis/flask-example-app
025f60d812acae1eb33263de3339ac8e37096a54
[ "Apache-2.0" ]
null
null
null
app/api.py
jecklgamis/flask-example-app
025f60d812acae1eb33263de3339ac8e37096a54
[ "Apache-2.0" ]
1
2021-12-26T21:36:51.000Z
2021-12-26T21:36:51.000Z
from flask import Blueprint bp = Blueprint('api', __name__, url_prefix='/api') from flask import jsonify @bp.route('/', methods=['GET']) def index(): return jsonify({"message": "This is the /api endpoint"})
21.4
60
0.682243
from flask import Blueprint bp = Blueprint('api', __name__, url_prefix='/api') from flask import jsonify @bp.route('/', methods=['GET']) def index(): return jsonify({"message": "This is the /api endpoint"})
true
true
f72a37822a8c5d59218999e0dc281e80546e9c72
5,010
py
Python
cmatch.py
kitneylab/cmatch
6c804c2ca58f5e8ccde68c14182bebcb43ad69b4
[ "MIT" ]
null
null
null
cmatch.py
kitneylab/cmatch
6c804c2ca58f5e8ccde68c14182bebcb43ad69b4
[ "MIT" ]
null
null
null
cmatch.py
kitneylab/cmatch
6c804c2ca58f5e8ccde68c14182bebcb43ad69b4
[ "MIT" ]
null
null
null
#!/usr/bin/env python import json import logging import os from os import path from pathlib import Path import time from reconstruction import reconstruct from futils import timeit from tqdm import tqdm from matching import Library, Sequence, match_library import plac # Logging configuration current_file = path.b...
26.368421
85
0.612774
import json import logging import os from os import path from pathlib import Path import time from reconstruction import reconstruct from futils import timeit from tqdm import tqdm from matching import Library, Sequence, match_library import plac current_file = path.basename(__file__).split(".")[0] @timeit de...
true
true
f72a37e5373aa4e623b73750d93d8aba42a35bcd
929
py
Python
jobs/pitch_deformer.py
nSimonFR/spoken_language_dataset
07c018f28be72cec3ba5e9ec07608f79a6d32031
[ "MIT" ]
23
2018-06-25T10:22:57.000Z
2021-07-09T09:53:47.000Z
jobs/pitch_deformer.py
nSimonFR/spoken_language_dataset
07c018f28be72cec3ba5e9ec07608f79a6d32031
[ "MIT" ]
3
2018-07-19T18:47:07.000Z
2021-06-01T22:11:53.000Z
jobs/pitch_deformer.py
nSimonFR/spoken_language_dataset
07c018f28be72cec3ba5e9ec07608f79a6d32031
[ "MIT" ]
6
2018-07-14T17:48:51.000Z
2020-12-24T01:31:41.000Z
from . import common from audio_toolbox import sox class PitchDeformer: SUFFIX = '.pitch@n' def __init__(self, input_files_key, output_files_key, semitones): self.input_files_key = input_files_key self.output_files_key = output_files_key self.semitones = semitones def execute(sel...
33.178571
76
0.665231
from . import common from audio_toolbox import sox class PitchDeformer: SUFFIX = '.pitch@n' def __init__(self, input_files_key, output_files_key, semitones): self.input_files_key = input_files_key self.output_files_key = output_files_key self.semitones = semitones def execute(sel...
true
true
f72a37ebb93db977a1a827e2699a50ef563720f7
4,654
py
Python
app/user/tests/test_user_api.py
gmarshall142/appservices
2dae37dfe6693a3f61f3561cabfaff78ad7616e4
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
gmarshall142/appservices
2dae37dfe6693a3f61f3561cabfaff78ad7616e4
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
gmarshall142/appservices
2dae37dfe6693a3f61f3561cabfaff78ad7616e4
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params)...
37.232
77
0.662226
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params)...
true
true
f72a38772dfca7924eadc81291de0091589ed69c
1,788
py
Python
samples/generated_samples/aiplatform_generated_aiplatform_v1_job_service_delete_hyperparameter_tuning_job_async.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
180
2020-09-23T17:21:15.000Z
2022-03-30T17:25:47.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1_job_service_delete_hyperparameter_tuning_job_async.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
601
2020-09-23T16:23:44.000Z
2022-03-31T19:08:23.000Z
samples/generated_samples/aiplatform_generated_aiplatform_v1_job_service_delete_hyperparameter_tuning_job_async.py
lclc19/python-aiplatform
d8da2e365277441abadb04328943f23345d72b0e
[ "Apache-2.0" ]
109
2020-09-23T16:22:04.000Z
2022-03-28T21:18:29.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.76
108
0.779083
from google.cloud import aiplatform_v1 async def sample_delete_hyperparameter_tuning_job(): client = aiplatform_v1.JobServiceAsyncClient() request = aiplatform_v1.DeleteHyperparameterTuningJobRequest( name="projects/{project}/locations/{location}/hyperparameterTun...
true
true
f72a38aef278e33aedce4abdf04469c32de8d0bd
1,510
py
Python
minecraft/config.py
leosumi/Minecraft
4215bf0fe0b0e2fd386b1990a4589afc239879a7
[ "MIT" ]
null
null
null
minecraft/config.py
leosumi/Minecraft
4215bf0fe0b0e2fd386b1990a4589afc239879a7
[ "MIT" ]
null
null
null
minecraft/config.py
leosumi/Minecraft
4215bf0fe0b0e2fd386b1990a4589afc239879a7
[ "MIT" ]
null
null
null
import math import configparser from util import tex_coords CONFIG_PATH = "config.ini" config = configparser.ConfigParser() config.read(CONFIG_PATH) WIDTH = config.getint("window", "width") HEIGHT = config.getint("window", "height") CAPTION = config["window"]["caption"] TICKS_PER_SEC = config.getint("game", "ticks_...
29.038462
93
0.662252
import math import configparser from util import tex_coords CONFIG_PATH = "config.ini" config = configparser.ConfigParser() config.read(CONFIG_PATH) WIDTH = config.getint("window", "width") HEIGHT = config.getint("window", "height") CAPTION = config["window"]["caption"] TICKS_PER_SEC = config.getint("game", "ticks_...
true
true
f72a39b2dc13c27df0c09468e6d52f23ae747f9d
10,696
py
Python
packages/amplify-graphql-searchable-transformer/streaming-lambda/python_streaming_function.py
jcbdev/amplify-cli
08f7a3c45b2e98535ef325eb0a97c5bc4d3008c6
[ "Apache-2.0", "MIT" ]
null
null
null
packages/amplify-graphql-searchable-transformer/streaming-lambda/python_streaming_function.py
jcbdev/amplify-cli
08f7a3c45b2e98535ef325eb0a97c5bc4d3008c6
[ "Apache-2.0", "MIT" ]
null
null
null
packages/amplify-graphql-searchable-transformer/streaming-lambda/python_streaming_function.py
jcbdev/amplify-cli
08f7a3c45b2e98535ef325eb0a97c5bc4d3008c6
[ "Apache-2.0", "MIT" ]
null
null
null
import base64 import json import logging import os import time import traceback from urllib.parse import urlparse, quote from botocore.auth import SigV4Auth from botocore.awsrequest import AWSRequest from botocore.credentials import get_credentials from botocore.endpoint import BotocoreHTTPSession from botocore.sessio...
41.457364
122
0.63089
import base64 import json import logging import os import time import traceback from urllib.parse import urlparse, quote from botocore.auth import SigV4Auth from botocore.awsrequest import AWSRequest from botocore.credentials import get_credentials from botocore.endpoint import BotocoreHTTPSession from botocore.sessio...
true
true
f72a3a7ba2336005b049f9e3a57c4f4b44ad48b8
47
py
Python
docs/test-dataset/code/some-code.py
slugb0t/SODA-for-SPARC
f2dd5f5817984ca0a500dd628f8055a6a0d1ff48
[ "MIT" ]
16
2019-11-19T02:19:16.000Z
2022-01-09T04:51:50.000Z
docs/test-dataset/code/some-code.py
slugb0t/SODA-for-SPARC
f2dd5f5817984ca0a500dd628f8055a6a0d1ff48
[ "MIT" ]
6
2020-06-17T19:37:08.000Z
2021-08-03T21:01:25.000Z
docs/test-dataset/code/some-code.py
slugb0t/SODA-for-SPARC
f2dd5f5817984ca0a500dd628f8055a6a0d1ff48
[ "MIT" ]
7
2019-11-08T20:45:32.000Z
2021-09-15T22:45:18.000Z
print('Hello! This is an example python file.')
47
47
0.744681
print('Hello! This is an example python file.')
true
true
f72a3bfc43a32b945e3678a36f687019936e886c
2,966
py
Python
nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py
nicholsn/nipype
6601b00aac39d17bb9fb3a6801f5a740a6ebb1e3
[ "BSD-3-Clause" ]
1
2018-04-18T12:13:37.000Z
2018-04-18T12:13:37.000Z
nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py
ito-takuya/nipype
9099a5809487b55868cdec82a719030419cbd6ba
[ "BSD-3-Clause" ]
null
null
null
nipype/interfaces/freesurfer/tests/test_auto_SurfaceSnapshots.py
ito-takuya/nipype
9099a5809487b55868cdec82a719030419cbd6ba
[ "BSD-3-Clause" ]
1
2021-09-08T14:31:47.000Z
2021-09-08T14:31:47.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.freesurfer.utils import SurfaceSnapshots def test_SurfaceSnapshots_inputs(): input_map = dict(annot_file=dict(argstr='-annotation %s', xor=['annot_name'], ), annot_name=dict(argstr='-ann...
26.720721
78
0.631827
from nipype.testing import assert_equal from nipype.interfaces.freesurfer.utils import SurfaceSnapshots def test_SurfaceSnapshots_inputs(): input_map = dict(annot_file=dict(argstr='-annotation %s', xor=['annot_name'], ), annot_name=dict(argstr='-annotation %s', xor=['annot_file'], ), args=...
true
true
f72a3c91953b5858fea12c86441ca8a3375897bc
420
py
Python
examples/quantum/hydrogen.py
olivierverdier/sfepy
83aefb7b33ea17f4acb83388ba8bc7314c77616c
[ "BSD-3-Clause" ]
1
2015-07-30T13:47:23.000Z
2015-07-30T13:47:23.000Z
examples/quantum/hydrogen.py
olivierverdier/sfepy
83aefb7b33ea17f4acb83388ba8bc7314c77616c
[ "BSD-3-Clause" ]
null
null
null
examples/quantum/hydrogen.py
olivierverdier/sfepy
83aefb7b33ea17f4acb83388ba8bc7314c77616c
[ "BSD-3-Clause" ]
null
null
null
from sfepy.linalg import norm_l2_along_axis from quantum_common import common def fun_v(ts, coor, mode=None, region=None, ig=None): from numpy import sqrt if not mode == 'qp': return out = {} C = 0.5 r = norm_l2_along_axis(coor, axis=1) V = - C * 1.0 / r V.shape = (V.shape[0], 1, 1) ...
18.26087
53
0.597619
from sfepy.linalg import norm_l2_along_axis from quantum_common import common def fun_v(ts, coor, mode=None, region=None, ig=None): from numpy import sqrt if not mode == 'qp': return out = {} C = 0.5 r = norm_l2_along_axis(coor, axis=1) V = - C * 1.0 / r V.shape = (V.shape[0], 1, 1) ...
true
true
f72a3ca047444fe42cfb054b4d7ce31ac8ea8792
322
py
Python
djthia/dashboard/urls.py
carthage-college/django-djthia
a10026b305aa75e20d2ea8c5d3e7ad03c05f10f5
[ "MIT" ]
null
null
null
djthia/dashboard/urls.py
carthage-college/django-djthia
a10026b305aa75e20d2ea8c5d3e7ad03c05f10f5
[ "MIT" ]
9
2020-08-02T13:58:23.000Z
2022-02-15T15:30:58.000Z
djthia/dashboard/urls.py
carthage-college/django-djthia
a10026b305aa75e20d2ea8c5d3e7ad03c05f10f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """URLs for all views.""" from django.urls import path from djthia.dashboard import views urlpatterns = [ path('<str:oid>/detail/', views.detail, name='gearup_detail'), path('search/', views.search, name='gearup_search'), path('', views.home, name='dashboard_home'), ]...
23
67
0.630435
from django.urls import path from djthia.dashboard import views urlpatterns = [ path('<str:oid>/detail/', views.detail, name='gearup_detail'), path('search/', views.search, name='gearup_search'), path('', views.home, name='dashboard_home'), ]
true
true
f72a3ce19ca0b74533a7945aaed6c0b03ba83aa2
33,034
py
Python
optuna/storages/rdb/storage.py
scouvreur/optuna
41716fe394aca87e5dce465443ac72ed53891a44
[ "MIT" ]
null
null
null
optuna/storages/rdb/storage.py
scouvreur/optuna
41716fe394aca87e5dce465443ac72ed53891a44
[ "MIT" ]
null
null
null
optuna/storages/rdb/storage.py
scouvreur/optuna
41716fe394aca87e5dce465443ac72ed53891a44
[ "MIT" ]
null
null
null
import alembic.command import alembic.config import alembic.migration import alembic.script from collections import defaultdict import copy from datetime import datetime import json import logging import os import six from sqlalchemy.engine import create_engine from sqlalchemy.engine import Engine # NOQA from sqlalche...
36.62306
99
0.647908
import alembic.command import alembic.config import alembic.migration import alembic.script from collections import defaultdict import copy from datetime import datetime import json import logging import os import six from sqlalchemy.engine import create_engine from sqlalchemy.engine import Engine from sqlalchemy.exc...
true
true
f72a3dab5f6feb060e408b3588fb869452950336
1,352
py
Python
src/main.py
dex73r/ghdown
b1e72b95e10d8d7d2d41cb4e8558cb29c018ac81
[ "MIT" ]
null
null
null
src/main.py
dex73r/ghdown
b1e72b95e10d8d7d2d41cb4e8558cb29c018ac81
[ "MIT" ]
null
null
null
src/main.py
dex73r/ghdown
b1e72b95e10d8d7d2d41cb4e8558cb29c018ac81
[ "MIT" ]
null
null
null
import argparse import os import requests from git import Repo def main(): parser = argparse.ArgumentParser(description="A tool to clone github only repositories of user or group") parser.add_argument("--u", help="target of massive download", dest='target', required=True) parser.ad...
30.727273
109
0.572485
import argparse import os import requests from git import Repo def main(): parser = argparse.ArgumentParser(description="A tool to clone github only repositories of user or group") parser.add_argument("--u", help="target of massive download", dest='target', required=True) parser.ad...
true
true
f72a3ef23ff298d116c3a38c8d217d46311ba4f3
789
py
Python
socialcops/api/config.py
yutiansut/Long-Running-Jobs-Manager
ed12bebb7872b95e1f65548be4a00715f2ad47a6
[ "MIT" ]
1
2019-09-15T19:52:10.000Z
2019-09-15T19:52:10.000Z
socialcops/api/config.py
yutiansut/Long-Running-Jobs-Manager
ed12bebb7872b95e1f65548be4a00715f2ad47a6
[ "MIT" ]
null
null
null
socialcops/api/config.py
yutiansut/Long-Running-Jobs-Manager
ed12bebb7872b95e1f65548be4a00715f2ad47a6
[ "MIT" ]
1
2019-09-15T19:53:04.000Z
2019-09-15T19:53:04.000Z
import os basedir = os.path.abspath(os.path.dirname(__file__)) # Keeping track of various configurations of the Flask app class Config(object): ALLOWED_EXTENSIONS = set(['csv']) UPLOAD_FOLDER = './files/uploads/' DOWNLOAD_FOLDER = './files/downloads/' SECRET_KEY = os.environ.get('SECRET_KEY') or \ ...
41.526316
72
0.695817
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): ALLOWED_EXTENSIONS = set(['csv']) UPLOAD_FOLDER = './files/uploads/' DOWNLOAD_FOLDER = './files/downloads/' SECRET_KEY = os.environ.get('SECRET_KEY') or \ 'uUHQMFSPB9H7G4bGwzFLDetrIyb4M8tj' SQLALCHEMY_DATA...
true
true
f72a41c562cc666e7693a5618222e1ff98c66a18
1,240
py
Python
Configuration/Generator/python/QCD_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/Generator/python/QCD_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/Generator/python/QCD_Pt_3000_3500_14TeV_TuneCUETP8M1_cfi.py
Purva-Chaudhari/cmssw
32e5cbfe54c4d809d60022586cf200b7c3020bcf
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter", pythiaHepMCVerbosity = cms.untracked.bool(False), ...
45.925926
89
0.549194
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * generator = cms.EDFilter("Pythia8ConcurrentGeneratorFilter", pythiaHepMCVerbosity = cms.untracked.bool(False), ...
true
true
f72a42c2e1e5a77f302472332be6e9a10fe5c67c
15,891
py
Python
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_image_operations.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_image_operations.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/custom_image_operations.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
44.388268
149
0.646655
from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller import uuid from .. import models class CustomImageOperations(object): def __init__(self, client, config, serializer, deserializer): ...
true
true
f72a42f0de9fa77c288318b1b5d013ccfb8f3bf4
771
py
Python
setup.py
littleq0903/django-gcloud-storage
52e4a4a6773a5e79cf3fec19dcc1290e65942a70
[ "MIT" ]
3
2015-01-08T09:13:12.000Z
2020-11-27T16:23:09.000Z
setup.py
littleq0903/django-gcloud-storage
52e4a4a6773a5e79cf3fec19dcc1290e65942a70
[ "MIT" ]
1
2015-02-25T05:03:02.000Z
2019-02-08T07:00:35.000Z
setup.py
littleq0903/django-gcloud-storage
52e4a4a6773a5e79cf3fec19dcc1290e65942a70
[ "MIT" ]
1
2015-02-25T03:55:54.000Z
2015-02-25T03:55:54.000Z
from setuptools import setup, find_packages import django_gcs setup_options = { 'name': 'django-gcloud-storage', 'version': django_gcs.__version__, 'packages': find_packages(), 'author': 'Colin Su', 'author_email': 'littleq0903@gmail.com', 'license': 'MIT', 'de...
28.555556
70
0.574578
from setuptools import setup, find_packages import django_gcs setup_options = { 'name': 'django-gcloud-storage', 'version': django_gcs.__version__, 'packages': find_packages(), 'author': 'Colin Su', 'author_email': 'littleq0903@gmail.com', 'license': 'MIT', 'de...
true
true
f72a43f375f75914487974a4a07a4ec77f462c62
1,509
py
Python
src/word_processing.py
bsbhaskar/product_review_sentiments
46de372f4d410f44e487c92b9279cf13c33d4cd1
[ "MIT" ]
2
2018-06-07T21:55:33.000Z
2018-09-15T08:33:53.000Z
src/word_processing.py
bsbhaskar/product_review_sentiments
46de372f4d410f44e487c92b9279cf13c33d4cd1
[ "MIT" ]
null
null
null
src/word_processing.py
bsbhaskar/product_review_sentiments
46de372f4d410f44e487c92b9279cf13c33d4cd1
[ "MIT" ]
null
null
null
import string import spacy import pickle from nltk.stem.wordnet import WordNetLemmatizer from gensim.models import Phrases, Word2Vec from nltk.corpus import stopwords import warnings warnings.filterwarnings("ignore") class WordProcessor(): ''' This is a utility class that loads data related to processing words...
41.916667
361
0.640822
import string import spacy import pickle from nltk.stem.wordnet import WordNetLemmatizer from gensim.models import Phrases, Word2Vec from nltk.corpus import stopwords import warnings warnings.filterwarnings("ignore") class WordProcessor(): def __init__(self): self.nlp = spacy.load("en") self.stop...
true
true
f72a44144e09def7c3fe812e31e7c8bfecf516d8
1,536
py
Python
auth0login/auth0backend.py
chop-dbhi/biorepo-portal
7db13c40b2b9d62af43a28e4af08c2472b98fc96
[ "BSD-2-Clause" ]
6
2016-10-26T19:51:11.000Z
2021-03-18T16:05:55.000Z
auth0login/auth0backend.py
chop-dbhi/biorepo-portal
7db13c40b2b9d62af43a28e4af08c2472b98fc96
[ "BSD-2-Clause" ]
207
2015-09-24T17:41:37.000Z
2021-05-18T18:14:08.000Z
auth0login/auth0backend.py
chop-dbhi/biorepo-portal
7db13c40b2b9d62af43a28e4af08c2472b98fc96
[ "BSD-2-Clause" ]
8
2016-04-27T19:04:50.000Z
2020-08-24T02:33:05.000Z
# auth0login/auth0backend.py from urllib import request from jose import jwt from social_core.backends.oauth import BaseOAuth2 from accounts.models import UserProfile class Auth0(BaseOAuth2): """Auth0 OAuth authentication backend""" name = 'auth0' SCOPE_SEPARATOR = ' ' ACCESS_TOKEN_METHOD = 'POST' ...
34.133333
107
0.609375
from urllib import request from jose import jwt from social_core.backends.oauth import BaseOAuth2 from accounts.models import UserProfile class Auth0(BaseOAuth2): name = 'auth0' SCOPE_SEPARATOR = ' ' ACCESS_TOKEN_METHOD = 'POST' REDIRECT_STATE = False EXTRA_DATA = [ ('picture', 'picture...
true
true
f72a441d3477b4777d617b49034762570f7ca082
15,410
py
Python
pydevices/MitDevices/picam.py
consorzio-rfx/mdsplus
81cdbfc759d92b101d84328e6eb7b3a6e6e22103
[ "BSD-2-Clause" ]
null
null
null
pydevices/MitDevices/picam.py
consorzio-rfx/mdsplus
81cdbfc759d92b101d84328e6eb7b3a6e6e22103
[ "BSD-2-Clause" ]
null
null
null
pydevices/MitDevices/picam.py
consorzio-rfx/mdsplus
81cdbfc759d92b101d84328e6eb7b3a6e6e22103
[ "BSD-2-Clause" ]
null
null
null
# # Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list ...
44.028571
177
0.635237
import MDSplus import ctypes def pointer(x): """Returns a ctypes pointer""" ptr = ctypes.pointer(x) return ptr def kill(proc_pid): import psutil process = psutil.Process(proc_pid) print "Process is ", process for proc in process.children(recursive=True): p...
false
true
f72a4476249a5b91384f4535c7234e7f722e0b67
19,874
py
Python
tests/test_cognitoidp/test_cognitoidp.py
alexsult/moto
ed861ecae1039a048a6350a4ff832ef094cdf2c2
[ "Apache-2.0" ]
null
null
null
tests/test_cognitoidp/test_cognitoidp.py
alexsult/moto
ed861ecae1039a048a6350a4ff832ef094cdf2c2
[ "Apache-2.0" ]
5
2018-04-25T21:04:20.000Z
2018-11-02T19:59:27.000Z
tests/test_cognitoidp/test_cognitoidp.py
alexsult/moto
ed861ecae1039a048a6350a4ff832ef094cdf2c2
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import boto3 import json import os import uuid from jose import jws from moto import mock_cognitoidp import sure # noqa @mock_cognitoidp def test_create_user_pool(): conn = boto3.client("cognito-idp", "us-west-2") name = str(uuid.uuid4()) value = str(uuid.uuid4...
33.013289
93
0.690601
from __future__ import unicode_literals import boto3 import json import os import uuid from jose import jws from moto import mock_cognitoidp import sure @mock_cognitoidp def test_create_user_pool(): conn = boto3.client("cognito-idp", "us-west-2") name = str(uuid.uuid4()) value = str(uuid.uuid4()) ...
true
true
f72a47612f3599e9c27c19fedb85a488b08046a6
1,760
py
Python
tests/test_buildsets.py
MichalMilewicz/tungsten-ci-dashboard
67ca8e39855009ab7b4d603b691ea910ee6efbbc
[ "Apache-2.0" ]
null
null
null
tests/test_buildsets.py
MichalMilewicz/tungsten-ci-dashboard
67ca8e39855009ab7b4d603b691ea910ee6efbbc
[ "Apache-2.0" ]
null
null
null
tests/test_buildsets.py
MichalMilewicz/tungsten-ci-dashboard
67ca8e39855009ab7b4d603b691ea910ee6efbbc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import unittest from unittest.mock import MagicMock, patch from dashboard.exceptions import PageOutOfRange from dashboard.history import BuildSetsPaginated class TestBuildSets(unittest.TestCase): @patch('dashboard.model.ZuulBuildSet.get_for_pipeline') def test_create_buildsets_history...
34.509804
76
0.715909
import unittest from unittest.mock import MagicMock, patch from dashboard.exceptions import PageOutOfRange from dashboard.history import BuildSetsPaginated class TestBuildSets(unittest.TestCase): @patch('dashboard.model.ZuulBuildSet.get_for_pipeline') def test_create_buildsets_history_object(self, get_for_p...
true
true
f72a484fe9c2c76a51236db7ad5259bebcb0d8f6
4,602
py
Python
dataservice/api/outcome/resources.py
ConnorBarnhill/kf-api-dataservice
547df467a307788882469a25c947a14965a26336
[ "Apache-2.0" ]
6
2018-01-25T13:49:24.000Z
2020-03-07T16:25:09.000Z
dataservice/api/outcome/resources.py
ConnorBarnhill/kf-api-dataservice
547df467a307788882469a25c947a14965a26336
[ "Apache-2.0" ]
369
2018-01-17T15:22:18.000Z
2022-03-10T19:14:56.000Z
dataservice/api/outcome/resources.py
ConnorBarnhill/kf-api-dataservice
547df467a307788882469a25c947a14965a26336
[ "Apache-2.0" ]
3
2018-04-11T14:18:37.000Z
2018-10-31T19:09:48.000Z
from flask import abort, request from marshmallow import ValidationError from webargs.flaskparser import use_args from dataservice.extensions import db from dataservice.api.common.pagination import paginated, Pagination from dataservice.api.outcome.models import Outcome from dataservice.api.outcome.schemas import Outc...
27.556886
73
0.548457
from flask import abort, request from marshmallow import ValidationError from webargs.flaskparser import use_args from dataservice.extensions import db from dataservice.api.common.pagination import paginated, Pagination from dataservice.api.outcome.models import Outcome from dataservice.api.outcome.schemas import Outc...
true
true
f72a48ddc595ceca85ebaf70bdc5761b2632240d
630
py
Python
level.py
FernandoCamousseigt/testapp
d7466584f5eb5c96463178c21ede571d6ea33510
[ "MIT" ]
null
null
null
level.py
FernandoCamousseigt/testapp
d7466584f5eb5c96463178c21ede571d6ea33510
[ "MIT" ]
null
null
null
level.py
FernandoCamousseigt/testapp
d7466584f5eb5c96463178c21ede571d6ea33510
[ "MIT" ]
null
null
null
def choose_level(n_pregunta, p_level): # Construir lógica para escoger el nivel ################################################## #pass if n_pregunta <= int(p_level): level = "basicas" elif n_pregunta <= 2 * p_level: level = "intermedias" else: level = "avanzadas" ...
27.391304
54
0.509524
def choose_level(n_pregunta, p_level):
true
true
f72a4969cc9a1aedd1ca60e296ba23ac682ec15b
3,433
py
Python
verde/tests/test_scipy.py
djhoese/verde
ad14acf94717ee5c6672559f40576f65989753a5
[ "BSD-3-Clause" ]
null
null
null
verde/tests/test_scipy.py
djhoese/verde
ad14acf94717ee5c6672559f40576f65989753a5
[ "BSD-3-Clause" ]
null
null
null
verde/tests/test_scipy.py
djhoese/verde
ad14acf94717ee5c6672559f40576f65989753a5
[ "BSD-3-Clause" ]
null
null
null
""" Test the scipy based interpolator. """ import warnings import pytest import pandas as pd import numpy as np import numpy.testing as npt from ..scipygridder import ScipyGridder from ..coordinates import grid_coordinates from ..datasets.synthetic import CheckerBoard def test_scipy_gridder_same_points(): "See ...
36.136842
77
0.696767
import warnings import pytest import pandas as pd import numpy as np import numpy.testing as npt from ..scipygridder import ScipyGridder from ..coordinates import grid_coordinates from ..datasets.synthetic import CheckerBoard def test_scipy_gridder_same_points(): region = (1000, 5000, -8000, -7000) synth = ...
true
true
f72a4a1445d38081650f42268e4ec5cd183fd71f
776
py
Python
test/azure/Expected/AcceptanceTests/Lro/lro/__init__.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "MIT" ]
null
null
null
test/azure/Expected/AcceptanceTests/Lro/lro/__init__.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "MIT" ]
null
null
null
test/azure/Expected/AcceptanceTests/Lro/lro/__init__.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
38.8
99
0.641753
from ._auto_rest_long_running_operation_test_service import AutoRestLongRunningOperationTestService from ._version import VERSION __version__ = VERSION __all__ = ['AutoRestLongRunningOperationTestService'] try: from ._patch import patch_sdk patch_sdk() except ImportError: pass
true
true
f72a4bc72168d2050ab7b6bbeddb4ba77db329b8
5,324
py
Python
python_modules/libraries/dagster-mssql/dagster_mssql/utils.py
nc-sika/dagster
ee56ee6ee26eb25cb03dd229716ed9af2cad0538
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-mssql/dagster_mssql/utils.py
nc-sika/dagster
ee56ee6ee26eb25cb03dd229716ed9af2cad0538
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-mssql/dagster_mssql/utils.py
nc-sika/dagster
ee56ee6ee26eb25cb03dd229716ed9af2cad0538
[ "Apache-2.0" ]
null
null
null
import logging import time import urllib from contextlib import contextmanager import pyodbc import sqlalchemy as db from dagster import Field, IntSource, StringSource, check from dagster.core.storage.sql import get_alembic_config, handle_schema_errors from sqlalchemy.ext.compiler import compiles MSSQL_POOL_RECYCLE...
32.072289
114
0.628475
import logging import time import urllib from contextlib import contextmanager import pyodbc import sqlalchemy as db from dagster import Field, IntSource, StringSource, check from dagster.core.storage.sql import get_alembic_config, handle_schema_errors from sqlalchemy.ext.compiler import compiles MSSQL_POOL_RECYCLE...
true
true
f72a4bffa2fd94ea50df6697d9321a5dbb611f66
5,120
py
Python
instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/__init__.py
willarmiros/opentelemetry-python-contrib
0d34ef26b75f9a3bc275bf828b5a806d39ba1a40
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/__init__.py
willarmiros/opentelemetry-python-contrib
0d34ef26b75f9a3bc275bf828b5a806d39ba1a40
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/__init__.py
willarmiros/opentelemetry-python-contrib
0d34ef26b75f9a3bc275bf828b5a806d39ba1a40
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# Copyright The OpenTelemetry Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
32.820513
106
0.659766
from logging import getLogger from os import environ from typing import Collection import elasticsearch import elasticsearch.exceptions from wrapt import wrap_function_wrapper as _wrap from opentelemetry.instrumentation.elasticsearch.package import _instruments from opentelemetry.instrumentation.elasti...
true
true
f72a4c06bbd80f8c7dad227a0878c7eb28b2829d
7,421
py
Python
examples/ex_binding_textures.py
SebastianRodriguezR/grafica
c87d6d1906a4cf49520ef213f1e4ba6e1ead8c4e
[ "MIT" ]
12
2021-08-17T12:57:39.000Z
2022-03-28T02:52:30.000Z
examples/ex_binding_textures.py
SebastianRodriguezR/grafica
c87d6d1906a4cf49520ef213f1e4ba6e1ead8c4e
[ "MIT" ]
null
null
null
examples/ex_binding_textures.py
SebastianRodriguezR/grafica
c87d6d1906a4cf49520ef213f1e4ba6e1ead8c4e
[ "MIT" ]
13
2021-08-17T03:23:21.000Z
2022-03-20T21:40:16.000Z
# coding=utf-8 """Using 2 different textures in the same Fragment Shader""" import glfw from OpenGL.GL import * import OpenGL.GL.shaders import numpy as np import sys import os.path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import grafica.transformations as tr import grafica.basic_sh...
30.413934
106
0.650721
import glfw from OpenGL.GL import * import OpenGL.GL.shaders import numpy as np import sys import os.path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import grafica.transformations as tr import grafica.basic_shapes as bs import grafica.easy_shaders as es from grafica.assets_path impor...
true
true
f72a4c25bda8e56afb5812475a76671822928e38
4,267
py
Python
src/run_evaluation.py
liushulinle/CRACSpell
faff01521b08032c4efa89bbb2dc942a6327bc53
[ "MIT" ]
2
2022-03-23T07:17:02.000Z
2022-03-24T07:09:04.000Z
src/run_evaluation.py
liushulinle/CRASpell
e0b495ed8424be7fdbd7fc3ef8c2919ab195b0e4
[ "MIT" ]
null
null
null
src/run_evaluation.py
liushulinle/CRASpell
e0b495ed8424be7fdbd7fc3ef8c2919ab195b0e4
[ "MIT" ]
null
null
null
import sys, os import numpy as np import tensorflow as tf from bert_tagging import DataProcessor, BertTagging import modeling import optimization import time from tagging_eval import score_f tf.logging.set_verbosity(tf.logging.ERROR) DEBUG = False def evaluate(FLAGS, label_list=None): gpuid = FLAGS.gpuid max_s...
38.098214
206
0.668854
import sys, os import numpy as np import tensorflow as tf from bert_tagging import DataProcessor, BertTagging import modeling import optimization import time from tagging_eval import score_f tf.logging.set_verbosity(tf.logging.ERROR) DEBUG = False def evaluate(FLAGS, label_list=None): gpuid = FLAGS.gpuid max_s...
true
true
f72a4c3a75bd42077f335838511586ea852c2671
3,899
py
Python
run.py
ntraut/example
5b7501ee7c8ad4e7c61b3ff8e9b1d3c0380c33de
[ "Apache-2.0" ]
13
2017-04-03T12:09:35.000Z
2021-06-07T09:40:31.000Z
run.py
ntraut/example
5b7501ee7c8ad4e7c61b3ff8e9b1d3c0380c33de
[ "Apache-2.0" ]
13
2016-08-02T18:56:13.000Z
2020-05-15T10:39:19.000Z
run.py
ntraut/example
5b7501ee7c8ad4e7c61b3ff8e9b1d3c0380c33de
[ "Apache-2.0" ]
31
2016-07-28T22:32:58.000Z
2022-01-05T09:13:03.000Z
#!/usr/bin/env python3 import argparse import os import subprocess import nibabel import numpy from glob import glob __version__ = open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'version')).read() def run(command, env={}): merged_env = os.environ merged_env.upda...
44.816092
152
0.633496
import argparse import os import subprocess import nibabel import numpy from glob import glob __version__ = open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'version')).read() def run(command, env={}): merged_env = os.environ merged_env.update(env) process = ...
true
true
f72a4c44918d4818263c7f5a892eaf25465b4fda
4,108
py
Python
homeassistant/components/azure_devops/__init__.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
6
2016-11-25T06:36:27.000Z
2021-11-16T11:20:23.000Z
homeassistant/components/azure_devops/__init__.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
58
2020-08-03T07:33:02.000Z
2022-03-31T06:02:05.000Z
homeassistant/components/azure_devops/__init__.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Support for Azure DevOps.""" import logging from typing import Any, Dict from aioazuredevops.client import DevOpsClient import aiohttp from homeassistant.components.azure_devops.const import ( CONF_ORG, CONF_PAT, CONF_PROJECT, DATA_AZURE_DEVOPS_CLIENT, DOMAIN, ) from homeassistant.config_entrie...
31.358779
94
0.619523
import logging from typing import Any, Dict from aioazuredevops.client import DevOpsClient import aiohttp from homeassistant.components.azure_devops.const import ( CONF_ORG, CONF_PAT, CONF_PROJECT, DATA_AZURE_DEVOPS_CLIENT, DOMAIN, ) from homeassistant.config_entries import ConfigEntry from homeas...
true
true
f72a4c55620436228ce86fa539585fab1397d008
2,698
py
Python
dprs/get_contents_file_list.py
kaan-keskin/debian-package-repository-statistics
ef70f4a9914b8baa4799a36217832a5cbdc8b7d3
[ "MIT" ]
1
2022-03-21T19:08:43.000Z
2022-03-21T19:08:43.000Z
dprs/get_contents_file_list.py
kaan-keskin/debian-package-repository-statistics
ef70f4a9914b8baa4799a36217832a5cbdc8b7d3
[ "MIT" ]
null
null
null
dprs/get_contents_file_list.py
kaan-keskin/debian-package-repository-statistics
ef70f4a9914b8baa4799a36217832a5cbdc8b7d3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Extensible library for opening URLs # https://docs.python.org/3/library/urllib.request.html import urllib.request from urllib.error import URLError from dprs.default_variables import DEFAULT_MIRROR_URL from dprs.exceptions import MirrorURLNotAccessible def get_contents_file_list(mirror_url:...
38.542857
103
0.627502
import urllib.request from urllib.error import URLError from dprs.default_variables import DEFAULT_MIRROR_URL from dprs.exceptions import MirrorURLNotAccessible def get_contents_file_list(mirror_url: str = DEFAULT_MIRROR_URL) -> list: try: with urllib.request.urlopen(mirror_url) as url_opener_respons...
true
true
f72a4c7097a99eefb13c041d6192064e857a4dfb
1,277
py
Python
tests/conftest.py
benbenti/fuzzyclustering
f67224105528d82f6d950ec7692a50d927ca0621
[ "MIT" ]
null
null
null
tests/conftest.py
benbenti/fuzzyclustering
f67224105528d82f6d950ec7692a50d927ca0621
[ "MIT" ]
3
2021-04-22T15:20:32.000Z
2021-04-22T15:21:41.000Z
tests/conftest.py
benbenti/fuzzyclustering
f67224105528d82f6d950ec7692a50d927ca0621
[ "MIT" ]
null
null
null
import pytest import random import numpy as np from numpy.random import rand import lib.algorithms as al @pytest.fixture(scope="session") def unif_1D(): """ Test case: one dimension, samples evenly distributed. """ data = np.array([[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], ...
24.557692
62
0.617071
import pytest import random import numpy as np from numpy.random import rand import lib.algorithms as al @pytest.fixture(scope="session") def unif_1D(): data = np.array([[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12] ] ) return d...
true
true
f72a4c86c1a569849d3b8f3e318a9e9d83312722
3,322
py
Python
2 semester/PP/10_2/Code/3.py
kurpenok/Labs
069c92b7964a1445d093313b38ebdc56318d2a73
[ "MIT" ]
null
null
null
2 semester/PP/10_2/Code/3.py
kurpenok/Labs
069c92b7964a1445d093313b38ebdc56318d2a73
[ "MIT" ]
null
null
null
2 semester/PP/10_2/Code/3.py
kurpenok/Labs
069c92b7964a1445d093313b38ebdc56318d2a73
[ "MIT" ]
null
null
null
from math import sqrt, sin, pi class Liked: def __init__(self, *args) -> None: self.data = [] for arg in args: for line in arg: self.data.append(line) def likes(self) -> dict: self.emojis = [":)", ";)", ")", ":(", ";(", "("] output = dict() ...
24.248175
72
0.494883
from math import sqrt, sin, pi class Liked: def __init__(self, *args) -> None: self.data = [] for arg in args: for line in arg: self.data.append(line) def likes(self) -> dict: self.emojis = [":)", ";)", ")", ":(", ";(", "("] output = dict() ...
true
true
f72a4cbccdd5ee4e79941efbf501b57e0fc9d10f
6,514
py
Python
test.py
jssprz/video_captioning_with_visual_syntactic_embedding
0687772b22c56f448dabbe46932422363964abd4
[ "MIT" ]
23
2021-01-04T07:09:40.000Z
2022-01-12T22:54:33.000Z
test.py
jssprz/video_captioning_with_visual_syntactic_embedding
0687772b22c56f448dabbe46932422363964abd4
[ "MIT" ]
7
2021-01-14T07:48:22.000Z
2022-02-01T04:30:05.000Z
test.py
jssprz/video_captioning_with_visual_syntactic_embedding
0687772b22c56f448dabbe46932422363964abd4
[ "MIT" ]
7
2021-03-20T15:03:53.000Z
2022-03-09T09:18:10.000Z
import os import argparse import pickle from utils import decode_from_tokens from vocabulary import Vocabulary from configuration_file import ConfigurationFile from model.encoder import SCNEncoder from model.decoder import SemSynANDecoder import h5py import torch import numpy as np if __name__ == '__main__': pars...
44.312925
129
0.646147
import os import argparse import pickle from utils import decode_from_tokens from vocabulary import Vocabulary from configuration_file import ConfigurationFile from model.encoder import SCNEncoder from model.decoder import SemSynANDecoder import h5py import torch import numpy as np if __name__ == '__main__': pars...
true
true
f72a4d13a6ccfb3a394f61f2c8c520771408032b
3,484
py
Python
app/routers/images.py
vncsna/mirror
0de84de6fa4f8a4569beed0bf2e313901d95a17d
[ "MIT" ]
null
null
null
app/routers/images.py
vncsna/mirror
0de84de6fa4f8a4569beed0bf2e313901d95a17d
[ "MIT" ]
null
null
null
app/routers/images.py
vncsna/mirror
0de84de6fa4f8a4569beed0bf2e313901d95a17d
[ "MIT" ]
null
null
null
# TODO: Add exception checking # TODO: Use wrong uuids as input import os import cv2 import shutil import numpy as np from enum import Enum from uuid import uuid4 from pathlib import Path from dotenv import load_dotenv from fastapi import APIRouter, File, UploadFile from fastapi.responses import FileResponse load_dot...
28.325203
65
0.642078
import os import cv2 import shutil import numpy as np from enum import Enum from uuid import uuid4 from pathlib import Path from dotenv import load_dotenv from fastapi import APIRouter, File, UploadFile from fastapi.responses import FileResponse load_dotenv() DATABASE_IMGE = os.environ['DATABASE_IMGE'] DATABASE_TEX...
true
true
f72a4dac3ecef7e475c42ce8919f2ec459aa9f6e
1,352
py
Python
Chapter05_Serial-IO/serialOrgan/scaleGenerator.py
ONEV2/AVR-Programming
31ac43d0ea353a6878079e15c1e1bda6a31da4c0
[ "MIT" ]
608
2015-01-01T23:22:28.000Z
2022-03-25T23:40:47.000Z
Chapter05_Serial-IO/serialOrgan/scaleGenerator.py
Omsingh24/AVR-Programming
8a9ad403ccf2f6cceef955e3813e476da3df7f62
[ "MIT" ]
41
2015-01-14T05:49:48.000Z
2022-01-22T07:07:24.000Z
Chapter05_Serial-IO/serialOrgan/scaleGenerator.py
Omsingh24/AVR-Programming
8a9ad403ccf2f6cceef955e3813e476da3df7f62
[ "MIT" ]
340
2015-01-06T18:32:28.000Z
2022-03-31T18:20:44.000Z
# scaleGenerator.py # Scales are in terms of times per cycle (period) rather # than pitch. # import math SCALE = ['C', 'Cx', 'D', 'Dx', 'E', 'F', 'Fx', 'G', 'Gx', 'A', 'Ax', 'B'] def calculateOctave(baseLength): periods = [baseLength / math.exp(x*math.log(2)/12) for x in range(0, 12)] periods = [int(rou...
28.765957
77
0.607988
import math SCALE = ['C', 'Cx', 'D', 'Dx', 'E', 'F', 'Fx', 'G', 'Gx', 'A', 'Ax', 'B'] def calculateOctave(baseLength): periods = [baseLength / math.exp(x*math.log(2)/12) for x in range(0, 12)] periods = [int(round(x)) for x in periods] return( zip(SCALE, periods) ) def makePitches(basePitch, numOcta...
true
true
f72a4dfe4c34ef1aa9ab86723b47cf9341cad810
3,823
py
Python
scripts/o3de/tests/unit_test_project_properties.py
sandeel31/o3de
db88812d61eef77c6f4451b7f8c7605d6db07412
[ "Apache-2.0", "MIT" ]
1
2021-08-04T00:43:18.000Z
2021-08-04T00:43:18.000Z
scripts/o3de/tests/unit_test_project_properties.py
sandeel31/o3de
db88812d61eef77c6f4451b7f8c7605d6db07412
[ "Apache-2.0", "MIT" ]
null
null
null
scripts/o3de/tests/unit_test_project_properties.py
sandeel31/o3de
db88812d61eef77c6f4451b7f8c7605d6db07412
[ "Apache-2.0", "MIT" ]
null
null
null
# # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # # import pytest import pathlib from unittest.mock import patch from o3de import project_properties TEST_DE...
46.621951
126
0.637719
import pytest import pathlib from unittest.mock import patch from o3de import project_properties TEST_DEFAULT_PROJECT_DATA = { "template_name": "DefaultProject", "restricted_name": "o3de", "restricted_platform_relative_path": "Templates", "origin": "The primary repo for DefaultProject goes her...
true
true
f72a4e0d8cbc89c9de5ee0df61f78d7d32bde73e
73,927
py
Python
tensorflow/contrib/lite/testing/generate_examples.py
noahl/tensorflow
b95d8cce7323d328565378e0d60d72603393f87d
[ "Apache-2.0" ]
5
2018-09-22T20:16:46.000Z
2022-02-28T10:35:19.000Z
tensorflow/contrib/lite/testing/generate_examples.py
noahl/tensorflow
b95d8cce7323d328565378e0d60d72603393f87d
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/lite/testing/generate_examples.py
noahl/tensorflow
b95d8cce7323d328565378e0d60d72603393f87d
[ "Apache-2.0" ]
2
2019-08-14T09:04:37.000Z
2022-02-02T20:08:02.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.904322
82
0.625063
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import itertools import os import re import sys import tempfile import traceback import zipfile import numpy as np from six import StringIO from six.moves import xrange os.envir...
true
true
f72a4e3b9390c65a9d4226e4e2bfa029a474c9d9
10,627
py
Python
work_dirs/bsnet_fcos_test/bsnet_fcos_test.py
zzx0226/mmocr
50354895244339a392b4f1af5a35963883923cca
[ "Apache-2.0" ]
null
null
null
work_dirs/bsnet_fcos_test/bsnet_fcos_test.py
zzx0226/mmocr
50354895244339a392b4f1af5a35963883923cca
[ "Apache-2.0" ]
null
null
null
work_dirs/bsnet_fcos_test/bsnet_fcos_test.py
zzx0226/mmocr
50354895244339a392b4f1af5a35963883923cca
[ "Apache-2.0" ]
null
null
null
checkpoint_config = dict(interval=10) log_config = dict( interval=5, hooks=[dict(type='TextLoggerHook'), dict(type='TensorboardLoggerHook')]) dist_params = dict(backend='nccl') log_level = 'INFO' load_from = None resume_from = None workflow = [('train', 1)] optimizer = dict(type='SGD', lr=0.001, mome...
35.423333
99
0.555472
checkpoint_config = dict(interval=10) log_config = dict( interval=5, hooks=[dict(type='TextLoggerHook'), dict(type='TensorboardLoggerHook')]) dist_params = dict(backend='nccl') log_level = 'INFO' load_from = None resume_from = None workflow = [('train', 1)] optimizer = dict(type='SGD', lr=0.001, mome...
true
true
f72a4e46e33271ff312daf81e2aa725c8a324bb1
584
py
Python
code/heap.py
philipmassouh/RoA
ed57d9da44cd04496dfc4c43f11b3ead99d58608
[ "Apache-2.0" ]
null
null
null
code/heap.py
philipmassouh/RoA
ed57d9da44cd04496dfc4c43f11b3ead99d58608
[ "Apache-2.0" ]
null
null
null
code/heap.py
philipmassouh/RoA
ed57d9da44cd04496dfc4c43f11b3ead99d58608
[ "Apache-2.0" ]
null
null
null
def heapify(heap, root): newRoot = root leftChild = 2*root+1 rightChild = 2*root+2 if leftChild < len(heap) and heap[leftChild] > heap[newRoot]: newRoot = leftChild if rightChild < len(heap) and heap[rightChild] > heap[newRoot]: newRoot = rightChild if root!=newRoot: heap[root],heap[newRoot]=heap[newRoot],h...
25.391304
64
0.679795
def heapify(heap, root): newRoot = root leftChild = 2*root+1 rightChild = 2*root+2 if leftChild < len(heap) and heap[leftChild] > heap[newRoot]: newRoot = leftChild if rightChild < len(heap) and heap[rightChild] > heap[newRoot]: newRoot = rightChild if root!=newRoot: heap[root],heap[newRoot]=heap[newRoot],h...
true
true
f72a4e980f110ebf4b26838dad3e5987b3b5af11
8,123
py
Python
shalstm/qa/model.py
alisafaya/shalstm
3d85f29c82451b393975ba587d53e0db0e43fff9
[ "MIT" ]
null
null
null
shalstm/qa/model.py
alisafaya/shalstm
3d85f29c82451b393975ba587d53e0db0e43fff9
[ "MIT" ]
null
null
null
shalstm/qa/model.py
alisafaya/shalstm
3d85f29c82451b393975ba587d53e0db0e43fff9
[ "MIT" ]
null
null
null
import torch.nn as nn import torch from shalstm import SHALSTM from shalstm.utils import top_k_top_p_filtering class SHALSTMforQuestionAnswering(SHALSTM): def forward(self, input, attention_mask=None, type_ids=None, hidden=None, mems=None, return_loss=False, lm_loss=False): """ all arguments have...
38.866029
164
0.612582
import torch.nn as nn import torch from shalstm import SHALSTM from shalstm.utils import top_k_top_p_filtering class SHALSTMforQuestionAnswering(SHALSTM): def forward(self, input, attention_mask=None, type_ids=None, hidden=None, mems=None, return_loss=False, lm_loss=False): x = input[:-1].to(self.device)...
true
true
f72a4f4af0ffe7527231500fcb530dd4fab8692b
14,981
py
Python
patrole_tempest_plugin/tests/unit/test_rbac_utils.py
openstack/patrole
fa0ee135121a5e86301ad5ee1854b3a0bd70b69b
[ "Apache-2.0" ]
14
2017-01-03T15:07:18.000Z
2020-09-17T18:07:39.000Z
patrole_tempest_plugin/tests/unit/test_rbac_utils.py
openstack/patrole
fa0ee135121a5e86301ad5ee1854b3a0bd70b69b
[ "Apache-2.0" ]
null
null
null
patrole_tempest_plugin/tests/unit/test_rbac_utils.py
openstack/patrole
fa0ee135121a5e86301ad5ee1854b3a0bd70b69b
[ "Apache-2.0" ]
12
2017-02-28T20:08:48.000Z
2020-12-30T09:31:51.000Z
# Copyright 2017 AT&T Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
43.048851
79
0.653227
import testtools from unittest import mock from tempest.lib import exceptions as lib_exc from patrole_tempest_plugin import rbac_exceptions from patrole_tempest_plugin import rbac_utils from patrole_tempest_plugin.tests.unit import base from patrole_tempest_plugin.tests.unit import fixtures as patrole_...
true
true
f72a4f6721d4ff9bda92ac47662c4d9dcaa83260
2,333
py
Python
var/spack/repos/builtin/packages/r-gsodr/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/r-gsodr/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/r-gsodr/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RGsodr(RPackage): """A Global Surface Summary of the Day (GSOD) Weather Data Client for R ...
53.022727
95
0.724389
from spack import * class RGsodr(RPackage): homepage = "https://docs.ropensci.org/GSODR/" url = "https://cloud.r-project.org/src/contrib/GSODR_2.1.1.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/GSODR" version('2.1.2', sha256='4fc1d084b6c21055d8cc17a6a6dc412261aa0d4ef...
true
true
f72a4ff9057e2766c21056edb0d6c1eeff32ab49
2,712
py
Python
ros/src/waypoint_loader/waypoint_loader.py
ahmedmbakr/CarND-Capstone
3585df9781f2f9e128b7498ef033029485d31567
[ "MIT" ]
null
null
null
ros/src/waypoint_loader/waypoint_loader.py
ahmedmbakr/CarND-Capstone
3585df9781f2f9e128b7498ef033029485d31567
[ "MIT" ]
null
null
null
ros/src/waypoint_loader/waypoint_loader.py
ahmedmbakr/CarND-Capstone
3585df9781f2f9e128b7498ef033029485d31567
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import csv import math from geometry_msgs.msg import Quaternion from styx_msgs.msg import Lane, Waypoint import tf import rospy CSV_HEADER = ['x', 'y', 'z', 'yaw'] MAX_DECEL = 1.0 class WaypointLoader(object): def __init__(self): rospy.init_node('waypoint_loader', log...
30.133333
85
0.593658
import os import csv import math from geometry_msgs.msg import Quaternion from styx_msgs.msg import Lane, Waypoint import tf import rospy CSV_HEADER = ['x', 'y', 'z', 'yaw'] MAX_DECEL = 1.0 class WaypointLoader(object): def __init__(self): rospy.init_node('waypoint_loader', log_level=rospy.DEBUG) ...
false
true
f72a513bd3e1dece646a2c8acb68bd929fbe4e41
225
py
Python
myapp/caculate_FFalgorithm_for_path.py
hebinjie33/HMMLB
db26a149fd3e8e96a570cfe32e9bc42a002409cc
[ "Apache-2.0" ]
null
null
null
myapp/caculate_FFalgorithm_for_path.py
hebinjie33/HMMLB
db26a149fd3e8e96a570cfe32e9bc42a002409cc
[ "Apache-2.0" ]
null
null
null
myapp/caculate_FFalgorithm_for_path.py
hebinjie33/HMMLB
db26a149fd3e8e96a570cfe32e9bc42a002409cc
[ "Apache-2.0" ]
1
2019-12-16T21:46:46.000Z
2019-12-16T21:46:46.000Z
class FFalgorithm: def __init__(self): def caculate_bandwidth(S7_PORT2,S5_PORT1,S1_PORT2,S9_PORT4,S11_PORT3,S5_PORT2,S2_PORT4,S7_PORT1,S6_PORT1,S3_PORT1,S10_PORT3,S6_PORT2,S4_PORT2): ''' link1's bandwidth '''
22.5
144
0.768889
class FFalgorithm: def __init__(self): def caculate_bandwidth(S7_PORT2,S5_PORT1,S1_PORT2,S9_PORT4,S11_PORT3,S5_PORT2,S2_PORT4,S7_PORT1,S6_PORT1,S3_PORT1,S10_PORT3,S6_PORT2,S4_PORT2): ''' link1's bandwidth '''
false
true
f72a51b526015df516689e7669b54b9e20831540
639
py
Python
tests/clims/api/serializers/models/test_work_batch.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
null
null
null
tests/clims/api/serializers/models/test_work_batch.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
null
null
null
tests/clims/api/serializers/models/test_work_batch.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from sentry.testutils import TestCase from clims.api.serializers.models.workbatch import WorkBatchSerializer from clims.models.work_batch import WorkBatch class WorkBatchSerializerTest(TestCase): def test_can_serialize_task(self): model = WorkBatch(id=1, name="Test...
35.5
87
0.713615
from __future__ import absolute_import from sentry.testutils import TestCase from clims.api.serializers.models.workbatch import WorkBatchSerializer from clims.models.work_batch import WorkBatch class WorkBatchSerializerTest(TestCase): def test_can_serialize_task(self): model = WorkBatch(id=1, name="Test...
true
true
f72a51ff116cdacd733759b6eb96d4b97659306d
609
py
Python
djasana/migrations/0008_auto_20180906_1407.py
zaptim/django-asana
ab6d7166f28945292d5632ef766fc13cc2ea4cf3
[ "MIT" ]
null
null
null
djasana/migrations/0008_auto_20180906_1407.py
zaptim/django-asana
ab6d7166f28945292d5632ef766fc13cc2ea4cf3
[ "MIT" ]
null
null
null
djasana/migrations/0008_auto_20180906_1407.py
zaptim/django-asana
ab6d7166f28945292d5632ef766fc13cc2ea4cf3
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2018-09-06 14:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djasana', '0007_auto_20180819_1518'), ] operations = [ migrations.AlterField( model_name='customfield', name='descrip...
24.36
75
0.602627
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djasana', '0007_auto_20180819_1518'), ] operations = [ migrations.AlterField( model_name='customfield', name='description', field=models.CharField(bla...
true
true
f72a5265e0f02fda5da08d5bce4bd2145df5c0eb
582
py
Python
examples/2021_12_31/py_files/plotters/Paraview/timeAverage.py
jagarciap/SCSI
0972548adf17a27b78ef2865a837bf20aadca3e9
[ "MIT" ]
null
null
null
examples/2021_12_31/py_files/plotters/Paraview/timeAverage.py
jagarciap/SCSI
0972548adf17a27b78ef2865a837bf20aadca3e9
[ "MIT" ]
null
null
null
examples/2021_12_31/py_files/plotters/Paraview/timeAverage.py
jagarciap/SCSI
0972548adf17a27b78ef2865a837bf20aadca3e9
[ "MIT" ]
1
2022-01-18T10:24:39.000Z
2022-01-18T10:24:39.000Z
from paraview.simple import * firststep = 50 #names = ['0_ts*', '0-0_ts*', '0-0-0_ts*'] names = ['0_ts*', '0-0_ts*'] for name in names: acs = FindSource(name) SetActiveSource(acs) laststep = int(acs.TimestepValues[-1]) extractTimeSteps = ExtractTimeSteps(Input=acs) extractTimeSteps.TimeStepIndices...
34.235294
80
0.725086
from paraview.simple import * firststep = 50 names = ['0_ts*', '0-0_ts*'] for name in names: acs = FindSource(name) SetActiveSource(acs) laststep = int(acs.TimestepValues[-1]) extractTimeSteps = ExtractTimeSteps(Input=acs) extractTimeSteps.TimeStepIndices = [i for i in range(firststep, laststep+1...
true
true
f72a52a097ae8acfd4297be79489feb161d30056
6,350
py
Python
tools/cFS-GroundSystem/GroundSystem.py
ammarrm/cFS_MSTAR
f7d59eec4a445bb8572d01a580c043ec7a33df44
[ "Apache-2.0" ]
null
null
null
tools/cFS-GroundSystem/GroundSystem.py
ammarrm/cFS_MSTAR
f7d59eec4a445bb8572d01a580c043ec7a33df44
[ "Apache-2.0" ]
null
null
null
tools/cFS-GroundSystem/GroundSystem.py
ammarrm/cFS_MSTAR
f7d59eec4a445bb8572d01a580c043ec7a33df44
[ "Apache-2.0" ]
1
2021-04-23T04:26:08.000Z
2021-04-23T04:26:08.000Z
# # GSC-18128-1, "Core Flight Executive Version 6.7" # # Copyright (c) 2006-2019 United States Government as represented by # the Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
32.397959
94
0.671811
import shlex import subprocess import sys from pathlib import Path from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox from RoutingService import RoutingService from Ui_MainWindow import Ui_MainWindow from _version import __version__ as _version from _version import _version_str...
true
true
f72a530516b9a3b382487caa11390d79ac8dedb8
1,185
py
Python
pyprof/alembic/versions/2021_03_12_15_41_50.py
kooichirooooo/pyprof
a2cce7ef335d02b0566a169b46f3cf976e7d9662
[ "MIT" ]
null
null
null
pyprof/alembic/versions/2021_03_12_15_41_50.py
kooichirooooo/pyprof
a2cce7ef335d02b0566a169b46f3cf976e7d9662
[ "MIT" ]
null
null
null
pyprof/alembic/versions/2021_03_12_15_41_50.py
kooichirooooo/pyprof
a2cce7ef335d02b0566a169b46f3cf976e7d9662
[ "MIT" ]
null
null
null
"""create frame and block table Revision ID: 1fc165a90d68 Revises: Create Date: 2021-03-12 15:41:50.150507 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "1fc165a90d68" down_revision = None branch_labels = None depends_on = None def upgrade(): # ### comma...
26.333333
74
0.625316
import sqlalchemy as sa from alembic import op revision = "1fc165a90d68" down_revision = None branch_labels = None depends_on = None def upgrade(): sa.PrimaryKeyConstraint("id"), ) op.create_table( "blocks", sa.Column("id", sa.Integer(), autoincrement=True, nullable=False), ...
true
true
f72a5319acea927f969baaeedae8a60444d73815
168
py
Python
ftruck/urls.py
sunlightlabs/foodtrucks
f6531a3e47c3d5975d5230e946e636d082dbc24a
[ "BSD-3-Clause" ]
null
null
null
ftruck/urls.py
sunlightlabs/foodtrucks
f6531a3e47c3d5975d5230e946e636d082dbc24a
[ "BSD-3-Clause" ]
null
null
null
ftruck/urls.py
sunlightlabs/foodtrucks
f6531a3e47c3d5975d5230e946e636d082dbc24a
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls.defaults import * urlpatterns = patterns('ftruck.views', url(r'^$', 'mainmap', name='map'), url(r'^tweets/$', 'tweets', name='tweets') )
24
46
0.630952
from django.conf.urls.defaults import * urlpatterns = patterns('ftruck.views', url(r'^$', 'mainmap', name='map'), url(r'^tweets/$', 'tweets', name='tweets') )
true
true
f72a5350a454b362d7b0b72c74c7c361977c73b5
2,289
py
Python
data/cirq_new/cirq_program/startCirq_noisy553.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_noisy553.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_noisy553.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=19 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode def make_circuit(n: int, input_qubit): c = cirq.Ci...
33.173913
77
0.68851
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(cirq.H.on(input_qubit[1])) ...
true
true
f72a536ed7d7645ecead0368a4011e2dfa79644e
20
py
Python
ckan/lib/navl/__init__.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
12
2015-08-28T16:59:07.000Z
2020-03-08T01:39:30.000Z
ckan/lib/navl/__init__.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
13
2019-05-02T21:01:28.000Z
2020-10-20T23:34:48.000Z
ckan/lib/navl/__init__.py
florianm/ckan
1cfd98d591ac70b4eb81048bcd227b6c1354b1bf
[ "Apache-2.0" ]
10
2015-05-08T04:33:20.000Z
2020-03-03T15:17:58.000Z
__license__ = 'MIT'
10
19
0.7
__license__ = 'MIT'
true
true
f72a5415b9a53ec576425cc8bb6d98e89c6da886
700
py
Python
pytreex/block/util/setglobal.py
ufal/pytreex
9633c1420e6b4adecd73baaf761d26fa49708a61
[ "Apache-2.0" ]
11
2015-06-24T08:41:44.000Z
2021-09-02T21:12:10.000Z
pytreex/block/util/setglobal.py
ufal/pytreex
9633c1420e6b4adecd73baaf761d26fa49708a61
[ "Apache-2.0" ]
4
2016-01-12T19:21:22.000Z
2019-05-10T14:46:44.000Z
pytreex/block/util/setglobal.py
ufal/pytreex
9633c1420e6b4adecd73baaf761d26fa49708a61
[ "Apache-2.0" ]
3
2016-01-22T11:54:11.000Z
2019-04-30T17:09:55.000Z
#!/usr/bin/env python # coding=utf-8 # # Block for making tree copies # from __future__ import unicode_literals from pytreex.core.block import Block __author__ = "Ondřej Dušek" __date__ = "2012" class SetGlobal(Block): def __init__(self, scenario, args): """\ Constructor, sets the arguments giv...
23.333333
70
0.642857
from __future__ import unicode_literals from pytreex.core.block import Block __author__ = "Ondřej Dušek" __date__ = "2012" class SetGlobal(Block): def __init__(self, scenario, args): Block.__init__(self, scenario, args) for arg, value in args.items(): scenario.global_args[arg] ...
true
true
f72a54c5a6aefc1b68cf97340534140cea211c6d
39,428
py
Python
modin/pandas/test/utils.py
itsliya/modin
d4ce5390816ae7eb8717bf271e1feabd3d5fabee
[ "ECL-2.0", "Apache-2.0" ]
1
2021-05-19T04:01:17.000Z
2021-05-19T04:01:17.000Z
modin/pandas/test/utils.py
itsliya/modin
d4ce5390816ae7eb8717bf271e1feabd3d5fabee
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
modin/pandas/test/utils.py
itsliya/modin
d4ce5390816ae7eb8717bf271e1feabd3d5fabee
[ "ECL-2.0", "Apache-2.0" ]
1
2022-01-29T12:12:42.000Z
2022-01-29T12:12:42.000Z
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
31.848142
117
0.582124
import pytest import numpy as np import math import pandas from pandas.testing import ( assert_series_equal, assert_frame_equal, assert_index_equal, assert_extension_array_equal, ) import modin.pandas as pd from modin.utils import to_pandas from modin.config import TestDatasetSize, TrackFil...
true
true
f72a54e9a3329047951044887f34ffc35ca51dd9
310
py
Python
jukebox/urls.py
bharadhwaj/jukebox
7223e6c686ac2868c6284270564db6d557b17fc5
[ "MIT" ]
1
2018-06-12T10:51:15.000Z
2018-06-12T10:51:15.000Z
jukebox/urls.py
bharadhwaj/jukebox
7223e6c686ac2868c6284270564db6d557b17fc5
[ "MIT" ]
3
2020-06-05T18:26:16.000Z
2021-06-10T20:30:23.000Z
jukebox/urls.py
bharadhwaj/jukebox
7223e6c686ac2868c6284270564db6d557b17fc5
[ "MIT" ]
null
null
null
from django.urls import path from . import views app_name = 'links' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('vote/', views.VoteView.as_view(), name='vote'), path('votes/', views.vote, name='votes'), path('result/', views.ResultView.as_view(), name='result'), ]
28.181818
63
0.651613
from django.urls import path from . import views app_name = 'links' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('vote/', views.VoteView.as_view(), name='vote'), path('votes/', views.vote, name='votes'), path('result/', views.ResultView.as_view(), name='result'), ]
true
true
f72a55535692922be0aa294cac9b8cf77add2f60
106,671
py
Python
InplusTrader/ctaAlgo/ctaBacktesting1.py
zhengwsh/InplusTrader_Linux
5f7eb17004da0b76ceafb93cb314de7a6009cd04
[ "MIT" ]
17
2017-04-20T05:17:25.000Z
2020-09-30T08:58:03.000Z
InplusTrader/ctaAlgo/ctaBacktesting1.py
vladhj38/InplusTrader_Linux
5f7eb17004da0b76ceafb93cb314de7a6009cd04
[ "MIT" ]
1
2017-11-12T01:24:06.000Z
2019-09-19T08:50:38.000Z
InplusTrader/ctaAlgo/ctaBacktesting1.py
vladhj38/InplusTrader_Linux
5f7eb17004da0b76ceafb93cb314de7a6009cd04
[ "MIT" ]
17
2017-04-17T08:17:00.000Z
2020-10-25T01:56:49.000Z
# encoding: UTF-8 ''' 本文件中包含的是CTA模块的回测引擎,回测引擎的API和CTA引擎一致, 可以使用和实盘相同的代码进行回测。 ''' from __future__ import division from itertools import product import copy import os import sys import re import csv import time import multiprocessing import json import pymongo import threading from datetime import datetime from collect...
39.188464
118
0.512398
''' 本文件中包含的是CTA模块的回测引擎,回测引擎的API和CTA引擎一致, 可以使用和实盘相同的代码进行回测。 ''' from __future__ import division from itertools import product import copy import os import sys import re import csv import time import multiprocessing import json import pymongo import threading from datetime import datetime from collections import Order...
false
true
f72a55db61c854785fc42c069c7252d364540690
23,064
py
Python
main.py
mpast/earth-engine-app
496fc6cfe95403a42374e439a4027c09760af964
[ "Apache-2.0" ]
2
2018-06-19T20:33:32.000Z
2018-07-13T16:03:30.000Z
main.py
mpast/earth-engine-app
496fc6cfe95403a42374e439a4027c09760af964
[ "Apache-2.0" ]
1
2020-11-15T17:56:09.000Z
2020-11-15T17:56:09.000Z
main.py
mpast/earth-engine-app
496fc6cfe95403a42374e439a4027c09760af964
[ "Apache-2.0" ]
null
null
null
from flask import Flask, render_template, request import config import os import json import ee import time import calendar import datetime import threading import logging, logging.config, yaml from pymemcache.client.hash import Client #from google.appengine.api import memcache as mc ###############################...
32.995708
110
0.614161
from flask import Flask, render_template, request import config import os import json import ee import time import calendar import datetime import threading import logging, logging.config, yaml from pymemcache.client.hash import Client
true
true
f72a5625c654c8cd33973153b20dd9ad97e848d4
17,876
py
Python
pyeccodes/defs/grib2/tables/25/4_0_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
7
2020-04-14T09:41:17.000Z
2021-08-06T09:38:19.000Z
pyeccodes/defs/grib2/tables/24/4_0_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
null
null
null
pyeccodes/defs/grib2/tables/24/4_0_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
3
2020-04-30T12:44:48.000Z
2020-12-15T08:40:26.000Z
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Analysis or forecast at a horizontal level or in a horizontal ' 'layer at a point in time'}, {'abbr': 1, 'code': 1, 'title': 'Individual ensemble forecast, control and perturbe...
55.688474
91
0.519579
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Analysis or forecast at a horizontal level or in a horizontal ' 'layer at a point in time'}, {'abbr': 1, 'code': 1, 'title': 'Individual ensemble forecast, control and perturbe...
true
true
f72a562854148934a239bcf74e1945d7133782f2
3,310
py
Python
Chapter05/Chapter_5/Chapter_5_5.py
YMandCL/Hands-On-Deep-Learning-for-Games
0225661409c3bf59ae6b7996c254bb485ebd10cb
[ "MIT" ]
33
2018-12-29T15:39:20.000Z
2022-03-18T14:36:11.000Z
Chapter05/Chapter_5/Chapter_5_5.py
YMandCL/Hands-On-Deep-Learning-for-Games
0225661409c3bf59ae6b7996c254bb485ebd10cb
[ "MIT" ]
4
2019-05-01T08:30:47.000Z
2020-08-14T21:13:53.000Z
Chapter05/Chapter_5/Chapter_5_5.py
YMandCL/Hands-On-Deep-Learning-for-Games
0225661409c3bf59ae6b7996c254bb485ebd10cb
[ "MIT" ]
14
2019-01-13T15:52:08.000Z
2021-10-10T06:14:39.000Z
# -*- coding: utf-8 -*- # source from https://github.com/keon/deep-q-learning/blob/master/dqn.py import random import gym import numpy as np from collections import deque from keras.models import Sequential from keras.layers import Dense from keras.optimizers import Adam EPISODES = 1000 class DQNAgent: def __init...
35.978261
74
0.600302
import random import gym import numpy as np from collections import deque from keras.models import Sequential from keras.layers import Dense from keras.optimizers import Adam EPISODES = 1000 class DQNAgent: def __init__(self, state_size, action_size): self.state_size = state_size self.action_siz...
true
true
f72a56bc327beb68eaff0e6ebaf52a3e7b6095e4
1,956
py
Python
fastseq/ops/ngram_repeat_block.py
nttcs-ds/fastseq
f1338f1125612df318c9d1f030a8457397ed05a6
[ "MIT" ]
346
2020-11-28T14:25:21.000Z
2022-03-25T14:50:22.000Z
fastseq/ops/ngram_repeat_block.py
nttcs-ds/fastseq
f1338f1125612df318c9d1f030a8457397ed05a6
[ "MIT" ]
22
2020-12-03T18:52:04.000Z
2022-02-26T05:19:14.000Z
fastseq/ops/ngram_repeat_block.py
nttcs-ds/fastseq
f1338f1125612df318c9d1f030a8457397ed05a6
[ "MIT" ]
35
2020-11-30T21:37:45.000Z
2022-03-23T01:54:51.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. """ Wrapper for ngram_repeat_block cuda extension """ from torch import nn from torch.autograd import Function import ngram_repeat_block_cuda class NGramRepeatBlockFunction(Function): """ forward inputs to ngram_repeat_block cuda extensi...
32.6
71
0.657975
from torch import nn from torch.autograd import Function import ngram_repeat_block_cuda class NGramRepeatBlockFunction(Function): def forward(self, tokens, lprobs, bsz, step, beam_size, no_repeat_ngram_size): outputs = ngram_repeat_block_cuda.forward(tokens, lprobs, bsz, step, beam_size,...
true
true
f72a57059f2c092dba9f5b18eb5c0724c3267d04
3,464
py
Python
app/cito_engine/views/tools.py
twatchy/cito_engine
a62dce3c76567dd36b7efcaa70e03728b335f44e
[ "Apache-2.0" ]
null
null
null
app/cito_engine/views/tools.py
twatchy/cito_engine
a62dce3c76567dd36b7efcaa70e03728b335f44e
[ "Apache-2.0" ]
null
null
null
app/cito_engine/views/tools.py
twatchy/cito_engine
a62dce3c76567dd36b7efcaa70e03728b335f44e
[ "Apache-2.0" ]
null
null
null
"""Copyright 2014 Cyrus Dasadia 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 distr...
44.987013
112
0.618938
from django.shortcuts import redirect, render_to_response from django.forms.formsets import formset_factory from django.contrib.auth.decorators import login_required from django.template import RequestContext from cito_engine.forms import tools_form, events @login_required(login_url='/login/') def bulk_upload_events...
true
true
f72a57198e6603c64c6e5c49c3cd88238e30804e
11,932
py
Python
Pseudo_Goldstone/SUN_def/SUN_def.py
dkaramit/pseudo-Goldstone_DM
70fbb4ad4be190226d230a20dfb19b804e15aae6
[ "MIT" ]
null
null
null
Pseudo_Goldstone/SUN_def/SUN_def.py
dkaramit/pseudo-Goldstone_DM
70fbb4ad4be190226d230a20dfb19b804e15aae6
[ "MIT" ]
null
null
null
Pseudo_Goldstone/SUN_def/SUN_def.py
dkaramit/pseudo-Goldstone_DM
70fbb4ad4be190226d230a20dfb19b804e15aae6
[ "MIT" ]
null
null
null
from sympy import sqrt, Symbol,symbols,conjugate,I,flatten,simplify,expand from numpy import array,arange,triu,tril,nonzero,append,unique, vectorize,sum,prod from ..util import MatrixProd,Deriv,Tuples def GetAssumptions(Sym,assL): tmpA=[] for i in assL: try: tmpA.append(Sym.assumptions0[...
42.162544
190
0.510392
from sympy import sqrt, Symbol,symbols,conjugate,I,flatten,simplify,expand from numpy import array,arange,triu,tril,nonzero,append,unique, vectorize,sum,prod from ..util import MatrixProd,Deriv,Tuples def GetAssumptions(Sym,assL): tmpA=[] for i in assL: try: tmpA.append(Sym.assumptions0[...
false
true
f72a587cdb19c1c9ab6d907b4c8b9dbcba84d995
3,925
py
Python
ros/src/twist_controller/dbw_test.py
kenji-miyake/udacity-CarND-term2-Capstone
e50e826c9700a2bc549e809e2548b1a6d686012c
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_test.py
kenji-miyake/udacity-CarND-term2-Capstone
e50e826c9700a2bc549e809e2548b1a6d686012c
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_test.py
kenji-miyake/udacity-CarND-term2-Capstone
e50e826c9700a2bc549e809e2548b1a6d686012c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import csv import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport ''' You can use this file to test your DBW code against a bag recorded with a reference implementation. The bag can be found at https://s3-us-west-1.a...
34.734513
114
0.644076
import os import csv import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport class DBWTestNode(object): def __init__(self): rospy.init_node('dbw_test_node') rospy.Subscriber('/vehicle/steering_cmd', SteeringCmd, self.steer_cb...
true
true
f72a59ba76c94957d9f4a188c1bbef848032ed01
20,211
py
Python
xalpha/cons.py
Razorro/xalpha
bcecd53dc9d081deb1b8235437a4f6b74951c23d
[ "MIT" ]
null
null
null
xalpha/cons.py
Razorro/xalpha
bcecd53dc9d081deb1b8235437a4f6b74951c23d
[ "MIT" ]
null
null
null
xalpha/cons.py
Razorro/xalpha
bcecd53dc9d081deb1b8235437a4f6b74951c23d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ basic constants and utility functions """ import datetime as dt import os import time import logging import inspect from decimal import Decimal import requests from functools import wraps from simplejson.errors import JSONDecodeError import pandas as pd from pyecharts.options import ( ...
25.978149
112
0.502647
import datetime as dt import os import time import logging import inspect from decimal import Decimal import requests from functools import wraps from simplejson.errors import JSONDecodeError import pandas as pd from pyecharts.options import ( AxisOpts, DataZoomOpts, LegendOpts, TooltipOpts, Visu...
true
true
f72a5a03842d93e765331b1fe8130fe4969fd3ea
3,462
py
Python
temperature.py
balena-io-playground/balena-edison-monitoring-artik
d02ba51cda8edcbc0decc80d0dab7f724dc46014
[ "Apache-2.0" ]
2
2020-04-25T08:46:41.000Z
2021-02-11T17:36:27.000Z
temperature.py
balena-io-playground/balena-edison-monitoring-artik
d02ba51cda8edcbc0decc80d0dab7f724dc46014
[ "Apache-2.0" ]
null
null
null
temperature.py
balena-io-playground/balena-edison-monitoring-artik
d02ba51cda8edcbc0decc80d0dab7f724dc46014
[ "Apache-2.0" ]
null
null
null
""" Temperature monitoring with Intel Edison and Samsung ARTIK Cloud """ import sys import os import time from math import log import statistics from collections import deque import artikcloud from artikcloud.rest import ApiException import pyupm_grove as grove import mraa import requests # Setting credentials from t...
29.589744
121
0.644136
import sys import os import time from math import log import statistics from collections import deque import artikcloud from artikcloud.rest import ApiException import pyupm_grove as grove import mraa import requests DEVICE_ID = os.getenv('ARTIKCLOUD_DEVICE_ID') DEVICE_TOKEN = os.getenv('ARTIKCLOUD_DEVICE_TOKEN') tr...
true
true
f72a5a2e708a8aa2bbfc8ad3b14c6e6ce0a4298f
701
py
Python
P2/dsa_shuffling_queue.py
MC-DeltaT/DSA-Practicals
5c77cac1cfee5d756b84722e563813c153486770
[ "MIT" ]
null
null
null
P2/dsa_shuffling_queue.py
MC-DeltaT/DSA-Practicals
5c77cac1cfee5d756b84722e563813c153486770
[ "MIT" ]
null
null
null
P2/dsa_shuffling_queue.py
MC-DeltaT/DSA-Practicals
5c77cac1cfee5d756b84722e563813c153486770
[ "MIT" ]
null
null
null
from dsa_queue import DSAQueue class DSAShufflingQueue(DSAQueue): def enqueue(self, obj: object) -> None: if self.is_full(): raise ValueError("Queue is full.") self._array[self._size] = obj self._size += 1 def dequeue(self) -> object: tmp = self.peek() for ...
26.961538
50
0.574893
from dsa_queue import DSAQueue class DSAShufflingQueue(DSAQueue): def enqueue(self, obj: object) -> None: if self.is_full(): raise ValueError("Queue is full.") self._array[self._size] = obj self._size += 1 def dequeue(self) -> object: tmp = self.peek() for ...
true
true
f72a5b5dc1100cba5f9f50fe40bb4f01308226b6
294
py
Python
nn/optim/optimizer.py
dimaischenko/nn
a7f5887ec816e6b3bbfc57e6864ab3ae320161a6
[ "Apache-2.0" ]
null
null
null
nn/optim/optimizer.py
dimaischenko/nn
a7f5887ec816e6b3bbfc57e6864ab3ae320161a6
[ "Apache-2.0" ]
null
null
null
nn/optim/optimizer.py
dimaischenko/nn
a7f5887ec816e6b3bbfc57e6864ab3ae320161a6
[ "Apache-2.0" ]
null
null
null
class Optimizer(object): """Base abstract class for all optimizers Get network parameters and its gradients and create steps """ def __init__(self, params, grad_params): self.params = params self.grad_params = grad_params def step(self): pass
21
48
0.64966
class Optimizer(object): def __init__(self, params, grad_params): self.params = params self.grad_params = grad_params def step(self): pass
true
true
f72a5c44fcb11c06bc86b2be7515980898efe20d
2,349
py
Python
tests/conftest.py
madkote/rasa-nlu-contrib
38804da8a1debb172a3ad06a9b867a0ae8ee9b59
[ "Apache-2.0" ]
18
2019-05-07T10:28:32.000Z
2022-01-22T02:30:30.000Z
tests/conftest.py
madkote/rasa-nlu-contrib
38804da8a1debb172a3ad06a9b867a0ae8ee9b59
[ "Apache-2.0" ]
2
2019-06-14T17:57:27.000Z
2020-11-30T02:39:39.000Z
tests/conftest.py
madkote/rasa-nlu-contrib
38804da8a1debb172a3ad06a9b867a0ae8ee9b59
[ "Apache-2.0" ]
15
2019-03-18T02:21:13.000Z
2022-01-22T02:32:19.000Z
import logging import os import pytest from rasa_nlu import data_router, config from rasa_nlu.components import ComponentBuilder from rasa_nlu.model import Trainer from rasa_nlu.utils import zip_folder from rasa_nlu import training_data logging.basicConfig(level="DEBUG") CONFIG_DEFAULTS_PATH = "sample_configs/config...
28.646341
79
0.707961
import logging import os import pytest from rasa_nlu import data_router, config from rasa_nlu.components import ComponentBuilder from rasa_nlu.model import Trainer from rasa_nlu.utils import zip_folder from rasa_nlu import training_data logging.basicConfig(level="DEBUG") CONFIG_DEFAULTS_PATH = "sample_configs/config...
true
true
f72a5c88f96eb156e3a5960ef301b4efb90b71f7
7,657
py
Python
models/resnet_imagenet.py
huawei-noah/Disout
dd4a131ee27043fd3da638056808216944722336
[ "BSD-3-Clause" ]
222
2020-05-19T04:41:44.000Z
2022-03-25T20:31:01.000Z
models/resnet_imagenet.py
huawei-noah/Disout
dd4a131ee27043fd3da638056808216944722336
[ "BSD-3-Clause" ]
13
2020-05-19T09:01:40.000Z
2020-12-02T06:15:29.000Z
models/resnet_imagenet.py
huawei-noah/Disout
dd4a131ee27043fd3da638056808216944722336
[ "BSD-3-Clause" ]
40
2020-05-19T07:08:55.000Z
2022-03-14T00:21:03.000Z
#Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. #This program is free software; you can redistribute it and/or modify it under the terms of the BSD 3-Clause License. #This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ...
39.673575
227
0.614079
import torch.nn as nn import math import sys sys.path.append("..") from disout import Disout,LinearScheduler dploc = [73, 77, 81, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 173,177, 181, 188, 192, 196, 200, 204, 208, 212] convloc =[75, 79, 90, 90, 9...
true
true
f72a5cd00105d9d13c7915d5db1087ad43337300
237
py
Python
src/fecc_object/ConstantObject.py
castor91/fecc
bc46059c0d7a428d15b95050b70dec374b4bea28
[ "MIT" ]
1
2018-02-04T14:48:15.000Z
2018-02-04T14:48:15.000Z
src/fecc_object/ConstantObject.py
castor91/fecc
bc46059c0d7a428d15b95050b70dec374b4bea28
[ "MIT" ]
null
null
null
src/fecc_object/ConstantObject.py
castor91/fecc
bc46059c0d7a428d15b95050b70dec374b4bea28
[ "MIT" ]
null
null
null
from AbstractObject import * class ConstantObject(AbstractObject): def __init__(self, value): super(ConstantObject, self).__init__(value._value) def generate(self, out_code): out_code.append(PUSH(self._value))
23.7
58
0.7173
from AbstractObject import * class ConstantObject(AbstractObject): def __init__(self, value): super(ConstantObject, self).__init__(value._value) def generate(self, out_code): out_code.append(PUSH(self._value))
true
true
f72a5d57fc6b542d719802c50c2de09ed475adb4
265
py
Python
output/models/nist_data/atomic/g_month_day/schema_instance/nistschema_sv_iv_atomic_g_month_day_pattern_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/g_month_day/schema_instance/nistschema_sv_iv_atomic_g_month_day_pattern_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/g_month_day/schema_instance/nistschema_sv_iv_atomic_g_month_day_pattern_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.g_month_day.schema_instance.nistschema_sv_iv_atomic_g_month_day_pattern_2_xsd.nistschema_sv_iv_atomic_g_month_day_pattern_2 import NistschemaSvIvAtomicGMonthDayPattern2 __all__ = [ "NistschemaSvIvAtomicGMonthDayPattern2", ]
44.166667
204
0.898113
from output.models.nist_data.atomic.g_month_day.schema_instance.nistschema_sv_iv_atomic_g_month_day_pattern_2_xsd.nistschema_sv_iv_atomic_g_month_day_pattern_2 import NistschemaSvIvAtomicGMonthDayPattern2 __all__ = [ "NistschemaSvIvAtomicGMonthDayPattern2", ]
true
true
f72a5db6ab6073da6de701cf534352393ace0f69
3,681
py
Python
ml_source/src/blocktorch/blocktorch/pipelines/components/estimators/classifiers/logistic_regression_classifier.py
blocktorch/blocktorch
044aa269813ab22c5fd27f84272e5fb540fc522b
[ "MIT" ]
1
2021-09-23T12:23:02.000Z
2021-09-23T12:23:02.000Z
ml_source/src/blocktorch/blocktorch/pipelines/components/estimators/classifiers/logistic_regression_classifier.py
blocktorch/blocktorch
044aa269813ab22c5fd27f84272e5fb540fc522b
[ "MIT" ]
null
null
null
ml_source/src/blocktorch/blocktorch/pipelines/components/estimators/classifiers/logistic_regression_classifier.py
blocktorch/blocktorch
044aa269813ab22c5fd27f84272e5fb540fc522b
[ "MIT" ]
null
null
null
"""Logistic Regression Classifier.""" import numpy as np from sklearn.linear_model import LogisticRegression as SKLogisticRegression from skopt.space import Real from blocktorch.model_family import ModelFamily from blocktorch.pipelines.components.estimators import Estimator from blocktorch.problem_types import Problem...
40.01087
166
0.640315
import numpy as np from sklearn.linear_model import LogisticRegression as SKLogisticRegression from skopt.space import Real from blocktorch.model_family import ModelFamily from blocktorch.pipelines.components.estimators import Estimator from blocktorch.problem_types import ProblemTypes class LogisticRegressionClassi...
true
true
f72a5eb729d896a5a7b9e4172a18b461bd416d06
953
py
Python
app/programs/original/rain.py
mike-wendt/unicorn-remote
e649c069482446f08b0baf579de05f065ad7ab89
[ "MIT" ]
37
2017-07-30T16:43:22.000Z
2021-12-12T09:40:11.000Z
app/programs/original/rain.py
kfechter/unicorn-remote
39466cad9e7420b51ffa11fa7554756a934f2d24
[ "MIT" ]
7
2017-11-18T19:22:18.000Z
2021-09-08T15:59:00.000Z
app/programs/original/rain.py
kfechter/unicorn-remote
39466cad9e7420b51ffa11fa7554756a934f2d24
[ "MIT" ]
8
2018-04-21T05:31:40.000Z
2020-12-09T19:43:32.000Z
import unicornhat as unicorn import time, colorsys import random def run(params): m = [[0 for i in range(8)] for i in range(8)] while True: if 1 in m[-1]: top = [0.5 * i for i in m[-1]] elif 0.5 in m[-1]: top = [0] * 8 else: top = [random.randint(0,...
28.878788
73
0.408185
import unicornhat as unicorn import time, colorsys import random def run(params): m = [[0 for i in range(8)] for i in range(8)] while True: if 1 in m[-1]: top = [0.5 * i for i in m[-1]] elif 0.5 in m[-1]: top = [0] * 8 else: top = [random.randint(0,...
true
true
f72a5f267601807387faccbf297e7207c244bae9
7,613
py
Python
GPyOpt/util/general.py
komorihi/GPyOpt
5c8424f92ffaa745d3daebca3f38de2569500d6d
[ "BSD-3-Clause" ]
null
null
null
GPyOpt/util/general.py
komorihi/GPyOpt
5c8424f92ffaa745d3daebca3f38de2569500d6d
[ "BSD-3-Clause" ]
null
null
null
GPyOpt/util/general.py
komorihi/GPyOpt
5c8424f92ffaa745d3daebca3f38de2569500d6d
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from scipy.special import erfc import time from ..core.errors import InvalidConfigError def compute_integrated_acquisition(acquisition,x): ''' Used to compute the acquisition function when s...
29.507752
141
0.652305
import numpy as np from scipy.special import erfc import time from ..core.errors import InvalidConfigError def compute_integrated_acquisition(acquisition,x): acqu_x = 0 for i in range(acquisition.model.num_hmc_samples): acquisition.model.model.kern[:] = acquisition.model.hmc_samples[i,:] a...
true
true
f72a6096610e02f8d2fd5a97a6ffa630d71313b8
167
py
Python
usuario/admin.py
UNIZAR-30226-2021-05/Lector--Backend
8cc285216972f7485781ece51a88d5f02dc85013
[ "MIT" ]
null
null
null
usuario/admin.py
UNIZAR-30226-2021-05/Lector--Backend
8cc285216972f7485781ece51a88d5f02dc85013
[ "MIT" ]
null
null
null
usuario/admin.py
UNIZAR-30226-2021-05/Lector--Backend
8cc285216972f7485781ece51a88d5f02dc85013
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Usuario, Preferencias admin.site.register(Usuario) admin.site.register(Preferencias)
27.833333
41
0.826347
from django.contrib import admin from .models import Usuario, Preferencias admin.site.register(Usuario) admin.site.register(Preferencias)
true
true
f72a6262313ce7497db5b2c9b1f07193731722d5
56,933
gyp
Python
node_modules/nodegit/vendor/libgit2.gyp
nodeframe/dite
bfe7d02af159b39b42a2c88fde4ce369db021c85
[ "MIT" ]
12
2016-08-19T23:21:41.000Z
2022-02-17T13:40:25.000Z
vendor/libgit2.gyp
Acidburn0zzz/nodegit
b4e85cd641ebf537edfe2f41f4687057bc517c02
[ "MIT" ]
null
null
null
vendor/libgit2.gyp
Acidburn0zzz/nodegit
b4e85cd641ebf537edfe2f41f4687057bc517c02
[ "MIT" ]
8
2015-10-24T11:57:55.000Z
2022-02-15T15:05:11.000Z
{ # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. "variables": { "target_arch%": "x86", "library%": "static_library", "openssl_enable_asm%": 0, # only supported with the Visual Studi...
40.753758
112
0.572216
{ "variables": { "target_arch%": "x86", "library%": "static_library", "openssl_enable_asm%": 0, "gcc_version%": 0, "is_clang%": 0, }, "targets": [ { "target_name": "libgit2", "type": "static_library", "defines": [ "GIT_THREADS", "GIT_SSH", ...
true
true
f72a63ada453874531a4aa783d0ef1b05af45aff
21,710
py
Python
tests/engine/cloud/test_cloud_flows.py
tedmiston/prefect
a2cb40c28c942b1d170db42a55bab99598a4dcd6
[ "ECL-2.0", "Apache-2.0" ]
1
2020-05-10T14:32:32.000Z
2020-05-10T14:32:32.000Z
tests/engine/cloud/test_cloud_flows.py
tedmiston/prefect
a2cb40c28c942b1d170db42a55bab99598a4dcd6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/engine/cloud/test_cloud_flows.py
tedmiston/prefect
a2cb40c28c942b1d170db42a55bab99598a4dcd6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import datetime import sys import uuid from collections import Counter, namedtuple from unittest.mock import MagicMock import pendulum import pytest import prefect from prefect.client.client import Client, FlowRunInfoResult, TaskRunInfoResult from prefect.engine.cloud import CloudFlowRunner, CloudTaskRunner from pref...
33.094512
89
0.643574
import datetime import sys import uuid from collections import Counter, namedtuple from unittest.mock import MagicMock import pendulum import pytest import prefect from prefect.client.client import Client, FlowRunInfoResult, TaskRunInfoResult from prefect.engine.cloud import CloudFlowRunner, CloudTaskRunner from pref...
true
true
f72a6472f11d4bd876bdf957708a3a20931e06da
10,074
py
Python
scripts/fishnet_generator.py
dgketchum/gsflow-arcpy
966e8f48e0fee1ba534fc6a64987f67594b144f2
[ "Apache-2.0" ]
13
2018-09-12T17:42:48.000Z
2022-03-18T20:14:45.000Z
scripts/fishnet_generator.py
dgketchum/gsflow-arcpy
966e8f48e0fee1ba534fc6a64987f67594b144f2
[ "Apache-2.0" ]
35
2018-03-08T16:20:07.000Z
2020-11-05T11:59:05.000Z
scripts/fishnet_generator.py
dgketchum/gsflow-arcpy
966e8f48e0fee1ba534fc6a64987f67594b144f2
[ "Apache-2.0" ]
12
2018-08-18T20:54:56.000Z
2022-03-26T00:04:45.000Z
#-------------------------------- # Name: fishnet_generator.py # Purpose: GSFLOW fishnet generator # Notes: ArcGIS 10.2+ Version # Python: 2.7 #-------------------------------- import argparse import ConfigParser import datetime as dt from decimal import Decimal import logging imp...
37.730337
83
0.629839
import argparse import ConfigParser import datetime as dt from decimal import Decimal import logging import os import sys import arcpy from arcpy import env import support_functions as support def fishnet_func(config_path, overwrite_flag=False): hru = support.HRUParameters(config_pat...
true
true
f72a6574f160f049bb1e251b53b255e19fcb01c4
2,448
py
Python
test/functional/p2p_addrv2_relay.py
PivxLiteDev/PivxLite
648d4a193b61b1996b41e9f6c6c468875c757cdd
[ "MIT" ]
null
null
null
test/functional/p2p_addrv2_relay.py
PivxLiteDev/PivxLite
648d4a193b61b1996b41e9f6c6c468875c757cdd
[ "MIT" ]
3
2020-02-06T10:15:07.000Z
2022-01-13T00:08:49.000Z
test/functional/p2p_addrv2_relay.py
PivxLiteDev/PivxLite
648d4a193b61b1996b41e9f6c6c468875c757cdd
[ "MIT" ]
9
2020-03-10T14:14:25.000Z
2022-03-05T13:43:35.000Z
#!/usr/bin/env python3 # Copyright (c) 2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test addrv2 relay """ import time from test_framework.messages import ( CAddress, msg_addrv2, ...
30.987342
90
0.664216
import time from test_framework.messages import ( CAddress, msg_addrv2, NODE_NETWORK ) from test_framework.mininode import P2PInterface from test_framework.test_framework import PivxlTestFramework from test_framework.util import assert_equal ADDRS = [] for i in range(10): addr = CAddress() ad...
true
true
f72a65ddec02cb6954334890b87a93ad0a175bef
257
py
Python
Akeso/Exploits/ExploitFrame.py
tamuctf/Akeso
05e6c284b45e1d1ec2d744a8508c9b03e3b5718e
[ "MIT" ]
19
2018-02-26T00:19:17.000Z
2019-12-18T04:26:45.000Z
Akeso/Exploits/ExploitFrame.py
tamuctf/Akeso
05e6c284b45e1d1ec2d744a8508c9b03e3b5718e
[ "MIT" ]
11
2018-05-07T15:11:30.000Z
2018-11-13T16:40:41.000Z
DefenseLab/Exploits/ExploitFrame.py
ameserole/Defense-Lab
05d89eecd52e76c00f6aa3ab0eaaff85fad88dbb
[ "MIT" ]
2
2019-12-11T07:28:48.000Z
2021-05-30T07:41:57.000Z
class ExploitFrame(object): """Exploit object""" def __init__(self, serviceInfo): self.serviceInfo = serviceInfo def exploit(self): raise NotImplementedError() def exploitSuccess(self): raise NotImplementedError()
21.416667
38
0.66537
class ExploitFrame(object): def __init__(self, serviceInfo): self.serviceInfo = serviceInfo def exploit(self): raise NotImplementedError() def exploitSuccess(self): raise NotImplementedError()
true
true
f72a66542ace53e924c25a5a10a82214486982d6
3,365
py
Python
SQSConnection.py
jmartipu/CrearSolicitudDispatcher
3b9c46f5f4a07fe96c98846c7f48d802203e8cee
[ "Apache-2.0" ]
null
null
null
SQSConnection.py
jmartipu/CrearSolicitudDispatcher
3b9c46f5f4a07fe96c98846c7f48d802203e8cee
[ "Apache-2.0" ]
null
null
null
SQSConnection.py
jmartipu/CrearSolicitudDispatcher
3b9c46f5f4a07fe96c98846c7f48d802203e8cee
[ "Apache-2.0" ]
null
null
null
import boto3 import botocore import Settings class SQSConnection: session = boto3.Session( aws_access_key_id=Settings.AWS_ACCESS_KEY_ID_SQS, aws_secret_access_key=Settings.AWS_SECRET_ACCESS_KEY_SQS, ) sqs = session.client('sqs', region_name=Settings.AWS_REGION_SQS) ...
31.157407
86
0.556612
import boto3 import botocore import Settings class SQSConnection: session = boto3.Session( aws_access_key_id=Settings.AWS_ACCESS_KEY_ID_SQS, aws_secret_access_key=Settings.AWS_SECRET_ACCESS_KEY_SQS, ) sqs = session.client('sqs', region_name=Settings.AWS_REGION_SQS) ...
true
true
f72a674b8b8017122951cbd31901aa9c70d1de59
10,984
py
Python
insights/parsers/systemd/unitfiles.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
121
2017-05-30T20:23:25.000Z
2022-03-23T12:52:15.000Z
insights/parsers/systemd/unitfiles.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
1,977
2017-05-26T14:36:03.000Z
2022-03-31T10:38:53.000Z
insights/parsers/systemd/unitfiles.py
haithcockce/insights-core
b2e197c6bfc25bcbe2926f07c35a80f2cf8232f5
[ "Apache-2.0" ]
244
2017-05-30T20:22:57.000Z
2022-03-26T10:09:39.000Z
""" Units Manged By Systemctl (services) ==================================== Parsers included in this module are: ListUnits - command ``/bin/systemctl list-units`` ------------------------------------------------- UnitFiles - command ``/bin/systemctl list-unit-files`` -----------------------------------------------...
37.745704
157
0.584578
from .. import get_active_lines from ... import Parser, parser from insights.specs import Specs from insights.parsers import SkipException @parser(Specs.systemctl_list_unit_files) class UnitFiles(Parser): def __init__(self, *args, **kwargs): self.services = {} self.service_list = [] self....
true
true
f72a681dedfbe58c031e09445ad13611853eefec
5,987
py
Python
tests/test_public_client.py
shanefontaine/ethfinex-python
a883eb8e72d1c87156db62adbc5f95bb82fa5371
[ "MIT" ]
7
2018-12-25T09:55:40.000Z
2021-05-14T04:23:44.000Z
tests/test_public_client.py
shanefontaine/ethfinex-python
a883eb8e72d1c87156db62adbc5f95bb82fa5371
[ "MIT" ]
4
2019-03-08T09:37:35.000Z
2021-06-01T23:12:31.000Z
tests/test_public_client.py
shanefontaine/ethfinex-python
a883eb8e72d1c87156db62adbc5f95bb82fa5371
[ "MIT" ]
1
2021-04-24T01:11:01.000Z
2021-04-24T01:11:01.000Z
import pytest import time from ethfinex.public_client import PublicClient @pytest.fixture(scope='module') def client(): return PublicClient() @pytest.mark.usefixtures('client') class TestPublicClient(object): @staticmethod def teardown_method(): time.sleep(.5) # Avoid rate limit def test...
36.730061
86
0.525639
import pytest import time from ethfinex.public_client import PublicClient @pytest.fixture(scope='module') def client(): return PublicClient() @pytest.mark.usefixtures('client') class TestPublicClient(object): @staticmethod def teardown_method(): time.sleep(.5) def test_get_platform_stat...
true
true
f72a687a337167c96e7903a7bdd07f5ced99b8a8
3,743
py
Python
src/federatedid/federated.py
dawidkski/federated-faceid
95b1f4b7da0e8baf1cac35edf3b49528c650c491
[ "MIT" ]
1
2021-12-23T14:00:36.000Z
2021-12-23T14:00:36.000Z
src/federatedid/federated.py
dawidkski/federated-faceid
95b1f4b7da0e8baf1cac35edf3b49528c650c491
[ "MIT" ]
6
2021-01-12T13:40:31.000Z
2022-03-12T00:31:27.000Z
src/federatedid/federated.py
d-kicinski/federated-faceid
95b1f4b7da0e8baf1cac35edf3b49528c650c491
[ "MIT" ]
1
2020-05-12T03:11:07.000Z
2020-05-12T03:11:07.000Z
import copy from dataclasses import dataclass from typing import List, Optional import torch from torch.nn import CrossEntropyLoss, Module from torch.utils.data import DataLoader def federated_averaging(models: List[Module]) -> Module: global_model = copy.deepcopy(models[0]) global_weights = global_model.sta...
29.944
87
0.627304
import copy from dataclasses import dataclass from typing import List, Optional import torch from torch.nn import CrossEntropyLoss, Module from torch.utils.data import DataLoader def federated_averaging(models: List[Module]) -> Module: global_model = copy.deepcopy(models[0]) global_weights = global_model.sta...
true
true
f72a688feda53838c2dd09e2907fbb42d5bc0c1c
1,667
py
Python
tests/bugs/core_3474_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_3474_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_3474_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_3474 # title: Regression in joins on procedures # decription: # tracker_id: CORE-3474 # min_versions: ['2.5.0'] # versions: 3.0 # qmid: None import pytest from firebird.qa import db_factory, isql_act, Action # version: 3.0 # resources: None substituti...
24.514706
71
0.617277
import pytest from firebird.qa import db_factory, isql_act, Action substitutions_1 = [('-At line.*', '')] init_script_1 = """""" db_1 = db_factory(from_backup='employee-ods12.fbk', init=init_script_1) test_script_1 = """ set list on; select e.emp_no emp_1, e.last_name name_1, p.proj_name proj_1...
true
true
f72a6990f0aad8249f5dc016a2590edf77f57c03
4,224
py
Python
mainapp/controllers/forms.py
fabiocostapro/fiberappz
da73569fa03e0b731b5ec2c96a0ee668f8b10ef6
[ "MIT" ]
null
null
null
mainapp/controllers/forms.py
fabiocostapro/fiberappz
da73569fa03e0b731b5ec2c96a0ee668f8b10ef6
[ "MIT" ]
null
null
null
mainapp/controllers/forms.py
fabiocostapro/fiberappz
da73569fa03e0b731b5ec2c96a0ee668f8b10ef6
[ "MIT" ]
null
null
null
from wtforms import Form from wtforms import StringField, PasswordField from wtforms.fields.html5 import EmailField from wtforms import validators from mainapp.models.tables import User class UserCreateForm(Form): username = StringField("Usuário", [ valida...
45.419355
114
0.482244
from wtforms import Form from wtforms import StringField, PasswordField from wtforms.fields.html5 import EmailField from wtforms import validators from mainapp.models.tables import User class UserCreateForm(Form): username = StringField("Usuário", [ valida...
true
true
f72a6add468392d9b7eca586307a71cb8213bc22
10,197
py
Python
api/team/tests/test_update.py
BerniWittmann/beachanmeldung
9014dea5c31ea9e26f18d753d8d836741865c38e
[ "Unlicense", "MIT" ]
null
null
null
api/team/tests/test_update.py
BerniWittmann/beachanmeldung
9014dea5c31ea9e26f18d753d8d836741865c38e
[ "Unlicense", "MIT" ]
5
2020-06-05T17:31:08.000Z
2022-03-11T23:16:12.000Z
api/team/tests/test_update.py
BerniWittmann/beachanmeldung
9014dea5c31ea9e26f18d753d8d836741865c38e
[ "Unlicense", "MIT" ]
null
null
null
import json from django.core.urlresolvers import reverse from django.test import TestCase from django.utils import timezone from django.utils.translation import activate from rest_framework.test import APIClient from rest_framework_jwt.settings import api_settings from api.accounts.models import MyUser from api.team....
44.142857
83
0.531529
import json from django.core.urlresolvers import reverse from django.test import TestCase from django.utils import timezone from django.utils.translation import activate from rest_framework.test import APIClient from rest_framework_jwt.settings import api_settings from api.accounts.models import MyUser from api.team....
true
true
f72a6bc23ff8f5945f5bfef16d9ffa3a49b4878d
2,563
py
Python
setup.py
ianhuang0630/CSQ
5f1fe99a8d9da73692643b3911d675dce269a03d
[ "MIT" ]
98
2019-04-05T08:22:38.000Z
2022-03-29T06:22:17.000Z
setup.py
ianhuang0630/CSQ
5f1fe99a8d9da73692643b3911d675dce269a03d
[ "MIT" ]
19
2019-06-28T20:26:01.000Z
2022-03-03T16:26:57.000Z
setup.py
ianhuang0630/CSQ
5f1fe99a8d9da73692643b3911d675dce269a03d
[ "MIT" ]
26
2019-04-15T00:54:06.000Z
2022-02-22T23:17:24.000Z
"""Setup learnable_primitives""" from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension from itertools import dropwhile import numpy as np from os import path def collect_docstring(lines): """Return document docstring if it exists""" lines = dropwhile(l...
26.42268
70
0.55833
from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension from itertools import dropwhile import numpy as np from os import path def collect_docstring(lines): lines = dropwhile(lambda x: not x.startswith('"""'), lines) doc = "" for line in lines: ...
true
true
f72a6c18f2dd71bf7e6d4454aa80d63e9fbe8e63
522
py
Python
Season 06 - Files in Python/Episode 12 - Imports Error & running as Python Scripts/Episode 12 - Imports Error & running as Python Scripts.py
Pythobit/Python-tutorial
b0743eaa9c237c3578131ead1b3f2c295f11b7ee
[ "MIT" ]
3
2021-02-19T18:33:00.000Z
2021-08-03T14:56:50.000Z
Season 06 - Files in Python/Episode 12 - Imports Error & running as Python Scripts/Episode 12 - Imports Error & running as Python Scripts.py
barawalojas/Python-tutorial
3f4b2b073e421888b3d62ff634658317d9abcb9b
[ "MIT" ]
1
2021-07-10T14:37:57.000Z
2021-07-20T09:51:39.000Z
Season 06 - Files in Python/Episode 12 - Imports Error & running as Python Scripts/Episode 12 - Imports Error & running as Python Scripts.py
barawalojas/Python-tutorial
3f4b2b073e421888b3d62ff634658317d9abcb9b
[ "MIT" ]
1
2021-08-02T05:39:38.000Z
2021-08-02T05:39:38.000Z
# Imports Error & running as Python Scripts. """ IMPORT ERROR if your module is already imported, you can import it the same way, but if you want to access something inside in it, python will look into the module & give you an error because it's going to be back n forth, called `circular import` [bad thing] """ """ ...
26.1
117
0.701149
true
true