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
f76e42a0a54954b3c8a20f3e84d10fdde0ffc071
84,732
py
Python
tests/libs/datasets/timeseries_test.py
phc-health/covid-data-model
13c5084d631cf2dd33a7fe558c212dbd32b686e6
[ "MIT" ]
null
null
null
tests/libs/datasets/timeseries_test.py
phc-health/covid-data-model
13c5084d631cf2dd33a7fe558c212dbd32b686e6
[ "MIT" ]
null
null
null
tests/libs/datasets/timeseries_test.py
phc-health/covid-data-model
13c5084d631cf2dd33a7fe558c212dbd32b686e6
[ "MIT" ]
null
null
null
import dataclasses import datetime import io import pathlib import pickle import pytest import pandas as pd import numpy as np import structlog from datapublic.common_fields import CommonFields from datapublic.common_fields import DemographicBucket from datapublic.common_fields import FieldName from datapublic.common...
40.138323
103
0.662194
import dataclasses import datetime import io import pathlib import pickle import pytest import pandas as pd import numpy as np import structlog from datapublic.common_fields import CommonFields from datapublic.common_fields import DemographicBucket from datapublic.common_fields import FieldName from datapublic.common...
true
true
f76e42cdd4692551d1efaea3055d59c21b8f84b6
4,127
py
Python
tests/components/smartthings/test_lock.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
tests/components/smartthings/test_lock.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
39
2016-12-16T12:40:34.000Z
2017-02-13T17:53:42.000Z
tests/components/smartthings/test_lock.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
""" Test for the SmartThings lock platform. The only mocking required is of the underlying SmartThings API object so real HTTP calls are not initiated during testing. """ from pysmartthings import Attribute, Capability from pysmartthings.device import Status from homeassistant.components.lock import DOMAIN as LOCK_DO...
36.201754
88
0.70487
from pysmartthings import Attribute, Capability from pysmartthings.device import Status from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN from homeassistant.components.smartthings import lock from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE from homeassistant.helpe...
true
true
f76e436be185dfa033b53ae083867ef111752364
82
py
Python
akshare/other/__init__.py
repos-cl/akshare
94fa42fb095ac4bfa5d8d58673b805d36cc0128e
[ "MIT" ]
5
2020-09-08T02:51:37.000Z
2022-03-23T07:43:45.000Z
akshare/other/__init__.py
repos-cl/akshare
94fa42fb095ac4bfa5d8d58673b805d36cc0128e
[ "MIT" ]
3
2021-01-26T09:31:43.000Z
2021-12-08T08:31:54.000Z
akshare/other/__init__.py
repos-cl/akshare
94fa42fb095ac4bfa5d8d58673b805d36cc0128e
[ "MIT" ]
13
2020-07-08T08:48:33.000Z
2022-03-23T08:37:11.000Z
# -*- coding:utf-8 -*- # /usr/bin/env python """ Date: 2021/5/14 17:52 Desc: """
11.714286
22
0.536585
true
true
f76e436e0974084f1ed096bfb4710abed4e57318
83
py
Python
replace_repeating_chars.py
GYosifov88/Python-Fundamentals
b46ba2822bd2dac6ff46830c6a520e559b448442
[ "MIT" ]
null
null
null
replace_repeating_chars.py
GYosifov88/Python-Fundamentals
b46ba2822bd2dac6ff46830c6a520e559b448442
[ "MIT" ]
null
null
null
replace_repeating_chars.py
GYosifov88/Python-Fundamentals
b46ba2822bd2dac6ff46830c6a520e559b448442
[ "MIT" ]
null
null
null
import re text = input() new_text = re.sub(r"(.)\1+", r"\1",text) print(new_text)
13.833333
40
0.614458
import re text = input() new_text = re.sub(r"(.)\1+", r"\1",text) print(new_text)
true
true
f76e436f1f85b625f6e24dca4754aaa493902f2c
7,012
py
Python
src/faro/FaceWorker.py
amanvell/faro
2c4e5b86406937e1dd3fa9f339cfbca2325d98d6
[ "MIT" ]
null
null
null
src/faro/FaceWorker.py
amanvell/faro
2c4e5b86406937e1dd3fa9f339cfbca2325d98d6
[ "MIT" ]
null
null
null
src/faro/FaceWorker.py
amanvell/faro
2c4e5b86406937e1dd3fa9f339cfbca2325d98d6
[ "MIT" ]
null
null
null
''' MIT License Copyright 2019 Oak Ridge National Laboratory Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
42.240964
123
0.681974
import faro.proto.face_service_pb2 as fsd import faro.proto.geometry_pb2 as geo import faro.proto.proto_types as pt import numpy as np import scipy as sp import scipy.spatial as spat SCORE_L1 = "SCORE_L1" SCORE_L2 = "SCORE_L2" SCORE_DOT = "SCORE_DOT" SCO...
true
true
f76e45a6b9e481876f7d822db9caa0eaec190326
10,169
py
Python
thoughtful_termites/shared/goal_db/db.py
mathsman5133/code-jam-5
629e51e58c640ce088ac7dec182a359e1b5357f5
[ "MIT" ]
2
2019-07-03T18:08:24.000Z
2019-07-03T18:27:18.000Z
thoughtful_termites/shared/goal_db/db.py
RohanJnr/code-jam-5
40e4552b57b09ed3d81cbd47533c2483f8de3bc4
[ "MIT" ]
2
2019-07-02T22:49:19.000Z
2019-07-06T23:51:05.000Z
thoughtful_termites/shared/goal_db/db.py
RohanJnr/code-jam-5
40e4552b57b09ed3d81cbd47533c2483f8de3bc4
[ "MIT" ]
1
2019-06-29T11:27:36.000Z
2019-06-29T11:27:36.000Z
import asyncio import datetime import sqlite3 from functools import partial from pathlib import Path from typing import Union from .goal import Goal from .reminder import Reminder from .reminder_day import ReminderDay from .reminder_time import ReminderTime from .unlocks import Unlock from .farmertown import ( Fa...
30.815152
99
0.607533
import asyncio import datetime import sqlite3 from functools import partial from pathlib import Path from typing import Union from .goal import Goal from .reminder import Reminder from .reminder_day import ReminderDay from .reminder_time import ReminderTime from .unlocks import Unlock from .farmertown import ( Fa...
true
true
f76e46e86e606d4f63f5e64e4a84bb3ed9d8c575
3,203
py
Python
topicModellingWhite.py
ishank-arora/venmo-emoji
209f53b4f90b9d8737c609e6cd5f16d0f5cf25d4
[ "MIT" ]
null
null
null
topicModellingWhite.py
ishank-arora/venmo-emoji
209f53b4f90b9d8737c609e6cd5f16d0f5cf25d4
[ "MIT" ]
null
null
null
topicModellingWhite.py
ishank-arora/venmo-emoji
209f53b4f90b9d8737c609e6cd5f16d0f5cf25d4
[ "MIT" ]
1
2020-07-21T01:13:49.000Z
2020-07-21T01:13:49.000Z
import csv from collections import Counter import emoji from emoji import unicode_codes import pickle import re import pandas import string from num2words import num2words from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.stem import PorterStemmer from nltk.stem import WordNetLemmatize...
28.096491
114
0.703403
import csv from collections import Counter import emoji from emoji import unicode_codes import pickle import re import pandas import string from num2words import num2words from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.stem import PorterStemmer from nltk.stem import WordNetLemmatize...
true
true
f76e473ebc7ec6b7605250357bbbcf206d7411f1
6,895
py
Python
src/Sephrasto/UI/DatenbankEditManoever.py
qeqar/Sephrasto
ce46d46299b2c793f015e25c98908773c39b1dee
[ "MIT" ]
1
2022-02-02T16:15:59.000Z
2022-02-02T16:15:59.000Z
src/Sephrasto/UI/DatenbankEditManoever.py
qeqar/Sephrasto
ce46d46299b2c793f015e25c98908773c39b1dee
[ "MIT" ]
1
2022-01-14T11:04:19.000Z
2022-01-14T11:04:19.000Z
src/Sephrasto/UI/DatenbankEditManoever.py
qeqar/Sephrasto
ce46d46299b2c793f015e25c98908773c39b1dee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'DatenbankEditManoever.ui' # # Created by: PyQt5 UI code generator 5.15.6 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 impor...
53.449612
408
0.702393
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_manDialog(object): def setupUi(self, manDialog): manDialog.setObjectName("manDialog") manDialog.setWindowModality(QtCore.Qt.ApplicationModal) manDialog.resize(440, 550) self.gridLayout_2 = QtWidgets.QGridLayout(manDialog) ...
true
true
f76e475aa5462e3f7981f45fa42c0237b8031f1c
1,529
py
Python
transformer/plugins/test_sanitize_headers.py
jsabak/Transformer
c96ff1bed109f114f7c69143c85ee362e5f518d1
[ "MIT" ]
null
null
null
transformer/plugins/test_sanitize_headers.py
jsabak/Transformer
c96ff1bed109f114f7c69143c85ee362e5f518d1
[ "MIT" ]
null
null
null
transformer/plugins/test_sanitize_headers.py
jsabak/Transformer
c96ff1bed109f114f7c69143c85ee362e5f518d1
[ "MIT" ]
null
null
null
from datetime import datetime from urllib.parse import urlparse from transformer.request import HttpMethod, Header, Request from transformer.task import Task2 from .sanitize_headers import plugin def test_its_name_is_resolvable(): from transformer.plugins import resolve assert list(resolve("transformer.plug...
28.314815
76
0.704382
from datetime import datetime from urllib.parse import urlparse from transformer.request import HttpMethod, Header, Request from transformer.task import Task2 from .sanitize_headers import plugin def test_its_name_is_resolvable(): from transformer.plugins import resolve assert list(resolve("transformer.plug...
true
true
f76e48d5e8e2457e26ada7c9a2d6c827496d5d45
12,437
py
Python
notebooks/label_refinery/imagenet_utils.py
bjlkeng/sandbox
ba1fea113065256d4981a71f7b4bece7299effd1
[ "MIT" ]
158
2017-11-09T14:56:31.000Z
2022-03-26T17:26:20.000Z
notebooks/label_refinery/imagenet_utils.py
iivek/sandbox
c95653618b7be5022b0a8e217a4e5667badb2449
[ "MIT" ]
8
2017-11-28T11:14:46.000Z
2021-05-03T00:23:57.000Z
notebooks/label_refinery/imagenet_utils.py
iivek/sandbox
c95653618b7be5022b0a8e217a4e5667badb2449
[ "MIT" ]
77
2017-11-21T15:27:52.000Z
2022-02-17T16:37:34.000Z
"""Utilities for ImageNet data preprocessing & prediction decoding. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import warnings import numpy as np # from . import get_keras_submodule # backend = get_keras_submodule('backend') # keras_ut...
37.348348
81
0.529629
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import warnings import numpy as np import keras.backend as backend import keras.utils as keras_utils CLASS_INDEX = None CLASS_INDEX_PATH = ('https://s3.amazonaws.com/deep-learning-models/' ...
true
true
f76e48f365f6af90cd621e409366680364813cfb
1,277
py
Python
ipcamstreamer.py
reagames/ipcamstreamer
a0b6782e228659d526c91e12255c9fd62c694471
[ "MIT" ]
null
null
null
ipcamstreamer.py
reagames/ipcamstreamer
a0b6782e228659d526c91e12255c9fd62c694471
[ "MIT" ]
null
null
null
ipcamstreamer.py
reagames/ipcamstreamer
a0b6782e228659d526c91e12255c9fd62c694471
[ "MIT" ]
null
null
null
#ip camera openCV streamer for DLink DCS-932L import cv2 import urllib import numpy as np import sys #stream=urllib.urlopen('http://admin:CmasQp123@192.168.1.46:8088/mjpeg.cgi?user=admin&password=CmasQp123&channel=0&.mjpg') stream=urllib.urlopen('http://admin:CmasQp123@192.168.1.46/mjpeg.cgi?user=admin&password=...
24.557692
122
0.602976
import cv2 import urllib import numpy as np import sys stream=urllib.urlopen('http://admin:CmasQp123@192.168.1.46/mjpeg.cgi?user=admin&password=CmasQp123&channel=0&.mjpg') print(sys.argv) cascPath = sys.argv[1] faceCascade = cv2.CascadeClassifier(cascPath) bytes='' while True: bytes+=stream.read(1024) ...
true
true
f76e4a1e6f5ce2447238e9d57b9f9206227acc81
4,613
py
Python
colour/models/rgb/transfer_functions/itur_bt_1886.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
colour/models/rgb/transfer_functions/itur_bt_1886.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
colour/models/rgb/transfer_functions/itur_bt_1886.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ ITU-R BT.1886 ============= Defines *Recommendation ITU-R BT.1886* electro-optical transfer function (EOTF / EOCF) and its inverse: - :func:`colour.models.eotf_inverse_BT1886` - :func:`colour.models.eotf_BT1886` See Also -------- `RGB Colourspaces Jupyter Notebook <http://nbviewer.jup...
28.475309
79
0.499241
from __future__ import division, unicode_literals import numpy as np from colour.utilities import from_range_1, to_domain_1 __author__ = 'Colour Developers' __copyright__ = 'Copyright (C) 2013-2019 - Colour Developers' __license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause' __maintainer__ = '...
true
true
f76e4a9461695a2f7ca290ee0bae0189c5c38628
18,932
py
Python
toontown/suit/DistributedSellbotBossAI.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
toontown/suit/DistributedSellbotBossAI.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
null
null
null
toontown/suit/DistributedSellbotBossAI.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
1
2020-03-11T17:38:45.000Z
2020-03-11T17:38:45.000Z
import random from toontown.suit import DistributedBossCogAI from toontown.suit import DistributedSuitAI from toontown.suit import SuitDNA from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.fsm import FSM from otp.ai.AIBaseGlobal import * from toontown.battle impo...
38.636735
161
0.650592
import random from toontown.suit import DistributedBossCogAI from toontown.suit import DistributedSuitAI from toontown.suit import SuitDNA from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.fsm import FSM from otp.ai.AIBaseGlobal import * from toontown.battle impo...
true
true
f76e4a9c4e56a7ec34f9d1718e19838e38c54393
14,901
py
Python
cryptoapis/model/list_blockchain_events_subscriptions_e400.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
5
2021-05-17T04:45:03.000Z
2022-03-23T12:51:46.000Z
cryptoapis/model/list_blockchain_events_subscriptions_e400.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
null
null
null
cryptoapis/model/list_blockchain_events_subscriptions_e400.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
2
2021-06-02T07:32:26.000Z
2022-02-12T02:36:23.000Z
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
45.291793
484
0.598215
import re import sys from cryptoapis.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, OpenApiM...
true
true
f76e4ac7cf5ca558108b32c474cddac2a51bd0da
30,619
py
Python
pybamm/expression_tree/binary_operators.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
pybamm/expression_tree/binary_operators.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
pybamm/expression_tree/binary_operators.py
NunoEdgarGFlowHub/PyBaMM
4e4e1ab8c488b0c0a6efdb9934c5ac59e947a190
[ "BSD-3-Clause" ]
null
null
null
# # Binary operator classes # import pybamm import numpy as np import numbers from scipy.sparse import issparse, csr_matrix def is_scalar_zero(expr): """ Utility function to test if an expression evaluates to a constant scalar zero """ if expr.is_constant(): result = expr.evaluate_ignoring_er...
36.149941
88
0.619093
import pybamm import numpy as np import numbers from scipy.sparse import issparse, csr_matrix def is_scalar_zero(expr): if expr.is_constant(): result = expr.evaluate_ignoring_errors(t=None) return isinstance(result, numbers.Number) and result == 0 else: return False def is_matrix_ze...
true
true
f76e4b3d778ec0275d55548ff86cecece6c91652
75
py
Python
history/models.py
valdergallo/raidmanager
8e4877cd2b10de98ba7b1e2c51719b7ff0532858
[ "MIT" ]
null
null
null
history/models.py
valdergallo/raidmanager
8e4877cd2b10de98ba7b1e2c51719b7ff0532858
[ "MIT" ]
4
2016-04-03T12:32:30.000Z
2016-10-31T09:54:42.000Z
manager/models.py
valdergallo/raidmanager
8e4877cd2b10de98ba7b1e2c51719b7ff0532858
[ "MIT" ]
null
null
null
# encoding: utf-8 from django.db import models # Create your models here.
15
28
0.746667
from django.db import models
true
true
f76e4bd35a86f9915d93a2eeeaccfa895344d6c9
546
py
Python
scenario-tests/common/mirror_retrieve.py
fossabot/turicreate
a500d5e52143ad15ebdf771d9f74198982c7c45c
[ "BSD-3-Clause" ]
1
2019-04-16T19:51:18.000Z
2019-04-16T19:51:18.000Z
scenario-tests/common/mirror_retrieve.py
tashby/turicreate
7f07ce795833d0c56c72b3a1fb9339bed6d178d1
[ "BSD-3-Clause" ]
3
2021-09-08T02:18:00.000Z
2022-03-12T00:39:44.000Z
scenario-tests/common/mirror_retrieve.py
tashby/turicreate
7f07ce795833d0c56c72b3a1fb9339bed6d178d1
[ "BSD-3-Clause" ]
null
null
null
import urllib def _raw_urlretrieve(url, target_file, context=None): handle = urllib.urlopen(url)#, context=context) if handle.getcode() >= 300: raise IOError("HTTP Error " + str(handle.getcode())) with open(target_file, 'wb') as output: while True: data = handle.read(1024*1024) ...
28.736842
60
0.598901
import urllib def _raw_urlretrieve(url, target_file, context=None): handle = urllib.urlopen(url) if handle.getcode() >= 300: raise IOError("HTTP Error " + str(handle.getcode())) with open(target_file, 'wb') as output: while True: data = handle.read(1024*1024) if data:...
false
true
f76e4c747254d6deae82347a06ba638e59cb1001
100,193
gyp
Python
grpc.gyp
inteos/grpc
fb8e4556c250bbcc523b55e6ebe69cb2b3d95998
[ "Apache-2.0" ]
null
null
null
grpc.gyp
inteos/grpc
fb8e4556c250bbcc523b55e6ebe69cb2b3d95998
[ "Apache-2.0" ]
null
null
null
grpc.gyp
inteos/grpc
fb8e4556c250bbcc523b55e6ebe69cb2b3d95998
[ "Apache-2.0" ]
null
null
null
# GRPC GYP build file # This file has been automatically generated from a template file. # Please look at the templates directory instead. # This file can be regenerated from the template by running # tools/buildgen/generate_projects.sh # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0...
51.275844
127
0.674668
{ 'variables': { 'openssl_gyp_target%': 'Please Define openssl_gyp_target variable', 'zlib_gyp_target%': 'Please Define zlib_gyp_target variable', 'grpc_gcov%': 'false', 'grpc_alpine%': 'false', }, 'target_defaults': { 'configurations': { 'Release': { 'cflags': [ ...
true
true
f76e4dd125ecb24d61432c27fd5fe10cc151d166
4,612
py
Python
libs/detection_oprations/proposal_opr_csl_tsne.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
36
2020-11-19T07:23:42.000Z
2022-03-30T03:35:57.000Z
libs/detection_oprations/proposal_opr_csl_tsne.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
4
2021-01-30T09:49:10.000Z
2021-12-05T12:49:11.000Z
libs/detection_oprations/proposal_opr_csl_tsne.py
Thinklab-SJTU/DCL_RetinaNet_Tensorflow
1d14c9800c3eb1975e8832978f7a263783d171ec
[ "Apache-2.0" ]
6
2020-11-23T07:54:47.000Z
2021-07-09T07:20:15.000Z
# encoding: utf-8 from libs.configs import cfgs from libs.box_utils import bbox_transform from libs.box_utils import nms_rotate import tensorflow as tf import numpy as np from libs.box_utils.coordinate_convert import coordinate_present_convert, coords_regular def postprocess_detctions(rpn_bbox_pred, rpn_cls_prob, rp...
46.12
119
0.595186
from libs.configs import cfgs from libs.box_utils import bbox_transform from libs.box_utils import nms_rotate import tensorflow as tf import numpy as np from libs.box_utils.coordinate_convert import coordinate_present_convert, coords_regular def postprocess_detctions(rpn_bbox_pred, rpn_cls_prob, rpn_angle_prob, rpn_...
true
true
f76e4e8011ab7849933ef3638bc9988f08a40f23
62,386
py
Python
env/lib/python2.7/site-packages/rest_framework/fields.py
Unchuris/blackmarket
3397335b708d49baa2f551356c2d2b786a7d2a13
[ "BSD-3-Clause" ]
null
null
null
env/lib/python2.7/site-packages/rest_framework/fields.py
Unchuris/blackmarket
3397335b708d49baa2f551356c2d2b786a7d2a13
[ "BSD-3-Clause" ]
null
null
null
env/lib/python2.7/site-packages/rest_framework/fields.py
Unchuris/blackmarket
3397335b708d49baa2f551356c2d2b786a7d2a13
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import collections import copy import datetime import decimal import inspect import json import re import uuid from collections import OrderedDict from django.conf import settings from django.core.exceptions import ValidationError as DjangoValidationError from django.core.excep...
36.355478
127
0.62264
from __future__ import unicode_literals import collections import copy import datetime import decimal import inspect import json import re import uuid from collections import OrderedDict from django.conf import settings from django.core.exceptions import ValidationError as DjangoValidationError from django.core.excep...
true
true
f76e4ef835937b522408761059b060da3e7efe89
3,401
py
Python
pyxform/tests/xform2json_test.py
seadowg/pyxform
038318c9a20303b45c7722466a550a0526a78da9
[ "BSD-2-Clause" ]
1
2020-10-19T15:37:36.000Z
2020-10-19T15:37:36.000Z
pyxform/tests/xform2json_test.py
seadowg/pyxform
038318c9a20303b45c7722466a550a0526a78da9
[ "BSD-2-Clause" ]
1
2022-03-16T13:48:25.000Z
2022-03-17T07:33:15.000Z
pyxform/tests/xform2json_test.py
seadowg/pyxform
038318c9a20303b45c7722466a550a0526a78da9
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Test xform2json module. """ import os from xml.etree.ElementTree import ParseError from unittest2 import TestCase from pyxform.builder import create_survey_from_path from pyxform.tests import utils from pyxform.tests_v1.pyxform_test_case import PyxformTestCase from pyxform.xform2json impor...
34.353535
80
0.629521
import os from xml.etree.ElementTree import ParseError from unittest2 import TestCase from pyxform.builder import create_survey_from_path from pyxform.tests import utils from pyxform.tests_v1.pyxform_test_case import PyxformTestCase from pyxform.xform2json import _try_parse, create_survey_element_from_xml class Dum...
true
true
f76e4f370919a38ac9a0c382afaa63d9e3c789ca
11,963
py
Python
sktime/forecasting/base/adapters/_pmdarima.py
mikofski/sktime
87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7
[ "BSD-3-Clause" ]
1
2019-12-23T16:57:14.000Z
2019-12-23T16:57:14.000Z
sktime/forecasting/base/adapters/_pmdarima.py
mikofski/sktime
87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7
[ "BSD-3-Clause" ]
null
null
null
sktime/forecasting/base/adapters/_pmdarima.py
mikofski/sktime
87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # !/usr/bin/env python3 -u # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Implements adapter for pmdarima forecasters to be used in sktime framework.""" __author__ = ["mloning", "hyang1996", "kejsitake", "fkiraly"] __all__ = ["_PmdArimaAdapter"] import pandas as pd ...
37.037152
87
0.591323
__author__ = ["mloning", "hyang1996", "kejsitake", "fkiraly"] __all__ = ["_PmdArimaAdapter"] import pandas as pd from sktime.forecasting.base import BaseForecaster from sktime.forecasting.base._base import DEFAULT_ALPHA class _PmdArimaAdapter(BaseForecaster): _tags = { "ignores-exogeneous-X": False, ...
true
true
f76e4f5a2ceaf00d7312b80b7f105ce3e73ff057
11,830
py
Python
test/test_grade.py
nalderto/otter-grader
a4714bf48df07b7eb8b3c41530ce7a778fd42c98
[ "BSD-3-Clause" ]
null
null
null
test/test_grade.py
nalderto/otter-grader
a4714bf48df07b7eb8b3c41530ce7a778fd42c98
[ "BSD-3-Clause" ]
null
null
null
test/test_grade.py
nalderto/otter-grader
a4714bf48df07b7eb8b3c41530ce7a778fd42c98
[ "BSD-3-Clause" ]
null
null
null
################################# ##### Tests for otter grade ##### ################################# import os import unittest import subprocess import json import re import pandas as pd from unittest import mock from subprocess import PIPE from glob import glob from otter.argparser import get_parser from otter.gra...
40.793103
140
0.598986
import os import unittest import subprocess import json import re import pandas as pd from unittest import mock from subprocess import PIPE from glob import glob from otter.argparser import get_parser from otter.grade import main as grade from otter.grade.metadata import GradescopeParser, CanvasParser, JSONParser, Y...
true
true
f76e4f852877274791c7417e8b8ee36eb799c112
1,354
py
Python
Problems/2/return_kth_to_last/kth_to_last.py
weezybusy/Cracking-the-Coding-Interview
22b8f62c97781ea5aa388434d75ad5abde42c85a
[ "MIT" ]
null
null
null
Problems/2/return_kth_to_last/kth_to_last.py
weezybusy/Cracking-the-Coding-Interview
22b8f62c97781ea5aa388434d75ad5abde42c85a
[ "MIT" ]
null
null
null
Problems/2/return_kth_to_last/kth_to_last.py
weezybusy/Cracking-the-Coding-Interview
22b8f62c97781ea5aa388434d75ad5abde42c85a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Return Kth to Last: Implement an algorithm to find the kth to last element of a singly linked list. """ from singly_linked_list import Node, SinglyLinkedList # Time complexity: O(n). # Space complexity: O(1). def kth_to_last(lst, k): """This solution implies that the singly linked ...
22.196721
76
0.585672
from singly_linked_list import Node, SinglyLinkedList def kth_to_last(lst, k): if k < 0 or k > lst.size - 1: return None n = lst.size - k - 1 node = lst.head for i in range(n): node = node.next return node def kth_to_last_alt(lst, k): node = lst.head size = 0 whil...
true
true
f76e5008e7ce2813e35e9a0eae77676667827994
1,085
py
Python
mayan/apps/metadata/migrations/0007_auto_20150918_0800.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
1
2021-06-17T18:24:25.000Z
2021-06-17T18:24:25.000Z
mayan/apps/metadata/migrations/0007_auto_20150918_0800.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
7
2020-06-06T00:01:04.000Z
2022-01-13T01:47:17.000Z
mayan/apps/metadata/migrations/0007_auto_20150918_0800.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
1
2020-07-29T21:03:27.000Z
2020-07-29T21:03:27.000Z
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('metadata', '0006_auto_20150820_0616'), ] operations = [ migrations.AlterField( model_name='metadatatype', name='parser', ...
31
76
0.494931
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('metadata', '0006_auto_20150820_0616'), ] operations = [ migrations.AlterField( model_name='metadatatype', name='parser', ...
true
true
f76e515c23f794e1cc2335e610812f4591b88ccd
822
py
Python
bos.py
IlyaLyamin/projekt-Ailen
03ccfa6d600befe648395c12ec1e64c25071faac
[ "MIT" ]
null
null
null
bos.py
IlyaLyamin/projekt-Ailen
03ccfa6d600befe648395c12ec1e64c25071faac
[ "MIT" ]
null
null
null
bos.py
IlyaLyamin/projekt-Ailen
03ccfa6d600befe648395c12ec1e64c25071faac
[ "MIT" ]
null
null
null
import pygame import random class Bos(pygame.sprite.Sprite): def __init__(self, screen, lvl): super(Bos, self).__init__() self.lvl = lvl self.screen = screen if lvl == 1: self.image = pygame.image.load("дизайн/инопланетяни, бонцсы и т.д/bos_1_.png") if lvl == 2...
32.88
90
0.582725
import pygame import random class Bos(pygame.sprite.Sprite): def __init__(self, screen, lvl): super(Bos, self).__init__() self.lvl = lvl self.screen = screen if lvl == 1: self.image = pygame.image.load("дизайн/инопланетяни, бонцсы и т.д/bos_1_.png") if lvl == 2...
true
true
f76e517538eaaea7534be6334f471115b1d19675
1,109
py
Python
armi/materials/tests/test_sulfur.py
mgjarrett/armi
ba68e30961b78ebda7004eb1a62fe6d62480c5d2
[ "Apache-2.0" ]
null
null
null
armi/materials/tests/test_sulfur.py
mgjarrett/armi
ba68e30961b78ebda7004eb1a62fe6d62480c5d2
[ "Apache-2.0" ]
null
null
null
armi/materials/tests/test_sulfur.py
mgjarrett/armi
ba68e30961b78ebda7004eb1a62fe6d62480c5d2
[ "Apache-2.0" ]
null
null
null
""" Tests for sulfur. """ import unittest from armi.materials.tests.test_materials import _Material_Test from armi.materials.sulfur import Sulfur class Sulfur_TestCase(_Material_Test, unittest.TestCase): MAT_CLASS = Sulfur def setUp(self): _Material_Test.setUp(self) self.mat = Sulfur() ...
26.404762
81
0.701533
import unittest from armi.materials.tests.test_materials import _Material_Test from armi.materials.sulfur import Sulfur class Sulfur_TestCase(_Material_Test, unittest.TestCase): MAT_CLASS = Sulfur def setUp(self): _Material_Test.setUp(self) self.mat = Sulfur() self.Sulfur_sulfur_de...
true
true
f76e51b7182e5213010ec118351519f90e183341
3,738
py
Python
Applications/ParaView/Testing/Python/DisconnectAndSaveAnimation.py
cjh1/ParaView
b0eba067c87078d5fe56ec3cb21447f149e1f31a
[ "BSD-3-Clause" ]
null
null
null
Applications/ParaView/Testing/Python/DisconnectAndSaveAnimation.py
cjh1/ParaView
b0eba067c87078d5fe56ec3cb21447f149e1f31a
[ "BSD-3-Clause" ]
null
null
null
Applications/ParaView/Testing/Python/DisconnectAndSaveAnimation.py
cjh1/ParaView
b0eba067c87078d5fe56ec3cb21447f149e1f31a
[ "BSD-3-Clause" ]
null
null
null
#/usr/bin/env python import QtTesting import QtTestingImage object1 = 'pqClientMainWindow/menubar/menuSources' QtTesting.playCommand(object1, 'activate', 'SphereSource') object2 = 'pqClientMainWindow/objectInspectorDock/objectInspector/Accept' QtTesting.playCommand(object2, 'activate', '') object3 = 'pqClientMainWind...
57.507692
140
0.822097
import QtTesting import QtTestingImage object1 = 'pqClientMainWindow/menubar/menuSources' QtTesting.playCommand(object1, 'activate', 'SphereSource') object2 = 'pqClientMainWindow/objectInspectorDock/objectInspector/Accept' QtTesting.playCommand(object2, 'activate', '') object3 = 'pqClientMainWindow/centralwidget/Mult...
false
true
f76e528a6ab13ec319ce7050ad4ac584aef361c7
1,061
py
Python
four_to_two.py
quanticle/markdown_tools
98545720a3e615dda376c60ae036f00a14006ac0
[ "MIT" ]
null
null
null
four_to_two.py
quanticle/markdown_tools
98545720a3e615dda376c60ae036f00a14006ac0
[ "MIT" ]
null
null
null
four_to_two.py
quanticle/markdown_tools
98545720a3e615dda376c60ae036f00a14006ac0
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # four_to_two is a little script that takes markdown text with 4-space indents on stdin and writes 2-space indented # markdown on stdout import math import re import sys BEGINNING_WHITESPACE_RE = re.compile(r'^(\s+)(.*)') def four_to_two(line): match = BEGINNING_WHITESPACE_RE.match(line...
27.921053
116
0.65033
import math import re import sys BEGINNING_WHITESPACE_RE = re.compile(r'^(\s+)(.*)') def four_to_two(line): match = BEGINNING_WHITESPACE_RE.match(line) if match: beginning_space_count = len(match.group(1)) indent_level = math.floor(beginning_space_count / 4) new_indent = ' ' * inden...
true
true
f76e528c4bea6a0330841592705ebe05f66dc7dd
503
py
Python
Ex029.py
iRnx/Programas-em-Python-part-1
adafef8643f17f5d6cc7f5ed77529494c5af0c55
[ "MIT" ]
3
2021-08-01T04:29:01.000Z
2021-09-07T01:39:29.000Z
Ex029.py
iRnx/Programas-em-Python
1112ecea27fb13dca35873790bc71895ec80fc67
[ "MIT" ]
null
null
null
Ex029.py
iRnx/Programas-em-Python
1112ecea27fb13dca35873790bc71895ec80fc67
[ "MIT" ]
null
null
null
""" Escreva um programa que leia a velocidade de um carro. se ele ultrapassar 80km/h, mostre uma mensagem dizendo que ele foi multado. A multa vai custar R$7,00 por cada km acima do limite. """ velocidade = float(input('Qual a velocidade atual do carro? ')) if velocidade > 80: print('MULTADO! você excedeu ...
35.928571
76
0.691849
velocidade = float(input('Qual a velocidade atual do carro? ')) if velocidade > 80: print('MULTADO! você excedeu o limite permitido que é de 80Km/h') multa = (velocidade - 80) * 7 print(f'Você deve pagar uma multa de R${multa:.2f}') print('Tenha um Bom Dia! Dirija com segurança!')
true
true
f76e52a3542302cf8fed9d97d333be6aa5aaf194
217
py
Python
stackexchange/pagination.py
mavroprovato/stackexchange-django
30d7196efc89cac23e4ad17416199564638d453e
[ "MIT" ]
null
null
null
stackexchange/pagination.py
mavroprovato/stackexchange-django
30d7196efc89cac23e4ad17416199564638d453e
[ "MIT" ]
null
null
null
stackexchange/pagination.py
mavroprovato/stackexchange-django
30d7196efc89cac23e4ad17416199564638d453e
[ "MIT" ]
null
null
null
from rest_framework import pagination class Pagination(pagination.PageNumberPagination): """The default pagination class """ page_size = 30 page_size_query_param = 'pagesize' max_page_size = 100
21.7
50
0.737327
from rest_framework import pagination class Pagination(pagination.PageNumberPagination): page_size = 30 page_size_query_param = 'pagesize' max_page_size = 100
true
true
f76e54b2339e5ec1a6034ea109348762f7ad94d8
9,301
py
Python
pybind/slxos/v17r_2_00/tm_state/cngn_mon_del_pkt/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v17r_2_00/tm_state/cngn_mon_del_pkt/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v17r_2_00/tm_state/cngn_mon_del_pkt/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
55.363095
471
0.741426
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
f76e5572e8cb52c01b0723f13338cc364f6e2be8
1,783
py
Python
azure/durable_functions/tasks/task_any.py
priyaananthasankar/azure-functions-durable-python-1
5494962583ff12794d3c856f098e0bded8d74069
[ "MIT" ]
null
null
null
azure/durable_functions/tasks/task_any.py
priyaananthasankar/azure-functions-durable-python-1
5494962583ff12794d3c856f098e0bded8d74069
[ "MIT" ]
null
null
null
azure/durable_functions/tasks/task_any.py
priyaananthasankar/azure-functions-durable-python-1
5494962583ff12794d3c856f098e0bded8d74069
[ "MIT" ]
null
null
null
from azure.durable_functions.models.actions.WhenAnyAction import WhenAnyAction from azure.durable_functions.models.ReplaySchema import ReplaySchema from ..models.TaskSet import TaskSet def task_any(tasks, replay_schema: ReplaySchema): """Determine whether any of the given tasks is completed. Parameters -...
34.288462
98
0.665171
from azure.durable_functions.models.actions.WhenAnyAction import WhenAnyAction from azure.durable_functions.models.ReplaySchema import ReplaySchema from ..models.TaskSet import TaskSet def task_any(tasks, replay_schema: ReplaySchema): all_actions = [] completed_tasks = [] faulted_tasks = [] error_mess...
true
true
f76e56a519eb8daba2d0d35f63804ba67d53b931
272
py
Python
setup.py
kennknowles/python-either
597fe546fc1aece4f6bed50dbf43a1217da549f9
[ "Apache-2.0" ]
13
2015-06-21T13:09:57.000Z
2021-04-22T07:34:35.000Z
setup.py
kennknowles/python-either
597fe546fc1aece4f6bed50dbf43a1217da549f9
[ "Apache-2.0" ]
null
null
null
setup.py
kennknowles/python-either
597fe546fc1aece4f6bed50dbf43a1217da549f9
[ "Apache-2.0" ]
1
2017-08-24T11:01:33.000Z
2017-08-24T11:01:33.000Z
import setuptools setuptools.setup( name = "either", version = "0.1", url = "https://github.com/kennknowles/python-either", maintainer = "Kenneth Knowles", maintainer_email = "kenn.knowles@gmail.com", packages = setuptools.find_packages())
27.2
57
0.661765
import setuptools setuptools.setup( name = "either", version = "0.1", url = "https://github.com/kennknowles/python-either", maintainer = "Kenneth Knowles", maintainer_email = "kenn.knowles@gmail.com", packages = setuptools.find_packages())
true
true
f76e56b1a7d29252cd5038b751d55acc7819b280
20,878
py
Python
indy_common/types.py
ryMarsh44/indy-node
5a68647240decaebc95f765f4120f593dac4cf3b
[ "Apache-2.0" ]
2
2020-06-11T08:46:59.000Z
2020-06-11T10:06:17.000Z
indy_common/types.py
ryMarsh44/indy-node
5a68647240decaebc95f765f4120f593dac4cf3b
[ "Apache-2.0" ]
null
null
null
indy_common/types.py
ryMarsh44/indy-node
5a68647240decaebc95f765f4120f593dac4cf3b
[ "Apache-2.0" ]
null
null
null
import json from copy import deepcopy from hashlib import sha256 from plenum.common.constants import TARGET_NYM, NONCE, RAW, ENC, HASH, NAME, \ VERSION, FORCE, ORIGIN, OPERATION_SCHEMA_IS_STRICT, OP_VER from plenum.common.messages.client_request import ClientMessageValidator as PClientMessageValidator from plenum....
38.591497
119
0.698678
import json from copy import deepcopy from hashlib import sha256 from plenum.common.constants import TARGET_NYM, NONCE, RAW, ENC, HASH, NAME, \ VERSION, FORCE, ORIGIN, OPERATION_SCHEMA_IS_STRICT, OP_VER from plenum.common.messages.client_request import ClientMessageValidator as PClientMessageValidator from plenum....
true
true
f76e56d88c2131308c3f394975ad0790b10fce38
4,965
py
Python
hogar/Jobs/Reminder.py
SamSoneyC/datix1
a8cf4b6a6b508e5e86d26dd5cbd55add560d26a5
[ "MIT" ]
57
2015-06-27T21:29:49.000Z
2021-09-08T16:35:27.000Z
hogar/Jobs/Reminder.py
SamSoneyC/datix1
a8cf4b6a6b508e5e86d26dd5cbd55add560d26a5
[ "MIT" ]
3
2015-07-01T20:02:04.000Z
2015-08-17T04:22:42.000Z
hogar/Jobs/Reminder.py
SamSoneyC/datix1
a8cf4b6a6b508e5e86d26dd5cbd55add560d26a5
[ "MIT" ]
16
2015-06-29T22:06:28.000Z
2021-09-21T15:34:59.000Z
# The MIT License (MIT) # # Copyright (c) 2015 Leon Jacobs # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modif...
31.424051
104
0.603223
import traceback import json from datetime import datetime from dateutil.rrule import rrulestr from hogar.Utils import Telegram from hogar.Models.RemindOnce import RemindOnce from hogar.Models.RemindRecurring import RemindRecurring import logging logger = logging.getLogger(__name__) def _get_sender_information (me...
false
true
f76e57b737483960c7b4c53507523b2fe6349169
16,674
py
Python
nova/api/openstack/compute/server_metadata.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/server_metadata.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/api/openstack/compute/server_metadata.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
2
2017-07-20T17:31:34.000Z
2020-07-24T02:42:19.000Z
begin_unit comment|'# Copyright 2011 OpenStack Foundation' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' co...
12.796623
88
0.606693
begin_unit comment|'# Copyright 2011 OpenStack Foundation' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' co...
false
true
f76e588a0880a171eedc5d0680292430dc4136f1
5,932
py
Python
tests/executors/test_celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
1
2016-12-22T00:34:58.000Z
2016-12-22T00:34:58.000Z
tests/executors/test_celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
21
2016-06-27T15:25:06.000Z
2017-11-23T17:41:04.000Z
tests/executors/test_celery_executor.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
3
2021-02-23T07:52:47.000Z
2021-03-02T06:33:44.000Z
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
40.353741
91
0.670094
import sys import unittest from multiprocessing import Pool import mock from celery.contrib.testing.worker import start_worker import pytest from celery import states as celery_states from airflow.executors import celery_executor from airflow.executors.celery_executor import (CeleryExecutor, celery_configuration, ...
true
true
f76e58fbdcaeb815a14be7a06c8677293fcfa032
2,171
py
Python
paprika/repositories/FilePropertyRepository.py
thunder-/paprika
af262407ec9c195dbb5a7c205510e6ad2fb65f36
[ "MIT" ]
null
null
null
paprika/repositories/FilePropertyRepository.py
thunder-/paprika
af262407ec9c195dbb5a7c205510e6ad2fb65f36
[ "MIT" ]
null
null
null
paprika/repositories/FilePropertyRepository.py
thunder-/paprika
af262407ec9c195dbb5a7c205510e6ad2fb65f36
[ "MIT" ]
null
null
null
from paprika.repositories.Repository import Repository from paprika.connectors.Helper import Helper class FilePropertyRepository(Repository): def __init__(self, connector): Repository.__init__(self, connector) def get_property(self, file, name): connection = self.get_connection() curs...
31.463768
103
0.6269
from paprika.repositories.Repository import Repository from paprika.connectors.Helper import Helper class FilePropertyRepository(Repository): def __init__(self, connector): Repository.__init__(self, connector) def get_property(self, file, name): connection = self.get_connection() curs...
true
true
f76e592262c5373dc549385fb8795c89a1350ceb
67,126
py
Python
python/ccxt/bitfinex.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
python/ccxt/bitfinex.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
python/ccxt/bitfinex.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import Authenticati...
44.454305
426
0.510875
from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadSymbol from ccxt.base.errors import Insufficie...
true
true
f76e5a495c0c59bafa10889087fb40e7c0860c07
457
py
Python
devilry/devilry_qualifiesforexam_plugin_points/apps.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
29
2015-01-18T22:56:23.000Z
2020-11-10T21:28:27.000Z
devilry/devilry_qualifiesforexam_plugin_points/apps.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
786
2015-01-06T16:10:18.000Z
2022-03-16T11:10:50.000Z
devilry/devilry_qualifiesforexam_plugin_points/apps.py
aless80/devilry-django
416c262e75170d5662542f15e2d7fecf5ab84730
[ "BSD-3-Clause" ]
15
2015-04-06T06:18:43.000Z
2021-02-24T12:28:30.000Z
# -*- coding: utf-8 -*- # Django imports from django.apps import AppConfig class DevilryQualifiesForExamPointsAppConfig(AppConfig): name = 'devilry.devilry_qualifiesforexam_plugin_points' verbose_name = 'Devilry qualifies for exam plugin points' def ready(self): from devilry.devilry_qualifiesfo...
28.5625
75
0.757112
from django.apps import AppConfig class DevilryQualifiesForExamPointsAppConfig(AppConfig): name = 'devilry.devilry_qualifiesforexam_plugin_points' verbose_name = 'Devilry qualifies for exam plugin points' def ready(self): from devilry.devilry_qualifiesforexam import plugintyperegistry f...
true
true
f76e5da0ad156886943173fb48c889a3dd425366
684
py
Python
config.py
sedexdev/scramble-api-frontend
2e79377bee4d86cf9cf95904e830afb40b6a299d
[ "MIT" ]
null
null
null
config.py
sedexdev/scramble-api-frontend
2e79377bee4d86cf9cf95904e830afb40b6a299d
[ "MIT" ]
6
2021-05-11T09:32:49.000Z
2021-05-19T14:53:26.000Z
config.py
sedexdev/scramble-api-frontend
2e79377bee4d86cf9cf95904e830afb40b6a299d
[ "MIT" ]
null
null
null
import os base_dir = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False CSRF_ENABLE = True SECRET_KEY = os.environ['SECRET_KEY'] API_URL = os.environ['API_URL'] class TestingConfig(Config): TESTING = True class DevelopmentConfig(Config): DEVE...
19.542857
53
0.714912
import os base_dir = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False CSRF_ENABLE = True SECRET_KEY = os.environ['SECRET_KEY'] API_URL = os.environ['API_URL'] class TestingConfig(Config): TESTING = True class DevelopmentConfig(Config): DEVE...
true
true
f76e5db0443269da475f9051879620f20dedf967
47,662
py
Python
pecos/core/base.py
cjhsieh/pecos
22e88ee544d5a5e891a1d23a578881fdf26dfcf7
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-07-10T08:02:37.000Z
2021-07-10T08:02:37.000Z
pecos/core/base.py
QPC-database/pecos
6d5a657945f0a70f13dcf3afec224713cd2deb4d
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
pecos/core/base.py
QPC-database/pecos
6d5a657945f0a70f13dcf3afec224713cd2deb4d
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-07-06T11:14:16.000Z
2021-07-06T11:14:16.000Z
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance # with the License. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acco...
36.634896
143
0.597163
import copy import ctypes import logging import os from ctypes import ( CDLL, CFUNCTYPE, POINTER, byref, c_bool, c_char_p, c_double, c_float, c_int, c_int32, c_uint32, c_uint64, c_void_p, cast, ) from glob import glob from subprocess import check_output import nu...
true
true
f76e5e384038b024d981f80e59c8852c6ca4fff0
9,715
py
Python
salt/states/postgres_user.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
9,425
2015-01-01T05:59:24.000Z
2022-03-31T20:44:05.000Z
salt/states/postgres_user.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
33,507
2015-01-01T00:19:56.000Z
2022-03-31T23:48:20.000Z
salt/states/postgres_user.py
babs/salt
c536ea716d5308880b244e7980f4b659d86fc104
[ "Apache-2.0" ]
5,810
2015-01-01T19:11:45.000Z
2022-03-31T02:37:20.000Z
""" Management of PostgreSQL users (roles) ====================================== The postgres_users module is used to create and manage Postgres users. .. code-block:: yaml frank: postgres_user.present """ import datetime import logging # Salt imports from salt.modules import postgres log = logging.get...
29
87
0.586722
import datetime import logging from salt.modules import postgres log = logging.getLogger(__name__) def __virtual__(): if "postgres.user_exists" not in __salt__: return ( False, "Unable to load postgres module. Make sure `postgres.bins_dir` is set.", ) return True ...
true
true
f76e5e723c96054ba019476bbb15287380619d9c
538
py
Python
email_user/migrations/0004_emailuser_language.py
hanaahajj/Serviceinfo_hanaa
829de07b39fbf17c102799edb9d48a88b11a7540
[ "BSD-3-Clause" ]
null
null
null
email_user/migrations/0004_emailuser_language.py
hanaahajj/Serviceinfo_hanaa
829de07b39fbf17c102799edb9d48a88b11a7540
[ "BSD-3-Clause" ]
null
null
null
email_user/migrations/0004_emailuser_language.py
hanaahajj/Serviceinfo_hanaa
829de07b39fbf17c102799edb9d48a88b11a7540
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('email_user', '0003_emailuser_activation_key'), ] operations = [ migrations.AddField( model_name='emailuser', ...
25.619048
139
0.635688
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('email_user', '0003_emailuser_activation_key'), ] operations = [ migrations.AddField( model_name='emailuser', name='language'...
true
true
f76e5e886a5952bb4d13e9dbedb93eaa8d3430c9
317
py
Python
doubleledger/config/desktop.py
hrgadesha/doubleledger
3d1c5f91f1d6bd0f352890364231ee2f37f84d9b
[ "MIT" ]
11
2020-06-09T16:17:16.000Z
2022-03-19T16:30:11.000Z
doubleledger/config/desktop.py
hrgadesha/doubleledger
3d1c5f91f1d6bd0f352890364231ee2f37f84d9b
[ "MIT" ]
1
2021-04-15T08:56:35.000Z
2021-04-16T09:55:03.000Z
doubleledger/config/desktop.py
hrgadesha/doubleledger
3d1c5f91f1d6bd0f352890364231ee2f37f84d9b
[ "MIT" ]
10
2019-07-30T06:24:09.000Z
2020-05-07T08:48:16.000Z
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Double Ledger Management", "category": "Modules", "label": _("Double Ledger Management"), "color": "blue", "icon": "octicon octicon-book", "type": "module", "onboard_present": 1 } ]
19.8125
45
0.640379
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Double Ledger Management", "category": "Modules", "label": _("Double Ledger Management"), "color": "blue", "icon": "octicon octicon-book", "type": "module", "onboard_present": 1 } ]
true
true
f76e5f111b4d66b095f82693f15b6af7291fa074
1,919
py
Python
TamilBots/modules/song.py
serxan22/drakulasongbottelegram
de01cce9d3f51bf804ea3d7f87f8bdbb19fdc2bc
[ "MIT" ]
null
null
null
TamilBots/modules/song.py
serxan22/drakulasongbottelegram
de01cce9d3f51bf804ea3d7f87f8bdbb19fdc2bc
[ "MIT" ]
null
null
null
TamilBots/modules/song.py
serxan22/drakulasongbottelegram
de01cce9d3f51bf804ea3d7f87f8bdbb19fdc2bc
[ "MIT" ]
null
null
null
from pyrogram import Client, filters import asyncio import os from pytube import YouTube from pyrogram.types import InlineKeyboardMarkup from pyrogram.types import InlineKeyboardButton from youtubesearchpython import VideosSearch from TamilBots.TamilBots import ignore_blacklisted_users, get_arg from TamilBots import ap...
33.086207
83
0.677436
from pyrogram import Client, filters import asyncio import os from pytube import YouTube from pyrogram.types import InlineKeyboardMarkup from pyrogram.types import InlineKeyboardButton from youtubesearchpython import VideosSearch from TamilBots.TamilBots import ignore_blacklisted_users, get_arg from TamilBots import ap...
true
true
f76e5f823788a52d3c883cad26c4d64ca0290e0f
4,879
py
Python
tensorflow/contrib/learn/python/learn/dataframe/transforms/batch.py
breandan/tensorflow
7509bad95200e1baed4eb488dbeaaa2c505a2824
[ "Apache-2.0" ]
4
2016-09-26T08:55:23.000Z
2019-05-06T15:26:03.000Z
tensorflow/contrib/learn/python/learn/dataframe/transforms/batch.py
breandan/tensorflow
7509bad95200e1baed4eb488dbeaaa2c505a2824
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/learn/python/learn/dataframe/transforms/batch.py
breandan/tensorflow
7509bad95200e1baed4eb488dbeaaa2c505a2824
[ "Apache-2.0" ]
8
2017-04-17T23:39:12.000Z
2019-05-11T14:06:31.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.613139
80
0.655462
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.learn.python.learn.dataframe import transform from tensorflow.python.training import input as input_ops class AbstractBatchTransform(transform.Transform): def __init__(self, ...
true
true
f76e5f9bf6fe626e09fbe39b204856be5432e445
37,560
py
Python
AdjustAnchors.roboFontExt/lib/AdjustAnchors.py
benkiel/robofont-extensions
3c84edb81c6524d64454211962fccb7d57bbd9e8
[ "MIT" ]
1
2019-01-22T22:55:01.000Z
2019-01-22T22:55:01.000Z
AdjustAnchors.roboFontExt/lib/AdjustAnchors.py
benkiel/robofont-extensions
3c84edb81c6524d64454211962fccb7d57bbd9e8
[ "MIT" ]
null
null
null
AdjustAnchors.roboFontExt/lib/AdjustAnchors.py
benkiel/robofont-extensions
3c84edb81c6524d64454211962fccb7d57bbd9e8
[ "MIT" ]
null
null
null
# Copyright 2015 Adobe. All rights reserved. # TODO: # add support for ligatures # add support for accents with multiple anchors # - this will require significant changes to the WriteFeaturesMarkFDK module from itertools import product from mojo.roboFont import CurrentFont, CurrentGlyph, RGlyph, AllFonts from mojo.ro...
44.13631
79
0.565735
from itertools import product from mojo.roboFont import CurrentFont, CurrentGlyph, RGlyph, AllFonts from mojo.roboFont import version as roboFontVersion from mojo.drawingTools import (newPath, moveTo, lineTo, curveTo, closePath, drawPath, translate, fill, strokeWidth) from mojo.events i...
true
true
f76e62f633ee4756bceb2b59571fc2b4c0dc2edb
4,577
py
Python
kgcnn/literature/GAT.py
thegodone/gcnn_keras
2009b9ab9a07c1a369849478812fcc2cb9799945
[ "MIT" ]
null
null
null
kgcnn/literature/GAT.py
thegodone/gcnn_keras
2009b9ab9a07c1a369849478812fcc2cb9799945
[ "MIT" ]
null
null
null
kgcnn/literature/GAT.py
thegodone/gcnn_keras
2009b9ab9a07c1a369849478812fcc2cb9799945
[ "MIT" ]
null
null
null
import tensorflow as tf import tensorflow.keras as ks from kgcnn.layers.casting import ChangeTensorType from kgcnn.layers.conv.attention import AttentionHeadGAT from kgcnn.layers.keras import Concatenate, Dense, Average, Activation from kgcnn.layers.mlp import MLP from kgcnn.layers.pool.pooling import PoolingNodes fro...
48.691489
120
0.63251
import tensorflow as tf import tensorflow.keras as ks from kgcnn.layers.casting import ChangeTensorType from kgcnn.layers.conv.attention import AttentionHeadGAT from kgcnn.layers.keras import Concatenate, Dense, Average, Activation from kgcnn.layers.mlp import MLP from kgcnn.layers.pool.pooling import PoolingNodes fro...
true
true
f76e6489c4f9bbc35b75439e5738cc009c7e7f1a
1,593
py
Python
nonebot_plugin_blackwhite_japanese/configs_manager.py
RainChain-Zero/Jasmine_Nonebot2_Plugins_Center
40e78f01bf020faa66dcffe76070fe8a24687e1b
[ "MIT" ]
1
2022-03-29T16:12:43.000Z
2022-03-29T16:12:43.000Z
nonebot_plugin_blackwhite_japanese/configs_manager.py
RainChain-Zero/Jasmine_Nonebot2_Plugins_Center
40e78f01bf020faa66dcffe76070fe8a24687e1b
[ "MIT" ]
1
2022-03-30T02:36:12.000Z
2022-03-30T08:50:04.000Z
nonebot_plugin_blackwhite_japanese/configs_manager.py
RainChain-Zero/Jasmine_Nonebot2_Plugins_Center
40e78f01bf020faa66dcffe76070fe8a24687e1b
[ "MIT" ]
null
null
null
from typing import Optional, Any from .data_class import StaticData from pathlib import Path from ruamel.yaml import YAML yaml = YAML(typ="safe") class ConfigsManager(StaticData): """ 插件配置 与 资源 管理器 """ def __init__(self, file: Path): self.file = file super().__init__(file) se...
24.136364
68
0.531701
from typing import Optional, Any from .data_class import StaticData from pathlib import Path from ruamel.yaml import YAML yaml = YAML(typ="safe") class ConfigsManager(StaticData): def __init__(self, file: Path): self.file = file super().__init__(file) self._resource_data = {} def ad...
true
true
f76e64e3e924193d22629a96efdc13845de3d5c6
874
py
Python
OpenCV/hsv_trackbar.py
jiyeqian/demo
a0ce6493b63d8a86641fd224feb5dc77fa86a7ac
[ "BSD-3-Clause" ]
null
null
null
OpenCV/hsv_trackbar.py
jiyeqian/demo
a0ce6493b63d8a86641fd224feb5dc77fa86a7ac
[ "BSD-3-Clause" ]
null
null
null
OpenCV/hsv_trackbar.py
jiyeqian/demo
a0ce6493b63d8a86641fd224feb5dc77fa86a7ac
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import cv2 if __name__ == '__main__': import sys try: fn = sys.argv[1] except: fn = '../temp/cat.jpg' img = cv2.imread(fn) hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) def nothing(x): pass cv2.namedW...
23.621622
75
0.543478
import numpy as np import cv2 if __name__ == '__main__': import sys try: fn = sys.argv[1] except: fn = '../temp/cat.jpg' img = cv2.imread(fn) hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) def nothing(x): pass cv2.namedWindow('HSV', 0) cv2.createTrackbar( "H", "...
true
true
f76e65406ee81e731f8d20c63d1ef6db81d18149
4,674
py
Python
src/zsl/interface/task.py
AtteqCom/zsl
0d418ef957c9780263b1031dbc59482cd974bc04
[ "MIT" ]
2
2017-05-17T08:08:52.000Z
2019-03-25T00:24:51.000Z
src/zsl/interface/task.py
AtteqCom/zsl
0d418ef957c9780263b1031dbc59482cd974bc04
[ "MIT" ]
100
2017-01-11T13:43:11.000Z
2022-02-10T09:27:18.000Z
src/zsl/interface/task.py
AtteqCom/zsl
0d418ef957c9780263b1031dbc59482cd974bc04
[ "MIT" ]
1
2017-05-10T10:27:01.000Z
2017-05-10T10:27:01.000Z
""" :mod:`zsl.interface.task` ------------------------- .. moduleauthor:: Peter Morihladko <morihladko@atteq.com>, Martin Babka <babka@atteq.com> """ from __future__ import absolute_import, division, print_function, unicode_literals from builtins import * # NOQA from functools import wraps import j...
30.75
107
0.627942
from __future__ import absolute_import, division, print_function, unicode_literals from builtins import * from functools import wraps import json from json.encoder import JSONEncoder import sys from typing import Any, Callable, Dict from future.builtins import str from zsl import inject from zsl.errors import ZslEr...
true
true
f76e664cd60def1d0e764af9504017a38121095c
62,880
py
Python
gen/calc.py
pierrebeitz/dcos
424a390624f9a97b84da25ca03caf94707e13e01
[ "Apache-2.0" ]
1
2019-09-17T09:33:34.000Z
2019-09-17T09:33:34.000Z
gen/calc.py
pierrebeitz/dcos
424a390624f9a97b84da25ca03caf94707e13e01
[ "Apache-2.0" ]
3
2019-10-22T09:53:55.000Z
2019-12-02T15:24:54.000Z
gen/calc.py
pierrebeitz/dcos
424a390624f9a97b84da25ca03caf94707e13e01
[ "Apache-2.0" ]
3
2019-10-21T11:31:25.000Z
2019-11-20T06:54:47.000Z
""" This module contains the logic for specifying and validating the top-level DC/OS configuration from user arguments The data structure called 'entry' is what defines which validation checks should be run, how arguments should be calculated, which arguments should have set defaults, which arguments should be user sp...
41.017613
120
0.67042
import collections import ipaddress import json import os import re import socket import string import textwrap from enum import IntEnum from math import floor from subprocess import check_output import schema import yaml import gen.internals DCOS_VERSION = '2.1.0-beta2-dev' CHECK_SEARCH_PATH = '/opt/mesosphere/bi...
true
true
f76e665e955ba7f82b636c6778672c65ad81d046
53,017
py
Python
napari/layers/points/_tests/test_points.py
kne42/napari
d61d0be0ef8ea622dd3d6acd270c0529816c11ec
[ "BSD-3-Clause" ]
null
null
null
napari/layers/points/_tests/test_points.py
kne42/napari
d61d0be0ef8ea622dd3d6acd270c0529816c11ec
[ "BSD-3-Clause" ]
null
null
null
napari/layers/points/_tests/test_points.py
kne42/napari
d61d0be0ef8ea622dd3d6acd270c0529816c11ec
[ "BSD-3-Clause" ]
null
null
null
from copy import copy from itertools import cycle, islice import numpy as np import pandas as pd import pytest from vispy.color import get_colormap from napari._tests.utils import check_layer_world_data_extent from napari.layers import Points from napari.layers.points._points_utils import points_to_squares from napar...
32.625846
82
0.653677
from copy import copy from itertools import cycle, islice import numpy as np import pandas as pd import pytest from vispy.color import get_colormap from napari._tests.utils import check_layer_world_data_extent from napari.layers import Points from napari.layers.points._points_utils import points_to_squares from napar...
true
true
f76e67baea0aa40fac2015ea2c5cb8f63024fe5c
100,314
py
Python
DartWalkingFoot/main_DartTrackingFoot1.py
hpgit/HumanFoot
f9a1a341b7c43747bddcd5584b8c98a0d1ac2973
[ "Apache-2.0" ]
null
null
null
DartWalkingFoot/main_DartTrackingFoot1.py
hpgit/HumanFoot
f9a1a341b7c43747bddcd5584b8c98a0d1ac2973
[ "Apache-2.0" ]
null
null
null
DartWalkingFoot/main_DartTrackingFoot1.py
hpgit/HumanFoot
f9a1a341b7c43747bddcd5584b8c98a0d1ac2973
[ "Apache-2.0" ]
null
null
null
from fltk import * import copy import os.path from cPickle import load # import time import numpy as np import sys if ".." not in sys.path: sys.path.append("..") from PyCommon.modules.ArticulatedBody import hpBipedFeedback as hbf from PyCommon.modules.Math import mmMath as mm from PyCommon.modules.Math import ys...
45.847349
208
0.594453
from fltk import * import copy import os.path from cPickle import load import numpy as np import sys if ".." not in sys.path: sys.path.append("..") from PyCommon.modules.ArticulatedBody import hpBipedFeedback as hbf from PyCommon.modules.Math import mmMath as mm from PyCommon.modules.Math import ysFunctionGraph ...
true
true
f76e68026afd148ae41998c7054a4dce235d1009
2,563
py
Python
ultimatepython/advanced/thread.py
vinhtq115/ultimate-python
438e3d49349fbd5ed55b89d3c9acc8883c1631a9
[ "MIT" ]
3,678
2020-08-23T18:47:23.000Z
2022-03-31T12:29:43.000Z
ultimatepython/advanced/thread.py
vinhtq115/ultimate-python
438e3d49349fbd5ed55b89d3c9acc8883c1631a9
[ "MIT" ]
160
2021-04-26T19:04:15.000Z
2022-03-26T20:18:37.000Z
ultimatepython/advanced/thread.py
vinhtq115/ultimate-python
438e3d49349fbd5ed55b89d3c9acc8883c1631a9
[ "MIT" ]
436
2020-08-17T22:40:38.000Z
2022-03-29T04:12:35.000Z
""" Threaded programming is used by developers to improve the performance of an application. This module shows a simple multiplication operation with some delay can be parallelized using `ThreadPoolExecutor`. A good grasp of operating systems and CPUs is recommended before reading the code below. """ import time from c...
36.098592
75
0.734686
import time from concurrent.futures import ThreadPoolExecutor, as_completed from datetime import datetime _MULTIPLY_DELAY = 0.01 def multiply_by_two(item): time.sleep(_MULTIPLY_DELAY) return item * 2 def run_thread_workers(work, data): results = set() with ThreadPoolExecutor() as executor: ...
true
true
f76e6deda564d46d42ba8d285e9288499f485cb7
5,345
py
Python
clarifai_grpc/grpc/auth/util/extension_pb2.py
olga-clarifai/clarifai-python-grpc
c1d45ea965f781de5ccf682b142049c7628d0480
[ "Apache-2.0" ]
null
null
null
clarifai_grpc/grpc/auth/util/extension_pb2.py
olga-clarifai/clarifai-python-grpc
c1d45ea965f781de5ccf682b142049c7628d0480
[ "Apache-2.0" ]
null
null
null
clarifai_grpc/grpc/auth/util/extension_pb2.py
olga-clarifai/clarifai-python-grpc
c1d45ea965f781de5ccf682b142049c7628d0480
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/clarifai/auth/util/extension.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import s...
61.436782
939
0.839663
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from clarifai_grpc.grpc.auth.scope import scope_pb2 as prot...
true
true
f76e6e315a97cc1da3b72bc5e066070bfcbee1cb
592
py
Python
tests/test_market_cap.py
CryptoBlock00/Coinex
abf738538ea7c3d805ce6b2e4d2cca3cc94f908e
[ "Apache-2.0" ]
5
2018-06-27T21:01:57.000Z
2022-01-02T02:22:43.000Z
tests/test_market_cap.py
CryptoBlock00/Coinex
abf738538ea7c3d805ce6b2e4d2cca3cc94f908e
[ "Apache-2.0" ]
null
null
null
tests/test_market_cap.py
CryptoBlock00/Coinex
abf738538ea7c3d805ce6b2e4d2cca3cc94f908e
[ "Apache-2.0" ]
7
2018-06-20T15:32:03.000Z
2021-05-30T00:39:26.000Z
import os import sys from decimal import * import unittest _path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if _path not in sys.path: sys.path.append(_path) import market_cap class TestMarketCap(unittest.TestCase): def test_bitstamp_price(self): prc = market_cap.get_bitstamp_pric...
21.142857
67
0.631757
import os import sys from decimal import * import unittest _path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if _path not in sys.path: sys.path.append(_path) import market_cap class TestMarketCap(unittest.TestCase): def test_bitstamp_price(self): prc = market_cap.get_bitstamp_pric...
true
true
f76e6e407e09fa8ee122614999d480ec854e741d
1,069
py
Python
Data Science/MachineLearningFromPytorch.py
bradduy/computer_vision
cfe97e84a5e216819497405a79ef2ef0ca2b95fe
[ "MIT" ]
null
null
null
Data Science/MachineLearningFromPytorch.py
bradduy/computer_vision
cfe97e84a5e216819497405a79ef2ef0ca2b95fe
[ "MIT" ]
null
null
null
Data Science/MachineLearningFromPytorch.py
bradduy/computer_vision
cfe97e84a5e216819497405a79ef2ef0ca2b95fe
[ "MIT" ]
null
null
null
import torch # f = w * x # f = 2 * x X = torch.tensor([1,2,3,4], dtype=torch.float32) # training sample Y = torch.tensor([2,4,6,8], dtype=torch.float32) # testing sample w = torch.tensor(0.0, dtype=torch.float32, requires_grad=True) #model prediction def forward(x): return w * x # loss = MSE def loss(y, y_pred...
20.960784
66
0.612722
import torch X = torch.tensor([1,2,3,4], dtype=torch.float32) Y = torch.tensor([2,4,6,8], dtype=torch.float32) w = torch.tensor(0.0, dtype=torch.float32, requires_grad=True) def forward(x): return w * x def loss(y, y_predicted): return ((y_predicted - y)**2).mean() def gradient(x, y, y_predicted): ret...
true
true
f76e6e41561e2631ca3a53361161d12f20d1ec2f
2,753
py
Python
portfolio/Python/scrapy/theplumbstore/heatandplumb_spider.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
null
null
null
portfolio/Python/scrapy/theplumbstore/heatandplumb_spider.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
null
null
null
portfolio/Python/scrapy/theplumbstore/heatandplumb_spider.py
0--key/lib
ba7a85dda2b208adc290508ca617bdc55a5ded22
[ "Apache-2.0" ]
5
2016-03-22T07:40:46.000Z
2021-05-30T16:12:21.000Z
import csv import os import copy import shutil from scrapy import log from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse, FormRequest from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from scrapy.http.co...
43.015625
130
0.614239
import csv import os import copy import shutil from scrapy import log from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse, FormRequest from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from scrapy.http.co...
true
true
f76e6e6e7fd8403de0cc508817a9b53ed2362876
999
py
Python
15 Flask/page10.py
dumin199101/DeepLearning
72d6919f8a9fc3718365b35f775d07e98b8c6f8d
[ "Apache-2.0" ]
1
2019-11-05T07:36:08.000Z
2019-11-05T07:36:08.000Z
15 Flask/page10.py
dumin199101/DeepLearning
72d6919f8a9fc3718365b35f775d07e98b8c6f8d
[ "Apache-2.0" ]
null
null
null
15 Flask/page10.py
dumin199101/DeepLearning
72d6919f8a9fc3718365b35f775d07e98b8c6f8d
[ "Apache-2.0" ]
null
null
null
# *_* coding:utf-8 *_* # 开发人员:烈焰 # 开发时间:2019/12/16 15:16 # 文件名称:page10 # 开发工具:PyCharm # flask-script扩展命令行 """ python page10.py --help positional arguments: {shell,runserver} shell Runs a Python shell inside Flask application context. runserver Runs the Flask development server i.e. app.run...
22.704545
98
0.63964
from flask import Flask from flask_script import Manager app = Flask(__name__,static_url_path="/static",static_folder="static",template_folder="templates") manager = Manager(app) @app.route("/") def index(): return "Hello Python Flask!!" if __name__ == '__main__': manager.run()
true
true
f76e6e8a765cbf1ecc71750fd5dbec1d4c6b5b2a
3,259
py
Python
rlpyt/models/pg/atari_lstm_model.py
nirbhayjm/rlpyt
a2741201bbf33f5408306198d220d90f8f7b7250
[ "MIT" ]
null
null
null
rlpyt/models/pg/atari_lstm_model.py
nirbhayjm/rlpyt
a2741201bbf33f5408306198d220d90f8f7b7250
[ "MIT" ]
null
null
null
rlpyt/models/pg/atari_lstm_model.py
nirbhayjm/rlpyt
a2741201bbf33f5408306198d220d90f8f7b7250
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F from rlpyt.models.conv2d import Conv2dHeadModel from rlpyt.utils.collections import namedarraytuple from rlpyt.utils.tensor import infer_leading_dims, restore_leading_dims RnnState = namedarraytuple( "RnnState", ["h", "c"] ) # For downstream namedarraytuples to work ...
39.743902
85
0.615833
import torch import torch.nn.functional as F from rlpyt.models.conv2d import Conv2dHeadModel from rlpyt.utils.collections import namedarraytuple from rlpyt.utils.tensor import infer_leading_dims, restore_leading_dims RnnState = namedarraytuple( "RnnState", ["h", "c"] ) class AtariLstmModel(torch.nn.Module): ...
true
true
f76e6ecf22a87759a61452c00d4795bd887f035f
43,404
py
Python
tests/unit/aiplatform/test_featurestores.py
googleapis/python-aiplatform
d72a254e97cf74f3fdd55a32a4af86737243593a
[ "Apache-2.0" ]
180
2020-09-23T17:21:15.000Z
2022-03-30T17:25:47.000Z
tests/unit/aiplatform/test_featurestores.py
morgandu/python-aiplatform
96ce7387ac58e0ec7cb6a7f6d6a6e422eae5da96
[ "Apache-2.0" ]
601
2020-09-23T16:23:44.000Z
2022-03-31T19:08:23.000Z
tests/unit/aiplatform/test_featurestores.py
morgandu/python-aiplatform
96ce7387ac58e0ec7cb6a7f6d6a6e422eae5da96
[ "Apache-2.0" ]
109
2020-09-23T16:22:04.000Z
2022-03-28T21:18:29.000Z
# -*- coding: utf-8 -*- # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
35.99005
97
0.703299
import pytest import datetime from unittest import mock from importlib import reload from unittest.mock import patch from google.api_core import operation from google.protobuf import field_mask_pb2 from google.cloud import aiplatform from google.cloud.aiplatform import base from google.cloud.aiplatform import init...
true
true
f76e7327eb8cd76356dfdb900fc4872f6a1772ca
59,306
py
Python
tests/regressiontests/forms/tests/fields.py
vzuuum/django
b282fb06ca5d483f0166e690cbce8073940323d5
[ "BSD-3-Clause" ]
27
2015-02-11T16:31:43.000Z
2021-12-18T04:24:19.000Z
tests/regressiontests/forms/tests/fields.py
vzuuum/django
b282fb06ca5d483f0166e690cbce8073940323d5
[ "BSD-3-Clause" ]
1
2022-02-11T15:33:31.000Z
2022-02-11T15:33:31.000Z
tests/regressiontests/forms/tests/fields.py
jamespacileo/django
9d3f86c72f5d22113b8cb5cd006abb9297f2fd4e
[ "BSD-3-Clause" ]
14
2015-12-27T20:19:14.000Z
2020-12-14T01:41:22.000Z
# -*- coding: utf-8 -*- """ ########## # Fields # ########## Each Field class does some sort of validation. Each Field has a clean() method, which either raises django.forms.ValidationError or returns the "clean" data -- usually a Unicode object, but, in some rare cases, a list. Each Field's __init__() takes at least...
60.578141
207
0.635686
""" ########## # Fields # ########## Each Field class does some sort of validation. Each Field has a clean() method, which either raises django.forms.ValidationError or returns the "clean" data -- usually a Unicode object, but, in some rare cases, a list. Each Field's __init__() takes at least these parameters: r...
false
true
f76e73afa66860e54d1191b520f23c499733cac0
549
py
Python
Chapter04/counter_ops.py
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
805d00c7a54927ba94c9077e9a580508ee3c5e56
[ "MIT" ]
13
2018-06-21T01:44:49.000Z
2021-12-01T10:49:53.000Z
Chapter04/counter_ops.py
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
805d00c7a54927ba94c9077e9a580508ee3c5e56
[ "MIT" ]
null
null
null
Chapter04/counter_ops.py
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
805d00c7a54927ba94c9077e9a580508ee3c5e56
[ "MIT" ]
6
2018-10-05T08:29:24.000Z
2022-01-11T14:49:50.000Z
sum(c.values()) # total of all counts c.clear() # reset all counts list(c) # list unique elements set(c) # convert to a set dict(c) # convert to a regular dictionary c.items() # convert t...
54.9
74
0.489982
sum(c.values()) c.clear() list(c) set(c) dict(c) c.items() Counter(dict(list_of_pairs)) c.most_common()[:-n-1:-1] +c
true
true
f76e74c7171721f9fd74ae91d2131df6ea63ae17
3,159
py
Python
server/iNAZO/settings/base.py
karintou8710/search
730285f44581052566e68a26ff3212be65dfcf9d
[ "MIT" ]
9
2021-05-25T14:30:59.000Z
2022-03-26T03:28:15.000Z
server/iNAZO/settings/base.py
karintou8710/search
730285f44581052566e68a26ff3212be65dfcf9d
[ "MIT" ]
26
2021-05-29T05:07:37.000Z
2022-03-12T12:20:39.000Z
server/iNAZO/settings/base.py
karintou8710/search
730285f44581052566e68a26ff3212be65dfcf9d
[ "MIT" ]
2
2021-06-05T09:07:42.000Z
2022-02-14T11:31:24.000Z
from pathlib import Path import environ env = environ.Env() env.read_env('.env') # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto...
24.679688
91
0.700222
from pathlib import Path import environ env = environ.Env() env.read_env('.env') BASE_DIR = Path(__file__).resolve().parent.parent.parent SECRET_KEY = env.str('SECRET_KEY') DEBUG = env.bool('DEBUG') ALLOWED_HOSTS = env.list('ALLOWED_HOSTS') # Application definition INSTALLED_APPS = [ 'django.contrib.admi...
true
true
f76e756aec49f33916568dc1c256e0733c1c3df4
2,241
py
Python
homeassistant/components/pi_hole/sensor.py
tuxbox/home-assistant
df74272ba6311d527fd07198929c80a45d9fed15
[ "Apache-2.0" ]
null
null
null
homeassistant/components/pi_hole/sensor.py
tuxbox/home-assistant
df74272ba6311d527fd07198929c80a45d9fed15
[ "Apache-2.0" ]
null
null
null
homeassistant/components/pi_hole/sensor.py
tuxbox/home-assistant
df74272ba6311d527fd07198929c80a45d9fed15
[ "Apache-2.0" ]
null
null
null
"""Support for getting statistical data from a Pi-hole system.""" import logging from homeassistant.helpers.entity import Entity from .const import ( ATTR_BLOCKED_DOMAINS, DOMAIN as PIHOLE_DOMAIN, SENSOR_DICT, SENSOR_LIST, ) LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, ...
27.666667
86
0.654618
import logging from homeassistant.helpers.entity import Entity from .const import ( ATTR_BLOCKED_DOMAINS, DOMAIN as PIHOLE_DOMAIN, SENSOR_DICT, SENSOR_LIST, ) LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): if discovery...
true
true
f76e7682b4a9d23bc1ae84ca20de12f2e2671d5a
303
py
Python
lokalise/collections/teams.py
carlmanaster/python-lokalise-api
ce4a43c5a7bf14f45a2432e096b1880ff28d6770
[ "BSD-3-Clause" ]
5
2020-09-09T15:22:34.000Z
2021-12-07T12:24:26.000Z
lokalise/collections/teams.py
carlmanaster/python-lokalise-api
ce4a43c5a7bf14f45a2432e096b1880ff28d6770
[ "BSD-3-Clause" ]
39
2020-12-08T16:56:06.000Z
2022-03-28T15:18:52.000Z
lokalise/collections/teams.py
carlmanaster/python-lokalise-api
ce4a43c5a7bf14f45a2432e096b1880ff28d6770
[ "BSD-3-Clause" ]
1
2021-03-25T02:55:49.000Z
2021-03-25T02:55:49.000Z
""" lokalise.collections.teams ~~~~~~~~~~~~~~~~~~~~~~~~~~ Module containing teams collection. """ from .base_collection import BaseCollection from ..models.team import TeamModel class TeamsCollection(BaseCollection): """Describes teams. """ DATA_KEY = "teams" MODEL_KLASS = TeamModel
18.9375
43
0.673267
from .base_collection import BaseCollection from ..models.team import TeamModel class TeamsCollection(BaseCollection): DATA_KEY = "teams" MODEL_KLASS = TeamModel
true
true
f76e76b2f9dd900f15f1bca15cce370cf831fdbe
3,645
py
Python
tests/checkpointing/test_trainer_checkpoint.py
PeppeSaccardi/pytorch-lightning
046110797227c352126c779c207e076ce9682eae
[ "Apache-2.0" ]
3
2021-05-06T11:31:20.000Z
2021-05-21T10:37:03.000Z
tests/checkpointing/test_trainer_checkpoint.py
PeppeSaccardi/pytorch-lightning
046110797227c352126c779c207e076ce9682eae
[ "Apache-2.0" ]
null
null
null
tests/checkpointing/test_trainer_checkpoint.py
PeppeSaccardi/pytorch-lightning
046110797227c352126c779c207e076ce9682eae
[ "Apache-2.0" ]
2
2021-06-10T21:46:37.000Z
2021-08-24T18:49:17.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.714286
116
0.696845
import os from copy import deepcopy import torch import pytorch_lightning as pl from pytorch_lightning import seed_everything, Trainer from pytorch_lightning.callbacks import ModelCheckpoint from tests.helpers import BoringModel def test_finetuning_with_resume_from_checkpoint(tmpdir): seed_everything(4) c...
true
true
f76e7732ae813321be927191f0a01c35ceb61bf9
1,390
bzl
Python
tensorflow_serving/repo.bzl
forloveandlemons/serving
0b83b7e0a442d641a84d24afb278e48c8f1c24d5
[ "Apache-2.0" ]
1
2021-03-29T22:58:57.000Z
2021-03-29T22:58:57.000Z
tensorflow_serving/repo.bzl
forloveandlemons/serving
0b83b7e0a442d641a84d24afb278e48c8f1c24d5
[ "Apache-2.0" ]
null
null
null
tensorflow_serving/repo.bzl
forloveandlemons/serving
0b83b7e0a442d641a84d24afb278e48c8f1c24d5
[ "Apache-2.0" ]
1
2021-07-15T01:27:34.000Z
2021-07-15T01:27:34.000Z
""" TensorFlow Http Archive Modified http_archive that allows us to override the TensorFlow commit that is downloaded by setting an environment variable. This override is to be used for testing purposes. Add the following to your Bazel build command in order to override the TensorFlow revision. build: --action_env T...
28.367347
101
0.684892
_TF_REVISION = "TF_REVISION" def _tensorflow_http_archive(ctx): git_commit = ctx.attr.git_commit sha256 = ctx.attr.sha256 patch = ctx.attr.patch override_git_commit = ctx.os.environ.get(_TF_REVISION) if override_git_commit: sha256 = "" git_commit = override_git_commit strip_p...
true
true
f76e791aa165c127768f448b14a75283846268d4
3,416
py
Python
Python/3-DevOps/week1/hello_django_docker_compose/app/hello_django/settings.py
armirh/Nucamp-SQL-Devops-Training
6c2dc5793c732bfb4c4d365acbb346a95fbf4bf2
[ "MIT" ]
2
2022-01-19T02:33:11.000Z
2022-01-19T02:33:13.000Z
Python/3-DevOps/week1/hello_django_docker_compose/app/hello_django/settings.py
armirh/Nucamp-SQL-Devops-Training
6c2dc5793c732bfb4c4d365acbb346a95fbf4bf2
[ "MIT" ]
null
null
null
Python/3-DevOps/week1/hello_django_docker_compose/app/hello_django/settings.py
armirh/Nucamp-SQL-Devops-Training
6c2dc5793c732bfb4c4d365acbb346a95fbf4bf2
[ "MIT" ]
null
null
null
""" Django settings for hello_django project. Generated by 'django-admin startproject' using Django 3.2.2. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pa...
26.48062
91
0.703162
from pathlib import Path import os BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-rd_q8=#5%)xlhl8!b8o410apqror1(3^2j6m3jr#xr&!+!8%84' DEBUG = True ALLOWED_HOSTS = ['localhost', '127.0.0.1'] #ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS").split(" ") # Application definiti...
true
true
f76e7a7eb4c80b667ce68ae2abc9eac5d6bfd429
211
py
Python
scripts/wgcna/rpy2_wgcna.py
omarmaddouri/GCNCC_1
ec858bbe8246e4af15f7b870ca0ccafdea93d627
[ "MIT" ]
4
2020-12-03T11:57:15.000Z
2021-12-09T05:20:44.000Z
scripts/wgcna/rpy2_wgcna.py
alkaidone/GCNCC
3270b4c2d48e0090a18a0ab1df3b9fd81627029d
[ "MIT" ]
5
2020-01-28T23:14:40.000Z
2021-08-25T15:55:23.000Z
scripts/wgcna/rpy2_wgcna.py
alkaidone/GCNCC
3270b4c2d48e0090a18a0ab1df3b9fd81627029d
[ "MIT" ]
3
2021-11-23T05:13:27.000Z
2021-12-30T08:12:48.000Z
import rpy2.robjects as robjects robjects.r('install.packages("BiocManager", ' 'repos="http://cran.r-project.org")') robjects.r('BiocManager::install("WGCNA")') robjects.r('library(WGCNA)')
42.2
55
0.663507
import rpy2.robjects as robjects robjects.r('install.packages("BiocManager", ' 'repos="http://cran.r-project.org")') robjects.r('BiocManager::install("WGCNA")') robjects.r('library(WGCNA)')
true
true
f76e7ae48c2fb1d71d318a086b38bd98e7449914
2,270
py
Python
tests/test_playsongin.py
52Sarah/play-song
57cba0d1ed9fb5c9615d64158998b791eaae58e4
[ "MIT" ]
80
2015-02-09T09:20:16.000Z
2022-03-25T08:30:10.000Z
tests/test_playsongin.py
52Sarah/play-song
57cba0d1ed9fb5c9615d64158998b791eaae58e4
[ "MIT" ]
43
2015-01-01T17:32:56.000Z
2021-12-23T05:49:12.000Z
tests/test_playsongin.py
52Sarah/play-song
57cba0d1ed9fb5c9615d64158998b791eaae58e4
[ "MIT" ]
9
2017-03-07T02:21:27.000Z
2021-07-11T13:59:00.000Z
#!/usr/bin/env python # coding=utf-8 from __future__ import print_function, unicode_literals import os import os.path import nose.tools as nose from tests.utils import run_filter def test_query_ignore_case(): """should ignore case when querying songs in an album""" results = run_filter('playsongin', 'beat...
32.428571
74
0.681057
from __future__ import print_function, unicode_literals import os import os.path import nose.tools as nose from tests.utils import run_filter def test_query_ignore_case(): results = run_filter('playsongin', 'beatles For SALE') nose.assert_equal(results[0]['title'], 'No Reply') def test_query_trim_whites...
true
true
f76e7c5f5a4164b78654592dd733692f67c03a07
2,927
py
Python
sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_mongo_db_api_linked_service.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_mongo_db_api_linked_service.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2020-03-06T05:57:16.000Z
2020-03-06T05:57:16.000Z
sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/cosmos_db_mongo_db_api_linked_service.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
43.044118
90
0.655962
from .linked_service import LinkedService class CosmosDbMongoDbApiLinkedService(LinkedService): _validation = { 'type': {'required': True}, 'connection_string': {'required': True}, 'database': {'required': True}, } _attribute_map = { 'additional_properties': {'key': '', ...
true
true
f76e7c75d61c025df110e81852d4e582b46949f6
149
py
Python
sebs/gcp/__init__.py
mcopik/serverless-benchmarks
3b57688873853a1ea74e10b02a9d89f3a4d679ac
[ "BSD-3-Clause" ]
35
2020-12-30T19:31:30.000Z
2022-03-28T11:10:00.000Z
sebs/gcp/__init__.py
mcopik/serverless-benchmarks
3b57688873853a1ea74e10b02a9d89f3a4d679ac
[ "BSD-3-Clause" ]
24
2021-01-04T15:37:05.000Z
2022-03-14T00:45:20.000Z
sebs/gcp/__init__.py
mcopik/serverless-benchmarks
3b57688873853a1ea74e10b02a9d89f3a4d679ac
[ "BSD-3-Clause" ]
10
2021-06-13T13:13:39.000Z
2021-12-20T22:05:50.000Z
from .gcp import GCP # noqa from .config import GCPConfig # noqa from .storage import GCPStorage # noqa from .function import GCPFunction # noqa
29.8
41
0.758389
from .gcp import GCP from .config import GCPConfig from .storage import GCPStorage from .function import GCPFunction
true
true
f76e7c817902ed64e51b28780a657b42bd8ac240
1,015
py
Python
libdrf/login/managers.py
lumiqa/libdrf
0b6381e3f70df6ded94eaff4197f73922bde9bbc
[ "MIT" ]
null
null
null
libdrf/login/managers.py
lumiqa/libdrf
0b6381e3f70df6ded94eaff4197f73922bde9bbc
[ "MIT" ]
1
2022-02-09T11:00:18.000Z
2022-02-09T11:00:18.000Z
libdrf/login/managers.py
lumiqa/libdrf
0b6381e3f70df6ded94eaff4197f73922bde9bbc
[ "MIT" ]
null
null
null
from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, password=None, **kwargs): """ Creates and saves a User with the given email and password. """ if not email: raise ValueError('Users must have an emai...
26.710526
75
0.589163
from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): def create_user(self, email, password=None, **kwargs): if not email: raise ValueError('Users must have an email address') user = self.model( email=self.normalize_email(email), ...
true
true
f76e7d1a913d27bc38069141d6b18843b119867d
162
py
Python
discord_bot/d_events/cooldown.py
Mr-Jaxee/Console
7c042ad51310aaeef76a497a6e96a4ef2a108e6a
[ "MIT" ]
null
null
null
discord_bot/d_events/cooldown.py
Mr-Jaxee/Console
7c042ad51310aaeef76a497a6e96a4ef2a108e6a
[ "MIT" ]
null
null
null
discord_bot/d_events/cooldown.py
Mr-Jaxee/Console
7c042ad51310aaeef76a497a6e96a4ef2a108e6a
[ "MIT" ]
null
null
null
async def cooldown(bot, message, one_result, guild_result, connection, cursor, unix_time_millis, ru_RU, en_US): await message.add_reaction(emoji="⌛")
40.5
112
0.734568
async def cooldown(bot, message, one_result, guild_result, connection, cursor, unix_time_millis, ru_RU, en_US): await message.add_reaction(emoji="⌛")
true
true
f76e7d99cfe91f1d91e7f73cc51d42d413c83cf6
2,688
py
Python
sugaroid/brain/bye.py
vardaan-raj/sugaroid
d0476fb9c44a73fee2e0de45162f2b1ac86452aa
[ "MIT" ]
4
2020-09-28T13:52:40.000Z
2020-10-30T15:24:50.000Z
sugaroid/brain/bye.py
sreyasaju/sugaroid
d58e06fb664daa16fda1bf23cc73068efcd5634c
[ "MIT" ]
null
null
null
sugaroid/brain/bye.py
sreyasaju/sugaroid
d58e06fb664daa16fda1bf23cc73068efcd5634c
[ "MIT" ]
null
null
null
""" MIT License Sugaroid Artificial Intelligence Chatbot Core Copyright (c) 2020-2021 Srevin Saju Copyright (c) 2021 The Sugaroid Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without r...
35.84
87
0.730655
import random import sys from chatterbot.conversation import Statement from chatterbot.logic import LogicAdapter from sugaroid.brain.constants import BYE, BYE_RESPONSE from sugaroid.brain.postprocessor import random_response from sugaroid.brain.ooo import Emotion from sugaroid.brain.preprocessors import normalize f...
true
true
f76e7e41a358579d9d23263cb7c0d4c90e00ec72
4,012
py
Python
checkerboard.py
mhearne-usgs/handcrypt
fd4aa0f89258d9a01cbcdd53f9cd03e19e6367ee
[ "MIT" ]
2
2017-09-28T18:30:49.000Z
2021-04-23T22:39:26.000Z
checkerboard.py
mhearne-usgs/handcrypt
fd4aa0f89258d9a01cbcdd53f9cd03e19e6367ee
[ "MIT" ]
null
null
null
checkerboard.py
mhearne-usgs/handcrypt
fd4aa0f89258d9a01cbcdd53f9cd03e19e6367ee
[ "MIT" ]
1
2015-10-20T07:45:22.000Z
2015-10-20T07:45:22.000Z
#!/usr/bin/env python import re import optparse import cryptutils class CheckerBoard(object): Block = ['ET AON RIS','BCDFGHJKLM','PQ/UVWXYZ.'] Columns = [0,1,2,3,4,5,6,7,8,9] Rows = ['',2,6] Adds = [8,18] key = None UPPERA = 65 def getNumber(self,ch): return(ord(ch)-self.UPPERA) ...
30.625954
78
0.521186
import re import optparse import cryptutils class CheckerBoard(object): Block = ['ET AON RIS','BCDFGHJKLM','PQ/UVWXYZ.'] Columns = [0,1,2,3,4,5,6,7,8,9] Rows = ['',2,6] Adds = [8,18] key = None UPPERA = 65 def getNumber(self,ch): return(ord(ch)-self.UPPERA) def __init__(self,k...
false
true
f76e7e6750f878962d31ad846b2d49ec6a73af66
2,342
py
Python
get_together/management/commands/send_daily_member_update.py
albjeremias/GetTogether
93dc62c322d93c4cb7d6fbd3a7ca1abf467005dc
[ "BSD-2-Clause" ]
13
2017-12-26T17:05:06.000Z
2018-01-02T15:09:31.000Z
get_together/management/commands/send_daily_member_update.py
albjeremias/GetTogether
93dc62c322d93c4cb7d6fbd3a7ca1abf467005dc
[ "BSD-2-Clause" ]
9
2017-12-27T15:51:37.000Z
2018-01-02T14:49:32.000Z
get_together/management/commands/send_daily_member_update.py
albjeremias/GetTogether
93dc62c322d93c4cb7d6fbd3a7ca1abf467005dc
[ "BSD-2-Clause" ]
3
2017-12-26T21:27:38.000Z
2018-01-03T15:01:49.000Z
from django.core.management.base import BaseCommand, CommandError from django.urls import reverse from django.core.mail import send_mail from django.template.loader import get_template, render_to_string from django.conf import settings from django.contrib.sites.models import Site from django.utils import timezone from...
33.457143
144
0.682323
from django.core.management.base import BaseCommand, CommandError from django.urls import reverse from django.core.mail import send_mail from django.template.loader import get_template, render_to_string from django.conf import settings from django.contrib.sites.models import Site from django.utils import timezone from...
true
true
f76e7e9af65151c682ec97e4b3510e891673db58
2,427
py
Python
data_quality_problem_set4_location.py
mugofjoe/dand-data-wrangling
c415219cc8178a59494599f2f84a3692bdc7d87f
[ "MIT" ]
null
null
null
data_quality_problem_set4_location.py
mugofjoe/dand-data-wrangling
c415219cc8178a59494599f2f84a3692bdc7d87f
[ "MIT" ]
null
null
null
data_quality_problem_set4_location.py
mugofjoe/dand-data-wrangling
c415219cc8178a59494599f2f84a3692bdc7d87f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ TOPIC: Crossfield auditing two fields with one field. In this problem set you work with cities infobox data, audit it, come up with a cleaning idea and then clean it up. If you look at the full city data, you will notice that there are couple of values that s...
36.772727
80
0.625464
""" TOPIC: Crossfield auditing two fields with one field. In this problem set you work with cities infobox data, audit it, come up with a cleaning idea and then clean it up. If you look at the full city data, you will notice that there are couple of values that seem to provide the same information in different...
false
true
f76e7f52dd9aac8f52103a5b82ed30630ca8dc1c
1,149
py
Python
BiblioPixelAnimations/circle/arc_clock.py
jessicaengel451/BiblioPixelAnimations
37570003ff3460f23cd33bd30625611fdc6e9228
[ "MIT" ]
36
2015-01-19T00:20:49.000Z
2021-12-05T13:45:27.000Z
BiblioPixelAnimations/circle/arc_clock.py
jessicaengel451/BiblioPixelAnimations
37570003ff3460f23cd33bd30625611fdc6e9228
[ "MIT" ]
29
2015-04-28T21:14:08.000Z
2019-04-10T15:33:47.000Z
BiblioPixelAnimations/circle/arc_clock.py
jessicaengel451/BiblioPixelAnimations
37570003ff3460f23cd33bd30625611fdc6e9228
[ "MIT" ]
32
2015-01-02T13:20:33.000Z
2021-02-08T03:15:59.000Z
import time from bibliopixel.animation.circle import Circle from bibliopixel.colors import COLORS class ArcClock(Circle): def __init__(self, layout, **kwds): super().__init__(layout, **kwds) self.hands = [ { 'rings': [0, 1], 'color': COLORS....
28.02439
67
0.390775
import time from bibliopixel.animation.circle import Circle from bibliopixel.colors import COLORS class ArcClock(Circle): def __init__(self, layout, **kwds): super().__init__(layout, **kwds) self.hands = [ { 'rings': [0, 1], 'color': COLORS....
true
true
f76e7fd73492fcb46f6117a7c880b167884ae74f
2,697
py
Python
UppASD_AiiDA/data/core_data.py
UppASD/AiiDA_UppASD
f7e7e43e010663206ccd0b7225d43814ab64cdb2
[ "MIT" ]
null
null
null
UppASD_AiiDA/data/core_data.py
UppASD/AiiDA_UppASD
f7e7e43e010663206ccd0b7225d43814ab64cdb2
[ "MIT" ]
null
null
null
UppASD_AiiDA/data/core_data.py
UppASD/AiiDA_UppASD
f7e7e43e010663206ccd0b7225d43814ab64cdb2
[ "MIT" ]
1
2022-01-24T12:45:57.000Z
2022-01-24T12:45:57.000Z
# -*- coding: utf-8 -*- """ Data types provided by plugin Register data types via the "aiida.data" entry point in setup.json. """ ''' # You can directly use or subclass aiida.orm.data.Data # or any other data type listed under 'verdi data' from aiida.orm import Dict from voluptuous import Schema, Optional # A subs...
27.520408
87
0.636263
true
true
f76e7fed6798a7e3d7db5844a56420372245d9bc
11,724
py
Python
rbac/ledger_sync/deltas/updating.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
75
2018-04-06T09:13:34.000Z
2020-05-18T18:59:47.000Z
rbac/ledger_sync/deltas/updating.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
989
2018-04-18T21:01:56.000Z
2019-10-23T15:37:09.000Z
rbac/ledger_sync/deltas/updating.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
72
2018-04-13T18:29:12.000Z
2020-05-29T06:00:33.000Z
# Copyright 2019 Contributors to Hyperledger Sawtooth # # 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 ...
35.313253
100
0.565421
import sys from environs import Env import rethinkdb as r from rbac.common.addresser import AddressSpace, parse, get_address_type from rbac.common.logs import get_default_logger from rbac.common.util import bytes_from_hex from rbac.ledger_sync.deltas.decoding import TABLE_NAMES from rbac.server.db.relationships_query...
true
true
f76e7ffc6dfcf5619d2fdeda2db77d1013beb844
6,515
py
Python
sundial.py
nschmucker/Sundial
3c1ef3ac422314b7d811c842065f0992a8ff8aeb
[ "MIT" ]
null
null
null
sundial.py
nschmucker/Sundial
3c1ef3ac422314b7d811c842065f0992a8ff8aeb
[ "MIT" ]
null
null
null
sundial.py
nschmucker/Sundial
3c1ef3ac422314b7d811c842065f0992a8ff8aeb
[ "MIT" ]
null
null
null
""" sundial.py This file contains code to run an indoor sundial Developed on Python 3.7.3 / Raspberry Pi 4 Nathaniel Schmucker """ from busio import I2C from board import SCL, SDA from adafruit_pca9685 import PCA9685 from adafruit_motor import servo from pysolar.solar import get_altitude, get_azimuth from scipy.optim...
29.215247
114
0.607982
from busio import I2C from board import SCL, SDA from adafruit_pca9685 import PCA9685 from adafruit_motor import servo from pysolar.solar import get_altitude, get_azimuth from scipy.optimize import fsolve from numpy import isclose from math import cos, sin, tan, pi import requests import datetime from time import sl...
true
true
f76e8043130854a1bf4c07aed6eca77811fc7518
5,599
py
Python
cblaster/local.py
gamcil/clusterblaster
eedf3c11321d5ea19912b880f07e69bd4e6cd5f9
[ "MIT" ]
null
null
null
cblaster/local.py
gamcil/clusterblaster
eedf3c11321d5ea19912b880f07e69bd4e6cd5f9
[ "MIT" ]
null
null
null
cblaster/local.py
gamcil/clusterblaster
eedf3c11321d5ea19912b880f07e69bd4e6cd5f9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import logging import subprocess import os from tempfile import NamedTemporaryFile as NTF from cblaster import helpers from cblaster.classes import Hit LOG = logging.getLogger(__name__) def parse(results, min_identity=30, min_coverage=50, max_evalue=0.01): """Parse a string containing...
29.010363
113
0.596356
import logging import subprocess import os from tempfile import NamedTemporaryFile as NTF from cblaster import helpers from cblaster.classes import Hit LOG = logging.getLogger(__name__) def parse(results, min_identity=30, min_coverage=50, max_evalue=0.01): hits = [] for row in results[:-1]: hit ...
true
true
f76e81ab5909489912ddd7f4a8f5409fb2097358
1,290
py
Python
spriteworld/configs/cobra/common.py
awesome-archive/spriteworld
0b49a56d13ead9ff29666f5d57b8dc91d389cfd2
[ "Apache-2.0" ]
null
null
null
spriteworld/configs/cobra/common.py
awesome-archive/spriteworld
0b49a56d13ead9ff29666f5d57b8dc91d389cfd2
[ "Apache-2.0" ]
null
null
null
spriteworld/configs/cobra/common.py
awesome-archive/spriteworld
0b49a56d13ead9ff29666f5d57b8dc91d389cfd2
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 DeepMind Technologies Limited. # # 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 agr...
33.076923
78
0.7
from __future__ import absolute_import from __future__ import division from __future__ import print_function from spriteworld import action_spaces from spriteworld import renderers as spriteworld_renderers def action_space(): return action_spaces.SelectMove(scale=0.25, noise_scale=0.05) def renderers(): retur...
true
true
f76e82907c434363819176834c0ab438febbe0a4
305
py
Python
data/multilingual/Latn.GJN/Serif_12/pdf_to_json_test_Latn.GJN_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
1
2021-09-19T19:47:35.000Z
2021-09-19T19:47:35.000Z
data/multilingual/Latn.GJN/Serif_12/pdf_to_json_test_Latn.GJN_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
data/multilingual/Latn.GJN/Serif_12/pdf_to_json_test_Latn.GJN_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.GJN/Serif_12/udhr_Latn.GJN_Serif_12.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
30.5
75
0.813115
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.GJN/Serif_12/udhr_Latn.GJN_Serif_12.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
true
true
f76e82e7ce6a18f5767ea843b6205374248f1873
5,736
py
Python
rmgpy/rmg/listener.py
mbprend/RMG-Py
29e111d683f2daa0b376417be60e76b32ce8a993
[ "MIT" ]
null
null
null
rmgpy/rmg/listener.py
mbprend/RMG-Py
29e111d683f2daa0b376417be60e76b32ce8a993
[ "MIT" ]
null
null
null
rmgpy/rmg/listener.py
mbprend/RMG-Py
29e111d683f2daa0b376417be60e76b32ce8a993
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # # # RMG - Reaction Mechanism Generator # # ...
37.736842
93
0.573396
import csv import os from rmgpy.chemkin import get_species_identifier from rmgpy.tools.plot import SimulationPlot class SimulationProfileWriter(object): def __init__(self, output_directory, reaction_sys_index, core_species): super(SimulationProfileWriter, self).__init__() self.output_director...
true
true
f76e83d2f3dfd9928331e73aff0dcaffbc589028
293
py
Python
myshop_mail/templatetags/cart_template_tags.py
nyachoto12/ngonisite01
01ad9b32a0a4460c713304e9034dc99e0ced46f4
[ "BSD-3-Clause" ]
2
2020-07-09T21:40:01.000Z
2020-07-09T21:40:06.000Z
myshop_mail/templatetags/cart_template_tags.py
nyachoto12/ngonisite01
01ad9b32a0a4460c713304e9034dc99e0ced46f4
[ "BSD-3-Clause" ]
9
2021-03-30T13:40:30.000Z
2022-03-12T00:34:12.000Z
myshop_mail/templatetags/cart_template_tags.py
nyachoto12/ngonisite01
01ad9b32a0a4460c713304e9034dc99e0ced46f4
[ "BSD-3-Clause" ]
null
null
null
from django import template from myshop_mail.models import Order register = template.Library() @register.filter def cart_item_count(user): if user.is_authenticated: qs = Order.objects.filter(user=user) if qs.exists(): return qs[0].items.count() return 0
20.928571
44
0.686007
from django import template from myshop_mail.models import Order register = template.Library() @register.filter def cart_item_count(user): if user.is_authenticated: qs = Order.objects.filter(user=user) if qs.exists(): return qs[0].items.count() return 0
true
true
f76e8515e40c9a2cd71677b43213c3257d319f75
56
py
Python
myshop/myshop/__init__.py
nifadyev/django-online-shop
11b62047c077d7ae0070e22dcddd7727620a69a1
[ "MIT" ]
6
2020-09-08T08:12:25.000Z
2021-01-28T20:21:51.000Z
myshop/myshop/__init__.py
nifadyev/django-online-shop
11b62047c077d7ae0070e22dcddd7727620a69a1
[ "MIT" ]
null
null
null
myshop/myshop/__init__.py
nifadyev/django-online-shop
11b62047c077d7ae0070e22dcddd7727620a69a1
[ "MIT" ]
null
null
null
# import celery from .celery import app as celery_app
18.666667
38
0.767857
from .celery import app as celery_app
true
true
f76e851a76dad63045c31a65e419f55df2a9f837
418
py
Python
tests/test_fractions.py
yuuukuma/monty
74b243bfaa4248bc69e40011b886dcc216c3c078
[ "MIT" ]
null
null
null
tests/test_fractions.py
yuuukuma/monty
74b243bfaa4248bc69e40011b886dcc216c3c078
[ "MIT" ]
null
null
null
tests/test_fractions.py
yuuukuma/monty
74b243bfaa4248bc69e40011b886dcc216c3c078
[ "MIT" ]
null
null
null
import unittest from monty.fractions import gcd, lcm, gcd_float class FuncTestCase(unittest.TestCase): def test_gcd(self): self.assertEqual(gcd(7, 14, 63), 7) def test_lcm(self): self.assertEqual(lcm(2, 3, 4), 12) def test_gcd_float(self): vs = [6.2, 12.4, 15.5 + 5e-9] ...
19.904762
56
0.631579
import unittest from monty.fractions import gcd, lcm, gcd_float class FuncTestCase(unittest.TestCase): def test_gcd(self): self.assertEqual(gcd(7, 14, 63), 7) def test_lcm(self): self.assertEqual(lcm(2, 3, 4), 12) def test_gcd_float(self): vs = [6.2, 12.4, 15.5 + 5e-9] ...
true
true
f76e87cc2ea127e07bdd7999be261afcd965b1e0
418
py
Python
tradgram/cases/migrations/0007_case_identification_number.py
didils/tradgram
4868ca082ab78a1b5b96f25ee9f958567bd1bb1e
[ "MIT" ]
null
null
null
tradgram/cases/migrations/0007_case_identification_number.py
didils/tradgram
4868ca082ab78a1b5b96f25ee9f958567bd1bb1e
[ "MIT" ]
4
2020-06-05T20:21:46.000Z
2021-09-08T00:57:42.000Z
tradgram/cases/migrations/0007_case_identification_number.py
didils/tradgram
4868ca082ab78a1b5b96f25ee9f958567bd1bb1e
[ "MIT" ]
null
null
null
# Generated by Django 2.0.8 on 2018-12-01 12:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0006_auto_20181105_0419'), ] operations = [ migrations.AddField( model_name='case', name='identification_nu...
22
73
0.614833
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0006_auto_20181105_0419'), ] operations = [ migrations.AddField( model_name='case', name='identification_number', field=models.CharField(blank=...
true
true
f76e8879fd464577f90f31c32a82206d47e5339e
2,609
py
Python
dingoes.py
RRitts/dingoes
e36fe114c8bf51cdef037cd1271e0ec85d68710a
[ "MIT" ]
null
null
null
dingoes.py
RRitts/dingoes
e36fe114c8bf51cdef037cd1271e0ec85d68710a
[ "MIT" ]
1
2021-06-01T22:06:33.000Z
2021-06-01T22:06:33.000Z
dingoes.py
RRitts/dingoes
e36fe114c8bf51cdef037cd1271e0ec85d68710a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # DiNgoeS: Compare anti-malware and phishing filtering DNS services # Author: https://twitter.com/gszathmari # import os import time import argparse import signal from pyfiglet import Figlet from halo import Halo from sys import exit from dingoes.hphosts import HpHostsFeed from dingoes.report i...
32.209877
121
0.678421
import os import time import argparse import signal from pyfiglet import Figlet from halo import Halo from sys import exit from dingoes.hphosts import HpHostsFeed from dingoes.report import Report from dingoes.confparser import ConfParse import logging def print_banner(): figlet = Figlet(font='slant') banner...
true
true
f76e88b31342ff6c5ae68101681ef43d2cc07079
22,575
py
Python
LaunchScripts/ConnectedCompsCalcWide_Debug.py
danielfreeman11/convex-nets
252a8230845fb2076221113ac8cabfade5152bfb
[ "MIT" ]
2
2016-08-09T00:48:46.000Z
2019-04-03T09:04:59.000Z
LaunchScripts/ConnectedCompsCalcWide_Debug.py
danielfreeman11/convex-nets
252a8230845fb2076221113ac8cabfade5152bfb
[ "MIT" ]
null
null
null
LaunchScripts/ConnectedCompsCalcWide_Debug.py
danielfreeman11/convex-nets
252a8230845fb2076221113ac8cabfade5152bfb
[ "MIT" ]
null
null
null
import numpy as np import sys #Usage: #python thisprog.py threshold numofnetworks #Will randomly initialize numofnetworks neural networks and train them until the error on a training set is less than threshold #Will then try to interpolate between these networks while keeping error below that of threshold. #Will ...
33.845577
166
0.519114
import numpy as np import sys def func(x,a,b,c): return x*x*a + x*b + c def generatecandidate3(a,b,c): candidate = [np.random.random() for x in xrange(1)] candidatesolutions = [func(x,a,b,c) for x in candidate] return candidate, candidatesolutions import copy ...
false
true
f76e8962d78b93a8c414da3e44b43963d74fcaa2
3,175
py
Python
ndmanager/settings.py
neurodata/ndmanager
8774a99bc1633c24de0b3fb8c7c1bb64f2a97014
[ "Apache-2.0" ]
null
null
null
ndmanager/settings.py
neurodata/ndmanager
8774a99bc1633c24de0b3fb8c7c1bb64f2a97014
[ "Apache-2.0" ]
1
2016-08-25T01:46:44.000Z
2016-08-25T01:46:44.000Z
ndmanager/settings.py
neurodata/ndmanager
8774a99bc1633c24de0b3fb8c7c1bb64f2a97014
[ "Apache-2.0" ]
null
null
null
""" Django settings for ndmanager project. Generated by 'django-admin startproject' using Django 1.9.1. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
26.02459
91
0.699843
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'o+mu#ny$$=d6cx73w$=6a-ypap3xl8wxopp$(8_466@^$)p52u' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f76e8975604c70c742f21a84401eb3c39c90181e
440
py
Python
python/time/perf_counter.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
23
2015-06-08T13:01:00.000Z
2021-12-30T08:20:04.000Z
python/time/perf_counter.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
1
2020-10-22T02:36:10.000Z
2020-10-22T02:36:10.000Z
python/time/perf_counter.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
7
2017-10-31T09:48:14.000Z
2022-01-04T15:59:45.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # See: https://docs.python.org/3/library/time.html#time.process_time # http://stackoverflow.com/questions/7370801/measure-time-elapsed-in-python import time initial_time = time.perf_counter() #do some stuf...
20.952381
80
0.729545
import time initial_time = time.perf_counter() time.sleep(1) final_time = time.perf_counter() elapsed_time = final_time - initial_time print(elapsed_time, "sec")
true
true
f76e8a4b0d8698555448228a8955540bb393f0ad
21,270
py
Python
sdk/python/pulumi_azure_native/network/v20200801/express_route_circuit_peering.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200801/express_route_circuit_peering.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200801/express_route_circuit_peering.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
59.247911
5,991
0.707992
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['ExpressRouteCircuitPeering'] class ExpressRouteCircuitPeering(pulumi.CustomResource): ...
true
true
f76e8bc91359573996ba3836f9e5a6c777c2b978
2,721
py
Python
src/python/pants/util/tarutil.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
null
null
null
src/python/pants/util/tarutil.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
null
null
null
src/python/pants/util/tarutil.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import tarfile class TarFile(tarfile.TarFile): def next(self): """A copy and modification of the next() method in tarfile module. Note: this function should stay named next()...
34.884615
85
0.649761
import tarfile class TarFile(tarfile.TarFile): def next(self): self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m if self.offset != self.fileobj.tell(): self.fileobj.seek(self.offset - 1) if not self.fileobj.read(...
true
true