hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c42e97e5faa6e0e8e85b2c77b113058f3869d5c
23,589
py
Python
aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py
mduffin95/aries-cloudagent-python
cb102bcb796dd6e7aec95eb4fe753b10f0c612b3
[ "Apache-2.0" ]
247
2019-07-02T21:10:21.000Z
2022-03-30T13:55:33.000Z
aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py
estrehle/aries-cloudagent-python
1460b2d32c933944b4677cf25a78c4ace07346c8
[ "Apache-2.0" ]
1,462
2019-07-02T20:57:30.000Z
2022-03-31T23:13:35.000Z
aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py
estrehle/aries-cloudagent-python
1460b2d32c933944b4677cf25a78c4ace07346c8
[ "Apache-2.0" ]
377
2019-06-20T21:01:31.000Z
2022-03-30T08:27:53.000Z
"""V2.0 issue-credential linked data proof credential format handler.""" from ......vc.ld_proofs.error import LinkedDataProofException from ......vc.ld_proofs.check import get_properties_without_context import logging from typing import Mapping from marshmallow import EXCLUDE, INCLUDE from pyld import jsonld from p...
37.562102
90
0.64937
from ......vc.ld_proofs.error import LinkedDataProofException from ......vc.ld_proofs.check import get_properties_without_context import logging from typing import Mapping from marshmallow import EXCLUDE, INCLUDE from pyld import jsonld from pyld.jsonld import JsonLdProcessor from ......did.did_key import DIDKey f...
true
true
1c42e9958b507431d118de6f764798d653b61351
12,333
py
Python
app/originblog/models.py
ZhangPeng18/originblog
c52365e765dff060804043d709eccfb1a1c6f1ff
[ "MIT" ]
null
null
null
app/originblog/models.py
ZhangPeng18/originblog
c52365e765dff060804043d709eccfb1a1c6f1ff
[ "MIT" ]
null
null
null
app/originblog/models.py
ZhangPeng18/originblog
c52365e765dff060804043d709eccfb1a1c6f1ff
[ "MIT" ]
null
null
null
import hashlib import re from datetime import datetime from urllib.parse import urlencode import bleach import markdown2 from flask import current_app from flask_login import UserMixin from itsdangerous import BadTimeSignature, SignatureExpired from itsdangerous import TimedJSONWebSignatureSerializer as Serializer fro...
34.163435
118
0.636585
import hashlib import re from datetime import datetime from urllib.parse import urlencode import bleach import markdown2 from flask import current_app from flask_login import UserMixin from itsdangerous import BadTimeSignature, SignatureExpired from itsdangerous import TimedJSONWebSignatureSerializer as Serializer fro...
true
true
1c42ea5a050ff90cd7136b1dd350c0440194626d
8,391
py
Python
homeassistant/components/energy/sensor.py
tsroka/home-assistant-core
2d83ad321115645a2103d577c3920df0c6afec4d
[ "Apache-2.0" ]
null
null
null
homeassistant/components/energy/sensor.py
tsroka/home-assistant-core
2d83ad321115645a2103d577c3920df0c6afec4d
[ "Apache-2.0" ]
28
2021-09-14T06:14:07.000Z
2022-03-31T06:16:54.000Z
homeassistant/components/energy/sensor.py
tsroka/home-assistant-core
2d83ad321115645a2103d577c3920df0c6afec4d
[ "Apache-2.0" ]
null
null
null
"""Helper sensor for calculating utility costs.""" from __future__ import annotations from dataclasses import dataclass from functools import partial from typing import Any, Final, Literal, TypeVar, cast from homeassistant.components.sensor import ( ATTR_LAST_RESET, DEVICE_CLASS_MONETARY, STATE_CLASS_MEAS...
31.904943
88
0.628769
from __future__ import annotations from dataclasses import dataclass from functools import partial from typing import Any, Final, Literal, TypeVar, cast from homeassistant.components.sensor import ( ATTR_LAST_RESET, DEVICE_CLASS_MONETARY, STATE_CLASS_MEASUREMENT, SensorEntity, ) from homeassistant.cor...
true
true
1c42ec42c6f4857d394d3710fd38afd08eee5376
452
py
Python
transitland/errors.py
transit-land/onestop-id-python-client
d03d8759d0758803519c51c6970213946a4078d4
[ "MIT" ]
null
null
null
transitland/errors.py
transit-land/onestop-id-python-client
d03d8759d0758803519c51c6970213946a4078d4
[ "MIT" ]
null
null
null
transitland/errors.py
transit-land/onestop-id-python-client
d03d8759d0758803519c51c6970213946a4078d4
[ "MIT" ]
null
null
null
##### Exceptions ##### class ExistingIdentifierError(KeyError): pass class NoPointsError(ValueError): pass class InvalidFeedRegistryError(ValueError): pass class InvalidChecksumError(ValueError): pass class DatastoreError(Exception): def __init__(self, message, response_code=None, response_body=Non...
22.6
70
0.765487
class InvalidFeedRegistryError(ValueError): pass class InvalidChecksumError(ValueError): pass class DatastoreError(Exception): def __init__(self, message, response_code=None, response_body=None): super(DatastoreError, self).__init__(message) self.response_code = response_code self.response_body...
true
true
1c42ec6d739f7de77d8c8d27b1b8559886a3439c
3,487
py
Python
builder/implicit_ratings_calculator.py
lncohn/practical_recommender_systems
118f791b224b3f10a8dcddf93d10eff1dea5cbde
[ "MIT" ]
null
null
null
builder/implicit_ratings_calculator.py
lncohn/practical_recommender_systems
118f791b224b3f10a8dcddf93d10eff1dea5cbde
[ "MIT" ]
null
null
null
builder/implicit_ratings_calculator.py
lncohn/practical_recommender_systems
118f791b224b3f10a8dcddf93d10eff1dea5cbde
[ "MIT" ]
null
null
null
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "prs_project.settings") import django django.setup() from django.db.models import Count import datetime from datetime import date, timedelta from collections import defaultdict from collector.models import Log from analytics.models import Rating w1 = 100 ...
23.092715
101
0.619444
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "prs_project.settings") import django django.setup() from django.db.models import Count import datetime from datetime import date, timedelta from collections import defaultdict from collector.models import Log from analytics.models import Rating w1 = 100 ...
true
true
1c42ec954cada986b5ee4960aedaeb76e474d17a
5,219
py
Python
nemo/collections/tts/parts/talknet.py
ParikhKadam/NeMo
ee11f7c4666d410d91f9da33c61f4819ea625013
[ "Apache-2.0" ]
1
2020-11-05T09:39:59.000Z
2020-11-05T09:39:59.000Z
nemo/collections/tts/parts/talknet.py
ParikhKadam/NeMo
ee11f7c4666d410d91f9da33c61f4819ea625013
[ "Apache-2.0" ]
1
2020-06-11T00:54:42.000Z
2020-06-11T00:54:42.000Z
nemo/collections/tts/parts/talknet.py
ParikhKadam/NeMo
ee11f7c4666d410d91f9da33c61f4819ea625013
[ "Apache-2.0" ]
3
2020-03-10T05:10:07.000Z
2020-12-08T01:33:35.000Z
# Copyright 2020 NVIDIA. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
36.496503
117
0.669477
import numpy as np import torch from torch.nn import functional as F def dmld_loss(y_pred, y_true, num_classes): def log_sum_exp(x): axis = len(x.size()) - 1 m, _ = torch.max(x, dim=axis) m2, _ = torch.max(x, dim=axis, keepdim=True) return m + torch.log(to...
true
true
1c42eda9d5fcf36fe53ac3ad8ac5d39f16da82fb
14,976
py
Python
layers/box_utils.py
zhaozhongch/yolact_ros
ee3e086626f49a81ffd06b2740dae849552151cb
[ "MIT" ]
1
2022-02-06T05:11:24.000Z
2022-02-06T05:11:24.000Z
layers/box_utils.py
zhaozhongch/yolact_ros
ee3e086626f49a81ffd06b2740dae849552151cb
[ "MIT" ]
null
null
null
layers/box_utils.py
zhaozhongch/yolact_ros
ee3e086626f49a81ffd06b2740dae849552151cb
[ "MIT" ]
1
2022-02-06T05:11:26.000Z
2022-02-06T05:11:26.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import torch from utils import timer from data import cfg @torch.jit.script def point_form(boxes): """ Convert prior_boxes to (xmin, ymin, xmax, ymax) representation for comparison to point form ground truth data. Args: boxes: (tensor) center-size de...
38.204082
125
0.615585
import torch from utils import timer from data import cfg @torch.jit.script def point_form(boxes): return torch.cat((boxes[:, :2] - boxes[:, 2:]/2, boxes[:, :2] + boxes[:, 2:]/2), 1) @torch.jit.script def center_size(boxes): return torch.cat(( (boxes[:, 2:] + boxes[:, :2])/2, ...
true
true
1c42edffb7139808c7e7bed7ee187abc5c29299d
3,558
py
Python
alipay/aop/api/domain/AlipayOpenPublicMessageGroupSendModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayOpenPublicMessageGroupSendModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayOpenPublicMessageGroupSendModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.Article import Article from alipay.aop.api.domain.Image import Image from alipay.aop.api.domain.Text import Text class AlipayOpenPublicMessageGroupSendModel(object): def __in...
29.404959
70
0.554244
import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.Article import Article from alipay.aop.api.domain.Image import Image from alipay.aop.api.domain.Text import Text class AlipayOpenPublicMessageGroupSendModel(object): def __init__(self): self._articles = None ...
true
true
1c42eef5e88d12088d2e2f4ab09315ae19042ecf
929
py
Python
index.py
EDAII/Lista1_Guilherme_Isaque
b7dc5b2cde48ed192b3b0c6592975324006c6a01
[ "MIT" ]
1
2019-09-02T13:17:28.000Z
2019-09-02T13:17:28.000Z
index.py
EDAII/Lista1_Guilherme_Isaque
b7dc5b2cde48ed192b3b0c6592975324006c6a01
[ "MIT" ]
null
null
null
index.py
EDAII/Lista1_Guilherme_Isaque
b7dc5b2cde48ed192b3b0c6592975324006c6a01
[ "MIT" ]
null
null
null
import load_and_prepare_data as ld import search_methods as sm data = ld.load_and_prepare_data() # print(data) for i in data: print(i) print("digite o co_cnes do Centro médico") value = int(input()) result_binary_search_iterative = sm.binary_search(data, value) result_recursive_binary_search = sm.recursive_binar...
35.730769
66
0.826695
import load_and_prepare_data as ld import search_methods as sm data = ld.load_and_prepare_data() for i in data: print(i) print("digite o co_cnes do Centro médico") value = int(input()) result_binary_search_iterative = sm.binary_search(data, value) result_recursive_binary_search = sm.recursive_binary_search( ...
true
true
1c42ef0d6619bccee045b8194559a4e329ad636f
2,325
py
Python
securitybot/auth/auth.py
gyrospectre/securitybot
90db2ae532667c48ca080108b895c2e1fe16b1e8
[ "Apache-2.0" ]
3
2020-10-09T04:46:15.000Z
2021-12-30T10:12:37.000Z
securitybot/auth/auth.py
gyrospectre/securitybot
90db2ae532667c48ca080108b895c2e1fe16b1e8
[ "Apache-2.0" ]
null
null
null
securitybot/auth/auth.py
gyrospectre/securitybot
90db2ae532667c48ca080108b895c2e1fe16b1e8
[ "Apache-2.0" ]
1
2020-08-11T19:28:13.000Z
2020-08-11T19:28:13.000Z
''' An authentication object for doing 2FA on Slack users. ''' __author__ = 'Alex Bertsch, Antoine Cardon' __email__ = 'abertsch@dropbox.com, antoine.cardon@algolia.com' import pytz from datetime import datetime, timedelta from abc import ABCMeta, abstractmethod from enum import Enum, unique @unique class AuthSta...
25.833333
75
0.615484
__author__ = 'Alex Bertsch, Antoine Cardon' __email__ = 'abertsch@dropbox.com, antoine.cardon@algolia.com' import pytz from datetime import datetime, timedelta from abc import ABCMeta, abstractmethod from enum import Enum, unique @unique class AuthStates(Enum): NONE = 1 PENDING = 2 AUTHORIZED = 3 ...
true
true
1c42efec5fd44741cee47e37a2eb70dd452d2d50
622
py
Python
pcap3103/inhertiance_lab/employee.py
owaishanif786/python
212d626e10bebf161ee123459dc5f0384d9540ac
[ "MIT" ]
null
null
null
pcap3103/inhertiance_lab/employee.py
owaishanif786/python
212d626e10bebf161ee123459dc5f0384d9540ac
[ "MIT" ]
null
null
null
pcap3103/inhertiance_lab/employee.py
owaishanif786/python
212d626e10bebf161ee123459dc5f0384d9540ac
[ "MIT" ]
null
null
null
class Employee: def __init__(self, name, title, email_address, phone_number=''): self.name = name self.title = title self.email_address = email_address self.phone_number = phone_number def email_signature(self, include_phone=False): signature = f'{self.name}\n{self.t...
34.555556
72
0.633441
class Employee: def __init__(self, name, title, email_address, phone_number=''): self.name = name self.title = title self.email_address = email_address self.phone_number = phone_number def email_signature(self, include_phone=False): signature = f'{self.name}\n{self.t...
true
true
1c42eff9feef990ed123d1f30a221e445dc6734a
1,000
py
Python
OpenCV2/Feature_Detection_and_Description/Corner_Detection_with_Shi-Tomasi_coner_method.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
OpenCV2/Feature_Detection_and_Description/Corner_Detection_with_Shi-Tomasi_coner_method.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
OpenCV2/Feature_Detection_and_Description/Corner_Detection_with_Shi-Tomasi_coner_method.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
""" Corner Detection with Shi-Tomasi Coner Detection method """ # Python progran to illustrate # corner detection with # Shi-Tomasi detection method # organizing imports import cv2 import numpy as np import matplotlib.pyplot as plt # path to input image specified and # image is loaded with imread command img = ...
24.390244
59
0.729
import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread("../images/1.jpeg") gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) corner = cv2.goodFeaturesToTrack(gray, 100, 0.01, 10) corner = np.int0(corner) for i in corner: x, y = i.ravel() cv2.circle(img, (x, y), 3, (255, 0,...
true
true
1c42f07b5d8264b529a6f72cf2bb73a8a179756e
1,152
py
Python
twitter-clone/twitter/migrations/0004_auto_20201003_1527.py
Mlitwin98/twitter-clone
4fbe754a4693c39ac4e9623f51ca42a7facecd2e
[ "MIT" ]
null
null
null
twitter-clone/twitter/migrations/0004_auto_20201003_1527.py
Mlitwin98/twitter-clone
4fbe754a4693c39ac4e9623f51ca42a7facecd2e
[ "MIT" ]
null
null
null
twitter-clone/twitter/migrations/0004_auto_20201003_1527.py
Mlitwin98/twitter-clone
4fbe754a4693c39ac4e9623f51ca42a7facecd2e
[ "MIT" ]
null
null
null
# Generated by Django 3.1 on 2020-10-03 13:27 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('twitter', '0003_auto_20201001_1902'), ] operations = [ migrations.AlterField( model_name='profile...
34.909091
145
0.614583
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('twitter', '0003_auto_20201001_1902'), ] operations = [ migrations.AlterField( model_name='profile', name='backgroundPic', ...
true
true
1c42f1ef23137c020f34bcdfca0a32d2cb13fcd5
22,575
py
Python
captoolkit/fittopo.py
tsutterley/captoolkit
314c4d34f49012c25286478c943b0ab13c893c62
[ "Apache-2.0" ]
37
2019-09-27T00:36:16.000Z
2022-01-31T01:51:19.000Z
captoolkit/fittopo.py
tsutterley/captoolkit
314c4d34f49012c25286478c943b0ab13c893c62
[ "Apache-2.0" ]
3
2020-02-27T21:22:50.000Z
2020-10-14T01:31:26.000Z
captoolkit/fittopo.py
tsutterley/captoolkit
314c4d34f49012c25286478c943b0ab13c893c62
[ "Apache-2.0" ]
15
2019-09-24T08:06:49.000Z
2021-11-03T14:44:19.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Surface topography detrending of satellite and airborne altimetry Program computes surface elevation residuals, containing only the temporal component, by removing the static topography. Depending on the number of observations in each solution one of three ...
29.821664
92
0.548439
import warnings warnings.filterwarnings("ignore") import os import h5py import pyproj import argparse import numpy as np import statsmodels.api as sm from datetime import datetime from scipy.spatial import cKDTree from statsmodels.robust.scale import mad DXY = [1, 1] RADIUS = [1] MINOBS = 10 ...
true
true
1c42f38988b5a53094b719ae7fa6eb2c0afc8857
3,836
py
Python
plugins/opsgenie/unit_test/test_get_alert.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
plugins/opsgenie/unit_test/test_get_alert.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
plugins/opsgenie/unit_test/test_get_alert.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
null
null
null
import os import sys from parameterized import parameterized sys.path.append(os.path.abspath("../")) import logging from unittest import TestCase, mock from icon_opsgenie.actions.get_alert import GetAlert from icon_opsgenie.actions.get_alert.schema import Output from icon_opsgenie.connection.connection import Connec...
38.36
116
0.584724
import os import sys from parameterized import parameterized sys.path.append(os.path.abspath("../")) import logging from unittest import TestCase, mock from icon_opsgenie.actions.get_alert import GetAlert from icon_opsgenie.actions.get_alert.schema import Output from icon_opsgenie.connection.connection import Connec...
true
true
1c42f3a0f4bbec1276b69d459965972429089a10
9,230
py
Python
.circleci/cimodel/data/pytorch_build_data.py
arpancodes/pytorch
a3bbaf227cc549c49245e310f11788b98eef30ee
[ "Intel" ]
null
null
null
.circleci/cimodel/data/pytorch_build_data.py
arpancodes/pytorch
a3bbaf227cc549c49245e310f11788b98eef30ee
[ "Intel" ]
null
null
null
.circleci/cimodel/data/pytorch_build_data.py
arpancodes/pytorch
a3bbaf227cc549c49245e310f11788b98eef30ee
[ "Intel" ]
null
null
null
from cimodel.lib.conf_tree import ConfigNode, X, XImportant CONFIG_TREE_DATA = [ ("xenial", [ ("gcc", [ ("5.4", [ # All this subtree rebases to master and then build ("3.6", [ ("important", [X(True)]), ]), ]), # TODO:...
27.801205
98
0.617118
from cimodel.lib.conf_tree import ConfigNode, X, XImportant CONFIG_TREE_DATA = [ ("xenial", [ ("gcc", [ ("5.4", [ ("3.6", [ ("important", [X(True)]), ]), ]), ("7", [X("3.6")]), ]), ("cuda...
true
true
1c42f453dc61493c822c1f5baa4db34c6debf8e9
60,101
py
Python
mne/dipole.py
lokinou/mne-python
f4aa12bc9118d0739ca05c5ed5a4fba7ae71138b
[ "BSD-3-Clause" ]
null
null
null
mne/dipole.py
lokinou/mne-python
f4aa12bc9118d0739ca05c5ed5a4fba7ae71138b
[ "BSD-3-Clause" ]
null
null
null
mne/dipole.py
lokinou/mne-python
f4aa12bc9118d0739ca05c5ed5a4fba7ae71138b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Single-dipole functions and classes.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Eric Larson <larson.eric.d@gmail.com> # # License: Simplified BSD from copy import deepcopy import functools from functools import partial import re import numpy as np from .cov ...
37.586617
79
0.561987
from copy import deepcopy import functools from functools import partial import re import numpy as np from .cov import compute_whitener, _ensure_cov from .io.constants import FIFF from .io.pick import pick_types from .io.proj import make_projector, _needs_eeg_average_ref_proj from .bem import _fit_sphere from ...
true
true
1c42f4881546fdb2733d87e1b791f656d9e9c56d
57,266
py
Python
numpy/polynomial/legendre.py
tovrstra/numpy
bb5d666e84e2eb294543a67c6143d7e9124d1c73
[ "BSD-3-Clause" ]
null
null
null
numpy/polynomial/legendre.py
tovrstra/numpy
bb5d666e84e2eb294543a67c6143d7e9124d1c73
[ "BSD-3-Clause" ]
null
null
null
numpy/polynomial/legendre.py
tovrstra/numpy
bb5d666e84e2eb294543a67c6143d7e9124d1c73
[ "BSD-3-Clause" ]
null
null
null
""" Legendre Series (:mod: `numpy.polynomial.legendre`) =================================================== .. currentmodule:: numpy.polynomial.polynomial This module provides a number of objects (mostly functions) useful for dealing with Legendre series, including a `Legendre` class that encapsulates the usual arith...
31.292896
79
0.596043
from __future__ import division, absolute_import, print_function import warnings import numpy as np import numpy.linalg as la from numpy.core.multiarray import normalize_axis_index from . import polyutils as pu from ._polybase import ABCPolyBase __all__ = [ 'legzero', 'legone', 'legx', 'legdomain', 'legline', 'l...
true
true
1c42f6b45d30734090b1df60499e01a2ab06be4b
1,635
py
Python
tmp/visualize_vggface.py
seonho/facenet
c4de25b04b76dc4d16ebe7a328cac27f220040e4
[ "MIT" ]
12
2017-11-01T12:35:47.000Z
2020-02-26T19:41:30.000Z
tmp/visualize_vggface.py
KittenCN/pyFaceNet
0804d06a3533a83ff865a3c4343cfca2a5cbe063
[ "MIT" ]
8
2017-12-05T23:45:54.000Z
2022-02-09T23:28:51.000Z
tmp/visualize_vggface.py
KittenCN/pyFaceNet
0804d06a3533a83ff865a3c4343cfca2a5cbe063
[ "MIT" ]
6
2017-09-09T12:22:53.000Z
2019-12-17T07:54:18.000Z
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import vggface16 def main(): sess = tf.Session() t_input = tf.placeholder(np.float32, name='input') # define the input tensor image_mean = 117.0 t_preprocessed = tf.expand_dims(t_input-image_mean, 0) # Build the ...
32.7
97
0.659939
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt import vggface16 def main(): sess = tf.Session() t_input = tf.placeholder(np.float32, name='input') image_mean = 117.0 t_preprocessed = tf.expand_dims(t_input-image_mean, 0) nodes = vggface16.load('../data/...
true
true
1c42f6bc677c2cd1c7aa873cc215c2fef45a3dec
49,102
py
Python
cpovc_reports/views.py
Rebeccacheptoek/cpims-ovc-3.0
25d34dca2f93fcdb6fc934093b625604b46ddd8d
[ "Apache-2.0" ]
3
2022-02-18T13:25:29.000Z
2022-02-25T11:49:11.000Z
cpovc_reports/views.py
Rebeccacheptoek/cpims-ovc-3.0
25d34dca2f93fcdb6fc934093b625604b46ddd8d
[ "Apache-2.0" ]
null
null
null
cpovc_reports/views.py
Rebeccacheptoek/cpims-ovc-3.0
25d34dca2f93fcdb6fc934093b625604b46ddd8d
[ "Apache-2.0" ]
22
2022-02-05T13:43:53.000Z
2022-02-26T14:29:06.000Z
"""Views for all reports.""" import os import re import csv import time import uuid import base64 import urllib import string import mimetypes import calendar import zipfile import pandas as pd from datetime import datetime # from reportlab.pdfgen import canvas from django.http import HttpResponse from ...
39.344551
96
0.5323
"""Views for all reports.""" import os import re import csv import time import uuid import base64 import urllib import string import mimetypes import calendar import zipfile import pandas as pd from datetime import datetime from django.http import HttpResponse from django.shortcuts import render from d...
false
true
1c42f8a174a74c0673de846fda4cbf3a2ae15373
28,177
py
Python
django/contrib/contenttypes/fields.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
django/contrib/contenttypes/fields.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
django/contrib/contenttypes/fields.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
import functools import itertools from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, models, router, transaction from django.db.mod...
36.97769
88
0.578876
import functools import itertools from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, models, router, transaction from django.db.mod...
true
true
1c42f8f82a8febca13297af39b3d0800744f2bf8
118
py
Python
libtad/common/__init__.py
timeanddate/libtad-python
8c3b14578ed1f5f5e79cc83b415433f59e39814f
[ "MIT" ]
2
2022-01-14T11:35:50.000Z
2022-03-07T04:20:14.000Z
libtad/common/__init__.py
timeanddate/libtad-python
8c3b14578ed1f5f5e79cc83b415433f59e39814f
[ "MIT" ]
null
null
null
libtad/common/__init__.py
timeanddate/libtad-python
8c3b14578ed1f5f5e79cc83b415433f59e39814f
[ "MIT" ]
null
null
null
__all__ = ["exceptions"] from . import exceptions from .xml_utils import XmlUtils def __dir__(): return __all__
14.75
31
0.737288
__all__ = ["exceptions"] from . import exceptions from .xml_utils import XmlUtils def __dir__(): return __all__
true
true
1c42f9379e2d32367bc0fd48e0a3dddb47acabc8
14,990
py
Python
Packs/rasterize/Integrations/rasterize/rasterize.py
ArmatureSystems/content
ff7b2a9dc1900b0473cdf9efa6527fe32a21fcb7
[ "MIT" ]
1
2020-07-22T05:55:11.000Z
2020-07-22T05:55:11.000Z
Packs/rasterize/Integrations/rasterize/rasterize.py
nicoloereni/content
ddb88044c5b39a17894dd13e7ae260d9854afc30
[ "MIT" ]
null
null
null
Packs/rasterize/Integrations/rasterize/rasterize.py
nicoloereni/content
ddb88044c5b39a17894dd13e7ae260d9854afc30
[ "MIT" ]
2
2020-07-15T06:41:52.000Z
2020-07-19T18:45:23.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * from selenium import webdriver from selenium.common.exceptions import NoSuchElementException, InvalidArgumentException, TimeoutException from PyPDF2 import PdfFileReader from pdf2image import convert_from_path import nu...
36.2954
151
0.651701
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * from selenium import webdriver from selenium.common.exceptions import NoSuchElementException, InvalidArgumentException, TimeoutException from PyPDF2 import PdfFileReader from pdf2image import convert_from_path import nu...
true
true
1c42fa84f38c1e3b6406c4513c46d997acdfc98f
4,904
py
Python
testsuite/tiff-suite/run.py
Alexander-Murashko/oiio
2cb95cf674e6cb085eb14614c428535ed2b8989b
[ "BSD-3-Clause" ]
1
2018-02-06T23:58:03.000Z
2018-02-06T23:58:03.000Z
testsuite/tiff-suite/run.py
Alexander-Murashko/oiio
2cb95cf674e6cb085eb14614c428535ed2b8989b
[ "BSD-3-Clause" ]
null
null
null
testsuite/tiff-suite/run.py
Alexander-Murashko/oiio
2cb95cf674e6cb085eb14614c428535ed2b8989b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python import os import sys path = "" cmdpath = "" command = "" if len(sys.argv) > 2 : os.chdir (sys.argv[1]) path = sys.argv[2] + "/" cmdpath = sys.argv[2] + "/" sys.path = [".."] + sys.path import runtest # Start off hi = "echo hi" command = hi + "> out.txt" imagedir = "../../../libtiffpi...
39.232
81
0.684339
import os import sys path = "" cmdpath = "" command = "" if len(sys.argv) > 2 : os.chdir (sys.argv[1]) path = sys.argv[2] + "/" cmdpath = sys.argv[2] + "/" sys.path = [".."] + sys.path import runtest hi = "echo hi" command = hi + "> out.txt" imagedir = "../../../libtiffpic" command = comma...
true
true
1c42fbb78065bfe027c807c64b143bd34d0b208a
1,151
py
Python
globaltechmap/spider/mysqltest.py
kcdyx1/python_study
abba84b98382c253dbf07b122a33d273c7e11832
[ "MIT" ]
1
2018-01-16T12:52:18.000Z
2018-01-16T12:52:18.000Z
globaltechmap/spider/mysqltest.py
kcdyx1/python_study
abba84b98382c253dbf07b122a33d273c7e11832
[ "MIT" ]
null
null
null
globaltechmap/spider/mysqltest.py
kcdyx1/python_study
abba84b98382c253dbf07b122a33d273c7e11832
[ "MIT" ]
null
null
null
# coding:utf8 import pymysql conn = pymysql.connect(host ='localhost', port =8889, user ='root', password ='root', db='globaltechmap', charset='utf8') cursor = conn.cursor() fields ={ 'hy':'haiyang', 'hk': 'hangkong', 'ht': 'hangtian', 'kjzl':'kejizhanlue', 'ny': 'nengyuan', ...
26.767442
143
0.585578
import pymysql conn = pymysql.connect(host ='localhost', port =8889, user ='root', password ='root', db='globaltechmap', charset='utf8') cursor = conn.cursor() fields ={ 'hy':'haiyang', 'hk': 'hangkong', 'ht': 'hangtian', 'kjzl':'kejizhanlue', 'ny': 'nengyuan', 'sw': ...
true
true
1c42fbea0630646e6a4b682a02e2eab311edb52b
1,191
py
Python
.history/postImages/index_20201006200308.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
2
2020-10-21T22:14:15.000Z
2020-10-21T22:14:16.000Z
.history/postImages/index_20201006200308.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
null
null
null
.history/postImages/index_20201006200308.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
null
null
null
import csv import requests df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() finCsv = fin[1:] # url = https://b2ptc.herokuapp.com/bridges finalCsv = df[1:] obj = {} for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_img':x[2],'after_im...
27.068182
97
0.507976
import csv import requests df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() finCsv = fin[1:] finalCsv = df[1:] obj = {} for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_img':x[2],'after_img':x[3]} for i in finCsv: x = i.split(...
true
true
1c42fbf1f6d7882fb4b9943cfb6e134d08583539
4,860
py
Python
espnet2/bin/enh_scoring.py
YoshikiMas/espnet
793b999a50af484a5eaf6227ef7556b48514ef15
[ "Apache-2.0" ]
1
2022-03-25T14:41:05.000Z
2022-03-25T14:41:05.000Z
espnet2/bin/enh_scoring.py
YoshikiMas/espnet
793b999a50af484a5eaf6227ef7556b48514ef15
[ "Apache-2.0" ]
2
2019-04-23T04:43:33.000Z
2019-05-13T13:06:52.000Z
espnet2/bin/enh_scoring.py
YoshikiMas/espnet
793b999a50af484a5eaf6227ef7556b48514ef15
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import argparse import logging import sys from typing import List from typing import Union from mir_eval.separation import bss_eval_sources import numpy as np from pystoi import stoi import torch from typeguard import check_argument_types from espnet.utils.cli_utils import get_commandline_args ...
31.764706
88
0.595473
import argparse import logging import sys from typing import List from typing import Union from mir_eval.separation import bss_eval_sources import numpy as np from pystoi import stoi import torch from typeguard import check_argument_types from espnet.utils.cli_utils import get_commandline_args from espnet2.enh.loss....
true
true
1c42fc7046524a05a271e4cee68795d8a5e6bfa8
1,012
py
Python
examples/212_configuration.py
djprohasky/workshop_swinburne_2021
596eb12595ef7c2522dc8e03163e917ca43d2a0a
[ "MIT" ]
3
2021-06-15T05:51:38.000Z
2021-06-16T11:07:15.000Z
examples/212_configuration.py
djprohasky/workshop_swinburne_2021
596eb12595ef7c2522dc8e03163e917ca43d2a0a
[ "MIT" ]
3
2021-06-16T10:27:09.000Z
2021-06-17T02:37:04.000Z
examples/212_configuration.py
djprohasky/workshop_swinburne_2021
596eb12595ef7c2522dc8e03163e917ca43d2a0a
[ "MIT" ]
3
2021-06-15T12:43:22.000Z
2021-06-16T11:01:38.000Z
# Units: # - Revolute joint : radiants # - Prismatic joint: meters import math from compas.robots.model import Joint from compas.robots import Configuration print('Default constructor') print (Configuration([math.pi, 4], [Joint.REVOLUTE, Joint.PRISMATIC])) print (Configuration([math.pi, 4], [Joint.REVOLUTE, Joint.P...
34.896552
99
0.751976
import math from compas.robots.model import Joint from compas.robots import Configuration print('Default constructor') print (Configuration([math.pi, 4], [Joint.REVOLUTE, Joint.PRISMATIC])) print (Configuration([math.pi, 4], [Joint.REVOLUTE, Joint.PRISMATIC], ['joint_1', 'ext_axis_1'])) print() print('Construct f...
true
true
1c42fce916d65eb675fd935267b29dbff91442bf
32,676
py
Python
google/appengine/tools/api_server.py
jnfang/business-board-tool
773a288ebf4860555fb590ffae92ad269566806c
[ "Apache-2.0" ]
1
2015-01-04T16:58:48.000Z
2015-01-04T16:58:48.000Z
google/appengine/tools/api_server.py
jnfang/business-board-tool
773a288ebf4860555fb590ffae92ad269566806c
[ "Apache-2.0" ]
null
null
null
google/appengine/tools/api_server.py
jnfang/business-board-tool
773a288ebf4860555fb590ffae92ad269566806c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
36.106077
86
0.70079
"""Serves the stub App Engine APIs (e.g. memcache, datastore) over HTTP. The Remote API protocol is used for communication. """ from __future__ import with_statement import BaseHTTPServer import httplib import logging import os.path import pickle import socket import SocketServer import subproce...
false
true
1c42fd85841e575161a3c0be5d85f83a9ef49d74
2,485
py
Python
tests/test_data/test_datasets/test_dota.py
open-mmlab/mmrotate
e22c8dfa3c309aa68ff18a5a03316f69c6eb2880
[ "Apache-2.0" ]
449
2022-02-18T08:26:58.000Z
2022-03-31T11:58:32.000Z
tests/test_data/test_datasets/test_dota.py
open-mmlab/mmrotate
e22c8dfa3c309aa68ff18a5a03316f69c6eb2880
[ "Apache-2.0" ]
162
2022-02-18T09:54:46.000Z
2022-03-31T15:40:46.000Z
tests/test_data/test_datasets/test_dota.py
open-mmlab/mmrotate
e22c8dfa3c309aa68ff18a5a03316f69c6eb2880
[ "Apache-2.0" ]
98
2022-02-18T08:28:48.000Z
2022-03-31T08:52:11.000Z
# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import shutil import tempfile import numpy as np import pytest from mmdet.datasets import build_dataset from mmrotate.datasets.dota import DOTADataset def _create_dummy_results(): """Create dummy results.""" boxes = [ np.array([[4...
33.581081
79
0.622133
import os.path as osp import shutil import tempfile import numpy as np import pytest from mmdet.datasets import build_dataset from mmrotate.datasets.dota import DOTADataset def _create_dummy_results(): boxes = [ np.array([[4.3150e+02, 7.0600e+02, 6.7686e+01, 2.1990e+01, 2.9842e-02], [...
true
true
1c42ff8dc3c1f00d3bba87404fc084001a8de8d3
1,539
py
Python
misc/batch_sampler.py
dkkim93/pytorch-maml
039e7ecf9b3d0b7543ebceb31a6443cc5516779a
[ "MIT" ]
null
null
null
misc/batch_sampler.py
dkkim93/pytorch-maml
039e7ecf9b3d0b7543ebceb31a6443cc5516779a
[ "MIT" ]
null
null
null
misc/batch_sampler.py
dkkim93/pytorch-maml
039e7ecf9b3d0b7543ebceb31a6443cc5516779a
[ "MIT" ]
null
null
null
import copy import torch import multiprocessing as mp from misc.utils import make_env from misc.batch_episode import BatchEpisode from env.subproc_vec_env import SubprocVecEnv device = torch.device("cuda" if torch.cuda.is_available() else "cpu") class BatchSampler(object): def __init__(self, args): self....
31.408163
91
0.638077
import copy import torch import multiprocessing as mp from misc.utils import make_env from misc.batch_episode import BatchEpisode from env.subproc_vec_env import SubprocVecEnv device = torch.device("cuda" if torch.cuda.is_available() else "cpu") class BatchSampler(object): def __init__(self, args): self....
true
true
1c42ffc6656a8ee02b871d02dbb7cb8e0157fbfd
1,356
py
Python
music/migrations/0009_auto_20200627_1107.py
amin-da71/Benbb96
0c9e37425d0665e403ba6fecf0c4b17669c29ada
[ "MIT" ]
null
null
null
music/migrations/0009_auto_20200627_1107.py
amin-da71/Benbb96
0c9e37425d0665e403ba6fecf0c4b17669c29ada
[ "MIT" ]
13
2021-02-13T20:15:18.000Z
2022-03-11T23:57:07.000Z
music/migrations/0009_auto_20200627_1107.py
amin-da71/Benbb96
0c9e37425d0665e403ba6fecf0c4b17669c29ada
[ "MIT" ]
null
null
null
# Generated by Django 2.2.12 on 2020-06-27 09:07 from django.db import migrations, models from slugify import slugify def create_slug(apps, schema_editor): Style = apps.get_model("music", "Style") db_alias = schema_editor.connection.alias for style in Style.objects.using(db_alias).all(): style.sl...
27.673469
69
0.584808
from django.db import migrations, models from slugify import slugify def create_slug(apps, schema_editor): Style = apps.get_model("music", "Style") db_alias = schema_editor.connection.alias for style in Style.objects.using(db_alias).all(): style.slug = slugify(style.nom) style.save(updat...
true
true
1c42ffd5207a56ae5d33a0921a3287201d66da0d
4,467
py
Python
uplink/converters/typing_.py
kamalgill/uplink
3ade04d230d578690ccf2c3833aedc4ac9d895c3
[ "MIT" ]
918
2017-10-20T10:47:40.000Z
2022-03-27T19:10:21.000Z
uplink/converters/typing_.py
kamalgill/uplink
3ade04d230d578690ccf2c3833aedc4ac9d895c3
[ "MIT" ]
248
2017-10-20T03:58:20.000Z
2022-03-13T18:39:16.000Z
uplink/converters/typing_.py
kamalgill/uplink
3ade04d230d578690ccf2c3833aedc4ac9d895c3
[ "MIT" ]
66
2017-10-21T02:56:34.000Z
2022-02-15T08:27:50.000Z
# Standard library imports import collections from collections import abc import functools # Local imports from uplink.converters import interfaces, register_default_converter_factory __all__ = ["TypingConverter", "ListConverter", "DictConverter"] class BaseTypeConverter(object): Builder = collections.namedtupl...
33.335821
76
0.67786
import collections from collections import abc import functools from uplink.converters import interfaces, register_default_converter_factory __all__ = ["TypingConverter", "ListConverter", "DictConverter"] class BaseTypeConverter(object): Builder = collections.namedtuple("Builder", "build") @classmethod ...
true
true
1c42ffe2341cdbc1c2a3b71c9787f8475747b71a
869
py
Python
ts/torch_handler/request_envelope/base.py
KYKong1997/serve
ce3348d8ba6ee2a02ec171ba1cd984c0cadcc4ac
[ "Apache-2.0" ]
null
null
null
ts/torch_handler/request_envelope/base.py
KYKong1997/serve
ce3348d8ba6ee2a02ec171ba1cd984c0cadcc4ac
[ "Apache-2.0" ]
1
2020-06-19T06:11:19.000Z
2020-06-19T06:11:19.000Z
ts/torch_handler/request_envelope/base.py
gunandrose4u/serve
7b25f2b5aff08fa53d656a61b6a2f5127736c9f2
[ "Apache-2.0" ]
null
null
null
""" Base class for all RequestEnvelope. A request envelope reformats the inputs/outputs of a call to a handler. It translates from formats specific to a model orchestrator like Seldon or KFServing to a set of flat Python items, and vice versa. """ from abc import ABC, abstractmethod class BaseEnvelope(ABC): """ ...
23.486486
74
0.669735
from abc import ABC, abstractmethod class BaseEnvelope(ABC): def __init__(self, handle_fn): self._handle_fn = handle_fn def handle(self, data, context): if data: data = self.parse_input(data) results = self._handle_fn(data, context) if results: result...
true
true
1c42fff8091fe2db9607f1770bc96be7dac389e4
48,256
py
Python
modeling.py
pingheng001/Cnn-Bert
d2be31634d693fbbe3b4bf2b28eb83af015cda72
[ "Apache-2.0" ]
null
null
null
modeling.py
pingheng001/Cnn-Bert
d2be31634d693fbbe3b4bf2b28eb83af015cda72
[ "Apache-2.0" ]
null
null
null
modeling.py
pingheng001/Cnn-Bert
d2be31634d693fbbe3b4bf2b28eb83af015cda72
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
38.947538
104
0.69266
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import copy import json import math import re import numpy as np import six import tensorflow as tf class BertConfig(object): def __init__(self, vocab_size,...
true
true
1c4301397a55a47bf1f513bcb7d40a739fba14ec
2,984
py
Python
KNN/KNN.py
bserranoanton/Machine-learning
093f77a9317c68649c5b0aad32b9e53170700a11
[ "MIT" ]
null
null
null
KNN/KNN.py
bserranoanton/Machine-learning
093f77a9317c68649c5b0aad32b9e53170700a11
[ "MIT" ]
null
null
null
KNN/KNN.py
bserranoanton/Machine-learning
093f77a9317c68649c5b0aad32b9e53170700a11
[ "MIT" ]
null
null
null
# k-nn algorithm # Álvaro García Tenorio, Belén Serrano Antón import operator import math class KNN: #This module contains the basic functions to implement the KNN algorithm # trainData represents the points we use to train the algorithm #by [coord1,..., coordn, "class"] # k is the num...
38.753247
77
0.586126
import operator import math class KNN: def __init__(self, trainData, k): self.trainingData = trainData self.k = k def euclideanDistance(self,point1, point2, length): distance = 0 for i in range(length): distance += pow((poin...
true
true
1c43014cf936d0e9e17435d3daa2068d346de02e
2,010
py
Python
ropper/common/abstract.py
cbayet/Ropper
66adeb0a1d4322ced69643c3be2552c057d116d2
[ "BSD-3-Clause" ]
1,502
2015-01-07T09:11:08.000Z
2022-03-29T10:08:26.000Z
ropper/common/abstract.py
cbayet/Ropper
66adeb0a1d4322ced69643c3be2552c057d116d2
[ "BSD-3-Clause" ]
126
2015-03-10T15:32:26.000Z
2022-03-03T08:30:10.000Z
ropper/common/abstract.py
cbayet/Ropper
66adeb0a1d4322ced69643c3be2552c057d116d2
[ "BSD-3-Clause" ]
214
2015-03-10T00:17:16.000Z
2022-03-19T07:04:08.000Z
# coding=utf-8 # Copyright 2018 Sascha Schirra # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following di...
42.765957
82
0.765672
from abc import * class AbstractSingletonMeta(ABCMeta): def __init__(self, name, bases, namespace): super(AbstractSingletonMeta, self).__init__(name, bases, namespace) self._instance = None def __call__(self): if not self._instance: self._inst...
true
true
1c430169866ca2e27445a302f4d0d86c027f6c3b
104
py
Python
Problems/Find even/task.py
gabrielizalo/jetbrains-academy-zookeeper
467b43da3cb81f82987daf6b063eb2078d476d4f
[ "MIT" ]
null
null
null
Problems/Find even/task.py
gabrielizalo/jetbrains-academy-zookeeper
467b43da3cb81f82987daf6b063eb2078d476d4f
[ "MIT" ]
null
null
null
Problems/Find even/task.py
gabrielizalo/jetbrains-academy-zookeeper
467b43da3cb81f82987daf6b063eb2078d476d4f
[ "MIT" ]
null
null
null
user_number = int(input()) counter = 2 while counter < user_number: print(counter) counter += 2
17.333333
28
0.673077
user_number = int(input()) counter = 2 while counter < user_number: print(counter) counter += 2
true
true
1c4302180ab7ea072a9425eafffdf70403bb70e8
462
py
Python
1-100/61-70/62-uniquePath/uniquePath-dp.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
1-100/61-70/62-uniquePath/uniquePath-dp.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
1-100/61-70/62-uniquePath/uniquePath-dp.py
xuychen/Leetcode
c8bf33af30569177c5276ffcd72a8d93ba4c402a
[ "MIT" ]
null
null
null
class Solution(object): def uniquePaths(self, m, n): """ :type m: int :type n: int :rtype: int """ if not m or not n: return 0 matrix = [[1] * n] + [[1] + [0] * (n - 1) for i in range(m-1)] for i in range(1, m): ...
25.666667
70
0.374459
class Solution(object): def uniquePaths(self, m, n): if not m or not n: return 0 matrix = [[1] * n] + [[1] + [0] * (n - 1) for i in range(m-1)] for i in range(1, m): for j in range(1, n): matrix[i][j] = matrix[i-1][j] + matri...
true
true
1c4302c6b4699ff6d29882340803de02d9f56132
1,478
py
Python
tests/test_blink1.py
vmalloc/pytest-blink1
cd783203dac4ffa0b43d95ac8c448a92888a7744
[ "MIT" ]
3
2017-04-21T19:38:55.000Z
2019-05-10T13:15:48.000Z
tests/test_blink1.py
vmalloc/pytest-blink1
cd783203dac4ffa0b43d95ac8c448a92888a7744
[ "MIT" ]
null
null
null
tests/test_blink1.py
vmalloc/pytest-blink1
cd783203dac4ffa0b43d95ac8c448a92888a7744
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = ...
22.738462
66
0.600135
def test_bar_fixture(testdir): testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) result = testdir.runpytest( '--foo=europython2015', '-v' ) result.stdout.fnmatch_lines([ '*::test_sth PASSED', ]) ...
true
true
1c43035982caa5106ff95faf47433fe555b5c886
4,005
py
Python
pyACA/computeNoveltyFunction.py
RichardYang40148/pyACA-1
870d100ed232cca5a890570426116f70cd0736c8
[ "MIT" ]
null
null
null
pyACA/computeNoveltyFunction.py
RichardYang40148/pyACA-1
870d100ed232cca5a890570426116f70cd0736c8
[ "MIT" ]
null
null
null
pyACA/computeNoveltyFunction.py
RichardYang40148/pyACA-1
870d100ed232cca5a890570426116f70cd0736c8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ computeNoveltyFunction computes the novelty function for onset detection supported novelty measures are: 'Flux', 'Laroche', 'Hainsworth' Args: cNoveltyName: name of the novelty measure afAudioData: array with floating point audio data. f_s: sample rate afWi...
29.88806
109
0.616729
import math import numpy as np import matplotlib.pyplot as plt from scipy.signal import spectrogram from scipy.signal import filtfilt from scipy.signal import find_peaks from ToolComputeHann import ToolComputeHann def computeNoveltyFunction(cNoveltyName, afAudioData, f_s, afWindow=None, iBlockLeng...
true
true
1c43037b1e1023ff562de4a07159cbdc5fd8f81b
335
py
Python
Prog4comp-SL-HPL-Extra/src/file_handling_numpy.py
computational-medicine/BMED360-2021
2c6052b9affedf1fee23c89d23941bf08eb2614c
[ "MIT" ]
2
2021-04-19T23:22:17.000Z
2021-04-20T14:04:58.000Z
Prog4comp-SL-HPL-Extra/src/file_handling_numpy.py
computational-medicine/BMED360-2021
2c6052b9affedf1fee23c89d23941bf08eb2614c
[ "MIT" ]
null
null
null
Prog4comp-SL-HPL-Extra/src/file_handling_numpy.py
computational-medicine/BMED360-2021
2c6052b9affedf1fee23c89d23941bf08eb2614c
[ "MIT" ]
2
2020-03-26T17:15:13.000Z
2020-05-25T08:10:06.000Z
filename = 'tmp.dat' import numpy data = numpy.loadtxt(filename, comments='#') x = data[:,0] y = data[:,1] data[:,1] = numpy.log(y) # insert transformed y back in array filename = 'tmp_out.dat' outfile = open(filename, 'w') # open file for writing outfile.write('# x and y coordinates\n') numpy.savetxt(outfile, data, ...
27.916667
62
0.677612
filename = 'tmp.dat' import numpy data = numpy.loadtxt(filename, comments='#') x = data[:,0] y = data[:,1] data[:,1] = numpy.log(y) filename = 'tmp_out.dat' outfile = open(filename, 'w') outfile.write('# x and y coordinates\n') numpy.savetxt(outfile, data, fmt='%10.5f')
true
true
1c4304a00b57f2257d41f5489361bfdb9ff354fc
1,265
py
Python
test/python/converters/test_circuit_to_instruction.py
jagunnels/qiskit-sdk-py
153cdde972e65c0f23675bbe17c93e18be27bd51
[ "Apache-2.0" ]
null
null
null
test/python/converters/test_circuit_to_instruction.py
jagunnels/qiskit-sdk-py
153cdde972e65c0f23675bbe17c93e18be27bd51
[ "Apache-2.0" ]
null
null
null
test/python/converters/test_circuit_to_instruction.py
jagunnels/qiskit-sdk-py
153cdde972e65c0f23675bbe17c93e18be27bd51
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2019, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """Tests for the converters.""" import unittest from qiskit.converters import circuit_to_instruction from qiskit import Qua...
30.119048
77
0.658498
import unittest from qiskit.converters import circuit_to_instruction from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit from qiskit.test import QiskitTestCase class TestCircuitToInstruction(QiskitTestCase): def test_flatten_circuit_registers(self): qr1 = QuantumRegister(4, 'qr...
true
true
1c4305e9885301fd71ab64074c7006c2a059a4e5
13,730
py
Python
esp-link/flash-tool/esptool-master/esptool-master/espressif/efuse/esp32c3/operations.py
km-tek/stm32_iot_link
4791dd6cdd544f145e1de9750a63918183b15dba
[ "MIT" ]
null
null
null
esp-link/flash-tool/esptool-master/esptool-master/espressif/efuse/esp32c3/operations.py
km-tek/stm32_iot_link
4791dd6cdd544f145e1de9750a63918183b15dba
[ "MIT" ]
null
null
null
esp-link/flash-tool/esptool-master/esptool-master/espressif/efuse/esp32c3/operations.py
km-tek/stm32_iot_link
4791dd6cdd544f145e1de9750a63918183b15dba
[ "MIT" ]
null
null
null
#!/usr/bin/env python # This file includes the operations with eFuses for ESP32-C3 chip # # Copyright (C) 2020 Espressif Systems (Shanghai) PTE LTD # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundati...
49.566787
148
0.658704
from __future__ import division, print_function import argparse import os import espsecure import esptool from . import fields from .. import util from ..base_operations import (ONLY_BURN_AT_END, add_common_commands, add_force_write_always, burn_bit, burn_block_data, ...
true
true
1c43060d143e8a9a2e3eea79632f0c6fe9dda0e6
8,173
py
Python
libs/utilities.py
CaptainBoggle/bakerbot
ef93c8e636b0f1ee514a0b1cef2ab43b315d974e
[ "MIT" ]
null
null
null
libs/utilities.py
CaptainBoggle/bakerbot
ef93c8e636b0f1ee514a0b1cef2ab43b315d974e
[ "MIT" ]
2
2021-06-19T11:09:02.000Z
2021-06-19T11:21:21.000Z
libs/utilities.py
CaptainBoggle/bakerbot
ef93c8e636b0f1ee514a0b1cef2ab43b315d974e
[ "MIT" ]
null
null
null
from discord.ext import commands import datetime as dt import typing as t import discord import asyncio import re class Colours: regular = 0xF5CC00 # Used for everything else. success = 0x00C92C # Used for successful queries. failure = 0xFF3300 # Used for error messages. gaming = 0x0095FF # Used ...
37.490826
193
0.595253
from discord.ext import commands import datetime as dt import typing as t import discord import asyncio import re class Colours: regular = 0xF5CC00 success = 0x00C92C failure = 0xFF3300 gaming = 0x0095FF class Regexes: urls = re.compile( r"(?i)\b((?:https?://|www\d{0,3}[.]|...
true
true
1c4306ae7a77d99914614f2953aba5cc87f70902
49
py
Python
bumpv/client/logging/__init__.py
kylie-a/bumpversion
13a150daa02f29e7dd74b5240c54c7929ec176b8
[ "MIT" ]
null
null
null
bumpv/client/logging/__init__.py
kylie-a/bumpversion
13a150daa02f29e7dd74b5240c54c7929ec176b8
[ "MIT" ]
null
null
null
bumpv/client/logging/__init__.py
kylie-a/bumpversion
13a150daa02f29e7dd74b5240c54c7929ec176b8
[ "MIT" ]
1
2019-11-24T15:36:19.000Z
2019-11-24T15:36:19.000Z
from .logging import get_logger_list, get_logger
24.5
48
0.857143
from .logging import get_logger_list, get_logger
true
true
1c4306e24fd9a2e2378f9454b22e4e8649dd41f6
6,543
py
Python
Segger/quaternion.py
gregdp/segger
d4c112fd43f0b088145e225f976335800874ebe5
[ "MIT" ]
6
2019-03-27T22:53:12.000Z
2021-11-19T09:02:05.000Z
Segger/quaternion.py
gregdp/segger
d4c112fd43f0b088145e225f976335800874ebe5
[ "MIT" ]
1
2017-03-07T16:52:30.000Z
2019-11-25T21:37:21.000Z
Segger/quaternion.py
gregdp/segger
d4c112fd43f0b088145e225f976335800874ebe5
[ "MIT" ]
5
2019-05-30T19:10:01.000Z
2022-02-09T07:04:59.000Z
import chimera import numpy class Quaternion : def __init__ ( self, s=1.0, v=chimera.Vector(0,0,0) ) : self.s = s self.v = v def length (self) : return numpy.sqrt ( (self.s*self.s) + self.v.sqlength() ) def rotation (self, angDegrees, axis) : angRad = 0.5 * angDegrees ...
29.740909
96
0.494116
import chimera import numpy class Quaternion : def __init__ ( self, s=1.0, v=chimera.Vector(0,0,0) ) : self.s = s self.v = v def length (self) : return numpy.sqrt ( (self.s*self.s) + self.v.sqlength() ) def rotation (self, angDegrees, axis) : angRad = 0.5 * angDegrees ...
true
true
1c430821f923be31c49db28013f3a7692f993b15
7,542
py
Python
pychron/core/fits/measurement_fits_selector.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
null
null
null
pychron/core/fits/measurement_fits_selector.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
80
2018-07-17T20:10:20.000Z
2021-08-17T15:38:24.000Z
pychron/core/fits/measurement_fits_selector.py
UManPychron/pychron
b84c9fd70072f9cbda30abe2c471e64fe3dd75d8
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2014 Jake Ross # # 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/licens...
36.086124
112
0.570936
from __future__ import absolute_import import ast import os import yaml from traits.api import Str, Button, List from traitsui.api import HGroup, UItem, VGroup, Item from traitsui.extras.checkbox_column import CheckboxColumn from traitsui.handler import Controller from traitsui.table_column import Ob...
true
true
1c4308f87fe5f938447cd5436faba60db58264e4
1,275
py
Python
analysis/clustering-initial-attempts/clustering-attempt-1/sort_clusters.py
BogDAAAMN/dark-patterns
0335a1ad88316a05a9243e6a77ab79a0c2d06f12
[ "Apache-2.0" ]
98
2018-12-20T15:04:38.000Z
2022-03-08T05:08:47.000Z
analysis/clustering-initial-attempts/clustering-attempt-1/sort_clusters.py
BogDAAAMN/dark-patterns
0335a1ad88316a05a9243e6a77ab79a0c2d06f12
[ "Apache-2.0" ]
35
2018-07-27T16:09:46.000Z
2019-01-31T16:09:14.000Z
analysis/clustering-initial-attempts/clustering-attempt-1/sort_clusters.py
TheCGO/dark-patterns
f458f19c4814419acd691f2842d7e1123f14097c
[ "Apache-2.0" ]
19
2018-12-20T15:04:41.000Z
2021-11-09T13:53:24.000Z
from __future__ import print_function from tqdm import tqdm import json import os.path import sys usage = 'Usage: python %s CLUSTERS-FILE OUT-FILE' % __file__ help_message = '''Sorts clusters in the provided file by size, with largest first. Clusters should be formatted in the same way as accepted by cluster_browser.p...
29.651163
94
0.675294
from __future__ import print_function from tqdm import tqdm import json import os.path import sys usage = 'Usage: python %s CLUSTERS-FILE OUT-FILE' % __file__ help_message = '''Sorts clusters in the provided file by size, with largest first. Clusters should be formatted in the same way as accepted by cluster_browser.p...
true
true
1c43093fa85de4f6e1de23a0ecc3b43530f42260
126
py
Python
sourcecode/GAN/FID/__init__.py
toufeeqahamedns/GeneratingHumanFaces
93048bf5f6ae99424f918b0d0fea46d21abee0cb
[ "MIT" ]
null
null
null
sourcecode/GAN/FID/__init__.py
toufeeqahamedns/GeneratingHumanFaces
93048bf5f6ae99424f918b0d0fea46d21abee0cb
[ "MIT" ]
null
null
null
sourcecode/GAN/FID/__init__.py
toufeeqahamedns/GeneratingHumanFaces
93048bf5f6ae99424f918b0d0fea46d21abee0cb
[ "MIT" ]
null
null
null
""" Package has implementation for the FID score calculation """ from GAN.FID import fid_score from GAN.FID import inception
21
60
0.785714
from GAN.FID import fid_score from GAN.FID import inception
true
true
1c4309663a6b321e33289d53fa1cdd98849e4918
42
py
Python
docnetdb/examples/__init__.py
fsabre/DocNetDB
c749a345e644b63219bd544967bed563299fd42c
[ "MIT" ]
4
2020-01-27T13:10:58.000Z
2020-09-12T12:10:22.000Z
docnetdb/examples/__init__.py
fsabre/DocNetDB
c749a345e644b63219bd544967bed563299fd42c
[ "MIT" ]
null
null
null
docnetdb/examples/__init__.py
fsabre/DocNetDB
c749a345e644b63219bd544967bed563299fd42c
[ "MIT" ]
null
null
null
"""This package defines some examples."""
21
41
0.714286
true
true
1c430a1d102e128e139d8c74d14944d8d32fb967
4,458
py
Python
Main/AlphaZero/DistributedSelfPlay/SelfPlay.py
ikaroszhang96/Convex-AlphaZero
d96c9790529e48ff4e2ec34649bdc312a0abcc53
[ "MIT" ]
null
null
null
Main/AlphaZero/DistributedSelfPlay/SelfPlay.py
ikaroszhang96/Convex-AlphaZero
d96c9790529e48ff4e2ec34649bdc312a0abcc53
[ "MIT" ]
null
null
null
Main/AlphaZero/DistributedSelfPlay/SelfPlay.py
ikaroszhang96/Convex-AlphaZero
d96c9790529e48ff4e2ec34649bdc312a0abcc53
[ "MIT" ]
null
null
null
from Main.AlphaZero.DistributedSelfPlay import Constants from Main.Training.Connect4 import MemoryBuffers from Main import Hyperparameters import multiprocessing as mp import numpy as np import time ''' Listen for data from the Remote Worker and forward it to the Replay Watcher. Every worker will continue to work unti...
40.527273
119
0.721624
from Main.AlphaZero.DistributedSelfPlay import Constants from Main.Training.Connect4 import MemoryBuffers from Main import Hyperparameters import multiprocessing as mp import numpy as np import time def _waitForWorker(connection, dumpPipe): gamesCollected = 0 collectingDataFromWorker = True while (collecti...
true
true
1c430ac1e16c40ccad73fdb23ae4dc5bca695e2c
344,018
py
Python
ns-allinone-3.29/ns-3.29/src/core/bindings/modulegen__gcc_ILP32.py
tayoon/My-NS-3
e39bd778fe31397e048f770533c5154761bbbcb5
[ "MIT" ]
null
null
null
ns-allinone-3.29/ns-3.29/src/core/bindings/modulegen__gcc_ILP32.py
tayoon/My-NS-3
e39bd778fe31397e048f770533c5154761bbbcb5
[ "MIT" ]
null
null
null
ns-allinone-3.29/ns-3.29/src/core/bindings/modulegen__gcc_ILP32.py
tayoon/My-NS-3
e39bd778fe31397e048f770533c5154761bbbcb5
[ "MIT" ]
null
null
null
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
63.813393
1,926
0.626802
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
true
true
1c430afc55313db5124cc8f641ee344a3db59895
12,317
py
Python
src/comp_varDA.py
m214089/lorenz-da
da02fddcac6eb85e285843da35bf1a3e7c07fe62
[ "Apache-2.0" ]
null
null
null
src/comp_varDA.py
m214089/lorenz-da
da02fddcac6eb85e285843da35bf1a3e7c07fe62
[ "Apache-2.0" ]
null
null
null
src/comp_varDA.py
m214089/lorenz-da
da02fddcac6eb85e285843da35bf1a3e7c07fe62
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ############################################################### # < next few lines under version control, D O N O T E D I T > # $Date$ # $Revision$ # $Author$ # $Id$ ############################################################### ############################################################### ...
40.516447
185
0.535033
true
true
1c430c5cc94b65be4f73ba40070bf64a8b9520f7
518
py
Python
backend/app/app/crud/crud_permission.py
l2m2/fastapi-vue-admin
165060ee510b6438ff8aa42ab839fcf77f5dd387
[ "MIT" ]
5
2021-11-25T20:07:31.000Z
2022-03-22T02:28:51.000Z
backend/app/app/crud/crud_permission.py
l2m2/fastapi-vue-admin
165060ee510b6438ff8aa42ab839fcf77f5dd387
[ "MIT" ]
null
null
null
backend/app/app/crud/crud_permission.py
l2m2/fastapi-vue-admin
165060ee510b6438ff8aa42ab839fcf77f5dd387
[ "MIT" ]
3
2021-05-15T18:19:10.000Z
2021-08-24T08:23:41.000Z
from typing import Optional from sqlalchemy.orm import Session from app.crud.base import CRUDBase from app.models.permission import Permission from app.schemas.permission import PermissionCreate, PermissionUpdate, PermissionList class CRUDPermission(CRUDBase[Permission, PermissionCreate, PermissionUpdate, Permission...
34.533333
95
0.80888
from typing import Optional from sqlalchemy.orm import Session from app.crud.base import CRUDBase from app.models.permission import Permission from app.schemas.permission import PermissionCreate, PermissionUpdate, PermissionList class CRUDPermission(CRUDBase[Permission, PermissionCreate, PermissionUpdate, Permission...
true
true
1c430d68cee1c1046048674e472c16c99b28fcec
3,172
py
Python
isi_sdk_8_2_0/isi_sdk_8_2_0/models/network_groupnets.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_0/isi_sdk_8_2_0/models/network_groupnets.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_0/isi_sdk_8_2_0/models/network_groupnets.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 7 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_2_0.models.network...
27.582609
101
0.580706
import pprint import re import six from isi_sdk_8_2_0.models.network_groupnet_extended import NetworkGroupnetExtended class NetworkGroupnets(object): swagger_types = { 'groupnets': 'list[NetworkGroupnetExtended]' } attribute_map = { 'groupnets': 'groupnets' } def __ini...
true
true
1c430e38b9ca8f688f72cacfca7a1cdccab2d5c4
294
py
Python
odooku/patch/__init__.py
davejrv/import
0dbca8f432d1a051a2bdb30c952cc26f1ffd74ae
[ "Apache-2.0" ]
55
2017-09-11T06:48:39.000Z
2022-03-31T18:14:46.000Z
odooku/patch/__init__.py
davejrv/import
0dbca8f432d1a051a2bdb30c952cc26f1ffd74ae
[ "Apache-2.0" ]
4
2018-01-13T09:13:48.000Z
2019-09-28T10:24:43.000Z
odooku/patch/__init__.py
davejrv/import
0dbca8f432d1a051a2bdb30c952cc26f1ffd74ae
[ "Apache-2.0" ]
46
2017-12-30T22:31:45.000Z
2022-02-17T05:35:55.000Z
import importlib import pkgutil from . patch import SoftPatch, HardPatch, patcher def apply_patches(): import odooku_patches for importer, name, ispkg in pkgutil.iter_modules(odooku_patches.__path__): module = importlib.import_module('%s.%s' % (odooku_patches.__name__, name))
32.666667
83
0.758503
import importlib import pkgutil from . patch import SoftPatch, HardPatch, patcher def apply_patches(): import odooku_patches for importer, name, ispkg in pkgutil.iter_modules(odooku_patches.__path__): module = importlib.import_module('%s.%s' % (odooku_patches.__name__, name))
true
true
1c430e64099e76078f7c23e4dbcaa5c7247c738e
4,593
py
Python
CALCULATE_prop.py
troymyname/damagedetectionanalysis
e47dc740686922e8a5114596d49853a940d1a947
[ "MIT" ]
4
2017-12-28T15:28:54.000Z
2020-12-07T18:22:27.000Z
CALCULATE_prop.py
troymyname/damagedetectionanalysis
e47dc740686922e8a5114596d49853a940d1a947
[ "MIT" ]
null
null
null
CALCULATE_prop.py
troymyname/damagedetectionanalysis
e47dc740686922e8a5114596d49853a940d1a947
[ "MIT" ]
2
2019-05-02T18:59:16.000Z
2021-07-21T06:30:31.000Z
# ----// CALCULATE IMAGE PROPERTIES // -------------------------------------------------- # --------------------------------------------------------------------------------------- import cv2, math, numpy as np # --------------------------------------------------------- from skimage.feature import greycomatrix # ------...
32.574468
102
0.498149
import cv2, math, numpy as np from skimage.feature import greycomatrix clip_limit = 2.0 title_grid_size = (8,8) def CALCULATE_prop(im, Q_distance, Q_angle, levels): im = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) clahe = cv2.createCLAHE(clipLimit = clip_limit, tileGridSize = title_grid_size) im = cl...
false
true
1c430e92ba5f56e04484b5f8e6dc0abe1ade4089
2,344
py
Python
no_agent2/policy_network.py
songaal/rltrader
4aac8085dda1a58fbf30a313f2a4608398c971a3
[ "MIT" ]
2
2020-06-13T07:18:10.000Z
2020-11-03T03:46:40.000Z
no_agent2/policy_network.py
songaal/rltrader
4aac8085dda1a58fbf30a313f2a4608398c971a3
[ "MIT" ]
null
null
null
no_agent2/policy_network.py
songaal/rltrader
4aac8085dda1a58fbf30a313f2a4608398c971a3
[ "MIT" ]
1
2020-05-16T08:41:29.000Z
2020-05-16T08:41:29.000Z
import numpy as np from keras.models import Sequential from keras.layers import Activation, LSTM, Dense, BatchNormalization, Embedding, Input from keras.optimizers import sgd from keras import callbacks from keras.preprocessing import sequence class PolicyNetwork: def __init__(self, input_dim, output_dim=0...
43.407407
117
0.648464
import numpy as np from keras.models import Sequential from keras.layers import Activation, LSTM, Dense, BatchNormalization, Embedding, Input from keras.optimizers import sgd from keras import callbacks from keras.preprocessing import sequence class PolicyNetwork: def __init__(self, input_dim, output_dim=0...
true
true
1c430f38da4bfc0e8a45b675aa1cea6c3c1fecfe
9,065
py
Python
afterglow_core/resources/data_provider_plugins/dss_image_provider.py
SkynetRTN/afterglow-core
cd9d84e68cc7126887d0aa7f96f608b91b0b0ae3
[ "Apache-2.0" ]
2
2021-05-24T15:12:07.000Z
2022-02-17T19:58:16.000Z
afterglow_core/resources/data_provider_plugins/dss_image_provider.py
SkynetRTN/afterglow-core
cd9d84e68cc7126887d0aa7f96f608b91b0b0ae3
[ "Apache-2.0" ]
1
2022-02-27T03:01:06.000Z
2022-02-27T03:01:06.000Z
afterglow_core/resources/data_provider_plugins/dss_image_provider.py
SkynetRTN/afterglow-core
cd9d84e68cc7126887d0aa7f96f608b91b0b0ae3
[ "Apache-2.0" ]
2
2021-06-08T18:16:40.000Z
2021-07-09T14:19:49.000Z
""" Afterglow Core: imaging survey data provider plugin """ from typing import List as TList, Optional, Tuple, Union from io import BytesIO from marshmallow.fields import Float, String from marshmallow.validate import OneOf, Range import requests import astropy.io.fits as pyfits from ...models import DataProvider, D...
35.272374
79
0.534915
from typing import List as TList, Optional, Tuple, Union from io import BytesIO from marshmallow.fields import Float, String from marshmallow.validate import OneOf, Range import requests import astropy.io.fits as pyfits from ...models import DataProvider, DataProviderAsset from ...errors import MissingFieldError, Va...
true
true
1c43107c4f2485e25dc74af0dfc00acefcc043c7
10,203
py
Python
kuryr_kubernetes/cmd/status.py
digitalsimboja/kuryr-kubernetes
e2e8e514d3c93b0546716dfe0c458e91d14ffa10
[ "Apache-2.0" ]
155
2016-05-23T01:18:04.000Z
2022-02-07T04:27:53.000Z
kuryr_kubernetes/cmd/status.py
digitalsimboja/kuryr-kubernetes
e2e8e514d3c93b0546716dfe0c458e91d14ffa10
[ "Apache-2.0" ]
635
2019-04-08T18:24:14.000Z
2022-03-30T13:48:10.000Z
kuryr_kubernetes/cmd/status.py
digitalsimboja/kuryr-kubernetes
e2e8e514d3c93b0546716dfe0c458e91d14ffa10
[ "Apache-2.0" ]
71
2016-05-24T15:46:39.000Z
2022-03-11T06:24:44.000Z
# Copyright 2018 Red Hat # # 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 ...
34.469595
79
0.604822
import copy import sys import textwrap import traceback import prettytable import os_vif from os_vif.objects import base from oslo_config import cfg from oslo_serialization import jsonutils from kuryr_kubernetes import clients from kuryr_kubernetes import config from kuryr_kubernetes import constants ...
true
true
1c4310f9d44999eb5196e3da1d1c3a90d53328cc
992
py
Python
sct_custom/unit_testing/test_sct_compute_mtsat.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
1
2021-09-07T08:52:21.000Z
2021-09-07T08:52:21.000Z
sct_custom/unit_testing/test_sct_compute_mtsat.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
null
null
null
sct_custom/unit_testing/test_sct_compute_mtsat.py
nidebroux/lumbosacral_segmentation
3217960c6f0f5c3886dfdf46e1286ad2f737f4aa
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python import os import pytest from spinalcordtoolbox.utils import sct_test_path from spinalcordtoolbox.scripts import sct_compute_mtsat out_mstat = "out_mtsat.nii.gz" out_t1map = "out_t1map.nii.gz" INPUT_PARAMS = [ ['-mt', sct_test_path('mt', 'mt1.nii.gz'), '-pd', sct_test_path('mt', 'mt0....
28.342857
93
0.628024
import os import pytest from spinalcordtoolbox.utils import sct_test_path from spinalcordtoolbox.scripts import sct_compute_mtsat out_mstat = "out_mtsat.nii.gz" out_t1map = "out_t1map.nii.gz" INPUT_PARAMS = [ ['-mt', sct_test_path('mt', 'mt1.nii.gz'), '-pd', sct_test_path('mt', 'mt0.nii.gz'), '-t1',...
true
true
1c43114d6bc49f1a731867467ab5fc9d2bcf9463
15,401
py
Python
example_cases/1D_exp_bubscreen/input_bak.py
ComputationalFlowPhysics/MFC-develop
41506c2c788f9b8d081cd4b9b2c8ff95ef3b19f2
[ "MIT" ]
3
2021-05-20T23:42:47.000Z
2021-11-17T21:34:14.000Z
example_cases/1D_exp_bubscreen/input_bak.py
ComputationalFlowPhysics/MFC-develop
41506c2c788f9b8d081cd4b9b2c8ff95ef3b19f2
[ "MIT" ]
28
2021-11-02T00:40:40.000Z
2021-12-06T02:38:57.000Z
example_cases/1D_exp_bubscreen/input_bak.py
ComputationalFlowPhysics/MFC-develop
901bff8d9e9d7519613cfcacc7a5463ab6295181
[ "MIT" ]
9
2021-10-02T04:37:25.000Z
2021-11-23T00:58:11.000Z
#!/usr/bin/env python3 import math x0 = 10.E-06 p0 = 101325. rho0 = 1.E+03 c0 = math.sqrt( p0/rho0 ) patm = 1. #water props ## AKA little \gamma (see coralic 2014 eq'n (13)) n_tait = 7.1 ## AKA little \pi(see coralic 2014 eq'n (13)) B_tait = 306.E+06 / p0 mul0 = 1.002E-03 #viscosity ss...
52.384354
107
0.310305
import math x0 = 10.E-06 p0 = 101325. rho0 = 1.E+03 c0 = math.sqrt( p0/rho0 ) patm = 1. 4 eq'n (13)) B_tait = 306.E+06 / p0 mul0 = 1.002E-03 ss = 0.07275 .8816E-05 #k_v = 0.019426 ##air props #gamma_n = 1.4 #M_n = 28.97 #mu_n = 1.8E-05 #k_n = 0.02556 #air...
true
true
1c4311c385772f0780d0f5fd3ed496e89c9bb98c
4,129
py
Python
mmdet/models/losses/eqlv2.py
zhaohongyin/mmdetection-2.15
9fd29bfd373a6ad00674471c04ecc916f8ad413e
[ "Apache-2.0" ]
null
null
null
mmdet/models/losses/eqlv2.py
zhaohongyin/mmdetection-2.15
9fd29bfd373a6ad00674471c04ecc916f8ad413e
[ "Apache-2.0" ]
null
null
null
mmdet/models/losses/eqlv2.py
zhaohongyin/mmdetection-2.15
9fd29bfd373a6ad00674471c04ecc916f8ad413e
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import torch.distributed as dist from mmdet.utils import get_root_logger from functools import partial from ..builder import LOSSES @LOSSES.register_module() class EQLv2(nn.Module): def __init__(self, use_sigmoid=True, ...
33.844262
83
0.578106
import torch import torch.nn as nn import torch.nn.functional as F import torch.distributed as dist from mmdet.utils import get_root_logger from functools import partial from ..builder import LOSSES @LOSSES.register_module() class EQLv2(nn.Module): def __init__(self, use_sigmoid=True, ...
true
true
1c4312172dc45ac8b188a1e31e311d39a6f89ea9
3,943
py
Python
designate/storage/__init__.py
ISCAS-VDI/designate-base
bd945607e3345fbef8645c3441e96b032b70b098
[ "Apache-2.0" ]
null
null
null
designate/storage/__init__.py
ISCAS-VDI/designate-base
bd945607e3345fbef8645c3441e96b032b70b098
[ "Apache-2.0" ]
null
null
null
designate/storage/__init__.py
ISCAS-VDI/designate-base
bd945607e3345fbef8645c3441e96b032b70b098
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 r...
33.700855
79
0.587116
import copy import functools import threading import time from oslo_log import log as logging from oslo_db import exception as db_exception from oslo_utils import excutils from designate.storage.base import Storage from designate.i18n import _LW LOG = logging.getLogger(__name__) RETRY_STATE = thread...
true
true
1c4312cb083a253b3691adb88cdcfbc5b0aa0c66
798
py
Python
sugar/sugar/urls.py
Nazira06/sweet-sugar
9822390356effae379bff1ebcda276b5d6dee8ce
[ "MIT" ]
null
null
null
sugar/sugar/urls.py
Nazira06/sweet-sugar
9822390356effae379bff1ebcda276b5d6dee8ce
[ "MIT" ]
null
null
null
sugar/sugar/urls.py
Nazira06/sweet-sugar
9822390356effae379bff1ebcda276b5d6dee8ce
[ "MIT" ]
null
null
null
"""sugar URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based v...
34.695652
77
0.703008
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('sweet_girl.urls')), ]
true
true
1c431471364d40e49996e90ea2929734f7ea9e2b
6,864
py
Python
bindings/python/ensmallen_graph/datasets/string/flaviramulusichthyoenteri.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/flaviramulusichthyoenteri.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/flaviramulusichthyoenteri.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Flaviramulus ichthyoenteri. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: ...
35.937173
223
0.711247
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def FlaviramulusIchthyoenteri( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: ...
true
true
1c43147d60936250716fa29247d7b6a5f06f230c
5,472
py
Python
gridpath/auxiliary/dynamic_components.py
anamileva/gridpath
e55eacb88ca5e6c034a90b18819e17cbd6f43854
[ "Apache-2.0" ]
null
null
null
gridpath/auxiliary/dynamic_components.py
anamileva/gridpath
e55eacb88ca5e6c034a90b18819e17cbd6f43854
[ "Apache-2.0" ]
null
null
null
gridpath/auxiliary/dynamic_components.py
anamileva/gridpath
e55eacb88ca5e6c034a90b18819e17cbd6f43854
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2020 Blue Marble Analytics 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 ag...
42.092308
79
0.738121
from builtins import object capacity_type_operational_period_sets = "capacity_type_operational_period_sets" storage_only_capacity_type_operational_period_sets = \ "storage_only_capacity_type_operational_period_sets" headroom_variables = "headroom_variables" footroom_variables = "footroom_variable...
true
true
1c4315485dc6a97257b664665246fdef117f21c5
610
py
Python
djangogram/users/models.py
nothors2/djangogram
1250e301026be2218b6b116895a16217770efb17
[ "MIT" ]
null
null
null
djangogram/users/models.py
nothors2/djangogram
1250e301026be2218b6b116895a16217770efb17
[ "MIT" ]
null
null
null
djangogram/users/models.py
nothors2/djangogram
1250e301026be2218b6b116895a16217770efb17
[ "MIT" ]
null
null
null
from django.contrib.auth.models import AbstractUser from django.db.models import CharField from django.urls import reverse from django.utils.translation import gettext_lazy as _ class User(AbstractUser): """Default user for djangogram. """ #: First and last name do not cover name patterns around the glob...
27.727273
74
0.685246
from django.contrib.auth.models import AbstractUser from django.db.models import CharField from django.urls import reverse from django.utils.translation import gettext_lazy as _ class User(AbstractUser): name = CharField(_("Name of User"), blank=True, max_length=255) def get_absolute_url(self): ...
true
true
1c4316d17e8a809a1b0d8b5c86ad35c3660f6af3
4,449
py
Python
wavefront_api_client/models/response_container_list_string.py
mdennehy/python-client
4d9cfa32075a6a65d88a38fe9e72b282e87b8808
[ "Apache-2.0" ]
null
null
null
wavefront_api_client/models/response_container_list_string.py
mdennehy/python-client
4d9cfa32075a6a65d88a38fe9e72b282e87b8808
[ "Apache-2.0" ]
null
null
null
wavefront_api_client/models/response_container_list_string.py
mdennehy/python-client
4d9cfa32075a6a65d88a38fe9e72b282e87b8808
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
30.682759
409
0.601483
import pprint import re import six from wavefront_api_client.models.response_status import ResponseStatus class ResponseContainerListString(object): swagger_types = { 'response': 'list[str]', 'status': 'ResponseStatus' } attribute_map = { 'response': 'response', ...
true
true
1c4316da8a7451b37c49defcc4c8ba806a5b3516
464
py
Python
ctsb/models/__init__.py
paula-gradu/ctsb
fdc00acb798949ce1120778ad4725faf170f80c3
[ "Apache-2.0" ]
1
2021-07-03T05:26:56.000Z
2021-07-03T05:26:56.000Z
ctsb/models/__init__.py
paula-gradu/ctsb
fdc00acb798949ce1120778ad4725faf170f80c3
[ "Apache-2.0" ]
null
null
null
ctsb/models/__init__.py
paula-gradu/ctsb
fdc00acb798949ce1120778ad4725faf170f80c3
[ "Apache-2.0" ]
null
null
null
# models init file from ctsb.models.registration import model_registry, model_register, model, model_spec from ctsb.models.core import Model, CustomModel # ---------- Models ---------- model_register( id='LastValue', entry_point='ctsb.models.time_series:LastValue', ) model_register( id='Linear', e...
18.56
86
0.713362
from ctsb.models.registration import model_registry, model_register, model, model_spec from ctsb.models.core import Model, CustomModel model_register( id='LastValue', entry_point='ctsb.models.time_series:LastValue', ) model_register( id='Linear', entry_point='ctsb.models.time_series:Linear', ) ...
true
true
1c43180dbe1faed6c7475316a57df59e40602db1
155,494
py
Python
goodies/ospexporter/export_fbx_bin.py
Ghimli/new-ospgl
31bd84e52d954683671211ff16ce8702bdb87312
[ "MIT", "BSD-3-Clause" ]
1
2020-01-18T22:13:24.000Z
2020-01-18T22:13:24.000Z
release/scripts/addons/io_scene_fbx/export_fbx_bin.py
ringsce/Rings3D
8059d1e2460fc8d6f101eff8e695f68a99f6671d
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/scripts/addons/io_scene_fbx/export_fbx_bin.py
ringsce/Rings3D
8059d1e2460fc8d6f101eff8e695f68a99f6671d
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
47.320146
137
0.648977
importlib.reload(fbx_utils) import bpy import bpy_extras from bpy_extras import node_shader_utils from mathutils import Vector, Matrix from . import encode_bin, data_types, fbx_utils from .fbx_utils import ( FBX_VERSION, FBX_HEADER_VERSION, FBX_SCENEINFO_VERSION, FBX_TEMPLATES_VERSION, FBX_MODELS_VERSI...
true
true
1c4319290a772ff076d1c754c3360cc8808b20b6
3,196
py
Python
pysurf/spp/request.py
MFSJMenger/pysurf
99c6a94d4cb5046f16a0961b907061d989ffb6dc
[ "Apache-2.0" ]
7
2020-10-28T13:46:08.000Z
2021-05-27T06:41:56.000Z
pysurf/spp/request.py
MFSJMenger/pysurf
99c6a94d4cb5046f16a0961b907061d989ffb6dc
[ "Apache-2.0" ]
2
2020-10-27T19:15:12.000Z
2020-10-27T19:15:25.000Z
pysurf/spp/request.py
MFSJMenger/pysurf
99c6a94d4cb5046f16a0961b907061d989ffb6dc
[ "Apache-2.0" ]
2
2021-04-15T05:54:30.000Z
2022-02-08T00:10:10.000Z
from collections.abc import Mapping import numpy as np class RequestGenerator: """Abstraction to generate Requests consistently""" def __init__(self, nstates, properties=None, use_db=False): self.nstates = nstates # properties that are always asked for (database) if properties is None...
30.730769
89
0.602003
from collections.abc import Mapping import numpy as np class RequestGenerator: def __init__(self, nstates, properties=None, use_db=False): self.nstates = nstates if properties is None: properties = [] self._request_always = properties if use_...
true
true
1c4319f777093247b8f9e9c7bd3a0e82affbfe84
4,744
py
Python
visigoth/utils/hue_manager/discrete_hue_manager.py
visigoths/visigoth
c5297148209d630f6668f0e5ba3039a8856d8320
[ "MIT" ]
null
null
null
visigoth/utils/hue_manager/discrete_hue_manager.py
visigoths/visigoth
c5297148209d630f6668f0e5ba3039a8856d8320
[ "MIT" ]
1
2021-01-26T16:55:48.000Z
2021-09-03T15:29:14.000Z
visigoth/utils/hue_manager/discrete_hue_manager.py
visigoths/visigoth
c5297148209d630f6668f0e5ba3039a8856d8320
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # visigoth: A lightweight Python3 library for rendering data visualizations in SVG # Copyright (C) 2020-2021 Visigoth Developers # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software # and associated documentation files (the "Software"), to...
36.775194
104
0.621206
from visigoth.utils.hue_manager.hue_manager import HueManager from visigoth.internal.utils.hue.hue import Hue from visigoth.internal.utils.hue.colormaps import DiscreteColourMaps class DiscreteHueManager(HueManager): def __init__(self,hueMap="pastel",defaultHue="gray"): super(DiscreteH...
true
true
1c431a04b0e307d352621e61ed087ea63836683d
183
py
Python
Court-APP/users/admin.py
mjhow4/attendance-app
726577ea60f53f35c522c322ca6e81c7e3e8856b
[ "MIT" ]
null
null
null
Court-APP/users/admin.py
mjhow4/attendance-app
726577ea60f53f35c522c322ca6e81c7e3e8856b
[ "MIT" ]
null
null
null
Court-APP/users/admin.py
mjhow4/attendance-app
726577ea60f53f35c522c322ca6e81c7e3e8856b
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .models import NewUser, CustomAccountManager admin.site.register(NewUser, CustomAccountManager)
30.5
50
0.852459
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .models import NewUser, CustomAccountManager admin.site.register(NewUser, CustomAccountManager)
true
true
1c431a439cff4e67b136f223f8bc58eae3b1f40a
1,117
py
Python
tests/conftest.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
30
2019-07-01T13:23:27.000Z
2022-03-16T21:19:33.000Z
tests/conftest.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
234
2019-07-04T13:56:15.000Z
2021-11-04T10:12:55.000Z
tests/conftest.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
13
2019-07-04T14:00:34.000Z
2020-07-13T11:18:44.000Z
import os import pytest import shutil import logging import json from click.testing import CliRunner from a2ml.api.utils.context import Context @pytest.fixture def ctx(): # load config(s) from the test app return Context(debug=True) @pytest.fixture def runner(): return CliRunner() @pytest.fixture(scope...
22.795918
79
0.716204
import os import pytest import shutil import logging import json from click.testing import CliRunner from a2ml.api.utils.context import Context @pytest.fixture def ctx(): return Context(debug=True) @pytest.fixture def runner(): return CliRunner() @pytest.fixture(scope="function") def isolated(runner):...
true
true
1c431a9d6a3aa2af83b23411ebb9876266948588
16,154
py
Python
sdk/python/tests/integration/registration/test_feature_store.py
potatochip/feast
bf557bcb72c7878a16dccb48443bbbe9dc3efa49
[ "Apache-2.0" ]
null
null
null
sdk/python/tests/integration/registration/test_feature_store.py
potatochip/feast
bf557bcb72c7878a16dccb48443bbbe9dc3efa49
[ "Apache-2.0" ]
null
null
null
sdk/python/tests/integration/registration/test_feature_store.py
potatochip/feast
bf557bcb72c7878a16dccb48443bbbe9dc3efa49
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Feast 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
33.445135
102
0.667884
import time from datetime import datetime, timedelta from tempfile import mkstemp import pytest from pytest_lazyfixture import lazy_fixture from feast import FileSource from feast.data_format import ParquetFormat from feast.entity import Entity from feast.feature import Feature from feast.feature_store i...
true
true
1c431aabedb41ed6587e6ba57f1ebca93ef9a5d7
270
py
Python
exercicio29.py
FelipeRossoni/infosatc-lp-avaliativo-01
8981927cb8fbad5cffa20533557a8402b794455c
[ "MIT" ]
null
null
null
exercicio29.py
FelipeRossoni/infosatc-lp-avaliativo-01
8981927cb8fbad5cffa20533557a8402b794455c
[ "MIT" ]
null
null
null
exercicio29.py
FelipeRossoni/infosatc-lp-avaliativo-01
8981927cb8fbad5cffa20533557a8402b794455c
[ "MIT" ]
null
null
null
n1 = float(input("Digite a primeira nota: ")) n2 = float(input("Digite a segunda nota: ")) n3 = float(input("Digite a segunda nota: ")) n4 = float(input("Digite a terceira nota: ")) media = ((n1+n2+n3+n4)/4) print("A média aritmética de suas notas é : {}".format(media))
45
62
0.666667
n1 = float(input("Digite a primeira nota: ")) n2 = float(input("Digite a segunda nota: ")) n3 = float(input("Digite a segunda nota: ")) n4 = float(input("Digite a terceira nota: ")) media = ((n1+n2+n3+n4)/4) print("A média aritmética de suas notas é : {}".format(media))
true
true
1c431b0d542110ce047d54c74904da7d90a27db8
755
py
Python
201509/3.py
L-LYR/csp-sol
6c0aec82d4704dc8b53886fe1f72e5088d6eab6d
[ "MIT" ]
null
null
null
201509/3.py
L-LYR/csp-sol
6c0aec82d4704dc8b53886fe1f72e5088d6eab6d
[ "MIT" ]
null
null
null
201509/3.py
L-LYR/csp-sol
6c0aec82d4704dc8b53886fe1f72e5088d6eab6d
[ "MIT" ]
null
null
null
# Time: 04/02/21 # Author: HammerLi # Tags: [Simulation] # Title: 模板生成系统 # Content: # 给定字符串替换 from collections import defaultdict m, n = map(int, input().split(' ')) template = "" for _ in range(m): template += "\n" + input() template = template[1:] vars = defaultdict(str) for _ in range(n): line = inpu...
19.358974
65
0.580132
from collections import defaultdict m, n = map(int, input().split(' ')) template = "" for _ in range(m): template += "\n" + input() template = template[1:] vars = defaultdict(str) for _ in range(n): line = input() sep = line.find(' ') var, tar = line[:sep], line[sep+2:-1] vars[var] = tar ...
true
true
1c431b21c6b302af48a3044f2455e1b97883f4e0
2,942
py
Python
malicious-payload-text-classifier/data_utils.py
kosletr/SessionBehaviorClassifierAPI
15e72da6c9c84dca20beb16469c855e11f901b82
[ "MIT" ]
1
2020-10-22T09:35:34.000Z
2020-10-22T09:35:34.000Z
malicious-payload-text-classifier/data_utils.py
kosletr/SessionBehaviorClassifierAPI
15e72da6c9c84dca20beb16469c855e11f901b82
[ "MIT" ]
null
null
null
malicious-payload-text-classifier/data_utils.py
kosletr/SessionBehaviorClassifierAPI
15e72da6c9c84dca20beb16469c855e11f901b82
[ "MIT" ]
null
null
null
import numpy as np import re import csv class Data(object): """ Class to handle loading and processing of raw datasets. """ def __init__(self, data_source, alphabet="abcdefghijklmnopqrstuvwxyz0123456789-,;.!?:'\"/\\|_@#$%^&*~`+-=<>()[]{}", input_size=1014, num_of_cla...
31.978261
100
0.539089
import numpy as np import re import csv class Data(object): def __init__(self, data_source, alphabet="abcdefghijklmnopqrstuvwxyz0123456789-,;.!?:'\"/\\|_@#$%^&*~`+-=<>()[]{}", input_size=1014, num_of_classes=8): self.alphabet = alphabet self.alphabet_size = len(s...
true
true
1c431b6d68ed9856dc72ebd54e4bc377a51e12c1
92
py
Python
bitmovin_api_sdk/encoding/filters/scale/customdata/__init__.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
11
2019-07-03T10:41:16.000Z
2022-02-25T21:48:06.000Z
bitmovin_api_sdk/encoding/filters/scale/customdata/__init__.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
8
2019-11-23T00:01:25.000Z
2021-04-29T12:30:31.000Z
bitmovin_api_sdk/encoding/filters/scale/customdata/__init__.py
jaythecaesarean/bitmovin-api-sdk-python
48166511fcb9082041c552ace55a9b66cc59b794
[ "MIT" ]
13
2020-01-02T14:58:18.000Z
2022-03-26T12:10:30.000Z
from bitmovin_api_sdk.encoding.filters.scale.customdata.customdata_api import CustomdataApi
46
91
0.902174
from bitmovin_api_sdk.encoding.filters.scale.customdata.customdata_api import CustomdataApi
true
true
1c431c2081e2256040933dc48463bcb4ec3b752b
2,772
py
Python
laueagle/yamllint/rules/comments.py
yetship/laueagle
c2a1e4e56fdeaff3c7bb9b104b960db6ebac2eba
[ "MIT" ]
1
2018-05-07T10:19:00.000Z
2018-05-07T10:19:00.000Z
laueagle/yamllint/rules/comments.py
yetship/laueagle
c2a1e4e56fdeaff3c7bb9b104b960db6ebac2eba
[ "MIT" ]
null
null
null
laueagle/yamllint/rules/comments.py
yetship/laueagle
c2a1e4e56fdeaff3c7bb9b104b960db6ebac2eba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2016 Adrien Vergé # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pro...
30.8
79
0.643939
from ..linter import LintProblem ID = 'comments' TYPE = 'comment' CONF = {'require-starting-space': bool, 'min-spaces-from-content': int} def check(conf, comment): if (conf['min-spaces-from-content'] != -1 and comment.is_inline() and comment.pointer - comment.token_before.e...
true
true
1c431d3e30546faa9501c46b5a246dec7d3c2ce2
520
py
Python
Geometry/HGCalGeometry/python/hgcalTestNeighbor_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
Geometry/HGCalGeometry/python/hgcalTestNeighbor_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
26
2018-10-30T12:47:58.000Z
2022-03-29T08:39:00.000Z
Geometry/HGCalGeometry/python/hgcalTestNeighbor_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
import FWCore.ParameterSet.Config as cms from Geometry.HGCalGeometry.hgcalEETestNeighbor_cfi import * hgcalHEFTestNeighbor = hgcalEETestNeighbor.clone( detector = cms.string("HGCalHESiliconSensitive")) hgcalHEBTestNeighbor = hgcalEETestNeighbor.clone( detector = cms.string("HCal")) from Configuration.Eras.M...
32.5
77
0.755769
import FWCore.ParameterSet.Config as cms from Geometry.HGCalGeometry.hgcalEETestNeighbor_cfi import * hgcalHEFTestNeighbor = hgcalEETestNeighbor.clone( detector = cms.string("HGCalHESiliconSensitive")) hgcalHEBTestNeighbor = hgcalEETestNeighbor.clone( detector = cms.string("HCal")) from Configuration.Eras.M...
true
true
1c431e26738e68771508430d0d0ebbb022437bb7
8,609
py
Python
kornia/filters/motion.py
Manza12/kornia
580bbbffc771470445de27a7957d970b5a606172
[ "ECL-2.0", "Apache-2.0" ]
1
2021-08-31T06:04:28.000Z
2021-08-31T06:04:28.000Z
kornia/filters/motion.py
Manza12/kornia
580bbbffc771470445de27a7957d970b5a606172
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
kornia/filters/motion.py
Manza12/kornia
580bbbffc771470445de27a7957d970b5a606172
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from typing import Tuple, Union import torch import torch.nn as nn import kornia from kornia.filters.kernels_geometry import get_motion_kernel2d, get_motion_kernel3d class MotionBlur(nn.Module): r"""Blur 2D images (4D tensor) using the motion filter. Args: kernel_size (int): motion kernel width and...
44.376289
117
0.619352
from typing import Tuple, Union import torch import torch.nn as nn import kornia from kornia.filters.kernels_geometry import get_motion_kernel2d, get_motion_kernel3d class MotionBlur(nn.Module): def __init__(self, kernel_size: int, angle: float, direction: float, border_type: str = 'constant') -> None: ...
true
true
1c431e5e2201f855831bb4ec0c36521e9a0108ea
60,380
py
Python
desktop/core/ext-py/Django-1.11.20/tests/forms_tests/tests/test_formsets.py
maulikjs/hue
59ac879b55bb6fb26ecb4e85f4c70836fc21173f
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
tests/forms_tests/tests/test_formsets.py
287977288/test
142e3626ab3c676574631383ae6b5a4eced5a10e
[ "PSF-2.0", "BSD-3-Clause" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
tests/forms_tests/tests/test_formsets.py
287977288/test
142e3626ab3c676574631383ae6b5a4eced5a10e
[ "PSF-2.0", "BSD-3-Clause" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from collections import Counter from django.forms import ( BaseForm, CharField, DateField, FileField, Form, IntegerField, SplitDateTimeField, ValidationError, formsets, ) from django.forms.formsets import BaseFormSet, formset_fact...
42.431483
119
0.603163
from __future__ import unicode_literals import datetime from collections import Counter from django.forms import ( BaseForm, CharField, DateField, FileField, Form, IntegerField, SplitDateTimeField, ValidationError, formsets, ) from django.forms.formsets import BaseFormSet, formset_factory from django.forms.u...
true
true
1c431e9494b623ae6f2fdbb6c1b0e694576fc004
2,641
py
Python
module4-acid-and-database-scalability-tradeoffs/Assignment/assignment_mongo.py
singparvi/DS-Unit-3-Sprint-2-SQL-and-Databases
7d61f09a410ea91731caddb4fcc96b84cb9b0221
[ "MIT" ]
null
null
null
module4-acid-and-database-scalability-tradeoffs/Assignment/assignment_mongo.py
singparvi/DS-Unit-3-Sprint-2-SQL-and-Databases
7d61f09a410ea91731caddb4fcc96b84cb9b0221
[ "MIT" ]
null
null
null
module4-acid-and-database-scalability-tradeoffs/Assignment/assignment_mongo.py
singparvi/DS-Unit-3-Sprint-2-SQL-and-Databases
7d61f09a410ea91731caddb4fcc96b84cb9b0221
[ "MIT" ]
null
null
null
import pymongo # now make a connection with mongo db and test connection mongo_client = pymongo.MongoClient( 'mongodb+srv://singparvi:qwerty12345@cluster0.l0ldo.mongodb.net/myFirstDatabase?retryWrites=true&w=majority') rpg_collections = mongo_client.myFirstDatabase.rpg_collections # How many total Characters are ...
33.43038
113
0.711094
import pymongo mongo_client = pymongo.MongoClient( 'mongodb+srv://singparvi:qwerty12345@cluster0.l0ldo.mongodb.net/myFirstDatabase?retryWrites=true&w=majority') rpg_collections = mongo_client.myFirstDatabase.rpg_collections print('How many total Characters are there?: ', rpg_collections.count()) print("\n") i...
true
true
1c431e9d9998ea751e1c2815fa1a80b524b7e566
2,388
py
Python
var/spack/repos/builtin/packages/expect/package.py
williamfgc/spack
c8c795e7dbde22dc47c9ae285a4dd59004b115b1
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/expect/package.py
williamfgc/spack
c8c795e7dbde22dc47c9ae285a4dd59004b115b1
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/expect/package.py
williamfgc/spack
c8c795e7dbde22dc47c9ae285a4dd59004b115b1
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import glob import os class Expect(AutotoolsPackage): """Expect is a tool for automating interac...
32.712329
101
0.64196
from spack import * import glob import os class Expect(AutotoolsPackage): homepage = "http://expect.sourceforge.net/" url = "https://sourceforge.net/projects/expect/files/Expect/5.45/expect5.45.tar.gz/download" version('5.45', '44e1a4f4c877e9ddc5a542dfa7ecc92b') depends_on('tcl') dep...
true
true
1c431ed63ca861ca01aa3f842b457ff21544124b
4,462
py
Python
gepify/services/mobile_api/views.py
nvlbg/gepify
2e937535e2835f6bd47cd8a6026dc7fe2c6c58ca
[ "MIT" ]
7
2016-07-01T00:27:02.000Z
2019-07-27T18:07:22.000Z
gepify/services/mobile_api/views.py
nvlbg/gepify
2e937535e2835f6bd47cd8a6026dc7fe2c6c58ca
[ "MIT" ]
5
2016-08-13T10:40:43.000Z
2021-04-30T20:44:54.000Z
gepify/services/mobile_api/views.py
nvlbg/gepify
2e937535e2835f6bd47cd8a6026dc7fe2c6c58ca
[ "MIT" ]
null
null
null
from . import mobile_api_service from flask import request, current_app, jsonify from .view_decorators import access_key_required from gepify.providers import ( songs, SUPPORTED_FORMATS, SUPPORTED_PROVIDERS, MIMETYPES ) from gepify.services.spotify.models import ( SPOTIFY_AUTHORIZATION_DATA ) import requests im...
34.859375
78
0.636486
from . import mobile_api_service from flask import request, current_app, jsonify from .view_decorators import access_key_required from gepify.providers import ( songs, SUPPORTED_FORMATS, SUPPORTED_PROVIDERS, MIMETYPES ) from gepify.services.spotify.models import ( SPOTIFY_AUTHORIZATION_DATA ) import requests im...
true
true
1c431f161f6d7ee8e4a8f7bd87cf3977a6535807
179
py
Python
npy2h5py.py
rahmanabir/BanglaNLP
6a2c03fd30ce277c344093b54674c00774f0bc44
[ "MIT" ]
1
2021-12-25T18:23:26.000Z
2021-12-25T18:23:26.000Z
npy2h5py.py
rahmanabir/BanglaNLP
6a2c03fd30ce277c344093b54674c00774f0bc44
[ "MIT" ]
null
null
null
npy2h5py.py
rahmanabir/BanglaNLP
6a2c03fd30ce277c344093b54674c00774f0bc44
[ "MIT" ]
1
2019-12-25T12:05:40.000Z
2019-12-25T12:05:40.000Z
############ # @desc: # Codebase that deals with converting .npy files into h5py files for more efficient dataloader, import pandas as pd import numpy as np import h5py
17.9
101
0.687151
true
true
1c4320f44c460f4434ca770e8eff950080373dd1
1,221
py
Python
src/Route.py
ganemone/sublime-bart
1fcd72062914891cffac840d814eb129ebd43edf
[ "MIT" ]
6
2015-02-22T17:40:33.000Z
2016-07-11T19:18:37.000Z
src/Route.py
ganemone/sublime-bart
1fcd72062914891cffac840d814eb129ebd43edf
[ "MIT" ]
null
null
null
src/Route.py
ganemone/sublime-bart
1fcd72062914891cffac840d814eb129ebd43edf
[ "MIT" ]
1
2017-07-06T15:27:20.000Z
2017-07-06T15:27:20.000Z
from .stations import station_map class Route: def __init__(self, trip_attrs, legs): self.origin = trip_attrs['origin'] self.destination = trip_attrs['destination'] self.fare = trip_attrs['fare'] self.departs = trip_attrs['origTimeMin'] self.arrives = trip_attrs['destTimeM...
29.071429
63
0.562654
from .stations import station_map class Route: def __init__(self, trip_attrs, legs): self.origin = trip_attrs['origin'] self.destination = trip_attrs['destination'] self.fare = trip_attrs['fare'] self.departs = trip_attrs['origTimeMin'] self.arrives = trip_attrs['destTimeM...
true
true
1c4321b177e5119519cffe391b90b022962114aa
2,203
py
Python
torchfly_dev/common/logging_util.py
ECS-251-W2020/final-project-TorchFly
69f60b337c5dec0b1cd8315c194bc7891ba98d3a
[ "MIT" ]
null
null
null
torchfly_dev/common/logging_util.py
ECS-251-W2020/final-project-TorchFly
69f60b337c5dec0b1cd8315c194bc7891ba98d3a
[ "MIT" ]
3
2021-06-08T21:07:12.000Z
2021-12-13T20:41:53.000Z
torchfly_dev/common/logging_util.py
ECS-251-W2020/final-project-TorchFly
69f60b337c5dec0b1cd8315c194bc7891ba98d3a
[ "MIT" ]
1
2020-02-19T00:53:21.000Z
2020-02-19T00:53:21.000Z
import os import sys import hydra import hydra.utils import logging import colorlog from omegaconf import DictConfig logger = logging.getLogger(__name__) def configure_logging(config: DictConfig = None) -> None: """ This function initializes the logging. It is recommended to use Hydra to configure the t...
31.927536
126
0.588743
import os import sys import hydra import hydra.utils import logging import colorlog from omegaconf import DictConfig logger = logging.getLogger(__name__) def configure_logging(config: DictConfig = None) -> None: if config is None: config = DictConfig( { "logging": { ...
true
true
1c4321b5f6b36299cb5ed89abcc3d03be5c90012
1,496
py
Python
nova/api/openstack/compute/floating_ip_dns.py
zjzh/nova
7bb21723171c59b93e28f5d508c2b6df39220f13
[ "Apache-2.0" ]
1,874
2015-01-04T05:18:34.000Z
2022-03-31T03:30:28.000Z
nova/api/openstack/compute/floating_ip_dns.py
woraser/nova
fc3890667e4971e3f0f35ac921c2a6c25f72adec
[ "Apache-2.0" ]
132
2017-03-27T11:31:52.000Z
2022-03-30T08:45:02.000Z
nova/api/openstack/compute/floating_ip_dns.py
woraser/nova
fc3890667e4971e3f0f35ac921c2a6c25f72adec
[ "Apache-2.0" ]
1,996
2015-01-04T15:11:51.000Z
2022-03-31T11:03:13.000Z
# Copyright 2011 Andrew Bogott for the Wikimedia Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
29.92
78
0.696524
from webob import exc from nova.api.openstack import wsgi class FloatingIPDNSDomainController(wsgi.Controller): @wsgi.expected_errors(410) def index(self, req): raise exc.HTTPGone() @wsgi.expected_errors(410) def update(self, req, id, body): raise exc.HTTPGone() @...
true
true
1c432237b4b147a44df931ffd24b32203bcf57f0
2,493
py
Python
meggie/actions/tfr_save_tse/__init__.py
Teekuningas/meggie
0790559febb990a5487d4f0c92987066632e1d99
[ "BSD-2-Clause-FreeBSD" ]
4
2020-04-29T08:57:11.000Z
2021-01-15T21:21:51.000Z
meggie/actions/tfr_save_tse/__init__.py
Teekuningas/meggie
0790559febb990a5487d4f0c92987066632e1d99
[ "BSD-2-Clause-FreeBSD" ]
16
2019-05-03T10:31:16.000Z
2021-05-06T14:59:55.000Z
meggie/actions/tfr_save_tse/__init__.py
cibr-jyu/meggie
0790559febb990a5487d4f0c92987066632e1d99
[ "BSD-2-Clause-FreeBSD" ]
3
2020-12-12T09:57:00.000Z
2020-12-20T17:12:05.000Z
""" Contains save tse action handling. """ from meggie.utilities.messaging import exc_messagebox from meggie.utilities.messaging import messagebox from meggie.utilities.names import next_available_name from meggie.utilities.channels import get_channels_by_type from meggie.utilities.validators import assert_arrays_same...
36.130435
80
0.639791
from meggie.utilities.messaging import exc_messagebox from meggie.utilities.messaging import messagebox from meggie.utilities.names import next_available_name from meggie.utilities.channels import get_channels_by_type from meggie.utilities.validators import assert_arrays_same from meggie.mainwindow.dynamic import Act...
true
true
1c432292140d1410b9ad6d30040f346e295f781e
13,290
py
Python
numpyro/infer/kernels.py
ahmadsalim/numpyro
015c80ddd24cf6bc89006fc3a70b424fecd09331
[ "Apache-2.0" ]
3
2020-08-25T14:31:08.000Z
2020-08-26T02:23:08.000Z
numpyro/infer/kernels.py
ahmadsalim/numpyro
015c80ddd24cf6bc89006fc3a70b424fecd09331
[ "Apache-2.0" ]
null
null
null
numpyro/infer/kernels.py
ahmadsalim/numpyro
015c80ddd24cf6bc89006fc3a70b424fecd09331
[ "Apache-2.0" ]
1
2020-09-11T10:08:27.000Z
2020-09-11T10:08:27.000Z
from abc import ABC, abstractmethod from typing import Callable, List, Dict, Tuple import numpy as np import numpy.random as npr import jax.numpy as jnp import jax.scipy.stats import jax.scipy.linalg import numpyro.distributions as dist from numpyro.util import sqrth, posdef, safe_norm class PrecondMatrix(ABC): @...
41.401869
158
0.633785
from abc import ABC, abstractmethod from typing import Callable, List, Dict, Tuple import numpy as np import numpy.random as npr import jax.numpy as jnp import jax.scipy.stats import jax.scipy.linalg import numpyro.distributions as dist from numpyro.util import sqrth, posdef, safe_norm class PrecondMatrix(ABC): @...
true
true
1c43236975e8ef43c2b62f02abe76fd6e5c37eed
1,369
py
Python
platforms/m3/pre_v21e/software/mbc_code/triggers/auto_time_gen.py
lab11/M-ulator
95b49c6194678c74accca4a20af71380efbcac5f
[ "Apache-2.0", "MIT" ]
19
2015-01-26T10:47:23.000Z
2021-08-13T11:07:54.000Z
platforms/m3/pre_v21e/software/mbc_code_v6_3/triggers/auto_time_gen.py
lab11/M-ulator
95b49c6194678c74accca4a20af71380efbcac5f
[ "Apache-2.0", "MIT" ]
14
2015-08-24T02:35:46.000Z
2021-05-05T03:53:44.000Z
platforms/m3/pre_v21e/software/mbc_code/triggers/auto_time_gen.py
lab11/M-ulator
95b49c6194678c74accca4a20af71380efbcac5f
[ "Apache-2.0", "MIT" ]
9
2015-05-27T23:27:35.000Z
2020-10-05T22:02:43.000Z
import time from datetime import datetime import os import sys from file_gen import set_trigger import yaml trigger_dir = sys.argv[1] out_dir = os.path.dirname(os.path.abspath(__file__)) + '/' + trigger_dir + '/' config_file = out_dir + 'trigger_configs.yaml' with open(config_file, 'r') as file: l = yaml.load(fil...
26.326923
178
0.622352
import time from datetime import datetime import os import sys from file_gen import set_trigger import yaml trigger_dir = sys.argv[1] out_dir = os.path.dirname(os.path.abspath(__file__)) + '/' + trigger_dir + '/' config_file = out_dir + 'trigger_configs.yaml' with open(config_file, 'r') as file: l = yaml.load(fil...
true
true
1c432438bcef24f17a6ee9fccf6bda104862d862
17,213
py
Python
tensorflow_graphics/geometry/convolution/utils.py
prafael18/graphics
2f250a53431697cfb43fd1edf61a2d965b20c596
[ "Apache-2.0" ]
2
2021-01-06T03:24:47.000Z
2021-01-07T06:39:54.000Z
tensorflow_graphics/geometry/convolution/utils.py
prafael18/graphics
2f250a53431697cfb43fd1edf61a2d965b20c596
[ "Apache-2.0" ]
1
2021-02-24T10:36:11.000Z
2021-02-24T10:36:11.000Z
tensorflow_graphics/geometry/convolution/utils.py
isabella232/graphics-1
d5c26cf05125e5c096f5b2cde6c85f88c7df2d59
[ "Apache-2.0" ]
1
2021-10-11T09:10:56.000Z
2021-10-11T09:10:56.000Z
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
37.419565
81
0.630338
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow_graphics.util import shape def _is_dynamic_shape(tensors): if not isinstance(tensors, (list, tuple)): raise ValueError("'tensors' must be list of t...
true
true
1c43253d4f94cba7de19dd591bd349e829976301
20,956
py
Python
pensa/statesinfo/discrete_states.py
drorlab/pensa
0d4c138793d6e4f05f85cb9ece2bf4f0ddc1882f
[ "MIT" ]
55
2020-11-18T07:03:46.000Z
2022-03-29T02:47:10.000Z
pensa/statesinfo/discrete_states.py
drorlab/pensa
0d4c138793d6e4f05f85cb9ece2bf4f0ddc1882f
[ "MIT" ]
11
2020-11-18T16:43:43.000Z
2022-02-22T20:02:22.000Z
pensa/statesinfo/discrete_states.py
drorlab/pensa
0d4c138793d6e4f05f85cb9ece2bf4f0ddc1882f
[ "MIT" ]
11
2020-11-19T04:34:36.000Z
2022-03-01T23:48:57.000Z
import numpy as np from queue import PriorityQueue import math import matplotlib.pyplot as plt from scipy.optimize import curve_fit from scipy.signal import argrelextrema import os from pensa.features import * # -- Functions to cluster feature distributions into discrete states -- def _smooth(x,window_len,window=N...
36.508711
261
0.644541
import numpy as np from queue import PriorityQueue import math import matplotlib.pyplot as plt from scipy.optimize import curve_fit from scipy.signal import argrelextrema import os from pensa.features import * def _smooth(x,window_len,window=None): if window is None: window_type='hanning' if x.ndi...
true
true
1c4325ae6919f9ae41b7a7214ba23df6453cd811
291
py
Python
networkx/algorithms/isomorphism/__init__.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
10
2020-04-29T10:38:03.000Z
2022-03-16T03:30:28.000Z
networkx/algorithms/isomorphism/__init__.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
30
2020-04-15T19:37:40.000Z
2020-04-22T21:19:35.000Z
networkx/algorithms/isomorphism/__init__.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
2
2020-04-08T07:50:23.000Z
2020-04-08T11:59:03.000Z
from networkx.algorithms.isomorphism.isomorph import * from networkx.algorithms.isomorphism.vf2userfunc import * from networkx.algorithms.isomorphism.matchhelpers import * from networkx.algorithms.isomorphism.temporalisomorphvf2 import * from networkx.algorithms.isomorphism.ismags import *
48.5
65
0.862543
from networkx.algorithms.isomorphism.isomorph import * from networkx.algorithms.isomorphism.vf2userfunc import * from networkx.algorithms.isomorphism.matchhelpers import * from networkx.algorithms.isomorphism.temporalisomorphvf2 import * from networkx.algorithms.isomorphism.ismags import *
true
true
1c4328895663bf86c06891a5e0931edb17573e9e
8,932
py
Python
src/pytractor/mixins.py
sergueik/pytractor
04471229093c8c9dff210f7f238d8dd8a3a9d26a
[ "Apache-2.0", "MIT" ]
49
2015-01-21T15:34:22.000Z
2021-09-08T21:12:10.000Z
src/pytractor/mixins.py
sergueik/pytractor
04471229093c8c9dff210f7f238d8dd8a3a9d26a
[ "Apache-2.0", "MIT" ]
22
2015-06-04T09:24:32.000Z
2019-09-16T11:35:25.000Z
src/pytractor/mixins.py
sergueik/pytractor
04471229093c8c9dff210f7f238d8dd8a3a9d26a
[ "Apache-2.0", "MIT" ]
34
2015-03-06T08:04:16.000Z
2021-09-08T21:12:15.000Z
# Copyright 2014 Konrad Podloucky, Michal Walkowski # # 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...
37.529412
80
0.635804
""" Mixin to add the capability of testing angular.js apps with selenium webdrivers. """ from functools import wraps from math import floor from future.moves.urllib.parse import urljoin from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.remote.command import Command fro...
false
true
1c432939ac64eb0fbfab497b70dd63da3ec4d5ff
606
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/NV/shadow_samplers_cube.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/NV/shadow_samplers_cube.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GLES2/NV/shadow_samplers_cube.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C ...
37.875
127
0.793729
from OpenGL import platform as _p, arrays from OpenGL.raw.GLES2 import _types as _cs from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import ctypes _EXTENSION_NAME = 'GLES2_NV_shadow_samplers_cube' def _f( function ): return _p.createF...
true
true